diff options
author | Samuel Iglesias Gonsálvez <[email protected]> | 2018-02-26 08:26:24 +0100 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2018-02-28 06:54:48 +0100 |
commit | c757c9dc0346247cefc1157afd0167d364fa9544 (patch) | |
tree | 14b61bc2373e33bdb8bb8c965dec21b852aa753b /src/intel | |
parent | a5853a33332d51382cae42397f353817e47cccc9 (diff) |
anv: set maxResourceSize to the respective value for each generation
v2:
- Add the proper values to gen9+ (Jason)
Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_formats.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 9c52ad5acbd..65aa516ff80 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -842,6 +842,19 @@ anv_get_image_format_properties( */ } + /* From the bspec section entitled "Surface Layout and Tiling", + * pre-gen9 has a 2 GB limitation of the size in bytes, + * gen9 and gen10 have a 256 GB limitation and gen11+ + * has a 16 TB limitation. + */ + uint64_t maxResourceSize = 0; + if (devinfo->gen < 9) + maxResourceSize = (uint64_t) 1 << 31; + else if (devinfo->gen < 11) + maxResourceSize = (uint64_t) 1 << 38; + else + maxResourceSize = (uint64_t) 1 << 44; + *pImageFormatProperties = (VkImageFormatProperties) { .maxExtent = maxExtent, .maxMipLevels = maxMipLevels, @@ -851,7 +864,7 @@ anv_get_image_format_properties( /* FINISHME: Accurately calculate * VkImageFormatProperties::maxResourceSize. */ - .maxResourceSize = UINT32_MAX, + .maxResourceSize = maxResourceSize, }; if (pYcbcrImageFormatProperties) { |