Skip to content

Commit

Permalink
Vulkan: Fix infinite loop in state_rebuilder.
Browse files Browse the repository at this point in the history
The problematic case is a state containing multiple pipelines, some of which
have 0 basePipeline, and some of which have a basePipeline that forms a loop or
doesn't exist. This caused both `numHandled` and `len(unhandledPipelines)` to be
non-zero forever. This change resets `numHandled` for each pass over
`unhandledPipelines`.

Fixes #2390
  • Loading branch information
bjoeris committed Nov 26, 2018
1 parent d178f6a commit 55b03c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gapis/api/vulkan/state_rebuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ func getPipelinesInOrder(s *State, compute bool) []VkPipeline {
}
}

numHandled := 0
for len(unhandledPipelines) != 0 {
numHandled := 0
for k, v := range unhandledPipelines {
handled := false
if v == 0 {
Expand Down

0 comments on commit 55b03c9

Please sign in to comment.