(*width)(const struct lp_sampler_dynamic_state *state,
struct gallivm_state *gallivm,
LLVMValueRef context_ptr,
- unsigned texture_unit);
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
/** Obtain the base texture height (returns int32) */
LLVMValueRef
(*height)(const struct lp_sampler_dynamic_state *state,
struct gallivm_state *gallivm,
LLVMValueRef context_ptr,
- unsigned texture_unit);
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
/** Obtain the base texture depth (or array size) (returns int32) */
LLVMValueRef
(*depth)(const struct lp_sampler_dynamic_state *state,
struct gallivm_state *gallivm,
LLVMValueRef context_ptr,
- unsigned texture_unit);
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
/** Obtain the first mipmap level (base level) (returns int32) */
LLVMValueRef
(*first_level)(const struct lp_sampler_dynamic_state *state,
struct gallivm_state *gallivm,
LLVMValueRef context_ptr,
- unsigned texture_unit);
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
/** Obtain the number of mipmap levels minus one (returns int32) */
LLVMValueRef
(*last_level)(const struct lp_sampler_dynamic_state *state,
struct gallivm_state *gallivm,
LLVMValueRef context_ptr,
- unsigned texture_unit);
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
/** Obtain stride in bytes between image rows/blocks (returns int32) */
LLVMValueRef
(*row_stride)(const struct lp_sampler_dynamic_state *state,
struct gallivm_state *gallivm,
LLVMValueRef context_ptr,
- unsigned texture_unit);
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
/** Obtain stride in bytes between image slices (returns int32) */
LLVMValueRef
(*img_stride)(const struct lp_sampler_dynamic_state *state,
struct gallivm_state *gallivm,
LLVMValueRef context_ptr,
- unsigned texture_unit);
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
/** Obtain pointer to base of texture */
LLVMValueRef
(*base_ptr)(const struct lp_sampler_dynamic_state *state,
struct gallivm_state *gallivm,
LLVMValueRef context_ptr,
- unsigned texture_unit);
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
/** Obtain pointer to array of mipmap offsets */
LLVMValueRef
(*mip_offsets)(const struct lp_sampler_dynamic_state *state,
struct gallivm_state *gallivm,
LLVMValueRef context_ptr,
- unsigned texture_unit);
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
/** Obtain number of samples (returns int32) */
LLVMValueRef
(*num_samples)(const struct lp_sampler_dynamic_state *state,
struct gallivm_state *gallivm,
LLVMValueRef context_ptr,
- unsigned texture_unit);
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
/** Obtain multisample stride (returns int32) */
LLVMValueRef
(*sample_stride)(const struct lp_sampler_dynamic_state *state,
struct gallivm_state *gallivm,
LLVMValueRef context_ptr,
- unsigned texture_unit);
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
/* These are callbacks for sampler state */
struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
num_layers = bld->dynamic_state->depth(bld->dynamic_state, bld->gallivm,
- bld->context_ptr, texture_unit);
+ bld->context_ptr, texture_unit, NULL);
if (out_of_bounds) {
LLVMValueRef out1, out;
last_level = bld->dynamic_state->last_level(bld->dynamic_state,
bld->gallivm,
bld->context_ptr,
- texture_index);
+ texture_index, NULL);
first_level = bld->dynamic_state->first_level(bld->dynamic_state,
bld->gallivm,
bld->context_ptr,
- texture_index);
+ texture_index, NULL);
last_level = lp_build_sub(&bld->int_bld, last_level, first_level);
last_level = lp_build_int_to_float(&bld->float_bld, last_level);
last_level = lp_build_broadcast_scalar(&bld->lodf_bld, last_level);
/* always use mip level 0 */
first_level = bld->dynamic_state->first_level(bld->dynamic_state,
bld->gallivm, bld->context_ptr,
- texture_index);
+ texture_index, NULL);
first_level = lp_build_broadcast_scalar(&bld->leveli_bld, first_level);
*ilevel0 = first_level;
break;
assert(bld->num_mips == 1);
if (bld->static_texture_state->target != PIPE_BUFFER) {
ilevel = bld->dynamic_state->first_level(bld->dynamic_state, bld->gallivm,
- bld->context_ptr, texture_unit);
+ bld->context_ptr, texture_unit, NULL);
}
else {
ilevel = lp_build_const_int32(bld->gallivm, 0);
if (bld->fetch_ms) {
LLVMValueRef num_samples;
num_samples = bld->dynamic_state->num_samples(bld->dynamic_state, bld->gallivm,
- bld->context_ptr, texture_unit);
+ bld->context_ptr, texture_unit, NULL);
out1 = lp_build_cmp(int_coord_bld, PIPE_FUNC_LESS, ms_index, int_coord_bld->zero);
out_of_bounds = lp_build_or(int_coord_bld, out_of_bounds, out1);
out1 = lp_build_cmp(int_coord_bld, PIPE_FUNC_GEQUAL, ms_index, lp_build_broadcast_scalar(int_coord_bld, num_samples));
/* Get the dynamic state */
tex_width = dynamic_state->width(dynamic_state, gallivm,
- context_ptr, texture_index);
+ context_ptr, texture_index, NULL);
bld.row_stride_array = dynamic_state->row_stride(dynamic_state, gallivm,
- context_ptr, texture_index);
+ context_ptr, texture_index, NULL);
bld.img_stride_array = dynamic_state->img_stride(dynamic_state, gallivm,
- context_ptr, texture_index);
+ context_ptr, texture_index, NULL);
bld.base_ptr = dynamic_state->base_ptr(dynamic_state, gallivm,
- context_ptr, texture_index);
+ context_ptr, texture_index, NULL);
bld.mip_offsets = dynamic_state->mip_offsets(dynamic_state, gallivm,
- context_ptr, texture_index);
+ context_ptr, texture_index, NULL);
if (fetch_ms)
bld.sample_stride = lp_build_broadcast_scalar(&bld.int_coord_bld, dynamic_state->sample_stride(dynamic_state, gallivm,
- context_ptr, texture_index));
+ context_ptr, texture_index, NULL));
/* Note that mip_offsets is an array[level] of offsets to texture images */
if (dynamic_state->cache_ptr && thread_data_ptr) {
if (dims >= 2) {
LLVMValueRef tex_height =
dynamic_state->height(dynamic_state, gallivm,
- context_ptr, texture_index);
+ context_ptr, texture_index, NULL);
bld.int_size = LLVMBuildInsertElement(builder, bld.int_size,
tex_height,
LLVMConstInt(i32t, 1, 0), "");
if (dims >= 3) {
LLVMValueRef tex_depth =
dynamic_state->depth(dynamic_state, gallivm, context_ptr,
- texture_index);
+ texture_index, NULL);
bld.int_size = LLVMBuildInsertElement(builder, bld.int_size,
tex_depth,
LLVMConstInt(i32t, 2, 0), "");
if (params->samples_only) {
params->sizes_out[0] = lp_build_broadcast(gallivm, lp_build_vec_type(gallivm, params->int_type),
dynamic_state->num_samples(dynamic_state, gallivm,
- context_ptr, texture_unit));
+ context_ptr, texture_unit, NULL));
return;
}
if (params->explicit_lod) {
lod = LLVMBuildExtractElement(gallivm->builder, params->explicit_lod,
lp_build_const_int32(gallivm, 0), "");
first_level = dynamic_state->first_level(dynamic_state, gallivm,
- context_ptr, texture_unit);
+ context_ptr, texture_unit, NULL);
level = LLVMBuildAdd(gallivm->builder, lod, first_level, "level");
lod = lp_build_broadcast_scalar(&bld_int_vec4, level);
} else {
size = LLVMBuildInsertElement(gallivm->builder, size,
dynamic_state->width(dynamic_state, gallivm,
- context_ptr, texture_unit),
+ context_ptr, texture_unit, NULL),
lp_build_const_int32(gallivm, 0), "");
if (dims >= 2) {
size = LLVMBuildInsertElement(gallivm->builder, size,
dynamic_state->height(dynamic_state, gallivm,
- context_ptr, texture_unit),
+ context_ptr, texture_unit, NULL),
lp_build_const_int32(gallivm, 1), "");
}
if (dims >= 3) {
size = LLVMBuildInsertElement(gallivm->builder, size,
dynamic_state->depth(dynamic_state, gallivm,
- context_ptr, texture_unit),
+ context_ptr, texture_unit, NULL),
lp_build_const_int32(gallivm, 2), "");
}
if (has_array) {
LLVMValueRef layers = dynamic_state->depth(dynamic_state, gallivm,
- context_ptr, texture_unit);
+ context_ptr, texture_unit, NULL);
if (target == PIPE_TEXTURE_CUBE_ARRAY) {
/*
* It looks like GL wants number of cubes, d3d10.1 has it undefined?
/* everything is scalar for now */
lp_build_context_init(&leveli_bld, gallivm, lp_type_int_vec(32, 32));
last_level = dynamic_state->last_level(dynamic_state, gallivm,
- context_ptr, texture_unit);
+ context_ptr, texture_unit, NULL);
out = lp_build_cmp(&leveli_bld, PIPE_FUNC_LESS, level, first_level);
out1 = lp_build_cmp(&leveli_bld, PIPE_FUNC_GREATER, level, last_level);
LLVMValueRef last_level;
last_level = dynamic_state->last_level(dynamic_state, gallivm,
- context_ptr, texture_unit);
+ context_ptr, texture_unit, NULL);
num_levels = lp_build_sub(&bld_int_scalar, last_level, first_level);
num_levels = lp_build_add(&bld_int_scalar, num_levels, bld_int_scalar.one);
}
LLVMValueRef offset, i, j;
LLVMValueRef row_stride = dynamic_state->row_stride(dynamic_state, gallivm,
- params->context_ptr, params->image_index);
+ params->context_ptr, params->image_index, NULL);
LLVMValueRef img_stride = dynamic_state->img_stride(dynamic_state, gallivm,
- params->context_ptr, params->image_index);
+ params->context_ptr, params->image_index, NULL);
LLVMValueRef base_ptr = dynamic_state->base_ptr(dynamic_state, gallivm,
- params->context_ptr, params->image_index);
+ params->context_ptr, params->image_index, NULL);
LLVMValueRef width = dynamic_state->width(dynamic_state, gallivm,
- params->context_ptr, params->image_index);
+ params->context_ptr, params->image_index, NULL);
LLVMValueRef height = dynamic_state->height(dynamic_state, gallivm,
- params->context_ptr, params->image_index);
+ params->context_ptr, params->image_index, NULL);
LLVMValueRef depth = dynamic_state->depth(dynamic_state, gallivm,
- params->context_ptr, params->image_index);
+ params->context_ptr, params->image_index, NULL);
LLVMValueRef num_samples = NULL, sample_stride = NULL;
if (ms_index) {
num_samples = dynamic_state->num_samples(dynamic_state, gallivm,
- params->context_ptr, params->image_index);
+ params->context_ptr, params->image_index, NULL);
sample_stride = dynamic_state->sample_stride(dynamic_state, gallivm,
- params->context_ptr, params->image_index);
+ params->context_ptr, params->image_index, NULL);
}
boolean layer_coord = has_layer_coord(target);