Commit 61f60161 by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Set missing geometry/tessellation limits

Bug: angleproject:5557 Bug: angleproject:5579 Change-Id: Idb8ebc0c3beee8f273d0df3b4e0d84722a8590b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2653912 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
parent c6a8bc4a
...@@ -754,13 +754,15 @@ void RendererVk::ensureCapsInitialized() const ...@@ -754,13 +754,15 @@ void RendererVk::ensureCapsInitialized() const
// GL Images correspond to Vulkan Storage Images. // GL Images correspond to Vulkan Storage Images.
const int32_t maxPerStageImages = LimitToInt(limitsVk.maxPerStageDescriptorStorageImages); const int32_t maxPerStageImages = LimitToInt(limitsVk.maxPerStageDescriptorStorageImages);
const int32_t maxCombinedImages = LimitToInt(limitsVk.maxDescriptorSetStorageImages); const int32_t maxCombinedImages = LimitToInt(limitsVk.maxDescriptorSetStorageImages);
const int32_t maxVertexPipelineImages =
mNativeCaps.maxShaderImageUniforms[gl::ShaderType::Vertex] =
mPhysicalDeviceFeatures.vertexPipelineStoresAndAtomics ? maxPerStageImages : 0; mPhysicalDeviceFeatures.vertexPipelineStoresAndAtomics ? maxPerStageImages : 0;
mNativeCaps.maxShaderImageUniforms[gl::ShaderType::Vertex] = maxVertexPipelineImages;
mNativeCaps.maxShaderImageUniforms[gl::ShaderType::TessControl] = maxVertexPipelineImages;
mNativeCaps.maxShaderImageUniforms[gl::ShaderType::TessEvaluation] = maxVertexPipelineImages;
mNativeCaps.maxShaderImageUniforms[gl::ShaderType::Geometry] = maxVertexPipelineImages;
mNativeCaps.maxShaderImageUniforms[gl::ShaderType::Fragment] = mNativeCaps.maxShaderImageUniforms[gl::ShaderType::Fragment] =
mPhysicalDeviceFeatures.fragmentStoresAndAtomics ? maxPerStageImages : 0; mPhysicalDeviceFeatures.fragmentStoresAndAtomics ? maxPerStageImages : 0;
mNativeCaps.maxShaderImageUniforms[gl::ShaderType::Geometry] =
mPhysicalDeviceFeatures.vertexPipelineStoresAndAtomics ? maxPerStageImages : 0;
mNativeCaps.maxShaderImageUniforms[gl::ShaderType::Compute] = maxPerStageImages; mNativeCaps.maxShaderImageUniforms[gl::ShaderType::Compute] = maxPerStageImages;
mNativeCaps.maxCombinedImageUniforms = maxCombinedImages; mNativeCaps.maxCombinedImageUniforms = maxCombinedImages;
...@@ -928,7 +930,8 @@ void RendererVk::ensureCapsInitialized() const ...@@ -928,7 +930,8 @@ void RendererVk::ensureCapsInitialized() const
// TODO: tessellation shader support is incomplete. http://anglebug.com/3572 // TODO: tessellation shader support is incomplete. http://anglebug.com/3572
mNativeExtensions.tessellationShaderEXT = mNativeExtensions.tessellationShaderEXT =
getFeatures().exposeNonConformantExtensionsAndVersions.enabled; mFeatures.supportsTransformFeedbackExtension.enabled &&
mFeatures.exposeNonConformantExtensionsAndVersions.enabled;
mNativeCaps.maxPatchVertices = LimitToInt(limitsVk.maxTessellationPatchSize); mNativeCaps.maxPatchVertices = LimitToInt(limitsVk.maxTessellationPatchSize);
mNativeCaps.maxTessPatchComponents = mNativeCaps.maxTessPatchComponents =
LimitToInt(limitsVk.maxTessellationControlPerPatchOutputComponents); LimitToInt(limitsVk.maxTessellationControlPerPatchOutputComponents);
...@@ -950,6 +953,16 @@ void RendererVk::ensureCapsInitialized() const ...@@ -950,6 +953,16 @@ void RendererVk::ensureCapsInitialized() const
mNativeCaps.maxCombinedUniformBlocks + kReservedTessellationDefaultUniformBindingCount); mNativeCaps.maxCombinedUniformBlocks + kReservedTessellationDefaultUniformBindingCount);
mNativeCaps.maxUniformBufferBindings = LimitToInt( mNativeCaps.maxUniformBufferBindings = LimitToInt(
mNativeCaps.maxUniformBufferBindings + kReservedTessellationDefaultUniformBindingCount); mNativeCaps.maxUniformBufferBindings + kReservedTessellationDefaultUniformBindingCount);
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;
} }
// GL_APPLE_clip_distance/GL_EXT_clip_cull_distance // GL_APPLE_clip_distance/GL_EXT_clip_cull_distance
......
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