diff options
author | Alex Smith <[email protected]> | 2017-06-05 15:49:05 +0100 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-06-06 08:20:09 -0700 |
commit | 922b038864c6bcc7a2df307a6d37c5563e1eacb3 (patch) | |
tree | 8201aab855fe33281c27a5cbf6dc890f07423fc5 /src/intel/vulkan | |
parent | 59c1797d560bfd3172427128ef8455d416b1cdb0 (diff) |
anv: Set better descriptor set limits
Based on discussions with Jason, Ivy Bridge and Bay Trail only actually
support 16 samplers, while newer hardware can support more than the
current limit of 64. Therefore set the lower limit where needed, and
bump up to 128 for everything else. There is also a limit on the total
number of other resources of around 250.
This allows Dawn of War III to render correctly on ANV.
Signed-off-by: Alex Smith <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index f5d97921d3d..72a96b7eac7 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -765,6 +765,9 @@ void anv_GetPhysicalDeviceProperties( const uint32_t max_raw_buffer_sz = devinfo->gen >= 7 ? (1ul << 30) : (1ul << 27); + const uint32_t max_samplers = (devinfo->gen >= 8 || devinfo->is_haswell) ? + 128 : 16; + VkSampleCountFlags sample_counts = isl_device_get_sample_counts(&pdevice->isl_dev); @@ -783,13 +786,13 @@ void anv_GetPhysicalDeviceProperties( .bufferImageGranularity = 64, /* A cache line */ .sparseAddressSpaceSize = 0, .maxBoundDescriptorSets = MAX_SETS, - .maxPerStageDescriptorSamplers = 64, + .maxPerStageDescriptorSamplers = max_samplers, .maxPerStageDescriptorUniformBuffers = 64, .maxPerStageDescriptorStorageBuffers = 64, - .maxPerStageDescriptorSampledImages = 64, + .maxPerStageDescriptorSampledImages = max_samplers, .maxPerStageDescriptorStorageImages = 64, .maxPerStageDescriptorInputAttachments = 64, - .maxPerStageResources = 128, + .maxPerStageResources = 250, .maxDescriptorSetSamplers = 256, .maxDescriptorSetUniformBuffers = 256, .maxDescriptorSetUniformBuffersDynamic = MAX_DYNAMIC_BUFFERS / 2, |