Mesa (master): zink: do not use SpvDimRect

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 14 11:12:41 UTC 2020


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

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Tue Feb  4 12:20:36 2020 +0100

zink: do not use SpvDimRect

Vulkan doesn't support SpvDimRect. But we don't need to pass this at
all, as we already mark the sampler as un-normalized.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3764>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3764>

---

 src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 2 +-
 src/gallium/drivers/zink/zink_context.c              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
index fa2c7b0bf94..9e516eae56d 100644
--- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
+++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
@@ -369,7 +369,7 @@ type_to_dim(enum glsl_sampler_dim gdim, bool *is_ms)
    case GLSL_SAMPLER_DIM_CUBE:
       return SpvDimCube;
    case GLSL_SAMPLER_DIM_RECT:
-      return SpvDimRect;
+      return SpvDim2D;
    case GLSL_SAMPLER_DIM_BUF:
       return SpvDimBuffer;
    case GLSL_SAMPLER_DIM_EXTERNAL:
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index d6d3f33b115..c5fb0e2e0b0 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -203,7 +203,7 @@ image_view_type(enum pipe_texture_target target)
    case PIPE_TEXTURE_CUBE: return VK_IMAGE_VIEW_TYPE_CUBE;
    case PIPE_TEXTURE_CUBE_ARRAY: return VK_IMAGE_VIEW_TYPE_CUBE_ARRAY;
    case PIPE_TEXTURE_3D: return VK_IMAGE_VIEW_TYPE_3D;
-   case PIPE_TEXTURE_RECT: return VK_IMAGE_VIEW_TYPE_2D; /* not sure */
+   case PIPE_TEXTURE_RECT: return VK_IMAGE_VIEW_TYPE_2D;
    default:
       unreachable("unexpected target");
    }



More information about the mesa-commit mailing list