From 2c5c55e72aca297263452535e41222477b012065 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 31 Aug 2020 10:14:02 +0200 Subject: [PATCH] gallium/util: use uint sampler for stencil-reads MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Some drivers can't use float-samplers to read integer textures, so let's make sure the stenicil-sampler has the right type. Reviewed-by: Marek Olšák Reviewed-by: Eric Anholt Part-of: --- src/gallium/auxiliary/util/u_simple_shaders.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c index 1908f6198a3..e0e093ab575 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.c +++ b/src/gallium/auxiliary/util/u_simple_shaders.c @@ -656,7 +656,8 @@ util_make_fs_blit_msaa_depthstencil(struct pipe_context *pipe, "FRAG\n" "DCL IN[0], GENERIC[0], LINEAR\n" "DCL SAMP[0..1]\n" - "DCL SVIEW[0..1], %s, FLOAT\n" + "DCL SVIEW[0], %s, FLOAT\n" + "DCL SVIEW[1], %s, UINT\n" "DCL OUT[0], POSITION\n" "DCL OUT[1], STENCIL\n" "DCL TEMP[0]\n" @@ -674,7 +675,7 @@ util_make_fs_blit_msaa_depthstencil(struct pipe_context *pipe, assert(tgsi_tex == TGSI_TEXTURE_2D_MSAA || tgsi_tex == TGSI_TEXTURE_2D_ARRAY_MSAA); - sprintf(text, shader_templ, type, type, type); + sprintf(text, shader_templ, type, type, type, type); if (!tgsi_text_translate(text, tokens, ARRAY_SIZE(tokens))) { assert(0); -- 2.30.2