summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_tcs.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-12-17 21:39:28 -0800
committerKenneth Graunke <kenneth@whitecape.org>2015-12-22 17:22:06 -0800
commit2432643e89ece4ed642db7ec8d811e724d1e8a35 (patch)
tree1b359d768575faa325e0aa6ecae01973fa58f8c9 /src/mesa/drivers/dri/i965/brw_tcs.c
parent239a4bdcd44529e9495d9e68cf5a157421753b3c (diff)
downloadexternal_mesa3d-2432643e89ece4ed642db7ec8d811e724d1e8a35.zip
external_mesa3d-2432643e89ece4ed642db7ec8d811e724d1e8a35.tar.gz
external_mesa3d-2432643e89ece4ed642db7ec8d811e724d1e8a35.tar.bz2
i965: Create and set a new brw_tcs_prog_data::outputs_written field.
When the application hasn't supplied a TCS, and we have to create one, we need to know what VS outputs to copy to TES inputs. To do this, we create a new program key field, and set it to the TES InputsRead bitfield. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_tcs.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_tcs.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c
index 5de6f48..1da87ee 100644
--- a/src/mesa/drivers/dri/i965/brw_tcs.c
+++ b/src/mesa/drivers/dri/i965/brw_tcs.c
@@ -201,19 +201,24 @@ brw_upload_tcs_prog(struct brw_context *brw)
memset(&key, 0, sizeof(key));
- key.program_string_id = tcp->id;
-
key.input_vertices = ctx->TessCtrlProgram.patch_vertices;
- /* _NEW_TEXTURE */
- brw_populate_sampler_prog_key_data(ctx, prog, stage_state->sampler_count,
- &key.tex);
-
/* We need to specialize our code generation for tessellation levels
* based on the domain the DS is expecting to tessellate.
*/
key.tes_primitive_mode = tep->program.PrimitiveMode;
+ if (tcp) {
+ key.program_string_id = tcp->id;
+
+ /* _NEW_TEXTURE */
+ brw_populate_sampler_prog_key_data(ctx, prog, stage_state->sampler_count,
+ &key.tex);
+ } else {
+ key.outputs_written = tep->program.Base.InputsRead;
+ }
+
+
if (!brw_search_cache(&brw->cache, BRW_CACHE_TCS_PROG,
&key, sizeof(key),
&stage_state->prog_offset, &brw->tcs.prog_data)) {