mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 15:20:17 +01:00
anv: remove fs_msaa_flags from the graphics pipeline
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27803>
This commit is contained in:
parent
ddf31d2f40
commit
ada806baa3
2 changed files with 3 additions and 52 deletions
|
|
@ -687,14 +687,6 @@ populate_wm_prog_key(struct anv_pipeline_stage *stage,
|
|||
pipeline_has_coarse_pixel(dynamic, ms, fsr);
|
||||
}
|
||||
|
||||
static bool
|
||||
wm_prog_data_dynamic(const struct brw_wm_prog_data *prog_data)
|
||||
{
|
||||
return prog_data->alpha_to_coverage == BRW_SOMETIMES ||
|
||||
prog_data->coarse_pixel_dispatch == BRW_SOMETIMES ||
|
||||
prog_data->persample_dispatch == BRW_SOMETIMES;
|
||||
}
|
||||
|
||||
static void
|
||||
populate_cs_prog_key(struct anv_pipeline_stage *stage,
|
||||
const struct anv_device *device)
|
||||
|
|
@ -2917,48 +2909,9 @@ anv_graphics_pipeline_emit(struct anv_graphics_pipeline *pipeline,
|
|||
(pipeline->base.shaders[MESA_SHADER_TESS_CTRL]->dynamic_push_values &
|
||||
ANV_DYNAMIC_PUSH_INPUT_VERTICES);
|
||||
|
||||
if (pipeline->base.shaders[MESA_SHADER_FRAGMENT]) {
|
||||
const struct brw_wm_prog_data *wm_prog_data = get_wm_prog_data(pipeline);
|
||||
|
||||
if (state->ms) {
|
||||
pipeline->sample_shading_enable = state->ms->sample_shading_enable;
|
||||
pipeline->min_sample_shading = state->ms->min_sample_shading;
|
||||
}
|
||||
|
||||
if (wm_prog_data_dynamic(wm_prog_data)) {
|
||||
pipeline->fs_msaa_flags = INTEL_MSAA_FLAG_ENABLE_DYNAMIC;
|
||||
|
||||
assert(wm_prog_data->persample_dispatch == BRW_SOMETIMES);
|
||||
if (state->ms && state->ms->rasterization_samples > 1) {
|
||||
pipeline->fs_msaa_flags |= INTEL_MSAA_FLAG_MULTISAMPLE_FBO;
|
||||
|
||||
if (wm_prog_data->sample_shading) {
|
||||
assert(wm_prog_data->persample_dispatch != BRW_NEVER);
|
||||
pipeline->fs_msaa_flags |= INTEL_MSAA_FLAG_PERSAMPLE_DISPATCH;
|
||||
}
|
||||
|
||||
if (state->ms->sample_shading_enable &&
|
||||
(state->ms->min_sample_shading * state->ms->rasterization_samples) > 1) {
|
||||
pipeline->fs_msaa_flags |= INTEL_MSAA_FLAG_PERSAMPLE_DISPATCH |
|
||||
INTEL_MSAA_FLAG_PERSAMPLE_INTERP;
|
||||
}
|
||||
}
|
||||
|
||||
if (state->ms && state->ms->alpha_to_coverage_enable)
|
||||
pipeline->fs_msaa_flags |= INTEL_MSAA_FLAG_ALPHA_TO_COVERAGE;
|
||||
|
||||
assert(wm_prog_data->coarse_pixel_dispatch != BRW_ALWAYS);
|
||||
if (wm_prog_data->coarse_pixel_dispatch == BRW_SOMETIMES &&
|
||||
!(pipeline->fs_msaa_flags & INTEL_MSAA_FLAG_PERSAMPLE_DISPATCH) &&
|
||||
(!state->ms || !state->ms->sample_shading_enable)) {
|
||||
pipeline->fs_msaa_flags |= INTEL_MSAA_FLAG_COARSE_PI_MSG |
|
||||
INTEL_MSAA_FLAG_COARSE_RT_WRITES;
|
||||
}
|
||||
} else {
|
||||
assert(wm_prog_data->alpha_to_coverage != BRW_SOMETIMES);
|
||||
assert(wm_prog_data->coarse_pixel_dispatch != BRW_SOMETIMES);
|
||||
assert(wm_prog_data->persample_dispatch != BRW_SOMETIMES);
|
||||
}
|
||||
if (pipeline->base.shaders[MESA_SHADER_FRAGMENT] && state->ms) {
|
||||
pipeline->sample_shading_enable = state->ms->sample_shading_enable;
|
||||
pipeline->min_sample_shading = state->ms->min_sample_shading;
|
||||
}
|
||||
|
||||
const struct anv_device *device = pipeline->base.base.device;
|
||||
|
|
|
|||
|
|
@ -4634,8 +4634,6 @@ struct anv_graphics_pipeline {
|
|||
uint32_t vertex_input_elems;
|
||||
uint32_t vertex_input_data[2 * 31 /* MAX_VES + 2 internal */];
|
||||
|
||||
enum intel_msaa_flags fs_msaa_flags;
|
||||
|
||||
/* Pre computed CS instructions that can directly be copied into
|
||||
* anv_cmd_buffer.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue