添加调试信息编译选项
This commit is contained in:
@@ -46,6 +46,8 @@ class SDL3GPUSlangCompiler:
|
||||
with tempfile.NamedTemporaryFile(mode='w', suffix='.slang', delete=False, encoding='utf8') as tmp:
|
||||
tmp.write(modified_source)
|
||||
tmp_path = tmp.name
|
||||
with tempfile.NamedTemporaryFile(mode='w', suffix='.cso', delete=False, encoding='utf8') as tmp:
|
||||
signed_shader = tmp.name
|
||||
|
||||
try:
|
||||
# 编译着色器
|
||||
@@ -62,8 +64,6 @@ class SDL3GPUSlangCompiler:
|
||||
|
||||
# 如果目标是DXIL,则需要签名
|
||||
if global_vars.target == TargetFormat.DXIL:
|
||||
with tempfile.NamedTemporaryFile(mode='w', suffix='.cso', delete=False, encoding='utf8') as tmp:
|
||||
signed_shader = tmp.name
|
||||
self._compile_dxil(shader_info, shader_file, signed_shader)
|
||||
shader_file = signed_shader
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ def make_cmd(source_file: str, target: TargetFormat, stage: ShaderStage, entry_p
|
||||
'-o', output_path,
|
||||
'-target', target_flag,
|
||||
'-stage', stage_flag,
|
||||
'-g3', # 生成调试信息
|
||||
'-O0', # 禁用优化,便于调试和验证
|
||||
]
|
||||
# 添加包含路径
|
||||
for include_path in global_vars.include_dirs:
|
||||
|
||||
Reference in New Issue
Block a user