summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_tnl.c4
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_tnl.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c8
-rw-r--r--src/mesa/main/ffvertex_prog.c2
-rw-r--r--src/mesa/main/light.c10
-rw-r--r--src/mesa/main/mtypes.h2
-rw-r--r--src/mesa/tnl/t_vb_light.c4
-rw-r--r--src/mesa/vbo/vbo_exec_api.c2
-rw-r--r--src/mesa/x86/gen_matypes.c2
10 files changed, 21 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
index a239f88cdcd..06155fe011c 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
@@ -57,7 +57,7 @@ void
nv10_emit_color_material(struct gl_context *ctx, int emit)
{
struct nouveau_pushbuf *push = context_push(ctx);
- unsigned mask = get_material_bitmask(ctx->Light.ColorMaterialBitmask);
+ unsigned mask = get_material_bitmask(ctx->Light._ColorMaterialBitmask);
BEGIN_NV04(push, NV10_3D(COLOR_MATERIAL), 1);
PUSH_DATA (push, ctx->Light.ColorMaterialEnabled ? mask : 0);
@@ -313,7 +313,7 @@ nv10_emit_light_source(struct gl_context *ctx, int emit)
#define USE_COLOR_MATERIAL(attr) \
(ctx->Light.ColorMaterialEnabled && \
- ctx->Light.ColorMaterialBitmask & (1 << MAT_ATTRIB_FRONT_##attr))
+ ctx->Light._ColorMaterialBitmask & (1 << MAT_ATTRIB_FRONT_##attr))
void
nv10_emit_material_ambient(struct gl_context *ctx, int emit)
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
index 181f3fe2e02..1d3d83d47fc 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
@@ -89,7 +89,7 @@ void
nv20_emit_color_material(struct gl_context *ctx, int emit)
{
struct nouveau_pushbuf *push = context_push(ctx);
- unsigned mask = get_material_bitmask(ctx->Light.ColorMaterialBitmask);
+ unsigned mask = get_material_bitmask(ctx->Light._ColorMaterialBitmask);
BEGIN_NV04(push, NV20_3D(COLOR_MATERIAL), 1);
PUSH_DATA (push, ctx->Light.ColorMaterialEnabled ? mask : 0);
@@ -229,7 +229,7 @@ nv20_emit_light_source(struct gl_context *ctx, int emit)
#define USE_COLOR_MATERIAL(attr, side) \
(ctx->Light.ColorMaterialEnabled && \
- ctx->Light.ColorMaterialBitmask & (1 << MAT_ATTRIB_##attr(side)))
+ ctx->Light._ColorMaterialBitmask & (1 << MAT_ATTRIB_##attr(side)))
void
nv20_emit_material_ambient(struct gl_context *ctx, int emit)
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index 0f7b564024e..1c335172acb 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -897,7 +897,7 @@ static void r200ColorMaterial( struct gl_context *ctx, GLenum face, GLenum mode
(0xf << R200_BACK_SPECULAR_SOURCE_SHIFT));
if (ctx->Light.ColorMaterialEnabled) {
- GLuint mask = ctx->Light.ColorMaterialBitmask;
+ GLuint mask = ctx->Light._ColorMaterialBitmask;
if (mask & MAT_BIT_FRONT_EMISSION) {
light_model_ctl1 |= (R200_LM1_SOURCE_VERTEX_COLOR_0 <<
@@ -995,7 +995,7 @@ void r200UpdateMaterial( struct gl_context *ctx )
/* Might be possible and faster to update everything unconditionally? */
if (ctx->Light.ColorMaterialEnabled)
- mask &= ~ctx->Light.ColorMaterialBitmask;
+ mask &= ~ctx->Light._ColorMaterialBitmask;
if (R200_DEBUG & RADEON_STATE)
fprintf(stderr, "%s\n", __FUNCTION__);
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 6e2bb5bce62..d930e76736a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -707,8 +707,8 @@ static void check_twoside_fallback( struct gl_context *ctx )
if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) {
if (ctx->Light.ColorMaterialEnabled &&
- (ctx->Light.ColorMaterialBitmask & BACK_MATERIAL_BITS) !=
- ((ctx->Light.ColorMaterialBitmask & FRONT_MATERIAL_BITS)<<1))
+ (ctx->Light._ColorMaterialBitmask & BACK_MATERIAL_BITS) !=
+ ((ctx->Light._ColorMaterialBitmask & FRONT_MATERIAL_BITS)<<1))
fallback = GL_TRUE;
else {
for (i = MAT_ATTRIB_FRONT_AMBIENT; i < MAT_ATTRIB_FRONT_INDEXES; i+=2)
@@ -736,7 +736,7 @@ static void radeonColorMaterial( struct gl_context *ctx, GLenum face, GLenum mod
(3 << RADEON_SPECULAR_SOURCE_SHIFT));
if (ctx->Light.ColorMaterialEnabled) {
- GLuint mask = ctx->Light.ColorMaterialBitmask;
+ GLuint mask = ctx->Light._ColorMaterialBitmask;
if (mask & MAT_BIT_FRONT_EMISSION) {
light_model_ctl1 |= (RADEON_LM_SOURCE_VERTEX_DIFFUSE <<
@@ -797,7 +797,7 @@ void radeonUpdateMaterial( struct gl_context *ctx )
GLuint mask = ~0;
if (ctx->Light.ColorMaterialEnabled)
- mask &= ~ctx->Light.ColorMaterialBitmask;
+ mask &= ~ctx->Light._ColorMaterialBitmask;
if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "%s\n", __FUNCTION__);
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index f1ab7533395..5577683115a 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -181,7 +181,7 @@ static void make_state_key( struct gl_context *ctx, struct state_key *key )
key->light_twoside = 1;
if (ctx->Light.ColorMaterialEnabled) {
- key->light_color_material_mask = ctx->Light.ColorMaterialBitmask;
+ key->light_color_material_mask = ctx->Light._ColorMaterialBitmask;
}
for (i = 0; i < MAX_LIGHTS; i++) {
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 38ec1b6e801..d6fbcd9be2c 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -693,13 +693,13 @@ _mesa_update_material( struct gl_context *ctx, GLuint bitmask )
/*
* Update the current materials from the given rgba color
- * according to the bitmask in ColorMaterialBitmask, which is
+ * according to the bitmask in _ColorMaterialBitmask, which is
* set by glColorMaterial().
*/
void
_mesa_update_color_material( struct gl_context *ctx, const GLfloat color[4] )
{
- GLuint bitmask = ctx->Light.ColorMaterialBitmask;
+ const GLbitfield bitmask = ctx->Light._ColorMaterialBitmask;
struct gl_material *mat = &ctx->Light.Material;
int i;
@@ -731,13 +731,13 @@ _mesa_ColorMaterial( GLenum face, GLenum mode )
if (bitmask == 0)
return; /* error was recorded */
- if (ctx->Light.ColorMaterialBitmask == bitmask &&
+ if (ctx->Light._ColorMaterialBitmask == bitmask &&
ctx->Light.ColorMaterialFace == face &&
ctx->Light.ColorMaterialMode == mode)
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
- ctx->Light.ColorMaterialBitmask = bitmask;
+ ctx->Light._ColorMaterialBitmask = bitmask;
ctx->Light.ColorMaterialFace = face;
ctx->Light.ColorMaterialMode = mode;
@@ -1188,7 +1188,7 @@ _mesa_init_lighting( struct gl_context *ctx )
ctx->Light.Enabled = GL_FALSE;
ctx->Light.ColorMaterialFace = GL_FRONT_AND_BACK;
ctx->Light.ColorMaterialMode = GL_AMBIENT_AND_DIFFUSE;
- ctx->Light.ColorMaterialBitmask = _mesa_material_bitmask( ctx,
+ ctx->Light._ColorMaterialBitmask = _mesa_material_bitmask( ctx,
GL_FRONT_AND_BACK,
GL_AMBIENT_AND_DIFFUSE, ~0,
NULL );
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 8572b5ff6e7..f9cec2453df 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -943,7 +943,7 @@ struct gl_light_attrib
GLenum ProvokingVertex; /**< GL_EXT_provoking_vertex */
GLenum ColorMaterialFace; /**< GL_FRONT, BACK or FRONT_AND_BACK */
GLenum ColorMaterialMode; /**< GL_AMBIENT, GL_DIFFUSE, etc */
- GLbitfield ColorMaterialBitmask; /**< bitmask formed from Face and Mode */
+ GLbitfield _ColorMaterialBitmask; /**< bitmask formed from Face and Mode */
GLboolean ColorMaterialEnabled;
GLenum ClampVertexColor; /**< GL_TRUE, GL_FALSE, GL_FIXED_ONLY */
GLboolean _ClampVertexColor;
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index 39467fac731..854887c8f36 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -227,12 +227,12 @@ prepare_materials(struct gl_context *ctx,
store->mat_count = 0;
store->mat_bitmask = 0;
- /* Examine the ColorMaterialBitmask to determine which materials
+ /* Examine the _ColorMaterialBitmask to determine which materials
* track vertex color. Override the material attribute's pointer
* with the color pointer for each one.
*/
if (ctx->Light.ColorMaterialEnabled) {
- const GLuint bitmask = ctx->Light.ColorMaterialBitmask;
+ const GLuint bitmask = ctx->Light._ColorMaterialBitmask;
for (i = 0 ; i < MAT_ATTRIB_MAX ; i++)
if (bitmask & (1<<i))
VB->AttribPtr[_TNL_ATTRIB_MAT_FRONT_AMBIENT + i] = VB->AttribPtr[_TNL_ATTRIB_COLOR0];
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index bfa1b1db826..fc7e4069232 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -450,7 +450,7 @@ vbo_Materialfv(GLenum face, GLenum pname, const GLfloat *params)
* indicating which material attributes can actually be updated below.
*/
if (ctx->Light.ColorMaterialEnabled) {
- updateMats = ~ctx->Light.ColorMaterialBitmask;
+ updateMats = ~ctx->Light._ColorMaterialBitmask;
}
else {
/* GL_COLOR_MATERIAL is disabled so don't skip any material updates */
diff --git a/src/mesa/x86/gen_matypes.c b/src/mesa/x86/gen_matypes.c
index 4fe99e799ff..a1d8ee67dbe 100644
--- a/src/mesa/x86/gen_matypes.c
+++ b/src/mesa/x86/gen_matypes.c
@@ -99,7 +99,7 @@ int main( int argc, char **argv )
OFFSET( "CTX_LIGHT_SHADE_MODEL ", struct gl_context, Light.ShadeModel );
OFFSET( "CTX_LIGHT_COLOR_MAT_FACE ", struct gl_context, Light.ColorMaterialFace );
OFFSET( "CTX_LIGHT_COLOR_MAT_MODE ", struct gl_context, Light.ColorMaterialMode );
- OFFSET( "CTX_LIGHT_COLOR_MAT_MASK ", struct gl_context, Light.ColorMaterialBitmask );
+ OFFSET( "CTX_LIGHT_COLOR_MAT_MASK ", struct gl_context, Light._ColorMaterialBitmask );
OFFSET( "CTX_LIGHT_COLOR_MAT_ENABLED ", struct gl_context, Light.ColorMaterialEnabled );
OFFSET( "CTX_LIGHT_ENABLED_LIST ", struct gl_context, Light.EnabledList );
OFFSET( "CTX_LIGHT_NEED_VERTS ", struct gl_context, Light._NeedVertices );