int i;
for(i = 0; i < 32; ++i) {
- if ((compiler->RequiredOutputs & (1 << i)) &&
- !(compiler->Base.Program.OutputsWritten & (1 << i))) {
+ if ((compiler->RequiredOutputs & (1U << i)) &&
+ !(compiler->Base.Program.OutputsWritten & (1U << i))) {
struct rc_instruction * inst = rc_insert_new_instruction(&compiler->Base, compiler->Base.Program.Instructions.Prev);
inst->U.I.Opcode = RC_OPCODE_MOV;
inst->U.I.SrcReg[0].Index = 0;
inst->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_XYZW;
- compiler->Base.Program.OutputsWritten |= 1 << i;
+ compiler->Base.Program.OutputsWritten |= 1U << i;
}
}
}
int i;
for(i = 0; i < 32; ++i) {
- if (c->RequiredOutputs & (1 << i))
+ if (c->RequiredOutputs & (1U << i))
callback(data, i, RC_MASK_XYZW);
}
}
for (i = 0; i < opcode->NumSrcRegs; ++i) {
if (inst->U.I.SrcReg[i].File == RC_FILE_INPUT)
- c->Program.InputsRead |= 1 << inst->U.I.SrcReg[i].Index;
+ c->Program.InputsRead |= 1U << inst->U.I.SrcReg[i].Index;
}
if (opcode->HasDstReg) {
if (inst->U.I.DstReg.File == RC_FILE_OUTPUT)
- c->Program.OutputsWritten |= 1 << inst->U.I.DstReg.Index;
+ c->Program.OutputsWritten |= 1U << inst->U.I.DstReg.Index;
}
}
}
{
struct rc_instruction * inst;
- c->Program.InputsRead &= ~(1 << input);
+ c->Program.InputsRead &= ~(1U << input);
for(inst = c->Program.Instructions.Next; inst != &c->Program.Instructions; inst = inst->Next) {
const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode);
inst->U.I.SrcReg[i].Abs = new_input.Abs;
}
- c->Program.InputsRead |= 1 << new_input.Index;
+ c->Program.InputsRead |= 1U << new_input.Index;
}
}
}
{
struct rc_instruction * inst;
- c->Program.OutputsWritten &= ~(1 << output);
+ c->Program.OutputsWritten &= ~(1U << output);
for(inst = c->Program.Instructions.Next; inst != &c->Program.Instructions; inst = inst->Next) {
const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode);
inst->U.I.DstReg.Index = new_output;
inst->U.I.DstReg.WriteMask &= writemask;
- c->Program.OutputsWritten |= 1 << new_output;
+ c->Program.OutputsWritten |= 1U << new_output;
}
}
}
inst->U.I.SrcReg[0].Index = tempreg;
inst->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_XYZW;
- c->Program.OutputsWritten |= 1 << dup_output;
+ c->Program.OutputsWritten |= 1U << dup_output;
}
struct rc_instruction * inst_mad;
struct rc_instruction * inst;
- c->Program.InputsRead &= ~(1 << wpos);
- c->Program.InputsRead |= 1 << new_input;
+ c->Program.InputsRead &= ~(1U << wpos);
+ c->Program.InputsRead |= 1U << new_input;
/* perspective divide */
inst_rcp = rc_insert_new_instruction(c, &c->Program.Instructions);
/* ARB_shadow & EXT_shadow_funcs */
if (inst->U.I.Opcode != RC_OPCODE_KIL &&
- ((c->Program.ShadowSamplers & (1 << inst->U.I.TexSrcUnit)) ||
+ ((c->Program.ShadowSamplers & (1U << inst->U.I.TexSrcUnit)) ||
(compiler->state.unit[inst->U.I.TexSrcUnit].compare_mode_enabled))) {
rc_compare_func comparefunc = compiler->state.unit[inst->U.I.TexSrcUnit].texture_compare_func;
if (r300->textures_state.dirty) {
/* ...textures... */
for (i = 0; i < texstate->count; i++) {
- if (!(texstate->tx_enable & (1 << i))) {
+ if (!(texstate->tx_enable & (1U << i))) {
continue;
}
#define R300_VAP_PSC_SGN_NORM_CNTL 0x21dc
# define SGN_NORM_ZERO 0
# define SGN_NORM_ZERO_CLAMP_MINUS_ONE 1
-# define SGN_NORM_NO_ZERO 2
+# define SGN_NORM_NO_ZERO 2U
# define R300_SGN_NORM_NO_ZERO (SGN_NORM_NO_ZERO | \
(SGN_NORM_NO_ZERO << 2) | (SGN_NORM_NO_ZERO << 4) | \
(SGN_NORM_NO_ZERO << 6) | (SGN_NORM_NO_ZERO << 8) | \
# define R500_RS_COL_PTR(x) ((x) << 24)
# define R500_RS_COL_FMT(x) ((x) << 27)
/* gap */
-#define R500_RS_IP_OFFSET_DIS (0 << 31)
-#define R500_RS_IP_OFFSET_EN (1 << 31)
+#define R500_RS_IP_OFFSET_DIS (0U << 31)
+#define R500_RS_IP_OFFSET_EN (1U << 31)
/* gap */
# define R300_ALU_OUTC_MOD_DIV8 (6 << R300_ALU_OUTC_MOD_SHIFT)
# define R300_ALU_OUTC_CLAMP (1 << 30)
-# define R300_ALU_INSERT_NOP (1 << 31)
+# define R300_ALU_INSERT_NOP (1U << 31)
#define R300_US_ALU_ALPHA_INST_0 0x49C0
# define R300_ALU_ARGA_SRC0C_X 0
# define R300_DISCARD_SRC_PIXELS_SRC_COLOR_1 (5 << 3)
# define R300_DISCARD_SRC_PIXELS_SRC_ALPHA_COLOR_1 (6 << 3)
# define R500_SRC_ALPHA_0_NO_READ (1 << 30)
-# define R500_SRC_ALPHA_1_NO_READ (1 << 31)
+# define R500_SRC_ALPHA_1_NO_READ (1U << 31)
/* the following are shared between CBLEND and ABLEND */
# define R300_FCN_MASK (3 << 12)
# define R500_FC_KBOOL(x) (x)
#define R500_US_FC_CTRL 0x4624
# define R500_FC_TEST_EN (1 << 30)
-# define R500_FC_FULL_FC_EN (1 << 31)
+# define R500_FC_FULL_FC_EN (1U << 31)
#define R500_US_FC_INST_0 0x9800
# define R500_FC_OP_JUMP (0 << 0)
# define R500_FC_OP_LOOP (1 << 0)
#define R300_PACKET3_INDX_BUFFER 0x00003300
# define R300_INDX_BUFFER_DST_SHIFT 0
# define R300_INDX_BUFFER_SKIP_SHIFT 16
-# define R300_INDX_BUFFER_ONE_REG_WR (1<<31)
+# define R300_INDX_BUFFER_ONE_REG_WR (1U << 31)
/* Same as R300_PACKET3_3D_DRAW_VBUF but without VAP_VTX_FMT */
#define R300_PACKET3_3D_DRAW_VBUF_2 0x00003400
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++;
}
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;
}
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);
(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];
case TGSI_TEXTURE_SHADOW1D:
dst->U.I.TexSrcTarget = RC_TEXTURE_1D;
dst->U.I.TexShadow = 1;
- *shadowSamplers |= 1 << dst->U.I.TexSrcUnit;
+ *shadowSamplers |= 1U << dst->U.I.TexSrcUnit;
break;
case TGSI_TEXTURE_SHADOW2D:
dst->U.I.TexSrcTarget = RC_TEXTURE_2D;
dst->U.I.TexShadow = 1;
- *shadowSamplers |= 1 << dst->U.I.TexSrcUnit;
+ *shadowSamplers |= 1U << dst->U.I.TexSrcUnit;
break;
case TGSI_TEXTURE_SHADOWRECT:
dst->U.I.TexSrcTarget = RC_TEXTURE_RECT;
dst->U.I.TexShadow = 1;
- *shadowSamplers |= 1 << dst->U.I.TexSrcUnit;
+ *shadowSamplers |= 1U << dst->U.I.TexSrcUnit;
break;
case TGSI_TEXTURE_1D_ARRAY:
dst->U.I.TexSrcTarget = RC_TEXTURE_1D_ARRAY;
case TGSI_TEXTURE_SHADOW1D_ARRAY:
dst->U.I.TexSrcTarget = RC_TEXTURE_1D_ARRAY;
dst->U.I.TexShadow = 1;
- *shadowSamplers |= 1 << dst->U.I.TexSrcUnit;
+ *shadowSamplers |= 1U << dst->U.I.TexSrcUnit;
break;
case TGSI_TEXTURE_SHADOW2D_ARRAY:
dst->U.I.TexSrcTarget = RC_TEXTURE_2D_ARRAY;
dst->U.I.TexShadow = 1;
- *shadowSamplers |= 1 << dst->U.I.TexSrcUnit;
+ *shadowSamplers |= 1U << dst->U.I.TexSrcUnit;
break;
case TGSI_TEXTURE_SHADOWCUBE:
dst->U.I.TexSrcTarget = RC_TEXTURE_CUBE;
dst->U.I.TexShadow = 1;
- *shadowSamplers |= 1 << dst->U.I.TexSrcUnit;
+ *shadowSamplers |= 1U << dst->U.I.TexSrcUnit;
break;
}
dst->U.I.TexSwizzle = RC_SWIZZLE_XYZW;