Increase limits for uniforms and vertex outputs
ANGLE reserves 2 uniforms and 2 varyings for GLES.
Increasing maxPerStageDescriptorUniformBuffers by 2 and
maxVertexOutputComponents by 8 (2 * 4 components) allows
the following tests to pass (17 failures fixed in total):
dEQP-GLES3.functional.implementation_limits.*
dEQP-GLES3.functional.state_query.*
Bug b/141632907
Change-Id: Ie39b735286d6682f5782fca30e0f7a079f4142ec
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/36668
Presubmit-Ready: Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Device/Config.hpp b/src/Device/Config.hpp
index 45a04e6..76d0077 100644
--- a/src/Device/Config.hpp
+++ b/src/Device/Config.hpp
@@ -57,7 +57,7 @@
MAX_TEXEL_OFFSET = 7,
MAX_TEXTURE_LOD = MIPMAP_LEVELS - 2, // Trilinear accesses lod+1
RENDERTARGETS = 8,
- MAX_INTERFACE_COMPONENTS = 16 * 4, // Must be multiple of 4 for 16-byte alignment.
+ MAX_INTERFACE_COMPONENTS = 32 * 4, // Must be multiple of 4 for 16-byte alignment.
};
}
diff --git a/src/Vulkan/VkPhysicalDevice.cpp b/src/Vulkan/VkPhysicalDevice.cpp
index 67bb70d..2ad8cf8 100644
--- a/src/Vulkan/VkPhysicalDevice.cpp
+++ b/src/Vulkan/VkPhysicalDevice.cpp
@@ -160,7 +160,7 @@
0, // sparseAddressSpaceSize (unsupported)
MAX_BOUND_DESCRIPTOR_SETS, // maxBoundDescriptorSets
16, // maxPerStageDescriptorSamplers
- 12, // maxPerStageDescriptorUniformBuffers
+ 14, // maxPerStageDescriptorUniformBuffers
4, // maxPerStageDescriptorStorageBuffers
16, // maxPerStageDescriptorSampledImages
4, // maxPerStageDescriptorStorageImages
@@ -178,7 +178,7 @@
vk::MAX_VERTEX_INPUT_BINDINGS, // maxVertexInputBindings
2047, // maxVertexInputAttributeOffset
2048, // maxVertexInputBindingStride
- 64, // maxVertexOutputComponents
+ sw::MAX_INTERFACE_COMPONENTS, // maxVertexOutputComponents
0, // maxTessellationGenerationLevel (unsupported)
0, // maxTessellationPatchSize (unsupported)
0, // maxTessellationControlPerVertexInputComponents (unsupported)
@@ -192,7 +192,7 @@
0, // maxGeometryOutputComponents (unsupported)
0, // maxGeometryOutputVertices (unsupported)
0, // maxGeometryTotalOutputComponents (unsupported)
- 64, // maxFragmentInputComponents
+ sw::MAX_INTERFACE_COMPONENTS, // maxFragmentInputComponents
4, // maxFragmentOutputAttachments
1, // maxFragmentDualSrcAttachments
4, // maxFragmentCombinedOutputResources