<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Feb 27, 2018 at 2:43 AM, Samuel Iglesias Gonsálvez <span dir="ltr"><<a href="mailto:siglesias@igalia.com" target="_blank">siglesias@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">v2:<br>
- Add the proper values to gen9+ (Jason)<br>
<br>
Signed-off-by: Samuel Iglesias Gonsálvez <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>><br>
---<br>
src/intel/vulkan/anv_formats.c | 14 +++++++++++++-<br>
1 file changed, 13 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_<wbr>formats.c b/src/intel/vulkan/anv_<wbr>formats.c<br>
index 9c52ad5acbd..cbc3d357922 100644<br>
--- a/src/intel/vulkan/anv_<wbr>formats.c<br>
+++ b/src/intel/vulkan/anv_<wbr>formats.c<br>
@@ -842,6 +842,18 @@ anv_get_image_format_<wbr>properties(<br>
*/<br>
}<br>
<br>
+ /* Pre-gen9 has a 2 GB limitation of the size in bytes,<br>
+ * gen9 and gen10 have a 256 GB limitation and gen11+<br>
+ * has a 16 TB limitation.<br></blockquote><div><br></div><div>Might be worth saying that this comes from the bspec section entitled "Surface Layout and Tiling".<br><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ */<br>
+ uint64_t maxResourceSize = 0;<br>
+ if (devinfo->gen < 9)<br>
+ maxResourceSize = (uint64_t) 1 << 31;<br>
+ else if (devinfo->gen < 11)<br>
+ maxResourceSize = (uint64_t) 1 << 38;<br>
+ else<br>
+ maxResourceSize = (uint64_t) 1 << 44;<br>
+<br>
*pImageFormatProperties = (VkImageFormatProperties) {<br>
.maxExtent = maxExtent,<br>
.maxMipLevels = maxMipLevels,<br>
@@ -851,7 +863,7 @@ anv_get_image_format_<wbr>properties(<br>
/* FINISHME: Accurately calculate<br>
* VkImageFormatProperties::<wbr>maxResourceSize.<br>
*/<br>
- .maxResourceSize = UINT32_MAX,<br>
+ .maxResourceSize = maxResourceSize,<br>
};<br>
<br>
if (pYcbcrImageFormatProperties) {<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.14.1<br>
<br>
</font></span></blockquote></div><br></div></div>