diff options
| author | 2021-02-21 23:42:38 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:22 -0400 | |
| commit | 274897dfd59b4d08029ab7e93be4f84654abcdc8 (patch) | |
| tree | 083336a4d665476a87b888368878a311a7edab2a /src/shader_recompiler/backend/spirv/emit_spirv.cpp | |
| parent | shader: Rename, implement FADD.SAT and P2R (imm) (diff) | |
| download | yuzu-274897dfd59b4d08029ab7e93be4f84654abcdc8.tar.gz yuzu-274897dfd59b4d08029ab7e93be4f84654abcdc8.tar.xz yuzu-274897dfd59b4d08029ab7e93be4f84654abcdc8.zip | |
spirv: Fixes and Intel specific workarounds
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index 2519e446a..f3aca90d0 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp | |||
| @@ -150,11 +150,11 @@ void SetupDenormControl(const Profile& profile, const IR::Program& program, Emit | |||
| 150 | } else if (info.uses_fp16_denorms_flush) { | 150 | } else if (info.uses_fp16_denorms_flush) { |
| 151 | if (profile.support_fp16_denorm_flush) { | 151 | if (profile.support_fp16_denorm_flush) { |
| 152 | ctx.AddCapability(spv::Capability::DenormFlushToZero); | 152 | ctx.AddCapability(spv::Capability::DenormFlushToZero); |
| 153 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::DenormPreserve, 16U); | 153 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::DenormFlushToZero, 16U); |
| 154 | } else { | 154 | } else { |
| 155 | // Same as fp32, no need to warn as most drivers will flush by default | 155 | // Same as fp32, no need to warn as most drivers will flush by default |
| 156 | } | 156 | } |
| 157 | } else if (info.uses_fp32_denorms_preserve) { | 157 | } else if (info.uses_fp16_denorms_preserve) { |
| 158 | if (profile.support_fp16_denorm_preserve) { | 158 | if (profile.support_fp16_denorm_preserve) { |
| 159 | ctx.AddCapability(spv::Capability::DenormPreserve); | 159 | ctx.AddCapability(spv::Capability::DenormPreserve); |
| 160 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::DenormPreserve, 16U); | 160 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::DenormPreserve, 16U); |
| @@ -166,7 +166,7 @@ void SetupDenormControl(const Profile& profile, const IR::Program& program, Emit | |||
| 166 | } // Anonymous namespace | 166 | } // Anonymous namespace |
| 167 | 167 | ||
| 168 | std::vector<u32> EmitSPIRV(const Profile& profile, Environment& env, IR::Program& program) { | 168 | std::vector<u32> EmitSPIRV(const Profile& profile, Environment& env, IR::Program& program) { |
| 169 | EmitContext ctx{program}; | 169 | EmitContext ctx{profile, program}; |
| 170 | const Id void_function{ctx.TypeFunction(ctx.void_id)}; | 170 | const Id void_function{ctx.TypeFunction(ctx.void_id)}; |
| 171 | // FIXME: Forward declare functions (needs sirit support) | 171 | // FIXME: Forward declare functions (needs sirit support) |
| 172 | Id func{}; | 172 | Id func{}; |