File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
renderdoc/driver/shaders/dxil Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -896,6 +896,29 @@ TEST_CASE("DXIL Control Flow", "[dxil]")
896
896
REQUIRE (loopBlocks.contains (12U ));
897
897
REQUIRE (loopBlocks.contains (68U ));
898
898
}
899
+ {
900
+ // Specific loop case where a block (2) in a loop is only in a single path
901
+ // 0 -> 1 -> 3 - 1
902
+ // 0 -> 1 -> 2 -> 3
903
+ // 3 -> 4 -> END
904
+ rdcarray<BlockLink> inputs;
905
+ inputs.push_back ({0 , 1 });
906
+ inputs.push_back ({1 , 3 });
907
+ inputs.push_back ({3 , 1 });
908
+ inputs.push_back ({1 , 2 });
909
+ inputs.push_back ({2 , 3 });
910
+ inputs.push_back ({3 , 4 });
911
+ controlFlow.Construct (inputs);
912
+ uniformBlocks = controlFlow.GetUniformBlocks ();
913
+ REQUIRE (2 == uniformBlocks.count ());
914
+ REQUIRE (uniformBlocks.contains (0U ));
915
+ REQUIRE (uniformBlocks.contains (4U ));
916
+ loopBlocks = controlFlow.GetLoopBlocks ();
917
+ REQUIRE (3 == loopBlocks.count ());
918
+ REQUIRE (loopBlocks.contains (1U ));
919
+ REQUIRE (loopBlocks.contains (2U ));
920
+ REQUIRE (loopBlocks.contains (3U ));
921
+ }
899
922
};
900
923
};
901
924
#endif // ENABLED(ENABLE_UNIT_TESTS)
You can’t perform that action at this time.
0 commit comments