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>
+ /** A bitfield of per-vertex outputs written. */
+ uint64_t outputs_written;
+
struct brw_sampler_prog_key_data tex;
};
struct brw_sampler_prog_key_data tex;
};
memset(&key, 0, sizeof(key));
memset(&key, 0, sizeof(key));
- key.program_string_id = tcp->id;
-
key.input_vertices = ctx->TessCtrlProgram.patch_vertices;
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;
/* 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)) {
if (!brw_search_cache(&brw->cache, BRW_CACHE_TCS_PROG,
&key, sizeof(key),
&stage_state->prog_offset, &brw->tcs.prog_data)) {