Commit e5a5567d by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Expose OES_shader_image_atomic without VS/FS atomics

If vertexPipelineStoresAndAtomics is not available, the vertex stage limit for images is set to 0, so there won't be any images in that stage. Similarly for fragmentStoresAndAtomics. The extension can still be exposed for use with compute shaders. Bug: angleproject:3578 Change-Id: I86133415bc14c219067827758e727ce7ab079973 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2536252Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarMohan Maiya <m.maiya@samsung.com> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 84fce18c
......@@ -373,10 +373,12 @@ void RendererVk::ensureCapsInitialized() const
// OES_shader_multisample_interpolation requires OES_sample_variables, disable for now
mNativeExtensions.multisampleInterpolationOES = false;
// Atomic image operations in the vertex and fragment shaders require the
// vertexPipelineStoresAndAtomics and fragmentStoresAndAtomics Vulkan features respectively.
// If either of these features is not present, the number of image uniforms for that stage is
// advertized as zero, so image atomic operations support can be agnostic of shader stages.
mNativeExtensions.shaderImageAtomicOES =
((mPhysicalDeviceFeatures.vertexPipelineStoresAndAtomics == VK_TRUE) &&
(mPhysicalDeviceFeatures.fragmentStoresAndAtomics == VK_TRUE) &&
getFeatures().supportsShaderImageFloat32Atomics.enabled);
getFeatures().supportsShaderImageFloat32Atomics.enabled;
// https://vulkan.lunarg.com/doc/view/1.0.30.0/linux/vkspec.chunked/ch31s02.html
mNativeCaps.maxElementIndex = std::numeric_limits<GLuint>::max() - 1;
......
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