summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/spirv/emit_spirv.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-03-14 07:51:40 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:23 +0200
commitb9f7bf4472b8e0a5aad1aec3a5ff5bb56470bfff (patch)
tree07ebc7e318967e0cf40e9475558ca0a6126d54b6 /src/shader_recompiler/backend/spirv/emit_spirv.cpp
parentshader: Implement FMNMX (diff)
downloadyuzu-b9f7bf4472b8e0a5aad1aec3a5ff5bb56470bfff.tar
yuzu-b9f7bf4472b8e0a5aad1aec3a5ff5bb56470bfff.tar.gz
yuzu-b9f7bf4472b8e0a5aad1aec3a5ff5bb56470bfff.tar.bz2
yuzu-b9f7bf4472b8e0a5aad1aec3a5ff5bb56470bfff.tar.lz
yuzu-b9f7bf4472b8e0a5aad1aec3a5ff5bb56470bfff.tar.xz
yuzu-b9f7bf4472b8e0a5aad1aec3a5ff5bb56470bfff.tar.zst
yuzu-b9f7bf4472b8e0a5aad1aec3a5ff5bb56470bfff.zip
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv.cpp')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp
index a94e9cb2d..c7cba6279 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp
@@ -124,6 +124,12 @@ void SetupDenormControl(const Profile& profile, const IR::Program& program, Emit
}
ctx.AddExtension("SPV_KHR_float_controls");
+ if (info.uses_fp16 && profile.support_fp16_signed_zero_nan_preserve) {
+ ctx.AddExecutionMode(main_func, spv::ExecutionMode::SignedZeroInfNanPreserve);
+ }
+ if (profile.support_fp32_signed_zero_nan_preserve) {
+ ctx.AddExecutionMode(main_func, spv::ExecutionMode::SignedZeroInfNanPreserve);
+ }
if (info.uses_fp32_denorms_flush && info.uses_fp32_denorms_preserve) {
// LOG_ERROR(HW_GPU, "Fp32 denorm flush and preserve on the same shader");
} else if (info.uses_fp32_denorms_flush) {