Skip to content

Commit

Permalink
DXIL Control Flow added a simple if/then test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorro666 committed Nov 26, 2024
1 parent c24d82f commit bca09b1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions renderdoc/driver/shaders/dxil/dxil_controlflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,27 @@ TEST_CASE("DXIL Control Flow", "[dxil]")
REQUIRE(outputs.contains(4U));
}

{
// Simple branch
// 0 -> 1
// 0 -> 2
// 1 -> 2
// 2 -> 3
// 2 -> 4
// 3 -> 4
rdcarray<BlockLink> inputs;
inputs.push_back({0, 1});
inputs.push_back({0, 2});
inputs.push_back({1, 2});
inputs.push_back({2, 3});
inputs.push_back({2, 4});
inputs.push_back({3, 4});
DXIL::FindUniformBlocks(inputs, outputs);
REQUIRE(3 == outputs.count());
REQUIRE(outputs.contains(0U));
REQUIRE(outputs.contains(2U));
REQUIRE(outputs.contains(4U));
}
{
// Finite loop (3 -> 4 -> 5 -> 3)
// 0 -> 1 -> 3
Expand Down

0 comments on commit bca09b1

Please sign in to comment.