Skip to content

Commit 30fbb6b

Browse files
committed
Switch to previous behaviour for finding Uniform Blocks
Use paths including loops
1 parent c83be40 commit 30fbb6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

renderdoc/driver/shaders/dxil/dxil_controlflow.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ uint32_t ControlFlow::GetNextUniformBlock(uint32_t from) const
673673
uint32_t bestBlock = from;
674674
for(uint32_t uniform : m_UniformBlocks)
675675
{
676-
const rdcarray<BlockPath> &paths = m_PathSets[PathType::NoLoops];
676+
const rdcarray<BlockPath> &paths = m_PathSets[PathType::IncLoops];
677677
for(uint32_t pathIdx = 0; pathIdx < paths.size(); ++pathIdx)
678678
{
679679
m_CheckedPaths.clear();
@@ -684,7 +684,7 @@ uint32_t ControlFlow::GetNextUniformBlock(uint32_t from) const
684684
// BlockInAnyPath will also check all paths linked to from the end node of the path
685685
if(startIdx != -1)
686686
{
687-
int32_t steps = BlockInAnyPath(PathType::NoLoops, uniform, pathIdx, startIdx + 1, 0);
687+
int32_t steps = BlockInAnyPath(PathType::IncLoops, uniform, pathIdx, startIdx + 1, 0);
688688
if(steps != -1)
689689
{
690690
if(steps < minSteps)
@@ -699,12 +699,12 @@ uint32_t ControlFlow::GetNextUniformBlock(uint32_t from) const
699699
return bestBlock;
700700
}
701701

702-
// Ignores loops
702+
// Include loops
703703
bool ControlFlow::IsForwardConnection(uint32_t from, uint32_t to) const
704704
{
705705
if(m_Connections[from][to] == ConnectionState::Unknown)
706706
{
707-
if(IsBlockConnected(PathType::NoLoops, from, to))
707+
if(IsBlockConnected(PathType::IncLoops, from, to))
708708
m_Connections[from][to] = ConnectionState::Connected;
709709
else
710710
m_Connections[from][to] = ConnectionState::NotConnected;

0 commit comments

Comments
 (0)