diff options
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index ddb86d070..d7a86e270 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp | |||
| @@ -319,7 +319,7 @@ void SetupDenormControl(const Profile& profile, const IR::Program& program, Emit | |||
| 319 | Id main_func) { | 319 | Id main_func) { |
| 320 | const Info& info{program.info}; | 320 | const Info& info{program.info}; |
| 321 | if (info.uses_fp32_denorms_flush && info.uses_fp32_denorms_preserve) { | 321 | if (info.uses_fp32_denorms_flush && info.uses_fp32_denorms_preserve) { |
| 322 | LOG_WARNING(Shader_SPIRV, "Fp32 denorm flush and preserve on the same shader"); | 322 | LOG_DEBUG(Shader_SPIRV, "Fp32 denorm flush and preserve on the same shader"); |
| 323 | } else if (info.uses_fp32_denorms_flush) { | 323 | } else if (info.uses_fp32_denorms_flush) { |
| 324 | if (profile.support_fp32_denorm_flush) { | 324 | if (profile.support_fp32_denorm_flush) { |
| 325 | ctx.AddCapability(spv::Capability::DenormFlushToZero); | 325 | ctx.AddCapability(spv::Capability::DenormFlushToZero); |
| @@ -332,15 +332,15 @@ void SetupDenormControl(const Profile& profile, const IR::Program& program, Emit | |||
| 332 | ctx.AddCapability(spv::Capability::DenormPreserve); | 332 | ctx.AddCapability(spv::Capability::DenormPreserve); |
| 333 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::DenormPreserve, 32U); | 333 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::DenormPreserve, 32U); |
| 334 | } else { | 334 | } else { |
| 335 | LOG_WARNING(Shader_SPIRV, "Fp32 denorm preserve used in shader without host support"); | 335 | LOG_DEBUG(Shader_SPIRV, "Fp32 denorm preserve used in shader without host support"); |
| 336 | } | 336 | } |
| 337 | } | 337 | } |
| 338 | if (!profile.support_separate_denorm_behavior) { | 338 | if (!profile.support_separate_denorm_behavior || profile.has_broken_fp16_float_controls) { |
| 339 | // No separate denorm behavior | 339 | // No separate denorm behavior |
| 340 | return; | 340 | return; |
| 341 | } | 341 | } |
| 342 | if (info.uses_fp16_denorms_flush && info.uses_fp16_denorms_preserve) { | 342 | if (info.uses_fp16_denorms_flush && info.uses_fp16_denorms_preserve) { |
| 343 | LOG_WARNING(Shader_SPIRV, "Fp16 denorm flush and preserve on the same shader"); | 343 | LOG_DEBUG(Shader_SPIRV, "Fp16 denorm flush and preserve on the same shader"); |
| 344 | } else if (info.uses_fp16_denorms_flush) { | 344 | } else if (info.uses_fp16_denorms_flush) { |
| 345 | if (profile.support_fp16_denorm_flush) { | 345 | if (profile.support_fp16_denorm_flush) { |
| 346 | ctx.AddCapability(spv::Capability::DenormFlushToZero); | 346 | ctx.AddCapability(spv::Capability::DenormFlushToZero); |
| @@ -353,13 +353,16 @@ void SetupDenormControl(const Profile& profile, const IR::Program& program, Emit | |||
| 353 | ctx.AddCapability(spv::Capability::DenormPreserve); | 353 | ctx.AddCapability(spv::Capability::DenormPreserve); |
| 354 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::DenormPreserve, 16U); | 354 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::DenormPreserve, 16U); |
| 355 | } else { | 355 | } else { |
| 356 | LOG_WARNING(Shader_SPIRV, "Fp16 denorm preserve used in shader without host support"); | 356 | LOG_DEBUG(Shader_SPIRV, "Fp16 denorm preserve used in shader without host support"); |
| 357 | } | 357 | } |
| 358 | } | 358 | } |
| 359 | } | 359 | } |
| 360 | 360 | ||
| 361 | void SetupSignedNanCapabilities(const Profile& profile, const IR::Program& program, | 361 | void SetupSignedNanCapabilities(const Profile& profile, const IR::Program& program, |
| 362 | EmitContext& ctx, Id main_func) { | 362 | EmitContext& ctx, Id main_func) { |
| 363 | if (profile.has_broken_fp16_float_controls && program.info.uses_fp16) { | ||
| 364 | return; | ||
| 365 | } | ||
| 363 | if (program.info.uses_fp16 && profile.support_fp16_signed_zero_nan_preserve) { | 366 | if (program.info.uses_fp16 && profile.support_fp16_signed_zero_nan_preserve) { |
| 364 | ctx.AddCapability(spv::Capability::SignedZeroInfNanPreserve); | 367 | ctx.AddCapability(spv::Capability::SignedZeroInfNanPreserve); |
| 365 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::SignedZeroInfNanPreserve, 16U); | 368 | ctx.AddExecutionMode(main_func, spv::ExecutionMode::SignedZeroInfNanPreserve, 16U); |