mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
r600/sfn: get rid of the method to get the index mode
Since we always split the index load we can query the value directly without checking whether it was lowered. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25159>
This commit is contained in:
parent
116a389c12
commit
b5a79000eb
1 changed files with 3 additions and 23 deletions
|
|
@ -81,8 +81,6 @@ public:
|
|||
PVirtualValue copy_src(r600_bytecode_alu_src& src, const VirtualValue& s);
|
||||
|
||||
EBufferIndexMode emit_index_reg(const VirtualValue& addr, unsigned idx);
|
||||
EBufferIndexMode get_index_mode(const Resource& res,
|
||||
unsigned idx);
|
||||
|
||||
void emit_endif();
|
||||
void emit_else();
|
||||
|
|
@ -715,8 +713,6 @@ AssamblerVisitor::visit(const FetchInstr& fetch_instr)
|
|||
|
||||
clear_states(clear_flags | sf_alu);
|
||||
|
||||
EBufferIndexMode index_mode = get_index_mode(fetch_instr, 0);
|
||||
|
||||
if (fetch_instr.has_fetch_flag(FetchInstr::wait_ack))
|
||||
emit_wait_ack();
|
||||
|
||||
|
|
@ -756,7 +752,7 @@ AssamblerVisitor::visit(const FetchInstr& fetch_instr)
|
|||
vtx.num_format_all = fetch_instr.num_format(); /* NUM_FORMAT_SCALED */
|
||||
vtx.format_comp_all = fetch_instr.has_fetch_flag(FetchInstr::format_comp_signed);
|
||||
vtx.endian = fetch_instr.endian_swap();
|
||||
vtx.buffer_index_mode = index_mode;
|
||||
vtx.buffer_index_mode = fetch_instr.resource_index_mode();
|
||||
vtx.offset = fetch_instr.src_offset();
|
||||
vtx.indexed = fetch_instr.has_fetch_flag(FetchInstr::indexed);
|
||||
vtx.uncached = fetch_instr.has_fetch_flag(FetchInstr::uncached);
|
||||
|
|
@ -836,9 +832,6 @@ AssamblerVisitor::visit(const RatInstr& instr)
|
|||
if (m_ack_suggested /*&& instr.has_instr_flag(Instr::ack_rat_return_write)*/)
|
||||
emit_wait_ack();
|
||||
|
||||
|
||||
EBufferIndexMode index_mode = get_index_mode(instr, 1);
|
||||
|
||||
int rat_idx = instr.resource_id();
|
||||
|
||||
memset(&gds, 0, sizeof(struct r600_bytecode_gds));
|
||||
|
|
@ -847,7 +840,7 @@ AssamblerVisitor::visit(const RatInstr& instr)
|
|||
auto cf = m_bc->cf_last;
|
||||
cf->rat.id = rat_idx + m_shader->rat_base;
|
||||
cf->rat.inst = instr.rat_op();
|
||||
cf->rat.index_mode = index_mode;
|
||||
cf->rat.index_mode = instr.resource_index_mode();
|
||||
cf->output.type = instr.need_ack() ? 3 : 1;
|
||||
cf->output.gpr = instr.data_gpr();
|
||||
cf->output.index_gpr = instr.index_gpr();
|
||||
|
|
@ -1005,13 +998,11 @@ AssamblerVisitor::visit(const GDSInstr& instr)
|
|||
{
|
||||
struct r600_bytecode_gds gds;
|
||||
|
||||
EBufferIndexMode index_mode = get_index_mode(instr, 0);
|
||||
|
||||
memset(&gds, 0, sizeof(struct r600_bytecode_gds));
|
||||
|
||||
gds.op = ds_opcode_map.at(instr.opcode());
|
||||
gds.uav_id = instr.resource_id();
|
||||
gds.uav_index_mode = index_mode;
|
||||
gds.uav_index_mode = instr.resource_index_mode();
|
||||
gds.src_gpr = instr.src().sel();
|
||||
|
||||
gds.src_sel_x = instr.src()[0]->chan() < 7 ? instr.src()[0]->chan() : 4;
|
||||
|
|
@ -1235,17 +1226,6 @@ AssamblerVisitor::copy_dst(r600_bytecode_alu_dst& dst, const Register& d, bool w
|
|||
return true;
|
||||
}
|
||||
|
||||
EBufferIndexMode AssamblerVisitor::get_index_mode(const Resource& res,
|
||||
unsigned idx)
|
||||
{
|
||||
EBufferIndexMode index_mode = res.resource_index_mode();
|
||||
|
||||
if (index_mode == bim_none && res.resource_offset())
|
||||
index_mode = emit_index_reg(*res.resource_offset(), idx);
|
||||
|
||||
return index_mode;
|
||||
}
|
||||
|
||||
void
|
||||
AssamblerVisitor::emit_wait_ack()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue