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

Samuel Iglesias Gonsálvez siglesias at igalia.com
Tue Feb 27 08:22:21 UTC 2018



On 26/02/18 17:02, Jason Ekstrand wrote:
> On Mon, Feb 26, 2018 at 12:58 AM, Samuel Iglesias Gonsálvez
> <siglesias at igalia.com <mailto:siglesias at igalia.com>> wrote:
>
>     Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com
>     <mailto: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?
>  

You are right. I am going to send a v2, including gen11+ too.

Sam

>     +
>         *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/20180227/0e9f303d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180227/0e9f303d/attachment.sig>


More information about the mesa-dev mailing list