<div dir="ltr">Sorry. It's taken a bit of time but the WG has a decision and that is that we are supposed to throw VK_ERROR_OUT_OF_DEVICE_MEMORY in this case. I believe you had an alternate version of the patch that did something like that. If so, we should revive it.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 11, 2018 at 5:04 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"><span class="">This patch is still unreviewed.<br>
<br>
</span>Sam<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On 14/11/17 09:45, Samuel Iglesias Gonsálvez wrote:<br>
> The HW has some limits but, according to the spec, we can create<br>
> the image as it has not yet any memory backing it. This patch<br>
> logs a debug error and set the size to the UINT64_MAX in order to<br>
> avoid allocating actual memory later.<br>
><br>
> Fixes the crashes on BDW for the following tests:<br>
><br>
> dEQP-VK.pipeline.render_to_<wbr>image.core.2d_array.huge.*<br>
> dEQP-VK.pipeline.render_to_<wbr>image.core.cube_array.huge.*<br>
><br>
> Signed-off-by: Samuel Iglesias Gonsálvez <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>><br>
> ---<br>
> src/intel/isl/isl.c | 13 +++++++++----<br>
> 1 file changed, 9 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c<br>
> index 59f512fc050..cd7f2fcd4cb 100644<br>
> --- a/src/intel/isl/isl.c<br>
> +++ b/src/intel/isl/isl.c<br>
> @@ -26,6 +26,7 @@<br>
> #include <stdio.h><br>
><br>
> #include "genxml/genX_bits.h"<br>
> +#include "common/intel_log.h"<br>
><br>
> #include "isl.h"<br>
> #include "isl_gen4.h"<br>
> @@ -1481,8 +1482,10 @@ isl_surf_init_s(const struct isl_device *dev,<br>
> *<br>
> * This comment is applicable to all Pre-gen9 platforms.<br>
> */<br>
> - if (size > (uint64_t) 1 << 31)<br>
> - return false;<br>
> + if (size > (uint64_t) 1 << 31) {<br>
> + intel_logd("%s: Surface size is bigger than the supported by the HW: %ld > (1 << 31)", __func__, size);<br>
> + size = UINT64_MAX;<br>
> + }<br>
> } else {<br>
> /* From the Skylake PRM Vol 5, Maximum Surface Size in Bytes:<br>
> * "In addition to restrictions on maximum height, width, and depth,<br>
> @@ -1490,8 +1493,10 @@ isl_surf_init_s(const struct isl_device *dev,<br>
> * All pixels within the surface must be contained within 2^38 bytes<br>
> * of the base address."<br>
> */<br>
> - if (size > (uint64_t) 1 << 38)<br>
> - return false;<br>
> + if (size > (uint64_t) 1 << 38) {<br>
> + intel_logd("%s: Surface size is bigger than the supported by the HW: %ld > (1 << 38)", __func__, size);<br>
> + size = UINT64_MAX;<br>
> + }<br>
> }<br>
><br>
> *surf = (struct isl_surf) {<br>
<br>
<br>
</div></div></blockquote></div><br></div>