Commit ce41a43c by Courtney Goeltzenleuchter Committed by Commit Bot

Vulkan: Fix failed assert when unbinding texture

We were hitting onImageStateChange with no texture active and hitting the assert in that function for needing a texture. There are times when we call onImageStateChange where there is no texture bound, early exit in those cases. Test: angle_deqp_khr_gles31_tests --user-angle=swiftshader --gtest_filter=dEQP.KHR_GLES31/core_layout_binding_image2D_layout_binding_imageLoad_* also: --gtest_filter=dEQP.KHR_GLES31/core_layout_binding_atomic_uint_layout_binding_atomic_ComputeShader --gtest_filter=dEQP.KHR_GLES31/core_layout_binding_buffer_layout_binding_atomicAdd_ComputeShader --gtest_filter=dEQP.KHR_GLES31/core_layout_binding_block_layout_binding_block_ComputeShader --gtest_filter=dEQP.KHR_GLES31/core_layout_binding_sampler2D_layout_binding_texture_ComputeShader Bug: angleproject:4124 Change-Id: I027cf4ecb6a5d6aea874c306bf3e67b95a75af62 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965027 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent 5fd73782
...@@ -2915,7 +2915,11 @@ void State::onImageStateChange(const Context *context, size_t unit) ...@@ -2915,7 +2915,11 @@ void State::onImageStateChange(const Context *context, size_t unit)
if (mProgram) if (mProgram)
{ {
const ImageUnit &image = mImageUnits[unit]; const ImageUnit &image = mImageUnits[unit];
ASSERT(image.texture.get());
// Have nothing to do here if no texture bound
if (!image.texture.get())
return;
if (image.texture->hasAnyDirtyBit()) if (image.texture->hasAnyDirtyBit())
{ {
mDirtyImages.set(unit); mDirtyImages.set(unit);
......
...@@ -55,10 +55,6 @@ ...@@ -55,10 +55,6 @@
// Multisampled textures: // Multisampled textures:
3565 VULKAN : KHR-GLES31.core.texture_storage_multisample.* = SKIP 3565 VULKAN : KHR-GLES31.core.texture_storage_multisample.* = SKIP
// 2D array and 3D textures for compute shaders:
3810 VULKAN : KHR-GLES31.core.layout_binding.sampler2DArray_layout_binding_texture_ComputeShader = SKIP
3810 VULKAN : KHR-GLES31.core.layout_binding.sampler3D_layout_binding_texture_ComputeShader = SKIP
// Program Pipeline Objects: // Program Pipeline Objects:
3570 VULKAN : KHR-GLES31.core.shader_atomic_counters.advanced-usage-many-draw-calls2 = FAIL 3570 VULKAN : KHR-GLES31.core.shader_atomic_counters.advanced-usage-many-draw-calls2 = FAIL
3570 VULKAN : KHR-GLES31.core.shader_atomic_counters.advanced-usage-many-dispatches = FAIL 3570 VULKAN : KHR-GLES31.core.shader_atomic_counters.advanced-usage-many-dispatches = FAIL
...@@ -118,16 +114,6 @@ ...@@ -118,16 +114,6 @@
// Blend equations: // Blend equations:
3586 VULKAN : KHR-GLES31.core.blend_equation_advanced.* = SKIP 3586 VULKAN : KHR-GLES31.core.blend_equation_advanced.* = SKIP
// Storage image front-end crash when unbinding images (given texture 0)
4124 VULKAN : KHR-GLES31.core.layout_binding.sampler2D_layout_binding_texture_ComputeShader = SKIP
4124 VULKAN : KHR-GLES31.core.layout_binding.block_layout_binding_block_ComputeShader = SKIP
4124 VULKAN : KHR-GLES31.core.layout_binding.buffer_layout_binding_atomicAdd_ComputeShader = SKIP
4124 VULKAN : KHR-GLES31.core.layout_binding.atomic_uint_layout_binding_atomic_ComputeShader = SKIP
4124 VULKAN : KHR-GLES31.core.layout_binding.image2D_layout_binding_imageLoad_ComputeShader = SKIP
4124 VULKAN : KHR-GLES31.core.layout_binding.image2D_layout_binding_imageLoad_FragmentShader = SKIP
4124 VULKAN : KHR-GLES31.core.layout_binding.image2D_layout_binding_imageLoad_VertexShader = SKIP
// Fails on Pixel2 and Pixel2 XL // Fails on Pixel2 and Pixel2 XL
4159 VULKAN PIXEL2ORXL : KHR-GLES31.core.draw_indirect.advanced-twoPass-transformFeedback-elements = FAIL 4159 VULKAN PIXEL2ORXL : KHR-GLES31.core.draw_indirect.advanced-twoPass-transformFeedback-elements = FAIL
4159 VULKAN PIXEL2ORXL : KHR-GLES31.core.draw_indirect.advanced-twoPass-transformFeedback-arrays = FAIL 4159 VULKAN PIXEL2ORXL : KHR-GLES31.core.draw_indirect.advanced-twoPass-transformFeedback-arrays = FAIL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment