1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Cleanup and set -Werror=delete-non-virtual-dtor

This commit is contained in:
RipleyTom 2024-03-11 00:31:54 +01:00 committed by Elad.Ash
parent d8d0af2bb3
commit fd583dbbc3
6 changed files with 24 additions and 19 deletions

View File

@ -71,6 +71,7 @@ else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-Werror=inconsistent-missing-override)
add_compile_options(-Werror=delete-non-virtual-dtor)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Werror=suggest-override)
add_compile_options(-Wclobbered)
@ -84,7 +85,6 @@ else()
add_compile_options(-fconstexpr-steps=16777216)
add_compile_options(-Wno-unused-lambda-capture)
add_compile_options(-Wno-unused-private-field)
add_compile_options(-Wno-delete-non-virtual-dtor)
add_compile_options(-Wno-unused-command-line-argument)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wno-class-memaccess)

View File

@ -159,7 +159,7 @@ struct rec_param
static constexpr u32 rec_framerate = 30; // Always 30 fps
static constexpr u32 rec_channels = 2; // Always 2 channels
class rec_video_sink : public utils::video_sink
class rec_video_sink final : public utils::video_sink
{
public:
rec_video_sink() : utils::video_sink()

View File

@ -23,6 +23,7 @@ namespace gl
u32 optimal_kernel_size = 1;
u32 max_invocations_x = 65535;
virtual ~compute_task() = default;
void initialize();
void create();
virtual void destroy();
@ -43,6 +44,7 @@ namespace gl
std::string uniforms, variables, work_kernel, loop_advance, suffix, method_declarations;
cs_shuffle_base();
virtual ~cs_shuffle_base() = default;
void build(const char* function_name, u32 _kernel_size = 0);
@ -51,7 +53,7 @@ namespace gl
void run(gl::command_context& cmd, const gl::buffer* data, u32 data_length, u32 data_offset = 0);
};
struct cs_shuffle_16 : cs_shuffle_base
struct cs_shuffle_16 final : cs_shuffle_base
{
// byteswap ushort
cs_shuffle_16()
@ -60,7 +62,7 @@ namespace gl
}
};
struct cs_shuffle_32 : cs_shuffle_base
struct cs_shuffle_32 final : cs_shuffle_base
{
// byteswap_ulong
cs_shuffle_32()
@ -69,7 +71,7 @@ namespace gl
}
};
struct cs_shuffle_32_16 : cs_shuffle_base
struct cs_shuffle_32_16 final : cs_shuffle_base
{
// byteswap_ulong + byteswap_ushort
cs_shuffle_32_16()
@ -79,7 +81,7 @@ namespace gl
};
template <bool SwapBytes>
struct cs_shuffle_d32fx8_to_x8d24f : cs_shuffle_base
struct cs_shuffle_d32fx8_to_x8d24f final : cs_shuffle_base
{
u32 m_ssbo_length = 0;
@ -91,7 +93,7 @@ namespace gl
};
template <bool SwapBytes>
struct cs_shuffle_x8d24f_to_d32fx8 : cs_shuffle_base
struct cs_shuffle_x8d24f_to_d32fx8 final : cs_shuffle_base
{
u32 m_ssbo_length = 0;
@ -102,9 +104,8 @@ namespace gl
void run(gl::command_context& cmd, const gl::buffer* data, u32 src_offset, u32 dst_offset, u32 num_texels);
};
template<typename From, typename To, bool _SwapSrc = false, bool _SwapDst = false>
struct cs_fconvert_task : cs_shuffle_base
template <typename From, typename To, bool _SwapSrc = false, bool _SwapDst = false>
struct cs_fconvert_task final : cs_shuffle_base
{
u32 m_ssbo_length = 0;
@ -233,7 +234,7 @@ namespace gl
// Reverse morton-order block arrangement
template <typename _BlockType, typename _BaseType, bool _SwapBytes>
struct cs_deswizzle_3d : compute_task
struct cs_deswizzle_3d final : compute_task
{
union params_t
{
@ -355,19 +356,19 @@ namespace gl
virtual void run(gl::command_context& cmd, gl::viewable_image* src, const gl::buffer* dst, u32 out_offset, const coordu& region, const gl::pixel_buffer_layout& layout) = 0;
};
struct cs_d24x8_to_ssbo : cs_image_to_ssbo
struct cs_d24x8_to_ssbo final : cs_image_to_ssbo
{
cs_d24x8_to_ssbo();
void run(gl::command_context& cmd, gl::viewable_image* src, const gl::buffer* dst, u32 out_offset, const coordu& region, const gl::pixel_buffer_layout& layout) override;
};
struct cs_rgba8_to_ssbo : cs_image_to_ssbo
struct cs_rgba8_to_ssbo final : cs_image_to_ssbo
{
cs_rgba8_to_ssbo();
void run(gl::command_context& cmd, gl::viewable_image* src, const gl::buffer* dst, u32 out_offset, const coordu& region, const gl::pixel_buffer_layout& layout) override;
};
struct cs_ssbo_to_color_image : compute_task
struct cs_ssbo_to_color_image final : compute_task
{
cs_ssbo_to_color_image();
void run(gl::command_context& cmd, const buffer* src, const texture_view* dst, const u32 src_offset, const coordu& dst_region, const pixel_buffer_layout& layout);

View File

@ -40,6 +40,8 @@ namespace gl
bool enable_depth_writes = false;
bool enable_stencil_writes = false;
virtual ~overlay_pass() = default;
void create();
void destroy();
@ -60,7 +62,7 @@ namespace gl
void run(gl::command_context& cmd, const areau& region, GLuint target_texture, GLuint image_aspect_bits, bool enable_blending = false);
};
struct ui_overlay_renderer : public overlay_pass
struct ui_overlay_renderer final : public overlay_pass
{
u32 num_elements = 0;
std::vector<std::unique_ptr<gl::texture>> resources;
@ -90,14 +92,14 @@ namespace gl
void run(gl::command_context& cmd, const areau& viewport, GLuint target, rsx::overlays::overlay& ui);
};
struct video_out_calibration_pass : public overlay_pass
struct video_out_calibration_pass final : public overlay_pass
{
video_out_calibration_pass();
void run(gl::command_context& cmd, const areau& viewport, const rsx::simple_array<GLuint>& source, f32 gamma, bool limited_rgb, stereo_render_mode_options stereo_mode, gl::filter input_filter);
};
struct rp_ssbo_to_generic_texture : public overlay_pass
struct rp_ssbo_to_generic_texture final : public overlay_pass
{
rp_ssbo_to_generic_texture();
void run(gl::command_context& cmd, const buffer* src, texture* dst, const u32 src_offset, const coordu& dst_region, const pixel_buffer_layout& layout);

View File

@ -16,6 +16,7 @@ namespace gl
fence m_fence;
public:
virtual ~ring_buffer() = default;
virtual void bind() { buffer::bind(); }
@ -36,7 +37,7 @@ namespace gl
virtual void notify();
};
class legacy_ring_buffer : public ring_buffer
class legacy_ring_buffer final : public ring_buffer
{
u32 m_mapped_bytes = 0;
u32 m_mapping_offset = 0;
@ -62,7 +63,7 @@ namespace gl
// A non-persistent ring buffer
// Internally maps and unmaps data. Uses persistent storage just like the regular persistent variant
// Works around drivers that have issues using mapped data for specific sources (e.g AMD proprietary driver with index buffers)
class transient_ring_buffer : public ring_buffer
class transient_ring_buffer final : public ring_buffer
{
bool dirty = false;

View File

@ -13,6 +13,7 @@ namespace utils
{
public:
video_sink() = default;
virtual ~video_sink() = default;
virtual void stop(bool flush = true) = 0;
virtual void pause(bool flush = true) = 0;