diff --git a/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp b/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp index b8ca75b0d7..67cbcc0ece 100644 --- a/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp +++ b/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp @@ -2,7 +2,6 @@ #include "GLFragmentProgram.h" #include "Emu/system_config.h" -#include "GLFragmentProgram.h" #include "GLCommonDecompiler.h" #include "../GCM.h" #include "../Common/GLSLCommon.h" diff --git a/rpcs3/Emu/RSX/GL/GLFragmentProgram.h b/rpcs3/Emu/RSX/GL/GLFragmentProgram.h index 4350f568b7..a5586b6a10 100644 --- a/rpcs3/Emu/RSX/GL/GLFragmentProgram.h +++ b/rpcs3/Emu/RSX/GL/GLFragmentProgram.h @@ -64,7 +64,6 @@ public: /** * Decompile a fragment shader located in the PS3's Memory. This function operates synchronously. * @param prog RSXShaderProgram specifying the location and size of the shader in memory - * @param td texture dimensions of input textures */ void Decompile(const RSXFragmentProgram& prog); diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index abd04659d7..4feba073b3 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -3,14 +3,11 @@ #include "../Overlays/Shaders/shader_loading_dialog_native.h" #include "GLGSRender.h" #include "GLCompute.h" -#include "GLVertexProgram.h" #include "Emu/Memory/vm_locking.h" #include "Emu/RSX/rsx_methods.h" #include "../Common/program_state_cache2.hpp" -#define DUMP_VERTEX_DATA 0 - u64 GLGSRender::get_cycles() { return thread_ctrl::get_cycles(static_cast&>(*this)); @@ -588,7 +585,7 @@ void GLGSRender::clear_surface(u32 arg) case rsx::surface_color_format::w16z16y16x16: case rsx::surface_color_format::w32z32y32x32: { - //Nop + // Nop colormask = 0; break; } diff --git a/rpcs3/Emu/RSX/GL/GLHelpers.cpp b/rpcs3/Emu/RSX/GL/GLHelpers.cpp index f64a4424fb..34532b6d26 100644 --- a/rpcs3/Emu/RSX/GL/GLHelpers.cpp +++ b/rpcs3/Emu/RSX/GL/GLHelpers.cpp @@ -447,13 +447,10 @@ namespace gl bool fbo::references_any(const std::vector& resources) const { - for (const auto &e : m_resource_bindings) + return std::any_of(m_resource_bindings.cbegin(), m_resource_bindings.cend(), [&resources](const auto& e) { - if (std::find(resources.begin(), resources.end(), e.second) != resources.end()) - return true; - } - - return false; + return std::find(resources.cbegin(), resources.cend(), e.second) != resources.cend(); + }); } bool is_primitive_native(rsx::primitive_type in) diff --git a/rpcs3/Emu/RSX/GL/GLPipelineCompiler.h b/rpcs3/Emu/RSX/GL/GLPipelineCompiler.h index 6fb8bd51c5..2fa56902b6 100644 --- a/rpcs3/Emu/RSX/GL/GLPipelineCompiler.h +++ b/rpcs3/Emu/RSX/GL/GLPipelineCompiler.h @@ -62,7 +62,7 @@ namespace gl void initialize_pipe_compiler( std::function context_create_func, std::function context_bind_func, - std::function contextdestroy_func, + std::function context_destroy_func, int num_worker_threads = -1); void destroy_pipe_compiler(); diff --git a/rpcs3/Emu/RSX/GL/GLRenderTargets.cpp b/rpcs3/Emu/RSX/GL/GLRenderTargets.cpp index e57470b7bf..cad9529c99 100644 --- a/rpcs3/Emu/RSX/GL/GLRenderTargets.cpp +++ b/rpcs3/Emu/RSX/GL/GLRenderTargets.cpp @@ -95,8 +95,8 @@ u8 rsx::internals::get_pixel_size(rsx::surface_depth_format format) { case rsx::surface_depth_format::z16: return 2; case rsx::surface_depth_format::z24s8: return 4; + default: fmt::throw_exception("Unknown depth format"); } - fmt::throw_exception("Unknown depth format"); } void GLGSRender::init_buffers(rsx::framebuffer_creation_context context, bool /*skip_reading*/) diff --git a/rpcs3/Emu/RSX/GL/GLRenderTargets.h b/rpcs3/Emu/RSX/GL/GLRenderTargets.h index 88a7bb225d..a12dd2efee 100644 --- a/rpcs3/Emu/RSX/GL/GLRenderTargets.h +++ b/rpcs3/Emu/RSX/GL/GLRenderTargets.h @@ -47,8 +47,6 @@ namespace gl { class render_target : public viewable_image, public rsx::ref_counted, public rsx::render_target_descriptor { - u16 surface_pixel_size = 0; - void clear_memory(gl::command_context& cmd); void load_memory(gl::command_context& cmd); void initialize_memory(gl::command_context& cmd, bool read_access); diff --git a/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp b/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp index 5ab2ce588b..6e6e3ea82f 100644 --- a/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp +++ b/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp @@ -194,11 +194,6 @@ namespace gl } } - [[maybe_unused]] ::glsl::shader_properties properties{}; - properties.domain = ::glsl::program_domain::glsl_fragment_program; - properties.require_depth_conversion = true; - properties.require_wpos = true; - u32 len; ParamArray arr; std::string shader_str; diff --git a/rpcs3/Emu/RSX/GL/GLTexture.cpp b/rpcs3/Emu/RSX/GL/GLTexture.cpp index fe204a2fc8..b13ec530a7 100644 --- a/rpcs3/Emu/RSX/GL/GLTexture.cpp +++ b/rpcs3/Emu/RSX/GL/GLTexture.cpp @@ -955,6 +955,7 @@ namespace gl case GL_FLOAT: pack_info.type = GL_HALF_FLOAT; break; + default: break; } } }; diff --git a/rpcs3/Emu/RSX/GL/GLVertexBuffers.cpp b/rpcs3/Emu/RSX/GL/GLVertexBuffers.cpp index 7d01e4c534..77ce02bb19 100644 --- a/rpcs3/Emu/RSX/GL/GLVertexBuffers.cpp +++ b/rpcs3/Emu/RSX/GL/GLVertexBuffers.cpp @@ -58,9 +58,6 @@ namespace struct draw_command_visitor { - using attribute_storage = std::vector< - std::variant>; - draw_command_visitor(gl::ring_buffer& index_ring_buffer, rsx::vertex_input_layout& vertex_layout) : m_index_ring_buffer(index_ring_buffer) , m_vertex_layout(vertex_layout)