tu: Fix the advertised maxFragmentInputComponents
authorConnor Abbott <cwabbott0@gmail.com>
Mon, 20 Apr 2020 11:41:42 +0000 (13:41 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 21 Apr 2020 10:04:13 +0000 (10:04 +0000)
This appears to be limited by VPC_CNTL_0::NUMNONPOSVAR, which is an
8-bit bitfield with no possibility for expansion. Also, in practice
we'll be limited by the vertex shader output maximum, which includes
gl_Position, of 128, so that users won't be able to use more than 124
components anyways. Lower it to match the GL blob.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4641>

src/freedreno/vulkan/tu_device.c

index e1b495b444087149f027e83fdc040c8c0db0ee18..006f7d4e73b1bd780b112deaa7586cb03d328f85 100644 (file)
@@ -788,7 +788,7 @@ tu_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
       .maxGeometryOutputComponents = 128,
       .maxGeometryOutputVertices = 256,
       .maxGeometryTotalOutputComponents = 1024,
-      .maxFragmentInputComponents = 128,
+      .maxFragmentInputComponents = 124,
       .maxFragmentOutputAttachments = 8,
       .maxFragmentDualSrcAttachments = 1,
       .maxFragmentCombinedOutputResources = 8,