const active_atomic_counter *const first = (active_atomic_counter *) a;
const active_atomic_counter *const second = (active_atomic_counter *) b;
- return int(first->var->data.atomic.offset) - int(second->var->data.atomic.offset);
+ return int(first->var->data.offset) - int(second->var->data.offset);
}
bool
check_atomic_counters_overlap(const ir_variable *x, const ir_variable *y)
{
- return ((x->data.atomic.offset >= y->data.atomic.offset &&
- x->data.atomic.offset < y->data.atomic.offset + y->type->atomic_size()) ||
- (y->data.atomic.offset >= x->data.atomic.offset &&
- y->data.atomic.offset < x->data.atomic.offset + x->type->atomic_size()));
+ return ((x->data.offset >= y->data.offset &&
+ x->data.offset < y->data.offset + y->type->atomic_size()) ||
+ (y->data.offset >= x->data.offset &&
+ y->data.offset < x->data.offset + x->type->atomic_size()));
}
void
ir_variable *var = node->as_variable();
if (var && var->type->contains_atomic()) {
- int offset = var->data.atomic.offset;
+ int offset = var->data.offset;
unsigned uniform_loc = var->data.location;
process_atomic_variable(var->type, prog, &uniform_loc,
var, buffers, num_buffers, &offset, i);
linker_error(prog, "Atomic counter %s declared at offset %d "
"which is already in use.",
buffers[i].counters[j].var->name,
- buffers[i].counters[j].var->data.atomic.offset);
+ buffers[i].counters[j].var->data.offset);
}
}
}
var->data.binding = i;
storage->atomic_buffer_index = i;
- storage->offset = var->data.atomic.offset;
+ storage->offset = var->data.offset;
storage->array_stride = (var->type->is_array() ?
var->type->without_array()->atomic_size() : 0);
if (!var->type->is_matrix())
}
if (var->type->contains_atomic() &&
- var->data.atomic.offset != existing->data.atomic.offset) {
+ var->data.offset != existing->data.offset) {
linker_error(prog, "offset specifications for %s "
"`%s' have differing values\n",
mode_string(var), var->name);
var->data.index = ir->data.index;
var->data.binding = ir->data.binding;
- var->data.atomic.offset = ir->data.atomic.offset;
+ var->data.offset = ir->data.offset;
var->data.image.read_only = ir->data.image_read_only;
var->data.image.write_only = ir->data.image_write_only;
var->data.image.coherent = ir->data.image_coherent;