ALWAYS_INLINE static uint32_t
radv_get_ngg_culling_settings(struct radv_cmd_buffer *cmd_buffer, bool vp_y_inverted)
{
- const struct radv_graphics_pipeline *pipeline = cmd_buffer->state.graphics_pipeline;
const struct radv_dynamic_state *d = &cmd_buffer->state.dynamic;
/* Disable shader culling entirely when conservative overestimate is used.
/* Small primitive culling assumes a sample position at (0.5, 0.5)
* so don't enable it with user sample locations.
*/
- if (!pipeline->uses_user_sample_locations) {
+ if (!cmd_buffer->state.ms.uses_user_sample_locations) {
nggc_settings |= radv_nggc_small_primitives;
/* small_prim_precision = num_samples / 2^subpixel_bits
*/
pipeline->pa_sc_mode_cntl_1 |= S_028A4C_WALK_ALIGN8_PRIM_FITS_ST(1);
}
+
+ ms->uses_user_sample_locations = state->ms && state->ms->sample_locations_enable;
}
static void
pipeline->base.shaders[pipeline->last_vgt_api_stage]->info.has_ngg_culling;
pipeline->force_vrs_per_vertex =
pipeline->base.shaders[pipeline->last_vgt_api_stage]->info.force_vrs_per_vertex;
- pipeline->uses_user_sample_locations = state.ms && state.ms->sample_locations_enable;
pipeline->uses_inner_coverage =
pipeline->base.shaders[MESA_SHADER_FRAGMENT]->info.ps.reads_fully_covered;
pipeline->rast_prim = vgt_gs_out_prim_type;
struct radv_multisample_state {
bool sample_shading_enable;
+ bool uses_user_sample_locations;
float min_sample_shading;
};
bool uses_baseinstance;
bool use_per_attribute_vb_descs;
bool can_use_simple_input;
- bool uses_user_sample_locations;
/* Whether the pipeline uses inner coverage which means that a fragment has all of its pixel
* squares fully covered by the generating primitive.