<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 23, 2016 at 9:28 AM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra">This smells like fish... I'm going to have a look.<br></div></blockquote><div><br></div><div>Ok, I looked...<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 23, 2016 at 8:29 AM, Antia Puentes <span dir="ltr"><<a href="mailto:apuentes@igalia.com" target="_blank">apuentes@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>From: Dave Airlie <<a href="mailto:airlied@redhat.com" target="_blank">airlied@redhat.com</a>><br>
<br>
This fixes one subtest of:<br>
GL44-CTS.shader_image_size.adv<wbr>anced-nonMS-fs-int<br>
<br>
I've no idea why this wouldn't be scaled up here,<br>
and I've no idea what else will break, but I might<br>
as well open for discussion.<br>
<br>
</span>v2: Only shift height if the texture is not an 1D_ARRAY,<br>
it fixes assertion in GL44-CTS.texture_view.gettexpa<wbr>rameter<br>
due to the original patch (Antia).<br>
<br>
Signed-off-by: Dave Airlie <<a href="mailto:airlied@redhat.com" target="_blank">airlied@redhat.com</a>><br>
Signed-off-by: Antia Puentes <<a href="mailto:apuentes@igalia.com" target="_blank">apuentes@igalia.com</a>><br>
---<br>
<br>
I have not taken a deep look to the test so take this with a grain of salt.<br>
As I said in a previous email, this patch raises an assertion in<br>
GL44-CTS.texture_view.gettexpa<wbr>rameter:<br>
<br>
"glcts: intel_mipmap_tree.c:368: intel_miptree_create_layout: Assertion<br>
`height0 = 1' failed."<br>
<br>
Looking at the code surrounding the assertion, we have:<br>
<br>
if (target == GL_TEXTURE_1D_ARRAY)<br>
assert(height0 == 1);<br>
<br>
which suggests that we should avoid shifting the height at least for<br>
TEXTURE_1D_ARRAYs. Sending a second version of the patch.<br>
<br>
src/mesa/drivers/dri/i965/int<wbr>el_tex_image.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/in<wbr>tel_tex_image.c b/src/mesa/drivers/dri/i965/in<wbr>tel_tex_image.c<br>
index 958f8bd..120e7e0 100644<br>
--- a/src/mesa/drivers/dri/i965/in<wbr>tel_tex_image.c<br>
+++ b/src/mesa/drivers/dri/i965/in<wbr>tel_tex_image.c<br>
@@ -49,7 +49,7 @@ intel_miptree_create_for_texim<wbr>age(struct brw_context *brw,<br>
<span> /* Figure out image dimensions at start level. */<br>
for (i = intelImage->base.Base.Level; i > 0; i--) {<br>
width <<= 1;<br>
- if (height != 1)<br>
</span>+ if (intelObj->base.Target != GL_TEXTURE_1D_ARRAY)<br>
<span> height <<= 1;<br>
if (intelObj->base.Target == GL_TEXTURE_3D)<br>
depth <<= 1;<br></span></blockquote></div></div></blockquote><div><br></div><div>I think the whole pile of code is bogus and needs to be rewritten. First off, why are we using a for loop? Seriously? Second, I think what we want is more like<br><br></div><div>switch (intelObj->base.Target) {<br></div><div>case GL_TEXTURE_3D:<br></div><div> depth <<= intelImage->base.Base.Level;<br></div><div> /* Fall through */<br><br></div><div>case GL_TEXTURE_2D:<br></div><div>case GL_TEXTURE_2D_ARRAY:<br></div><div>case GL_TEXTURE_RECTANGLE:<br></div><div> height <<= intelImage->base.Base.Level<br></div><div> /* Fall through */<br><br></div><div>default:<br></div><div> width <<= intelImage->base.Base.Level;<br></div><div>}<br></div><br></div><div class="gmail_quote">I think that would be far more clear and correct. I don't have a build of the CTS handy so I didn't send it as a 3rd counter-patch.<br><br></div><div class="gmail_quote">--Jason<br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
--<br>
</span>2.7.4<br>
<div><div><br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">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>
</div></div></blockquote></div><br></div><div class="HOEnZb"><div class="h5">
</div></div></blockquote></div><br></div></div>