Having it be a pointer means that we end up caching clip programs based
on a pointer to wm_prog_data rather than the actual interpolation modes.
We've been caching one clip program per FS ever since
91d61fbf7cb61a44a
where Timothy rewrote brw_setup_vue_interpolation().
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
brw_wm_prog_data(brw->wm.base.prog_data);
if (wm_prog_data) {
key.contains_flat_varying = wm_prog_data->contains_flat_varying;
- key.interp_mode = wm_prog_data->interp_mode;
+
+ STATIC_ASSERT(sizeof(key.interp_mode) ==
+ sizeof(wm_prog_data->interp_mode));
+ memcpy(key.interp_mode, wm_prog_data->interp_mode,
+ sizeof(key.interp_mode));
}
/* _NEW_LIGHT | _NEW_PROGRAM */
struct brw_sf_prog_key {
GLbitfield64 attrs;
bool contains_flat_varying;
- const unsigned char *interp_mode;
+ unsigned char interp_mode[65]; /* BRW_VARYING_SLOT_COUNT */
uint8_t point_sprite_coord_replace;
GLuint primitive:2;
GLuint do_twoside_color:1;