freedreno: a2xx: Handle samplerExternalOES like sampler2D
authorMarek Vasut <marex@denx.de>
Sun, 12 Sep 2021 15:09:55 +0000 (17:09 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 15 Sep 2021 13:50:01 +0000 (13:50 +0000)
There should be no difference in handling these two samplers,
handle GLSL_SAMPLER_DIM_EXTERNAL just like GLSL_SAMPLER_DIM_2D
to fix "unimplemented sampler 6" error in case someone tries to
use samplerExternalOES in shader program.

Signed-off-by: Marek Vasut <marex@denx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12817>

src/gallium/drivers/freedreno/a2xx/ir2_nir.c

index 7433127..45fe0e2 100644 (file)
@@ -692,6 +692,7 @@ emit_tex(struct ir2_context *ctx, nir_tex_instr *tex)
 
    switch (tex->sampler_dim) {
    case GLSL_SAMPLER_DIM_2D:
+   case GLSL_SAMPLER_DIM_EXTERNAL:
       break;
    case GLSL_SAMPLER_DIM_RECT:
       is_rect = true;