Bug 107658 - [Regression] [bisected] [OpenGLES CTS] KHR-GLES3.packed_pixels.*rectangle.r*8_snorm
Summary: [Regression] [bisected] [OpenGLES CTS] KHR-GLES3.packed_pixels.*rectangle.r*8...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Tapani Pälli
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-22 12:14 UTC by Andrés Gómez García
Modified: 2018-09-17 04:56 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
fix WIP (1.30 KB, patch)
2018-08-24 05:28 UTC, Tapani Pälli
Details | Splinter Review

Description Andrés Gómez García 2018-08-22 12:14:38 UTC
After:

--

commit fa9e6c235dad578fe2b62cfcf5fc08c475996a94
Author: Tapani Pälli <tapani.palli@intel.com>
Date:   Thu Jun 14 13:06:33 2018 +0300

    i965: enable EXT_render_snorm

    Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
    Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>

--

KHR-GLES3.packed_pixels.pbo_rectangle.r8_snorm
KHR-GLES3.packed_pixels.pbo_rectangle.rg8_snorm
KHR-GLES3.packed_pixels.pbo_rectangle.rgba8_snorm
KHR-GLES3.packed_pixels.rectangle.r8_snorm
KHR-GLES3.packed_pixels.rectangle.rg8_snorm
KHR-GLES3.packed_pixels.rectangle.rgba8_snorm
KHR-GLES3.packed_pixels.varied_rectangle.r8_snorm
KHR-GLES3.packed_pixels.varied_rectangle.rg8_snorm
KHR-GLES3.packed_pixels.varied_rectangle.rgba8_snorm

Are failing. For example, under Wayland (Weston):

--

$ ./glcts --deqp-case=KHR-GLES3.packed_pixels.rectangle.r8_snorm
Writing test log into TestResults.qpa
dEQP Core git-ab19777a7719ef08948ebe12beab2988a4f70108 (0xab19777a) starting..
  target implementation = 'Wayland'
ATTENTION: default value of option vblank_mode overridden by environment.

Test case 'KHR-GLES3.packed_pixels.rectangle.r8_snorm'..
  Fail (Fail)

DONE!

Test run totals:
  Passed:        0/1 (0.0%)
  Failed:        1/1 (100.0%)
  Not supported: 0/1 (0.0%)
  Warnings:      0/1 (0.0%)
Comment 1 Tapani Pälli 2018-08-23 06:07:07 UTC
This seems to be about allowed and disallowed format combinations for glReadPixels. For some reason 'rgb8_snorm' passes but r8, rg8 and rgba8 fail. Debugging ...
Comment 2 Tapani Pälli 2018-08-24 05:28:17 UTC
Created attachment 141268 [details] [review]
fix WIP

Attached a patch that makes dEQP happy .. but this makes Piglit test to fail, as that test assumes it is OK to read GL_R8_SNORM, GL_RG8_SNORM with GL_BYTE. I'll need to dig some more to understand what combos are accepted and with what limitations.
Comment 3 Tapani Pälli 2018-08-27 11:48:02 UTC
I've sent a partial fix to the list:
https://lists.freedesktop.org/archives/mesa-dev/2018-August/203688.html

It looks like rest of the issues are about something else.
Comment 4 Mark Janes 2018-08-27 15:58:02 UTC
Andres, what version of the gles cts are you running?  I can't find the packed_pixels tests in our CI results.
Comment 5 Mark Janes 2018-08-27 22:58:58 UTC
These tests are new in glescts 3.2.5.  Mesa i965 CI was running 3.2.4.  We are updating.
Comment 6 Andrés Gómez García 2018-08-28 13:51:25 UTC
(In reply to Mark Janes from comment #5)
> These tests are new in glescts 3.2.5.  Mesa i965 CI was running 3.2.4.  We
> are updating.

Sorry, I'm too late and you beat me to it.

Next time I will make sure to specify the VK-GL-CTS branch in the report.

Anyway, you are correct, the branch is "opengl-es-cts-3.2.5":
https://github.com/KhronosGroup/VK-GL-CTS/tree/opengl-es-cts-3.2.5
Comment 7 Andrés Gómez García 2018-08-28 22:15:45 UTC
(In reply to Tapani Pälli from comment #3)
> I've sent a partial fix to the list:
> https://lists.freedesktop.org/archives/mesa-dev/2018-August/203688.html
> 
> It looks like rest of the issues are about something else.

Tapani, I can confirm that your patch fixes not just the 3 tests you have listed but the 9 that were failing for me.

Notice that I'm testing the branch "opengl-es-cts-3.2.5" with the wayland target:
https://github.com/KhronosGroup/VK-GL-CTS/tree/opengl-es-cts-3.2.5
Comment 8 Tapani Pälli 2018-08-29 05:31:36 UTC
(In reply to Andrés Gómez García from comment #7)
> (In reply to Tapani Pälli from comment #3)
> > I've sent a partial fix to the list:
> > https://lists.freedesktop.org/archives/mesa-dev/2018-August/203688.html
> > 
> > It looks like rest of the issues are about something else.
> 
> Tapani, I can confirm that your patch fixes not just the 3 tests you have
> listed but the 9 that were failing for me.
> 
> Notice that I'm testing the branch "opengl-es-cts-3.2.5" with the wayland
> target:
> https://github.com/KhronosGroup/VK-GL-CTS/tree/opengl-es-cts-3.2.5

Hmm OK, I was running against master, will try that branch as well. With master and using 'x11_egl' the R and RG tests still fail for me. It would seem that dEQP thinks reading R and RG is not correct:

--- 8< ------------------
Invalid format used but glReadPixels succeeded for input = [GL_RED, GL_BYTE] output = [GL_RGBA, GL_BYTE]

Invalid format used but glReadPixels succeeded for input = [GL_RG, GL_BYTE] output = [GL_RGBA, GL_BYTE]
--- 8< ------------------

I'll push that patch to Mesa now and will continue investigating why some of these tests still fail for me.
Comment 9 Tapani Pälli 2018-09-03 05:30:48 UTC
Andrés can you confirm if some of the tests are still failing for you? For Intel CI and for me the r8_snorm and rg8_snorm tests are still failing, I believe this might be actually issue in the test itself. Teh test does not seem to allow R8 and RG8 reads as RGBA output but this should be just fine as the OpenGL ES spec allows reading to to bigger component output.
Comment 10 Tapani Pälli 2018-09-03 07:25:56 UTC
FYI I've sent a patch for vk-gl-cts to allow reading from GL_BYTE surfaces to output GL_RGBA, GL_BYTE. Let's see how that one goes.
Comment 11 Andrés Gómez García 2018-09-03 14:43:57 UTC
(In reply to Tapani Pälli from comment #9)
> Andrés can you confirm if some of the tests are still failing for you? For
> Intel CI and for me the r8_snorm and rg8_snorm tests are still failing, I
> believe this might be actually issue in the test itself. Teh test does not
> seem to allow R8 and RG8 reads as RGBA output but this should be just fine
> as the OpenGL ES spec allows reading to to bigger component output.

This is pretty awkward :/

Last week, I tested with mesa at 07a227f5438e63c5ebd1c49a272253a6784a69ae plus your patch in mesa-dev applied on top (and some other set of unrelated patches).

With that, all the tests were passing.


This week, with mesa at 2c1f249f2b61be50222411bc0d41c095004232ed (and a similar set of unrelated patches on top), I have similar results than you. These are still failing:
* KHR-GLES3.packed_pixels.pbo_rectangle.r8_snorm
* KHR-GLES3.packed_pixels.pbo_rectangle.rg8_snorm
* KHR-GLES3.packed_pixels.rectangle.r8_snorm
* KHR-GLES3.packed_pixels.rectangle.rg8_snorm
* KHR-GLES3.packed_pixels.varied_rectangle.r8_snorm
* KHR-GLES3.packed_pixels.varied_rectangle.rg8_snorm

--

I don't think it is worth to investigate what was going different on in my side. Let's follow up with the proposed CL for VK-GL-CTS.

As for me, if you are convinced the only problem remaining to be solved is in VK-GL-CTS, you could close this bug as FIXED. We can always reopen if that's not the case.
Comment 12 Tapani Pälli 2018-09-04 04:06:14 UTC
OK I'm happy to hear we have same results! I'll wait what happens with vk-gl-cts patch.
Comment 13 Tapani Pälli 2018-09-17 04:56:41 UTC
Following commit in vk-gl-cts should fixes rest of the issues:

--- 8< ---
commit d69355bbc4fb4b1571b4b50baefc46856e8b0911
Author: Tapani Pälli <tapani.palli@intel.com>
Date:   Mon Sep 3 10:10:04 2018 +0300

    Allow reading GL_BYTE surfaces to GL_RGBA output.
    
    EXT_render_snorm specification:
    
       "For 8bit signed normalized fixed-point rendering surfaces, the
        combination format RGBA and type BYTE is accepted. For a 16bit signed
        normalized fixed point buffer, the combination RGBA and SHORT is
        accepted.
    
    OpenGL ES 3.1 specification:
       "If G, B, or A values are not present in the internal format, they are
        taken to be zero, zero, and one respectively."
    
    Components: OpenGL ES
    
    VK-GL-CTS issue: 1338
    
    Affects: KHR-GLES3.packed_pixels*snorm
    
    Change-Id: I48df036fc3da80a06e1adef32bd59dac5b551cec
    Signed-off-by: Tapani Pälli <tapani.palli@intel.com>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.