mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-03-01 15:06:18 +00:00
gpu: do not crash on null debug string
This commit is contained in:
parent
eeb9c67e16
commit
5102e2e391
@ -1116,17 +1116,22 @@ bool GraphicsPipe::setUConfigReg(Queue &queue) {
|
||||
auto data = queue.rptr + 2;
|
||||
|
||||
if (index != 0) {
|
||||
std::println(
|
||||
stderr,
|
||||
"set UConfig regs with index, offset: {:x}, count {}, index {}, {}",
|
||||
offset, len, index,
|
||||
gnm::mmio::registerName(decltype(uConfig)::kMmioOffset + offset));
|
||||
{
|
||||
auto name =
|
||||
gnm::mmio::registerName(decltype(uConfig)::kMmioOffset + offset);
|
||||
std::println(
|
||||
stderr,
|
||||
"set UConfig regs with index, offset: {:x}, count {}, index {}, {}",
|
||||
offset, len, index, name ? name : "<null>");
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < len; ++i) {
|
||||
std::println(
|
||||
stderr, "writing to {} value {:x}",
|
||||
gnm::mmio::registerName(decltype(uConfig)::kMmioOffset + offset + i),
|
||||
data[i]);
|
||||
auto id = decltype(uConfig)::kMmioOffset + offset + i;
|
||||
if (auto regName = gnm::mmio::registerName(id)) {
|
||||
std::println(stderr, "writing to {} value {:x}", regName, data[i]);
|
||||
} else {
|
||||
std::println(stderr, "writing to {:x} value {:x}", id, data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1152,17 +1157,22 @@ bool GraphicsPipe::setContextReg(Queue &queue) {
|
||||
auto data = queue.rptr + 2;
|
||||
|
||||
if (index != 0) {
|
||||
std::println(
|
||||
stderr,
|
||||
"set Context regs with index, offset: {:x}, count {}, index {}, {}",
|
||||
offset, len, index,
|
||||
gnm::mmio::registerName(decltype(context)::kMmioOffset + offset));
|
||||
{
|
||||
auto name =
|
||||
gnm::mmio::registerName(decltype(context)::kMmioOffset + offset);
|
||||
std::println(
|
||||
stderr,
|
||||
"set Context regs with index, offset: {:x}, count {}, index {}, {}",
|
||||
offset, len, index, name ? name : "<null>");
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < len; ++i) {
|
||||
std::println(
|
||||
stderr, "writing to {} value {:x}",
|
||||
gnm::mmio::registerName(decltype(context)::kMmioOffset + offset + i),
|
||||
data[i]);
|
||||
auto id = decltype(context)::kMmioOffset + offset + i;
|
||||
if (auto regName = gnm::mmio::registerName(id)) {
|
||||
std::println(stderr, "writing to {} value {:x}", regName, data[i]);
|
||||
} else {
|
||||
std::println(stderr, "writing to {:x} value {:x}", id, data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user