intel/compiler: Remove emit_alpha_to_coverage workaround from backend
Remove emit_alpha_to_coverage workaround from backend compiler and start using ported workaround from NIR. v2: Copy comment from brw_fs_visitor (Caio Marcelo de Oliveira Filho) Fixes piglit test on HSW: - arb_sample_shading-builtin-gl-sample-mask-mrt-alpha-to-coverage-combinations Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
@@ -8241,6 +8241,19 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data,
|
||||
if (devinfo->gen < 6)
|
||||
brw_setup_vue_interpolation(vue_map, shader, prog_data);
|
||||
|
||||
/* From the SKL PRM, Volume 7, "Alpha Coverage":
|
||||
* "If Pixel Shader outputs oMask, AlphaToCoverage is disabled in
|
||||
* hardware, regardless of the state setting for this feature."
|
||||
*/
|
||||
if (devinfo->gen > 6 && key->alpha_to_coverage) {
|
||||
/* Run constant fold optimization in order to get the correct source
|
||||
* offset to determine render target 0 store instruction in
|
||||
* emit_alpha_to_coverage pass.
|
||||
*/
|
||||
NIR_PASS_V(shader, nir_opt_constant_folding);
|
||||
NIR_PASS_V(shader, brw_nir_lower_alpha_to_coverage);
|
||||
}
|
||||
|
||||
if (!key->multisample_fbo)
|
||||
NIR_PASS_V(shader, demote_sample_qualifiers);
|
||||
NIR_PASS_V(shader, move_interpolation_to_top);
|
||||
|
||||
Reference in New Issue
Block a user