[Mesa-dev] [PATCH] prog_to_nir: Fix fragment depth writes.
Matt Turner
mattst88 at gmail.com
Thu Jun 4 22:34:35 PDT 2015
On Thu, Jun 4, 2015 at 10:01 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> In the ARB_fragment_program specification, the result.depth output
> variable is treated as a vec4, where the fragment depth is stored in the
> .z component, and the other three components are undefined.
>
> This is different than GLSL, which uses a scalar value (gl_FragDepth).
>
> To make this consistent for driver backends, this patch makes
> prog_to_nir use a scalar output variable for FRAG_RESULT_DEPTH,
> moving result.depth.z into the first component.
>
> Fixes Glean's fragProg1 "Z-write test" subtest.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90000
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Ugh. We should really finish getting rid of glean...
Reviewed-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list