mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-19 18:53:32 +00:00
fix(video_core): Replace assertions with warnings in Fermi2D and BSD sockets
- Fermi2D: Log warnings for unsupported operations, layers, depth, and clip - BSD sockets: Return INVAL for unimplemented getsockopt optnames instead of SUCCESS Co-authored-by: JPikachu <jpikachu.eden@gmail.com> Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -808,8 +808,9 @@ Errno BSD::GetSockOptImpl(s32 fd, u32 level, OptName optname, std::vector<u8>& o
|
|||||||
return Translate(getsockopt_err);
|
return Translate(getsockopt_err);
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
UNIMPLEMENTED_MSG("Unimplemented optname={}", optname);
|
LOG_WARNING(Service, "(STUBBED) Unimplemented optname={} (0x{:x}), returning INVAL",
|
||||||
return Errno::SUCCESS;
|
static_cast<u32>(optname), static_cast<u32>(optname));
|
||||||
|
return Errno::INVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
@@ -65,11 +66,22 @@ void Fermi2D::Blit() {
|
|||||||
LOG_DEBUG(HW_GPU, "called. source address=0x{:x}, destination address=0x{:x}",
|
LOG_DEBUG(HW_GPU, "called. source address=0x{:x}, destination address=0x{:x}",
|
||||||
regs.src.Address(), regs.dst.Address());
|
regs.src.Address(), regs.dst.Address());
|
||||||
|
|
||||||
UNIMPLEMENTED_IF_MSG(regs.operation != Operation::SrcCopy, "Operation is not copy");
|
if (regs.operation != Operation::SrcCopy) {
|
||||||
UNIMPLEMENTED_IF_MSG(regs.src.layer != 0, "Source layer is not zero");
|
LOG_WARNING(HW_GPU, "Operation is not SrcCopy ({}), skipping blit", static_cast<u32>(regs.operation));
|
||||||
UNIMPLEMENTED_IF_MSG(regs.dst.layer != 0, "Destination layer is not zero");
|
return;
|
||||||
UNIMPLEMENTED_IF_MSG(regs.src.depth != 1, "Source depth is not one");
|
}
|
||||||
UNIMPLEMENTED_IF_MSG(regs.clip_enable != 0, "Clipped blit enabled");
|
if (regs.src.layer != 0) {
|
||||||
|
LOG_DEBUG(HW_GPU, "Source layer is {}, expected 0 - using layer 0", regs.src.layer);
|
||||||
|
}
|
||||||
|
if (regs.dst.layer != 0) {
|
||||||
|
LOG_DEBUG(HW_GPU, "Destination layer is {}, expected 0 - using layer 0", regs.dst.layer);
|
||||||
|
}
|
||||||
|
if (regs.src.depth != 1) {
|
||||||
|
LOG_DEBUG(HW_GPU, "Source depth is {}, expected 1 - using first layer", regs.src.depth);
|
||||||
|
}
|
||||||
|
if (regs.clip_enable != 0) {
|
||||||
|
LOG_DEBUG(HW_GPU, "Clipped blit enabled - ignoring clip");
|
||||||
|
}
|
||||||
|
|
||||||
const auto& args = regs.pixels_from_memory;
|
const auto& args = regs.pixels_from_memory;
|
||||||
constexpr s64 null_derivative = 1ULL << 32;
|
constexpr s64 null_derivative = 1ULL << 32;
|
||||||
|
|||||||
Reference in New Issue
Block a user