c.func.single_program_flow = 1;
c.key = *key;
- c.vue_map = brw->vs.prog_data->vue_map;
+ c.vue_map = brw->vue_map_geom_out;
/* nr_regs is the number of registers filled by reading data from the VUE.
* This program accesses the entire VUE, so nr_regs needs to be the size of
*/
/* BRW_NEW_REDUCED_PRIMITIVE */
key.primitive = brw->intel.reduced_primitive;
- /* CACHE_NEW_VS_PROG (also part of VUE map) */
- key.attrs = brw->vs.prog_data->vue_map.slots_valid;
+ /* BRW_NEW_VUE_MAP_GEOM_OUT */
+ key.attrs = brw->vue_map_geom_out.slots_valid;
/* _NEW_LIGHT */
key.do_flat_shading = (ctx->Light.ShadeModel == GL_FLAT);
key.pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION);
_NEW_TRANSFORM |
_NEW_POLYGON |
_NEW_BUFFERS),
- .brw = (BRW_NEW_REDUCED_PRIMITIVE),
- .cache = CACHE_NEW_VS_PROG
+ .brw = (BRW_NEW_REDUCED_PRIMITIVE | BRW_NEW_VUE_MAP_GEOM_OUT)
},
.emit = brw_upload_clip_prog
};
brw_init_compile(brw, &c.func, mem_ctx);
c.key = *key;
- c.vue_map = brw->vs.prog_data->vue_map;
+ c.vue_map = brw->vue_map_geom_out;
if (c.key.do_point_coord) {
/*
* gl_PointCoord is a FS instead of VS builtin variable, thus it's
/* Populate the key, noting state dependencies:
*/
- /* CACHE_NEW_VS_PROG */
- key.attrs = brw->vs.prog_data->vue_map.slots_valid;
+ /* BRW_NEW_VUE_MAP_GEOM_OUT */
+ key.attrs = brw->vue_map_geom_out.slots_valid;
/* BRW_NEW_REDUCED_PRIMITIVE */
switch (brw->intel.reduced_primitive) {
.dirty = {
.mesa = (_NEW_HINT | _NEW_LIGHT | _NEW_POLYGON | _NEW_POINT |
_NEW_TRANSFORM | _NEW_BUFFERS | _NEW_PROGRAM),
- .brw = (BRW_NEW_REDUCED_PRIMITIVE),
- .cache = CACHE_NEW_VS_PROG
+ .brw = (BRW_NEW_REDUCED_PRIMITIVE | BRW_NEW_VUE_MAP_GEOM_OUT)
},
.emit = brw_upload_sf_prog
};
/* gen6_sf_state.c */
uint32_t
-get_attr_override(struct brw_vue_map *vue_map, int urb_entry_read_offset,
+get_attr_override(const struct brw_vue_map *vue_map, int urb_entry_read_offset,
int fs_attr, bool two_side_color, uint32_t *max_source_attr);
#ifdef __cplusplus
/* _NEW_MULTISAMPLE */
key->sample_alpha_to_coverage = ctx->Multisample.SampleAlphaToCoverage;
- /* CACHE_NEW_VS_PROG */
+ /* BRW_NEW_VUE_MAP_GEOM_OUT */
if (intel->gen < 6)
- key->vp_outputs_written = brw->vs.prog_data->vue_map.slots_valid;
+ key->vp_outputs_written = brw->vue_map_geom_out.slots_valid;
/* The unique fragment program ID */
key->program_string_id = fp->id;
_NEW_MULTISAMPLE),
.brw = (BRW_NEW_FRAGMENT_PROGRAM |
BRW_NEW_WM_INPUT_DIMENSIONS |
- BRW_NEW_REDUCED_PRIMITIVE),
- .cache = CACHE_NEW_VS_PROG,
+ BRW_NEW_REDUCED_PRIMITIVE |
+ BRW_NEW_VUE_MAP_GEOM_OUT)
},
.emit = brw_upload_wm_prog
};
* 256-bit increments.
*/
uint32_t
-get_attr_override(struct brw_vue_map *vue_map, int urb_entry_read_offset,
+get_attr_override(const struct brw_vue_map *vue_map, int urb_entry_read_offset,
int fs_attr, bool two_side_color, uint32_t *max_source_attr)
{
if (fs_attr == VARYING_SLOT_POS) {
*/
assert(input_index < 16 || attr == input_index);
- /* CACHE_NEW_VS_PROG | _NEW_LIGHT | _NEW_PROGRAM */
+ /* BRW_NEW_VUE_MAP_GEOM_OUT | _NEW_LIGHT | _NEW_PROGRAM */
attr_overrides[input_index++] =
- get_attr_override(&brw->vs.prog_data->vue_map,
+ get_attr_override(&brw->vue_map_geom_out,
urb_entry_read_offset, attr,
ctx->VertexProgram._TwoSideEnabled,
&max_source_attr);
_NEW_POINT |
_NEW_MULTISAMPLE),
.brw = (BRW_NEW_CONTEXT |
- BRW_NEW_FRAGMENT_PROGRAM),
- .cache = CACHE_NEW_VS_PROG
+ BRW_NEW_FRAGMENT_PROGRAM |
+ BRW_NEW_VUE_MAP_GEOM_OUT)
},
.emit = upload_sf_state,
};
*/
assert(input_index < 16 || attr == input_index);
- /* CACHE_NEW_VS_PROG | _NEW_LIGHT | _NEW_PROGRAM */
+ /* BRW_NEW_VUE_MAP_GEOM_OUT | _NEW_LIGHT | _NEW_PROGRAM */
attr_overrides[input_index++] =
- get_attr_override(&brw->vs.prog_data->vue_map,
+ get_attr_override(&brw->vue_map_geom_out,
urb_entry_read_offset, attr,
ctx->VertexProgram._TwoSideEnabled,
&max_source_attr);
_NEW_POINT |
_NEW_PROGRAM),
.brw = (BRW_NEW_CONTEXT |
- BRW_NEW_FRAGMENT_PROGRAM),
- .cache = CACHE_NEW_VS_PROG
+ BRW_NEW_FRAGMENT_PROGRAM |
+ BRW_NEW_VUE_MAP_GEOM_OUT)
},
.emit = upload_sbe_state,
};
*/
static void
upload_3dstate_so_decl_list(struct brw_context *brw,
- struct brw_vue_map *vue_map)
+ const struct brw_vue_map *vue_map)
{
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &intel->ctx;
static void
upload_3dstate_streamout(struct brw_context *brw, bool active,
- struct brw_vue_map *vue_map)
+ const struct brw_vue_map *vue_map)
{
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &intel->ctx;
if (active) {
upload_3dstate_so_buffers(brw);
- /* CACHE_NEW_VS_PROG */
- upload_3dstate_so_decl_list(brw, &brw->vs.prog_data->vue_map);
+ /* BRW_NEW_VUE_MAP_GEOM_OUT */
+ upload_3dstate_so_decl_list(brw, &brw->vue_map_geom_out);
intel->batch.needs_sol_reset = true;
}
* MMIO register updates (current performed by the kernel at each batch
* emit).
*/
- upload_3dstate_streamout(brw, active, &brw->vs.prog_data->vue_map);
+ upload_3dstate_streamout(brw, active, &brw->vue_map_geom_out);
}
const struct brw_tracked_state gen7_sol_state = {
_NEW_LIGHT |
_NEW_TRANSFORM_FEEDBACK),
.brw = (BRW_NEW_BATCH |
- BRW_NEW_VERTEX_PROGRAM),
- .cache = CACHE_NEW_VS_PROG,
+ BRW_NEW_VERTEX_PROGRAM |
+ BRW_NEW_VUE_MAP_GEOM_OUT)
},
.emit = upload_sol_state,
};