Commit 9905f7f5 by Antonio Maiorano Committed by Commit Bot

Fix CopyTextureTestES3.ES3FloatFormats for VK

When enabled, this would crash in debug because mFormat would be nullptr on the target VkTexture, and the ASSERT would access mFormat via getAspectFlags(). Fixed this by only calling getAspectFlags() if mFormat is valid. I'm not sure this was the original reason this test was disabled, but they pass now on SwiftShader. Bug: angleproject:4092 Change-Id: I9b04bbc61dde14f722d3a510f3d38776f4f6c7ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2221420Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
parent 56a4cc12
...@@ -3537,7 +3537,7 @@ angle::Result ImageHelper::stageSubresourceUpdateAndGetData(ContextVk *contextVk ...@@ -3537,7 +3537,7 @@ angle::Result ImageHelper::stageSubresourceUpdateAndGetData(ContextVk *contextVk
copy.imageSubresource.layerCount = imageIndex.getLayerCount(); copy.imageSubresource.layerCount = imageIndex.getLayerCount();
// Note: Only support color now // Note: Only support color now
ASSERT(getAspectFlags() == VK_IMAGE_ASPECT_COLOR_BIT); ASSERT((mFormat == nullptr) || (getAspectFlags() == VK_IMAGE_ASPECT_COLOR_BIT));
gl_vk::GetOffset(offset, &copy.imageOffset); gl_vk::GetOffset(offset, &copy.imageOffset);
gl_vk::GetExtent(glExtents, &copy.imageExtent); gl_vk::GetExtent(glExtents, &copy.imageExtent);
......
...@@ -1822,8 +1822,6 @@ TEST_P(CopyTextureTestES3, ES3FloatFormats) ...@@ -1822,8 +1822,6 @@ TEST_P(CopyTextureTestES3, ES3FloatFormats)
} }
ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_EXT_color_buffer_float")); ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_EXT_color_buffer_float"));
// http://anglebug.com/4092
ANGLE_SKIP_TEST_IF(IsVulkan());
auto testOutput = [this](GLuint texture, const GLColor32F &expectedColor) { auto testOutput = [this](GLuint texture, const GLColor32F &expectedColor) {
constexpr char kVS[] = constexpr char kVS[] =
......
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