mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-19 18:37:04 +02:00
[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:
parent
7455854528
commit
4eb082485d
1 changed files with 10 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue