[gl, vk, spv] Added component type handling for texture buffers and resolve pixel format variants

This commit is contained in:
CamilleLaVey
2025-11-30 17:41:38 -04:00
committed by Caio Oliveira
parent 01faf544e8
commit 457beec066
11 changed files with 375 additions and 5 deletions
+11
View File
@@ -4,6 +4,7 @@
#pragma once
#include <climits>
#include <optional>
#include <utility>
#include "common/assert.h"
#include "common/common_types.h"
@@ -517,6 +518,16 @@ bool IsPixelFormatSignedInteger(PixelFormat format);
size_t PixelComponentSizeBitsInteger(PixelFormat format);
enum class PixelFormatNumeric {
Float,
Uint,
Sint,
};
PixelFormatNumeric GetPixelFormatNumericType(PixelFormat format);
std::optional<PixelFormat> FindPixelFormatVariant(PixelFormat format,
PixelFormatNumeric target_numeric);
std::pair<u32, u32> GetASTCBlockSize(PixelFormat format);
u64 TranscodedAstcSize(u64 base_size, PixelFormat format);