mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-23 16:06:30 +00:00
[video_core, hle] remove redundant parent references in system structs (#3908)
reworked a bit to remove references of parent objects and instead pass as arguments to methods to prevent useless reloads Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: maufeat <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3908 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
@@ -407,15 +407,15 @@ void Vic::ReadInterlacedY8__V8U8_N420(const SlotStruct& slot, std::span<const Pl
|
||||
};
|
||||
|
||||
switch (slot.config.deinterlace_mode) {
|
||||
case DXVAHD_DEINTERLACE_MODE_PRIVATE::WEAVE:
|
||||
case DxvhadDeinterlaceModePrivate::Weave:
|
||||
// Due to the fact that we do not write to memory in nvdec, we cannot use Weave as it
|
||||
// relies on the previous frame.
|
||||
DecodeBobField();
|
||||
break;
|
||||
case DXVAHD_DEINTERLACE_MODE_PRIVATE::BOB_FIELD:
|
||||
case DxvhadDeinterlaceModePrivate::BobField:
|
||||
DecodeBobField();
|
||||
break;
|
||||
case DXVAHD_DEINTERLACE_MODE_PRIVATE::DISI1:
|
||||
case DxvhadDeinterlaceModePrivate::Disi1:
|
||||
// Due to the fact that we do not write to memory in nvdec, we cannot use DISI1 as it
|
||||
// relies on previous/next frames.
|
||||
DecodeBobField();
|
||||
@@ -431,13 +431,13 @@ void Vic::ReadInterlacedY8__V8U8_N420(const SlotStruct& slot, std::span<const Pl
|
||||
|
||||
void Vic::ReadY8__V8U8_N420(const SlotStruct& slot, std::span<const PlaneOffsets> offsets, std::shared_ptr<const FFmpeg::Frame> frame, bool planar) noexcept {
|
||||
switch (slot.config.frame_format) {
|
||||
case DXVAHD_FRAME_FORMAT::PROGRESSIVE:
|
||||
case DxvhadFrameFormat::Progressive:
|
||||
ReadProgressiveY8__V8U8_N420(slot, offsets, std::move(frame), planar, false);
|
||||
break;
|
||||
case DXVAHD_FRAME_FORMAT::TOP_FIELD:
|
||||
case DxvhadFrameFormat::TopField:
|
||||
ReadInterlacedY8__V8U8_N420(slot, offsets, std::move(frame), planar, true);
|
||||
break;
|
||||
case DXVAHD_FRAME_FORMAT::BOTTOM_FIELD:
|
||||
case DxvhadFrameFormat::BottomField:
|
||||
ReadInterlacedY8__V8U8_N420(slot, offsets, std::move(frame), planar, false);
|
||||
break;
|
||||
default:
|
||||
@@ -860,7 +860,7 @@ void Vic::WriteY8__V8U8_N420(const OutputSurfaceConfig& output_surface_config) n
|
||||
};
|
||||
|
||||
switch (output_surface_config.out_block_kind) {
|
||||
case BLK_KIND::GENERIC_16Bx2: {
|
||||
case BlkKind::Generic_16Bx2: {
|
||||
u32 const block_height = u32(output_surface_config.out_block_height);
|
||||
auto const out_luma_swizzle_size = Texture::CalculateSize(true, BytesPerPixel, out_luma_width, out_luma_height, 1, block_height, 0);
|
||||
auto const out_chroma_swizzle_size = Texture::CalculateSize(true, BytesPerPixel * 2, out_chroma_width, out_chroma_height, 1, block_height, 0);
|
||||
@@ -889,7 +889,7 @@ void Vic::WriteY8__V8U8_N420(const OutputSurfaceConfig& output_surface_config) n
|
||||
Texture::SwizzleTexture(out_chroma, chroma_scratch, BytesPerPixel, out_chroma_width, out_chroma_height, 1, block_height, 0, 1);
|
||||
}
|
||||
} break;
|
||||
case BLK_KIND::PITCH: {
|
||||
case BlkKind::Pitch: {
|
||||
LOG_TRACE(HW_GPU, "Writing Y8__V8U8_N420 swizzled frame\n"
|
||||
"\tinput surface {}x{} stride {} size {:#X}\n"
|
||||
"\toutput luma {}x{} stride {} size {:#X} block height {} swizzled size 0x{:X}\n",
|
||||
@@ -1032,7 +1032,7 @@ void Vic::WriteABGR(const OutputSurfaceConfig& output_surface_config, VideoPixel
|
||||
};
|
||||
|
||||
switch (output_surface_config.out_block_kind) {
|
||||
case BLK_KIND::GENERIC_16Bx2: {
|
||||
case BlkKind::Generic_16Bx2: {
|
||||
const u32 block_height = u32(output_surface_config.out_block_height);
|
||||
auto const out_swizzle_size = Texture::CalculateSize(true, BytesPerPixel, out_luma_width, out_luma_height, 1, block_height, 0);
|
||||
LOG_TRACE(HW_GPU, "Writing ABGR swizzled frame\n"
|
||||
@@ -1051,7 +1051,7 @@ void Vic::WriteABGR(const OutputSurfaceConfig& output_surface_config, VideoPixel
|
||||
Texture::SwizzleTexture(out_luma, luma_scratch, BytesPerPixel, out_luma_width, out_luma_height, 1, block_height, 0, 1);
|
||||
}
|
||||
} break;
|
||||
case BLK_KIND::PITCH: {
|
||||
case BlkKind::Pitch: {
|
||||
LOG_TRACE(HW_GPU, "Writing ABGR pitch frame\n"
|
||||
"\tinput surface {}x{} stride {} size {:#X}"
|
||||
"\toutput surface {}x{} stride {} size {:#X}",
|
||||
|
||||
Reference in New Issue
Block a user