mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
aco: Use movk for AddressHi bits in vertex prolog
Eliminates a useless extra dword by transforming
s_mov_b32 s47, 0xffff8000 ; beaf03ff ffff8000
to
s_movk_i32 s47, 0x8000 ; b02f8000
which does the same thing.
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15415>
This commit is contained in:
parent
58bd9a379e
commit
ce7966fcb4
1 changed files with 7 additions and 2 deletions
|
|
@ -11855,8 +11855,13 @@ select_vs_prolog(Program* program, const struct radv_vs_prolog_key* key, ac_shad
|
|||
|
||||
bld.sop1(aco_opcode::s_mov_b32, Definition(vertex_buffers, s1),
|
||||
get_arg_fixed(args, args->ac.vertex_buffers));
|
||||
bld.sop1(aco_opcode::s_mov_b32, Definition(vertex_buffers.advance(4), s1),
|
||||
Operand::c32((unsigned)options->address32_hi));
|
||||
if (options->address32_hi >= 0xffff8000 || options->address32_hi <= 0x7fff) {
|
||||
bld.sopk(aco_opcode::s_movk_i32, Definition(vertex_buffers.advance(4), s1),
|
||||
options->address32_hi & 0xFFFF);
|
||||
} else {
|
||||
bld.sop1(aco_opcode::s_mov_b32, Definition(vertex_buffers.advance(4), s1),
|
||||
Operand::c32((unsigned)options->address32_hi));
|
||||
}
|
||||
|
||||
/* calculate vgpr requirements */
|
||||
unsigned num_vgprs = attributes_start.reg() - 256;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue