case stupidity in windows

This commit is contained in:
lizzie 2026-05-20 18:38:43 +00:00
parent 800674073f
commit 7dab73c9a2
2 changed files with 42 additions and 42 deletions

View File

@ -407,15 +407,15 @@ void Vic::ReadInterlacedY8__V8U8_N420(const SlotStruct& slot, std::span<const Pl
};
switch (slot.config.deinterlace_mode) {
case DxvhadDeinterlaceModePrivate::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 DxvhadDeinterlaceModePrivate::BOB_FIELD:
case DxvhadDeinterlaceModePrivate::BobField:
DecodeBobField();
break;
case DxvhadDeinterlaceModePrivate::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 DxvhadFrameFormat::PROGRESSIVE:
case DxvhadFrameFormat::Progressive:
ReadProgressiveY8__V8U8_N420(slot, offsets, std::move(frame), planar, false);
break;
case DxvhadFrameFormat::TOP_FIELD:
case DxvhadFrameFormat::TopField:
ReadInterlacedY8__V8U8_N420(slot, offsets, std::move(frame), planar, true);
break;
case DxvhadFrameFormat::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 BlkKind::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 BlkKind::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 BlkKind::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 BlkKind::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}",

View File

@ -136,48 +136,48 @@ enum SurfaceIndex : u32 {
// Note: these will inevitably collide with Win32 defines if you use their UPPER_SNAKE_CASE naming
enum class DxvhadAlphaFillMode : u32 {
OPAQUE = 0,
BACKGROUND = 1,
DESTINATION = 2,
SOURCE_STREAM = 3,
COMPOSITED = 4,
SOURCE_ALPHA = 5,
Opaque = 0,
Background = 1,
Destination = 2,
SourceStream = 3,
Composited = 4,
SourceAlpha = 5,
};
enum class DxvhadFrameFormat : u64 {
PROGRESSIVE = 0,
INTERLACED_TOP_FIELD_FIRST = 1,
INTERLACED_BOTTOM_FIELD_FIRST = 2,
TOP_FIELD = 3,
BOTTOM_FIELD = 4,
SUBPIC_PROGRESSIVE = 5,
SUBPIC_INTERLACED_TOP_FIELD_FIRST = 6,
SUBPIC_INTERLACED_BOTTOM_FIELD_FIRST = 7,
SUBPIC_TOP_FIELD = 8,
SUBPIC_BOTTOM_FIELD = 9,
TOP_FIELD_CHROMA_BOTTOM = 10,
BOTTOM_FIELD_CHROMA_TOP = 11,
SUBPIC_TOP_FIELD_CHROMA_BOTTOM = 12,
SUBPIC_BOTTOM_FIELD_CHROMA_TOP = 13,
Progressive = 0,
InterlacedTopFieldFirst = 1,
InterlacedBottomFieldFirst = 2,
TopField = 3,
BottomField = 4,
SubpicProgressive = 5,
SubpicInterlacedTopFieldFirst = 6,
SubpicInterlacedBottomFieldFirst = 7,
SubpicTopField = 8,
SubpicBottomField = 9,
TopFieldChromaBottom = 10,
BottomFieldChromaTop = 11,
SubpicTopFieldChromaBottom = 12,
SubpicBottomFieldChromaTop = 13,
};
enum class DxvhadDeinterlaceModePrivate : u64 {
WEAVE = 0,
BOB_FIELD = 1,
BOB = 2,
NEWBOB = 3,
DISI1 = 4,
WEAVE_LUMA_BOB_FIELD_CHROMA = 5,
MAX = 0xF,
Weave = 0,
BobField = 1,
Bob = 2,
Newbob = 3,
Disi1 = 4,
WeaveLumaBobFieldChroma = 5,
Max = 0xF,
};
enum class BlkKind {
PITCH = 0,
GENERIC_16Bx2 = 1,
Pitch = 0,
Generic_16Bx2 = 1,
// These are unsupported in the vic
BL_NAIVE = 2,
BL_KEPLER_XBAR_RAW = 3,
VP2_TILED = 15,
BlNaive = 2,
BlKeplerXbarRaw = 3,
Vp2Tiled = 15,
};
enum class BlendSrcFactC : u32 {