Commit 9e2953c2 by Mohan Maiya Committed by Commit Bot

Vulkan: Enable OES_texture_storage_multisample_2d_array

The implementation for OES_texture_storage_multisample_2d_array already exists. This patch just enables the appropriate capability flag only if the underlying Vulkan ICD supports standardSampleLocations Bug: angleproject:3583 Tests: angle_end2end_tests --gtest_filter="*TextureMultisampleArrayWebGLTest*Vulkan" dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample_array.* dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample_array.* Change-Id: I2ea89041d9aa8c7d94c9ba732f12528c809807ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2416979Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
parent 6c394220
...@@ -454,6 +454,7 @@ MSG kTextureTargetRequiresES31 = "Texture target requires at least OpenGL ES 3.1 ...@@ -454,6 +454,7 @@ MSG kTextureTargetRequiresES31 = "Texture target requires at least OpenGL ES 3.1
MSG kTextureTypeConflict = "Two textures of different types use the same sampler location."; MSG kTextureTypeConflict = "Two textures of different types use the same sampler location.";
MSG kTextureTypeMismatch = "Passed in texture type must match the one originally used to define the texture."; MSG kTextureTypeMismatch = "Passed in texture type must match the one originally used to define the texture.";
MSG kTextureWidthOrHeightOutOfRange = "Width and height must be less than or equal to GL_MAX_TEXTURE_SIZE."; MSG kTextureWidthOrHeightOutOfRange = "Width and height must be less than or equal to GL_MAX_TEXTURE_SIZE.";
MSG kTextureDepthOutOfRange = "Depth must be less than or equal to MAX_ARRAY_TEXTURE_LAYERS";
MSG kTransfomFeedbackAlreadyActive = "Transform feedback is already active."; MSG kTransfomFeedbackAlreadyActive = "Transform feedback is already active.";
MSG kTransformFeedbackActiveDelete = "Attempt to delete an active transform feedback."; MSG kTransformFeedbackActiveDelete = "Attempt to delete an active transform feedback.";
MSG kTransformFeedbackActiveDuringLink = "Cannot link program while program is associated with an active transform feedback object."; MSG kTransformFeedbackActiveDuringLink = "Cannot link program while program is associated with an active transform feedback object.";
......
...@@ -863,8 +863,8 @@ angle::Result FramebufferVk::blit(const gl::Context *context, ...@@ -863,8 +863,8 @@ angle::Result FramebufferVk::blit(const gl::Context *context,
(sourceArea.x == destArea.x && sourceArea.y == destArea.y && (sourceArea.x == destArea.x && sourceArea.y == destArea.y &&
sourceArea.width == destArea.width && sourceArea.height == destArea.height)); sourceArea.width == destArea.width && sourceArea.height == destArea.height));
gl::Rectangle srcFramebufferDimensions = srcFramebufferVk->mState.getDimensions().toRect(); gl::Rectangle srcFramebufferDimensions = srcFramebufferVk->getNonRotatedCompleteRenderArea();
gl::Rectangle destFramebufferDimensions = mState.getDimensions().toRect(); gl::Rectangle destFramebufferDimensions = getNonRotatedCompleteRenderArea();
// If the destination is flipped in either direction, we will flip the source instead so that // If the destination is flipped in either direction, we will flip the source instead so that
// the destination area is always unflipped. // the destination area is always unflipped.
......
...@@ -87,6 +87,8 @@ void RendererVk::ensureCapsInitialized() const ...@@ -87,6 +87,8 @@ void RendererVk::ensureCapsInitialized() const
getFeatures().enableMultisampledRenderToTexture.enabled; getFeatures().enableMultisampledRenderToTexture.enabled;
mNativeExtensions.multisampledRenderToTexture2 = mNativeExtensions.multisampledRenderToTexture2 =
getFeatures().enableMultisampledRenderToTexture.enabled; getFeatures().enableMultisampledRenderToTexture.enabled;
mNativeExtensions.textureStorageMultisample2DArrayOES =
(limitsVk.standardSampleLocations == VK_TRUE);
mNativeExtensions.copyTexture = true; mNativeExtensions.copyTexture = true;
mNativeExtensions.copyTexture3d = true; mNativeExtensions.copyTexture3d = true;
mNativeExtensions.copyCompressedTexture = true; mNativeExtensions.copyCompressedTexture = true;
......
...@@ -2075,6 +2075,12 @@ bool ValidateTexStorage3DMultisampleOES(const Context *context, ...@@ -2075,6 +2075,12 @@ bool ValidateTexStorage3DMultisampleOES(const Context *context,
return false; return false;
} }
if (depth > context->getCaps().maxArrayTextureLayers)
{
context->validationError(GL_INVALID_VALUE, kTextureDepthOutOfRange);
return false;
}
return ValidateTexStorageMultisample(context, target, samples, sizedinternalformat, width, return ValidateTexStorageMultisample(context, target, samples, sizedinternalformat, width,
height); height);
} }
......
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