Commit 7348fc5b by Luc Ferron Committed by Commit Bot

Vulkan: Clear to opaque black instead of transparent

This is a problem when we emulate RGB8 with RGBA8. Bug: angleproject:2536 Change-Id: I5665e513ef0138bc56f52ba35342378d8392989f Reviewed-on: https://chromium-review.googlesource.com/1051687 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent fa7503ca
......@@ -43,6 +43,12 @@ void MapSwizzleState(GLenum internalFormat,
swizzleStateOut->swizzleBlue = GL_ZERO;
swizzleStateOut->swizzleAlpha = swizzleState.swizzleRed;
break;
case GL_RGB8:
swizzleStateOut->swizzleRed = swizzleState.swizzleRed;
swizzleStateOut->swizzleGreen = swizzleState.swizzleGreen;
swizzleStateOut->swizzleBlue = swizzleState.swizzleBlue;
swizzleStateOut->swizzleAlpha = GL_ONE;
break;
default:
*swizzleStateOut = swizzleState;
break;
......@@ -557,7 +563,7 @@ vk::Error TextureVk::initImage(RendererVk *renderer,
mappedSwizzle, &mBaseLevelImageView, 1));
// TODO(jmadill): Fold this into the RenderPass load/store ops. http://anglebug.com/2361
VkClearColorValue black = {{0}};
VkClearColorValue black = {{0, 0, 0, 1.0f}};
mImage.clearColor(black, commandBuffer);
return vk::NoError();
}
......
......@@ -1398,10 +1398,7 @@ TEST_P(TextureCubeTest, CubeMapFBO)
// Test that glTexSubImage2D works properly when glTexStorage2DEXT has initialized the image with a default color.
TEST_P(Texture2DTest, TexStorage)
{
// TODO(lucferron): Follow up to clear with opaque black in TextureVk::initImageAndViews.
// http://anglebug.com/2536
ANGLE_SKIP_TEST_IF(IsVulkan() ||
getClientMajorVersion() < 3 && !extensionEnabled("GL_EXT_texture_storage"));
ANGLE_SKIP_TEST_IF(getClientMajorVersion() < 3 && !extensionEnabled("GL_EXT_texture_storage"));
int width = getWindowWidth();
int height = getWindowHeight();
......
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