if (arrays[i] && arrays[i]->Enabled)
{
brw->vb.inputs[i].glarray = arrays[i];
- brw->vb.info.varying |= 1 << i;
+ brw->vb.info.varying |= (GLuint64EXT) 1 << i;
}
else
{
{
GLcontext *ctx = &brw->intel.ctx;
struct intel_context *intel = intel_context(ctx);
- GLuint tmp = brw->vs.prog_data->inputs_read;
+ GLuint64EXT tmp = brw->vs.prog_data->inputs_read;
struct brw_vertex_element_packet vep;
struct brw_array_state vbp;
GLuint i;
*/
while (tmp) {
- GLuint i = ffs(tmp)-1;
+ GLuint i = ffsll(tmp)-1;
struct brw_vertex_element *input = &brw->vb.inputs[i];
- tmp &= ~(1<<i);
+ tmp &= ~((GLuint64EXT)1<<i);
enabled[nr_enabled++] = input;
input->index = i;
*/
c->nr_inputs = 0;
for (i = 0; i < BRW_ATTRIB_MAX; i++) {
- if (c->prog_data.inputs_read & (1<<i)) {
+ if (c->prog_data.inputs_read & ((GLuint64EXT)1<<i)) {
c->nr_inputs++;
c->regs[PROGRAM_INPUT][i] = brw_vec8_grf(reg, 0);
reg++;
}
/* BRW_NEW_INPUT_VARYING */
- for (i = BRW_ATTRIB_MAT_FRONT_AMBIENT ; i < BRW_ATTRIB_INDEX ; i++)
- if (brw->vb.info.varying & (1<<i))
+ for (i = BRW_ATTRIB_MAT_FRONT_AMBIENT ; i < BRW_ATTRIB_MAX ; i++)
+ if (brw->vb.info.varying & ((GLuint64EXT)1<<i))
key->light_material_mask |= 1<<(i-BRW_ATTRIB_MAT_FRONT_AMBIENT);
for (i = 0; i < MAX_LIGHTS; i++) {
static struct ureg register_input( struct tnl_program *p, GLuint input )
{
+ GLuint orig_input = input;
/* Cram the material flags into the generic range. We'll translate
* them back later.
*/
if (input >= BRW_ATTRIB_MAT_FRONT_AMBIENT)
- input -= BRW_ATTRIB_MAT_FRONT_AMBIENT;
+ input -= BRW_ATTRIB_MAT_FRONT_AMBIENT - BRW_ATTRIB_GENERIC0;
assert(input < 32);
p->program->Base.InputsRead |= (1<<input);
- return make_ureg(PROGRAM_INPUT, input);
+ return make_ureg(PROGRAM_INPUT, orig_input);
}
static struct ureg register_output( struct tnl_program *p, GLuint output )