diff options
| author | 2020-07-21 00:52:27 -0400 | |
|---|---|---|
| committer | 2020-07-21 00:57:25 -0400 | |
| commit | e17fb5ee97dab16c73b017393b6544847e9aef67 (patch) | |
| tree | 05ac8d70e8516d27062f4940e64d905c95c2b6c5 /src | |
| parent | Merge pull request #4376 from ogniK5377/dark-wait-tree (diff) | |
| download | yuzu-e17fb5ee97dab16c73b017393b6544847e9aef67.tar.gz yuzu-e17fb5ee97dab16c73b017393b6544847e9aef67.tar.xz yuzu-e17fb5ee97dab16c73b017393b6544847e9aef67.zip | |
video_core: Remove unused variables
Silences several compiler warnings about unused variables.
Diffstat (limited to 'src')
8 files changed, 5 insertions, 33 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index 738c6f0c1..bf761abf2 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp | |||
| @@ -44,9 +44,9 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer, | |||
| 44 | dma_pusher.DispatchCalls(); | 44 | dma_pusher.DispatchCalls(); |
| 45 | } else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) { | 45 | } else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) { |
| 46 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); | 46 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); |
| 47 | } else if (const auto data = std::get_if<OnCommandListEndCommand>(&next.data)) { | 47 | } else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) { |
| 48 | renderer.Rasterizer().ReleaseFences(); | 48 | renderer.Rasterizer().ReleaseFences(); |
| 49 | } else if (const auto data = std::get_if<GPUTickCommand>(&next.data)) { | 49 | } else if (std::holds_alternative<GPUTickCommand>(next.data)) { |
| 50 | system.GPU().TickWork(); | 50 | system.GPU().TickWork(); |
| 51 | } else if (const auto data = std::get_if<FlushRegionCommand>(&next.data)) { | 51 | } else if (const auto data = std::get_if<FlushRegionCommand>(&next.data)) { |
| 52 | renderer.Rasterizer().FlushRegion(data->addr, data->size); | 52 | renderer.Rasterizer().FlushRegion(data->addr, data->size); |
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp index 07292702f..c1b9e4ad9 100644 --- a/src/video_core/macro/macro_jit_x64.cpp +++ b/src/video_core/macro/macro_jit_x64.cpp | |||
| @@ -419,7 +419,6 @@ void Tegra::MacroJITx64Impl::Optimizer_ScanFlags() { | |||
| 419 | 419 | ||
| 420 | void MacroJITx64Impl::Compile() { | 420 | void MacroJITx64Impl::Compile() { |
| 421 | MICROPROFILE_SCOPE(MacroJitCompile); | 421 | MICROPROFILE_SCOPE(MacroJitCompile); |
| 422 | bool keep_executing = true; | ||
| 423 | labels.fill(Xbyak::Label()); | 422 | labels.fill(Xbyak::Label()); |
| 424 | 423 | ||
| 425 | Common::X64::ABI_PushRegistersAndAdjustStack(*this, Common::X64::ABI_ALL_CALLEE_SAVED, 8); | 424 | Common::X64::ABI_PushRegistersAndAdjustStack(*this, Common::X64::ABI_ALL_CALLEE_SAVED, 8); |
diff --git a/src/video_core/renderer_opengl/gl_arb_decompiler.cpp b/src/video_core/renderer_opengl/gl_arb_decompiler.cpp index eb5158407..3c17d080e 100644 --- a/src/video_core/renderer_opengl/gl_arb_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_arb_decompiler.cpp | |||
| @@ -1260,13 +1260,6 @@ std::string ARBDecompiler::Visit(const Node& node) { | |||
| 1260 | return "{0, 0, 0, 0}.x"; | 1260 | return "{0, 0, 0, 0}.x"; |
| 1261 | } | 1261 | } |
| 1262 | 1262 | ||
| 1263 | const auto buffer_index = [this, &abuf]() -> std::string { | ||
| 1264 | if (stage != ShaderType::Geometry) { | ||
| 1265 | return ""; | ||
| 1266 | } | ||
| 1267 | return fmt::format("[{}]", Visit(abuf->GetBuffer())); | ||
| 1268 | }; | ||
| 1269 | |||
| 1270 | const Attribute::Index index = abuf->GetIndex(); | 1263 | const Attribute::Index index = abuf->GetIndex(); |
| 1271 | const u32 element = abuf->GetElement(); | 1264 | const u32 element = abuf->GetElement(); |
| 1272 | const char swizzle = Swizzle(element); | 1265 | const char swizzle = Swizzle(element); |
| @@ -1375,7 +1368,7 @@ std::string ARBDecompiler::Visit(const Node& node) { | |||
| 1375 | return {}; | 1368 | return {}; |
| 1376 | } | 1369 | } |
| 1377 | 1370 | ||
| 1378 | if (const auto cmt = std::get_if<CommentNode>(&*node)) { | 1371 | if ([[maybe_unused]] const auto cmt = std::get_if<CommentNode>(&*node)) { |
| 1379 | // Uncommenting this will generate invalid code. GLASM lacks comments. | 1372 | // Uncommenting this will generate invalid code. GLASM lacks comments. |
| 1380 | // AddLine("// {}", cmt->GetText()); | 1373 | // AddLine("// {}", cmt->GetText()); |
| 1381 | return {}; | 1374 | return {}; |
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index f469ed656..28d47a211 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -237,7 +237,6 @@ std::unique_ptr<Shader> Shader::CreateStageFromMemory( | |||
| 237 | const ShaderParameters& params, Maxwell::ShaderProgram program_type, ProgramCode code, | 237 | const ShaderParameters& params, Maxwell::ShaderProgram program_type, ProgramCode code, |
| 238 | ProgramCode code_b, VideoCommon::Shader::AsyncShaders& async_shaders, VAddr cpu_addr) { | 238 | ProgramCode code_b, VideoCommon::Shader::AsyncShaders& async_shaders, VAddr cpu_addr) { |
| 239 | const auto shader_type = GetShaderType(program_type); | 239 | const auto shader_type = GetShaderType(program_type); |
| 240 | const std::size_t size_in_bytes = code.size() * sizeof(u64); | ||
| 241 | 240 | ||
| 242 | auto& gpu = params.system.GPU(); | 241 | auto& gpu = params.system.GPU(); |
| 243 | gpu.ShaderNotify().MarkSharderBuilding(); | 242 | gpu.ShaderNotify().MarkSharderBuilding(); |
| @@ -287,8 +286,6 @@ std::unique_ptr<Shader> Shader::CreateStageFromMemory( | |||
| 287 | 286 | ||
| 288 | std::unique_ptr<Shader> Shader::CreateKernelFromMemory(const ShaderParameters& params, | 287 | std::unique_ptr<Shader> Shader::CreateKernelFromMemory(const ShaderParameters& params, |
| 289 | ProgramCode code) { | 288 | ProgramCode code) { |
| 290 | const std::size_t size_in_bytes = code.size() * sizeof(u64); | ||
| 291 | |||
| 292 | auto& gpu = params.system.GPU(); | 289 | auto& gpu = params.system.GPU(); |
| 293 | gpu.ShaderNotify().MarkSharderBuilding(); | 290 | gpu.ShaderNotify().MarkSharderBuilding(); |
| 294 | 291 | ||
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 2c49aeaac..053bae87b 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -1952,10 +1952,6 @@ private: | |||
| 1952 | return {fmt::format("({} != 0)", carry), Type::Bool}; | 1952 | return {fmt::format("({} != 0)", carry), Type::Bool}; |
| 1953 | } | 1953 | } |
| 1954 | 1954 | ||
| 1955 | Expression LogicalFIsNan(Operation operation) { | ||
| 1956 | return GenerateUnary(operation, "isnan", Type::Bool, Type::Float); | ||
| 1957 | } | ||
| 1958 | |||
| 1959 | Expression LogicalAssign(Operation operation) { | 1955 | Expression LogicalAssign(Operation operation) { |
| 1960 | const Node& dest = operation[0]; | 1956 | const Node& dest = operation[0]; |
| 1961 | const Node& src = operation[1]; | 1957 | const Node& src = operation[1]; |
| @@ -2771,15 +2767,6 @@ private: | |||
| 2771 | return std::min<u32>(device.GetMaxVaryings(), Maxwell::NumVaryings); | 2767 | return std::min<u32>(device.GetMaxVaryings(), Maxwell::NumVaryings); |
| 2772 | } | 2768 | } |
| 2773 | 2769 | ||
| 2774 | bool IsRenderTargetEnabled(u32 render_target) const { | ||
| 2775 | for (u32 component = 0; component < 4; ++component) { | ||
| 2776 | if (header.ps.IsColorComponentOutputEnabled(render_target, component)) { | ||
| 2777 | return true; | ||
| 2778 | } | ||
| 2779 | } | ||
| 2780 | return false; | ||
| 2781 | } | ||
| 2782 | |||
| 2783 | const Device& device; | 2770 | const Device& device; |
| 2784 | const ShaderIR& ir; | 2771 | const ShaderIR& ir; |
| 2785 | const Registry& registry; | 2772 | const Registry& registry; |
diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp index d1f0ea932..81a39a3b8 100644 --- a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp +++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp | |||
| @@ -40,7 +40,6 @@ constexpr std::array POLYGON_OFFSET_ENABLE_LUT = { | |||
| 40 | } // Anonymous namespace | 40 | } // Anonymous namespace |
| 41 | 41 | ||
| 42 | void FixedPipelineState::Fill(const Maxwell& regs, bool has_extended_dynamic_state) { | 42 | void FixedPipelineState::Fill(const Maxwell& regs, bool has_extended_dynamic_state) { |
| 43 | const auto& clip = regs.view_volume_clip_control; | ||
| 44 | const std::array enabled_lut = {regs.polygon_offset_point_enable, | 43 | const std::array enabled_lut = {regs.polygon_offset_point_enable, |
| 45 | regs.polygon_offset_line_enable, | 44 | regs.polygon_offset_line_enable, |
| 46 | regs.polygon_offset_fill_enable}; | 45 | regs.polygon_offset_fill_enable}; |
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp index 97429cc59..54b20fa3d 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | |||
| @@ -700,9 +700,9 @@ private: | |||
| 700 | } | 700 | } |
| 701 | 701 | ||
| 702 | void DeclareInternalFlags() { | 702 | void DeclareInternalFlags() { |
| 703 | constexpr std::array names = {"zero", "sign", "carry", "overflow"}; | 703 | static constexpr std::array names{"zero", "sign", "carry", "overflow"}; |
| 704 | |||
| 704 | for (std::size_t flag = 0; flag < INTERNAL_FLAGS_COUNT; ++flag) { | 705 | for (std::size_t flag = 0; flag < INTERNAL_FLAGS_COUNT; ++flag) { |
| 705 | const auto flag_code = static_cast<InternalFlag>(flag); | ||
| 706 | const Id id = OpVariable(t_prv_bool, spv::StorageClass::Private, v_false); | 706 | const Id id = OpVariable(t_prv_bool, spv::StorageClass::Private, v_false); |
| 707 | internal_flags[flag] = AddGlobalVariable(Name(id, names[flag])); | 707 | internal_flags[flag] = AddGlobalVariable(Name(id, names[flag])); |
| 708 | } | 708 | } |
| @@ -2798,7 +2798,6 @@ private: | |||
| 2798 | std::map<GlobalMemoryBase, Id> global_buffers; | 2798 | std::map<GlobalMemoryBase, Id> global_buffers; |
| 2799 | std::map<u32, TexelBuffer> uniform_texels; | 2799 | std::map<u32, TexelBuffer> uniform_texels; |
| 2800 | std::map<u32, SampledImage> sampled_images; | 2800 | std::map<u32, SampledImage> sampled_images; |
| 2801 | std::map<u32, TexelBuffer> storage_texels; | ||
| 2802 | std::map<u32, StorageImage> images; | 2801 | std::map<u32, StorageImage> images; |
| 2803 | 2802 | ||
| 2804 | std::array<Id, Maxwell::NumRenderTargets> frag_colors{}; | 2803 | std::array<Id, Maxwell::NumRenderTargets> frag_colors{}; |
diff --git a/src/video_core/texture_cache/format_lookup_table.cpp b/src/video_core/texture_cache/format_lookup_table.cpp index f476f03b0..a5d82cf5c 100644 --- a/src/video_core/texture_cache/format_lookup_table.cpp +++ b/src/video_core/texture_cache/format_lookup_table.cpp | |||
| @@ -19,8 +19,6 @@ constexpr auto SNORM = ComponentType::SNORM; | |||
| 19 | constexpr auto UNORM = ComponentType::UNORM; | 19 | constexpr auto UNORM = ComponentType::UNORM; |
| 20 | constexpr auto SINT = ComponentType::SINT; | 20 | constexpr auto SINT = ComponentType::SINT; |
| 21 | constexpr auto UINT = ComponentType::UINT; | 21 | constexpr auto UINT = ComponentType::UINT; |
| 22 | constexpr auto SNORM_FORCE_FP16 = ComponentType::SNORM_FORCE_FP16; | ||
| 23 | constexpr auto UNORM_FORCE_FP16 = ComponentType::UNORM_FORCE_FP16; | ||
| 24 | constexpr auto FLOAT = ComponentType::FLOAT; | 22 | constexpr auto FLOAT = ComponentType::FLOAT; |
| 25 | constexpr bool C = false; // Normal color | 23 | constexpr bool C = false; // Normal color |
| 26 | constexpr bool S = true; // Srgb | 24 | constexpr bool S = true; // Srgb |