diff options
| author | 2021-03-16 00:57:07 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:23 -0400 | |
| commit | fa2f6e38f4d465ba6e5efe6c6bd23d8ef39b080d (patch) | |
| tree | df19f729a6814bcdb9bd59446e87971642053da1 /src/shader_recompiler/backend | |
| parent | shader: Implement TEXS (diff) | |
| download | yuzu-fa2f6e38f4d465ba6e5efe6c6bd23d8ef39b080d.tar.gz yuzu-fa2f6e38f4d465ba6e5efe6c6bd23d8ef39b080d.tar.xz yuzu-fa2f6e38f4d465ba6e5efe6c6bd23d8ef39b080d.zip | |
shader: Implement FSET and FSETP
Also fix oversight with adding SignedZeroInfNanPreserve execution mode.
Diffstat (limited to 'src/shader_recompiler/backend')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index 7e7db9161..50c0f7243 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp | |||
| @@ -124,10 +124,12 @@ void SetupDenormControl(const Profile& profile, const IR::Program& program, Emit | |||
| 124 | ctx.AddExtension("SPV_KHR_float_controls"); | 124 | ctx.AddExtension("SPV_KHR_float_controls"); |
| 125 | 125 | ||
| 126 | if (info.uses_fp16 && profile.support_fp16_signed_zero_nan_preserve) { | 126 | if (info.uses_fp16 && profile.support_fp16_signed_zero_nan_preserve) { |
| 127 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::SignedZeroInfNanPreserve); | 127 | ctx.AddCapability(spv::Capability::SignedZeroInfNanPreserve); |
| 128 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::SignedZeroInfNanPreserve, 16U); | ||
| 128 | } | 129 | } |
| 129 | if (profile.support_fp32_signed_zero_nan_preserve) { | 130 | if (profile.support_fp32_signed_zero_nan_preserve) { |
| 130 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::SignedZeroInfNanPreserve); | 131 | ctx.AddCapability(spv::Capability::SignedZeroInfNanPreserve); |
| 132 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::SignedZeroInfNanPreserve, 32U); | ||
| 131 | } | 133 | } |
| 132 | if (info.uses_fp32_denorms_flush && info.uses_fp32_denorms_preserve) { | 134 | if (info.uses_fp32_denorms_flush && info.uses_fp32_denorms_preserve) { |
| 133 | // LOG_ERROR(HW_GPU, "Fp32 denorm flush and preserve on the same shader"); | 135 | // LOG_ERROR(HW_GPU, "Fp32 denorm flush and preserve on the same shader"); |