Skip to content

Commit

Permalink
supported preamble
Browse files Browse the repository at this point in the history
  • Loading branch information
hyzboy committed Jun 28, 2022
1 parent bf344f5 commit e813fb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SPIRV-Cross
6 changes: 5 additions & 1 deletion glsl2spv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ extern "C"
const char * entrypoint;
uint32_t includes_count;
const char ** includes;
const char * preamble;
};

enum class VertexAttribBaseType
Expand Down Expand Up @@ -474,7 +475,7 @@ extern "C"
++sr;
}
}

SPVData *Shader2SPV(
const uint32_t shader_stage,
const char * shader_source,
Expand Down Expand Up @@ -508,6 +509,9 @@ extern "C"
}
}

if(compile_info->preamble)
shader.setPreamble(compile_info->preamble);

shaderStrings[0] = shader_source;
shader.setStrings(shaderStrings, 1);

Expand Down

0 comments on commit e813fb4

Please sign in to comment.