Re: [Mesa-dev] [PATCH 03/20] t_dd_dmatmp: Disallow flat shading when rendering quad strips via tri strips

2015-05-21 Thread Ville Syrjälä
On Fri, May 15, 2015 at 12:08:33PM -0700, Ian Romanick wrote:
 On 03/23/2015 05:47 AM, ville.syrj...@linux.intel.com wrote:
  From: Ville Syrjälä ville.syrj...@linux.intel.com
  
  When rendering quad strips via tri strips we can't get the provoking
  vertex right, so disallow flat shading.
 
 Same comments as for patch 2.

I'm not sure about piglit, but there's bunch of stuff in mesa-demos
that hit this stuff.

To clarify a bit, this series does fix the piglit provoking vertex
test on 855, but I'm unsure which patches precisely are the key to
that since a lot of them try to fix various provoking vertex issues.
I was too lazy to reverse bisect my own patches.

 
  Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com
  ---
   src/mesa/tnl_dd/t_dd_dmatmp.h | 4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)
  
  diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
  index 3ed4a98..f56b0aa 100644
  --- a/src/mesa/tnl_dd/t_dd_dmatmp.h
  +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
  @@ -447,7 +447,7 @@ static void TAG(render_quad_strip_verts)( struct 
  gl_context *ctx,
   
 FLUSH();
  }
  -   else if (HAVE_TRI_STRIPS) {
  +   else if (HAVE_TRI_STRIPS  ctx-Light.ShadeModel == GL_SMOOTH) {
 LOCAL_VARS;
 int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
 int currentsz;
  @@ -1124,7 +1124,7 @@ static GLboolean TAG(validate_render)( struct 
  gl_context *ctx,
   } else if (HAVE_QUAD_STRIPS) {
  ok = GL_TRUE;
   } else {
  -   ok = HAVE_TRI_STRIPS;
  +   ok = (HAVE_TRI_STRIPS  ctx-Light.ShadeModel == GL_SMOOTH);
   }
   break;
 case GL_QUADS:
  

-- 
Ville Syrjälä
Intel OTC
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 03/20] t_dd_dmatmp: Disallow flat shading when rendering quad strips via tri strips

2015-05-15 Thread Ian Romanick
On 03/23/2015 05:47 AM, ville.syrj...@linux.intel.com wrote:
 From: Ville Syrjälä ville.syrj...@linux.intel.com
 
 When rendering quad strips via tri strips we can't get the provoking
 vertex right, so disallow flat shading.

Same comments as for patch 2.

 Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com
 ---
  src/mesa/tnl_dd/t_dd_dmatmp.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
 index 3ed4a98..f56b0aa 100644
 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h
 +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
 @@ -447,7 +447,7 @@ static void TAG(render_quad_strip_verts)( struct 
 gl_context *ctx,
  
FLUSH();
 }
 -   else if (HAVE_TRI_STRIPS) {
 +   else if (HAVE_TRI_STRIPS  ctx-Light.ShadeModel == GL_SMOOTH) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
int currentsz;
 @@ -1124,7 +1124,7 @@ static GLboolean TAG(validate_render)( struct 
 gl_context *ctx,
} else if (HAVE_QUAD_STRIPS) {
   ok = GL_TRUE;
} else {
 - ok = HAVE_TRI_STRIPS;
 + ok = (HAVE_TRI_STRIPS  ctx-Light.ShadeModel == GL_SMOOTH);
}
break;
case GL_QUADS:
 

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 03/20] t_dd_dmatmp: Disallow flat shading when rendering quad strips via tri strips

2015-03-23 Thread ville . syrjala
From: Ville Syrjälä ville.syrj...@linux.intel.com

When rendering quad strips via tri strips we can't get the provoking
vertex right, so disallow flat shading.

Signed-off-by: Ville Syrjälä ville.syrj...@linux.intel.com
---
 src/mesa/tnl_dd/t_dd_dmatmp.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index 3ed4a98..f56b0aa 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -447,7 +447,7 @@ static void TAG(render_quad_strip_verts)( struct gl_context 
*ctx,
 
   FLUSH();
}
-   else if (HAVE_TRI_STRIPS) {
+   else if (HAVE_TRI_STRIPS  ctx-Light.ShadeModel == GL_SMOOTH) {
   LOCAL_VARS;
   int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
   int currentsz;
@@ -1124,7 +1124,7 @@ static GLboolean TAG(validate_render)( struct gl_context 
*ctx,
 } else if (HAVE_QUAD_STRIPS) {
ok = GL_TRUE;
 } else {
-   ok = HAVE_TRI_STRIPS;
+   ok = (HAVE_TRI_STRIPS  ctx-Light.ShadeModel == GL_SMOOTH);
 }
 break;
   case GL_QUADS:
-- 
2.0.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev