mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
fix(shader): refuse v_dot2_f32_f16 without op_sel_hi on the accumulator
Its meaning for the f32 accumulator is not known, like op_sel and neg_hi, and the integer dots already refuse anything but op_sel_hi set on every source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -111,7 +111,7 @@ void CheckRefused(AgcDriver::VulkanDevice& device, std::uint32_t word0, const st
|
||||
} catch (const std::exception& error) {
|
||||
refusal = error.what();
|
||||
}
|
||||
Require(refusal.find("v_dot2_f32_f16 accumulator op_sel and neg_hi are not implemented") != std::string::npos, what + " was not refused");
|
||||
Require(refusal.find("v_dot2_f32_f16 accumulator op_sel, op_sel_hi and neg_hi are not implemented") != std::string::npos, what + " was not refused");
|
||||
}
|
||||
|
||||
float Dot(float aLow, float aHigh, float bLow, float bHigh, float c) {
|
||||
@@ -152,6 +152,7 @@ int main() {
|
||||
Check();
|
||||
CheckRefused(*device, 0xcc13600au, "op_sel on the accumulator");
|
||||
CheckRefused(*device, 0xcc13440au, "neg_hi on the accumulator");
|
||||
CheckRefused(*device, 0xcc13000au, "op_sel_hi cleared on the accumulator");
|
||||
std::puts("v_dot2_f32_f16 tests passed");
|
||||
return 0;
|
||||
} catch (const std::exception& error) {
|
||||
|
||||
@@ -2200,8 +2200,8 @@ RdnaInstruction DecodeRdnaVop3p(std::uint32_t programCounter, std::span<const st
|
||||
if (instruction.sourceCount > 2u) {
|
||||
instruction.source2 = DecodeRdnaScalarSource(src2, programCounter);
|
||||
}
|
||||
if (instruction.op == RdnaOpcode::VDot2F32F16 && (((opSel | negHi) >> 2u) & 1u) != 0u) {
|
||||
throw std::invalid_argument("VOP3P v_dot2_f32_f16 accumulator op_sel and neg_hi are not implemented");
|
||||
if (instruction.op == RdnaOpcode::VDot2F32F16 && ((((opSel | negHi) >> 2u) & 1u) != 0u || ((opSelHi >> 2u) & 1u) == 0u)) {
|
||||
throw std::invalid_argument("VOP3P v_dot2_f32_f16 accumulator op_sel, op_sel_hi and neg_hi are not implemented");
|
||||
}
|
||||
if (instruction.op == RdnaOpcode::VFmaF32 || instruction.op == RdnaOpcode::VDot2F32F16 || isMadMixF16(instruction.op) || isPackedVop3p(instruction.op) || isVop3pIntegerSaturate(instruction.op)) {
|
||||
instruction.destination.clamp = clamp != 0u;
|
||||
|
||||
Reference in New Issue
Block a user