mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 22:10:10 +01:00
pan/bi: Use new packing
...and remove the old manual code. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6749>
This commit is contained in:
parent
3fadd82346
commit
2ff53879f2
4 changed files with 362 additions and 1204 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -187,10 +187,8 @@ bi_load_with_r61(enum bi_class T, nir_intrinsic_instr *instr)
|
||||||
bi_instruction ld = bi_load(T, instr);
|
bi_instruction ld = bi_load(T, instr);
|
||||||
ld.src[1] = BIR_INDEX_REGISTER | 61; /* TODO: RA */
|
ld.src[1] = BIR_INDEX_REGISTER | 61; /* TODO: RA */
|
||||||
ld.src[2] = BIR_INDEX_REGISTER | 62;
|
ld.src[2] = BIR_INDEX_REGISTER | 62;
|
||||||
ld.src[3] = 0;
|
|
||||||
ld.src_types[1] = nir_type_uint32;
|
ld.src_types[1] = nir_type_uint32;
|
||||||
ld.src_types[2] = nir_type_uint32;
|
ld.src_types[2] = nir_type_uint32;
|
||||||
ld.src_types[3] = nir_intrinsic_type(instr);
|
|
||||||
ld.format = nir_intrinsic_type(instr);
|
ld.format = nir_intrinsic_type(instr);
|
||||||
return ld;
|
return ld;
|
||||||
}
|
}
|
||||||
|
|
@ -340,7 +338,10 @@ bi_emit_ld_frag_coord(bi_context *ctx, nir_intrinsic_instr *instr)
|
||||||
.dest_type = nir_type_float32,
|
.dest_type = nir_type_float32,
|
||||||
.format = nir_type_float32,
|
.format = nir_type_float32,
|
||||||
.dest = bi_make_temp(ctx),
|
.dest = bi_make_temp(ctx),
|
||||||
.src = { BIR_INDEX_CONSTANT, BIR_INDEX_ZERO },
|
.src = {
|
||||||
|
BIR_INDEX_CONSTANT,
|
||||||
|
BIR_INDEX_PASS | BIFROST_SRC_CONST_LO
|
||||||
|
},
|
||||||
.src_types = { nir_type_uint32, nir_type_uint32 },
|
.src_types = { nir_type_uint32, nir_type_uint32 },
|
||||||
.constant = {
|
.constant = {
|
||||||
.u32 = (i == 0) ? BIFROST_FRAGZ : BIFROST_FRAGW
|
.u32 = (i == 0) ? BIFROST_FRAGZ : BIFROST_FRAGW
|
||||||
|
|
|
||||||
|
|
@ -145,8 +145,9 @@ struct bi_load_vary {
|
||||||
|
|
||||||
struct bi_block;
|
struct bi_block;
|
||||||
|
|
||||||
|
/* Sync with gen-pack.py */
|
||||||
enum bi_cond {
|
enum bi_cond {
|
||||||
BI_COND_ALWAYS,
|
BI_COND_ALWAYS = 0,
|
||||||
BI_COND_LT,
|
BI_COND_LT,
|
||||||
BI_COND_LE,
|
BI_COND_LE,
|
||||||
BI_COND_GE,
|
BI_COND_GE,
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,19 @@ bifrost_gen_disasm_c = custom_target(
|
||||||
capture : true,
|
capture : true,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
bi_generated_pack_h = custom_target(
|
||||||
|
'bi_generated_pack.h',
|
||||||
|
input : ['gen_pack.py', 'ISA.xml'],
|
||||||
|
output : 'bi_generated_pack.h',
|
||||||
|
command : [prog_python, '@INPUT@'],
|
||||||
|
capture : true,
|
||||||
|
)
|
||||||
|
|
||||||
|
idep_bi_generated_pack_h = declare_dependency(
|
||||||
|
sources : [bi_generated_pack_h],
|
||||||
|
include_directories : include_directories('.'),
|
||||||
|
)
|
||||||
|
|
||||||
libpanfrost_bifrost_disasm = static_library(
|
libpanfrost_bifrost_disasm = static_library(
|
||||||
'panfrost_bifrost_disasm',
|
'panfrost_bifrost_disasm',
|
||||||
['disassemble.c', 'bi_print_common.c', bifrost_gen_disasm_c],
|
['disassemble.c', 'bi_print_common.c', bifrost_gen_disasm_c],
|
||||||
|
|
@ -69,7 +82,7 @@ libpanfrost_bifrost = static_library(
|
||||||
'panfrost_bifrost',
|
'panfrost_bifrost',
|
||||||
[libpanfrost_bifrost_files, bifrost_nir_algebraic_c],
|
[libpanfrost_bifrost_files, bifrost_nir_algebraic_c],
|
||||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw],
|
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw],
|
||||||
dependencies: [idep_nir],
|
dependencies: [idep_nir, idep_bi_generated_pack_h],
|
||||||
link_with: [libpanfrost_util, libpanfrost_bifrost_disasm],
|
link_with: [libpanfrost_util, libpanfrost_bifrost_disasm],
|
||||||
c_args : [no_override_init_args],
|
c_args : [no_override_init_args],
|
||||||
gnu_symbol_visibility : 'hidden',
|
gnu_symbol_visibility : 'hidden',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue