summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/r300/r300_state_derived.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/gallium/drivers/r300/r300_state_derived.c')
-rw-r--r--lib/mesa/src/gallium/drivers/r300/r300_state_derived.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/mesa/src/gallium/drivers/r300/r300_state_derived.c b/lib/mesa/src/gallium/drivers/r300/r300_state_derived.c
index b46d1937b..0e1ab4c94 100644
--- a/lib/mesa/src/gallium/drivers/r300/r300_state_derived.c
+++ b/lib/mesa/src/gallium/drivers/r300/r300_state_derived.c
@@ -102,7 +102,7 @@ static void r300_draw_emit_all_attribs(struct r300_context* r300)
gen_count = 0;
for (i = 0; i < ATTR_GENERIC_COUNT && gen_count < 8; i++) {
if (vs_outputs->generic[i] != ATTR_UNUSED &&
- !(r300->sprite_coord_enable & (1 << i))) {
+ !(r300->sprite_coord_enable & (1U << i))) {
r300_draw_emit_attrib(r300, EMIT_4F, vs_outputs->generic[i]);
gen_count++;
}
@@ -168,7 +168,7 @@ static void r300_swtcl_vertex_psc(struct r300_context *r300)
/* Add the attribute to the PSC table. */
if (i & 1) {
vstream->vap_prog_stream_cntl[i >> 1] |= type << 16;
- vstream->vap_prog_stream_cntl_ext[i >> 1] |= swizzle << 16;
+ vstream->vap_prog_stream_cntl_ext[i >> 1] |= (uint32_t)swizzle << 16;
} else {
vstream->vap_prog_stream_cntl[i >> 1] |= type;
vstream->vap_prog_stream_cntl_ext[i >> 1] |= swizzle;
@@ -441,7 +441,7 @@ static void r300_update_rs_block(struct r300_context *r300)
for (i = 0; i < ATTR_GENERIC_COUNT && col_count < 2; i++) {
/* Cannot use color varyings for sprite coords. */
if (fs_inputs->generic[i] != ATTR_UNUSED &&
- (r300->sprite_coord_enable & (1 << i))) {
+ (r300->sprite_coord_enable & (1U << i))) {
break;
}
@@ -807,7 +807,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
for (i = 0; i < count; i++) {
if (state->sampler_views[i] && state->sampler_states[i]) {
- state->tx_enable |= 1 << i;
+ state->tx_enable |= 1U << i;
view = state->sampler_views[i];
tex = r300_resource(view->base.texture);
@@ -828,7 +828,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
base_level = view->base.u.tex.first_level;
min_level = sampler->min_lod;
level_count = MIN3(sampler->max_lod,
- tex->b.b.last_level - base_level,
+ tex->b.last_level - base_level,
view->base.u.tex.last_level - base_level);
if (base_level + min_level) {
@@ -891,14 +891,14 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
}
/* to emulate 1D textures through 2D ones correctly */
- if (tex->b.b.target == PIPE_TEXTURE_1D) {
+ if (tex->b.target == PIPE_TEXTURE_1D) {
texstate->filter0 &= ~R300_TX_WRAP_T_MASK;
texstate->filter0 |= R300_TX_WRAP_T(R300_TX_CLAMP_TO_EDGE);
}
/* The hardware doesn't like CLAMP and CLAMP_TO_BORDER
* for the 3rd coordinate if the texture isn't 3D. */
- if (tex->b.b.target != PIPE_TEXTURE_3D) {
+ if (tex->b.target != PIPE_TEXTURE_3D) {
texstate->filter0 &= ~R300_TX_WRAP_R_MASK;
}
@@ -973,7 +973,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
(struct pipe_sampler_view**)&state->sampler_views[i],
&r300->texkill_sampler->base);
- state->tx_enable |= 1 << i;
+ state->tx_enable |= 1U << i;
texstate = &state->regs[i];