[Mesa-dev] [PATCH 3/7] anv: limit vertex buffers to 31

Jason Ekstrand jason at jlekstrand.net
Wed Feb 1 03:02:17 UTC 2017


Did we actually end up needing this?  After you got your gl_DrawId issues
sorted, were you ever able to get element 33 to work?  The Sky Lake docs
say it should...

On Tue, Jan 31, 2017 at 7:00 AM, Lionel Landwerlin <
lionel.g.landwerlin at intel.com> wrote:

> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
>  src/intel/vulkan/anv_device.c    | 4 ++--
>  src/intel/vulkan/anv_private.h   | 2 +-
>  src/intel/vulkan/genX_pipeline.c | 2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index 27f06ac02c..3403dc126a 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -562,8 +562,8 @@ void anv_GetPhysicalDeviceProperties(
>        .maxDescriptorSetSampledImages            = 256,
>        .maxDescriptorSetStorageImages            = 256,
>        .maxDescriptorSetInputAttachments         = 256,
> -      .maxVertexInputAttributes                 = 32,
> -      .maxVertexInputBindings                   = 32,
> +      .maxVertexInputAttributes                 = MAX_VBS,
> +      .maxVertexInputBindings                   = MAX_VBS,
>

Thank you for switching to the #define.  Even if we don't end up dropping
to 31 vertex buffers, we should keep these bits of this patch.


>        .maxVertexInputAttributeOffset            = 2047,
>        .maxVertexInputBindingStride              = 2048,
>        .maxVertexOutputComponents                = 128,
> diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_
> private.h
> index 0cc6550a40..926b8d799f 100644
> --- a/src/intel/vulkan/anv_private.h
> +++ b/src/intel/vulkan/anv_private.h
> @@ -87,7 +87,7 @@ extern "C" {
>   */
>  #define ANV_HZ_FC_VAL 1.0f
>
> -#define MAX_VBS         32
> +#define MAX_VBS         31
>  #define MAX_SETS         8
>  #define MAX_RTS          8
>  #define MAX_VIEWPORTS   16
> diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_
> pipeline.c
> index 9d28466f79..d3a9d4302e 100644
> --- a/src/intel/vulkan/genX_pipeline.c
> +++ b/src/intel/vulkan/genX_pipeline.c
> @@ -133,7 +133,7 @@ emit_vertex_input(struct anv_pipeline *pipeline,
>
>  VK_IMAGE_ASPECT_COLOR_BIT,
>                                                    VK_IMAGE_TILING_LINEAR);
>
> -      assert(desc->binding < 32);
> +      assert(desc->binding < MAX_VBS);
>
>        if ((elements & (1 << desc->location)) == 0)
>           continue; /* Binding unused */
> --
> 2.11.0
>
> _______________________________________________
> 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/20170131/5a2d57ff/attachment.html>


More information about the mesa-dev mailing list