<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 23, 2015 at 1:28 PM, Ilia Mirkin <span dir="ltr"><<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On Mon, Nov 23, 2015 at 4:16 PM, Ian Romanick <<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>> wrote:<br>
> On 11/23/2015 12:43 PM, Ilia Mirkin wrote:<br>
>> On Mon, Nov 23, 2015 at 3:34 PM, Ian Romanick <<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>> wrote:<br>
>>> On 11/21/2015 04:08 PM, Ilia Mirkin wrote:<br>
>>>> In the check_error case, decompressed_tex is completely uninitialized<br>
>>>> and might point to any texture. This can wreak various havoc.<br>
>>><br></span></blockquote><div><br></div><div>Thanks for noticing this issue.<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
>>> I might suggest a different approach. In the check_error case, ensure<br>
>>> that decompress_texture is zero. Remove the check_error parameter, and<br>
>>> s/!check_error/decompress_texture ==<br>
>>> 0/g;s/check_error/decompress_texture != 0/g.<br>
>><br>
>> Is it legal to delete texture 0? Or can texture 0 be a real thing?<br>
>> Otherwise I can just initialize it to that below.<br>
><br>
> It's similar to free(NULL) in that respect. From the glDeleteTextures<br>
> man page:<br>
><br>
> glDeleteTextures silently ignores 0's and names that do not correspond<br>
> to existing textures.<br>
<br>
</span>Ah that's perfect. I should have checked the man page when I was<br>
futzing with the test.<br>
<span><br>
><br>
>> Separately, how would you feel about making the error color decoding<br>
>> check failing return a warn instead of a fail? I can't get Adreno A420<br>
>> to spit it out... haven't tried on blob, perhaps I'm missing some bit<br>
>> of programming. I just get black with the HDR data instead of the<br>
>> error color.<br>
><br>
> Hmm... I don't know how this particular test is structured. When we've<br>
> had cases like this in the past, we've split the test into subcases.<br>
> One (or several) subcase checks the things that the driver in question<br>
> can pass, and one, single subcase checks the thing that the driver<br>
> fails.<br>
><br>
> If this test is conducive that kind of a split (perhaps by running it<br>
> twice with different data), that would be my preference.<br>
<br>
</span>Right now there are 3 subtests (ldr, hdr, srgb), each of which tests<br>
loading 3 sets of data (ldr, hdr, and ldr srgb). If there's no<br>
astc_hdr support, the hdr subtest isn't run, and when loading hdr<br>
data, it checks for the error color. Instead of 3 subtests, I could<br>
split this up into 9 subtests for the full cross -- does that sound<br>
reasonable, and then we'd pass the ldr-data ones and fail the hdr data<br>
ones.<br>
<br>
TBH I'm unsure what the diff between the ldr and hdr subtests is...<br>
they seem identical except that HDR one skips if you don't hdr. But<br>
otherwise it's identical to the LDR one from what I can tell. Also<br>
from the looks of it the srgb test doesn't need the full cross either,<br>
it only runs against the ldrs data. Urgh, I guess this test needs a<br>
bit of a redo :( Perhaps we can sucker Nanley into fixing it up?<br>
<span></span></blockquote><div><br>I actually have a patch sitting on the list which redoes some of the logic:<br><a href="http://lists.freedesktop.org/archives/piglit/2015-October/017743.html" target="_blank">http://lists.freedesktop.org/archives/piglit/2015-October/017743.html</a><br><br>The test previously wasn't splitting up into subtests correctly.<br><br>- Nanley<br> </div></div></div></div>