for (unsigned i = 0; i < 3; i++) {
if (instr->const_offset[i] != 0) {
assert(offset_components == 0);
- tex_offset = fs_reg(brw_texture_offset(ctx, instr->const_offset, 3));
+ tex_offset = fs_reg(brw_texture_offset(instr->const_offset, 3));
break;
}
}
* offset, and a non-constant offset.
*/
offset_value =
- fs_reg(brw_texture_offset(ctx, const_offset->value.i,
+ fs_reg(brw_texture_offset(const_offset->value.i,
const_offset->type->vector_elements));
} else {
ir->offset->accept(this);
}
uint32_t
-brw_texture_offset(struct gl_context *ctx, int *offsets,
- unsigned num_components)
+brw_texture_offset(int *offsets, unsigned num_components)
{
- /* If the driver does not support GL_ARB_gpu_shader5, the offset
- * must be constant.
- */
- assert(offsets != NULL || ctx->Extensions.ARB_gpu_shader5);
-
if (!offsets) return 0; /* nonconstant offset; caller will handle it. */
/* Combine all three offsets into a single unsigned dword:
virtual void invalidate_live_intervals() = 0;
};
-uint32_t brw_texture_offset(struct gl_context *ctx, int *offsets,
- unsigned num_components);
+uint32_t brw_texture_offset(int *offsets, unsigned num_components);
#endif /* __cplusplus */
if (ir->offset != NULL && !has_nonconstant_offset) {
inst->offset =
- brw_texture_offset(ctx, ir->offset->as_constant()->value.i,
+ brw_texture_offset(ir->offset->as_constant()->value.i,
ir->offset->type->vector_elements);
}