r600/sfn: Fix ssbo resource offset for buffer loads

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142>
This commit is contained in:
Gert Wollny 2020-09-30 20:28:10 +02:00 committed by Marge Bot
parent ed66eafb6d
commit 86254134b3
2 changed files with 3 additions and 1 deletions

View File

@ -301,7 +301,8 @@ bool EmitSSBOInstruction::emit_load_ssbo(const nir_intrinsic_instr* instr)
/* TODO fix resource index */
auto ir = new FetchInstruction(dest, addr_temp,
R600_IMAGE_REAL_RESOURCE_OFFSET, from_nir(instr->src[0], 0),
R600_IMAGE_REAL_RESOURCE_OFFSET + m_ssbo_image_offset
, from_nir(instr->src[0], 0),
formats[nir_dest_num_components(instr->dest) - 1], vtx_nf_int);
ir->set_dest_swizzle(dest_swt[nir_dest_num_components(instr->dest) - 1]);
ir->set_flag(vtx_use_tc);

View File

@ -408,6 +408,7 @@ void ShaderFromNirProcessor::emit_instruction_internal(Instruction *ir)
void ShaderFromNirProcessor::emit_shader_start()
{
/* placeholder, may become an abstract method */
m_ssbo_instr.set_ssbo_offset(m_image_count);
}
bool ShaderFromNirProcessor::emit_jump_instruction(nir_jump_instr *instr)