Vulkan: Fix storage buffer limits on geom/tess without Vulkan support
Bug: angleproject:6896
Change-Id: I7172b65b460122fcb2485921fadb360dba199283
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3388117
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index f84ea1e..f071d6a 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -190,8 +190,6 @@
// This leads to a validation error that is benign as the subsequent allocation will fail anyway
// (i.e. an OOM will be generated by Vulkan instead of ANGLE to the same effect).
"VUID-vkAllocateMemory-pAllocateInfo-01713",
- // http://anglebug.com/6896
- "VUID-RuntimeSpirv-NonWritable-06341",
};
struct SkippedSyncvalMessage
diff --git a/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp b/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
index a81fba4..b5f6540 100644
--- a/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
+++ b/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
@@ -1011,10 +1011,13 @@
mNativeCaps.maxGeometryOutputVertices = LimitToInt(limitsVk.maxGeometryOutputVertices);
mNativeCaps.maxGeometryTotalOutputComponents =
LimitToInt(limitsVk.maxGeometryTotalOutputComponents);
- mNativeCaps.maxShaderStorageBlocks[gl::ShaderType::Geometry] =
- mNativeCaps.maxCombinedShaderOutputResources;
- mNativeCaps.maxShaderAtomicCounterBuffers[gl::ShaderType::Geometry] =
- maxCombinedAtomicCounterBuffers;
+ if (mPhysicalDeviceFeatures.vertexPipelineStoresAndAtomics)
+ {
+ mNativeCaps.maxShaderStorageBlocks[gl::ShaderType::Geometry] =
+ mNativeCaps.maxCombinedShaderOutputResources;
+ mNativeCaps.maxShaderAtomicCounterBuffers[gl::ShaderType::Geometry] =
+ maxCombinedAtomicCounterBuffers;
+ }
mNativeCaps.maxGeometryShaderInvocations =
LimitToInt(limitsVk.maxGeometryShaderInvocations);
}
@@ -1050,15 +1053,18 @@
mNativeCaps.maxUniformBufferBindings = LimitToInt(
mNativeCaps.maxUniformBufferBindings + kReservedTessellationDefaultUniformBindingCount);
- mNativeCaps.maxShaderStorageBlocks[gl::ShaderType::TessControl] =
- mNativeCaps.maxCombinedShaderOutputResources;
- mNativeCaps.maxShaderAtomicCounterBuffers[gl::ShaderType::TessControl] =
- maxCombinedAtomicCounterBuffers;
+ if (mPhysicalDeviceFeatures.vertexPipelineStoresAndAtomics)
+ {
+ mNativeCaps.maxShaderStorageBlocks[gl::ShaderType::TessControl] =
+ mNativeCaps.maxCombinedShaderOutputResources;
+ mNativeCaps.maxShaderAtomicCounterBuffers[gl::ShaderType::TessControl] =
+ maxCombinedAtomicCounterBuffers;
- mNativeCaps.maxShaderStorageBlocks[gl::ShaderType::TessEvaluation] =
- mNativeCaps.maxCombinedShaderOutputResources;
- mNativeCaps.maxShaderAtomicCounterBuffers[gl::ShaderType::TessEvaluation] =
- maxCombinedAtomicCounterBuffers;
+ mNativeCaps.maxShaderStorageBlocks[gl::ShaderType::TessEvaluation] =
+ mNativeCaps.maxCombinedShaderOutputResources;
+ mNativeCaps.maxShaderAtomicCounterBuffers[gl::ShaderType::TessEvaluation] =
+ maxCombinedAtomicCounterBuffers;
+ }
}
// GL_APPLE_clip_distance/GL_EXT_clip_cull_distance