Mesa (7.10): glsl: Changed extension enable bits to bools.

Ian Romanick idr at kemper.freedesktop.org
Wed Jul 20 20:37:19 UTC 2011


Module: Mesa
Branch: 7.10
Commit: db3d21d6768d3cf8ecb5cde9cfe7bc1029499530
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=db3d21d6768d3cf8ecb5cde9cfe7bc1029499530

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Fri Jun 24 12:33:30 2011 -0700

glsl: Changed extension enable bits to bools.

These were previously 1-bit-wide bitfields.  Changing them to bools
has a negligible performance impact, and allows them to be accessed by
offset as well as by direct structure access.

Some changes were made in glsl_parser_extras.h during cherry pick to
7.10 because 7.11 and master support many extensions that 7.10 does
not.  The unsupported extensions were removed.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
(cherry picked from commit 9c4445de6e69d021491361d884bf172c05189d61)

---

 src/glsl/glsl_parser_extras.h |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 819333d..d784193 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -156,18 +156,18 @@ struct _mesa_glsl_parse_state {
     * \name Enable bits for GLSL extensions
     */
    /*@{*/
-   unsigned ARB_draw_buffers_enable:1;
-   unsigned ARB_draw_buffers_warn:1;
-   unsigned ARB_explicit_attrib_location_enable:1;
-   unsigned ARB_explicit_attrib_location_warn:1;
-   unsigned ARB_fragment_coord_conventions_enable:1;
-   unsigned ARB_fragment_coord_conventions_warn:1;
-   unsigned ARB_texture_rectangle_enable:1;
-   unsigned ARB_texture_rectangle_warn:1;
-   unsigned EXT_texture_array_enable:1;
-   unsigned EXT_texture_array_warn:1;
-   unsigned ARB_shader_stencil_export_enable:1;
-   unsigned ARB_shader_stencil_export_warn:1;
+   bool ARB_draw_buffers_enable;
+   bool ARB_draw_buffers_warn;
+   bool ARB_explicit_attrib_location_enable;
+   bool ARB_explicit_attrib_location_warn;
+   bool ARB_fragment_coord_conventions_enable;
+   bool ARB_fragment_coord_conventions_warn;
+   bool ARB_texture_rectangle_enable;
+   bool ARB_texture_rectangle_warn;
+   bool EXT_texture_array_enable;
+   bool EXT_texture_array_warn;
+   bool ARB_shader_stencil_export_enable;
+   bool ARB_shader_stencil_export_warn;
    /*@}*/
 
    /** Extensions supported by the OpenGL implementation. */




More information about the mesa-commit mailing list