File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,12 +162,13 @@ module Engine =
162162 " Light"
163163 " Optimized" ],
164164 StringComparer.Ordinal)
165- let [<Literal>] BuildName =
165+ let [<Literal>] EngineDebug =
166166#if DEBUG
167- " Debug "
167+ true
168168#else
169- " Release "
169+ false
170170#endif
171+ let [<Literal>] BuildName = if EngineDebug then " Debug" else " Release"
171172
172173[<RequireQualifiedAccess>]
173174module Render =
Original file line number Diff line number Diff line change @@ -710,8 +710,11 @@ module Hl =
710710 use shaderStream = new StreamReader ( File.OpenRead shaderPath)
711711 let shaderStr = shaderStream.ReadToEnd ()
712712 use compiler = new Compiler ()
713- let options = CompilerOptions ()
714- options.ShaderStage <- shaderKind
713+ let options =
714+ CompilerOptions
715+ ( ShaderStage = shaderKind,
716+ OptimizationLevel = ( if Constants.Render.RenderDebug then OptimizationLevel.Zero else OptimizationLevel.Performance),
717+ GeneratedDebug = Constants.Engine.EngineDebug)
715718 let result = compiler.Compile ( shaderStr, shaderPath, options)
716719 if result.Status = CompilationStatus.Success
717720 then Right result.Bytecode
You can’t perform that action at this time.
0 commit comments