Mesa (staging/19.1): anv/descriptor_set: Only write texture swizzles if we have an image view
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 28 08:18:43 UTC 2019
Module: Mesa
Branch: staging/19.1
Commit: 77962816a51053cb8f9a24087427097e70e58017
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=77962816a51053cb8f9a24087427097e70e58017
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Tue Jun 25 14:26:56 2019 -0500
anv/descriptor_set: Only write texture swizzles if we have an image view
When immutable samplers are set we call write_image_view with a NULL
image view. This causes issues on IVB where we have to fake texture
swizzling.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110999
Fixes: d2aa65eb18 "anv: Emulate texture swizzle in the shader when..."
(cherry picked from commit 0a364a4a74e774030cde542ba8be90008b3f1211)
---
src/intel/vulkan/anv_descriptor_set.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
index a6b49468f73..f4e00667334 100644
--- a/src/intel/vulkan/anv_descriptor_set.c
+++ b/src/intel/vulkan/anv_descriptor_set.c
@@ -1198,7 +1198,7 @@ anv_descriptor_set_write_image_view(struct anv_device *device,
anv_descriptor_set_write_image_param(desc_map, image_param);
}
- if (bind_layout->data & ANV_DESCRIPTOR_TEXTURE_SWIZZLE) {
+ if (image_view && (bind_layout->data & ANV_DESCRIPTOR_TEXTURE_SWIZZLE)) {
assert(!(bind_layout->data & ANV_DESCRIPTOR_SAMPLED_IMAGE));
assert(image_view);
struct anv_texture_swizzle_descriptor desc_data[3];
More information about the mesa-commit
mailing list