[Mesa-dev] [PATCH] anv: fix maxResourceSize for pre-gen9

Jason Ekstrand jason at jlekstrand.net
Mon Feb 26 16:02:26 UTC 2018


On Mon, Feb 26, 2018 at 12:58 AM, Samuel Iglesias Gonsálvez <
siglesias at igalia.com> wrote:

> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
> ---
>  src/intel/vulkan/anv_formats.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_
> formats.c
> index 9c52ad5acbd..324797b7f10 100644
> --- a/src/intel/vulkan/anv_formats.c
> +++ b/src/intel/vulkan/anv_formats.c
> @@ -842,6 +842,10 @@ anv_get_image_format_properties(
>         */
>     }
>
> +   /* Pre-gen9 has a 2 GB limitation of the size in bytes */
> +   uint64_t maxResourceSize =
> +      devinfo->gen < 9 ? (uint64_t)( 1 << 31 ) : UINT32_MAX;
>

I think gen9's is actually much larger than UINT32_MAX, isn't it?


> +
>     *pImageFormatProperties = (VkImageFormatProperties) {
>        .maxExtent = maxExtent,
>        .maxMipLevels = maxMipLevels,
> @@ -851,7 +855,7 @@ anv_get_image_format_properties(
>        /* FINISHME: Accurately calculate
>         * VkImageFormatProperties::maxResourceSize.
>         */
> -      .maxResourceSize = UINT32_MAX,
> +      .maxResourceSize = maxResourceSize,
>     };
>
>     if (pYcbcrImageFormatProperties) {
> --
> 2.14.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180226/eb17d24c/attachment.html>


More information about the mesa-dev mailing list