Commit 2aa68eba by Mohan Maiya Committed by Commit Bot

Vulkan: Update unsized array error

Update the error condition to reflect actual usecase - an unsized array is declared in a shader other than tessellation shader. Bug: angleproject:5557 Test: KHR-GLES32.core.texture_cube_map_array.texture_size_tesselation_con_sh Change-Id: I3547f52a26a5c450ac7b6df65d026c3c38f7c71d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2823576 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 96df9aba
...@@ -1216,8 +1216,23 @@ void TParseContext::checkCanBeDeclaredWithoutInitializer(const TSourceLoc &line, ...@@ -1216,8 +1216,23 @@ void TParseContext::checkCanBeDeclaredWithoutInitializer(const TSourceLoc &line,
error(line, "variables with qualifier 'const' must be initialized", identifier); error(line, "variables with qualifier 'const' must be initialized", identifier);
} }
} }
checkIsNotUnsizedArray(line, "implicitly sized arrays need to be initialized", identifier,
type); // Implicitly declared arrays are disallowed for shaders other than tessellation shaders.
if (mShaderType != GL_TESS_CONTROL_SHADER && mShaderType != GL_TESS_EVALUATION_SHADER &&
type->isArray())
{
const TSpan<const unsigned int> &arraySizes = type->getArraySizes();
for (unsigned int size : arraySizes)
{
if (size == 0)
{
error(line,
"implicitly sized arrays disallowed for shaders that are not tessellation "
"shaders",
identifier);
}
}
}
} }
// Do some simple checks that are shared between all variable declarations, // Do some simple checks that are shared between all variable declarations,
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
5579 VULKAN WIN NVIDIA : KHR-GLES32.core.tessellation_shader.single.primitive_coverage = FAIL 5579 VULKAN WIN NVIDIA : KHR-GLES32.core.tessellation_shader.single.primitive_coverage = FAIL
// Tessellation shader support // Tessellation shader support
// Failure in translator validation regarding varying arrayness
5557 VULKAN WIN : KHR-GLES32.core.texture_cube_map_array.texture_size_tesselation_con_sh = FAIL
// API validation bugs // API validation bugs
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.vertex.vertex_ordering = FAIL 5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.vertex.vertex_ordering = FAIL
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_tessLevel = FAIL 5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_tessLevel = FAIL
......
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