Skip to content

Commit

Permalink
Fix static check error
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaojbao committed May 15, 2024
1 parent fba3592 commit 3f33e94
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 12 additions & 0 deletions tool/vfx/vfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>

Expand Down Expand Up @@ -535,6 +536,17 @@ struct VfxPipelineState {
Vfx::ShaderSource *stages; // Shader source sections
std::string graphicsLibFileName[Vfx::GraphicsLibraryCount];
std::vector<uint32_t> fsOutputs;

public:
VfxPipelineState() : version(0), pipelineType(VfxPipelineTypeGraphics), numStages(0), stages(nullptr) {
memset(&gfxPipelineInfo, 0, sizeof(gfxPipelineInfo));
memset(&compPipelineInfo, 0, sizeof(compPipelineInfo));
memset(&rayPipelineInfo, 0, sizeof(rayPipelineInfo));
for (int i = 0; i < Vfx::GraphicsLibraryCount; ++i) {
graphicsLibFileName[i] = "";
}
fsOutputs.clear();
}
};

typedef struct VfxPipelineState *VfxPipelineStatePtr;
Expand Down
1 change: 0 additions & 1 deletion tool/vfx/vfxPipelineDoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class PipelineDocument : public Document {
public:
PipelineDocument() {
initVkSections();
memset(&m_pipelineState, 0, sizeof(m_pipelineState));

m_pipelineState.gfxPipelineInfo.options.optimizationLevel = 2;
m_pipelineState.compPipelineInfo.options.optimizationLevel = 2;
Expand Down

0 comments on commit 3f33e94

Please sign in to comment.