mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
r600/sfn: Add support for shader_clock
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7973>
This commit is contained in:
parent
d95791bb2e
commit
6c0ce29b04
2 changed files with 12 additions and 0 deletions
|
|
@ -683,6 +683,8 @@ bool ShaderFromNirProcessor::emit_intrinsic_instruction(nir_intrinsic_instr* ins
|
|||
case nir_intrinsic_shared_atomic_exchange:
|
||||
case nir_intrinsic_shared_atomic_comp_swap:
|
||||
return emit_atomic_local_shared(instr);
|
||||
case nir_intrinsic_shader_clock:
|
||||
return emit_shader_clock(instr);
|
||||
case nir_intrinsic_copy_deref:
|
||||
case nir_intrinsic_load_constant:
|
||||
case nir_intrinsic_load_input:
|
||||
|
|
@ -768,6 +770,15 @@ bool ShaderFromNirProcessor::emit_load_scratch(nir_intrinsic_instr* instr)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ShaderFromNirProcessor::emit_shader_clock(nir_intrinsic_instr* instr)
|
||||
{
|
||||
emit_instruction(new AluInstruction(op1_mov, from_nir(instr->dest, 0),
|
||||
PValue(new InlineConstValue(ALU_SRC_TIME_LO, 0)), EmitInstruction::write));
|
||||
emit_instruction(new AluInstruction(op1_mov, from_nir(instr->dest, 1),
|
||||
PValue(new InlineConstValue(ALU_SRC_TIME_HI, 0)), EmitInstruction::last_write));
|
||||
return true;
|
||||
}
|
||||
|
||||
GPRVector ShaderFromNirProcessor::vec_from_nir_with_fetch_constant(const nir_src& src,
|
||||
unsigned mask,
|
||||
const GPRVector::Swizzle& swizzle,
|
||||
|
|
|
|||
|
|
@ -182,6 +182,7 @@ private:
|
|||
|
||||
bool emit_store_scratch(nir_intrinsic_instr* instr);
|
||||
bool emit_load_scratch(nir_intrinsic_instr* instr);
|
||||
bool emit_shader_clock(nir_intrinsic_instr* instr);
|
||||
virtual void do_finalize() = 0;
|
||||
|
||||
void finalize();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue