diff --git a/src/freedreno/common/freedreno_dev_info.h b/src/freedreno/common/freedreno_dev_info.h index 5a8cd3a9f61..820a50382da 100644 --- a/src/freedreno/common/freedreno_dev_info.h +++ b/src/freedreno/common/freedreno_dev_info.h @@ -173,6 +173,8 @@ struct fd_dev_info { /* Corresponds to HLSQ_CONTROL_1_REG::PRIMALLOCTHRESHOLD */ uint32_t prim_alloc_threshold; + uint32_t vs_max_inputs_count; + struct { uint32_t PC_POWER_CNTL; uint32_t TPL1_DBG_ECO_CNTL; diff --git a/src/freedreno/common/freedreno_devices.py b/src/freedreno/common/freedreno_devices.py index 14db3f800f8..a6db1797970 100644 --- a/src/freedreno/common/freedreno_devices.py +++ b/src/freedreno/common/freedreno_devices.py @@ -158,6 +158,8 @@ class A6xxGPUInfo(GPUInfo): self.a6xx.prim_alloc_threshold = 0x7 + self.a6xx.vs_max_inputs_count = 32 + for name, val in template.items(): if name == "magic": # handled above continue diff --git a/src/freedreno/vulkan/tu_device.cc b/src/freedreno/vulkan/tu_device.cc index 09ce58e3aaf..d7522686d86 100644 --- a/src/freedreno/vulkan/tu_device.cc +++ b/src/freedreno/vulkan/tu_device.cc @@ -1070,8 +1070,8 @@ tu_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, .maxDescriptorSetSampledImages = max_descriptor_set_size, .maxDescriptorSetStorageImages = max_descriptor_set_size, .maxDescriptorSetInputAttachments = MAX_RTS, - .maxVertexInputAttributes = 32, - .maxVertexInputBindings = 32, + .maxVertexInputAttributes = pdevice->info->a6xx.vs_max_inputs_count, + .maxVertexInputBindings = pdevice->info->a6xx.vs_max_inputs_count, .maxVertexInputAttributeOffset = 4095, .maxVertexInputBindingStride = 2048, .maxVertexOutputComponents = 128, diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 15033306a69..e2cec907310 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -671,7 +671,8 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen, case PIPE_SHADER_CAP_MAX_INPUTS: if (shader == PIPE_SHADER_GEOMETRY && is_a6xx(screen)) return 16; - return is_a6xx(screen) ? 32 : 16; + return is_a6xx(screen) ? + (screen->info->a6xx.vs_max_inputs_count) : 16; case PIPE_SHADER_CAP_MAX_OUTPUTS: return is_a6xx(screen) ? 32 : 16; case PIPE_SHADER_CAP_MAX_TEMPS: