summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-08-25 13:02:18 +0200
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-09-14 16:19:52 +0200
commitc57c7a86ae55897167e345832366d42af0903cca (patch)
tree1c56a820ba7f88fb819447425f1a2a34a043874c /src/gallium
parentd53c49bcd4f1cb179ba83656224272574f89801b (diff)
downloadexternal_mesa3d-c57c7a86ae55897167e345832366d42af0903cca.zip
external_mesa3d-c57c7a86ae55897167e345832366d42af0903cca.tar.gz
external_mesa3d-c57c7a86ae55897167e345832366d42af0903cca.tar.bz2
nvc0: emit tessellation mode and patch size in TCP/TEP validation
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_shader_state.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_shader_state.c b/src/gallium/drivers/nvc0/nvc0_shader_state.c
index 0a55812..097e7c1 100644
--- a/src/gallium/drivers/nvc0/nvc0_shader_state.c
+++ b/src/gallium/drivers/nvc0/nvc0_shader_state.c
@@ -138,11 +138,18 @@ nvc0_tctlprog_validate(struct nvc0_context *nvc0)
return;
nvc0_program_update_context_state(nvc0, tp, 1);
+ if (tp->tp.tess_mode != ~0) {
+ BEGIN_RING(chan, RING_3D(TESS_MODE), 1);
+ OUT_RING (chan, tp->tp.tess_mode);
+ }
BEGIN_RING(chan, RING_3D(SP_SELECT(2)), 2);
OUT_RING (chan, 0x21);
OUT_RING (chan, tp->code_base);
BEGIN_RING(chan, RING_3D(SP_GPR_ALLOC(2)), 1);
- OUT_RING (chan, tp->max_gpr);
+ OUT_RING (chan, tp->max_gpr);
+
+ if (tp->tp.input_patch_size <= 32)
+ IMMED_RING(chan, RING_3D(PATCH_VERTICES), tp->tp.input_patch_size);
}
void
@@ -160,6 +167,10 @@ nvc0_tevlprog_validate(struct nvc0_context *nvc0)
return;
nvc0_program_update_context_state(nvc0, tp, 2);
+ if (tp->tp.tess_mode != ~0) {
+ BEGIN_RING(chan, RING_3D(TESS_MODE), 1);
+ OUT_RING (chan, tp->tp.tess_mode);
+ }
BEGIN_RING(chan, RING_3D(TEP_SELECT), 1);
OUT_RING (chan, 0x31);
BEGIN_RING(chan, RING_3D(SP_START_ID(3)), 1);