Mesa (master): v3d: Don't try to create shadow tiled temporaries for 1D textures.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 19 18:29:43 UTC 2018


Module: Mesa
Branch: master
Commit: fcf881adda9909ea124dac31fed70375ae7afbc8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fcf881adda9909ea124dac31fed70375ae7afbc8

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 17 12:57:38 2018 -0800

v3d: Don't try to create shadow tiled temporaries for 1D textures.

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c
index ee1ba7b2d1..95a2dc30c8 100644
--- a/src/gallium/drivers/v3d/v3dx_state.c
+++ b/src/gallium/drivers/v3d/v3dx_state.c
@@ -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,




More information about the mesa-commit mailing list