uint32_t *(*create_so_decl_list)(const struct pipe_stream_output_info *sol,
const struct brw_vue_map *vue_map);
void (*populate_vs_key)(const struct iris_context *ice,
+ const struct shader_info *info,
struct brw_vs_prog_key *key);
void (*populate_tcs_key)(const struct iris_context *ice,
struct brw_tcs_prog_key *key);
switch (nir->info.stage) {
case MESA_SHADER_VERTEX:
+ /* User clip planes */
+ if (nir->info.clip_distance_array_size == 0)
+ ish->nos |= IRIS_NOS_RASTERIZER;
// XXX: NOS
break;
case MESA_SHADER_TESS_CTRL:
ice->shaders.uncompiled[MESA_SHADER_VERTEX];
struct brw_vs_prog_key key = { .program_string_id = ish->program_id };
- ice->vtbl.populate_vs_key(ice, &key);
+ ice->vtbl.populate_vs_key(ice, &ish->nir->info, &key);
if (iris_bind_cached_shader(ice, IRIS_CACHE_VS, &key))
return;
uint32_t wm[GENX(3DSTATE_WM_length)];
uint32_t line_stipple[GENX(3DSTATE_LINE_STIPPLE_length)];
+ uint8_t num_clip_plane_consts;
bool clip_halfz; /* for CC_VIEWPORT */
bool depth_clip_near; /* for CC_VIEWPORT */
bool depth_clip_far; /* for CC_VIEWPORT */
line.LineStippleRepeatCount = line_stipple_factor;
}
+ if (state->clip_plane_enable != 0)
+ cso->num_clip_plane_consts = util_logbase2(state->clip_plane_enable) + 1;
+
return cso;
}
*/
static void
iris_populate_vs_key(const struct iris_context *ice,
+ const struct shader_info *info,
struct brw_vs_prog_key *key)
{
+ const struct iris_rasterizer_state *cso_rast = ice->state.cso_rast;
+
iris_populate_sampler_key(ice, &key->tex);
+
+ if (info->clip_distance_array_size == 0)
+ key->nr_userclip_plane_consts = cso_rast->num_clip_plane_consts;
}
/**