Commit 9d943af7 by Ian Elliott Committed by Commit Bot

Vulkan: Support more texture format-type combination tests.

This is a partial fix for 3455, which contains a number of different root-causes. This CL addresses two sets of them. 1) Partial fix for KHR-GLES3.copy_tex_image_conversions.forbidden.* Recent changes, including adding support for GL_RGBA8-to-GL_RGB5_A1, plus adding support for GL_RGB10_A2-to-GL_RGB5_A1 eliminate the crashes for 56 of the 70 tests. 2) Most of the KHR-GLES3.packed_pixels.rectangle.r* tests now pass. Recent changes, including potentially the above get another 34 tests passing, and another 15 no longer crashing. 3) Vulkan: Fix errant glCopyTextImage validation code. I got all but 2 of the KHR-GLES3.packed_pixels.rectangle.r* tests passing. I fixed bugs in the validation code (with at least two more bugs that I haven't fixed yet). More details below. 3a) Fix the IsValidES3CopyTexImageCombination() function for SNORM. The code wasn't rejecting SNORM cases, which are missing from the table of effective internal formats, meaning that support is undefined. The GLES 3.2 spec says that a GL_INVALID_OPERATION error should be generated "if the effective internal format of the source buffer does not match the effective internal format of the new image." 3b) There's a caveat that was overlooked that means that internal formats like GL_RGB10_A2 are not supported. Bug: angleproject:3455 Bug: angleproject:3693 Bug: angleproject:3697 Change-Id: Ie4399a2d7cd969ec29acc926f32e6608775609c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1693325Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
parent db637356
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"src/libANGLE/renderer/gen_load_functions_table.py": "src/libANGLE/renderer/gen_load_functions_table.py":
"e65c50e84fc38ad34d0eb0bebb84aab6", "e65c50e84fc38ad34d0eb0bebb84aab6",
"src/libANGLE/renderer/load_functions_data.json": "src/libANGLE/renderer/load_functions_data.json":
"4b8a2d1b1f7038e04f51b587f0e98231", "6469fb3220567099b8488ecbfc7bdcf5",
"src/libANGLE/renderer/load_functions_table_autogen.cpp": "src/libANGLE/renderer/load_functions_table_autogen.cpp":
"5bfde353048f843718b296c5b32faf73" "65043394689d85281597ab377bc88175"
} }
\ No newline at end of file
...@@ -142,6 +142,7 @@ ...@@ -142,6 +142,7 @@
}, },
"GL_RGB5_A1": { "GL_RGB5_A1": {
"A1R5G5B5_UNORM": { "A1R5G5B5_UNORM": {
"GL_UNSIGNED_INT_2_10_10_10_REV": "LoadRGB10A2ToBGR5A1",
"GL_UNSIGNED_SHORT_5_5_5_1": "LoadRGB5A1ToA1RGB5", "GL_UNSIGNED_SHORT_5_5_5_1": "LoadRGB5A1ToA1RGB5",
"GL_UNSIGNED_BYTE": "LoadRGBA8ToBGR5A1" "GL_UNSIGNED_BYTE": "LoadRGBA8ToBGR5A1"
}, },
......
...@@ -2164,6 +2164,8 @@ LoadImageFunctionInfo RGB5_A1_to_A1R5G5B5_UNORM(GLenum type) ...@@ -2164,6 +2164,8 @@ LoadImageFunctionInfo RGB5_A1_to_A1R5G5B5_UNORM(GLenum type)
{ {
case GL_UNSIGNED_BYTE: case GL_UNSIGNED_BYTE:
return LoadImageFunctionInfo(LoadRGBA8ToBGR5A1, true); return LoadImageFunctionInfo(LoadRGBA8ToBGR5A1, true);
case GL_UNSIGNED_INT_2_10_10_10_REV:
return LoadImageFunctionInfo(LoadRGB10A2ToBGR5A1, true);
case GL_UNSIGNED_SHORT_5_5_5_1: case GL_UNSIGNED_SHORT_5_5_5_1:
return LoadImageFunctionInfo(LoadRGB5A1ToA1RGB5, true); return LoadImageFunctionInfo(LoadRGB5A1ToA1RGB5, true);
default: default:
......
...@@ -801,11 +801,26 @@ static bool IsValidES3CopyTexImageCombination(const InternalFormat &textureForma ...@@ -801,11 +801,26 @@ static bool IsValidES3CopyTexImageCombination(const InternalFormat &textureForma
} }
if ((textureFormatInfo.componentType == GL_UNSIGNED_NORMALIZED || if ((textureFormatInfo.componentType == GL_UNSIGNED_NORMALIZED ||
textureFormatInfo.componentType == GL_SIGNED_NORMALIZED || textureFormatInfo.componentType == GL_SIGNED_NORMALIZED) &&
textureFormatInfo.componentType == GL_FLOAT) &&
!(framebufferFormatInfo.componentType == GL_UNSIGNED_NORMALIZED || !(framebufferFormatInfo.componentType == GL_UNSIGNED_NORMALIZED ||
framebufferFormatInfo.componentType == GL_SIGNED_NORMALIZED || framebufferFormatInfo.componentType == GL_SIGNED_NORMALIZED))
framebufferFormatInfo.componentType == GL_FLOAT)) {
return false;
}
// SNORM is not supported (e.g. is not in the tables of "effective internal format" that
// correspond to internal formats.
if (textureFormatInfo.componentType == GL_SIGNED_NORMALIZED)
{
return false;
}
// Section 3.8.5 of the GLES 3.0.3 (and section 8.6 of the GLES 3.2) spec has a caveat, that
// the KHR dEQP tests enforce:
//
// Note that the above rules disallow matches where some components sizes are smaller and
// others are larger (such as RGB10_A2).
if (!textureFormatInfo.sized && (framebufferFormatInfo.internalFormat == GL_RGB10_A2))
{ {
return false; return false;
} }
......
...@@ -31,10 +31,15 @@ ...@@ -31,10 +31,15 @@
// For now we only log Vulkan test expectations. More back-ends can follow as we need them. // For now we only log Vulkan test expectations. More back-ends can follow as we need them.
// GL_RGB32F framebuffers should not be "complete" (may crash on Android, but only fails elsewhere):
3695 VULKAN : KHR-GLES3.packed_pixels.rectangle.rgb*32f = SKIP
// Crashes trying to load non-existent texture load function. // Crashes trying to load non-existent texture load function.
// The following test crashed on "android_angle_vk32_deqp_rel_ng":
3455 VULKAN ANDROID : KHR-GLES3.packed_pixels.rectangle.rgb9_e5 = SKIP
3455 VULKAN : KHR-GLES3.copy_tex_image_conversions.forbidden.* = SKIP 3455 VULKAN : KHR-GLES3.copy_tex_image_conversions.forbidden.* = SKIP
3455 VULKAN : KHR-GLES3.copy_tex_image_conversions.required.renderbuffer_* = SKIP
3455 VULKAN : KHR-GLES3.packed_pixels.rectangle.r* = SKIP // PBO's are not fully implemented:
3455 VULKAN : KHR-GLES3.packed_pixels.pbo_rectangle.r* = SKIP 3455 VULKAN : KHR-GLES3.packed_pixels.pbo_rectangle.r* = SKIP
3455 VULKAN : KHR-GLES3.packed_pixels.pbo_rectangle.srgb8_alpha8 = SKIP 3455 VULKAN : KHR-GLES3.packed_pixels.pbo_rectangle.srgb8_alpha8 = SKIP
......
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