diff options
Diffstat (limited to 'src/video_core/shader/decode.cpp')
| -rw-r--r-- | src/video_core/shader/decode.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp index eeac328a6..6576d1208 100644 --- a/src/video_core/shader/decode.cpp +++ b/src/video_core/shader/decode.cpp | |||
| @@ -25,7 +25,7 @@ using Tegra::Shader::OpCode; | |||
| 25 | namespace { | 25 | namespace { |
| 26 | 26 | ||
| 27 | void DeduceTextureHandlerSize(VideoCore::GuestDriverProfile& gpu_driver, | 27 | void DeduceTextureHandlerSize(VideoCore::GuestDriverProfile& gpu_driver, |
| 28 | const std::list<Sampler>& used_samplers) { | 28 | const std::list<SamplerEntry>& used_samplers) { |
| 29 | if (gpu_driver.IsTextureHandlerSizeKnown() || used_samplers.size() <= 1) { | 29 | if (gpu_driver.IsTextureHandlerSizeKnown() || used_samplers.size() <= 1) { |
| 30 | return; | 30 | return; |
| 31 | } | 31 | } |
| @@ -43,9 +43,9 @@ void DeduceTextureHandlerSize(VideoCore::GuestDriverProfile& gpu_driver, | |||
| 43 | } | 43 | } |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | std::optional<u32> TryDeduceSamplerSize(const Sampler& sampler_to_deduce, | 46 | std::optional<u32> TryDeduceSamplerSize(const SamplerEntry& sampler_to_deduce, |
| 47 | VideoCore::GuestDriverProfile& gpu_driver, | 47 | VideoCore::GuestDriverProfile& gpu_driver, |
| 48 | const std::list<Sampler>& used_samplers) { | 48 | const std::list<SamplerEntry>& used_samplers) { |
| 49 | const u32 base_offset = sampler_to_deduce.offset; | 49 | const u32 base_offset = sampler_to_deduce.offset; |
| 50 | u32 max_offset{std::numeric_limits<u32>::max()}; | 50 | u32 max_offset{std::numeric_limits<u32>::max()}; |
| 51 | for (const auto& sampler : used_samplers) { | 51 | for (const auto& sampler : used_samplers) { |
| @@ -66,7 +66,7 @@ std::optional<u32> TryDeduceSamplerSize(const Sampler& sampler_to_deduce, | |||
| 66 | 66 | ||
| 67 | class ASTDecoder { | 67 | class ASTDecoder { |
| 68 | public: | 68 | public: |
| 69 | ASTDecoder(ShaderIR& ir) : ir(ir) {} | 69 | explicit ASTDecoder(ShaderIR& ir_) : ir(ir_) {} |
| 70 | 70 | ||
| 71 | void operator()(ASTProgram& ast) { | 71 | void operator()(ASTProgram& ast) { |
| 72 | ASTNode current = ast.nodes.GetFirst(); | 72 | ASTNode current = ast.nodes.GetFirst(); |
| @@ -153,8 +153,8 @@ void ShaderIR::Decode() { | |||
| 153 | const auto& blocks = shader_info.blocks; | 153 | const auto& blocks = shader_info.blocks; |
| 154 | NodeBlock current_block; | 154 | NodeBlock current_block; |
| 155 | u32 current_label = static_cast<u32>(exit_branch); | 155 | u32 current_label = static_cast<u32>(exit_branch); |
| 156 | for (auto& block : blocks) { | 156 | for (const auto& block : blocks) { |
| 157 | if (shader_info.labels.count(block.start) != 0) { | 157 | if (shader_info.labels.contains(block.start)) { |
| 158 | insert_block(current_block, current_label); | 158 | insert_block(current_block, current_label); |
| 159 | current_block.clear(); | 159 | current_block.clear(); |
| 160 | current_label = block.start; | 160 | current_label = block.start; |