mirror of
https://github.com/utmapp/angle.git
synced 2026-12-01 14:00:09 -10:00
Vulkan: Add Validation checks in FramebufferTextureEXT
This change makes FramebufferTextureEXT set a validation error if <level> is not a supported texture level. This change also makes FramebufferTextureEXT set a validation error if <texture> is the name of a buffer texture. Test: KHR-GLES32.core.geometry_shader.layered_fbo.fb_texture_invalid_level_number Test: KHR-GLES32.core.geometry_shader.layered_fbo.fb_texture_argument_refers_to_buffer_texture Bug: angleproject:5579 Change-Id: Iedba8adc8faec02822374c3c1862b7abd031fcc2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2796152 Reviewed-by: Shahbaz Youssefi <[email protected]> Reviewed-by: Jamie Madill <[email protected]> Commit-Queue: Mohan Maiya <[email protected]>
This commit is contained in:
1 parent
e9decf0c6d
commit
f9dbd4efb3
4 files changed
+45
-6
No files matched your search
@@ -1777,6 +1777,33 @@ bool ValidateFramebufferTextureBase(const Context *context,
|
||||
context->validationError(GL_INVALID_VALUE, kInvalidMipLevel);
|
||||
return false;
|
||||
}
|
||||
|
||||
// GLES spec 3.1, Section 9.2.8 "Attaching Texture Images to a Framebuffer"
|
||||
// An INVALID_VALUE error is generated if texture is not zero and level is
|
||||
// not a supported texture level for textarget
|
||||
|
||||
// Common criteria for not supported texture levels(other criteria are handled case by case
|
||||
// in non base functions): If texture refers to an immutable-format texture, level must be
|
||||
// greater than or equal to zero and smaller than the value of TEXTURE_IMMUTABLE_LEVELS for
|
||||
// texture.
|
||||
if (tex->getImmutableFormat() && context->getClientVersion() >= ES_3_1)
|
||||
{
|
||||
if (level >= static_cast<GLint>(tex->getImmutableLevels()))
|
||||
{
|
||||
context->validationError(GL_INVALID_VALUE, kInvalidMipLevel);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// GLES spec 3.2, Section 9.2.8 "Attaching Texture Images to a Framebuffer"
|
||||
// An INVALID_OPERATION error is generated if <texture> is the name of a buffer texture.
|
||||
if ((context->getClientVersion() >= ES_3_2 ||
|
||||
context->getExtensions().textureBufferAny()) &&
|
||||
tex->getType() == TextureType::Buffer)
|
||||
{
|
||||
context->validationError(GL_INVALID_OPERATION, kInvalidTextureTarget);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const Framebuffer *framebuffer = context->getState().getTargetFramebuffer(target);
|
||||
|
||||
@@ -2716,6 +2716,24 @@ bool ValidateFramebufferTextureCommon(const Context *context,
|
||||
context->validationError(GL_INVALID_VALUE, kInvalidMipLevel);
|
||||
return false;
|
||||
}
|
||||
|
||||
// GLES spec 3.1, Section 9.2.8 "Attaching Texture Images to a Framebuffer"
|
||||
// If textarget is TEXTURE_2D_MULTISAMPLE, then level must be zero.
|
||||
if (tex->getType() == TextureType::_2DMultisample && level != 0)
|
||||
{
|
||||
context->validationError(GL_INVALID_VALUE, kLevelNotZero);
|
||||
return false;
|
||||
}
|
||||
|
||||
// [OES_texture_storage_multisample_2d_array] Section 9.2.2 "Attaching Images to Framebuffer
|
||||
// Objects"
|
||||
// If texture is a two-dimensional multisample array texture, then level must be zero.
|
||||
if (context->getExtensions().textureStorageMultisample2DArrayOES &&
|
||||
tex->getType() == TextureType::_2DMultisampleArray && level != 0)
|
||||
{
|
||||
context->validationError(GL_INVALID_VALUE, kLevelNotZero);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ValidateFramebufferTextureBase(context, target, attachment, texture, level))
|
||||
|
||||
@@ -43,9 +43,6 @@
|
||||
5579 VULKAN WIN : KHR-GLES31.core.geometry_shader.rendering.rendering.triangles_input_line_strip_output_triangle_*_drawcall = FAIL
|
||||
5579 VULKAN WIN : KHR-GLES31.core.geometry_shader.rendering.rendering.triangles_input_triangle_strip_output_triangle_*_drawcall = FAIL
|
||||
5579 VULKAN WIN : KHR-GLES31.core.geometry_shader.rendering.rendering.triangles_with_adjacency_input_*_strip_output_triangle_strip_adjacency_drawcall = FAIL
|
||||
// Layered rendering (only fail when run in sequence, reproduced with --bot-mode)
|
||||
5579 VULKAN WIN : KHR-GLES31.core.geometry_shader.layered_fbo.fb_texture_invalid_level_number = FAIL
|
||||
5579 VULKAN WIN : KHR-GLES31.core.geometry_shader.layered_fbo.fb_texture_argument_refers_to_buffer_texture = FAIL
|
||||
// Crashes on ASSERT due to mismatch between shader resources and pipeline layout
|
||||
5579 VULKAN WIN : KHR-GLES31.core.geometry_shader.api.max_image_uniforms = SKIP
|
||||
// Failures on windows nvidia
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
5579 VULKAN WIN : KHR-GLES32.core.geometry_shader.rendering.rendering.triangles_input_line_strip_output_triangle_*_drawcall = FAIL
|
||||
5579 VULKAN WIN : KHR-GLES32.core.geometry_shader.rendering.rendering.triangles_input_triangle_strip_output_triangle_*_drawcall = FAIL
|
||||
5579 VULKAN WIN : KHR-GLES32.core.geometry_shader.rendering.rendering.triangles_with_adjacency_input_*_strip_output_triangle_strip_adjacency_drawcall = FAIL
|
||||
// Layered rendering (only fail when run in sequence, reproduced with --bot-mode)
|
||||
5579 VULKAN WIN : KHR-GLES32.core.geometry_shader.layered_fbo.fb_texture_invalid_level_number = FAIL
|
||||
5579 VULKAN WIN : KHR-GLES32.core.geometry_shader.layered_fbo.fb_texture_argument_refers_to_buffer_texture = FAIL
|
||||
// Crashes on ASSERT due to mismatch between shader resources and pipeline layout
|
||||
5579 VULKAN WIN : KHR-GLES32.core.geometry_shader.api.max_image_uniforms = SKIP
|
||||
// Failures on windows nvidia
|
||||
|
||||
Reference in new issue
Block a user