Mesa (master): glsl: Store gl_uniform_driver_storage:: format as the actual type

Ian Romanick idr at kemper.freedesktop.org
Wed Jun 11 19:01:38 UTC 2014


Module: Mesa
Branch: master
Commit: 014d45f137b484e4fc24722e77e4a2a15cc04031
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=014d45f137b484e4fc24722e77e4a2a15cc04031

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Tue Jun 10 10:41:32 2014 -0700

glsl: Store gl_uniform_driver_storage::format as the actual type

And delete the incorrect comment.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

---

 src/glsl/ir_uniform.h    |    7 ++-----
 src/mesa/main/uniforms.c |    2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/glsl/ir_uniform.h b/src/glsl/ir_uniform.h
index 3508509..4829eb7 100644
--- a/src/glsl/ir_uniform.h
+++ b/src/glsl/ir_uniform.h
@@ -37,7 +37,7 @@
 extern "C" {
 #endif
 
-enum gl_uniform_driver_format {
+enum PACKED gl_uniform_driver_format {
    uniform_native = 0,          /**< Store data in the native format. */
    uniform_int_float,           /**< Store integer data as floats. */
    uniform_bool_float,          /**< Store boolean data as floats. */
@@ -66,11 +66,8 @@ struct gl_uniform_driver_storage {
 
    /**
     * Base format of the stored data.
-    *
-    * This field must have a value from \c GLSL_TYPE_UINT through \c
-    * GLSL_TYPE_SAMPLER.
     */
-   uint8_t format;
+   enum gl_uniform_driver_format format;
 
    /**
     * Pointer to the base of the data.
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 1daade4..f450173 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -112,7 +112,7 @@ _mesa_uniform_attach_driver_storage(struct gl_uniform_storage *uni,
 
    uni->driver_storage[uni->num_driver_storage].element_stride = element_stride;
    uni->driver_storage[uni->num_driver_storage].vector_stride = vector_stride;
-   uni->driver_storage[uni->num_driver_storage].format = (uint8_t) format;
+   uni->driver_storage[uni->num_driver_storage].format = format;
    uni->driver_storage[uni->num_driver_storage].data = data;
 
    uni->num_driver_storage++;




More information about the mesa-commit mailing list