radv: fix bc optimization with POS_W_FLOAT_ENA(1)
0286CC_PERSP_CENTER_ENA is also set if:
- No barycentrics are used
- POS_W_FLOAT is enabled
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: a4b60295a7
("aco,ac/llvm,radv,radeonsi: handle ps bc optimization in nir for radv")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8928
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22782>
This commit is contained in:
@@ -611,10 +611,10 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_pipeline_layo
|
||||
.enable_mrt_output_nan_fixup = pipeline_key->ps.epilog.enable_mrt_output_nan_fixup,
|
||||
.no_color_export = stage->info.ps.has_epilog,
|
||||
|
||||
.bc_optimize_for_persp =
|
||||
stage->info.ps.reads_persp_center && stage->info.ps.reads_persp_centroid,
|
||||
.bc_optimize_for_linear =
|
||||
stage->info.ps.reads_linear_center && stage->info.ps.reads_linear_centroid,
|
||||
.bc_optimize_for_persp = G_0286CC_PERSP_CENTER_ENA(stage->info.ps.spi_ps_input) &&
|
||||
G_0286CC_PERSP_CENTROID_ENA(stage->info.ps.spi_ps_input),
|
||||
.bc_optimize_for_linear = G_0286CC_LINEAR_CENTER_ENA(stage->info.ps.spi_ps_input) &&
|
||||
G_0286CC_LINEAR_CENTROID_ENA(stage->info.ps.spi_ps_input),
|
||||
};
|
||||
|
||||
NIR_PASS_V(stage->nir, ac_nir_lower_ps, &options);
|
||||
|
Reference in New Issue
Block a user