mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 19:07:01 +02:00
shader: evaluate scalar branch decisions across the complete guest wave
This commit is contained in:
@@ -14731,13 +14731,14 @@ void TestNewShaderRecompilerSpirvSizeBaselines() {
|
||||
EncodeSopp(0x01),
|
||||
};
|
||||
const auto structured_result = compile("structured-phi", structured_phi,
|
||||
{.words = 140,
|
||||
.instructions = 41,
|
||||
{.words = 174,
|
||||
.instructions = 49,
|
||||
.phis = 1,
|
||||
.labels = 8,
|
||||
.loop_merges = 1,
|
||||
.branches = 6,
|
||||
.conditional_branches = 1});
|
||||
.conditional_branches = 1,
|
||||
.ballots = 2});
|
||||
const auto structured_metrics = MeasureSpirv(structured_result.spirv);
|
||||
Check((structured_result.ir_dump.find("Phi") != std::string::npos),
|
||||
"structured Phi size fixture no longer contains an IR Phi");
|
||||
@@ -14748,13 +14749,14 @@ void TestNewShaderRecompilerSpirvSizeBaselines() {
|
||||
CheckSpirvPhiParents(structured_result.spirv);
|
||||
const auto structured_repeat =
|
||||
compile("structured-phi-repeat", structured_phi,
|
||||
{.words = 140,
|
||||
.instructions = 41,
|
||||
{.words = 174,
|
||||
.instructions = 49,
|
||||
.phis = 1,
|
||||
.labels = 8,
|
||||
.loop_merges = 1,
|
||||
.branches = 6,
|
||||
.conditional_branches = 1});
|
||||
.conditional_branches = 1,
|
||||
.ballots = 2});
|
||||
Check(structured_repeat.spirv == structured_result.spirv,
|
||||
"deferred Phi patching is not deterministic");
|
||||
|
||||
@@ -14918,8 +14920,8 @@ void TestNewShaderRecompilerSpirvSizeBaselines() {
|
||||
EncodeSopp(0x01),
|
||||
};
|
||||
const auto dispatcher_result = compile("dispatcher", dispatcher,
|
||||
{.words = 242,
|
||||
.instructions = 67,
|
||||
{.words = 255,
|
||||
.instructions = 70,
|
||||
.variables = 3,
|
||||
.function_variables = 3,
|
||||
.loads = 3,
|
||||
@@ -14930,7 +14932,8 @@ void TestNewShaderRecompilerSpirvSizeBaselines() {
|
||||
.selection_merges = 1,
|
||||
.branches = 10,
|
||||
.conditional_branches = 1,
|
||||
.switches = 1});
|
||||
.switches = 1,
|
||||
.ballots = 1});
|
||||
Check(dispatcher_result.program.dispatcher_fallback &&
|
||||
(dispatcher_result.ir_dump.find("Phi") != std::string::npos) &&
|
||||
SpirvInstructionOpcodeCount(dispatcher_result.spirv, 245u) == 2u &&
|
||||
|
||||
Reference in New Issue
Block a user