llvmpipe: replace 'unsigned' with enum types
Signed-off-by: Brian Paul <brianp@vmware.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>
This commit is contained in:
parent
9bb062bade
commit
4a30155c72
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue