Bug 77443 - Potential regressions from 1afe3359258a9
Summary: Potential regressions from 1afe3359258a9
Status: RESOLVED WONTFIX
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Kenneth Graunke
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-14 17:41 UTC by Carl Worth
Modified: 2016-01-24 07:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Carl Worth 2014-04-14 17:41:29 UTC
I recently tried cherry-picking commit
1afe3359258a9e89b62c8638761f52d78f6d1cbc to the 10.1 branch of
Mesa. When I did that, I found that the following piglit tests
regressed (passing before the commit and failing afterward):

    all/spec/glsl-1.50/execution/geometry
	clip-distance-out-values
	max-input-components
	point-size-out
	primitive-id-out

    all/spec/glsl-1.50/execution
	gs-redeclares-both-pervertex-blocks
	interface-vs-named-to-gs-array
	redeclare-pervertex-out-subset-gs
	redeclare-pervertex-subset-vs-to-gs

I talked about the regressions with Ken a bit. He thinks it might be
right to just convert the patch from mesa master.

Here's the original patch:

commit 1afe3359258a9e89b62c8638761f52d78f6d1cbc
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Mar 20 11:53:16 2014 -0700

    mesa: In core profile, refuse to draw unless a VAO is bound.
    
    Core profile requires a non-default VAO to be bound.  Currently, calls
    to glVertexAttribPointer raise INVALID_OPERATION unless a VAO is bound,
    and we never actually get any vertex data set.  Trying to draw without
    any vertex data can only cause problems.  In i965, it causes a crash.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76400
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Cc: mesa-stable@lists.freedesktop.org

diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index efc3a2b..8f0b199 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -125,8 +125,11 @@ check_valid_to_render(struct gl_context *ctx, const char *f
         return GL_FALSE;
       break;
 
-   case API_OPENGL_COMPAT:
    case API_OPENGL_CORE:
+      if (ctx->Array.VAO == ctx->Array.DefaultVAO)
+         return GL_FALSE;
+      /* fallthrough */
+   case API_OPENGL_COMPAT:
       {
          const struct gl_shader_program *vsProg =
             ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
Comment 1 Timothy Arceri 2016-01-24 06:58:22 UTC
Closing as there will be no more 10.1 releases.
Comment 2 Kenneth Graunke 2016-01-24 07:11:25 UTC
I don't think this is actually about 10.1 - Carl was noticing that 1afe3359258a9e89b62c8638761f52d78f6d1cbc broke some things.  I remember a lot of discussion, but I'm not sure if we ever settled on a solution.  People were suggesting that my commit on master was bunk, and should be reverted.  But I'm not sure if we ever did...


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.