aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-07-26 00:56:34 -0400
committerIlia Mirkin <[email protected]>2015-08-17 01:01:02 -0400
commit884b4df3b6f3980bb75f20fd256f9e2cca4d9403 (patch)
tree5098a788c27362b064e47d07640693401212072b /src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c
parentf13073b7755e78306975a24f3286ff5a9c910a47 (diff)
nvc0: bind a fake tess control program when there isn't one available
Apparently this is necessary in order for tess factors to work in a tess eval program without a tess control program bound. Probably because it uses the fake program's shader header to work out the number of patch constants. Fixes vs-tes-tessinner-tessouter-inputs Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c
index 8aa127adc0a..8f8ac2d34b9 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c
@@ -148,8 +148,13 @@ nvc0_tctlprog_validate(struct nvc0_context *nvc0)
BEGIN_NVC0(push, NVC0_3D(SP_GPR_ALLOC(2)), 1);
PUSH_DATA (push, tp->num_gprs);
} else {
- BEGIN_NVC0(push, NVC0_3D(SP_SELECT(2)), 1);
+ tp = nvc0->tcp_empty;
+ /* not a whole lot we can do to handle this failure */
+ if (!nvc0_program_validate(nvc0, tp))
+ assert(!"unable to validate empty tcp");
+ BEGIN_NVC0(push, NVC0_3D(SP_SELECT(2)), 2);
PUSH_DATA (push, 0x20);
+ PUSH_DATA (push, tp->code_base);
}
nvc0_program_update_context_state(nvc0, tp, 1);
}