[video_core] fix odr violation in formatter for pixelFormat (#3504)

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3504
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
lizzie 2026-05-18 23:54:07 +02:00 committed by crueter
parent 7455854528
commit 4eb082485d
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6

View file

@ -5,6 +5,8 @@
#pragma once
#undef PIXEL_FORMAT_LIST
#include <climits>
#include <utility>
#include "common/assert.h"
@ -128,7 +130,7 @@ namespace VideoCore::Surface {
PIXEL_FORMAT_ELEM(S8_UINT_D24_UNORM, 1, 1, 32) \
PIXEL_FORMAT_ELEM(D32_FLOAT_S8_UINT, 1, 1, 64)
enum class PixelFormat {
enum class PixelFormat : u32 {
#define PIXEL_FORMAT_ELEM(name, ...) name,
PIXEL_FORMAT_LIST
#undef PIXEL_FORMAT_ELEM
@ -192,6 +194,13 @@ constexpr u32 BytesPerBlock(PixelFormat pixel_format) {
return BitsPerBlock(pixel_format) / CHAR_BIT;
}
}
#include "video_core/gpu.h"
#include "video_core/textures/texture.h"
namespace VideoCore::Surface {
SurfaceTarget SurfaceTargetFromTextureType(Tegra::Texture::TextureType texture_type);
bool SurfaceTargetIsLayered(SurfaceTarget target);
bool SurfaceTargetIsArray(SurfaceTarget target);