mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
rsx: Apply Clang-Tidy fix "performance-unnecessary-value-param"
This commit is contained in:
parent
81a3b49c2f
commit
db926ee671
15 changed files with 23 additions and 23 deletions
|
@ -173,7 +173,7 @@ public:
|
||||||
void AddVecCodeDisasm(const std::string& code = "");
|
void AddVecCodeDisasm(const std::string& code = "");
|
||||||
void AddCodeCondDisasm(const std::string& dst, const std::string& src);
|
void AddCodeCondDisasm(const std::string& dst, const std::string& src);
|
||||||
void AddCodeDisasm(const std::string& code);
|
void AddCodeDisasm(const std::string& code);
|
||||||
void SetDSTDisasm(bool is_sca, std::string value);
|
void SetDSTDisasm(bool is_sca, const std::string& value);
|
||||||
void SetDSTVecDisasm(const std::string& code);
|
void SetDSTVecDisasm(const std::string& code);
|
||||||
void SetDSTScaDisasm(const std::string& code);
|
void SetDSTScaDisasm(const std::string& code);
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ std::string CgBinaryDisasm::GetSRCDisasm(const u32 n)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CgBinaryDisasm::SetDSTDisasm(bool is_sca, std::string value)
|
void CgBinaryDisasm::SetDSTDisasm(bool is_sca, const std::string& value)
|
||||||
{
|
{
|
||||||
is_sca ? AddScaCodeDisasm() : AddVecCodeDisasm();
|
is_sca ? AddScaCodeDisasm() : AddVecCodeDisasm();
|
||||||
|
|
||||||
|
|
|
@ -845,7 +845,7 @@ namespace
|
||||||
std::tuple<T, T, u32> write_index_array_data_to_buffer_impl(gsl::span<T> dst,
|
std::tuple<T, T, u32> write_index_array_data_to_buffer_impl(gsl::span<T> dst,
|
||||||
gsl::span<const be_t<T>> src,
|
gsl::span<const be_t<T>> src,
|
||||||
rsx::primitive_type draw_mode, bool restart_index_enabled, u32 restart_index,
|
rsx::primitive_type draw_mode, bool restart_index_enabled, u32 restart_index,
|
||||||
std::function<bool(rsx::primitive_type)> expands)
|
const std::function<bool(rsx::primitive_type)>& expands)
|
||||||
{
|
{
|
||||||
if (LIKELY(!expands(draw_mode)))
|
if (LIKELY(!expands(draw_mode)))
|
||||||
{
|
{
|
||||||
|
@ -879,7 +879,7 @@ namespace
|
||||||
std::tuple<u32, u32, u32> write_index_array_data_to_buffer(gsl::span<gsl::byte> dst_ptr,
|
std::tuple<u32, u32, u32> write_index_array_data_to_buffer(gsl::span<gsl::byte> dst_ptr,
|
||||||
gsl::span<const gsl::byte> src_ptr,
|
gsl::span<const gsl::byte> src_ptr,
|
||||||
rsx::index_array_type type, rsx::primitive_type draw_mode, bool restart_index_enabled, u32 restart_index,
|
rsx::index_array_type type, rsx::primitive_type draw_mode, bool restart_index_enabled, u32 restart_index,
|
||||||
std::function<bool(rsx::primitive_type)> expands)
|
const std::function<bool(rsx::primitive_type)>& expands)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ u32 get_index_type_size(rsx::index_array_type type);
|
||||||
*/
|
*/
|
||||||
std::tuple<u32, u32, u32> write_index_array_data_to_buffer(gsl::span<gsl::byte> dst, gsl::span<const gsl::byte> src,
|
std::tuple<u32, u32, u32> write_index_array_data_to_buffer(gsl::span<gsl::byte> dst, gsl::span<const gsl::byte> src,
|
||||||
rsx::index_array_type, rsx::primitive_type draw_mode, bool restart_index_enabled, u32 restart_index,
|
rsx::index_array_type, rsx::primitive_type draw_mode, bool restart_index_enabled, u32 restart_index,
|
||||||
std::function<bool(rsx::primitive_type)> expands);
|
const std::function<bool(rsx::primitive_type)>& expands);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write index data needed to emulate non indexed non native primitive mode.
|
* Write index data needed to emulate non indexed non native primitive mode.
|
||||||
|
|
|
@ -140,7 +140,7 @@ void FragmentProgramDecompiler::SetDst(std::string code, u32 flags)
|
||||||
temp_registers[reg_index].tag(dst.dest_reg, !!dst.fp16, dst.mask_x, dst.mask_y, dst.mask_z, dst.mask_w);
|
temp_registers[reg_index].tag(dst.dest_reg, !!dst.fp16, dst.mask_x, dst.mask_y, dst.mask_z, dst.mask_w);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FragmentProgramDecompiler::AddFlowOp(std::string code)
|
void FragmentProgramDecompiler::AddFlowOp(const std::string& code)
|
||||||
{
|
{
|
||||||
//Flow operations can only consider conditionals and have no dst
|
//Flow operations can only consider conditionals and have no dst
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ class FragmentProgramDecompiler
|
||||||
std::string AddCond();
|
std::string AddCond();
|
||||||
std::string AddConst();
|
std::string AddConst();
|
||||||
std::string AddTex();
|
std::string AddTex();
|
||||||
void AddFlowOp(std::string code);
|
void AddFlowOp(const std::string& code);
|
||||||
std::string Format(const std::string& code, bool ignore_redirects = false);
|
std::string Format(const std::string& code, bool ignore_redirects = false);
|
||||||
|
|
||||||
//Technically a temporary workaround until we know what type3 is
|
//Technically a temporary workaround until we know what type3 is
|
||||||
|
|
|
@ -77,7 +77,7 @@ namespace program_common
|
||||||
"}\n\n";
|
"}\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void insert_fog_declaration(std::ostream& OS, const std::string wide_vector_type, const std::string input_coord, bool declare = false)
|
static void insert_fog_declaration(std::ostream& OS, const std::string& wide_vector_type, const std::string& input_coord, bool declare = false)
|
||||||
{
|
{
|
||||||
std::string template_body;
|
std::string template_body;
|
||||||
|
|
||||||
|
|
|
@ -237,14 +237,14 @@ namespace gl
|
||||||
clear(buffers_);
|
clear(buffers_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fbo::copy_from(const void* pixels, sizei size, gl::texture::format format_, gl::texture::type type_, class pixel_unpack_settings pixel_settings) const
|
void fbo::copy_from(const void* pixels, const sizei& size, gl::texture::format format_, gl::texture::type type_, class pixel_unpack_settings pixel_settings) const
|
||||||
{
|
{
|
||||||
save_binding_state save(*this);
|
save_binding_state save(*this);
|
||||||
pixel_settings.apply();
|
pixel_settings.apply();
|
||||||
glDrawPixels(size.width, size.height, (GLenum)format_, (GLenum)type_, pixels);
|
glDrawPixels(size.width, size.height, (GLenum)format_, (GLenum)type_, pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fbo::copy_from(const buffer& buf, sizei size, gl::texture::format format_, gl::texture::type type_, class pixel_unpack_settings pixel_settings) const
|
void fbo::copy_from(const buffer& buf, const sizei& size, gl::texture::format format_, gl::texture::type type_, class pixel_unpack_settings pixel_settings) const
|
||||||
{
|
{
|
||||||
save_binding_state save(*this);
|
save_binding_state save(*this);
|
||||||
buffer::save_binding_state save_buffer(buffer::target::pixel_unpack, buf);
|
buffer::save_binding_state save_buffer(buffer::target::pixel_unpack, buf);
|
||||||
|
@ -301,7 +301,7 @@ namespace gl
|
||||||
m_id = id;
|
m_id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fbo::set_extents(size2i extents)
|
void fbo::set_extents(const size2i& extents)
|
||||||
{
|
{
|
||||||
m_size = extents;
|
m_size = extents;
|
||||||
}
|
}
|
||||||
|
|
|
@ -848,7 +848,7 @@ namespace gl
|
||||||
return created();
|
return created();
|
||||||
}
|
}
|
||||||
|
|
||||||
void map(std::function<void(GLubyte*)> impl, access access_)
|
void map(const std::function<void(GLubyte*)>& impl, access access_)
|
||||||
{
|
{
|
||||||
target target_ = current_target();
|
target target_ = current_target();
|
||||||
save_binding_state save(target_, *this);
|
save_binding_state save(target_, *this);
|
||||||
|
@ -2298,8 +2298,8 @@ public:
|
||||||
void clear(buffers buffers_) const;
|
void clear(buffers buffers_) const;
|
||||||
void clear(buffers buffers_, color4f color_value, double depth_value, u8 stencil_value) const;
|
void clear(buffers buffers_, color4f color_value, double depth_value, u8 stencil_value) const;
|
||||||
|
|
||||||
void copy_from(const void* pixels, sizei size, gl::texture::format format_, gl::texture::type type_, class pixel_unpack_settings pixel_settings = pixel_unpack_settings()) const;
|
void copy_from(const void* pixels, const sizei& size, gl::texture::format format_, gl::texture::type type_, class pixel_unpack_settings pixel_settings = pixel_unpack_settings()) const;
|
||||||
void copy_from(const buffer& buf, sizei size, gl::texture::format format_, gl::texture::type type_, class pixel_unpack_settings pixel_settings = pixel_unpack_settings()) const;
|
void copy_from(const buffer& buf, const sizei& size, gl::texture::format format_, gl::texture::type type_, class pixel_unpack_settings pixel_settings = pixel_unpack_settings()) const;
|
||||||
|
|
||||||
void copy_to(void* pixels, coordi coord, gl::texture::format format_, gl::texture::type type_, class pixel_pack_settings pixel_settings = pixel_pack_settings()) const;
|
void copy_to(void* pixels, coordi coord, gl::texture::format format_, gl::texture::type type_, class pixel_pack_settings pixel_settings = pixel_pack_settings()) const;
|
||||||
void copy_to(const buffer& buf, coordi coord, gl::texture::format format_, gl::texture::type type_, class pixel_pack_settings pixel_settings = pixel_pack_settings()) const;
|
void copy_to(const buffer& buf, coordi coord, gl::texture::format format_, gl::texture::type type_, class pixel_pack_settings pixel_settings = pixel_pack_settings()) const;
|
||||||
|
@ -2311,7 +2311,7 @@ public:
|
||||||
GLuint id() const;
|
GLuint id() const;
|
||||||
void set_id(GLuint id);
|
void set_id(GLuint id);
|
||||||
|
|
||||||
void set_extents(size2i extents);
|
void set_extents(const size2i& extents);
|
||||||
size2i get_extents() const;
|
size2i get_extents() const;
|
||||||
|
|
||||||
bool matches(const std::array<GLuint, 4>& color_targets, GLuint depth_stencil_target) const;
|
bool matches(const std::array<GLuint, 4>& color_targets, GLuint depth_stencil_target) const;
|
||||||
|
|
|
@ -204,7 +204,7 @@ namespace rsx
|
||||||
case CELL_MSGDIALOG_TYPE_BUTTON_TYPE_YESNO: interactive = true; break;
|
case CELL_MSGDIALOG_TYPE_BUTTON_TYPE_YESNO: interactive = true; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->on_close = on_close;
|
this->on_close = std::move(on_close);
|
||||||
if (interactive)
|
if (interactive)
|
||||||
{
|
{
|
||||||
thread_ctrl::spawn("dialog input thread", [&] {
|
thread_ctrl::spawn("dialog input thread", [&] {
|
||||||
|
|
|
@ -165,7 +165,7 @@ namespace rsx
|
||||||
|
|
||||||
void perf_metrics_overlay::set_font(std::string font)
|
void perf_metrics_overlay::set_font(std::string font)
|
||||||
{
|
{
|
||||||
m_font = font;
|
m_font = std::move(font);
|
||||||
|
|
||||||
if (m_is_initialised)
|
if (m_is_initialised)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1613,7 +1613,7 @@ namespace rsx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void thread::get_current_fragment_program_legacy(std::function<std::tuple<bool, u16>(u32, fragment_texture&, bool)> get_surface_info)
|
void thread::get_current_fragment_program_legacy(const std::function<std::tuple<bool, u16>(u32, fragment_texture&, bool)>& get_surface_info)
|
||||||
{
|
{
|
||||||
auto &result = current_fragment_program = {};
|
auto &result = current_fragment_program = {};
|
||||||
|
|
||||||
|
|
|
@ -566,7 +566,7 @@ namespace rsx
|
||||||
* returns whether surface is a render target and surface pitch in native format
|
* returns whether surface is a render target and surface pitch in native format
|
||||||
*/
|
*/
|
||||||
void get_current_fragment_program(const std::array<std::unique_ptr<rsx::sampled_image_descriptor_base>, rsx::limits::fragment_textures_count>& sampler_descriptors);
|
void get_current_fragment_program(const std::array<std::unique_ptr<rsx::sampled_image_descriptor_base>, rsx::limits::fragment_textures_count>& sampler_descriptors);
|
||||||
void get_current_fragment_program_legacy(std::function<std::tuple<bool, u16>(u32, fragment_texture&, bool)> get_surface_info);
|
void get_current_fragment_program_legacy(const std::function<std::tuple<bool, u16>(u32, fragment_texture&, bool)>& get_surface_info);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
double fps_limit = 59.94;
|
double fps_limit = 59.94;
|
||||||
|
@ -688,7 +688,7 @@ namespace rsx
|
||||||
std::function<bool()> callback;
|
std::function<bool()> callback;
|
||||||
//std::promise<void> promise;
|
//std::promise<void> promise;
|
||||||
|
|
||||||
internal_task_entry(std::function<bool()> callback) : callback(callback)
|
internal_task_entry(std::function<bool()> callback) : callback(std::move(callback))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -220,7 +220,7 @@ namespace vk
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void load_program(vk::command_buffer cmd, VkRenderPass pass, const std::vector<vk::image_view*>& src)
|
void load_program(const vk::command_buffer& cmd, VkRenderPass pass, const std::vector<vk::image_view*>& src)
|
||||||
{
|
{
|
||||||
vk::glsl::program *program = nullptr;
|
vk::glsl::program *program = nullptr;
|
||||||
auto found = m_program_cache.find(pass);
|
auto found = m_program_cache.find(pass);
|
||||||
|
|
|
@ -501,8 +501,8 @@ namespace rsx
|
||||||
};
|
};
|
||||||
|
|
||||||
shaders_cache(backend_storage& storage, std::string pipeline_class, std::string version_prefix_str = "v1")
|
shaders_cache(backend_storage& storage, std::string pipeline_class, std::string version_prefix_str = "v1")
|
||||||
: version_prefix(version_prefix_str)
|
: version_prefix(std::move(version_prefix_str))
|
||||||
, pipeline_class_name(pipeline_class)
|
, pipeline_class_name(std::move(pipeline_class))
|
||||||
, m_storage(storage)
|
, m_storage(storage)
|
||||||
{
|
{
|
||||||
if (!g_cfg.video.disable_on_disk_shader_cache)
|
if (!g_cfg.video.disable_on_disk_shader_cache)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue