<p dir="ltr">The genxml packing structs will assert this for you. I'm guessing it did and you found it rather obtuse. :-)</p>
<p dir="ltr">Rb</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Sep 21, 2016 9:16 PM, "Anuj Phogat" <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
---<br>
 src/intel/isl/isl_surface_<wbr>state.c | 3 +++<br>
 1 file changed, 3 insertions(+)<br>
<br>
diff --git a/src/intel/isl/isl_surface_<wbr>state.c b/src/intel/isl/isl_surface_<wbr>state.c<br>
index 1a1a819..b20f767 100644<br>
--- a/src/intel/isl/isl_surface_<wbr>state.c<br>
+++ b/src/intel/isl/isl_surface_<wbr>state.c<br>
@@ -249,6 +249,9 @@ isl_genX(surf_fill_state_s)(<wbr>const struct isl_device *dev, void *state,<br>
    s.IntegerSurfaceFormat = isl_format_has_int_channel(s.<wbr>SurfaceFormat);<br>
 #endif<br>
<br>
+   assert(info->surf->logical_<wbr>level0_px.width > 0 &&<br>
+          info->surf->logical_level0_px.<wbr>height > 0);<br>
+<br>
    s.Width = info->surf->logical_level0_px.<wbr>width - 1;<br>
    s.Height = info->surf->logical_level0_px.<wbr>height - 1;<br>
<br>
--<br>
2.5.5<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>