mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 01:02:48 +01:00
Core: Fix warnings in gpu.cpp
This commit is contained in:
parent
cbdf4d4c8e
commit
6cc7c73b80
2 changed files with 7 additions and 7 deletions
|
@ -49,7 +49,7 @@ inline void Write(u32 addr, const T data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_regs[index] = data;
|
g_regs[index] = static_cast<u32>(data);
|
||||||
|
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
|
@ -81,9 +81,9 @@ inline void Write(u32 addr, const T data) {
|
||||||
u8* source_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalInputAddress()));
|
u8* source_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalInputAddress()));
|
||||||
u8* dest_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalOutputAddress()));
|
u8* dest_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalOutputAddress()));
|
||||||
|
|
||||||
for (int y = 0; y < config.output_height; ++y) {
|
for (u32 y = 0; y < config.output_height; ++y) {
|
||||||
// TODO: Why does the register seem to hold twice the framebuffer width?
|
// TODO: Why does the register seem to hold twice the framebuffer width?
|
||||||
for (int x = 0; x < config.output_width; ++x) {
|
for (u32 x = 0; x < config.output_width; ++x) {
|
||||||
struct {
|
struct {
|
||||||
int r, g, b, a;
|
int r, g, b, a;
|
||||||
} source_color = { 0, 0, 0, 0 };
|
} source_color = { 0, 0, 0, 0 };
|
||||||
|
@ -134,10 +134,10 @@ inline void Write(u32 addr, const T data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_LOG(GPU, "DisplayTriggerTransfer: 0x%08x bytes from 0x%08x(%dx%d)-> 0x%08x(%dx%d), dst format %x",
|
DEBUG_LOG(GPU, "DisplayTriggerTransfer: 0x%08x bytes from 0x%08x(%ux%u)-> 0x%08x(%ux%u), dst format %x",
|
||||||
config.output_height * config.output_width * 4,
|
config.output_height * config.output_width * 4,
|
||||||
config.GetPhysicalInputAddress(), (int)config.input_width, (int)config.input_height,
|
config.GetPhysicalInputAddress(), config.input_width, config.input_height,
|
||||||
config.GetPhysicalOutputAddress(), (int)config.output_width, (int)config.output_height,
|
config.GetPhysicalOutputAddress(), config.output_width, config.output_height,
|
||||||
config.output_format.Value());
|
config.output_format.Value());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -516,12 +516,12 @@ struct Regs {
|
||||||
// Used for debugging purposes, so performance is not an issue here
|
// Used for debugging purposes, so performance is not an issue here
|
||||||
static std::string GetCommandName(int index) {
|
static std::string GetCommandName(int index) {
|
||||||
std::map<u32, std::string> map;
|
std::map<u32, std::string> map;
|
||||||
Regs regs;
|
|
||||||
|
|
||||||
// TODO: MSVC does not support using offsetof() on non-static data members even though this
|
// TODO: MSVC does not support using offsetof() on non-static data members even though this
|
||||||
// is technically allowed since C++11. Hence, this functionality is disabled until
|
// is technically allowed since C++11. Hence, this functionality is disabled until
|
||||||
// MSVC properly supports it.
|
// MSVC properly supports it.
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
Regs regs;
|
||||||
#define ADD_FIELD(name) \
|
#define ADD_FIELD(name) \
|
||||||
do { \
|
do { \
|
||||||
map.insert({PICA_REG_INDEX(name), #name}); \
|
map.insert({PICA_REG_INDEX(name), #name}); \
|
||||||
|
|
Loading…
Reference in a new issue