[Mesa-dev] [PATCH 02/10] mesa: short-cut new_state == _NEW_LINE in _mesa_update_state_locked()
Brian Paul
brianp at vmware.com
Wed Oct 14 16:24:34 PDT 2015
We can skip to the end of _mesa_update_state_locked() if only the
_NEW_LINE flag is set since none of the derived state depends on it
(just like _NEW_CURRENT_ATTRIB). Note that we still call the
ctx->Driver.UpdateState() function, of course.
---
src/mesa/main/state.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index d3b1c72..7fa7da2 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -392,7 +392,8 @@ _mesa_update_state_locked( struct gl_context *ctx )
GLbitfield prog_flags = _NEW_PROGRAM;
GLbitfield new_prog_state = 0x0;
- if (new_state == _NEW_CURRENT_ATTRIB)
+ if (new_state == _NEW_CURRENT_ATTRIB ||
+ new_state == _NEW_LINE)
goto out;
if (MESA_VERBOSE & VERBOSE_STATE)
--
1.9.1
More information about the mesa-dev
mailing list