mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-06 16:18:58 +00:00
VideoBackends / VideoCommon: refactor Vulkan to use new SPIRV functionality
This commit is contained in:
parent
c2d3b7e7f5
commit
dda1479ecf
5 changed files with 49 additions and 213 deletions
|
@ -114,7 +114,7 @@ std::optional<SPIRV::CodeVector> GetSpirv(ShaderStage stage, std::string_view so
|
|||
case ShaderStage::Vertex:
|
||||
{
|
||||
const auto full_source = fmt::format("{}{}", SHADER_HEADER, source);
|
||||
return SPIRV::CompileVertexShader(full_source);
|
||||
return SPIRV::CompileVertexShader(full_source, APIType::D3D, glslang::EShTargetSpv_1_0);
|
||||
}
|
||||
|
||||
case ShaderStage::Geometry:
|
||||
|
@ -126,13 +126,13 @@ std::optional<SPIRV::CodeVector> GetSpirv(ShaderStage stage, std::string_view so
|
|||
case ShaderStage::Pixel:
|
||||
{
|
||||
const auto full_source = fmt::format("{}{}", SHADER_HEADER, source);
|
||||
return SPIRV::CompileFragmentShader(full_source);
|
||||
return SPIRV::CompileFragmentShader(full_source, APIType::D3D, glslang::EShTargetSpv_1_0);
|
||||
}
|
||||
|
||||
case ShaderStage::Compute:
|
||||
{
|
||||
const auto full_source = fmt::format("{}{}", COMPUTE_SHADER_HEADER, source);
|
||||
return SPIRV::CompileComputeShader(full_source);
|
||||
return SPIRV::CompileComputeShader(full_source, APIType::D3D, glslang::EShTargetSpv_1_0);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue