mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-14 22:08:55 +02:00
Revert "[surface, vk, pipeline, texture_cache] Refactor image view handling and add normalized compatible format utility"
This reverts commit 6a230bec1a.
This commit is contained in:
parent
dd4deb9796
commit
cb19579b44
5 changed files with 9 additions and 169 deletions
|
|
@ -4,8 +4,6 @@
|
|||
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "common/common_types.h"
|
||||
#include "common/math_util.h"
|
||||
#include "common/settings.h"
|
||||
|
|
@ -410,72 +408,6 @@ bool IsPixelFormatSignedInteger(PixelFormat format) {
|
|||
}
|
||||
}
|
||||
|
||||
std::optional<PixelFormat> NormalizedCompatibleFormat(PixelFormat format) {
|
||||
switch (format) {
|
||||
case PixelFormat::A8B8G8R8_UINT:
|
||||
return PixelFormat::A8B8G8R8_UNORM;
|
||||
case PixelFormat::A8B8G8R8_SINT:
|
||||
return PixelFormat::A8B8G8R8_SNORM;
|
||||
case PixelFormat::A2B10G10R10_UINT:
|
||||
return PixelFormat::A2B10G10R10_UNORM;
|
||||
case PixelFormat::R8_UINT:
|
||||
return PixelFormat::R8_UNORM;
|
||||
case PixelFormat::R8_SINT:
|
||||
return PixelFormat::R8_SNORM;
|
||||
case PixelFormat::R8G8_UINT:
|
||||
return PixelFormat::R8G8_UNORM;
|
||||
case PixelFormat::R8G8_SINT:
|
||||
return PixelFormat::R8G8_SNORM;
|
||||
case PixelFormat::R16_UINT:
|
||||
return PixelFormat::R16_UNORM;
|
||||
case PixelFormat::R16_SINT:
|
||||
return PixelFormat::R16_SNORM;
|
||||
case PixelFormat::R16G16_UINT:
|
||||
return PixelFormat::R16G16_UNORM;
|
||||
case PixelFormat::R16G16_SINT:
|
||||
return PixelFormat::R16G16_SNORM;
|
||||
case PixelFormat::R16G16B16A16_UINT:
|
||||
return PixelFormat::R16G16B16A16_UNORM;
|
||||
case PixelFormat::R16G16B16A16_SINT:
|
||||
return PixelFormat::R16G16B16A16_SNORM;
|
||||
default:
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<PixelFormat> IntegerCompatibleFormat(PixelFormat format) {
|
||||
switch (format) {
|
||||
case PixelFormat::A8B8G8R8_UNORM:
|
||||
return PixelFormat::A8B8G8R8_UINT;
|
||||
case PixelFormat::A8B8G8R8_SNORM:
|
||||
return PixelFormat::A8B8G8R8_SINT;
|
||||
case PixelFormat::A2B10G10R10_UNORM:
|
||||
return PixelFormat::A2B10G10R10_UINT;
|
||||
case PixelFormat::R8_UNORM:
|
||||
return PixelFormat::R8_UINT;
|
||||
case PixelFormat::R8_SNORM:
|
||||
return PixelFormat::R8_SINT;
|
||||
case PixelFormat::R8G8_UNORM:
|
||||
return PixelFormat::R8G8_UINT;
|
||||
case PixelFormat::R8G8_SNORM:
|
||||
return PixelFormat::R8G8_SINT;
|
||||
case PixelFormat::R16_UNORM:
|
||||
return PixelFormat::R16_UINT;
|
||||
case PixelFormat::R16_SNORM:
|
||||
return PixelFormat::R16_SINT;
|
||||
case PixelFormat::R16G16_UNORM:
|
||||
return PixelFormat::R16G16_UINT;
|
||||
case PixelFormat::R16G16_SNORM:
|
||||
return PixelFormat::R16G16_SINT;
|
||||
case PixelFormat::R16G16B16A16_UNORM:
|
||||
return PixelFormat::R16G16B16A16_UINT;
|
||||
case PixelFormat::R16G16B16A16_SNORM:
|
||||
return PixelFormat::R16G16B16A16_SINT;
|
||||
default:
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
size_t PixelComponentSizeBitsInteger(PixelFormat format) {
|
||||
switch (format) {
|
||||
case PixelFormat::A8B8G8R8_SINT:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue