mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-07 20:50:58 +00:00
[vk] Reordering PixelFormatNumeric
This commit is contained in:
committed by
Caio Oliveira
parent
fd40618fd8
commit
679aeb7692
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user