freedreno/a6xx: cube image fix
authorRob Clark <robdclark@gmail.com>
Fri, 22 Feb 2019 18:09:25 +0000 (13:09 -0500)
committerRob Clark <robdclark@gmail.com>
Fri, 22 Feb 2019 19:05:32 +0000 (14:05 -0500)
Note that emit_intrinsic_load_image() already swaps a .3d flag with an
.a flag.  I tried doing things the other way around (going back to .3d)
but that didn't work.  And treating cube images as 2d array is also what
blob does, so let's just go with that.

Fixes dEQP-GLES31.functional.image_load_store.cube.load_store.*

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a6xx/fd6_image.c

index d41a8887a538986f9da9294b46137a2f640a7c79..5683612c51cf6f3ca7b18a4677e07628fd1a5c3a 100644 (file)
@@ -70,6 +70,10 @@ static void translate_image(struct fd6_image *img, const struct pipe_image_view
        img->cpp       = rsc->cpp;
        img->bo        = rsc->bo;
 
+       /* Treat cube textures as 2d-array: */
+       if (img->type == A6XX_TEX_CUBE)
+               img->type = A6XX_TEX_2D;
+
        if (prsc->target == PIPE_BUFFER) {
                img->buffer = true;
                img->offset = pimg->u.buf.offset;