v3d: Don't try to create shadow tiled temporaries for 1D textures.
authorEric Anholt <eric@anholt.net>
Mon, 17 Dec 2018 20:57:38 +0000 (12:57 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 19 Dec 2018 18:27:21 +0000 (10:27 -0800)
They're raster order anyway, so we'd assertion fail along with wasting
bandwidth.

Fixes: 6ad9e8690d14 ("v3d: Add support for texturing from linear.")
src/gallium/drivers/v3d/v3dx_state.c

index ee1ba7b2d1009931053db351b3ccc5a3cdbcf929..95a2dc30c8b1cc9983e5572bbb8cd1ecf26098f3 100644 (file)
@@ -776,7 +776,8 @@ v3d_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc,
         /* V3D still doesn't support sampling from raster textures, so we will
          * have to copy to a temporary tiled texture.
          */
-        if (!rsc->tiled) {
+        if (!rsc->tiled && !(prsc->target == PIPE_TEXTURE_1D ||
+                             prsc->target == PIPE_TEXTURE_1D_ARRAY)) {
                 struct v3d_resource *shadow_parent = rsc;
                 struct pipe_resource tmpl = {
                         .target = prsc->target,