Commit 339b95ef by Luc Ferron Committed by Commit Bot

Vulkan: Support RGB5A1 correctly

Bug: angleproject:2649 Bug: angleproject:2597 Change-Id: I2fd7185463d92737454e383fbfb7992e8d68fe68 Reviewed-on: https://chromium-review.googlesource.com/1097221 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 2a018158
......@@ -329,21 +329,20 @@ void PackPixels(const PackPixelsParams &params,
inputPitch = -inputPitch;
}
const auto &sourceGLInfo = gl::GetSizedInternalFormatInfo(sourceFormat.glInternalFormat);
const gl::InternalFormat &internalFormat =
gl::GetInternalFormatInfo(params.format, params.type);
if (sourceGLInfo.format == params.format && sourceGLInfo.type == params.type)
if (sourceFormat.glInternalFormat == internalFormat.sizedInternalFormat)
{
// Direct copy possible
for (int y = 0; y < params.area.height; ++y)
{
memcpy(destWithOffset + y * params.outputPitch, source + y * inputPitch,
params.area.width * sourceGLInfo.pixelBytes);
params.area.width * sourceFormat.pixelBytes);
}
return;
}
ASSERT(sourceGLInfo.sized);
gl::FormatType formatType(params.format, params.type);
ColorCopyFunction fastCopyFunc =
GetFastCopyFunction(sourceFormat.fastCopyFunctions, formatType);
......@@ -358,7 +357,7 @@ void PackPixels(const PackPixelsParams &params,
{
uint8_t *dest =
destWithOffset + y * params.outputPitch + x * destFormatInfo.pixelBytes;
const uint8_t *src = source + y * inputPitch + x * sourceGLInfo.pixelBytes;
const uint8_t *src = source + y * inputPitch + x * sourceFormat.pixelBytes;
fastCopyFunc(src, dest);
}
......@@ -381,7 +380,7 @@ void PackPixels(const PackPixelsParams &params,
for (int x = 0; x < params.area.width; ++x)
{
uint8_t *dest = destWithOffset + y * params.outputPitch + x * destFormatInfo.pixelBytes;
const uint8_t *src = source + y * inputPitch + x * sourceGLInfo.pixelBytes;
const uint8_t *src = source + y * inputPitch + x * sourceFormat.pixelBytes;
// readFunc and writeFunc will be using the same type of color, CopyTexImage
// will not allow the copy otherwise.
......
......@@ -206,6 +206,8 @@
2597 VULKAN ANDROID : dEQP-GLES2.functional.fbo.render.color_clear.tex2d_rgba_stencil_index8 = SKIP
2597 VULKAN ANDROID : dEQP-GLES2.functional.fbo.render.resize.tex2d_rgb_stencil_index8 = SKIP
2597 VULKAN ANDROID : dEQP-GLES2.functional.fbo.render.resize.tex2d_rgba_stencil_index8 = SKIP
2597 VULKAN ANDROID : dEQP-GLES2.functional.fbo.render.recreate_colorbuffer.no_rebind_rbo_rgb5_a1_stencil_index8 = SKIP
2597 VULKAN ANDROID : dEQP-GLES2.functional.fbo.render.resize.rbo_rgb5_a1_stencil_index8 = SKIP
2605 VULKAN ANDROID : dEQP-GLES2.functional.state_query.rbo.renderbuffer_component_size_depth = SKIP
2606 VULKAN ANDROID : dEQP-GLES2.functional.debug_marker.random = SKIP
2606 VULKAN ANDROID : dEQP-GLES2.functional.debug_marker.supported = SKIP
......@@ -224,30 +226,14 @@
2494 VULKAN : dEQP-GLES2.functional.shaders.struct.uniform.sampler_* = SKIP
2592 VULKAN : dEQP-GLES2.functional.shaders.builtin_variable.depth_range* = SKIP
2595 VULKAN : dEQP-GLES2.functional.shaders.random.all_features.fragment* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.color.blend_rbo_rgb5_a* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.color.blend_npot_rbo_rgb5_a* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.color_clear.tex2d_rgb_depth_component16_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.color_clear.tex2d_rgba_depth_component16_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.color_clear.rbo_rgb565_depth_component16_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.color_clear.rbo_rgb5_a1_depth_component16_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.depth.rbo_rgb5_a1_depth_component16 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.depth.npot_rbo_rgb5_a1_depth_component16 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.stencil_clear.tex2d_rgb_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.stencil.rbo_rgb5_a1_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.stencil.npot_rbo_rgb5_a1_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.stencil.npot_tex2d_rgb_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.stencil.npot_tex2d_rgba_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.color_clear.tex2d_rgb_depth_component16_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.color_clear.tex2d_rgba_depth_component16_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.no_rebind_rbo_rgb* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.shared_colorbuffer.* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.shared_colorbuffer_clear.rbo_rgb5_a1 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.resize.rbo_rgb5_a* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.recreate_colorbuffer.rebind_rbo_rgb5_a* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.recreate_colorbuffer.no_rebind_rbo_rgb5_a* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.recreate_depthbuffer.rebind_rbo_rgb5_a1_* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.recreate_depthbuffer.no_rebind_rbo_rgb5_a1_* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.rebind_rbo_rgb5_a1_* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.no_rebind_rbo_rgb565_depth_component16_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.no_rebind_rbo_rgb5_a1* = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.no_rebind_rbo_rgba4_depth_component16_stencil_index8 = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.shared_colorbuffer_clear.tex2d_rgb = SKIP
2597 VULKAN : dEQP-GLES2.functional.fbo.render.stencil_clear.tex2d_rgb_stencil_index8 = SKIP
2161 VULKAN : dEQP-GLES2.functional.vertex_arrays.* = SKIP
2598 VULKAN : dEQP-GLES2.functional.rasterization.primitives.line* = SKIP
2599 VULKAN : dEQP-GLES2.functional.rasterization.limits.points = SKIP
......
......@@ -181,7 +181,7 @@ TEST_P(SixteenBppTextureTest, RGBA5551Validation)
{
// TODO(lucferron): Diagnose and fix
// http://anglebug.com/2649
ANGLE_SKIP_TEST_IF(IsVulkan());
ANGLE_SKIP_TEST_IF(IsVulkan() && (IsAndroid() || (IsWindows() && IsIntel())));
GLushort pixels[4] =
{
......@@ -211,7 +211,7 @@ TEST_P(SixteenBppTextureTest, RGBA5551ClearAlpha)
{
// TODO(lucferron): Diagnose and fix
// http://anglebug.com/2649
ANGLE_SKIP_TEST_IF(IsVulkan());
ANGLE_SKIP_TEST_IF(IsVulkan() && (IsAndroid() || (IsWindows() && IsIntel())));
GLTexture tex;
GLFramebuffer fbo;
......
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