Vulkan: Use VK_NV_glsl extension where available, and skip glslang

Seems to produce faster ubershaders, at least.
This commit is contained in:
Stenzek
2017-07-20 15:25:41 +10:00
parent 416afa065c
commit d23fd17e1a
7 changed files with 102 additions and 38 deletions

View File

@ -61,20 +61,16 @@ void ExecuteCurrentCommandsAndRestoreState(bool execute_off_thread,
VkShaderModule CreateShaderModule(const u32* spv, size_t spv_word_count);
// Compile a vertex shader and create a shader module, discarding the intermediate SPIR-V.
VkShaderModule CompileAndCreateVertexShader(const std::string& source_code,
bool prepend_header = true);
VkShaderModule CompileAndCreateVertexShader(const std::string& source_code);
// Compile a geometry shader and create a shader module, discarding the intermediate SPIR-V.
VkShaderModule CompileAndCreateGeometryShader(const std::string& source_code,
bool prepend_header = true);
VkShaderModule CompileAndCreateGeometryShader(const std::string& source_code);
// Compile a fragment shader and create a shader module, discarding the intermediate SPIR-V.
VkShaderModule CompileAndCreateFragmentShader(const std::string& source_code,
bool prepend_header = true);
VkShaderModule CompileAndCreateFragmentShader(const std::string& source_code);
// Compile a compute shader and create a shader module, discarding the intermediate SPIR-V.
VkShaderModule CompileAndCreateComputeShader(const std::string& source_code,
bool prepend_header = true);
VkShaderModule CompileAndCreateComputeShader(const std::string& source_code);
}
// Utility shader vertex format