<div dir="ltr"><div>Are you sure about this? The fixed-func vertex and fragment shaders can move zero-stride vertex attribs into constants (uniforms). If a shader changes, it might no longer be necessary to submit zero-stride attribs via the vertex API, but this would be missed if _NEW_PROGRAM was ignored.</div><div><br></div><div>Marek<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 17, 2018 at 2:37 AM, <span dir="ltr"><<a href="mailto:Mathias.Froehlich@gmx.net" target="_blank">Mathias.Froehlich@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Mathias Fröhlich <<a href="mailto:mathias.froehlich@web.de" target="_blank">mathias.froehlich@web.de</a>><br>
<br>
All the shader program dependent handling is done on the level<br>
of the gl_Context::Array._DrawVAO/_Dr<wbr>awVAOEnabledAttribs.<br>
So, skip array element invalidation on _NEW_PROGRAM.<br>
<br>
Signed-off-by: Mathias Fröhlich <<a href="mailto:Mathias.Froehlich@web.de" target="_blank">Mathias.Froehlich@web.de</a>><br>
---<br>
src/mesa/main/api_arrayelt.c | 2 +-<br>
src/mesa/vbo/vbo_context.c | 2 +-<br>
2 files changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c<br>
index 2dfa74f64b..afa3012021 100644<br>
--- a/src/mesa/main/api_arrayelt.c<br>
+++ b/src/mesa/main/api_arrayelt.c<br>
@@ -1823,7 +1823,7 @@ _ae_invalidate_state(struct gl_context *ctx)<br>
* Luckily, neither the drivers nor tnl muck with the state that<br>
* concerns us here:<br>
*/<br>
- assert(ctx->NewState & (_NEW_ARRAY | _NEW_PROGRAM));<br>
+ assert(ctx->NewState & _NEW_ARRAY);<br>
<br>
assert(!actx->mapped_vbos);<br>
actx->dirty_state = true;<br>
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c<br>
index ee2e31ab7a..cf9405df3d 100644<br>
--- a/src/mesa/vbo/vbo_context.c<br>
+++ b/src/mesa/vbo/vbo_context.c<br>
@@ -157,7 +157,7 @@ vbo_exec_invalidate_state(stru<wbr>ct gl_context *ctx)<br>
struct vbo_context *vbo = vbo_context(ctx);<br>
struct vbo_exec_context *exec = &vbo->exec;<br>
<br>
- if (ctx->NewState & (_NEW_PROGRAM | _NEW_ARRAY)) {<br>
+ if (ctx->NewState & _NEW_ARRAY) {<br>
_ae_invalidate_state(ctx);<br>
}<br>
if (ctx->NewState & _NEW_EVAL)<br>
<span class="m_-540265865246946901HOEnZb"><font color="#888888">-- <br>
2.14.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>