mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-01 12:07:08 +02:00
[vk] Reordering PixelFormatNumeric
This commit is contained in:
parent
6808d613cf
commit
d0b5866ad1
1 changed files with 15 additions and 13 deletions
|
|
@ -51,6 +51,21 @@ using VideoCore::Surface::SurfaceType;
|
||||||
using VideoCore::Surface::PixelFormatNumeric;
|
using VideoCore::Surface::PixelFormatNumeric;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
[[nodiscard]] std::optional<PixelFormatNumeric>
|
||||||
|
ComponentNumericType(Shader::SamplerComponentType component) {
|
||||||
|
switch (component) {
|
||||||
|
case Shader::SamplerComponentType::Float:
|
||||||
|
return PixelFormatNumeric::Float;
|
||||||
|
case Shader::SamplerComponentType::Sint:
|
||||||
|
return PixelFormatNumeric::Sint;
|
||||||
|
case Shader::SamplerComponentType::Uint:
|
||||||
|
return PixelFormatNumeric::Uint;
|
||||||
|
default:
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
|
constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
|
||||||
if (color == std::array<float, 4>{0, 0, 0, 0}) {
|
if (color == std::array<float, 4>{0, 0, 0, 0}) {
|
||||||
return VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK;
|
return VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK;
|
||||||
|
|
@ -2316,19 +2331,6 @@ std::optional<u32> ImageView::LayerCountOverride(Shader::TextureType texture_typ
|
||||||
default:
|
default:
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<PixelFormatNumeric> ComponentNumericType(Shader::SamplerComponentType component) {
|
|
||||||
switch (component) {
|
|
||||||
case Shader::SamplerComponentType::Float:
|
|
||||||
return PixelFormatNumeric::Float;
|
|
||||||
case Shader::SamplerComponentType::Sint:
|
|
||||||
return PixelFormatNumeric::Sint;
|
|
||||||
case Shader::SamplerComponentType::Uint:
|
|
||||||
return PixelFormatNumeric::Uint;
|
|
||||||
default:
|
|
||||||
return std::nullopt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VkImageView ImageView::DepthView() {
|
VkImageView ImageView::DepthView() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue