[Mesa-dev] [RFC PATCH 19/40] mesa: Change internal state flag to a 64-bits

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Sun Jan 4 06:04:33 PST 2015


Existing state flag cannot publish additional values.

Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
 src/mesa/main/dd.h     | 2 +-
 src/mesa/main/mtypes.h | 3 ++-
 src/mesa/main/state.c  | 6 +++---
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 2f40915..8c737e0 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -91,7 +91,7 @@ struct dd_function_table {
     * This is in addition to any state change callbacks Mesa may already have
     * made.
     */
-   void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state );
+   void (*UpdateState)( struct gl_context *ctx, GLbitfield64 new_state );
 
    /**
     * Resize the given framebuffer to the given size.
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index b95dfb9..12ab3e8 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3932,6 +3932,7 @@ struct gl_matrix_stack
 #define _NEW_FRAG_CLAMP        (1 << 29)
 /* gap, re-use for core Mesa state only; use ctx->DriverFlags otherwise */
 #define _NEW_VARYING_VP_INPUTS (1 << 31) /**< gl_context::varying_vp_inputs */
+
 #define _NEW_ALL ~0
 /*@}*/
 
@@ -4399,7 +4400,7 @@ struct gl_context
    struct gl_debug_state *Debug;
 
    GLenum RenderMode;        /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */
-   GLbitfield NewState;      /**< bitwise-or of _NEW_* flags */
+   GLbitfield64 NewState;      /**< bitwise-or of _NEW_* flags */
    uint64_t NewDriverState;  /**< bitwise-or of flags from DriverFlags */
 
    struct gl_driver_flags DriverFlags;
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 45bce78..ccf60de 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -349,9 +349,9 @@ update_twoside(struct gl_context *ctx)
 void
 _mesa_update_state_locked( struct gl_context *ctx )
 {
-   GLbitfield new_state = ctx->NewState;
-   GLbitfield prog_flags = _NEW_PROGRAM;
-   GLbitfield new_prog_state = 0x0;
+   GLbitfield64 new_state = ctx->NewState;
+   GLbitfield64 prog_flags = _NEW_PROGRAM;
+   GLbitfield64 new_prog_state = 0x0;
 
    if (new_state == _NEW_CURRENT_ATTRIB) 
       goto out;
-- 
1.9.1



More information about the mesa-dev mailing list