mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 05:46:56 +01:00
shader: compute add-with-carry with compares and remove IAddCarry32
This commit is contained in:
@@ -237,12 +237,9 @@ void TestShaderBaseAndUserData() {
|
||||
|
||||
void TestCarryAndBitFields() {
|
||||
Fixture fixture;
|
||||
const auto carry =
|
||||
fixture.Emit(ValueOpcode::IAddCarry32, {Value(0xffffffffu), Value(2u)});
|
||||
const auto low =
|
||||
fixture.Emit(ValueOpcode::CompositeExtractU32x2, {carry, Value(0u)});
|
||||
const auto high =
|
||||
fixture.Emit(ValueOpcode::CompositeExtractU32x2, {carry, Value(1u)});
|
||||
const auto low = fixture.Emit(ValueOpcode::IAdd32, {Value(0xffffffffu), Value(2u)});
|
||||
const auto carry = fixture.Emit(ValueOpcode::ULessThan32, {low, Value(0xffffffffu)});
|
||||
const auto high = fixture.Emit(ValueOpcode::SelectU32, {carry, Value(1u), Value(0u)});
|
||||
const auto inserted =
|
||||
fixture.Emit(ValueOpcode::BitFieldInsert,
|
||||
{Value(0u), Value(0x89abcdefu), Value(0u), Value(32u)});
|
||||
|
||||
@@ -25806,7 +25806,7 @@ TestCase VectorAddcWritesPerLaneCarryOut() {
|
||||
O::S_ENDPGM};
|
||||
test.decoded_counts = {
|
||||
{"V_ADDC_U32 v2, vcc_lo, 0, v26.sdwa(sel=4,sext=1), vcc_lo", 1}};
|
||||
test.ir_counts = {{" = BitFieldSExtract ", 1}, {" = IAddCarry32 ", 2}};
|
||||
test.ir_counts = {{" = BitFieldSExtract ", 1}, {" = ULessThan32 ", 3}};
|
||||
test.required_spirv = {"OpBitFieldSExtract"};
|
||||
test.compute_info.threads_num[0] = 4;
|
||||
test.compute_info.threads_num[1] = 1;
|
||||
|
||||
@@ -15144,7 +15144,7 @@ void TestTypedDescriptorRealCarryAndScalarLoads() {
|
||||
ValueDependsOn(carry_source->dwords[1],
|
||||
ShaderRecompiler::IR::ValueOpcode::GetShaderBase) &&
|
||||
ValueDependsOn(carry_source->dwords[1],
|
||||
ShaderRecompiler::IR::ValueOpcode::IAddCarry32),
|
||||
ShaderRecompiler::IR::ValueOpcode::ULessThan32),
|
||||
"real s_add_u32/s_addc_u32 translation lost SCC carry provenance");
|
||||
std::array<uint32_t, 64> carry_user_data{};
|
||||
const uint64_t shader_base = 0x00000012fffffffbull;
|
||||
|
||||
Reference in New Issue
Block a user