return brw_vue_slot_to_offset(vue_map->varying_to_slot[varying]);
}
+void brw_compute_vue_map(struct brw_context *brw, struct brw_vue_map *vue_map,
+ GLbitfield64 slots_valid, bool userclip_active);
+
struct brw_sf_prog_data {
GLuint urb_read_length;
* prog_data->userclip and prog_data->outputs_written in their key
* (generated by CACHE_NEW_VS_PROG).
*/
-static void
-brw_compute_vue_map(struct brw_context *brw, struct brw_vs_compile *c,
- GLbitfield64 slots_valid)
+void
+brw_compute_vue_map(struct brw_context *brw, struct brw_vue_map *vue_map,
+ GLbitfield64 slots_valid, bool userclip_active)
{
const struct intel_context *intel = &brw->intel;
- struct brw_vue_map *vue_map = &c->prog_data.vue_map;
/* Prior to Gen6, don't assign a slot for VARYING_SLOT_CLIP_VERTEX, since
* it is unsupported.
*/
assign_vue_slot(vue_map, VARYING_SLOT_PSIZ);
assign_vue_slot(vue_map, VARYING_SLOT_POS);
- if (c->key.userclip_active) {
+ if (userclip_active) {
assign_vue_slot(vue_map, VARYING_SLOT_CLIP_DIST0);
assign_vue_slot(vue_map, VARYING_SLOT_CLIP_DIST1);
}
}
}
- brw_compute_vue_map(brw, &c, outputs_written);
+ brw_compute_vue_map(brw, &c.prog_data.vue_map, outputs_written,
+ c.key.userclip_active);
if (0) {
_mesa_fprint_program_opt(stdout, &c.vp->program.Base, PROG_PRINT_DEBUG,