[Mesa-dev] [PATCH] anv: Set better descriptor set limits

Jason Ekstrand jason at jlekstrand.net
Mon Jun 5 14:52:33 UTC 2017


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Mon, Jun 5, 2017 at 7:49 AM, Alex Smith <asmith at feralinteractive.com>
wrote:

> 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 <asmith at feralinteractive.com>
> ---
>  src/intel/vulkan/anv_device.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index ab484ed..aacd07f 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,
> --
> 2.9.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170605/5fdd9f89/attachment.html>


More information about the mesa-dev mailing list