mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-14 08:12:16 +00:00
* translator: Implemtn f32 to f16 convert * shader_recompiler: Add bit instructions * shader_recompiler: More data share instructions * shader_recompiler: Remove exec contexts, fix S_MOV_B64 * shader_recompiler: Split instruction parsing into categories * shader_recompiler: Better BFS search * shader_recompiler: Constant propagation pass for cmp_class_f32 * shader_recompiler: Partial readfirstlane implementation * shader_recompiler: Stub readlane/writelane only for non-compute * hack: Fix swizzle on RDR * Will properly fix this when merging this * clang format * address_space: Bump user area size to full * shader_recompiler: V_INTERP_MOV_F32 * Should work the same as spirv will emit flat decoration on demand * kernel: Add MAP_OP_MAP_FLEXIBLE * image_view: Attempt to apply storage swizzle on format * vk_scheduler: Barrier attachments on renderpass end * clang format * liverpool: cs state backup * shader_recompiler: More instructions and formats * vector_alu: Proper V_MBCNT_U32_B32 * shader_recompiler: Port some dark souls things * file_system: Implement sceKernelRename * more formats * clang format * resource_tracking_pass: Back to assert * translate: Tracedata * kernel: Remove tracy lock * Solves random crashes in Dark Souls * code: Review comments
35 lines
1.2 KiB
C++
35 lines
1.2 KiB
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "shader_recompiler/frontend/translate/translate.h"
|
|
|
|
namespace Shader::Gcn {
|
|
|
|
void Translator::V_INTERP_P2_F32(const GcnInst& inst) {
|
|
const IR::VectorReg dst_reg{inst.dst[0].code};
|
|
auto& attr = info.ps_inputs.at(inst.control.vintrp.attr);
|
|
const IR::Attribute attrib{IR::Attribute::Param0 + attr.param_index};
|
|
ir.SetVectorReg(dst_reg, ir.GetAttribute(attrib, inst.control.vintrp.chan));
|
|
}
|
|
|
|
void Translator::V_INTERP_MOV_F32(const GcnInst& inst) {
|
|
const IR::VectorReg dst_reg{inst.dst[0].code};
|
|
auto& attr = info.ps_inputs.at(inst.control.vintrp.attr);
|
|
const IR::Attribute attrib{IR::Attribute::Param0 + attr.param_index};
|
|
ir.SetVectorReg(dst_reg, ir.GetAttribute(attrib, inst.control.vintrp.chan));
|
|
}
|
|
|
|
void Translator::EmitVectorInterpolation(const GcnInst& inst) {
|
|
switch (inst.opcode) {
|
|
case Opcode::V_INTERP_P1_F32:
|
|
return;
|
|
case Opcode::V_INTERP_P2_F32:
|
|
return V_INTERP_P2_F32(inst);
|
|
case Opcode::V_INTERP_MOV_F32:
|
|
return V_INTERP_MOV_F32(inst);
|
|
default:
|
|
LogMissingOpcode(inst);
|
|
}
|
|
}
|
|
|
|
} // namespace Shader::Gcn
|