r600/sfn: Prepare StreamOut instruction for pre EG opcodes
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Filip Gawin <filip@gawin.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
This commit is contained in:
@@ -586,9 +586,8 @@ void AssamblerVisitor::visit(const StreamOutInstr& instr)
|
||||
output.burst_count = instr.burst_count();
|
||||
output.array_size = instr.array_size();
|
||||
output.comp_mask = instr.comp_mask();
|
||||
output.op = instr.op();
|
||||
output.op = instr.op(m_shader->bc.gfx_level);
|
||||
|
||||
assert(output.op >= CF_OP_MEM_STREAM0_BUF0 && output.op <= CF_OP_MEM_STREAM3_BUF3);
|
||||
|
||||
if (r600_bytecode_add_output(m_bc, &output)) {
|
||||
R600_ERR("shader_from_nir: Error creating stream output instruction\n");
|
||||
|
@@ -280,16 +280,21 @@ StreamOutInstr::StreamOutInstr(const RegisterVec4& value, int num_components,
|
||||
{
|
||||
}
|
||||
|
||||
unsigned StreamOutInstr::op() const
|
||||
unsigned StreamOutInstr::op(amd_gfx_level gfx_level) const
|
||||
{
|
||||
int op = 0;
|
||||
switch (m_output_buffer) {
|
||||
case 0: op = CF_OP_MEM_STREAM0_BUF0; break;
|
||||
case 1: op = CF_OP_MEM_STREAM0_BUF1; break;
|
||||
case 2: op = CF_OP_MEM_STREAM0_BUF2; break;
|
||||
case 3: op = CF_OP_MEM_STREAM0_BUF3; break;
|
||||
if (gfx_level >= EVERGREEN) {
|
||||
switch (m_output_buffer) {
|
||||
case 0: op = CF_OP_MEM_STREAM0_BUF0; break;
|
||||
case 1: op = CF_OP_MEM_STREAM0_BUF1; break;
|
||||
case 2: op = CF_OP_MEM_STREAM0_BUF2; break;
|
||||
case 3: op = CF_OP_MEM_STREAM0_BUF3; break;
|
||||
}
|
||||
return 4 * m_stream + op;
|
||||
} else {
|
||||
assert(m_stream == 0);
|
||||
return CF_OP_MEM_STREAM0 + m_output_buffer;
|
||||
}
|
||||
return 4 * m_stream + op;
|
||||
}
|
||||
|
||||
bool StreamOutInstr::is_equal_to(const StreamOutInstr& oth) const
|
||||
|
@@ -132,7 +132,7 @@ public:
|
||||
int array_base() const { return m_array_base;}
|
||||
int array_size() const { return m_array_size;}
|
||||
int comp_mask() const { return m_writemask;}
|
||||
unsigned op() const;
|
||||
unsigned op(amd_gfx_level gfx_level) const;
|
||||
|
||||
bool is_equal_to(const StreamOutInstr& lhs) const;
|
||||
|
||||
|
Reference in New Issue
Block a user