freedreno/a6xx: Fix layered texture type enum
authorKristian H. Kristensen <hoegsberg@google.com>
Fri, 1 Nov 2019 22:16:44 +0000 (15:16 -0700)
committerKristian H. Kristensen <hoegsberg@google.com>
Fri, 8 Nov 2019 00:36:33 +0000 (16:36 -0800)
2D array textures and 3D textures are different enum values after all.

Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Rob Clark <robdclark@gmail.com>
src/freedreno/registers/a6xx.xml
src/gallium/drivers/freedreno/a6xx/fd6_gmem.c

index 4763c47b7d1e0c12243b33eab9b5b11d31b028c7..3f78cd58cf736a7b90d40a97dc0ab4735d259e4b 100644 (file)
@@ -1859,9 +1859,10 @@ to upconvert to 32b float internally?
        <reg32 offset="0x8003" name="GRAS_UNKNOWN_8003"/>
 
        <enum name="a6xx_layer_type">
-         <value value="0x0" name="MULTISAMPLE_ARRAY"/>
-         <value value="0x1" name="ARRAY"/> <!-- 2d array and 3d -->
-         <value value="0x2" name="CUBEMAP"/>
+         <value value="0x0" name="LAYER_MULTISAMPLE_ARRAY"/>
+         <value value="0x1" name="LAYER_3D"/>
+         <value value="0x2" name="LAYER_CUBEMAP"/>
+         <value value="0x3" name="LAYER_2D_ARRAY"/>
        </enum>
 
        <reg32 offset="0x8004" name="GRAS_LAYER_CNTL">
index 5799e6b0d3f0cda5d3de6d210c6c793c07db2343..708347931ac967d20e5f39e4d17715c45c0c99e1 100644 (file)
@@ -109,13 +109,13 @@ emit_mrt(struct fd_ringbuffer *ring, struct pipe_framebuffer_state *pfb,
                if (psurf->u.tex.first_layer < psurf->u.tex.last_layer) {
                        layered = true;
                        if (psurf->texture->target == PIPE_TEXTURE_2D_ARRAY && psurf->texture->nr_samples > 0)
-                               type = MULTISAMPLE_ARRAY;
+                               type = LAYER_MULTISAMPLE_ARRAY;
                        else if (psurf->texture->target == PIPE_TEXTURE_2D_ARRAY)
-                               type = ARRAY;
+                               type = LAYER_2D_ARRAY;
                        else if (psurf->texture->target == PIPE_TEXTURE_CUBE)
-                               type = CUBEMAP;
+                               type = LAYER_CUBEMAP;
                        else if (psurf->texture->target == PIPE_TEXTURE_3D)
-                               type = ARRAY;
+                               type = LAYER_3D;
 
                        stride /= pfb->samples;
                }