mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
radeonsi: switch to v*i8 for resources and samplers v2
v2: remove unrelated changes Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
This commit is contained in:
parent
2cb54833d0
commit
de80e560bc
1 changed files with 12 additions and 18 deletions
|
|
@ -84,10 +84,9 @@ static struct si_shader_context * si_shader_context(
|
||||||
|
|
||||||
enum sgpr_type {
|
enum sgpr_type {
|
||||||
SGPR_CONST_PTR_F32,
|
SGPR_CONST_PTR_F32,
|
||||||
SGPR_CONST_PTR_V4I32,
|
SGPR_CONST_PTR_V16I8,
|
||||||
SGPR_CONST_PTR_V8I32,
|
SGPR_CONST_PTR_V32I8,
|
||||||
SGPR_I32,
|
SGPR_I32
|
||||||
SGPR_I64
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -149,22 +148,17 @@ static LLVMValueRef use_sgpr(
|
||||||
ret_type = LLVMInt32TypeInContext(gallivm->context);
|
ret_type = LLVMInt32TypeInContext(gallivm->context);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SGPR_I64:
|
case SGPR_CONST_PTR_V16I8:
|
||||||
assert(sgpr % 2 == 0);
|
assert(sgpr % 2 == 0);
|
||||||
ret_type= LLVMInt64TypeInContext(gallivm->context);
|
ret_type = LLVMInt8TypeInContext(gallivm->context);
|
||||||
break;
|
ret_type = LLVMVectorType(ret_type, 16);
|
||||||
|
|
||||||
case SGPR_CONST_PTR_V4I32:
|
|
||||||
assert(sgpr % 2 == 0);
|
|
||||||
ret_type = LLVMInt32TypeInContext(gallivm->context);
|
|
||||||
ret_type = LLVMVectorType(ret_type, 4);
|
|
||||||
ret_type = LLVMPointerType(ret_type, CONST_ADDR_SPACE);
|
ret_type = LLVMPointerType(ret_type, CONST_ADDR_SPACE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SGPR_CONST_PTR_V8I32:
|
case SGPR_CONST_PTR_V32I8:
|
||||||
assert(sgpr % 2 == 0);
|
assert(sgpr % 2 == 0);
|
||||||
ret_type = LLVMInt32TypeInContext(gallivm->context);
|
ret_type = LLVMInt8TypeInContext(gallivm->context);
|
||||||
ret_type = LLVMVectorType(ret_type, 8);
|
ret_type = LLVMVectorType(ret_type, 32);
|
||||||
ret_type = LLVMPointerType(ret_type, CONST_ADDR_SPACE);
|
ret_type = LLVMPointerType(ret_type, CONST_ADDR_SPACE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -197,7 +191,7 @@ static void declare_input_vs(
|
||||||
unsigned chan;
|
unsigned chan;
|
||||||
|
|
||||||
/* Load the T list */
|
/* Load the T list */
|
||||||
t_list_ptr = use_sgpr(base->gallivm, SGPR_CONST_PTR_V4I32, SI_SGPR_VERTEX_BUFFER);
|
t_list_ptr = use_sgpr(base->gallivm, SGPR_CONST_PTR_V16I8, SI_SGPR_VERTEX_BUFFER);
|
||||||
|
|
||||||
t_offset = lp_build_const_int32(base->gallivm, input_index);
|
t_offset = lp_build_const_int32(base->gallivm, input_index);
|
||||||
|
|
||||||
|
|
@ -944,14 +938,14 @@ static void tex_fetch_args(
|
||||||
emit_data->args[1] = lp_build_gather_values(gallivm, address, count);
|
emit_data->args[1] = lp_build_gather_values(gallivm, address, count);
|
||||||
|
|
||||||
/* Resource */
|
/* Resource */
|
||||||
ptr = use_sgpr(bld_base->base.gallivm, SGPR_CONST_PTR_V8I32, SI_SGPR_RESOURCE);
|
ptr = use_sgpr(bld_base->base.gallivm, SGPR_CONST_PTR_V32I8, SI_SGPR_RESOURCE);
|
||||||
offset = lp_build_const_int32(bld_base->base.gallivm,
|
offset = lp_build_const_int32(bld_base->base.gallivm,
|
||||||
emit_data->inst->Src[1].Register.Index);
|
emit_data->inst->Src[1].Register.Index);
|
||||||
emit_data->args[2] = build_indexed_load(bld_base->base.gallivm,
|
emit_data->args[2] = build_indexed_load(bld_base->base.gallivm,
|
||||||
ptr, offset);
|
ptr, offset);
|
||||||
|
|
||||||
/* Sampler */
|
/* Sampler */
|
||||||
ptr = use_sgpr(bld_base->base.gallivm, SGPR_CONST_PTR_V4I32, SI_SGPR_SAMPLER);
|
ptr = use_sgpr(bld_base->base.gallivm, SGPR_CONST_PTR_V16I8, SI_SGPR_SAMPLER);
|
||||||
offset = lp_build_const_int32(bld_base->base.gallivm,
|
offset = lp_build_const_int32(bld_base->base.gallivm,
|
||||||
emit_data->inst->Src[1].Register.Index);
|
emit_data->inst->Src[1].Register.Index);
|
||||||
emit_data->args[3] = build_indexed_load(bld_base->base.gallivm,
|
emit_data->args[3] = build_indexed_load(bld_base->base.gallivm,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue