diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h index c4d5d182815..6f18d057feb 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h @@ -221,7 +221,7 @@ struct lp_build_sampler_aos LLVMValueRef (*emit_fetch_texel)(const struct lp_build_sampler_aos *sampler, struct lp_build_context *bld, - unsigned target, /* TGSI_TEXTURE_* */ + enum tgsi_texture_type target, unsigned unit, LLVMValueRef coords, const struct lp_derivatives derivs, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index 03d60e35124..aa10100ab05 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -1971,7 +1971,7 @@ emit_store( } static unsigned -tgsi_to_pipe_tex_target(unsigned tgsi_target) +tgsi_to_pipe_tex_target(enum tgsi_texture_type tgsi_target) { switch (tgsi_target) { case TGSI_TEXTURE_BUFFER: @@ -2609,7 +2609,8 @@ emit_size_query( struct lp_build_tgsi_soa_context *bld, unsigned has_lod; unsigned i; unsigned unit = inst->Src[1].Register.Index; - unsigned target, pipe_target; + enum tgsi_texture_type target; + enum pipe_texture_target pipe_target; struct lp_sampler_size_query_params params; if (is_sviewinfo) { @@ -3371,9 +3372,10 @@ lod_emit( FALSE, LP_SAMPLER_OP_LODQ, emit_data->output); } -static void target_to_dims_layer(unsigned target, - unsigned *dims, - unsigned *layer_coord) +static void +target_to_dims_layer(enum tgsi_texture_type target, + unsigned *dims, + unsigned *layer_coord) { *layer_coord = 0; switch (target) { @@ -3416,7 +3418,7 @@ img_load_emit( LLVMValueRef coords[5]; LLVMValueRef coord_undef = LLVMGetUndef(bld->bld_base.base.int_vec_type); unsigned dims; - unsigned target = emit_data->inst->Memory.Texture; + enum tgsi_texture_type target = emit_data->inst->Memory.Texture; unsigned layer_coord; target_to_dims_layer(target, &dims, &layer_coord); @@ -3565,7 +3567,7 @@ img_store_emit( LLVMValueRef coords[5]; LLVMValueRef coord_undef = LLVMGetUndef(bld->bld_base.base.int_vec_type); unsigned dims; - unsigned target = emit_data->inst->Memory.Texture; + enum tgsi_texture_type target = emit_data->inst->Memory.Texture; unsigned layer_coord; target_to_dims_layer(target, &dims, &layer_coord); @@ -3684,7 +3686,7 @@ resq_emit( assert(bufreg->Register.File == TGSI_FILE_BUFFER || bufreg->Register.File == TGSI_FILE_IMAGE); if (bufreg->Register.File == TGSI_FILE_IMAGE) { - unsigned target = emit_data->inst->Memory.Texture; + enum tgsi_texture_type target = emit_data->inst->Memory.Texture; struct lp_sampler_size_query_params params = { 0 }; params.int_type = bld->bld_base.int_bld.type; params.texture_unit = buf; @@ -3715,7 +3717,7 @@ img_atomic_emit( LLVMValueRef coord_undef = LLVMGetUndef(bld->bld_base.base.int_vec_type); unsigned dims; unsigned layer_coord; - unsigned target = emit_data->inst->Memory.Texture; + enum tgsi_texture_type target = emit_data->inst->Memory.Texture; target_to_dims_layer(target, &dims, &layer_coord); diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index c30d9015ca8..617a9bac429 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -3740,7 +3740,7 @@ generate_variant(struct llvmpipe_context *lp, assert(samp0); const enum pipe_format texture_format = samp0->texture_state.format; - const unsigned target = samp0->texture_state.target; + const enum pipe_texture_target target = samp0->texture_state.target; const unsigned min_img_filter = samp0->sampler_state.min_img_filter; const unsigned mag_img_filter = samp0->sampler_state.mag_img_filter; diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c b/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c index 2f200fa3522..41bbe84dbe2 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c @@ -89,7 +89,7 @@ struct linear_sampler static LLVMValueRef emit_fetch_texel_linear(const struct lp_build_sampler_aos *base, struct lp_build_context *bld, - unsigned target, /* TGSI_TEXTURE_* */ + enum tgsi_texture_type target, unsigned unit, LLVMValueRef coords, const struct lp_derivatives derivs,