Bug 93426 - [SKL,BDW,BSW,BXT] CTS regression: es2-cts.gtf.gl2fixedtests.buffer_objects.buffer_object,s
Summary: [SKL,BDW,BSW,BXT] CTS regression: es2-cts.gtf.gl2fixedtests.buffer_objects.bu...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Marta Löfstedt
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-17 18:25 UTC by Mark Janes
Modified: 2016-01-19 12:23 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch that fix the problem both for GLES2 and GLES3.1 (1.65 KB, text/plain)
2015-12-18 12:01 UTC, Marta Löfstedt
Details
Patch that solved the problem without piglit regressions (1.83 KB, text/plain)
2016-01-08 13:54 UTC, Marta Löfstedt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Janes 2015-12-17 18:25:29 UTC
Enabling gles3.1 on gen8 generated a CTS regression:

/tmp/build_root/m64/bin/cts/glcts --deqp-case=ES2-CTS.gtf.GL2FixedTests.buffer_objects.buffer_objects
dEQP Core GL-CTS-2.0 (0x0052484b) starting..
  target implementation = 'intel-gbm'

Test case 'ES2-CTS.gtf.GL2FixedTests.buffer_objects.buffer_objects'..
#+ Error when binding not generated buffer
#+ Error testing genBuffers
  Fail (Fail)

DONE!

Test run totals:
  Passed:        0/1 (0.00%)
  Failed:        1/1 (100.00%)
  Not supported: 0/1 (0.00%)
  Warnings:      0/1 (0.00%)

Standard Error

Mesa: User error: GL_INVALID_OPERATION in glBufferData(no buffer bound)
Mesa: User error: GL_INVALID_OPERATION in glBufferSubData(no buffer bound)
Mesa: User error: GL_INVALID_OPERATION in glBufferData(no buffer bound)
Mesa: User error: GL_INVALID_OPERATION in glBufferSubData(no buffer bound)
Mesa: User error: GL_INVALID_OPERATION in glBufferData(no buffer bound)
Mesa: User error: GL_INVALID_OPERATION in glBufferSubData(no buffer bound)
Mesa: User error: GL_INVALID_OPERATION in glBufferData(no buffer bound)
Mesa: User error: GL_INVALID_OPERATION in glBufferSubData(no buffer bound)
Mesa: User error: GL_INVALID_VALUE in glGenBuffers(n -1 < 0)
Mesa: User error: GL_INVALID_VALUE in glDeleteBuffersARB(n)
Mesa: User error: GL_INVALID_OPERATION in glBindBuffer(non-gen name)

bisected to:
e97b207654a1c0b2c27b6ad6579b5570a83ce8cd
Author:     Jordan Justen <jordan.l.justen@intel.com>
AuthorDate: Tue Dec 15 15:53:20 2015 -0800
Commit:     Jordan Justen <jordan.l.justen@intel.com>
CommitDate: Wed Dec 16 20:37:40 2015 -0800

    i965/screen: Allow OpenGLES 3.1 for gen8+
    
    OpenGLES 3.1 cannot be enabled for gen 7 (Ivy Bridge, Haswell) since
    they are still missing ARB_stencil_texturing.
    
    Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
    Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
Comment 1 Marta Löfstedt 2015-12-18 12:00:39 UTC
I don't think Jordans patch should be blamed in this case. I believe this is the actual reason for the regression:

"
commit 6c3de8996fbe9447e092cc75ccdd6f720fabaf4d
Author: Marta Lofstedt <marta.lofstedt@intel.com>
Date:   Wed Aug 19 20:25:22 2015 +0200

    mesa/es3.1 : Align OpenGL ES 3.1 glBindVertexBuffer error handling with OpenGL Core
    
    According to OpenGL ES 3.1 specification 10.3.1:
    "An INVALID_OPERATION error is generated if buffer is not zero
    or a name returned from a previous call to GenBuffers,
    or if such a name has since been deleted with DeleteBuffers."
    This error check was previously limited to OpenGL Core.
"

Without above patch ES31-CTS-vertex_attrib_binding.negative-bindVertexBuffer will fail. I attach a patch that moves up the test to varray. With this patch both GL2FixedTests.buffer_objects.buffer_objects and ES31-CTS-vertex_attrib_binding.negative-bindVertexBuffer will pass.
Before sending it up to the mesa list. I just need to investigate if it is OK to also move up the GL_CORE test. Judging from the comment in varray is done by the same reason I did the test in bufferobj.c. But there could be some other GL_CORE path to mesa_handle_bind_buffer_gen relying on this check.
Comment 2 Marta Löfstedt 2015-12-18 12:01:24 UTC
Created attachment 120583 [details]
Patch that fix the problem both for GLES2 and GLES3.1
Comment 3 Marta Löfstedt 2016-01-07 13:13:35 UTC
Note to myself, the attached patch cause piglit regressions, provide a proper fix.
Comment 4 Marta Löfstedt 2016-01-08 13:54:07 UTC
Created attachment 120896 [details]
Patch that solved the problem without piglit regressions

My previous patch had piglit regressions. This one does not.
Comment 5 Marta Löfstedt 2016-01-08 13:56:38 UTC
I send up the patch:
http://patchwork.freedesktop.org/patch/69755/
Comment 6 Marta Löfstedt 2016-01-19 12:23:47 UTC
Fixed by:

commit 2bcacc69b9935f073e271527771b4fb42081dcb6
Author: Marta Lofstedt <marta.lofstedt@intel.com>
Date:   Fri Jan 8 14:55:55 2016 +0100

    mesa: Move sanity check of BindVertexBuffer for OpenGL ES 3.1


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.