Commit 54d51f32 by Ian Elliott Committed by Commit Bot

Vulkan: Fix crash with glBeginTransformFeedback

The TransformFeedbackVk::onBeginEnd() method wasn't calling updateQueueSerial(), which was causing CommandGraphResource::hasChildlessWritingNode() to use an old mCurrentWritingNode, which had already been freed (i.e. Visual Studio showed it pointing to memory that is 0xdddddddd--which means that mCurrentWritingNode has been freed, but is still being used). Unfortunately, there are still other crashes affecting these tests, but they are the same set (and yes, there are multiple, and they are random) that cause most of the "KHR-GLES3.copy_tex_image_conversions.required.*" tests to crash). Bug: angleproject:3674 Change-Id: I5cd44018ea0beb25cb218e562d5b863be6cbd450 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1742972 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
parent e7970c3e
...@@ -37,7 +37,7 @@ angle::Result TransformFeedbackVk::begin(const gl::Context *context, ...@@ -37,7 +37,7 @@ angle::Result TransformFeedbackVk::begin(const gl::Context *context,
contextVk->invalidateCurrentTransformFeedbackBuffers(); contextVk->invalidateCurrentTransformFeedbackBuffers();
vk::GetImpl(context)->onTransformFeedbackPauseResume(); vk::GetImpl(context)->onTransformFeedbackPauseResume();
onBeginEnd(context); onBeginOrEnd(context);
return angle::Result::Continue; return angle::Result::Continue;
} }
...@@ -54,7 +54,7 @@ angle::Result TransformFeedbackVk::end(const gl::Context *context) ...@@ -54,7 +54,7 @@ angle::Result TransformFeedbackVk::end(const gl::Context *context)
} }
vk::GetImpl(context)->onTransformFeedbackPauseResume(); vk::GetImpl(context)->onTransformFeedbackPauseResume();
onBeginEnd(context); onBeginOrEnd(context);
return angle::Result::Continue; return angle::Result::Continue;
} }
...@@ -217,7 +217,7 @@ void TransformFeedbackVk::getBufferOffsets(ContextVk *contextVk, ...@@ -217,7 +217,7 @@ void TransformFeedbackVk::getBufferOffsets(ContextVk *contextVk,
} }
} }
void TransformFeedbackVk::onBeginEnd(const gl::Context *context) void TransformFeedbackVk::onBeginOrEnd(const gl::Context *context)
{ {
// Currently, we don't handle resources switching from read-only to writable and back correctly. // Currently, we don't handle resources switching from read-only to writable and back correctly.
// In the case of transform feedback, the attached buffers can switch between being written by // In the case of transform feedback, the attached buffers can switch between being written by
...@@ -231,6 +231,7 @@ void TransformFeedbackVk::onBeginEnd(const gl::Context *context) ...@@ -231,6 +231,7 @@ void TransformFeedbackVk::onBeginEnd(const gl::Context *context)
FramebufferVk *framebufferVk = vk::GetImpl(context->getState().getDrawFramebuffer()); FramebufferVk *framebufferVk = vk::GetImpl(context->getState().getDrawFramebuffer());
vk::FramebufferHelper *framebuffer = framebufferVk->getFramebuffer(); vk::FramebufferHelper *framebuffer = framebufferVk->getFramebuffer();
framebuffer->updateQueueSerial(contextVk->getCurrentQueueSerial());
if (framebuffer->hasStartedRenderPass()) if (framebuffer->hasStartedRenderPass())
{ {
framebuffer->finishCurrentCommands(contextVk); framebuffer->finishCurrentCommands(contextVk);
......
...@@ -55,7 +55,7 @@ class TransformFeedbackVk : public TransformFeedbackImpl ...@@ -55,7 +55,7 @@ class TransformFeedbackVk : public TransformFeedbackImpl
size_t offsetsSize) const; size_t offsetsSize) const;
private: private:
void onBeginEnd(const gl::Context *context); void onBeginOrEnd(const gl::Context *context);
// Cached buffer properties for faster descriptor set update and offset calculation. // Cached buffer properties for faster descriptor set update and offset calculation.
struct BoundBufferRange struct BoundBufferRange
......
...@@ -57,56 +57,56 @@ ...@@ -57,56 +57,56 @@
3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture3d_cubemap_posz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture3d_cubemap_posz = SKIP
// The following crash under glBeginTransformFeedback, by accessing freed memory (random): // The following crash under glBeginTransformFeedback, by accessing freed memory (random):
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_texture2d = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_texture2d = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_negx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_negx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_negy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_negy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_negz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_negz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_posx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_posx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_posy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_posy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_posz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.texture2d_cubemap_posz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_texture2d = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_texture2d = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_negx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_negx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_negy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_negy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_negz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_negz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_posx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_posx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_posy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_posy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_posz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negx_cubemap_posz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_texture2d = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_texture2d = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_negx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_negx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_negy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_negy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_negz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_negz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_posx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_posx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_posy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_posy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_posz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_posz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_texture2d = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_texture2d = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_negx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_negx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_negy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_negy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_negz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_negz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_posx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_posx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_posy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_posy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_posz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_negz_cubemap_posz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_texture2d = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_texture2d = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_negx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_negx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_negy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_negy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_negz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_negz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_posx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_posx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_posy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_posy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_posz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posx_cubemap_posz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_texture2d = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_texture2d = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_negx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_negx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_negy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_negy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_negz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_negz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_posx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_posx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_posy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_posy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_posz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posy_cubemap_posz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_texture2d = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_texture2d = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_negx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_negx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_negy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_negy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_negz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_negz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_posx = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_posx = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_posy = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_posy = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_posz = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.cubemap_posz_cubemap_posz = SKIP
3674 VULKAN : KHR-GLES3.copy_tex_image_conversions.forbidden.renderbuffer_cubemap* = SKIP 3458 VULKAN : KHR-GLES3.copy_tex_image_conversions.forbidden.renderbuffer_cubemap* = SKIP
// column/row_major specified on struct member: // column/row_major specified on struct member:
3443 VULKAN : KHR-GLES3.shaders.uniform_block.random.all_per_block_buffers.16 = FAIL 3443 VULKAN : KHR-GLES3.shaders.uniform_block.random.all_per_block_buffers.16 = 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