Skip to content

Commit f0f5c70

Browse files
committed
ExecutionGraph clean-up
1 parent c105798 commit f0f5c70

2 files changed

Lines changed: 7 additions & 23 deletions

File tree

src/engine/renderer-vulkan/GraphicsCore/ExecutionGraph/ExecutionGraph.cpp

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ uint32 ExecutionGraph::BuildCmd( DynamicArray<ExecutionGraphNode>& nodes, const
270270
BuildGraphicsNode( graphicsNode.vertexID, graphicsNode.fragmentID, &pipeline, &pipelineLayout );
271271

272272
uint32 nodeDeps = graphicsNode.nodeDependencies;
273-
// uint32 nodeDepsTypes = graphicsNode.nodeDependencyTypes;
274273

275274
VkPipelineStageFlags2 srcStage;
276275
VkAccessFlags2 srcAccess;
@@ -383,7 +382,6 @@ uint32 ExecutionGraph::BuildCmd( DynamicArray<ExecutionGraphNode>& nodes, const
383382
presentNode = *( PresentNode* ) &node;
384383

385384
uint32 nodeDeps = presentNode.nodeDependencies;
386-
uint32 nodeDepsTypes = presentNode.nodeDependencyTypes;
387385

388386
VkPipelineStageFlags2 srcStage = 0;
389387
VkAccessFlags2 srcAccess = 0;
@@ -397,12 +395,12 @@ uint32 ExecutionGraph::BuildCmd( DynamicArray<ExecutionGraphNode>& nodes, const
397395
srcAccess |= VK_ACCESS_2_SHADER_WRITE_BIT;
398396
break;
399397
case NODE_GRAPHICS:
400-
srcStage |= BitSet( nodeDepsTypes, dep )
398+
/* srcStage |= BitSet( nodeDepsTypes, dep )
401399
? VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT
402400
: VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT;
403401
srcAccess |= BitSet( nodeDepsTypes, dep )
404402
? VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT
405-
: VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
403+
: VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT; */
406404
break;
407405
}
408406

@@ -563,8 +561,7 @@ uint64 ExecutionGraph::Exec() {
563561
}
564562

565563
void ParseNodeDeps( StringView& v, std::unordered_map<std::string, uint32>& nodes, uint32* nodeDeps ) {
566-
*nodeDeps = 0;
567-
bool colourDep = false;
564+
*nodeDeps = 0;
568565

569566
while( true ) {
570567
StringView o = Parse( v );
@@ -577,18 +574,9 @@ void ParseNodeDeps( StringView& v, std::unordered_map<std::string, uint32>& node
577574
break;
578575
}
579576

580-
/* if ( o == "COLOR" ) {
581-
colourDep = true;
582-
break;
583-
} */
584-
585577
uint32 dep = nodes[std::string { o.memory, o.size }];
586578

587579
SetBit( nodeDeps, dep );
588-
589-
if ( colourDep ) {
590-
// SetBit( nodeDepsTypes, dep );
591-
}
592580
}
593581
}
594582

@@ -704,7 +692,6 @@ DynamicArray<ExecutionGraphNode> ParseExecutionGraph( std::string& src ) {
704692
.workgroupCount2 = ( uint16 ) workgroupCount[1],
705693
.workgroupCount3 = ( uint16 ) workgroupCount[2],
706694
.nodeDependencies = nodeDeps
707-
// .nodeDependencyTypes = nodeDepsTypes
708695
};
709696

710697
out.Push( *( ExecutionGraphNode* ) &node );
@@ -734,8 +721,7 @@ DynamicArray<ExecutionGraphNode> ParseExecutionGraph( std::string& src ) {
734721
.id = id,
735722
.vertexID = ( uint16 ) vertex,
736723
.fragmentID = ( uint16 ) fragment,
737-
.nodeDependencies = nodeDeps,
738-
// .nodeDependencyTypes = nodeDepsTypes
724+
.nodeDependencies = nodeDeps
739725
};
740726

741727
out.Push( *( ExecutionGraphNode* ) &node );
@@ -855,8 +841,7 @@ DynamicArray<ExecutionGraphNode> ParseExecutionGraph( std::string& src ) {
855841
PresentNode node {
856842
.id = id,
857843
.active = true,
858-
.nodeDependencies = nodeDeps,
859-
// .nodeDependencyTypes = nodeDepsTypes
844+
.nodeDependencies = nodeDeps
860845
};
861846

862847
out.Push( *( ExecutionGraphNode* ) &node );

src/engine/renderer-vulkan/GraphicsCore/ExecutionGraph/ExecutionGraph.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ struct GraphicsNode {
109109
uint16 fragmentID;
110110
uint16 pipelineStates;
111111
uint32 nodeDependencies;
112-
uint32 nodeDependencyTypes;
112+
uint32 padding;
113113
uint64 graphicsSettings;
114114
};
115115

@@ -219,8 +219,7 @@ struct PresentNode {
219219
uint8 id;
220220
bool active;
221221
uint32 nodeDependencies;
222-
uint32 nodeDependencyTypes;
223-
uint8 padding[12];
222+
uint8 padding[16];
224223
};
225224

226225
class ExecutionGraph {

0 commit comments

Comments
 (0)