Skip to content

Commit

Permalink
graph: reset module/node bindings on topology change
Browse files Browse the repository at this point in the history
  • Loading branch information
hanatos committed Jan 15, 2023
1 parent edcdaf8 commit 1b1d4a0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pipe/graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -1995,8 +1995,8 @@ VkResult dt_graph_run(

if(run & s_graph_run_alloc)
{
vkDestroyDescriptorSetLayout(qvk.device, graph->uniform_dset_layout, 0);
graph->uniform_dset_layout = 0;
vkDestroyDescriptorSetLayout(qvk.device, graph->uniform_dset_layout, 0);
graph->uniform_dset_layout = 0;
if(!graph->uniform_dset_layout)
{ // init layout of uniform descriptor set:
VkDescriptorSetLayoutBinding bindings[] = {{
Expand Down Expand Up @@ -2070,6 +2070,10 @@ VkResult dt_graph_run(
if(graph->conn_image_pool[i].image_view) vkDestroyImageView(qvk.device, graph->conn_image_pool[i].image_view, VK_NULL_HANDLE);
}
graph->conn_image_end = 0;
for(int i=0;i<cnt;i++)
for(int j=0;j<graph->module[modid[i]].num_connectors;j++)
graph->module[modid[i]].connector[j].associated_i =
graph->module[modid[i]].connector[j].associated_c = -1;
for(int i=0;i<graph->num_nodes;i++)
{
for(int j=0;j<graph->node[i].num_connectors;j++)
Expand Down

0 comments on commit 1b1d4a0

Please sign in to comment.