mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
Review fixes + warning fixes
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ubuntu-24.04 gcc (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run
Build RPCS3 / RPCS3 Linux ubuntu-24.04-arm clang (push) Waiting to run
Build RPCS3 / RPCS3 Linux ubuntu-24.04 clang (push) Waiting to run
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ubuntu-24.04 gcc (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run
Build RPCS3 / RPCS3 Linux ubuntu-24.04-arm clang (push) Waiting to run
Build RPCS3 / RPCS3 Linux ubuntu-24.04 clang (push) Waiting to run
This commit is contained in:
parent
e816636676
commit
5526c33d69
9 changed files with 19 additions and 16 deletions
|
@ -195,7 +195,7 @@ struct audio_port
|
||||||
// Handle copy ctor of atomic var
|
// Handle copy ctor of atomic var
|
||||||
audio_port(const audio_port& r)
|
audio_port(const audio_port& r)
|
||||||
{
|
{
|
||||||
std::memcpy(this, &r, sizeof(r));
|
std::memcpy(static_cast<void*>(this), &r, sizeof(r));
|
||||||
}
|
}
|
||||||
|
|
||||||
ENABLE_BITWISE_SERIALIZATION;
|
ENABLE_BITWISE_SERIALIZATION;
|
||||||
|
|
|
@ -4956,9 +4956,9 @@ bool ppu_initialize(const ppu_module<lv2_obj>& info, bool check_only, u64 file_s
|
||||||
return +code_ptr;
|
return +code_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr auto abs_diff = [](u64 a, u64 b) { return a <= b ? b - a : a - b; };
|
[[maybe_unused]] constexpr auto abs_diff = [](u64 a, u64 b) { return a <= b ? b - a : a - b; };
|
||||||
|
|
||||||
auto write_le = [](u8*& code, auto value)
|
[[maybe_unused]] auto write_le = [](u8*& code, auto value)
|
||||||
{
|
{
|
||||||
write_to_ptr<le_t<std::remove_cvref_t<decltype(value)>>>(code, value);
|
write_to_ptr<le_t<std::remove_cvref_t<decltype(value)>>>(code, value);
|
||||||
code += sizeof(value);
|
code += sizeof(value);
|
||||||
|
@ -5823,7 +5823,7 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module<lv2_obj>& module
|
||||||
min_addr = std::min<u32>(min_addr, mod_func.addr);
|
min_addr = std::min<u32>(min_addr, mod_func.addr);
|
||||||
|
|
||||||
// Translate
|
// Translate
|
||||||
if (const auto func = translator.Translate(mod_func))
|
if ([[maybe_unused]] const auto func = translator.Translate(mod_func))
|
||||||
{
|
{
|
||||||
#ifdef ARCH_X64 // TODO
|
#ifdef ARCH_X64 // TODO
|
||||||
// Run optimization passes
|
// Run optimization passes
|
||||||
|
@ -5841,7 +5841,7 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module<lv2_obj>& module
|
||||||
// Run this only in one module for all functions compiled
|
// Run this only in one module for all functions compiled
|
||||||
if (module_part.jit_bounds)
|
if (module_part.jit_bounds)
|
||||||
{
|
{
|
||||||
if (const auto func = translator.GetSymbolResolver(module_part))
|
if ([[maybe_unused]] const auto func = translator.GetSymbolResolver(module_part))
|
||||||
{
|
{
|
||||||
#ifdef ARCH_X64 // TODO
|
#ifdef ARCH_X64 // TODO
|
||||||
// Run optimization passes
|
// Run optimization passes
|
||||||
|
|
|
@ -1237,7 +1237,7 @@ void spu_thread::dump_regs(std::string& ret, std::any& /*custom_data*/) const
|
||||||
|
|
||||||
if (const_value != r)
|
if (const_value != r)
|
||||||
{
|
{
|
||||||
// Expectation of pretictable code path has not been met (such as a branch directly to the instruction)
|
// Expectation of predictable code path has not been met (such as a branch directly to the instruction)
|
||||||
is_const = false;
|
is_const = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1447,7 +1447,7 @@ std::vector<std::pair<u32, u32>> spu_thread::dump_callstack_list() const
|
||||||
if (v != v128::from32r(addr))
|
if (v != v128::from32r(addr))
|
||||||
{
|
{
|
||||||
// 1) Non-zero lower words are invalid (because BRSL-like instructions generate only zeroes)
|
// 1) Non-zero lower words are invalid (because BRSL-like instructions generate only zeroes)
|
||||||
// 2) Bits normally masked out by indirect braches are considered invalid
|
// 2) Bits normally masked out by indirect branches are considered invalid
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,8 @@ namespace rsx
|
||||||
int bpp = 0;
|
int bpp = 0;
|
||||||
bool dirty = false;
|
bool dirty = false;
|
||||||
|
|
||||||
|
image_info_base() {}
|
||||||
|
virtual ~image_info_base() {}
|
||||||
virtual const u8* get_data() const = 0;
|
virtual const u8* get_data() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -46,10 +48,11 @@ namespace rsx
|
||||||
std::vector<u8> data_grey;
|
std::vector<u8> data_grey;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
using image_info_base::image_info_base;
|
||||||
image_info(image_info&) = delete;
|
image_info(image_info&) = delete;
|
||||||
image_info(const std::string& filename, bool grayscaled = false);
|
image_info(const std::string& filename, bool grayscaled = false);
|
||||||
image_info(const std::vector<u8>& bytes, bool grayscaled = false);
|
image_info(const std::vector<u8>& bytes, bool grayscaled = false);
|
||||||
~image_info();
|
virtual ~image_info();
|
||||||
|
|
||||||
void load_data(const std::vector<u8>& bytes, bool grayscaled = false);
|
void load_data(const std::vector<u8>& bytes, bool grayscaled = false);
|
||||||
const u8* get_data() const override { return channels == 4 ? data : data_grey.empty() ? nullptr : data_grey.data(); }
|
const u8* get_data() const override { return channels == 4 ? data : data_grey.empty() ? nullptr : data_grey.data(); }
|
||||||
|
|
|
@ -9,8 +9,11 @@ namespace rsx
|
||||||
{
|
{
|
||||||
struct video_info : public image_info_base
|
struct video_info : public image_info_base
|
||||||
{
|
{
|
||||||
std::vector<u8> data;
|
using image_info_base::image_info_base;
|
||||||
|
virtual ~video_info() {}
|
||||||
const u8* get_data() const override { return data.empty() ? nullptr : data.data(); }
|
const u8* get_data() const override { return data.empty() ? nullptr : data.data(); }
|
||||||
|
|
||||||
|
std::vector<u8> data;
|
||||||
};
|
};
|
||||||
|
|
||||||
class video_view final : public image_view
|
class video_view final : public image_view
|
||||||
|
|
|
@ -23,10 +23,6 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARCH_ARM64
|
|
||||||
#define AVX512_ICL_FUNC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define AVX512_ICL_FUNC
|
#define AVX512_ICL_FUNC
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -402,7 +402,8 @@ namespace vk
|
||||||
upload_heap.unmap();
|
upload_heap.unmap();
|
||||||
|
|
||||||
const VkImageSubresourceRange range = { VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, layers };
|
const VkImageSubresourceRange range = { VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, layers };
|
||||||
VkBufferImageCopy region {
|
VkBufferImageCopy region
|
||||||
|
{
|
||||||
.bufferOffset = offset,
|
.bufferOffset = offset,
|
||||||
.bufferRowLength = w,
|
.bufferRowLength = w,
|
||||||
.bufferImageHeight = h,
|
.bufferImageHeight = h,
|
||||||
|
|
|
@ -23,7 +23,7 @@ public:
|
||||||
void get_image(std::vector<u8>& data, int& w, int& h, int& ch, int& bpp) override;
|
void get_image(std::vector<u8>& data, int& w, int& h, int& ch, int& bpp) override;
|
||||||
bool has_new() const override { return m_has_new; }
|
bool has_new() const override { return m_has_new; }
|
||||||
|
|
||||||
virtual void set_active(bool active);
|
void set_active(bool active) override;
|
||||||
bool get_active() const override { return m_active; }
|
bool get_active() const override { return m_active; }
|
||||||
|
|
||||||
void start_movie();
|
void start_movie();
|
||||||
|
|
|
@ -1192,7 +1192,7 @@ constexpr void write_to_ptr(U&& array, usz pos, const T& value)
|
||||||
{
|
{
|
||||||
static_assert(sizeof(T) % sizeof(array[0]) == 0);
|
static_assert(sizeof(T) % sizeof(array[0]) == 0);
|
||||||
if (!std::is_constant_evaluated())
|
if (!std::is_constant_evaluated())
|
||||||
std::memcpy(&array[pos], &value, sizeof(value));
|
std::memcpy(static_cast<void*>(&array[pos]), &value, sizeof(value));
|
||||||
else
|
else
|
||||||
ensure(!"Unimplemented");
|
ensure(!"Unimplemented");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue