mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-16 03:45:13 +00:00
shader: Add instructions for knack
This commit is contained in:
parent
fdd699a725
commit
a1eee4a523
|
@ -281,6 +281,12 @@ void Translator::S_AND_B64(NegateMode negate, const GcnInst& inst) {
|
|||
return ir.GetExec();
|
||||
case OperandField::ScalarGPR:
|
||||
return ir.GetThreadBitScalarReg(IR::ScalarReg(operand.code));
|
||||
case OperandField::ConstZero:
|
||||
return ir.Imm1(false);
|
||||
case OperandField::SignedConstIntNeg:
|
||||
ASSERT_MSG(-s32(operand.code) + SignedConstIntNegMin - 1 == -1,
|
||||
"SignedConstIntNeg must be -1");
|
||||
return ir.Imm1(true);
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ T Translator::GetSrc(const InstOperand& operand) {
|
|||
value = ir.IAbs(value);
|
||||
}
|
||||
if (operand.input_modifier.neg) {
|
||||
UNREACHABLE();
|
||||
value = ir.INeg(value);
|
||||
}
|
||||
}
|
||||
return value;
|
||||
|
|
|
@ -1059,6 +1059,11 @@ void Translator::V_LSHL_B64(const GcnInst& inst) {
|
|||
const IR::U64 src0{GetSrc64(inst.src[0])};
|
||||
const IR::U64 src1{GetSrc64(inst.src[1])};
|
||||
const IR::VectorReg dst_reg{inst.dst[0].code};
|
||||
if (src0.IsImmediate() && src0.U64() == -1) {
|
||||
ir.SetVectorReg(dst_reg, ir.Imm32(0xFFFFFFFF));
|
||||
ir.SetVectorReg(dst_reg + 1, ir.Imm32(0xFFFFFFFF));
|
||||
return;
|
||||
}
|
||||
ASSERT_MSG(src0.IsImmediate() && src0.U64() == 0 && src1.IsImmediate() && src1.U64() == 0,
|
||||
"V_LSHL_B64 with non-zero src0 or src1 is not supported");
|
||||
ir.SetVectorReg(dst_reg, ir.Imm32(0));
|
||||
|
|
|
@ -83,8 +83,9 @@ GraphicsPipeline::GraphicsPipeline(const Instance& instance_, Scheduler& schedul
|
|||
.topology = LiverpoolToVK::PrimitiveType(key.prim_type),
|
||||
.primitiveRestartEnable = key.enable_primitive_restart != 0,
|
||||
};
|
||||
ASSERT_MSG(!key.enable_primitive_restart || key.primitive_restart_index == 0xFFFF,
|
||||
"Primitive restart index other than 0xFFFF is not supported yet");
|
||||
ASSERT_MSG(!key.enable_primitive_restart || key.primitive_restart_index == 0xFFFF ||
|
||||
key.primitive_restart_index == 0xFFFFFFFF,
|
||||
"Primitive restart index other than -1 is not supported yet");
|
||||
|
||||
const vk::PipelineRasterizationStateCreateInfo raster_state = {
|
||||
.depthClampEnable = false,
|
||||
|
|
Loading…
Reference in a new issue