diff options
Diffstat (limited to '')
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 3b61c9e21..7ab7755f5 100644 --- a/src/video_core/renderer_opengl/gl_arb_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_arb_decompiler.cpp | |||
| @@ -1291,13 +1291,6 @@ std::string ARBDecompiler::Visit(const Node& node) { | |||
| 1291 | return "{0, 0, 0, 0}.x"; | 1291 | return "{0, 0, 0, 0}.x"; |
| 1292 | } | 1292 | } |
| 1293 | 1293 | ||
| 1294 | const auto buffer_index = [this, &abuf]() -> std::string { | ||
| 1295 | if (stage != ShaderType::Geometry) { | ||
| 1296 | return ""; | ||
| 1297 | } | ||
| 1298 | return fmt::format("[{}]", Visit(abuf->GetBuffer())); | ||
| 1299 | }; | ||
| 1300 | |||
| 1301 | const Attribute::Index index = abuf->GetIndex(); | 1294 | const Attribute::Index index = abuf->GetIndex(); |
| 1302 | const u32 element = abuf->GetElement(); | 1295 | const u32 element = abuf->GetElement(); |
| 1303 | const char swizzle = Swizzle(element); | 1296 | const char swizzle = Swizzle(element); |
| @@ -1403,7 +1396,7 @@ std::string ARBDecompiler::Visit(const Node& node) { | |||
| 1403 | return {}; | 1396 | return {}; |
| 1404 | } | 1397 | } |
| 1405 | 1398 | ||
| 1406 | if (const auto cmt = std::get_if<CommentNode>(&*node)) { | 1399 | if ([[maybe_unused]] const auto cmt = std::get_if<CommentNode>(&*node)) { |
| 1407 | // Uncommenting this will generate invalid code. GLASM lacks comments. | 1400 | // Uncommenting this will generate invalid code. GLASM lacks comments. |
| 1408 | // AddLine("// {}", cmt->GetText()); | 1401 | // AddLine("// {}", cmt->GetText()); |
| 1409 | return {}; | 1402 | 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 6a9602ff8..1b1c97239 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -1959,10 +1959,6 @@ private: | |||
| 1959 | return {fmt::format("({} != 0)", carry), Type::Bool}; | 1959 | return {fmt::format("({} != 0)", carry), Type::Bool}; |
| 1960 | } | 1960 | } |
| 1961 | 1961 | ||
| 1962 | Expression LogicalFIsNan(Operation operation) { | ||
| 1963 | return GenerateUnary(operation, "isnan", Type::Bool, Type::Float); | ||
| 1964 | } | ||
| 1965 | |||
| 1966 | Expression LogicalAssign(Operation operation) { | 1962 | Expression LogicalAssign(Operation operation) { |
| 1967 | const Node& dest = operation[0]; | 1963 | const Node& dest = operation[0]; |
| 1968 | const Node& src = operation[1]; | 1964 | const Node& src = operation[1]; |
| @@ -2778,15 +2774,6 @@ private: | |||
| 2778 | return std::min<u32>(device.GetMaxVaryings(), Maxwell::NumVaryings); | 2774 | return std::min<u32>(device.GetMaxVaryings(), Maxwell::NumVaryings); |
| 2779 | } | 2775 | } |
| 2780 | 2776 | ||
| 2781 | bool IsRenderTargetEnabled(u32 render_target) const { | ||
| 2782 | for (u32 component = 0; component < 4; ++component) { | ||
| 2783 | if (header.ps.IsColorComponentOutputEnabled(render_target, component)) { | ||
| 2784 | return true; | ||
| 2785 | } | ||
| 2786 | } | ||
| 2787 | return false; | ||
| 2788 | } | ||
| 2789 | |||
| 2790 | const Device& device; | 2777 | const Device& device; |
| 2791 | const ShaderIR& ir; | 2778 | const ShaderIR& ir; |
| 2792 | const Registry& registry; | 2779 | 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 694452fd8..cd7d7a4e4 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | |||
| @@ -706,9 +706,9 @@ private: | |||
| 706 | } | 706 | } |
| 707 | 707 | ||
| 708 | void DeclareInternalFlags() { | 708 | void DeclareInternalFlags() { |
| 709 | constexpr std::array names = {"zero", "sign", "carry", "overflow"}; | 709 | static constexpr std::array names{"zero", "sign", "carry", "overflow"}; |
| 710 | |||
| 710 | for (std::size_t flag = 0; flag < INTERNAL_FLAGS_COUNT; ++flag) { | 711 | for (std::size_t flag = 0; flag < INTERNAL_FLAGS_COUNT; ++flag) { |
| 711 | const auto flag_code = static_cast<InternalFlag>(flag); | ||
| 712 | const Id id = OpVariable(t_prv_bool, spv::StorageClass::Private, v_false); | 712 | const Id id = OpVariable(t_prv_bool, spv::StorageClass::Private, v_false); |
| 713 | internal_flags[flag] = AddGlobalVariable(Name(id, names[flag])); | 713 | internal_flags[flag] = AddGlobalVariable(Name(id, names[flag])); |
| 714 | } | 714 | } |
| @@ -2804,7 +2804,6 @@ private: | |||
| 2804 | std::map<GlobalMemoryBase, Id> global_buffers; | 2804 | std::map<GlobalMemoryBase, Id> global_buffers; |
| 2805 | std::map<u32, TexelBuffer> uniform_texels; | 2805 | std::map<u32, TexelBuffer> uniform_texels; |
| 2806 | std::map<u32, SampledImage> sampled_images; | 2806 | std::map<u32, SampledImage> sampled_images; |
| 2807 | std::map<u32, TexelBuffer> storage_texels; | ||
| 2808 | std::map<u32, StorageImage> images; | 2807 | std::map<u32, StorageImage> images; |
| 2809 | 2808 | ||
| 2810 | std::array<Id, Maxwell::NumRenderTargets> frag_colors{}; | 2809 | 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 a1cc4756d..7d5a75648 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 |