st/mesa: don't use nir_opt_fragdepth because it's incorrect with MSAA

Doing "gl_FragDepth = gl_FragCoord.z" with MSAA and without sample shading
changes per-sample depth testing to per-pixel depth testing, so we can't
eliminate it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12079

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685>
This commit is contained in:
Marek Olšák
2024-12-12 23:51:15 -05:00
committed by Marge Bot
parent a7d0f0b30e
commit 227f69716f
@@ -327,7 +327,6 @@ st_glsl_to_nir_post_opts(struct st_context *st, struct gl_program *prog,
NIR_PASS(_, nir, gl_nir_lower_atomics, shader_program, true);
NIR_PASS(_, nir, nir_opt_intrinsics);
NIR_PASS(_, nir, nir_opt_fragdepth);
/* Lower 64-bit ops. */
if (nir->options->lower_int64_options ||