[Mesa-dev] [PATCH] meta/blit: Use gl_FragColor also in the msaa blit shader
Kenneth Graunke
kenneth at whitecape.org
Tue May 27 13:38:29 PDT 2014
On 05/27/2014 06:21 AM, Topi Pohjolainen wrote:
> Fixes framebuffer_blit_functionality_multisampled_to_singlesampled_blit
> es3 cts test on bdw. Also fixes this on ivb when ivb is forced to use
> the meta path.
>
> No piglit regressions on IVB.
>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Matt Turner <mattst88 at gmail.com>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Anuj Phogat <anuj.phogat at gmail.com>
> Cc: "10.2" <mesa-stable at lists.freedesktop.org>
> ---
> src/mesa/drivers/common/meta_blit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
> index 84594d1..5929619 100644
> --- a/src/mesa/drivers/common/meta_blit.c
> +++ b/src/mesa/drivers/common/meta_blit.c
> @@ -273,7 +273,7 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx,
> samples);
> } else {
> ralloc_asprintf_append(&sample_resolve,
> - " out_color = sample_%d_0 / %f;\n",
> + " gl_FragColor = sample_%d_0 / %f;\n",
> samples, (float)samples);
> }
> }
>
Seems reasonable in the short term, and this gets:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Unfortunately, this doesn't fix MRT for integer data.
In the single-sampled case, since we're directly copying data, we were
read/copy/write data as "float" values, which actually contained the
integer bits. Here, we can't do that since we need to process the
actual integer data.
I do wonder if we could use intBitsToFloat/uintBitsToFloat to stuff the
integer bits in the float gl_FragColor output. Just a crazy idea.
In the long term (post 10.2), I think we should draft an extension that
allows you to do "layout(location = all)" on user-defined fragment
shader outputs. (Or some similar syntax.)
--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140527/1daf357b/attachment.sig>
More information about the mesa-dev
mailing list