Commit 1a186b16 by Luc Ferron Committed by Commit Bot

Vulkan: Fix issue with texsubimage2d barriers

Also re-enable the Windows AMD tests that were suppressed because of that bug. Bug: angleproject:2492 Change-Id: Ie9b5eb4c5705bbb390c3899fe4c66d3e47eff00d Reviewed-on: https://chromium-review.googlesource.com/1026461 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent f3135da9
...@@ -149,16 +149,20 @@ vk::Error PixelBuffer::flushUpdatesToImage(RendererVk *renderer, ...@@ -149,16 +149,20 @@ vk::Error PixelBuffer::flushUpdatesToImage(RendererVk *renderer,
return vk::NoError(); return vk::NoError();
} }
// Conservatively flush all writes to the image. We could use a more restricted barrier.
image->changeLayoutWithStages(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
VK_PIPELINE_STAGE_TRANSFER_BIT, commandBuffer);
ANGLE_TRY(mStagingBuffer.flush(renderer->getDevice())); ANGLE_TRY(mStagingBuffer.flush(renderer->getDevice()));
for (const SubresourceUpdate &update : mSubresourceUpdates) for (const SubresourceUpdate &update : mSubresourceUpdates)
{ {
ASSERT(update.bufferHandle != VK_NULL_HANDLE); ASSERT(update.bufferHandle != VK_NULL_HANDLE);
// Conservatively flush all writes to the image. We could use a more restricted barrier.
// Do not move this above the for loop, otherwise multiple updates can have race conditions
// and not be applied correctly as seen i:
// dEQP-gles2.functional_texture_specification_texsubimage2d_align_2d* tests on Windows AMD
image->changeLayoutWithStages(
VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, commandBuffer);
commandBuffer->copyBufferToImage(update.bufferHandle, image->getImage(), commandBuffer->copyBufferToImage(update.bufferHandle, image->getImage(),
image->getCurrentLayout(), 1, &update.copyRegion); image->getCurrentLayout(), 1, &update.copyRegion);
} }
......
...@@ -313,5 +313,4 @@ ...@@ -313,5 +313,4 @@
2161 VULKAN : dEQP-GLES2.functional.draw.random.* = SKIP 2161 VULKAN : dEQP-GLES2.functional.draw.random.* = SKIP
2161 VULKAN : dEQP-GLES2.functional.default_vertex_attrib.* = SKIP 2161 VULKAN : dEQP-GLES2.functional.default_vertex_attrib.* = SKIP
2161 VULKAN : dEQP-GLES2.functional.lifetime.* = SKIP 2161 VULKAN : dEQP-GLES2.functional.lifetime.* = SKIP
2161 VULKAN : dEQP-GLES2.functional.debug_marker.* = SKIP 2161 VULKAN : dEQP-GLES2.functional.debug_marker.* = SKIP
2492 VULKAN WIN AMD : dEQP-GLES2.functional.texture.specification.texsubimage2d_align.2d_* = SKIP \ No newline at end of file
\ No newline at end of file
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