Mesa (master): mesa: Make the gl_constant_value' s bool occupy the same space as float/int.

Eric Anholt anholt at kemper.freedesktop.org
Tue Aug 30 12:10:33 PDT 2011


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

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Aug 19 11:58:43 2011 -0700

mesa: Make the gl_constant_value's bool occupy the same space as float/int.

At least for Intel, all our uniform components are of uint32_t size, either
float or signed or unsigned int.  For uploading uniform data in the driver,
it's much easier to upload a full dword per uniform element instead of trying
to pick out the bool byte and then fill in the top 3 bytes of pad with 0.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/program/prog_parameter.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/program/prog_parameter.h b/src/mesa/program/prog_parameter.h
index 1a5ed34..4c2773a 100644
--- a/src/mesa/program/prog_parameter.h
+++ b/src/mesa/program/prog_parameter.h
@@ -53,7 +53,7 @@
 typedef union gl_constant_value
 {
    GLfloat f;
-   GLboolean b;
+   GLint b;
    GLint i;
    GLuint u;
 } gl_constant_value;



More information about the mesa-commit mailing list