调整macos着色器编译
This commit is contained in:
@@ -34,7 +34,7 @@ SHADER_EXTENSIONS = {
|
||||
'spirv': 'spirv',
|
||||
'dxil': 'dxil',
|
||||
'dxbc': 'dxbc',
|
||||
'metallib': 'metallib',
|
||||
'Metal Library Bytecode assembly': 'metallib',
|
||||
'wgsl': 'wgsl'
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ TARGET_PROFILES = {
|
||||
'spirv': ['-profile', 'glsl_460', '-capability', 'glsl_spirv_1_6'],
|
||||
'dxbc': ['-profile', 'sm_5_0'],
|
||||
'dxil': ['-profile', 'sm_6_6'],
|
||||
'metallib': ['-capability', 'metallib_3_1']
|
||||
'Metal Library Bytecode assembly': ['-capability', 'metallib_3_1']
|
||||
}
|
||||
|
||||
class ShaderEntry:
|
||||
@@ -257,25 +257,6 @@ def generate_pipeline_header_preamble() -> List[str]:
|
||||
" desc.type = type;",
|
||||
" desc.sourceType = is_string_source ? LLGL::ShaderSourceType::CodeString : LLGL::ShaderSourceType::BinaryBuffer;",
|
||||
"",
|
||||
" if (rendererID == LLGL::RendererID::Direct3D11) {",
|
||||
" if (type == LLGL::ShaderType::Vertex) {",
|
||||
" desc.profile = \"vs_5_0\";",
|
||||
" } else if (type == LLGL::ShaderType::Fragment) {",
|
||||
" desc.profile = \"ps_5_0\";",
|
||||
" } else if (type == LLGL::ShaderType::Compute) {",
|
||||
" desc.profile = \"cs_5_0\";",
|
||||
" };",
|
||||
" } else if (rendererID == LLGL::RendererID::Direct3D12) {",
|
||||
" if (type == LLGL::ShaderType::Vertex) {",
|
||||
" desc.profile = \"vs_6_6\";",
|
||||
" } else if (type == LLGL::ShaderType::Fragment) {",
|
||||
" desc.profile = \"ps_6_6\";",
|
||||
" } else if (type == LLGL::ShaderType::Compute) {",
|
||||
" desc.profile = \"cs_6_6\";",
|
||||
" };",
|
||||
" } else if (rendererID == LLGL::RendererID::Metal) {",
|
||||
" desc.profile = \"2.1\";",
|
||||
" }",
|
||||
" auto shader = renderer->CreateShader(desc);",
|
||||
" if (auto report = shader->GetReport()) {",
|
||||
" spdlog::error(\"Shader compilation report: {}\", report->GetText());",
|
||||
@@ -453,7 +434,7 @@ def main():
|
||||
['spirv', args.vulkan],
|
||||
['dxbc', args.d3d11],
|
||||
['dxil', args.d3d12],
|
||||
['metallib', args.metal],
|
||||
['Metal Library Bytecode assembly', args.metal],
|
||||
]
|
||||
|
||||
output_dir = Path(args.output_dir or "shaders")
|
||||
|
||||
Reference in New Issue
Block a user