From 3919b7b8a935174c91927bc0a312cbfee2971583 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Wed, 8 Jan 2020 12:13:05 -0400 Subject: Shader_IR: Corrections, styling and extras. --- src/video_core/shader/decode.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp index dd2f68a3e..d4a10eee5 100644 --- a/src/video_core/shader/decode.cpp +++ b/src/video_core/shader/decode.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include +#include #include #include @@ -64,7 +65,7 @@ std::optional TryDeduceSamplerSize(Sampler& sampler_to_deduce, return std::nullopt; } const u32 base_offset = sampler_to_deduce.GetOffset(); - u32 max_offset{UINT_MAX}; + u32 max_offset{std::numeric_limits::max()}; for (const auto& sampler : used_samplers) { if (sampler.IsBindless()) { continue; @@ -73,7 +74,7 @@ std::optional TryDeduceSamplerSize(Sampler& sampler_to_deduce, max_offset = std::min(sampler.GetOffset(), max_offset); } } - if (max_offset == UINT_MAX) { + if (max_offset == std::numeric_limits::max()) { return std::nullopt; } return ((max_offset - base_offset) * 4) / gpu_driver->GetTextureHandlerSize(); @@ -373,6 +374,7 @@ void ShaderIR::PostDecode() { if (size) { sampler.SetSize(*size); } else { + LOG_CRITICAL(HW_GPU, "Failed to deduce size of indexed sampler"); sampler.SetSize(1); } } -- cgit v1.2.3