[vk] Reordering PixelFormatNumeric

This commit is contained in:
CamilleLaVey 2025-11-30 18:44:00 -04:00 committed by Caio Oliveira
parent fd40618fd8
commit 679aeb7692
No known key found for this signature in database
GPG Key ID: AAAE6C7FD4186B0C
1 changed files with 15 additions and 13 deletions

View File

@ -51,6 +51,21 @@ using VideoCore::Surface::SurfaceType;
using VideoCore::Surface::PixelFormatNumeric;
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) {
if (color == std::array<float, 4>{0, 0, 0, 0}) {
return VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK;
@ -2316,19 +2331,6 @@ std::optional<u32> ImageView::LayerCountOverride(Shader::TextureType texture_typ
default:
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() {