shader_recompiler: correct format for SSBO store op
This commit is contained in:
parent
37ceea2314
commit
be67fdc9c9
|
@ -185,7 +185,7 @@ Id EmitLoadBufferF32x4(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address)
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitStoreBufferF32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) {
|
void EmitStoreBufferF32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) {
|
||||||
UNREACHABLE();
|
EmitStoreBufferU32(ctx, inst, handle, address, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitStoreBufferF32x2(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) {
|
void EmitStoreBufferF32x2(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) {
|
||||||
|
|
|
@ -216,18 +216,22 @@ void Translator::BUFFER_STORE_FORMAT(u32 num_dwords, bool is_typed, const GcnIns
|
||||||
const IR::VectorReg src_reg{inst.src[1].code};
|
const IR::VectorReg src_reg{inst.src[1].code};
|
||||||
switch (num_dwords) {
|
switch (num_dwords) {
|
||||||
case 1:
|
case 1:
|
||||||
value = ir.GetVectorReg(src_reg);
|
value = ir.GetVectorReg<Shader::IR::F32>(src_reg);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
value = ir.CompositeConstruct(ir.GetVectorReg(src_reg), ir.GetVectorReg(src_reg + 1));
|
value = ir.CompositeConstruct(ir.GetVectorReg<Shader::IR::F32>(src_reg),
|
||||||
|
ir.GetVectorReg<Shader::IR::F32>(src_reg + 1));
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
value = ir.CompositeConstruct(ir.GetVectorReg(src_reg), ir.GetVectorReg(src_reg + 1),
|
value = ir.CompositeConstruct(ir.GetVectorReg<Shader::IR::F32>(src_reg),
|
||||||
ir.GetVectorReg(src_reg + 2));
|
ir.GetVectorReg<Shader::IR::F32>(src_reg + 1),
|
||||||
|
ir.GetVectorReg<Shader::IR::F32>(src_reg + 2));
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
value = ir.CompositeConstruct(ir.GetVectorReg(src_reg), ir.GetVectorReg(src_reg + 1),
|
value = ir.CompositeConstruct(ir.GetVectorReg<Shader::IR::F32>(src_reg),
|
||||||
ir.GetVectorReg(src_reg + 2), ir.GetVectorReg(src_reg + 3));
|
ir.GetVectorReg<Shader::IR::F32>(src_reg + 1),
|
||||||
|
ir.GetVectorReg<Shader::IR::F32>(src_reg + 2),
|
||||||
|
ir.GetVectorReg<Shader::IR::F32>(src_reg + 3));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ir.StoreBuffer(num_dwords, ir.GetScalarReg(sharp), address, value, info);
|
ir.StoreBuffer(num_dwords, ir.GetScalarReg(sharp), address, value, info);
|
||||||
|
|
Loading…
Reference in New Issue