VERY experimental Nintendo Switch 2 emulator
C++
[video_core] fix odr violation in formatter for pixelFormat (#3504)
lizzie4eb082485d4d
diff --git a/src/video_core/surface.h b/src/video_core/surface.hindex c659a977c1..5611dbdffa 100644--- a/src/video_core/surface.h+++ b/src/video_core/surface.h@@ -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);