From: Erik Faye-Lund Date: Mon, 31 Aug 2020 08:14:02 +0000 (+0200) Subject: gallium/util: use uint sampler for stencil-reads X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c5c55e72aca297263452535e41222477b012065;p=mesa.git gallium/util: use uint sampler for stencil-reads 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: --- 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);