c.prog_data.output_topology = prim_to_hw_prim[gp->program.OutputType];
+ brw_compute_vue_map(brw, &c.input_vue_map, c.key.input_varyings);
+
/* GS inputs are read from the VUE 256 bits (2 vec4's) at a time, so we
* need to program a URB read length of ceiling(num_slots / 2).
*/
- c.prog_data.base.urb_read_length = (c.key.input_vue_map.num_slots + 1) / 2;
+ c.prog_data.base.urb_read_length = (c.input_vue_map.num_slots + 1) / 2;
void *mem_ctx = ralloc_context(NULL);
unsigned program_size;
&key.base.tex);
/* BRW_NEW_VUE_MAP_VS */
- key.input_vue_map = brw->vue_map_vs;
+ key.input_varyings = brw->vue_map_vs.slots_valid;
if (!brw_search_cache(&brw->cache, BRW_GS_PROG,
&key, sizeof(key),
assert(num_input_vertices <= MAX_GS_INPUT_VERTICES);
unsigned input_array_stride = c->prog_data.base.urb_read_length * 2;
- for (int slot = 0; slot < c->key.input_vue_map.num_slots; slot++) {
- int varying = c->key.input_vue_map.slot_to_varying[slot];
+ for (int slot = 0; slot < c->input_vue_map.num_slots; slot++) {
+ int varying = c->input_vue_map.slot_to_varying[slot];
for (unsigned vertex = 0; vertex < num_input_vertices; vertex++) {
attribute_map[BRW_VARYING_SLOT_COUNT * vertex + varying] =
payload_reg + input_array_stride * vertex + slot;
{
struct brw_vec4_prog_key base;
- struct brw_vue_map input_vue_map;
+ GLbitfield64 input_varyings;
};
struct brw_vec4_compile base;
struct brw_gs_prog_key key;
struct brw_gs_prog_data prog_data;
+ struct brw_vue_map input_vue_map;
struct brw_geometry_program *gp;