Vulkan: Shader path for framebuffer-to-texture copy

Part 1 in a series of changes to perform image copies on the GPU.

Bug: angleproject:2958
Change-Id: I6264a880865c4738c0866f2dc71af63425fc4118
Reviewed-on: https://chromium-review.googlesource.com/c/1370724
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Shahbaz Youssefi 2018-12-09 03:48:34 +01:00 коммит произвёл Commit Bot
Родитель d7969cdd40
Коммит f83a28a688
34 изменённых файлов: 2058 добавлений и 307 удалений

Просмотреть файл

@ -32,6 +32,7 @@ struct Format final : private angle::NonCopyable
GLuint greenBits,
GLuint blueBits,
GLuint alphaBits,
GLuint luminanceBits,
GLuint depthBits,
GLuint stencilBits,
GLuint pixelBytes,
@ -42,8 +43,15 @@ struct Format final : private angle::NonCopyable
static FormatID InternalFormatToID(GLenum internalFormat);
constexpr bool hasDepthOrStencilBits() const;
constexpr bool isLUMA() const;
constexpr GLuint channelCount() const;
constexpr bool isInt() const;
constexpr bool isUint() const;
constexpr bool isSnorm() const;
constexpr bool isUnorm() const;
constexpr bool isFloat() const;
bool operator==(const Format &other) const { return this->id == other.id; }
FormatID id;
@ -70,6 +78,7 @@ struct Format final : private angle::NonCopyable
GLuint greenBits;
GLuint blueBits;
GLuint alphaBits;
GLuint luminanceBits;
GLuint depthBits;
GLuint stencilBits;
@ -91,6 +100,7 @@ constexpr Format::Format(FormatID id,
GLuint greenBits,
GLuint blueBits,
GLuint alphaBits,
GLuint luminanceBits,
GLuint depthBits,
GLuint stencilBits,
GLuint pixelBytes,
@ -108,6 +118,7 @@ constexpr Format::Format(FormatID id,
greenBits(greenBits),
blueBits(blueBits),
alphaBits(alphaBits),
luminanceBits(luminanceBits),
depthBits(depthBits),
stencilBits(stencilBits),
pixelBytes(pixelBytes),
@ -120,11 +131,44 @@ constexpr bool Format::hasDepthOrStencilBits() const
return depthBits > 0 || stencilBits > 0;
}
constexpr bool Format::isLUMA() const
{
// There's no format with G or B without R
ASSERT(redBits > 0 || (greenBits == 0 && blueBits == 0));
return redBits == 0 && (luminanceBits > 0 || alphaBits > 0);
}
constexpr GLuint Format::channelCount() const
{
return (redBits > 0) + (greenBits > 0) + (blueBits > 0) + (alphaBits > 0) + (depthBits > 0) +
(stencilBits > 0);
return (redBits > 0) + (greenBits > 0) + (blueBits > 0) + (alphaBits > 0) +
(luminanceBits > 0) + (depthBits > 0) + (stencilBits > 0);
}
constexpr bool Format::isInt() const
{
return componentType == GL_INT;
}
constexpr bool Format::isUint() const
{
return componentType == GL_UNSIGNED_INT;
}
constexpr bool Format::isSnorm() const
{
return componentType == GL_SIGNED_NORMALIZED;
}
constexpr bool Format::isUnorm() const
{
return componentType == GL_UNSIGNED_NORMALIZED;
}
constexpr bool Format::isFloat() const
{
return componentType == GL_FLOAT;
}
} // namespace angle
#include "libANGLE/renderer/FormatID_autogen.inc"

Просмотреть файл

@ -24,183 +24,183 @@ static constexpr rx::FastCopyFunctionMap NoCopyFunctions;
constexpr Format g_formatInfoTable[] = {
// clang-format off
{ FormatID::NONE, GL_NONE, GL_NONE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_NONE, 0, 0, 0, 0, 0, 0, 0, false, false },
{ FormatID::A16_FLOAT, GL_ALPHA16F_EXT, GL_ALPHA16F_EXT, GenerateMip<A16F>, NoCopyFunctions, ReadColor<A16F, GLfloat>, WriteColor<A16F, GLfloat>, GL_FLOAT, 0, 0, 0, 16, 0, 0, 2, false, false },
{ FormatID::A1R5G5B5_UNORM, GL_A1RGB5_ANGLEX, GL_A1RGB5_ANGLEX, GenerateMip<A1R5G5B5>, NoCopyFunctions, ReadColor<A1R5G5B5, GLfloat>, WriteColor<A1R5G5B5, GLfloat>, GL_UNSIGNED_NORMALIZED, 5, 5, 5, 1, 0, 0, 2, false, false },
{ FormatID::A32_FLOAT, GL_ALPHA32F_EXT, GL_ALPHA32F_EXT, GenerateMip<A32F>, NoCopyFunctions, ReadColor<A32F, GLfloat>, WriteColor<A32F, GLfloat>, GL_FLOAT, 0, 0, 0, 32, 0, 0, 4, false, false },
{ FormatID::A8_UNORM, GL_ALPHA8_EXT, GL_ALPHA8_EXT, GenerateMip<A8>, NoCopyFunctions, ReadColor<A8, GLfloat>, WriteColor<A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 8, 0, 0, 1, false, false },
{ FormatID::ASTC_10x10_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x10_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x10_KHR, GL_COMPRESSED_RGBA_ASTC_10x10_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x5_KHR, GL_COMPRESSED_RGBA_ASTC_10x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x6_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x6_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x6_KHR, GL_COMPRESSED_RGBA_ASTC_10x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x8_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x8_KHR, GL_COMPRESSED_RGBA_ASTC_10x8_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_12x10_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_12x10_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_12x10_KHR, GL_COMPRESSED_RGBA_ASTC_12x10_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_12x12_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_12x12_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_12x12_KHR, GL_COMPRESSED_RGBA_ASTC_12x12_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_4x4_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_4x4_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_4x4_KHR, GL_COMPRESSED_RGBA_ASTC_4x4_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_5x4_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_5x4_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_5x4_KHR, GL_COMPRESSED_RGBA_ASTC_5x4_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_5x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_5x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_5x5_KHR, GL_COMPRESSED_RGBA_ASTC_5x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_6x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_6x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_6x5_KHR, GL_COMPRESSED_RGBA_ASTC_6x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_6x6_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_6x6_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_6x6_KHR, GL_COMPRESSED_RGBA_ASTC_6x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_8x5_KHR, GL_COMPRESSED_RGBA_ASTC_8x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x6_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x6_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_8x6_KHR, GL_COMPRESSED_RGBA_ASTC_8x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x8_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_8x8_KHR, GL_COMPRESSED_RGBA_ASTC_8x8_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::B4G4R4A4_UNORM, GL_BGRA4_ANGLEX, GL_RGBA4, GenerateMip<A4R4G4B4>, NoCopyFunctions, ReadColor<A4R4G4B4, GLfloat>, WriteColor<A4R4G4B4, GLfloat>, GL_UNSIGNED_NORMALIZED, 4, 4, 4, 4, 0, 0, 2, false, false },
{ FormatID::B5G5R5A1_UNORM, GL_BGR5_A1_ANGLEX, GL_RGB5_A1, GenerateMip<A1R5G5B5>, NoCopyFunctions, ReadColor<A1R5G5B5, GLfloat>, WriteColor<A1R5G5B5, GLfloat>, GL_UNSIGNED_NORMALIZED, 5, 5, 5, 1, 0, 0, 2, false, false },
{ FormatID::B5G6R5_UNORM, GL_BGR565_ANGLEX, GL_RGB565, GenerateMip<B5G6R5>, NoCopyFunctions, ReadColor<B5G6R5, GLfloat>, WriteColor<B5G6R5, GLfloat>, GL_UNSIGNED_NORMALIZED, 5, 6, 5, 0, 0, 0, 2, false, false },
{ FormatID::B8G8R8A8_TYPELESS, GL_BGRA8_EXT, GL_BGRA8_EXT, GenerateMip<B8G8R8A8>, NoCopyFunctions, ReadColor<B8G8R8A8, GLfloat>, WriteColor<B8G8R8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::B8G8R8A8_TYPELESS_SRGB, GL_BGRA8_SRGB_ANGLEX, GL_BGRA8_SRGB_ANGLEX, GenerateMip<B8G8R8A8>, NoCopyFunctions, ReadColor<B8G8R8A8, GLfloat>, WriteColor<B8G8R8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::B8G8R8A8_UNORM, GL_BGRA8_EXT, GL_BGRA8_EXT, GenerateMip<B8G8R8A8>, BGRACopyFunctions, ReadColor<B8G8R8A8, GLfloat>, WriteColor<B8G8R8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::B8G8R8A8_UNORM_SRGB, GL_BGRA8_SRGB_ANGLEX, GL_BGRA8_SRGB_ANGLEX, GenerateMip<B8G8R8A8>, NoCopyFunctions, ReadColor<B8G8R8A8, GLfloat>, WriteColor<B8G8R8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::B8G8R8X8_UNORM, GL_BGRA8_EXT, GL_BGRA8_EXT, GenerateMip<B8G8R8X8>, NoCopyFunctions, ReadColor<B8G8R8X8, GLfloat>, WriteColor<B8G8R8X8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::BC1_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC1_RGBA_UNORM_SRGB_BLOCK, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC1_RGB_UNORM_BLOCK, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC1_RGB_UNORM_SRGB_BLOCK, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC2_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC2_RGBA_UNORM_SRGB_BLOCK, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC3_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC3_RGBA_UNORM_SRGB_BLOCK, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BPTC_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_BPTC_UNORM_EXT, GL_COMPRESSED_RGBA_BPTC_UNORM_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BPTC_RGB_SIGNED_FLOAT_BLOCK, GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_FLOAT, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BPTC_RGB_UNSIGNED_FLOAT_BLOCK, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_FLOAT, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BPTC_SRGB_ALPHA_UNORM_BLOCK, GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT, GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::D16_UNORM, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT16, nullptr, NoCopyFunctions, ReadDepthStencil<D16>, WriteDepthStencil<D16>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 16, 0, 2, false, false },
{ FormatID::D24_UNORM_S8_UINT, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, nullptr, NoCopyFunctions, ReadDepthStencil<D24S8>, WriteDepthStencil<D24S8>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 24, 8, 4, false, false },
{ FormatID::D24_UNORM_X8_UINT, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT24, nullptr, NoCopyFunctions, ReadDepthStencil<D24>, WriteDepthStencil<D24>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 24, 0, 4, false, false },
{ FormatID::D32_FLOAT, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT32F, nullptr, NoCopyFunctions, ReadDepthStencil<D32F>, WriteDepthStencil<D32F>, GL_FLOAT, 0, 0, 0, 0, 32, 0, 4, false, false },
{ FormatID::D32_FLOAT_S8X24_UINT, GL_DEPTH32F_STENCIL8, GL_DEPTH32F_STENCIL8, nullptr, NoCopyFunctions, ReadDepthStencil<D32FS8>, WriteDepthStencil<D32FS8>, GL_FLOAT, 0, 0, 0, 0, 32, 8, 8, false, false },
{ FormatID::D32_UNORM, GL_DEPTH_COMPONENT32_OES, GL_DEPTH_COMPONENT32_OES, nullptr, NoCopyFunctions, ReadDepthStencil<D32>, WriteDepthStencil<D32>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 32, 0, 4, false, false },
{ FormatID::EAC_R11G11_SNORM_BLOCK, GL_COMPRESSED_SIGNED_RG11_EAC, GL_COMPRESSED_SIGNED_RG11_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_SIGNED_NORMALIZED, 11, 11, 0, 0, 0, 0, 2, true, false },
{ FormatID::EAC_R11G11_UNORM_BLOCK, GL_COMPRESSED_RG11_EAC, GL_COMPRESSED_RG11_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 11, 11, 0, 0, 0, 0, 2, true, false },
{ FormatID::EAC_R11_SNORM_BLOCK, GL_COMPRESSED_SIGNED_R11_EAC, GL_COMPRESSED_SIGNED_R11_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_SIGNED_NORMALIZED, 11, 0, 0, 0, 0, 0, 1, true, false },
{ FormatID::EAC_R11_UNORM_BLOCK, GL_COMPRESSED_R11_EAC, GL_COMPRESSED_R11_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 11, 0, 0, 0, 0, 0, 1, true, false },
{ FormatID::ETC1_LOSSY_DECODE_R8G8B8_UNORM_BLOCK, GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 3, true, false },
{ FormatID::ETC1_R8G8B8_UNORM_BLOCK, GL_ETC1_RGB8_OES, GL_ETC1_RGB8_OES, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 3, true, false },
{ FormatID::ETC2_R8G8B8A1_SRGB_BLOCK, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 1, 0, 0, 3, true, false },
{ FormatID::ETC2_R8G8B8A1_UNORM_BLOCK, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 1, 0, 0, 3, true, false },
{ FormatID::ETC2_R8G8B8A8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 4, true, false },
{ FormatID::ETC2_R8G8B8A8_UNORM_BLOCK, GL_COMPRESSED_RGBA8_ETC2_EAC, GL_COMPRESSED_RGBA8_ETC2_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 4, true, false },
{ FormatID::ETC2_R8G8B8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ETC2, GL_COMPRESSED_SRGB8_ETC2, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 3, true, false },
{ FormatID::ETC2_R8G8B8_UNORM_BLOCK, GL_COMPRESSED_RGB8_ETC2, GL_COMPRESSED_RGB8_ETC2, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 3, true, false },
{ FormatID::L16A16_FLOAT, GL_LUMINANCE_ALPHA16F_EXT, GL_LUMINANCE_ALPHA16F_EXT, GenerateMip<L16A16F>, NoCopyFunctions, ReadColor<L16A16F, GLfloat>, WriteColor<L16A16F, GLfloat>, GL_FLOAT, 0, 0, 0, 16, 0, 0, 4, false, false },
{ FormatID::L16_FLOAT, GL_LUMINANCE16F_EXT, GL_LUMINANCE16F_EXT, GenerateMip<L16F>, NoCopyFunctions, ReadColor<L16F, GLfloat>, WriteColor<L16F, GLfloat>, GL_FLOAT, 0, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::L32A32_FLOAT, GL_LUMINANCE_ALPHA32F_EXT, GL_LUMINANCE_ALPHA32F_EXT, GenerateMip<L32A32F>, NoCopyFunctions, ReadColor<L32A32F, GLfloat>, WriteColor<L32A32F, GLfloat>, GL_FLOAT, 0, 0, 0, 32, 0, 0, 8, false, false },
{ FormatID::L32_FLOAT, GL_LUMINANCE32F_EXT, GL_LUMINANCE32F_EXT, GenerateMip<L32F>, NoCopyFunctions, ReadColor<L32F, GLfloat>, WriteColor<L32F, GLfloat>, GL_FLOAT, 0, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::L8A8_UNORM, GL_LUMINANCE8_ALPHA8_EXT, GL_LUMINANCE8_ALPHA8_EXT, GenerateMip<L8A8>, NoCopyFunctions, ReadColor<L8A8, GLfloat>, WriteColor<L8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 8, 0, 0, 2, false, false },
{ FormatID::L8_UNORM, GL_LUMINANCE8_EXT, GL_LUMINANCE8_EXT, GenerateMip<L8>, NoCopyFunctions, ReadColor<L8, GLfloat>, WriteColor<L8, GLfloat>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R10G10B10A2_SINT, GL_RGB10_A2_SINT_ANGLEX, GL_RGB10_A2_SINT_ANGLEX, GenerateMip<R10G10B10A2S>, NoCopyFunctions, ReadColor<R10G10B10A2S, GLint>, WriteColor<R10G10B10A2S, GLint>, GL_INT, 10, 10, 10, 2, 0, 0, 4, false, false },
{ FormatID::R10G10B10A2_SNORM, GL_RGB10_A2_SNORM_ANGLEX, GL_RGB10_A2_SNORM_ANGLEX, GenerateMip<R10G10B10A2S>, NoCopyFunctions, ReadColor<R10G10B10A2S, GLfloat>, WriteColor<R10G10B10A2S, GLfloat>, GL_SIGNED_NORMALIZED, 10, 10, 10, 2, 0, 0, 4, false, false },
{ FormatID::R10G10B10A2_SSCALED, GL_RGB10_A2_SSCALED_ANGLEX, GL_RGB10_A2_SSCALED_ANGLEX, GenerateMip<R10G10B10A2S>, NoCopyFunctions, ReadColor<R10G10B10A2S, GLint>, WriteColor<R10G10B10A2S, GLint>, GL_INT, 10, 10, 10, 2, 0, 0, 4, false, false },
{ FormatID::R10G10B10A2_UINT, GL_RGB10_A2UI, GL_RGB10_A2UI, GenerateMip<R10G10B10A2>, NoCopyFunctions, ReadColor<R10G10B10A2, GLuint>, WriteColor<R10G10B10A2, GLuint>, GL_UNSIGNED_INT, 10, 10, 10, 2, 0, 0, 4, false, false },
{ FormatID::R10G10B10A2_UNORM, GL_RGB10_A2, GL_RGB10_A2, GenerateMip<R10G10B10A2>, NoCopyFunctions, ReadColor<R10G10B10A2, GLfloat>, WriteColor<R10G10B10A2, GLfloat>, GL_UNSIGNED_NORMALIZED, 10, 10, 10, 2, 0, 0, 4, false, false },
{ FormatID::R10G10B10A2_USCALED, GL_RGB10_A2_USCALED_ANGLEX, GL_RGB10_A2_USCALED_ANGLEX, GenerateMip<R10G10B10A2>, NoCopyFunctions, ReadColor<R10G10B10A2, GLuint>, WriteColor<R10G10B10A2, GLuint>, GL_UNSIGNED_INT, 10, 10, 10, 2, 0, 0, 4, false, false },
{ FormatID::R11G11B10_FLOAT, GL_R11F_G11F_B10F, GL_R11F_G11F_B10F, GenerateMip<R11G11B10F>, NoCopyFunctions, ReadColor<R11G11B10F, GLfloat>, WriteColor<R11G11B10F, GLfloat>, GL_FLOAT, 11, 11, 10, 0, 0, 0, 4, false, false },
{ FormatID::R16G16B16A16_FLOAT, GL_RGBA16F, GL_RGBA16F, GenerateMip<R16G16B16A16F>, NoCopyFunctions, ReadColor<R16G16B16A16F, GLfloat>, WriteColor<R16G16B16A16F, GLfloat>, GL_FLOAT, 16, 16, 16, 16, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_SINT, GL_RGBA16I, GL_RGBA16I, GenerateMip<R16G16B16A16S>, NoCopyFunctions, ReadColor<R16G16B16A16S, GLint>, WriteColor<R16G16B16A16S, GLint>, GL_INT, 16, 16, 16, 16, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_SNORM, GL_RGBA16_SNORM_EXT, GL_RGBA16_SNORM_EXT, GenerateMip<R16G16B16A16S>, NoCopyFunctions, ReadColor<R16G16B16A16S, GLfloat>, WriteColor<R16G16B16A16S, GLfloat>, GL_SIGNED_NORMALIZED, 16, 16, 16, 16, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_SSCALED, GL_RGBA16_SSCALED_ANGLEX, GL_RGBA16_SSCALED_ANGLEX, GenerateMip<R16G16B16A16S>, NoCopyFunctions, ReadColor<R16G16B16A16S, GLint>, WriteColor<R16G16B16A16S, GLint>, GL_INT, 16, 16, 16, 16, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_UINT, GL_RGBA16UI, GL_RGBA16UI, GenerateMip<R16G16B16A16>, NoCopyFunctions, ReadColor<R16G16B16A16, GLuint>, WriteColor<R16G16B16A16, GLuint>, GL_UNSIGNED_INT, 16, 16, 16, 16, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_UNORM, GL_RGBA16_EXT, GL_RGBA16_EXT, GenerateMip<R16G16B16A16>, NoCopyFunctions, ReadColor<R16G16B16A16, GLfloat>, WriteColor<R16G16B16A16, GLfloat>, GL_UNSIGNED_NORMALIZED, 16, 16, 16, 16, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_USCALED, GL_RGBA16_USCALED_ANGLEX, GL_RGBA16_USCALED_ANGLEX, GenerateMip<R16G16B16A16>, NoCopyFunctions, ReadColor<R16G16B16A16, GLuint>, WriteColor<R16G16B16A16, GLuint>, GL_UNSIGNED_INT, 16, 16, 16, 16, 0, 0, 8, false, false },
{ FormatID::R16G16B16_FLOAT, GL_RGB16F, GL_RGB16F, GenerateMip<R16G16B16F>, NoCopyFunctions, ReadColor<R16G16B16F, GLfloat>, WriteColor<R16G16B16F, GLfloat>, GL_FLOAT, 16, 16, 16, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_SINT, GL_RGB16I, GL_RGB16I, GenerateMip<R16G16B16S>, NoCopyFunctions, ReadColor<R16G16B16S, GLint>, WriteColor<R16G16B16S, GLint>, GL_INT, 16, 16, 16, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_SNORM, GL_RGB16_SNORM_EXT, GL_RGB16_SNORM_EXT, GenerateMip<R16G16B16S>, NoCopyFunctions, ReadColor<R16G16B16S, GLfloat>, WriteColor<R16G16B16S, GLfloat>, GL_SIGNED_NORMALIZED, 16, 16, 16, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_SSCALED, GL_RGB16_SSCALED_ANGLEX, GL_RGB16_SSCALED_ANGLEX, GenerateMip<R16G16B16S>, NoCopyFunctions, ReadColor<R16G16B16S, GLint>, WriteColor<R16G16B16S, GLint>, GL_INT, 16, 16, 16, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_UINT, GL_RGB16UI, GL_RGB16UI, GenerateMip<R16G16B16>, NoCopyFunctions, ReadColor<R16G16B16, GLuint>, WriteColor<R16G16B16, GLuint>, GL_UNSIGNED_INT, 16, 16, 16, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_UNORM, GL_RGB16_EXT, GL_RGB16_EXT, GenerateMip<R16G16B16>, NoCopyFunctions, ReadColor<R16G16B16, GLfloat>, WriteColor<R16G16B16, GLfloat>, GL_UNSIGNED_NORMALIZED, 16, 16, 16, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_USCALED, GL_RGB16_USCALED_ANGLEX, GL_RGB16_USCALED_ANGLEX, GenerateMip<R16G16B16>, NoCopyFunctions, ReadColor<R16G16B16, GLuint>, WriteColor<R16G16B16, GLuint>, GL_UNSIGNED_INT, 16, 16, 16, 0, 0, 0, 6, false, false },
{ FormatID::R16G16_FLOAT, GL_RG16F, GL_RG16F, GenerateMip<R16G16F>, NoCopyFunctions, ReadColor<R16G16F, GLfloat>, WriteColor<R16G16F, GLfloat>, GL_FLOAT, 16, 16, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_SINT, GL_RG16I, GL_RG16I, GenerateMip<R16G16S>, NoCopyFunctions, ReadColor<R16G16S, GLint>, WriteColor<R16G16S, GLint>, GL_INT, 16, 16, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_SNORM, GL_RG16_SNORM_EXT, GL_RG16_SNORM_EXT, GenerateMip<R16G16S>, NoCopyFunctions, ReadColor<R16G16S, GLfloat>, WriteColor<R16G16S, GLfloat>, GL_SIGNED_NORMALIZED, 16, 16, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_SSCALED, GL_RG16_SSCALED_ANGLEX, GL_RG16_SSCALED_ANGLEX, GenerateMip<R16G16S>, NoCopyFunctions, ReadColor<R16G16S, GLint>, WriteColor<R16G16S, GLint>, GL_INT, 16, 16, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_UINT, GL_RG16UI, GL_RG16UI, GenerateMip<R16G16>, NoCopyFunctions, ReadColor<R16G16, GLuint>, WriteColor<R16G16, GLuint>, GL_UNSIGNED_INT, 16, 16, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_UNORM, GL_RG16_EXT, GL_RG16_EXT, GenerateMip<R16G16>, NoCopyFunctions, ReadColor<R16G16, GLfloat>, WriteColor<R16G16, GLfloat>, GL_UNSIGNED_NORMALIZED, 16, 16, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_USCALED, GL_RG16_USCALED_ANGLEX, GL_RG16_USCALED_ANGLEX, GenerateMip<R16G16>, NoCopyFunctions, ReadColor<R16G16, GLuint>, WriteColor<R16G16, GLuint>, GL_UNSIGNED_INT, 16, 16, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16_FLOAT, GL_R16F, GL_R16F, GenerateMip<R16F>, NoCopyFunctions, ReadColor<R16F, GLfloat>, WriteColor<R16F, GLfloat>, GL_FLOAT, 16, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_SINT, GL_R16I, GL_R16I, GenerateMip<R16S>, NoCopyFunctions, ReadColor<R16S, GLint>, WriteColor<R16S, GLint>, GL_INT, 16, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_SNORM, GL_R16_SNORM_EXT, GL_R16_SNORM_EXT, GenerateMip<R16S>, NoCopyFunctions, ReadColor<R16S, GLfloat>, WriteColor<R16S, GLfloat>, GL_SIGNED_NORMALIZED, 16, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_SSCALED, GL_R16_SSCALED_ANGLEX, GL_R16_SSCALED_ANGLEX, GenerateMip<R16S>, NoCopyFunctions, ReadColor<R16S, GLint>, WriteColor<R16S, GLint>, GL_INT, 16, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_UINT, GL_R16UI, GL_R16UI, GenerateMip<R16>, NoCopyFunctions, ReadColor<R16, GLuint>, WriteColor<R16, GLuint>, GL_UNSIGNED_INT, 16, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_UNORM, GL_R16_EXT, GL_R16_EXT, GenerateMip<R16>, NoCopyFunctions, ReadColor<R16, GLfloat>, WriteColor<R16, GLfloat>, GL_UNSIGNED_NORMALIZED, 16, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_USCALED, GL_R16_USCALED_ANGLEX, GL_R16_USCALED_ANGLEX, GenerateMip<R16>, NoCopyFunctions, ReadColor<R16, GLuint>, WriteColor<R16, GLuint>, GL_UNSIGNED_INT, 16, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R32G32B32A32_FIXED, GL_RGBA32_FIXED_ANGLEX, GL_RGBA32_FIXED_ANGLEX, GenerateMip<R32G32B32A32F>, NoCopyFunctions, ReadColor<R32G32B32A32F, GLfloat>, WriteColor<R32G32B32A32F, GLfloat>, GL_FLOAT, 32, 32, 32, 32, 0, 0, 16, false, true },
{ FormatID::R32G32B32A32_FLOAT, GL_RGBA32F, GL_RGBA32F, GenerateMip<R32G32B32A32F>, NoCopyFunctions, ReadColor<R32G32B32A32F, GLfloat>, WriteColor<R32G32B32A32F, GLfloat>, GL_FLOAT, 32, 32, 32, 32, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_SINT, GL_RGBA32I, GL_RGBA32I, GenerateMip<R32G32B32A32S>, NoCopyFunctions, ReadColor<R32G32B32A32S, GLint>, WriteColor<R32G32B32A32S, GLint>, GL_INT, 32, 32, 32, 32, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_SNORM, GL_RGBA32_SNORM_ANGLEX, GL_RGBA32_SNORM_ANGLEX, GenerateMip<R32G32B32A32S>, NoCopyFunctions, ReadColor<R32G32B32A32S, GLfloat>, WriteColor<R32G32B32A32S, GLfloat>, GL_SIGNED_NORMALIZED, 32, 32, 32, 32, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_SSCALED, GL_RGBA32_SSCALED_ANGLEX, GL_RGBA32_SSCALED_ANGLEX, GenerateMip<R32G32B32A32S>, NoCopyFunctions, ReadColor<R32G32B32A32S, GLint>, WriteColor<R32G32B32A32S, GLint>, GL_INT, 32, 32, 32, 32, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_UINT, GL_RGBA32UI, GL_RGBA32UI, GenerateMip<R32G32B32A32>, NoCopyFunctions, ReadColor<R32G32B32A32, GLuint>, WriteColor<R32G32B32A32, GLuint>, GL_UNSIGNED_INT, 32, 32, 32, 32, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_UNORM, GL_RGBA32_UNORM_ANGLEX, GL_RGBA32_UNORM_ANGLEX, GenerateMip<R32G32B32A32>, NoCopyFunctions, ReadColor<R32G32B32A32, GLfloat>, WriteColor<R32G32B32A32, GLfloat>, GL_UNSIGNED_NORMALIZED, 32, 32, 32, 32, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_USCALED, GL_RGBA32_USCALED_ANGLEX, GL_RGBA32_USCALED_ANGLEX, GenerateMip<R32G32B32A32>, NoCopyFunctions, ReadColor<R32G32B32A32, GLuint>, WriteColor<R32G32B32A32, GLuint>, GL_UNSIGNED_INT, 32, 32, 32, 32, 0, 0, 16, false, false },
{ FormatID::R32G32B32_FIXED, GL_RGB32_FIXED_ANGLEX, GL_RGB32_FIXED_ANGLEX, GenerateMip<R32G32B32F>, NoCopyFunctions, ReadColor<R32G32B32F, GLfloat>, WriteColor<R32G32B32F, GLfloat>, GL_FLOAT, 32, 32, 32, 0, 0, 0, 12, false, true },
{ FormatID::R32G32B32_FLOAT, GL_RGB32F, GL_RGB32F, GenerateMip<R32G32B32F>, NoCopyFunctions, ReadColor<R32G32B32F, GLfloat>, WriteColor<R32G32B32F, GLfloat>, GL_FLOAT, 32, 32, 32, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_SINT, GL_RGB32I, GL_RGB32I, GenerateMip<R32G32B32S>, NoCopyFunctions, ReadColor<R32G32B32S, GLint>, WriteColor<R32G32B32S, GLint>, GL_INT, 32, 32, 32, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_SNORM, GL_RGB32_SNORM_ANGLEX, GL_RGB32_SNORM_ANGLEX, GenerateMip<R32G32B32S>, NoCopyFunctions, ReadColor<R32G32B32S, GLfloat>, WriteColor<R32G32B32S, GLfloat>, GL_SIGNED_NORMALIZED, 32, 32, 32, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_SSCALED, GL_RGB32_SSCALED_ANGLEX, GL_RGB32_SSCALED_ANGLEX, GenerateMip<R32G32B32S>, NoCopyFunctions, ReadColor<R32G32B32S, GLint>, WriteColor<R32G32B32S, GLint>, GL_INT, 32, 32, 32, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_UINT, GL_RGB32UI, GL_RGB32UI, GenerateMip<R32G32B32>, NoCopyFunctions, ReadColor<R32G32B32, GLuint>, WriteColor<R32G32B32, GLuint>, GL_UNSIGNED_INT, 32, 32, 32, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_UNORM, GL_RGB32_UNORM_ANGLEX, GL_RGB32_UNORM_ANGLEX, GenerateMip<R32G32B32>, NoCopyFunctions, ReadColor<R32G32B32, GLfloat>, WriteColor<R32G32B32, GLfloat>, GL_UNSIGNED_NORMALIZED, 32, 32, 32, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_USCALED, GL_RGB32_USCALED_ANGLEX, GL_RGB32_USCALED_ANGLEX, GenerateMip<R32G32B32>, NoCopyFunctions, ReadColor<R32G32B32, GLuint>, WriteColor<R32G32B32, GLuint>, GL_UNSIGNED_INT, 32, 32, 32, 0, 0, 0, 12, false, false },
{ FormatID::R32G32_FIXED, GL_RG32_FIXED_ANGLEX, GL_RG32_FIXED_ANGLEX, GenerateMip<R32G32F>, NoCopyFunctions, ReadColor<R32G32F, GLfloat>, WriteColor<R32G32F, GLfloat>, GL_FLOAT, 32, 32, 0, 0, 0, 0, 8, false, true },
{ FormatID::R32G32_FLOAT, GL_RG32F, GL_RG32F, GenerateMip<R32G32F>, NoCopyFunctions, ReadColor<R32G32F, GLfloat>, WriteColor<R32G32F, GLfloat>, GL_FLOAT, 32, 32, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_SINT, GL_RG32I, GL_RG32I, GenerateMip<R32G32S>, NoCopyFunctions, ReadColor<R32G32S, GLint>, WriteColor<R32G32S, GLint>, GL_INT, 32, 32, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_SNORM, GL_RG32_SNORM_ANGLEX, GL_RG32_SNORM_ANGLEX, GenerateMip<R32G32S>, NoCopyFunctions, ReadColor<R32G32S, GLfloat>, WriteColor<R32G32S, GLfloat>, GL_SIGNED_NORMALIZED, 32, 32, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_SSCALED, GL_RG32_SSCALED_ANGLEX, GL_RG32_SSCALED_ANGLEX, GenerateMip<R32G32S>, NoCopyFunctions, ReadColor<R32G32S, GLint>, WriteColor<R32G32S, GLint>, GL_INT, 32, 32, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_UINT, GL_RG32UI, GL_RG32UI, GenerateMip<R32G32>, NoCopyFunctions, ReadColor<R32G32, GLuint>, WriteColor<R32G32, GLuint>, GL_UNSIGNED_INT, 32, 32, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_UNORM, GL_RG32_UNORM_ANGLEX, GL_RG32_UNORM_ANGLEX, GenerateMip<R32G32>, NoCopyFunctions, ReadColor<R32G32, GLfloat>, WriteColor<R32G32, GLfloat>, GL_UNSIGNED_NORMALIZED, 32, 32, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_USCALED, GL_RG32_USCALED_ANGLEX, GL_RG32_USCALED_ANGLEX, GenerateMip<R32G32>, NoCopyFunctions, ReadColor<R32G32, GLuint>, WriteColor<R32G32, GLuint>, GL_UNSIGNED_INT, 32, 32, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32_FIXED, GL_R32_FIXED_ANGLEX, GL_R32_FIXED_ANGLEX, GenerateMip<R32F>, NoCopyFunctions, ReadColor<R32F, GLfloat>, WriteColor<R32F, GLfloat>, GL_FLOAT, 32, 0, 0, 0, 0, 0, 4, false, true },
{ FormatID::R32_FLOAT, GL_R32F, GL_R32F, GenerateMip<R32F>, NoCopyFunctions, ReadColor<R32F, GLfloat>, WriteColor<R32F, GLfloat>, GL_FLOAT, 32, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_SINT, GL_R32I, GL_R32I, GenerateMip<R32S>, NoCopyFunctions, ReadColor<R32S, GLint>, WriteColor<R32S, GLint>, GL_INT, 32, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_SNORM, GL_R32_SNORM_ANGLEX, GL_R32_SNORM_ANGLEX, GenerateMip<R32S>, NoCopyFunctions, ReadColor<R32S, GLfloat>, WriteColor<R32S, GLfloat>, GL_SIGNED_NORMALIZED, 32, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_SSCALED, GL_R32_SSCALED_ANGLEX, GL_R32_SSCALED_ANGLEX, GenerateMip<R32S>, NoCopyFunctions, ReadColor<R32S, GLint>, WriteColor<R32S, GLint>, GL_INT, 32, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_UINT, GL_R32UI, GL_R32UI, GenerateMip<R32>, NoCopyFunctions, ReadColor<R32, GLuint>, WriteColor<R32, GLuint>, GL_UNSIGNED_INT, 32, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_UNORM, GL_R32_UNORM_ANGLEX, GL_R32_UNORM_ANGLEX, GenerateMip<R32>, NoCopyFunctions, ReadColor<R32, GLfloat>, WriteColor<R32, GLfloat>, GL_UNSIGNED_NORMALIZED, 32, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_USCALED, GL_R32_USCALED_ANGLEX, GL_R32_USCALED_ANGLEX, GenerateMip<R32>, NoCopyFunctions, ReadColor<R32, GLuint>, WriteColor<R32, GLuint>, GL_UNSIGNED_INT, 32, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R4G4B4A4_UNORM, GL_RGBA4, GL_RGBA4, GenerateMip<R4G4B4A4>, NoCopyFunctions, ReadColor<R4G4B4A4, GLfloat>, WriteColor<R4G4B4A4, GLfloat>, GL_UNSIGNED_NORMALIZED, 4, 4, 4, 4, 0, 0, 2, false, false },
{ FormatID::R5G5B5A1_UNORM, GL_RGB5_A1, GL_RGB5_A1, GenerateMip<R5G5B5A1>, NoCopyFunctions, ReadColor<R5G5B5A1, GLfloat>, WriteColor<R5G5B5A1, GLfloat>, GL_UNSIGNED_NORMALIZED, 5, 5, 5, 1, 0, 0, 2, false, false },
{ FormatID::R5G6B5_UNORM, GL_RGB565, GL_RGB565, GenerateMip<R5G6B5>, NoCopyFunctions, ReadColor<R5G6B5, GLfloat>, WriteColor<R5G6B5, GLfloat>, GL_UNSIGNED_NORMALIZED, 5, 6, 5, 0, 0, 0, 2, false, false },
{ FormatID::R8G8B8A8_SINT, GL_RGBA8I, GL_RGBA8I, GenerateMip<R8G8B8A8S>, NoCopyFunctions, ReadColor<R8G8B8A8S, GLint>, WriteColor<R8G8B8A8S, GLint>, GL_INT, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_SNORM, GL_RGBA8_SNORM, GL_RGBA8_SNORM, GenerateMip<R8G8B8A8S>, NoCopyFunctions, ReadColor<R8G8B8A8S, GLfloat>, WriteColor<R8G8B8A8S, GLfloat>, GL_SIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_SSCALED, GL_RGBA8_SSCALED_ANGLEX, GL_RGBA8_SSCALED_ANGLEX, GenerateMip<R8G8B8A8S>, NoCopyFunctions, ReadColor<R8G8B8A8S, GLint>, WriteColor<R8G8B8A8S, GLint>, GL_INT, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_TYPELESS, GL_RGBA8, GL_RGBA8, GenerateMip<R8G8B8A8>, NoCopyFunctions, ReadColor<R8G8B8A8, GLfloat>, WriteColor<R8G8B8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_TYPELESS_SRGB, GL_SRGB8_ALPHA8, GL_SRGB8_ALPHA8, GenerateMip<R8G8B8A8>, NoCopyFunctions, ReadColor<R8G8B8A8, GLfloat>, WriteColor<R8G8B8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_UINT, GL_RGBA8UI, GL_RGBA8UI, GenerateMip<R8G8B8A8>, NoCopyFunctions, ReadColor<R8G8B8A8, GLuint>, WriteColor<R8G8B8A8, GLuint>, GL_UNSIGNED_INT, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_UNORM, GL_RGBA8, GL_RGBA8, GenerateMip<R8G8B8A8>, NoCopyFunctions, ReadColor<R8G8B8A8, GLfloat>, WriteColor<R8G8B8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_UNORM_SRGB, GL_SRGB8_ALPHA8, GL_SRGB8_ALPHA8, GenerateMip<R8G8B8A8SRGB>, NoCopyFunctions, ReadColor<R8G8B8A8SRGB, GLfloat>, WriteColor<R8G8B8A8SRGB, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_USCALED, GL_RGBA8_USCALED_ANGLEX, GL_RGBA8_USCALED_ANGLEX, GenerateMip<R8G8B8A8>, NoCopyFunctions, ReadColor<R8G8B8A8, GLuint>, WriteColor<R8G8B8A8, GLuint>, GL_UNSIGNED_INT, 8, 8, 8, 8, 0, 0, 4, false, false },
{ FormatID::R8G8B8_SINT, GL_RGB8I, GL_RGB8I, GenerateMip<R8G8B8S>, NoCopyFunctions, ReadColor<R8G8B8S, GLint>, WriteColor<R8G8B8S, GLint>, GL_INT, 8, 8, 8, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_SNORM, GL_RGB8_SNORM, GL_RGB8_SNORM, GenerateMip<R8G8B8S>, NoCopyFunctions, ReadColor<R8G8B8S, GLfloat>, WriteColor<R8G8B8S, GLfloat>, GL_SIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_SSCALED, GL_RGB8_SSCALED_ANGLEX, GL_RGB8_SSCALED_ANGLEX, GenerateMip<R8G8B8S>, NoCopyFunctions, ReadColor<R8G8B8S, GLint>, WriteColor<R8G8B8S, GLint>, GL_INT, 8, 8, 8, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_UINT, GL_RGB8UI, GL_RGB8UI, GenerateMip<R8G8B8>, NoCopyFunctions, ReadColor<R8G8B8, GLuint>, WriteColor<R8G8B8, GLuint>, GL_UNSIGNED_INT, 8, 8, 8, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_UNORM, GL_RGB8, GL_RGB8, GenerateMip<R8G8B8>, NoCopyFunctions, ReadColor<R8G8B8, GLfloat>, WriteColor<R8G8B8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_UNORM_SRGB, GL_SRGB8, GL_SRGB8, GenerateMip<R8G8B8>, NoCopyFunctions, ReadColor<R8G8B8, GLfloat>, WriteColor<R8G8B8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_USCALED, GL_RGB8_USCALED_ANGLEX, GL_RGB8_USCALED_ANGLEX, GenerateMip<R8G8B8>, NoCopyFunctions, ReadColor<R8G8B8, GLuint>, WriteColor<R8G8B8, GLuint>, GL_UNSIGNED_INT, 8, 8, 8, 0, 0, 0, 3, false, false },
{ FormatID::R8G8_SINT, GL_RG8I, GL_RG8I, GenerateMip<R8G8S>, NoCopyFunctions, ReadColor<R8G8S, GLint>, WriteColor<R8G8S, GLint>, GL_INT, 8, 8, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8G8_SNORM, GL_RG8_SNORM, GL_RG8_SNORM, GenerateMip<R8G8S>, NoCopyFunctions, ReadColor<R8G8S, GLfloat>, WriteColor<R8G8S, GLfloat>, GL_SIGNED_NORMALIZED, 8, 8, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8G8_SSCALED, GL_RG8_SSCALED_ANGLEX, GL_RG8_SSCALED_ANGLEX, GenerateMip<R8G8S>, NoCopyFunctions, ReadColor<R8G8S, GLint>, WriteColor<R8G8S, GLint>, GL_INT, 8, 8, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8G8_UINT, GL_RG8UI, GL_RG8UI, GenerateMip<R8G8>, NoCopyFunctions, ReadColor<R8G8, GLuint>, WriteColor<R8G8, GLuint>, GL_UNSIGNED_INT, 8, 8, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8G8_UNORM, GL_RG8, GL_RG8, GenerateMip<R8G8>, NoCopyFunctions, ReadColor<R8G8, GLfloat>, WriteColor<R8G8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8G8_USCALED, GL_RG8_USCALED_ANGLEX, GL_RG8_USCALED_ANGLEX, GenerateMip<R8G8>, NoCopyFunctions, ReadColor<R8G8, GLuint>, WriteColor<R8G8, GLuint>, GL_UNSIGNED_INT, 8, 8, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8_SINT, GL_R8I, GL_R8I, GenerateMip<R8S>, NoCopyFunctions, ReadColor<R8S, GLint>, WriteColor<R8S, GLint>, GL_INT, 8, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R8_SNORM, GL_R8_SNORM, GL_R8_SNORM, GenerateMip<R8S>, NoCopyFunctions, ReadColor<R8S, GLfloat>, WriteColor<R8S, GLfloat>, GL_SIGNED_NORMALIZED, 8, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R8_SSCALED, GL_R8_SSCALED_ANGLEX, GL_R8_SSCALED_ANGLEX, GenerateMip<R8S>, NoCopyFunctions, ReadColor<R8S, GLint>, WriteColor<R8S, GLint>, GL_INT, 8, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R8_UINT, GL_R8UI, GL_R8UI, GenerateMip<R8>, NoCopyFunctions, ReadColor<R8, GLuint>, WriteColor<R8, GLuint>, GL_UNSIGNED_INT, 8, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R8_UNORM, GL_R8, GL_R8, GenerateMip<R8>, NoCopyFunctions, ReadColor<R8, GLfloat>, WriteColor<R8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R8_USCALED, GL_R8_USCALED_ANGLEX, GL_R8_USCALED_ANGLEX, GenerateMip<R8>, NoCopyFunctions, ReadColor<R8, GLuint>, WriteColor<R8, GLuint>, GL_UNSIGNED_INT, 8, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R9G9B9E5_SHAREDEXP, GL_RGB9_E5, GL_RGB9_E5, GenerateMip<R9G9B9E5>, NoCopyFunctions, ReadColor<R9G9B9E5, GLfloat>, WriteColor<R9G9B9E5, GLfloat>, GL_FLOAT, 9, 9, 9, 0, 0, 0, 3, false, false },
{ FormatID::S8_UINT, GL_STENCIL_INDEX8, GL_STENCIL_INDEX8, nullptr, NoCopyFunctions, ReadDepthStencil<S8>, WriteDepthStencil<S8>, GL_UNSIGNED_INT, 0, 0, 0, 0, 0, 8, 1, false, false },
{ FormatID::NONE, GL_NONE, GL_NONE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_NONE, 0, 0, 0, 0, 0, 0, 0, 0, false, false },
{ FormatID::A16_FLOAT, GL_ALPHA16F_EXT, GL_ALPHA16F_EXT, GenerateMip<A16F>, NoCopyFunctions, ReadColor<A16F, GLfloat>, WriteColor<A16F, GLfloat>, GL_FLOAT, 0, 0, 0, 16, 0, 0, 0, 2, false, false },
{ FormatID::A1R5G5B5_UNORM, GL_A1RGB5_ANGLEX, GL_A1RGB5_ANGLEX, GenerateMip<A1R5G5B5>, NoCopyFunctions, ReadColor<A1R5G5B5, GLfloat>, WriteColor<A1R5G5B5, GLfloat>, GL_UNSIGNED_NORMALIZED, 5, 5, 5, 1, 0, 0, 0, 2, false, false },
{ FormatID::A32_FLOAT, GL_ALPHA32F_EXT, GL_ALPHA32F_EXT, GenerateMip<A32F>, NoCopyFunctions, ReadColor<A32F, GLfloat>, WriteColor<A32F, GLfloat>, GL_FLOAT, 0, 0, 0, 32, 0, 0, 0, 4, false, false },
{ FormatID::A8_UNORM, GL_ALPHA8_EXT, GL_ALPHA8_EXT, GenerateMip<A8>, NoCopyFunctions, ReadColor<A8, GLfloat>, WriteColor<A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 8, 0, 0, 0, 1, false, false },
{ FormatID::ASTC_10x10_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x10_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x10_KHR, GL_COMPRESSED_RGBA_ASTC_10x10_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x5_KHR, GL_COMPRESSED_RGBA_ASTC_10x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x6_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x6_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x6_KHR, GL_COMPRESSED_RGBA_ASTC_10x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_10x8_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_10x8_KHR, GL_COMPRESSED_RGBA_ASTC_10x8_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_12x10_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_12x10_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_12x10_KHR, GL_COMPRESSED_RGBA_ASTC_12x10_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_12x12_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_12x12_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_12x12_KHR, GL_COMPRESSED_RGBA_ASTC_12x12_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_4x4_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_4x4_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_4x4_KHR, GL_COMPRESSED_RGBA_ASTC_4x4_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_5x4_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_5x4_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_5x4_KHR, GL_COMPRESSED_RGBA_ASTC_5x4_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_5x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_5x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_5x5_KHR, GL_COMPRESSED_RGBA_ASTC_5x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_6x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_6x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_6x5_KHR, GL_COMPRESSED_RGBA_ASTC_6x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_6x6_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_6x6_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_6x6_KHR, GL_COMPRESSED_RGBA_ASTC_6x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x5_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x5_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_8x5_KHR, GL_COMPRESSED_RGBA_ASTC_8x5_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x6_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x6_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_8x6_KHR, GL_COMPRESSED_RGBA_ASTC_8x6_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::ASTC_8x8_UNORM_BLOCK, GL_COMPRESSED_RGBA_ASTC_8x8_KHR, GL_COMPRESSED_RGBA_ASTC_8x8_KHR, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::B4G4R4A4_UNORM, GL_BGRA4_ANGLEX, GL_RGBA4, GenerateMip<A4R4G4B4>, NoCopyFunctions, ReadColor<A4R4G4B4, GLfloat>, WriteColor<A4R4G4B4, GLfloat>, GL_UNSIGNED_NORMALIZED, 4, 4, 4, 4, 0, 0, 0, 2, false, false },
{ FormatID::B5G5R5A1_UNORM, GL_BGR5_A1_ANGLEX, GL_RGB5_A1, GenerateMip<A1R5G5B5>, NoCopyFunctions, ReadColor<A1R5G5B5, GLfloat>, WriteColor<A1R5G5B5, GLfloat>, GL_UNSIGNED_NORMALIZED, 5, 5, 5, 1, 0, 0, 0, 2, false, false },
{ FormatID::B5G6R5_UNORM, GL_BGR565_ANGLEX, GL_RGB565, GenerateMip<B5G6R5>, NoCopyFunctions, ReadColor<B5G6R5, GLfloat>, WriteColor<B5G6R5, GLfloat>, GL_UNSIGNED_NORMALIZED, 5, 6, 5, 0, 0, 0, 0, 2, false, false },
{ FormatID::B8G8R8A8_TYPELESS, GL_BGRA8_EXT, GL_BGRA8_EXT, GenerateMip<B8G8R8A8>, NoCopyFunctions, ReadColor<B8G8R8A8, GLfloat>, WriteColor<B8G8R8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::B8G8R8A8_TYPELESS_SRGB, GL_BGRA8_SRGB_ANGLEX, GL_BGRA8_SRGB_ANGLEX, GenerateMip<B8G8R8A8>, NoCopyFunctions, ReadColor<B8G8R8A8, GLfloat>, WriteColor<B8G8R8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::B8G8R8A8_UNORM, GL_BGRA8_EXT, GL_BGRA8_EXT, GenerateMip<B8G8R8A8>, BGRACopyFunctions, ReadColor<B8G8R8A8, GLfloat>, WriteColor<B8G8R8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::B8G8R8A8_UNORM_SRGB, GL_BGRA8_SRGB_ANGLEX, GL_BGRA8_SRGB_ANGLEX, GenerateMip<B8G8R8A8>, NoCopyFunctions, ReadColor<B8G8R8A8, GLfloat>, WriteColor<B8G8R8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::B8G8R8X8_UNORM, GL_BGRA8_EXT, GL_BGRA8_EXT, GenerateMip<B8G8R8X8>, NoCopyFunctions, ReadColor<B8G8R8X8, GLfloat>, WriteColor<B8G8R8X8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 0, 4, false, false },
{ FormatID::BC1_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC1_RGBA_UNORM_SRGB_BLOCK, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC1_RGB_UNORM_BLOCK, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC1_RGB_UNORM_SRGB_BLOCK, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC2_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC2_RGBA_UNORM_SRGB_BLOCK, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC3_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BC3_RGBA_UNORM_SRGB_BLOCK, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BPTC_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_BPTC_UNORM_EXT, GL_COMPRESSED_RGBA_BPTC_UNORM_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BPTC_RGB_SIGNED_FLOAT_BLOCK, GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_FLOAT, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BPTC_RGB_UNSIGNED_FLOAT_BLOCK, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_FLOAT, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::BPTC_SRGB_ALPHA_UNORM_BLOCK, GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT, GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 0, true, false },
{ FormatID::D16_UNORM, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT16, nullptr, NoCopyFunctions, ReadDepthStencil<D16>, WriteDepthStencil<D16>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 16, 0, 2, false, false },
{ FormatID::D24_UNORM_S8_UINT, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, nullptr, NoCopyFunctions, ReadDepthStencil<D24S8>, WriteDepthStencil<D24S8>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 24, 8, 4, false, false },
{ FormatID::D24_UNORM_X8_UINT, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT24, nullptr, NoCopyFunctions, ReadDepthStencil<D24>, WriteDepthStencil<D24>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 24, 0, 4, false, false },
{ FormatID::D32_FLOAT, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT32F, nullptr, NoCopyFunctions, ReadDepthStencil<D32F>, WriteDepthStencil<D32F>, GL_FLOAT, 0, 0, 0, 0, 0, 32, 0, 4, false, false },
{ FormatID::D32_FLOAT_S8X24_UINT, GL_DEPTH32F_STENCIL8, GL_DEPTH32F_STENCIL8, nullptr, NoCopyFunctions, ReadDepthStencil<D32FS8>, WriteDepthStencil<D32FS8>, GL_FLOAT, 0, 0, 0, 0, 0, 32, 8, 8, false, false },
{ FormatID::D32_UNORM, GL_DEPTH_COMPONENT32_OES, GL_DEPTH_COMPONENT32_OES, nullptr, NoCopyFunctions, ReadDepthStencil<D32>, WriteDepthStencil<D32>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 32, 0, 4, false, false },
{ FormatID::EAC_R11G11_SNORM_BLOCK, GL_COMPRESSED_SIGNED_RG11_EAC, GL_COMPRESSED_SIGNED_RG11_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_SIGNED_NORMALIZED, 11, 11, 0, 0, 0, 0, 0, 2, true, false },
{ FormatID::EAC_R11G11_UNORM_BLOCK, GL_COMPRESSED_RG11_EAC, GL_COMPRESSED_RG11_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 11, 11, 0, 0, 0, 0, 0, 2, true, false },
{ FormatID::EAC_R11_SNORM_BLOCK, GL_COMPRESSED_SIGNED_R11_EAC, GL_COMPRESSED_SIGNED_R11_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_SIGNED_NORMALIZED, 11, 0, 0, 0, 0, 0, 0, 1, true, false },
{ FormatID::EAC_R11_UNORM_BLOCK, GL_COMPRESSED_R11_EAC, GL_COMPRESSED_R11_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 11, 0, 0, 0, 0, 0, 0, 1, true, false },
{ FormatID::ETC1_LOSSY_DECODE_R8G8B8_UNORM_BLOCK, GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, GL_ETC1_RGB8_LOSSY_DECODE_ANGLE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 0, 3, true, false },
{ FormatID::ETC1_R8G8B8_UNORM_BLOCK, GL_ETC1_RGB8_OES, GL_ETC1_RGB8_OES, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 0, 3, true, false },
{ FormatID::ETC2_R8G8B8A1_SRGB_BLOCK, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 1, 0, 0, 0, 3, true, false },
{ FormatID::ETC2_R8G8B8A1_UNORM_BLOCK, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 1, 0, 0, 0, 3, true, false },
{ FormatID::ETC2_R8G8B8A8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 0, 4, true, false },
{ FormatID::ETC2_R8G8B8A8_UNORM_BLOCK, GL_COMPRESSED_RGBA8_ETC2_EAC, GL_COMPRESSED_RGBA8_ETC2_EAC, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 0, 4, true, false },
{ FormatID::ETC2_R8G8B8_SRGB_BLOCK, GL_COMPRESSED_SRGB8_ETC2, GL_COMPRESSED_SRGB8_ETC2, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 0, 3, true, false },
{ FormatID::ETC2_R8G8B8_UNORM_BLOCK, GL_COMPRESSED_RGB8_ETC2, GL_COMPRESSED_RGB8_ETC2, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 0, 3, true, false },
{ FormatID::L16A16_FLOAT, GL_LUMINANCE_ALPHA16F_EXT, GL_LUMINANCE_ALPHA16F_EXT, GenerateMip<L16A16F>, NoCopyFunctions, ReadColor<L16A16F, GLfloat>, WriteColor<L16A16F, GLfloat>, GL_FLOAT, 0, 0, 0, 16, 16, 0, 0, 4, false, false },
{ FormatID::L16_FLOAT, GL_LUMINANCE16F_EXT, GL_LUMINANCE16F_EXT, GenerateMip<L16F>, NoCopyFunctions, ReadColor<L16F, GLfloat>, WriteColor<L16F, GLfloat>, GL_FLOAT, 0, 0, 0, 0, 16, 0, 0, 2, false, false },
{ FormatID::L32A32_FLOAT, GL_LUMINANCE_ALPHA32F_EXT, GL_LUMINANCE_ALPHA32F_EXT, GenerateMip<L32A32F>, NoCopyFunctions, ReadColor<L32A32F, GLfloat>, WriteColor<L32A32F, GLfloat>, GL_FLOAT, 0, 0, 0, 32, 32, 0, 0, 8, false, false },
{ FormatID::L32_FLOAT, GL_LUMINANCE32F_EXT, GL_LUMINANCE32F_EXT, GenerateMip<L32F>, NoCopyFunctions, ReadColor<L32F, GLfloat>, WriteColor<L32F, GLfloat>, GL_FLOAT, 0, 0, 0, 0, 32, 0, 0, 4, false, false },
{ FormatID::L8A8_UNORM, GL_LUMINANCE8_ALPHA8_EXT, GL_LUMINANCE8_ALPHA8_EXT, GenerateMip<L8A8>, NoCopyFunctions, ReadColor<L8A8, GLfloat>, WriteColor<L8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 8, 8, 0, 0, 2, false, false },
{ FormatID::L8_UNORM, GL_LUMINANCE8_EXT, GL_LUMINANCE8_EXT, GenerateMip<L8>, NoCopyFunctions, ReadColor<L8, GLfloat>, WriteColor<L8, GLfloat>, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 8, 0, 0, 1, false, false },
{ FormatID::R10G10B10A2_SINT, GL_RGB10_A2_SINT_ANGLEX, GL_RGB10_A2_SINT_ANGLEX, GenerateMip<R10G10B10A2S>, NoCopyFunctions, ReadColor<R10G10B10A2S, GLint>, WriteColor<R10G10B10A2S, GLint>, GL_INT, 10, 10, 10, 2, 0, 0, 0, 4, false, false },
{ FormatID::R10G10B10A2_SNORM, GL_RGB10_A2_SNORM_ANGLEX, GL_RGB10_A2_SNORM_ANGLEX, GenerateMip<R10G10B10A2S>, NoCopyFunctions, ReadColor<R10G10B10A2S, GLfloat>, WriteColor<R10G10B10A2S, GLfloat>, GL_SIGNED_NORMALIZED, 10, 10, 10, 2, 0, 0, 0, 4, false, false },
{ FormatID::R10G10B10A2_SSCALED, GL_RGB10_A2_SSCALED_ANGLEX, GL_RGB10_A2_SSCALED_ANGLEX, GenerateMip<R10G10B10A2S>, NoCopyFunctions, ReadColor<R10G10B10A2S, GLint>, WriteColor<R10G10B10A2S, GLint>, GL_INT, 10, 10, 10, 2, 0, 0, 0, 4, false, false },
{ FormatID::R10G10B10A2_UINT, GL_RGB10_A2UI, GL_RGB10_A2UI, GenerateMip<R10G10B10A2>, NoCopyFunctions, ReadColor<R10G10B10A2, GLuint>, WriteColor<R10G10B10A2, GLuint>, GL_UNSIGNED_INT, 10, 10, 10, 2, 0, 0, 0, 4, false, false },
{ FormatID::R10G10B10A2_UNORM, GL_RGB10_A2, GL_RGB10_A2, GenerateMip<R10G10B10A2>, NoCopyFunctions, ReadColor<R10G10B10A2, GLfloat>, WriteColor<R10G10B10A2, GLfloat>, GL_UNSIGNED_NORMALIZED, 10, 10, 10, 2, 0, 0, 0, 4, false, false },
{ FormatID::R10G10B10A2_USCALED, GL_RGB10_A2_USCALED_ANGLEX, GL_RGB10_A2_USCALED_ANGLEX, GenerateMip<R10G10B10A2>, NoCopyFunctions, ReadColor<R10G10B10A2, GLuint>, WriteColor<R10G10B10A2, GLuint>, GL_UNSIGNED_INT, 10, 10, 10, 2, 0, 0, 0, 4, false, false },
{ FormatID::R11G11B10_FLOAT, GL_R11F_G11F_B10F, GL_R11F_G11F_B10F, GenerateMip<R11G11B10F>, NoCopyFunctions, ReadColor<R11G11B10F, GLfloat>, WriteColor<R11G11B10F, GLfloat>, GL_FLOAT, 11, 11, 10, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16B16A16_FLOAT, GL_RGBA16F, GL_RGBA16F, GenerateMip<R16G16B16A16F>, NoCopyFunctions, ReadColor<R16G16B16A16F, GLfloat>, WriteColor<R16G16B16A16F, GLfloat>, GL_FLOAT, 16, 16, 16, 16, 0, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_SINT, GL_RGBA16I, GL_RGBA16I, GenerateMip<R16G16B16A16S>, NoCopyFunctions, ReadColor<R16G16B16A16S, GLint>, WriteColor<R16G16B16A16S, GLint>, GL_INT, 16, 16, 16, 16, 0, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_SNORM, GL_RGBA16_SNORM_EXT, GL_RGBA16_SNORM_EXT, GenerateMip<R16G16B16A16S>, NoCopyFunctions, ReadColor<R16G16B16A16S, GLfloat>, WriteColor<R16G16B16A16S, GLfloat>, GL_SIGNED_NORMALIZED, 16, 16, 16, 16, 0, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_SSCALED, GL_RGBA16_SSCALED_ANGLEX, GL_RGBA16_SSCALED_ANGLEX, GenerateMip<R16G16B16A16S>, NoCopyFunctions, ReadColor<R16G16B16A16S, GLint>, WriteColor<R16G16B16A16S, GLint>, GL_INT, 16, 16, 16, 16, 0, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_UINT, GL_RGBA16UI, GL_RGBA16UI, GenerateMip<R16G16B16A16>, NoCopyFunctions, ReadColor<R16G16B16A16, GLuint>, WriteColor<R16G16B16A16, GLuint>, GL_UNSIGNED_INT, 16, 16, 16, 16, 0, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_UNORM, GL_RGBA16_EXT, GL_RGBA16_EXT, GenerateMip<R16G16B16A16>, NoCopyFunctions, ReadColor<R16G16B16A16, GLfloat>, WriteColor<R16G16B16A16, GLfloat>, GL_UNSIGNED_NORMALIZED, 16, 16, 16, 16, 0, 0, 0, 8, false, false },
{ FormatID::R16G16B16A16_USCALED, GL_RGBA16_USCALED_ANGLEX, GL_RGBA16_USCALED_ANGLEX, GenerateMip<R16G16B16A16>, NoCopyFunctions, ReadColor<R16G16B16A16, GLuint>, WriteColor<R16G16B16A16, GLuint>, GL_UNSIGNED_INT, 16, 16, 16, 16, 0, 0, 0, 8, false, false },
{ FormatID::R16G16B16_FLOAT, GL_RGB16F, GL_RGB16F, GenerateMip<R16G16B16F>, NoCopyFunctions, ReadColor<R16G16B16F, GLfloat>, WriteColor<R16G16B16F, GLfloat>, GL_FLOAT, 16, 16, 16, 0, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_SINT, GL_RGB16I, GL_RGB16I, GenerateMip<R16G16B16S>, NoCopyFunctions, ReadColor<R16G16B16S, GLint>, WriteColor<R16G16B16S, GLint>, GL_INT, 16, 16, 16, 0, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_SNORM, GL_RGB16_SNORM_EXT, GL_RGB16_SNORM_EXT, GenerateMip<R16G16B16S>, NoCopyFunctions, ReadColor<R16G16B16S, GLfloat>, WriteColor<R16G16B16S, GLfloat>, GL_SIGNED_NORMALIZED, 16, 16, 16, 0, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_SSCALED, GL_RGB16_SSCALED_ANGLEX, GL_RGB16_SSCALED_ANGLEX, GenerateMip<R16G16B16S>, NoCopyFunctions, ReadColor<R16G16B16S, GLint>, WriteColor<R16G16B16S, GLint>, GL_INT, 16, 16, 16, 0, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_UINT, GL_RGB16UI, GL_RGB16UI, GenerateMip<R16G16B16>, NoCopyFunctions, ReadColor<R16G16B16, GLuint>, WriteColor<R16G16B16, GLuint>, GL_UNSIGNED_INT, 16, 16, 16, 0, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_UNORM, GL_RGB16_EXT, GL_RGB16_EXT, GenerateMip<R16G16B16>, NoCopyFunctions, ReadColor<R16G16B16, GLfloat>, WriteColor<R16G16B16, GLfloat>, GL_UNSIGNED_NORMALIZED, 16, 16, 16, 0, 0, 0, 0, 6, false, false },
{ FormatID::R16G16B16_USCALED, GL_RGB16_USCALED_ANGLEX, GL_RGB16_USCALED_ANGLEX, GenerateMip<R16G16B16>, NoCopyFunctions, ReadColor<R16G16B16, GLuint>, WriteColor<R16G16B16, GLuint>, GL_UNSIGNED_INT, 16, 16, 16, 0, 0, 0, 0, 6, false, false },
{ FormatID::R16G16_FLOAT, GL_RG16F, GL_RG16F, GenerateMip<R16G16F>, NoCopyFunctions, ReadColor<R16G16F, GLfloat>, WriteColor<R16G16F, GLfloat>, GL_FLOAT, 16, 16, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_SINT, GL_RG16I, GL_RG16I, GenerateMip<R16G16S>, NoCopyFunctions, ReadColor<R16G16S, GLint>, WriteColor<R16G16S, GLint>, GL_INT, 16, 16, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_SNORM, GL_RG16_SNORM_EXT, GL_RG16_SNORM_EXT, GenerateMip<R16G16S>, NoCopyFunctions, ReadColor<R16G16S, GLfloat>, WriteColor<R16G16S, GLfloat>, GL_SIGNED_NORMALIZED, 16, 16, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_SSCALED, GL_RG16_SSCALED_ANGLEX, GL_RG16_SSCALED_ANGLEX, GenerateMip<R16G16S>, NoCopyFunctions, ReadColor<R16G16S, GLint>, WriteColor<R16G16S, GLint>, GL_INT, 16, 16, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_UINT, GL_RG16UI, GL_RG16UI, GenerateMip<R16G16>, NoCopyFunctions, ReadColor<R16G16, GLuint>, WriteColor<R16G16, GLuint>, GL_UNSIGNED_INT, 16, 16, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_UNORM, GL_RG16_EXT, GL_RG16_EXT, GenerateMip<R16G16>, NoCopyFunctions, ReadColor<R16G16, GLfloat>, WriteColor<R16G16, GLfloat>, GL_UNSIGNED_NORMALIZED, 16, 16, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16G16_USCALED, GL_RG16_USCALED_ANGLEX, GL_RG16_USCALED_ANGLEX, GenerateMip<R16G16>, NoCopyFunctions, ReadColor<R16G16, GLuint>, WriteColor<R16G16, GLuint>, GL_UNSIGNED_INT, 16, 16, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R16_FLOAT, GL_R16F, GL_R16F, GenerateMip<R16F>, NoCopyFunctions, ReadColor<R16F, GLfloat>, WriteColor<R16F, GLfloat>, GL_FLOAT, 16, 0, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_SINT, GL_R16I, GL_R16I, GenerateMip<R16S>, NoCopyFunctions, ReadColor<R16S, GLint>, WriteColor<R16S, GLint>, GL_INT, 16, 0, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_SNORM, GL_R16_SNORM_EXT, GL_R16_SNORM_EXT, GenerateMip<R16S>, NoCopyFunctions, ReadColor<R16S, GLfloat>, WriteColor<R16S, GLfloat>, GL_SIGNED_NORMALIZED, 16, 0, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_SSCALED, GL_R16_SSCALED_ANGLEX, GL_R16_SSCALED_ANGLEX, GenerateMip<R16S>, NoCopyFunctions, ReadColor<R16S, GLint>, WriteColor<R16S, GLint>, GL_INT, 16, 0, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_UINT, GL_R16UI, GL_R16UI, GenerateMip<R16>, NoCopyFunctions, ReadColor<R16, GLuint>, WriteColor<R16, GLuint>, GL_UNSIGNED_INT, 16, 0, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_UNORM, GL_R16_EXT, GL_R16_EXT, GenerateMip<R16>, NoCopyFunctions, ReadColor<R16, GLfloat>, WriteColor<R16, GLfloat>, GL_UNSIGNED_NORMALIZED, 16, 0, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R16_USCALED, GL_R16_USCALED_ANGLEX, GL_R16_USCALED_ANGLEX, GenerateMip<R16>, NoCopyFunctions, ReadColor<R16, GLuint>, WriteColor<R16, GLuint>, GL_UNSIGNED_INT, 16, 0, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R32G32B32A32_FIXED, GL_RGBA32_FIXED_ANGLEX, GL_RGBA32_FIXED_ANGLEX, GenerateMip<R32G32B32A32F>, NoCopyFunctions, ReadColor<R32G32B32A32F, GLfloat>, WriteColor<R32G32B32A32F, GLfloat>, GL_FLOAT, 32, 32, 32, 32, 0, 0, 0, 16, false, true },
{ FormatID::R32G32B32A32_FLOAT, GL_RGBA32F, GL_RGBA32F, GenerateMip<R32G32B32A32F>, NoCopyFunctions, ReadColor<R32G32B32A32F, GLfloat>, WriteColor<R32G32B32A32F, GLfloat>, GL_FLOAT, 32, 32, 32, 32, 0, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_SINT, GL_RGBA32I, GL_RGBA32I, GenerateMip<R32G32B32A32S>, NoCopyFunctions, ReadColor<R32G32B32A32S, GLint>, WriteColor<R32G32B32A32S, GLint>, GL_INT, 32, 32, 32, 32, 0, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_SNORM, GL_RGBA32_SNORM_ANGLEX, GL_RGBA32_SNORM_ANGLEX, GenerateMip<R32G32B32A32S>, NoCopyFunctions, ReadColor<R32G32B32A32S, GLfloat>, WriteColor<R32G32B32A32S, GLfloat>, GL_SIGNED_NORMALIZED, 32, 32, 32, 32, 0, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_SSCALED, GL_RGBA32_SSCALED_ANGLEX, GL_RGBA32_SSCALED_ANGLEX, GenerateMip<R32G32B32A32S>, NoCopyFunctions, ReadColor<R32G32B32A32S, GLint>, WriteColor<R32G32B32A32S, GLint>, GL_INT, 32, 32, 32, 32, 0, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_UINT, GL_RGBA32UI, GL_RGBA32UI, GenerateMip<R32G32B32A32>, NoCopyFunctions, ReadColor<R32G32B32A32, GLuint>, WriteColor<R32G32B32A32, GLuint>, GL_UNSIGNED_INT, 32, 32, 32, 32, 0, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_UNORM, GL_RGBA32_UNORM_ANGLEX, GL_RGBA32_UNORM_ANGLEX, GenerateMip<R32G32B32A32>, NoCopyFunctions, ReadColor<R32G32B32A32, GLfloat>, WriteColor<R32G32B32A32, GLfloat>, GL_UNSIGNED_NORMALIZED, 32, 32, 32, 32, 0, 0, 0, 16, false, false },
{ FormatID::R32G32B32A32_USCALED, GL_RGBA32_USCALED_ANGLEX, GL_RGBA32_USCALED_ANGLEX, GenerateMip<R32G32B32A32>, NoCopyFunctions, ReadColor<R32G32B32A32, GLuint>, WriteColor<R32G32B32A32, GLuint>, GL_UNSIGNED_INT, 32, 32, 32, 32, 0, 0, 0, 16, false, false },
{ FormatID::R32G32B32_FIXED, GL_RGB32_FIXED_ANGLEX, GL_RGB32_FIXED_ANGLEX, GenerateMip<R32G32B32F>, NoCopyFunctions, ReadColor<R32G32B32F, GLfloat>, WriteColor<R32G32B32F, GLfloat>, GL_FLOAT, 32, 32, 32, 0, 0, 0, 0, 12, false, true },
{ FormatID::R32G32B32_FLOAT, GL_RGB32F, GL_RGB32F, GenerateMip<R32G32B32F>, NoCopyFunctions, ReadColor<R32G32B32F, GLfloat>, WriteColor<R32G32B32F, GLfloat>, GL_FLOAT, 32, 32, 32, 0, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_SINT, GL_RGB32I, GL_RGB32I, GenerateMip<R32G32B32S>, NoCopyFunctions, ReadColor<R32G32B32S, GLint>, WriteColor<R32G32B32S, GLint>, GL_INT, 32, 32, 32, 0, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_SNORM, GL_RGB32_SNORM_ANGLEX, GL_RGB32_SNORM_ANGLEX, GenerateMip<R32G32B32S>, NoCopyFunctions, ReadColor<R32G32B32S, GLfloat>, WriteColor<R32G32B32S, GLfloat>, GL_SIGNED_NORMALIZED, 32, 32, 32, 0, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_SSCALED, GL_RGB32_SSCALED_ANGLEX, GL_RGB32_SSCALED_ANGLEX, GenerateMip<R32G32B32S>, NoCopyFunctions, ReadColor<R32G32B32S, GLint>, WriteColor<R32G32B32S, GLint>, GL_INT, 32, 32, 32, 0, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_UINT, GL_RGB32UI, GL_RGB32UI, GenerateMip<R32G32B32>, NoCopyFunctions, ReadColor<R32G32B32, GLuint>, WriteColor<R32G32B32, GLuint>, GL_UNSIGNED_INT, 32, 32, 32, 0, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_UNORM, GL_RGB32_UNORM_ANGLEX, GL_RGB32_UNORM_ANGLEX, GenerateMip<R32G32B32>, NoCopyFunctions, ReadColor<R32G32B32, GLfloat>, WriteColor<R32G32B32, GLfloat>, GL_UNSIGNED_NORMALIZED, 32, 32, 32, 0, 0, 0, 0, 12, false, false },
{ FormatID::R32G32B32_USCALED, GL_RGB32_USCALED_ANGLEX, GL_RGB32_USCALED_ANGLEX, GenerateMip<R32G32B32>, NoCopyFunctions, ReadColor<R32G32B32, GLuint>, WriteColor<R32G32B32, GLuint>, GL_UNSIGNED_INT, 32, 32, 32, 0, 0, 0, 0, 12, false, false },
{ FormatID::R32G32_FIXED, GL_RG32_FIXED_ANGLEX, GL_RG32_FIXED_ANGLEX, GenerateMip<R32G32F>, NoCopyFunctions, ReadColor<R32G32F, GLfloat>, WriteColor<R32G32F, GLfloat>, GL_FLOAT, 32, 32, 0, 0, 0, 0, 0, 8, false, true },
{ FormatID::R32G32_FLOAT, GL_RG32F, GL_RG32F, GenerateMip<R32G32F>, NoCopyFunctions, ReadColor<R32G32F, GLfloat>, WriteColor<R32G32F, GLfloat>, GL_FLOAT, 32, 32, 0, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_SINT, GL_RG32I, GL_RG32I, GenerateMip<R32G32S>, NoCopyFunctions, ReadColor<R32G32S, GLint>, WriteColor<R32G32S, GLint>, GL_INT, 32, 32, 0, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_SNORM, GL_RG32_SNORM_ANGLEX, GL_RG32_SNORM_ANGLEX, GenerateMip<R32G32S>, NoCopyFunctions, ReadColor<R32G32S, GLfloat>, WriteColor<R32G32S, GLfloat>, GL_SIGNED_NORMALIZED, 32, 32, 0, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_SSCALED, GL_RG32_SSCALED_ANGLEX, GL_RG32_SSCALED_ANGLEX, GenerateMip<R32G32S>, NoCopyFunctions, ReadColor<R32G32S, GLint>, WriteColor<R32G32S, GLint>, GL_INT, 32, 32, 0, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_UINT, GL_RG32UI, GL_RG32UI, GenerateMip<R32G32>, NoCopyFunctions, ReadColor<R32G32, GLuint>, WriteColor<R32G32, GLuint>, GL_UNSIGNED_INT, 32, 32, 0, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_UNORM, GL_RG32_UNORM_ANGLEX, GL_RG32_UNORM_ANGLEX, GenerateMip<R32G32>, NoCopyFunctions, ReadColor<R32G32, GLfloat>, WriteColor<R32G32, GLfloat>, GL_UNSIGNED_NORMALIZED, 32, 32, 0, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32G32_USCALED, GL_RG32_USCALED_ANGLEX, GL_RG32_USCALED_ANGLEX, GenerateMip<R32G32>, NoCopyFunctions, ReadColor<R32G32, GLuint>, WriteColor<R32G32, GLuint>, GL_UNSIGNED_INT, 32, 32, 0, 0, 0, 0, 0, 8, false, false },
{ FormatID::R32_FIXED, GL_R32_FIXED_ANGLEX, GL_R32_FIXED_ANGLEX, GenerateMip<R32F>, NoCopyFunctions, ReadColor<R32F, GLfloat>, WriteColor<R32F, GLfloat>, GL_FLOAT, 32, 0, 0, 0, 0, 0, 0, 4, false, true },
{ FormatID::R32_FLOAT, GL_R32F, GL_R32F, GenerateMip<R32F>, NoCopyFunctions, ReadColor<R32F, GLfloat>, WriteColor<R32F, GLfloat>, GL_FLOAT, 32, 0, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_SINT, GL_R32I, GL_R32I, GenerateMip<R32S>, NoCopyFunctions, ReadColor<R32S, GLint>, WriteColor<R32S, GLint>, GL_INT, 32, 0, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_SNORM, GL_R32_SNORM_ANGLEX, GL_R32_SNORM_ANGLEX, GenerateMip<R32S>, NoCopyFunctions, ReadColor<R32S, GLfloat>, WriteColor<R32S, GLfloat>, GL_SIGNED_NORMALIZED, 32, 0, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_SSCALED, GL_R32_SSCALED_ANGLEX, GL_R32_SSCALED_ANGLEX, GenerateMip<R32S>, NoCopyFunctions, ReadColor<R32S, GLint>, WriteColor<R32S, GLint>, GL_INT, 32, 0, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_UINT, GL_R32UI, GL_R32UI, GenerateMip<R32>, NoCopyFunctions, ReadColor<R32, GLuint>, WriteColor<R32, GLuint>, GL_UNSIGNED_INT, 32, 0, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_UNORM, GL_R32_UNORM_ANGLEX, GL_R32_UNORM_ANGLEX, GenerateMip<R32>, NoCopyFunctions, ReadColor<R32, GLfloat>, WriteColor<R32, GLfloat>, GL_UNSIGNED_NORMALIZED, 32, 0, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R32_USCALED, GL_R32_USCALED_ANGLEX, GL_R32_USCALED_ANGLEX, GenerateMip<R32>, NoCopyFunctions, ReadColor<R32, GLuint>, WriteColor<R32, GLuint>, GL_UNSIGNED_INT, 32, 0, 0, 0, 0, 0, 0, 4, false, false },
{ FormatID::R4G4B4A4_UNORM, GL_RGBA4, GL_RGBA4, GenerateMip<R4G4B4A4>, NoCopyFunctions, ReadColor<R4G4B4A4, GLfloat>, WriteColor<R4G4B4A4, GLfloat>, GL_UNSIGNED_NORMALIZED, 4, 4, 4, 4, 0, 0, 0, 2, false, false },
{ FormatID::R5G5B5A1_UNORM, GL_RGB5_A1, GL_RGB5_A1, GenerateMip<R5G5B5A1>, NoCopyFunctions, ReadColor<R5G5B5A1, GLfloat>, WriteColor<R5G5B5A1, GLfloat>, GL_UNSIGNED_NORMALIZED, 5, 5, 5, 1, 0, 0, 0, 2, false, false },
{ FormatID::R5G6B5_UNORM, GL_RGB565, GL_RGB565, GenerateMip<R5G6B5>, NoCopyFunctions, ReadColor<R5G6B5, GLfloat>, WriteColor<R5G6B5, GLfloat>, GL_UNSIGNED_NORMALIZED, 5, 6, 5, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8G8B8A8_SINT, GL_RGBA8I, GL_RGBA8I, GenerateMip<R8G8B8A8S>, NoCopyFunctions, ReadColor<R8G8B8A8S, GLint>, WriteColor<R8G8B8A8S, GLint>, GL_INT, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_SNORM, GL_RGBA8_SNORM, GL_RGBA8_SNORM, GenerateMip<R8G8B8A8S>, NoCopyFunctions, ReadColor<R8G8B8A8S, GLfloat>, WriteColor<R8G8B8A8S, GLfloat>, GL_SIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_SSCALED, GL_RGBA8_SSCALED_ANGLEX, GL_RGBA8_SSCALED_ANGLEX, GenerateMip<R8G8B8A8S>, NoCopyFunctions, ReadColor<R8G8B8A8S, GLint>, WriteColor<R8G8B8A8S, GLint>, GL_INT, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_TYPELESS, GL_RGBA8, GL_RGBA8, GenerateMip<R8G8B8A8>, NoCopyFunctions, ReadColor<R8G8B8A8, GLfloat>, WriteColor<R8G8B8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_TYPELESS_SRGB, GL_SRGB8_ALPHA8, GL_SRGB8_ALPHA8, GenerateMip<R8G8B8A8>, NoCopyFunctions, ReadColor<R8G8B8A8, GLfloat>, WriteColor<R8G8B8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_UINT, GL_RGBA8UI, GL_RGBA8UI, GenerateMip<R8G8B8A8>, NoCopyFunctions, ReadColor<R8G8B8A8, GLuint>, WriteColor<R8G8B8A8, GLuint>, GL_UNSIGNED_INT, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_UNORM, GL_RGBA8, GL_RGBA8, GenerateMip<R8G8B8A8>, NoCopyFunctions, ReadColor<R8G8B8A8, GLfloat>, WriteColor<R8G8B8A8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_UNORM_SRGB, GL_SRGB8_ALPHA8, GL_SRGB8_ALPHA8, GenerateMip<R8G8B8A8SRGB>, NoCopyFunctions, ReadColor<R8G8B8A8SRGB, GLfloat>, WriteColor<R8G8B8A8SRGB, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::R8G8B8A8_USCALED, GL_RGBA8_USCALED_ANGLEX, GL_RGBA8_USCALED_ANGLEX, GenerateMip<R8G8B8A8>, NoCopyFunctions, ReadColor<R8G8B8A8, GLuint>, WriteColor<R8G8B8A8, GLuint>, GL_UNSIGNED_INT, 8, 8, 8, 8, 0, 0, 0, 4, false, false },
{ FormatID::R8G8B8_SINT, GL_RGB8I, GL_RGB8I, GenerateMip<R8G8B8S>, NoCopyFunctions, ReadColor<R8G8B8S, GLint>, WriteColor<R8G8B8S, GLint>, GL_INT, 8, 8, 8, 0, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_SNORM, GL_RGB8_SNORM, GL_RGB8_SNORM, GenerateMip<R8G8B8S>, NoCopyFunctions, ReadColor<R8G8B8S, GLfloat>, WriteColor<R8G8B8S, GLfloat>, GL_SIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_SSCALED, GL_RGB8_SSCALED_ANGLEX, GL_RGB8_SSCALED_ANGLEX, GenerateMip<R8G8B8S>, NoCopyFunctions, ReadColor<R8G8B8S, GLint>, WriteColor<R8G8B8S, GLint>, GL_INT, 8, 8, 8, 0, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_UINT, GL_RGB8UI, GL_RGB8UI, GenerateMip<R8G8B8>, NoCopyFunctions, ReadColor<R8G8B8, GLuint>, WriteColor<R8G8B8, GLuint>, GL_UNSIGNED_INT, 8, 8, 8, 0, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_UNORM, GL_RGB8, GL_RGB8, GenerateMip<R8G8B8>, NoCopyFunctions, ReadColor<R8G8B8, GLfloat>, WriteColor<R8G8B8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_UNORM_SRGB, GL_SRGB8, GL_SRGB8, GenerateMip<R8G8B8>, NoCopyFunctions, ReadColor<R8G8B8, GLfloat>, WriteColor<R8G8B8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 8, 0, 0, 0, 0, 3, false, false },
{ FormatID::R8G8B8_USCALED, GL_RGB8_USCALED_ANGLEX, GL_RGB8_USCALED_ANGLEX, GenerateMip<R8G8B8>, NoCopyFunctions, ReadColor<R8G8B8, GLuint>, WriteColor<R8G8B8, GLuint>, GL_UNSIGNED_INT, 8, 8, 8, 0, 0, 0, 0, 3, false, false },
{ FormatID::R8G8_SINT, GL_RG8I, GL_RG8I, GenerateMip<R8G8S>, NoCopyFunctions, ReadColor<R8G8S, GLint>, WriteColor<R8G8S, GLint>, GL_INT, 8, 8, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8G8_SNORM, GL_RG8_SNORM, GL_RG8_SNORM, GenerateMip<R8G8S>, NoCopyFunctions, ReadColor<R8G8S, GLfloat>, WriteColor<R8G8S, GLfloat>, GL_SIGNED_NORMALIZED, 8, 8, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8G8_SSCALED, GL_RG8_SSCALED_ANGLEX, GL_RG8_SSCALED_ANGLEX, GenerateMip<R8G8S>, NoCopyFunctions, ReadColor<R8G8S, GLint>, WriteColor<R8G8S, GLint>, GL_INT, 8, 8, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8G8_UINT, GL_RG8UI, GL_RG8UI, GenerateMip<R8G8>, NoCopyFunctions, ReadColor<R8G8, GLuint>, WriteColor<R8G8, GLuint>, GL_UNSIGNED_INT, 8, 8, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8G8_UNORM, GL_RG8, GL_RG8, GenerateMip<R8G8>, NoCopyFunctions, ReadColor<R8G8, GLfloat>, WriteColor<R8G8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 8, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8G8_USCALED, GL_RG8_USCALED_ANGLEX, GL_RG8_USCALED_ANGLEX, GenerateMip<R8G8>, NoCopyFunctions, ReadColor<R8G8, GLuint>, WriteColor<R8G8, GLuint>, GL_UNSIGNED_INT, 8, 8, 0, 0, 0, 0, 0, 2, false, false },
{ FormatID::R8_SINT, GL_R8I, GL_R8I, GenerateMip<R8S>, NoCopyFunctions, ReadColor<R8S, GLint>, WriteColor<R8S, GLint>, GL_INT, 8, 0, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R8_SNORM, GL_R8_SNORM, GL_R8_SNORM, GenerateMip<R8S>, NoCopyFunctions, ReadColor<R8S, GLfloat>, WriteColor<R8S, GLfloat>, GL_SIGNED_NORMALIZED, 8, 0, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R8_SSCALED, GL_R8_SSCALED_ANGLEX, GL_R8_SSCALED_ANGLEX, GenerateMip<R8S>, NoCopyFunctions, ReadColor<R8S, GLint>, WriteColor<R8S, GLint>, GL_INT, 8, 0, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R8_UINT, GL_R8UI, GL_R8UI, GenerateMip<R8>, NoCopyFunctions, ReadColor<R8, GLuint>, WriteColor<R8, GLuint>, GL_UNSIGNED_INT, 8, 0, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R8_UNORM, GL_R8, GL_R8, GenerateMip<R8>, NoCopyFunctions, ReadColor<R8, GLfloat>, WriteColor<R8, GLfloat>, GL_UNSIGNED_NORMALIZED, 8, 0, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R8_USCALED, GL_R8_USCALED_ANGLEX, GL_R8_USCALED_ANGLEX, GenerateMip<R8>, NoCopyFunctions, ReadColor<R8, GLuint>, WriteColor<R8, GLuint>, GL_UNSIGNED_INT, 8, 0, 0, 0, 0, 0, 0, 1, false, false },
{ FormatID::R9G9B9E5_SHAREDEXP, GL_RGB9_E5, GL_RGB9_E5, GenerateMip<R9G9B9E5>, NoCopyFunctions, ReadColor<R9G9B9E5, GLfloat>, WriteColor<R9G9B9E5, GLfloat>, GL_FLOAT, 9, 9, 9, 0, 0, 0, 0, 3, false, false },
{ FormatID::S8_UINT, GL_STENCIL_INDEX8, GL_STENCIL_INDEX8, nullptr, NoCopyFunctions, ReadDepthStencil<S8>, WriteDepthStencil<S8>, GL_UNSIGNED_INT, 0, 0, 0, 0, 0, 0, 8, 1, false, false },
// clang-format on
};

Просмотреть файл

@ -63,7 +63,7 @@ static constexpr rx::FastCopyFunctionMap NoCopyFunctions;
constexpr Format g_formatInfoTable[] = {{
// clang-format off
{{ FormatID::NONE, GL_NONE, GL_NONE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_NONE, 0, 0, 0, 0, 0, 0, 0, false, false }},
{{ FormatID::NONE, GL_NONE, GL_NONE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_NONE, 0, 0, 0, 0, 0, 0, 0, 0, false, false }},
{angle_format_info_cases} // clang-format on
}};
@ -170,7 +170,7 @@ def get_color_write_function(angle_format):
return 'WriteColor<' + channel_struct + ', '+ write_component_type + '>'
format_entry_template = """ {{ FormatID::{id}, {glInternalFormat}, {fboImplementationInternalFormat}, {mipGenerationFunction}, {fastCopyFunctions}, {colorReadFunction}, {colorWriteFunction}, {namedComponentType}, {R}, {G}, {B}, {A}, {D}, {S}, {pixelBytes}, {isBlock}, {isFixed} }},
format_entry_template = """ {{ FormatID::{id}, {glInternalFormat}, {fboImplementationInternalFormat}, {mipGenerationFunction}, {fastCopyFunctions}, {colorReadFunction}, {colorWriteFunction}, {namedComponentType}, {R}, {G}, {B}, {A}, {L}, {D}, {S}, {pixelBytes}, {isBlock}, {isFixed} }},
"""
def get_named_component_type(component_type):

Просмотреть файл

@ -206,7 +206,7 @@ class RecordableGraphResource : public CommandGraphResource
angle::Result recordCommands(Context *context, CommandBuffer **commandBufferOut);
// Begins a command buffer on the current graph node for in-RenderPass rendering.
// Currently only called from FramebufferVk::startNewRenderPass.
// Called from FramebufferVk::startNewRenderPass and UtilsVk functions.
angle::Result beginRenderPass(Context *context,
const Framebuffer &framebuffer,
const gl::Rectangle &renderArea,

Просмотреть файл

@ -401,18 +401,9 @@ angle::Result ContextVk::handleDirtyTextures(const gl::Context *context,
{
ANGLE_TRY(updateActiveTextures(context));
// TODO(jmadill): Should probably merge this for loop with programVk's descriptor update.
for (size_t textureIndex : mProgram->getState().getActiveSamplersMask())
{
// Ensure any writes to the textures are flushed before we read from them.
TextureVk *textureVk = mActiveTextures[textureIndex];
ANGLE_TRY(textureVk->ensureImageInitialized(this));
textureVk->getImage().addReadDependency(mDrawFramebuffer->getFramebuffer());
}
if (mProgram->hasTextures())
{
ANGLE_TRY(mProgram->updateTexturesDescriptorSet(this));
ANGLE_TRY(mProgram->updateTexturesDescriptorSet(this, mDrawFramebuffer->getFramebuffer()));
}
return angle::Result::Continue;
}

Просмотреть файл

@ -856,7 +856,7 @@ angle::Result FramebufferVk::getFramebuffer(ContextVk *contextVk, vk::Framebuffe
{
RenderTargetVk *colorRenderTarget = colorRenderTargets[colorIndex];
ASSERT(colorRenderTarget);
attachments.push_back(colorRenderTarget->getImageView()->getHandle());
attachments.push_back(colorRenderTarget->getDrawImageView()->getHandle());
ASSERT(attachmentsSize.empty() || attachmentsSize == colorRenderTarget->getImageExtents());
attachmentsSize = colorRenderTarget->getImageExtents();
@ -865,7 +865,7 @@ angle::Result FramebufferVk::getFramebuffer(ContextVk *contextVk, vk::Framebuffe
RenderTargetVk *depthStencilRenderTarget = mRenderTargetCache.getDepthStencil();
if (depthStencilRenderTarget)
{
attachments.push_back(depthStencilRenderTarget->getImageView()->getHandle());
attachments.push_back(depthStencilRenderTarget->getDrawImageView()->getHandle());
ASSERT(attachmentsSize.empty() ||
attachmentsSize == depthStencilRenderTarget->getImageExtents());

Просмотреть файл

@ -861,7 +861,8 @@ angle::Result ProgramVk::updateDefaultUniformsDescriptorSet(ContextVk *contextVk
return angle::Result::Continue;
}
angle::Result ProgramVk::updateTexturesDescriptorSet(ContextVk *contextVk)
angle::Result ProgramVk::updateTexturesDescriptorSet(ContextVk *contextVk,
vk::FramebufferHelper *framebuffer)
{
ASSERT(hasTextures());
ANGLE_TRY(allocateDescriptorSet(contextVk, kTextureDescriptorSetIndex));
@ -887,12 +888,29 @@ angle::Result ProgramVk::updateTexturesDescriptorSet(ContextVk *contextVk)
{
GLuint textureUnit = samplerBinding.boundTextureUnits[arrayElement];
TextureVk *textureVk = activeTextures[textureUnit];
const vk::ImageHelper &image = textureVk->getImage();
// Ensure any writes to the textures are flushed before we read from them.
ANGLE_TRY(textureVk->ensureImageInitialized(contextVk));
vk::ImageHelper &image = textureVk->getImage();
// Ensure the image is in read-only layout
if (image.getCurrentLayout() != VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL)
{
vk::CommandBuffer *srcLayoutChange;
ANGLE_TRY(image.recordCommands(contextVk, &srcLayoutChange));
image.changeLayoutWithStages(
VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
srcLayoutChange);
}
image.addReadDependency(framebuffer);
VkDescriptorImageInfo &imageInfo = descriptorImageInfo[writeCount];
imageInfo.sampler = textureVk->getSampler().getHandle();
imageInfo.imageView = textureVk->getImageView().getHandle();
imageInfo.imageView = textureVk->getReadImageView().getHandle();
imageInfo.imageLayout = image.getCurrentLayout();
VkWriteDescriptorSet &writeInfo = writeDescriptorInfo[writeCount];

Просмотреть файл

@ -99,7 +99,8 @@ class ProgramVk : public ProgramImpl
// Also initializes the pipeline layout, descriptor set layouts, and used descriptor ranges.
angle::Result updateUniforms(ContextVk *contextVk);
angle::Result updateTexturesDescriptorSet(ContextVk *contextVk);
angle::Result updateTexturesDescriptorSet(ContextVk *contextVk,
vk::FramebufferHelper *framebuffer);
angle::Result updateDescriptorSets(ContextVk *contextVk, vk::CommandBuffer *commandBuffer);

Просмотреть файл

@ -67,18 +67,29 @@ void RenderTargetVk::onDepthStencilDraw(vk::FramebufferHelper *framebufferVk,
mImage->addWriteDependency(framebufferVk);
}
vk::ImageHelper &RenderTargetVk::getImage()
{
ASSERT(mImage && mImage->valid());
return *mImage;
}
const vk::ImageHelper &RenderTargetVk::getImage() const
{
ASSERT(mImage && mImage->valid());
return *mImage;
}
vk::ImageView *RenderTargetVk::getImageView() const
vk::ImageView *RenderTargetVk::getDrawImageView() const
{
ASSERT(mImageView && mImageView->valid());
return mImageView;
}
vk::ImageView *RenderTargetVk::getReadImageView() const
{
return getDrawImageView();
}
const vk::Format &RenderTargetVk::getImageFormat() const
{
ASSERT(mImage && mImage->valid());

Просмотреть файл

@ -30,7 +30,7 @@ class RenderPassDesc;
// This is a very light-weight class that does not own to the resources it points to.
// It's meant only to copy across some information from a FramebufferAttachment to the
// business rendering logic. It stores Images and ImageView by pointer for performance.
// business rendering logic. It stores Images and ImageViews by pointer for performance.
class RenderTargetVk final : public FramebufferAttachmentRenderTarget
{
public:
@ -48,6 +48,7 @@ class RenderTargetVk final : public FramebufferAttachmentRenderTarget
vk::CommandBuffer *commandBuffer,
vk::RenderPassDesc *renderPassDesc);
vk::ImageHelper &getImage();
const vk::ImageHelper &getImage() const;
// getImageForRead will also transition the resource to the given layout.
@ -55,7 +56,9 @@ class RenderTargetVk final : public FramebufferAttachmentRenderTarget
VkImageLayout layout,
vk::CommandBuffer *commandBuffer);
vk::ImageHelper *getImageForWrite(vk::RecordableGraphResource *writingResource) const;
vk::ImageView *getImageView() const;
vk::ImageView *getDrawImageView() const;
vk::ImageView *getReadImageView() const;
const vk::Format &getImageFormat() const;
const gl::Extents &getImageExtents() const;
@ -67,6 +70,8 @@ class RenderTargetVk final : public FramebufferAttachmentRenderTarget
private:
vk::ImageHelper *mImage;
// Note that the draw and read image views are the same, given the requirements of a render
// target.
vk::ImageView *mImageView;
size_t mLayerIndex;
};

Просмотреть файл

@ -77,6 +77,8 @@ angle::Result RenderbufferVk::setStorage(const gl::Context *context,
VkImageAspectFlags aspect = vk::GetFormatAspectFlags(textureFormat);
// Note that LUMA textures are not color-renderable, so a read-view with swizzle is not
// needed.
ANGLE_TRY(mImage.initImageView(contextVk, gl::TextureType::_2D, aspect, gl::SwizzleState(),
&mImageView, 1));

Просмотреть файл

@ -68,7 +68,7 @@ VkPresentModeKHR GetDesiredPresentMode(const std::vector<VkPresentModeKHR> &pres
constexpr VkImageUsageFlags kSurfaceVKImageUsageFlags =
VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
constexpr VkImageUsageFlags kSurfaceVKColorImageUsageFlags =
kSurfaceVKImageUsageFlags | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
kSurfaceVKImageUsageFlags | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT;
constexpr VkImageUsageFlags kSurfaceVKDepthStencilImageUsageFlags =
kSurfaceVKImageUsageFlags | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
@ -487,6 +487,7 @@ angle::Result WindowSurfaceVk::initializeImpl(DisplayVk *displayVk)
{
SwapchainImage &member = mSwapchainImages[imageIndex];
member.image.init2DWeakReference(swapchainImages[imageIndex], extents, format, 1);
ANGLE_TRY(member.image.initImageView(displayVk, gl::TextureType::_2D,
VK_IMAGE_ASPECT_COLOR_BIT, gl::SwizzleState(),
&member.imageView, 1));

Просмотреть файл

@ -21,36 +21,6 @@ namespace rx
{
namespace
{
void MapSwizzleState(GLenum internalFormat,
const gl::SwizzleState &swizzleState,
gl::SwizzleState *swizzleStateOut)
{
switch (internalFormat)
{
case GL_LUMINANCE8_OES:
swizzleStateOut->swizzleRed = swizzleState.swizzleRed;
swizzleStateOut->swizzleGreen = swizzleState.swizzleRed;
swizzleStateOut->swizzleBlue = swizzleState.swizzleRed;
swizzleStateOut->swizzleAlpha = GL_ONE;
break;
case GL_LUMINANCE8_ALPHA8_OES:
swizzleStateOut->swizzleRed = swizzleState.swizzleRed;
swizzleStateOut->swizzleGreen = swizzleState.swizzleRed;
swizzleStateOut->swizzleBlue = swizzleState.swizzleRed;
swizzleStateOut->swizzleAlpha = swizzleState.swizzleGreen;
break;
case GL_ALPHA8_OES:
swizzleStateOut->swizzleRed = GL_ZERO;
swizzleStateOut->swizzleGreen = GL_ZERO;
swizzleStateOut->swizzleBlue = GL_ZERO;
swizzleStateOut->swizzleAlpha = swizzleState.swizzleRed;
break;
default:
*swizzleStateOut = swizzleState;
break;
}
}
constexpr VkBufferUsageFlags kStagingBufferFlags =
(VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT);
constexpr size_t kStagingBufferSize = 1024 * 16;
@ -412,7 +382,9 @@ PixelBuffer::SubresourceUpdate::SubresourceUpdate(const SubresourceUpdate &other
// TextureVk implementation.
TextureVk::TextureVk(const gl::TextureState &state, RendererVk *renderer)
: TextureImpl(state), mRenderTarget(&mImage, &mBaseLevelImageView, 0), mPixelBuffer(renderer)
: TextureImpl(state),
mRenderTarget(&mImage, &mDrawBaseLevelImageView, 0),
mPixelBuffer(renderer)
{}
TextureVk::~TextureVk() = default;
@ -590,17 +562,37 @@ angle::Result TextureVk::copySubImageImpl(const gl::Context *context,
return angle::Result::Continue;
}
const gl::Offset modifiedDestOffset(destOffset.x + sourceArea.x - sourceArea.x,
destOffset.y + sourceArea.y - sourceArea.y, 0);
gl::Rectangle destArea(destOffset.x, destOffset.y, clippedSourceArea.width,
clippedSourceArea.height);
ContextVk *contextVk = vk::GetImpl(context);
RendererVk *renderer = contextVk->getRenderer();
FramebufferVk *framebufferVk = vk::GetImpl(source);
// For now, favor conformance. We do a CPU readback that does the conversion, and then stage the
// change to the pixel buffer.
// Eventually we can improve this easily by implementing vkCmdBlitImage to do the conversion
// when its supported.
const gl::Offset modifiedDestOffset(destOffset.x, destOffset.y, 0);
const vk::Format &srcFormat = framebufferVk->getColorReadRenderTarget()->getImageFormat();
const vk::Format &destFormat = renderer->getFormat(internalFormat.sizedInternalFormat);
// TODO(syoussefi): Support draw path for when !mImage.valid(). http://anglebug.com/2958
bool canDraw = mImage.valid() &&
renderer->hasTextureFormatFeatureBits(srcFormat.vkTextureFormat,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT) &&
renderer->hasTextureFormatFeatureBits(destFormat.vkTextureFormat,
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT);
// If it's possible to perform the copy with a draw call, do that.
if (canDraw)
{
ANGLE_TRY(ensureImageInitialized(contextVk));
return copySubImageImplWithDraw(contextVk, index, modifiedDestOffset,
gl::Offset(clippedSourceArea.x, clippedSourceArea.y, 0),
gl::Extents(destArea.width, destArea.height, 1),
framebufferVk);
}
// Do a CPU readback that does the conversion, and then stage the change to the pixel buffer.
ANGLE_TRY(mPixelBuffer.stageSubresourceUpdateFromFramebuffer(
context, index, clippedSourceArea, modifiedDestOffset,
gl::Extents(clippedSourceArea.width, clippedSourceArea.height, 1), internalFormat,
@ -611,6 +603,51 @@ angle::Result TextureVk::copySubImageImpl(const gl::Context *context,
return angle::Result::Continue;
}
angle::Result TextureVk::copySubImageImplWithDraw(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
const gl::Offset &srcOffset,
const gl::Extents &extents,
FramebufferVk *source)
{
UtilsVk::CopyImageParameters params;
params.srcOffset[0] = srcOffset.x;
params.srcOffset[1] = srcOffset.y;
params.srcExtents[0] = extents.width;
params.srcExtents[1] = extents.height;
params.destOffset[0] = destOffset.x;
params.destOffset[1] = destOffset.y;
params.srcMip = 0;
params.srcHeight = source->getReadImageExtents().height;
params.flipY = contextVk->isViewportFlipEnabledForDrawFBO();
uint32_t level = index.getLevelIndex();
uint32_t baseLayer = index.hasLayer() ? index.getLayerIndex() : 0;
uint32_t layerCount = index.getLayerCount();
// TODO(syoussefi): currently this is only called from copy[Sub]Image,
// where layer count can only be 1, and source's level and layer are both 0.
// Once this code is expanded to cover copy[Sub]Texture, it should be
// adapted to get single-layer/level image views of the source as well.
// http://anglebug.com/2958
ASSERT(layerCount == 1);
vk::ImageHelper *srcImage = &source->getColorReadRenderTarget()->getImage();
vk::ImageView *srcView = source->getColorReadRenderTarget()->getReadImageView();
for (uint32_t i = 0; i < layerCount; ++i)
{
vk::ImageView *destView;
ANGLE_TRY(getLayerLevelDrawImageView(contextVk, baseLayer + i, level, &destView));
ANGLE_TRY(contextVk->getRenderer()->getUtils().copyImage(contextVk, &mImage, destView,
srcImage, srcView, params));
}
source->getFramebuffer()->addReadDependency(&mImage);
return angle::Result::Continue;
}
angle::Result TextureVk::copySubTextureImpl(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
@ -658,13 +695,11 @@ angle::Result TextureVk::copySubTextureImpl(ContextVk *contextVk,
// Fix up the read/write functions for the sake of luminance/alpha that are emulated with
// formats whose channels don't correspond to the original format (alpha is emulated with red,
// and luminance/alpha is emulated with red/green).
GLenum sourceInternalFormat = sourceVkFormat.internalFormat;
GLenum destInternalFormat = destVkFormat.internalFormat;
if (gl::GetSizedInternalFormatInfo(sourceInternalFormat).isLUMA())
if (sourceVkFormat.angleFormat().isLUMA())
{
pixelReadFunction = sourceVkFormat.angleFormat().pixelReadFunction;
}
if (gl::GetSizedInternalFormatInfo(destInternalFormat).isLUMA())
if (destVkFormat.angleFormat().isLUMA())
{
pixelWriteFunction = destVkFormat.angleFormat().pixelWriteFunction;
}
@ -921,23 +956,30 @@ angle::Result TextureVk::getAttachmentRenderTarget(const gl::Context *context,
angle::Result TextureVk::ensureImageInitialized(ContextVk *contextVk)
{
if (mImage.valid() && mPixelBuffer.empty())
{
return angle::Result::Continue;
}
RendererVk *renderer = contextVk->getRenderer();
vk::CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(mImage.recordCommands(contextVk, &commandBuffer));
const gl::ImageDesc &baseLevelDesc = mState.getBaseLevelDesc();
const gl::Extents &baseLevelExtents = baseLevelDesc.size;
const uint32_t levelCount = getLevelCount();
const vk::Format &format =
contextVk->getRenderer()->getFormat(baseLevelDesc.format.info->sizedInternalFormat);
return ensureImageInitializedImpl(contextVk, baseLevelExtents, levelCount, format);
}
angle::Result TextureVk::ensureImageInitializedImpl(ContextVk *contextVk,
const gl::Extents &baseLevelExtents,
uint32_t levelCount,
const vk::Format &format)
{
if (mImage.valid() && mPixelBuffer.empty())
{
return angle::Result::Continue;
}
vk::CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(mImage.recordCommands(contextVk, &commandBuffer));
if (!mImage.valid())
{
const vk::Format &format =
renderer->getFormat(baseLevelDesc.format.info->sizedInternalFormat);
ANGLE_TRY(initImage(contextVk, format, baseLevelExtents, levelCount, commandBuffer));
}
@ -947,18 +989,14 @@ angle::Result TextureVk::ensureImageInitialized(ContextVk *contextVk)
angle::Result TextureVk::initCubeMapRenderTargets(ContextVk *contextVk)
{
// Lazy init. Check if already initialized.
if (!mCubeMapFaceImageViews.empty())
if (!mCubeMapRenderTargets.empty())
return angle::Result::Continue;
mCubeMapFaceImageViews.resize(gl::kCubeFaceCount);
for (size_t cubeMapFaceIndex = 0; cubeMapFaceIndex < gl::kCubeFaceCount; ++cubeMapFaceIndex)
{
vk::ImageView &imageView = mCubeMapFaceImageViews[cubeMapFaceIndex];
ANGLE_TRY(mImage.initLayerImageView(contextVk, gl::TextureType::CubeMap,
VK_IMAGE_ASPECT_COLOR_BIT, gl::SwizzleState(),
&imageView, 1, cubeMapFaceIndex, 1));
mCubeMapRenderTargets.emplace_back(&mImage, &imageView, cubeMapFaceIndex);
vk::ImageView *imageView;
ANGLE_TRY(getLayerLevelDrawImageView(contextVk, cubeMapFaceIndex, 0, &imageView));
mCubeMapRenderTargets.emplace_back(&mImage, imageView, cubeMapFaceIndex);
}
return angle::Result::Continue;
}
@ -1026,17 +1064,50 @@ angle::Result TextureVk::initializeContents(const gl::Context *context,
return angle::Result::Continue;
}
const vk::ImageView &TextureVk::getImageView() const
const vk::ImageView &TextureVk::getReadImageView() const
{
ASSERT(mImage.valid());
const GLenum minFilter = mState.getSamplerState().getMinFilter();
if (minFilter == GL_LINEAR || minFilter == GL_NEAREST)
{
return mBaseLevelImageView;
return mReadBaseLevelImageView;
}
return mMipmapImageView;
return mReadMipmapImageView;
}
angle::Result TextureVk::getLayerLevelDrawImageView(vk::Context *context,
size_t layer,
size_t level,
vk::ImageView **imageViewOut)
{
ASSERT(mImage.valid());
// Lazily allocate the storage for image views
if (mLayerLevelDrawImageViews.empty())
{
mLayerLevelDrawImageViews.resize(mImage.getLayerCount());
}
ASSERT(mLayerLevelDrawImageViews.size() > layer);
if (mLayerLevelDrawImageViews[layer].empty())
{
mLayerLevelDrawImageViews[layer].resize(mImage.getLevelCount());
}
ASSERT(mLayerLevelDrawImageViews[layer].size() > level);
*imageViewOut = &mLayerLevelDrawImageViews[layer][level];
if ((*imageViewOut)->valid())
{
return angle::Result::Continue;
}
// Lazily allocate the image view itself.
// Note that these views are specifically made to be used as color attachments, and therefore
// don't have swizzle.
return mImage.initLayerImageView(context, mState.getType(), VK_IMAGE_ASPECT_COLOR_BIT,
gl::SwizzleState(), *imageViewOut, level, 1, layer, 1);
}
const vk::Sampler &TextureVk::getSampler() const
@ -1064,17 +1135,14 @@ angle::Result TextureVk::initImage(ContextVk *contextVk,
ANGLE_TRY(mImage.initMemory(contextVk, renderer->getMemoryProperties(), flags));
gl::SwizzleState mappedSwizzle;
MapSwizzleState(format.internalFormat, mState.getSwizzleState(), &mappedSwizzle);
MapSwizzleState(format, mState.getSwizzleState(), &mappedSwizzle);
// Renderable textures cannot have a swizzle.
ASSERT(!contextVk->getTextureCaps().get(format.internalFormat).textureAttachment ||
!mappedSwizzle.swizzleRequired());
// TODO(jmadill): Separate imageviews for RenderTargets and Sampling.
ANGLE_TRY(mImage.initImageView(contextVk, mState.getType(), VK_IMAGE_ASPECT_COLOR_BIT,
mappedSwizzle, &mMipmapImageView, levelCount));
mappedSwizzle, &mReadMipmapImageView, levelCount));
ANGLE_TRY(mImage.initImageView(contextVk, mState.getType(), VK_IMAGE_ASPECT_COLOR_BIT,
mappedSwizzle, &mBaseLevelImageView, 1));
mappedSwizzle, &mReadBaseLevelImageView, 1));
ANGLE_TRY(mImage.initImageView(contextVk, mState.getType(), VK_IMAGE_ASPECT_COLOR_BIT,
gl::SwizzleState(), &mDrawBaseLevelImageView, 1));
// TODO(jmadill): Fold this into the RenderPass load/store ops. http://anglebug.com/2361
VkClearColorValue black = {{0, 0, 0, 1.0f}};
@ -1088,14 +1156,21 @@ void TextureVk::releaseImage(const gl::Context *context, RendererVk *renderer)
Serial currentSerial = renderer->getCurrentQueueSerial();
renderer->releaseObject(currentSerial, &mBaseLevelImageView);
renderer->releaseObject(currentSerial, &mMipmapImageView);
renderer->releaseObject(currentSerial, &mDrawBaseLevelImageView);
renderer->releaseObject(currentSerial, &mReadBaseLevelImageView);
renderer->releaseObject(currentSerial, &mReadMipmapImageView);
for (vk::ImageView &imageView : mCubeMapFaceImageViews)
for (auto &layerViews : mLayerLevelDrawImageViews)
{
renderer->releaseObject(currentSerial, &imageView);
for (vk::ImageView &imageView : layerViews)
{
if (imageView.valid())
{
renderer->releaseObject(currentSerial, &imageView);
}
}
}
mCubeMapFaceImageViews.clear();
mLayerLevelDrawImageViews.clear();
mCubeMapRenderTargets.clear();
}

Просмотреть файл

@ -204,7 +204,11 @@ class TextureVk : public TextureImpl
return mImage;
}
const vk::ImageView &getImageView() const;
const vk::ImageView &getReadImageView() const;
angle::Result getLayerLevelDrawImageView(vk::Context *context,
size_t layer,
size_t level,
vk::ImageView **imageViewOut);
const vk::Sampler &getSampler() const;
angle::Result ensureImageInitialized(ContextVk *contextVk);
@ -240,6 +244,13 @@ class TextureVk : public TextureImpl
const gl::InternalFormat &internalFormat,
gl::Framebuffer *source);
angle::Result copySubImageImplWithDraw(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
const gl::Offset &srcOffset,
const gl::Extents &extents,
FramebufferVk *source);
angle::Result copySubTextureImpl(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
@ -260,13 +271,19 @@ class TextureVk : public TextureImpl
uint32_t getLevelCount() const;
angle::Result initCubeMapRenderTargets(ContextVk *contextVk);
angle::Result ensureImageInitializedImpl(ContextVk *contextVk,
const gl::Extents &baseLevelExtents,
uint32_t levelCount,
const vk::Format &format);
vk::ImageHelper mImage;
vk::ImageView mBaseLevelImageView;
vk::ImageView mMipmapImageView;
vk::ImageView mDrawBaseLevelImageView;
vk::ImageView mReadBaseLevelImageView;
vk::ImageView mReadMipmapImageView;
std::vector<std::vector<vk::ImageView>> mLayerLevelDrawImageViews;
vk::Sampler mSampler;
RenderTargetVk mRenderTarget;
std::vector<vk::ImageView> mCubeMapFaceImageViews;
std::vector<RenderTargetVk> mCubeMapRenderTargets;
PixelBuffer mPixelBuffer;

Просмотреть файл

@ -18,6 +18,7 @@ namespace rx
namespace BufferUtils_comp = vk::InternalShader::BufferUtils_comp;
namespace ConvertVertex_comp = vk::InternalShader::ConvertVertex_comp;
namespace ImageCopy_frag = vk::InternalShader::ImageCopy_frag;
namespace
{
@ -29,32 +30,32 @@ constexpr uint32_t kBufferCopyDestinationBinding = 0;
constexpr uint32_t kBufferCopySourceBinding = 1;
constexpr uint32_t kConvertVertexDestinationBinding = 0;
constexpr uint32_t kConvertVertexSourceBinding = 1;
constexpr uint32_t kImageCopySourceBinding = 0;
uint32_t GetBufferUtilsFlags(size_t dispatchSize, const vk::Format &format)
{
uint32_t flags = dispatchSize % 64 == 0 ? BufferUtils_comp::kIsAligned : 0;
const angle::Format &bufferFormat = format.bufferFormat();
flags |= bufferFormat.componentType == GL_INT
flags |= bufferFormat.isInt()
? BufferUtils_comp::kIsInt
: bufferFormat.componentType == GL_UNSIGNED_INT ? BufferUtils_comp::kIsUint
: BufferUtils_comp::kIsFloat;
: bufferFormat.isUint() ? BufferUtils_comp::kIsUint : BufferUtils_comp::kIsFloat;
return flags;
}
uint32_t GetConvertVertexFlags(const UtilsVk::ConvertVertexParameters &params)
{
bool srcIsInt = params.srcFormat->componentType == GL_INT;
bool srcIsUint = params.srcFormat->componentType == GL_UNSIGNED_INT;
bool srcIsSnorm = params.srcFormat->componentType == GL_SIGNED_NORMALIZED;
bool srcIsUnorm = params.srcFormat->componentType == GL_UNSIGNED_NORMALIZED;
bool srcIsInt = params.srcFormat->isInt();
bool srcIsUint = params.srcFormat->isUint();
bool srcIsSnorm = params.srcFormat->isSnorm();
bool srcIsUnorm = params.srcFormat->isUnorm();
bool srcIsFixed = params.srcFormat->isFixed;
bool srcIsFloat = params.srcFormat->componentType == GL_FLOAT;
bool srcIsFloat = params.srcFormat->isFloat();
bool destIsInt = params.destFormat->componentType == GL_INT;
bool destIsUint = params.destFormat->componentType == GL_UNSIGNED_INT;
bool destIsFloat = params.destFormat->componentType == GL_FLOAT;
bool destIsInt = params.destFormat->isInt();
bool destIsUint = params.destFormat->isUint();
bool destIsFloat = params.destFormat->isFloat();
// Assert on the types to make sure the shader supports its. These are based on
// ConvertVertex_comp::Conversion values.
@ -115,6 +116,23 @@ uint32_t GetConvertVertexFlags(const UtilsVk::ConvertVertexParameters &params)
return flags;
}
uint32_t GetImageCopyFlags(const vk::Format &srcFormat, const vk::Format &destFormat)
{
const angle::Format &srcAngleFormat = srcFormat.angleFormat();
const angle::Format &destAngleFormat = destFormat.angleFormat();
uint32_t flags = 0;
flags |= srcAngleFormat.isInt() ? ImageCopy_frag::kSrcIsInt
: srcAngleFormat.isUint() ? ImageCopy_frag::kSrcIsUint
: ImageCopy_frag::kSrcIsFloat;
flags |= destAngleFormat.isInt() ? ImageCopy_frag::kDestIsInt
: destAngleFormat.isUint() ? ImageCopy_frag::kDestIsUint
: ImageCopy_frag::kDestIsFloat;
return flags;
}
} // namespace
UtilsVk::UtilsVk() = default;
@ -142,6 +160,10 @@ void UtilsVk::destroy(VkDevice device)
program.destroy(device);
}
mImageClearProgram.destroy(device);
for (vk::ShaderProgramHelper &program : mImageCopyPrograms)
{
program.destroy(device);
}
}
angle::Result UtilsVk::ensureResourcesInitialized(vk::Context *context,
@ -244,6 +266,21 @@ angle::Result UtilsVk::ensureImageClearResourcesInitialized(vk::Context *context
sizeof(ImageClearShaderParams));
}
angle::Result UtilsVk::ensureImageCopyResourcesInitialized(vk::Context *context)
{
if (mPipelineLayouts[Function::ImageCopy].valid())
{
return angle::Result::Continue;
}
VkDescriptorPoolSize setSizes[1] = {
{VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1},
};
return ensureResourcesInitialized(context, Function::ImageCopy, setSizes, ArraySize(setSizes),
sizeof(ImageCopyShaderParams));
}
angle::Result UtilsVk::setupProgram(vk::Context *context,
Function function,
vk::RefCounted<vk::ShaderAndSerial> *fsCsShader,
@ -504,6 +541,44 @@ angle::Result UtilsVk::convertVertexBuffer(vk::Context *context,
return angle::Result::Continue;
}
angle::Result UtilsVk::startRenderPass(vk::Context *context,
vk::ImageHelper *image,
vk::ImageView *imageView,
const vk::RenderPassDesc &renderPassDesc,
const gl::Rectangle &renderArea,
vk::CommandBuffer **commandBufferOut)
{
RendererVk *renderer = context->getRenderer();
vk::RenderPass *renderPass = nullptr;
ANGLE_TRY(renderer->getCompatibleRenderPass(context, renderPassDesc, &renderPass));
VkFramebufferCreateInfo framebufferInfo = {};
framebufferInfo.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
framebufferInfo.flags = 0;
framebufferInfo.renderPass = renderPass->getHandle();
framebufferInfo.attachmentCount = 1;
framebufferInfo.pAttachments = imageView->ptr();
framebufferInfo.width = renderArea.x + renderArea.width;
framebufferInfo.height = renderArea.y + renderArea.height;
framebufferInfo.layers = 1;
vk::Framebuffer framebuffer;
ANGLE_VK_TRY(context, framebuffer.init(context->getDevice(), framebufferInfo));
// TODO(jmadill): Proper clear value implementation. http://anglebug.com/2361
std::vector<VkClearValue> clearValues = {{}};
ASSERT(clearValues.size() == 1);
ANGLE_TRY(image->beginRenderPass(context, framebuffer, renderArea, renderPassDesc, clearValues,
commandBufferOut));
renderer->releaseObject(renderer->getCurrentQueueSerial(), &framebuffer);
return angle::Result::Continue;
}
angle::Result UtilsVk::clearImage(ContextVk *contextVk,
FramebufferVk *framebuffer,
const ClearImageParameters &params)
@ -552,4 +627,120 @@ angle::Result UtilsVk::clearImage(ContextVk *contextVk,
return angle::Result::Continue;
}
angle::Result UtilsVk::copyImage(vk::Context *context,
vk::ImageHelper *dest,
vk::ImageView *destView,
vk::ImageHelper *src,
vk::ImageView *srcView,
const CopyImageParameters &params)
{
RendererVk *renderer = context->getRenderer();
ANGLE_TRY(ensureImageCopyResourcesInitialized(context));
const vk::Format &srcFormat = src->getFormat();
const vk::Format &destFormat = dest->getFormat();
ImageCopyShaderParams shaderParams;
shaderParams.flipY = params.flipY;
shaderParams.destHasLuminance = destFormat.angleFormat().luminanceBits > 0;
shaderParams.destIsAlpha =
destFormat.angleFormat().isLUMA() && destFormat.angleFormat().alphaBits > 0;
shaderParams.srcMip = params.srcMip;
shaderParams.srcOffset[0] = params.srcOffset[0];
shaderParams.srcOffset[1] = params.srcOffset[1];
shaderParams.destOffset[0] = params.destOffset[0];
shaderParams.destOffset[1] = params.destOffset[1];
if (params.flipY)
{
// If viewport is flipped, the shader expects srcOffset[1] to have the
// last row's index instead of the first's.
shaderParams.srcOffset[1] = params.srcHeight - shaderParams.srcOffset[1] - 1;
}
uint32_t flags = GetImageCopyFlags(srcFormat, destFormat);
VkDescriptorSet descriptorSet;
vk::SharedDescriptorPoolBinding descriptorPoolBinding;
ANGLE_TRY(mDescriptorPools[Function::ImageCopy].allocateSets(
context, mDescriptorSetLayouts[Function::ImageCopy][kSetIndex].get().ptr(), 1,
&descriptorPoolBinding, &descriptorSet));
descriptorPoolBinding.get().updateSerial(context->getRenderer()->getCurrentQueueSerial());
vk::RenderPassDesc renderPassDesc;
renderPassDesc.setSamples(dest->getSamples());
renderPassDesc.packAttachment(destFormat);
vk::GraphicsPipelineDesc pipelineDesc;
pipelineDesc.initDefaults();
pipelineDesc.updateRenderPassDesc(renderPassDesc);
gl::Rectangle renderArea;
renderArea.x = params.destOffset[0];
renderArea.y = params.destOffset[1];
renderArea.width = params.srcExtents[0];
renderArea.height = params.srcExtents[1];
// Change source layout outside render pass
vk::CommandBuffer *srcLayoutChange;
ANGLE_TRY(src->recordCommands(context, &srcLayoutChange));
src->changeLayoutWithStages(VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, srcLayoutChange);
// Change destination layout outside render pass as well
vk::CommandBuffer *destLayoutChange;
ANGLE_TRY(dest->recordCommands(context, &destLayoutChange));
dest->changeLayoutWithStages(VK_IMAGE_ASPECT_COLOR_BIT,
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, destLayoutChange);
vk::CommandBuffer *commandBuffer;
ANGLE_TRY(startRenderPass(context, dest, destView, renderPassDesc, renderArea, &commandBuffer));
// Source's layout change should happen before rendering
src->addReadDependency(dest);
VkDescriptorImageInfo imageInfo = {};
imageInfo.imageView = srcView->getHandle();
imageInfo.imageLayout = src->getCurrentLayout();
VkWriteDescriptorSet writeInfo = {};
writeInfo.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
writeInfo.dstSet = descriptorSet;
writeInfo.dstBinding = kImageCopySourceBinding;
writeInfo.descriptorCount = 1;
writeInfo.descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE;
writeInfo.pImageInfo = &imageInfo;
vkUpdateDescriptorSets(context->getDevice(), 1, &writeInfo, 0, nullptr);
vk::ShaderLibrary &shaderLibrary = renderer->getShaderLibrary();
vk::RefCounted<vk::ShaderAndSerial> *vertexShader = nullptr;
vk::RefCounted<vk::ShaderAndSerial> *fragmentShader = nullptr;
ANGLE_TRY(shaderLibrary.getFullScreenQuad_vert(context, 0, &vertexShader));
ANGLE_TRY(shaderLibrary.getImageCopy_frag(context, flags, &fragmentShader));
ANGLE_TRY(setupProgram(context, Function::ImageCopy, fragmentShader, vertexShader,
&mImageCopyPrograms[flags], &pipelineDesc, descriptorSet, &shaderParams,
sizeof(shaderParams), commandBuffer));
VkViewport viewport;
gl_vk::GetViewport(renderArea, 0.0f, 1.0f, false, dest->getExtents().height, &viewport);
VkRect2D scissor = gl_vk::GetRect(renderArea);
commandBuffer->setViewport(0, 1, &viewport);
commandBuffer->setScissor(0, 1, &scissor);
commandBuffer->draw(6, 1, 0, 0);
descriptorPoolBinding.reset();
return angle::Result::Continue;
}
} // namespace rx

Просмотреть файл

@ -68,6 +68,16 @@ class UtilsVk : angle::NonCopyable
const vk::RenderPassDesc *renderPassDesc;
};
struct CopyImageParameters
{
int srcOffset[2];
int srcExtents[2];
int destOffset[2];
int srcMip;
int srcHeight;
bool flipY;
};
angle::Result clearBuffer(vk::Context *context,
vk::BufferHelper *dest,
const ClearParameters &params);
@ -87,6 +97,13 @@ class UtilsVk : angle::NonCopyable
FramebufferVk *framebuffer,
const ClearImageParameters &params);
angle::Result copyImage(vk::Context *context,
vk::ImageHelper *dest,
vk::ImageView *destView,
vk::ImageHelper *src,
vk::ImageView *srcView,
const CopyImageParameters &params);
private:
struct BufferUtilsShaderParams
{
@ -121,20 +138,32 @@ class UtilsVk : angle::NonCopyable
VkClearColorValue clearValue = {};
};
struct ImageCopyShaderParams
{
// Structure matching PushConstants in ImageCopy.frag
uint32_t flipY = 0;
uint32_t destHasLuminance = 0;
uint32_t destIsAlpha = 0;
int32_t srcMip = 0;
int32_t srcOffset[2] = {};
int32_t destOffset[2] = {};
};
// Functions implemented by the class:
enum class Function
{
// Functions implemented in graphics
ImageClear = 0,
ImageCopy = 1,
// Functions implemented in compute
ComputeStartIndex = 1, // Special value to separate draw and dispatch functions.
BufferClear = 1,
BufferCopy = 2,
ConvertVertexBuffer = 3,
ComputeStartIndex = 2, // Special value to separate draw and dispatch functions.
BufferClear = 2,
BufferCopy = 3,
ConvertVertexBuffer = 4,
InvalidEnum = 4,
EnumCount = 4,
InvalidEnum = 5,
EnumCount = 5,
};
// Common function that creates the pipeline for the specified function, binds it and prepares
@ -170,6 +199,14 @@ class UtilsVk : angle::NonCopyable
angle::Result ensureBufferCopyResourcesInitialized(vk::Context *context);
angle::Result ensureConvertVertexResourcesInitialized(vk::Context *context);
angle::Result ensureImageClearResourcesInitialized(vk::Context *context);
angle::Result ensureImageCopyResourcesInitialized(vk::Context *context);
angle::Result startRenderPass(vk::Context *context,
vk::ImageHelper *image,
vk::ImageView *imageView,
const vk::RenderPassDesc &renderPassDesc,
const gl::Rectangle &renderArea,
vk::CommandBuffer **commandBufferOut);
angle::PackedEnumMap<Function, vk::DescriptorSetLayoutPointerArray> mDescriptorSetLayouts;
angle::PackedEnumMap<Function, vk::BindingPointer<vk::PipelineLayout>> mPipelineLayouts;
@ -183,6 +220,8 @@ class UtilsVk : angle::NonCopyable
mConvertVertexPrograms[vk::InternalShader::ConvertVertex_comp::kFlagsMask |
vk::InternalShader::ConvertVertex_comp::kConversionMask];
vk::ShaderProgramHelper mImageClearProgram;
vk::ShaderProgramHelper mImageCopyPrograms[vk::InternalShader::ImageCopy_frag::kSrcFormatMask |
vk::InternalShader::ImageCopy_frag::kDestFormatMask];
};
} // namespace rx

Просмотреть файл

@ -0,0 +1,127 @@
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000000[] = {
0x07230203,0x00010000,0x00080007,0x0000005c,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x0000005a,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002d,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000030,0x00637273,0x00050005,0x0000003c,
0x74736564,0x756c6156,0x00000065,0x00040005,0x0000005a,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000030,0x00000022,0x00000000,
0x00040047,0x00000030,0x00000021,0x00000000,0x00040047,0x0000005a,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040020,0x0000002c,
0x00000007,0x0000000b,0x00090019,0x0000002e,0x0000000a,0x00000001,0x00000000,0x00000000,
0x00000000,0x00000001,0x00000000,0x00040020,0x0000002f,0x00000000,0x0000002e,0x0004003b,
0x0000002f,0x00000030,0x00000000,0x0004002b,0x00000006,0x00000032,0x00000004,0x0004002b,
0x00000006,0x00000037,0x00000003,0x00040020,0x00000038,0x00000009,0x00000006,0x0004002b,
0x00000006,0x00000043,0x00000001,0x0004002b,0x00000006,0x0000004e,0x00000002,0x0004002b,
0x00000012,0x00000054,0x00000003,0x00040020,0x00000055,0x00000007,0x0000000a,0x00040020,
0x00000059,0x00000003,0x0000000b,0x0004003b,0x00000059,0x0000005a,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002c,
0x0000002d,0x00000007,0x0004003b,0x0000002c,0x0000003c,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002e,0x00000031,
0x00000030,0x00050041,0x00000017,0x00000033,0x00000015,0x00000032,0x0004003d,0x00000007,
0x00000034,0x00000033,0x0004003d,0x00000007,0x00000035,0x0000001b,0x00050080,0x00000007,
0x00000036,0x00000034,0x00000035,0x00050041,0x00000038,0x00000039,0x00000015,0x00000037,
0x0004003d,0x00000006,0x0000003a,0x00000039,0x0007005f,0x0000000b,0x0000003b,0x00000031,
0x00000036,0x00000002,0x0000003a,0x0003003e,0x0000002d,0x0000003b,0x0004003d,0x0000000b,
0x0000003d,0x0000002d,0x00050051,0x0000000a,0x0000003e,0x0000003d,0x00000000,0x00050051,
0x0000000a,0x0000003f,0x0000003d,0x00000001,0x00050051,0x0000000a,0x00000040,0x0000003d,
0x00000002,0x00050051,0x0000000a,0x00000041,0x0000003d,0x00000003,0x00070050,0x0000000b,
0x00000042,0x0000003e,0x0000003f,0x00000040,0x00000041,0x0003003e,0x0000003c,0x00000042,
0x00050041,0x0000001e,0x00000044,0x00000015,0x00000043,0x0004003d,0x00000012,0x00000045,
0x00000044,0x000500ab,0x00000021,0x00000046,0x00000045,0x00000022,0x000300f7,0x00000048,
0x00000000,0x000400fa,0x00000046,0x00000047,0x0000004d,0x000200f8,0x00000047,0x0004003d,
0x0000000b,0x00000049,0x0000003c,0x0007004f,0x0000000e,0x0000004a,0x00000049,0x00000049,
0x00000000,0x00000003,0x0004003d,0x0000000b,0x0000004b,0x0000003c,0x0009004f,0x0000000b,
0x0000004c,0x0000004b,0x0000004a,0x00000004,0x00000005,0x00000002,0x00000003,0x0003003e,
0x0000003c,0x0000004c,0x000200f9,0x00000048,0x000200f8,0x0000004d,0x00050041,0x0000001e,
0x0000004f,0x00000015,0x0000004e,0x0004003d,0x00000012,0x00000050,0x0000004f,0x000500ab,
0x00000021,0x00000051,0x00000050,0x00000022,0x000300f7,0x00000053,0x00000000,0x000400fa,
0x00000051,0x00000052,0x00000053,0x000200f8,0x00000052,0x00050041,0x00000055,0x00000056,
0x0000003c,0x00000054,0x0004003d,0x0000000a,0x00000057,0x00000056,0x00050041,0x00000055,
0x00000058,0x0000003c,0x00000022,0x0003003e,0x00000058,0x00000057,0x000200f9,0x00000053,
0x000200f8,0x00000053,0x000200f9,0x00000048,0x000200f8,0x00000048,0x0004003d,0x0000000b,
0x0000005b,0x0000003c,0x0003003e,0x0000005a,0x0000005b,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform texture2D src;
layout(location = 0)out vec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
vec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
vec4 destValue = vec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code

Просмотреть файл

@ -0,0 +1,125 @@
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000001[] = {
0x07230203,0x00010000,0x00080007,0x0000005a,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000058,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003e,
0x74736564,0x756c6156,0x00000065,0x00040005,0x00000058,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x00000058,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000006,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000006,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x00040020,0x0000003d,0x00000007,0x0000000b,0x0004002b,
0x00000006,0x00000041,0x00000001,0x0004002b,0x00000006,0x0000004c,0x00000002,0x0004002b,
0x00000012,0x00000052,0x00000003,0x00040020,0x00000053,0x00000007,0x0000000a,0x00040020,
0x00000057,0x00000003,0x0000000b,0x0004003b,0x00000057,0x00000058,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000003d,0x0000003e,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x0000003f,0x0000002e,0x0004006f,0x0000000b,0x00000040,0x0000003f,0x0003003e,0x0000003e,
0x00000040,0x00050041,0x0000001e,0x00000042,0x00000015,0x00000041,0x0004003d,0x00000012,
0x00000043,0x00000042,0x000500ab,0x00000021,0x00000044,0x00000043,0x00000022,0x000300f7,
0x00000046,0x00000000,0x000400fa,0x00000044,0x00000045,0x0000004b,0x000200f8,0x00000045,
0x0004003d,0x0000000b,0x00000047,0x0000003e,0x0007004f,0x0000000e,0x00000048,0x00000047,
0x00000047,0x00000000,0x00000003,0x0004003d,0x0000000b,0x00000049,0x0000003e,0x0009004f,
0x0000000b,0x0000004a,0x00000049,0x00000048,0x00000004,0x00000005,0x00000002,0x00000003,
0x0003003e,0x0000003e,0x0000004a,0x000200f9,0x00000046,0x000200f8,0x0000004b,0x00050041,
0x0000001e,0x0000004d,0x00000015,0x0000004c,0x0004003d,0x00000012,0x0000004e,0x0000004d,
0x000500ab,0x00000021,0x0000004f,0x0000004e,0x00000022,0x000300f7,0x00000051,0x00000000,
0x000400fa,0x0000004f,0x00000050,0x00000051,0x000200f8,0x00000050,0x00050041,0x00000053,
0x00000054,0x0000003e,0x00000052,0x0004003d,0x0000000a,0x00000055,0x00000054,0x00050041,
0x00000053,0x00000056,0x0000003e,0x00000022,0x0003003e,0x00000056,0x00000055,0x000200f9,
0x00000051,0x000200f8,0x00000051,0x000200f9,0x00000046,0x000200f8,0x00000046,0x0004003d,
0x0000000b,0x00000059,0x0000003e,0x0003003e,0x00000058,0x00000059,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform itexture2D src;
layout(location = 0)out vec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
vec4 destValue = vec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code

Просмотреть файл

@ -0,0 +1,125 @@
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000002[] = {
0x07230203,0x00010000,0x00080007,0x0000005a,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000058,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003e,
0x74736564,0x756c6156,0x00000065,0x00040005,0x00000058,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x00000058,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000012,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000012,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x00040020,0x0000003d,0x00000007,0x0000000b,0x0004002b,
0x00000006,0x00000041,0x00000001,0x0004002b,0x00000006,0x0000004c,0x00000002,0x0004002b,
0x00000012,0x00000052,0x00000003,0x00040020,0x00000053,0x00000007,0x0000000a,0x00040020,
0x00000057,0x00000003,0x0000000b,0x0004003b,0x00000057,0x00000058,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000003d,0x0000003e,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x0000003f,0x0000002e,0x00040070,0x0000000b,0x00000040,0x0000003f,0x0003003e,0x0000003e,
0x00000040,0x00050041,0x0000001e,0x00000042,0x00000015,0x00000041,0x0004003d,0x00000012,
0x00000043,0x00000042,0x000500ab,0x00000021,0x00000044,0x00000043,0x00000022,0x000300f7,
0x00000046,0x00000000,0x000400fa,0x00000044,0x00000045,0x0000004b,0x000200f8,0x00000045,
0x0004003d,0x0000000b,0x00000047,0x0000003e,0x0007004f,0x0000000e,0x00000048,0x00000047,
0x00000047,0x00000000,0x00000003,0x0004003d,0x0000000b,0x00000049,0x0000003e,0x0009004f,
0x0000000b,0x0000004a,0x00000049,0x00000048,0x00000004,0x00000005,0x00000002,0x00000003,
0x0003003e,0x0000003e,0x0000004a,0x000200f9,0x00000046,0x000200f8,0x0000004b,0x00050041,
0x0000001e,0x0000004d,0x00000015,0x0000004c,0x0004003d,0x00000012,0x0000004e,0x0000004d,
0x000500ab,0x00000021,0x0000004f,0x0000004e,0x00000022,0x000300f7,0x00000051,0x00000000,
0x000400fa,0x0000004f,0x00000050,0x00000051,0x000200f8,0x00000050,0x00050041,0x00000053,
0x00000054,0x0000003e,0x00000052,0x0004003d,0x0000000a,0x00000055,0x00000054,0x00050041,
0x00000053,0x00000056,0x0000003e,0x00000022,0x0003003e,0x00000056,0x00000055,0x000200f9,
0x00000051,0x000200f8,0x00000051,0x000200f9,0x00000046,0x000200f8,0x00000046,0x0004003d,
0x0000000b,0x00000059,0x0000003e,0x0003003e,0x00000058,0x00000059,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform utexture2D src;
layout(location = 0)out vec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
uvec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
vec4 destValue = vec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code

Просмотреть файл

@ -0,0 +1,125 @@
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000004[] = {
0x07230203,0x00010000,0x00080007,0x00000059,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000057,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002d,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000030,0x00637273,0x00050005,0x0000003e,
0x74736564,0x756c6156,0x00000065,0x00040005,0x00000057,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000030,0x00000022,0x00000000,
0x00040047,0x00000030,0x00000021,0x00000000,0x00040047,0x00000057,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040020,0x0000002c,
0x00000007,0x0000000b,0x00090019,0x0000002e,0x0000000a,0x00000001,0x00000000,0x00000000,
0x00000000,0x00000001,0x00000000,0x00040020,0x0000002f,0x00000000,0x0000002e,0x0004003b,
0x0000002f,0x00000030,0x00000000,0x0004002b,0x00000006,0x00000032,0x00000004,0x0004002b,
0x00000006,0x00000037,0x00000003,0x00040020,0x00000038,0x00000009,0x00000006,0x00040017,
0x0000003c,0x00000006,0x00000004,0x00040020,0x0000003d,0x00000007,0x0000003c,0x0004002b,
0x00000006,0x00000041,0x00000001,0x0004002b,0x00000006,0x0000004c,0x00000002,0x0004002b,
0x00000012,0x00000052,0x00000003,0x00040020,0x00000056,0x00000003,0x0000003c,0x0004003b,
0x00000056,0x00000057,0x00000003,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,
0x000200f8,0x00000005,0x0004003b,0x00000008,0x00000009,0x00000007,0x0004003b,0x00000008,
0x0000001b,0x00000007,0x0004003b,0x0000002c,0x0000002d,0x00000007,0x0004003b,0x0000003d,
0x0000003e,0x00000007,0x0004003d,0x0000000b,0x0000000f,0x0000000d,0x0007004f,0x0000000e,
0x00000010,0x0000000f,0x0000000f,0x00000000,0x00000001,0x0004006e,0x00000007,0x00000011,
0x00000010,0x00050041,0x00000017,0x00000018,0x00000015,0x00000016,0x0004003d,0x00000007,
0x00000019,0x00000018,0x00050082,0x00000007,0x0000001a,0x00000011,0x00000019,0x0003003e,
0x00000009,0x0000001a,0x0004003d,0x00000007,0x0000001c,0x00000009,0x0003003e,0x0000001b,
0x0000001c,0x00050041,0x0000001e,0x0000001f,0x00000015,0x0000001d,0x0004003d,0x00000012,
0x00000020,0x0000001f,0x000500ab,0x00000021,0x00000023,0x00000020,0x00000022,0x000300f7,
0x00000025,0x00000000,0x000400fa,0x00000023,0x00000024,0x00000025,0x000200f8,0x00000024,
0x00050041,0x00000027,0x00000028,0x0000001b,0x00000026,0x0004003d,0x00000006,0x00000029,
0x00000028,0x0004007e,0x00000006,0x0000002a,0x00000029,0x00050041,0x00000027,0x0000002b,
0x0000001b,0x00000026,0x0003003e,0x0000002b,0x0000002a,0x000200f9,0x00000025,0x000200f8,
0x00000025,0x0004003d,0x0000002e,0x00000031,0x00000030,0x00050041,0x00000017,0x00000033,
0x00000015,0x00000032,0x0004003d,0x00000007,0x00000034,0x00000033,0x0004003d,0x00000007,
0x00000035,0x0000001b,0x00050080,0x00000007,0x00000036,0x00000034,0x00000035,0x00050041,
0x00000038,0x00000039,0x00000015,0x00000037,0x0004003d,0x00000006,0x0000003a,0x00000039,
0x0007005f,0x0000000b,0x0000003b,0x00000031,0x00000036,0x00000002,0x0000003a,0x0003003e,
0x0000002d,0x0000003b,0x0004003d,0x0000000b,0x0000003f,0x0000002d,0x0004006e,0x0000003c,
0x00000040,0x0000003f,0x0003003e,0x0000003e,0x00000040,0x00050041,0x0000001e,0x00000042,
0x00000015,0x00000041,0x0004003d,0x00000012,0x00000043,0x00000042,0x000500ab,0x00000021,
0x00000044,0x00000043,0x00000022,0x000300f7,0x00000046,0x00000000,0x000400fa,0x00000044,
0x00000045,0x0000004b,0x000200f8,0x00000045,0x0004003d,0x0000003c,0x00000047,0x0000003e,
0x0007004f,0x00000007,0x00000048,0x00000047,0x00000047,0x00000000,0x00000003,0x0004003d,
0x0000003c,0x00000049,0x0000003e,0x0009004f,0x0000003c,0x0000004a,0x00000049,0x00000048,
0x00000004,0x00000005,0x00000002,0x00000003,0x0003003e,0x0000003e,0x0000004a,0x000200f9,
0x00000046,0x000200f8,0x0000004b,0x00050041,0x0000001e,0x0000004d,0x00000015,0x0000004c,
0x0004003d,0x00000012,0x0000004e,0x0000004d,0x000500ab,0x00000021,0x0000004f,0x0000004e,
0x00000022,0x000300f7,0x00000051,0x00000000,0x000400fa,0x0000004f,0x00000050,0x00000051,
0x000200f8,0x00000050,0x00050041,0x00000027,0x00000053,0x0000003e,0x00000052,0x0004003d,
0x00000006,0x00000054,0x00000053,0x00050041,0x00000027,0x00000055,0x0000003e,0x00000022,
0x0003003e,0x00000055,0x00000054,0x000200f9,0x00000051,0x000200f8,0x00000051,0x000200f9,
0x00000046,0x000200f8,0x00000046,0x0004003d,0x0000003c,0x00000058,0x0000003e,0x0003003e,
0x00000057,0x00000058,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform texture2D src;
layout(location = 0)out ivec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
vec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
ivec4 destValue = ivec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code

Просмотреть файл

@ -0,0 +1,127 @@
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000005[] = {
0x07230203,0x00010000,0x00080007,0x0000005c,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x0000005a,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003d,
0x74736564,0x756c6156,0x00000065,0x00040005,0x0000005a,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x0000005a,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000006,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000006,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x0004002b,0x00000006,0x00000044,0x00000001,0x0004002b,
0x00000006,0x0000004f,0x00000002,0x0004002b,0x00000012,0x00000055,0x00000003,0x00040020,
0x00000059,0x00000003,0x0000002c,0x0004003b,0x00000059,0x0000005a,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000002d,0x0000003d,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x0000003e,0x0000002e,0x00050051,0x00000006,0x0000003f,0x0000003e,0x00000000,0x00050051,
0x00000006,0x00000040,0x0000003e,0x00000001,0x00050051,0x00000006,0x00000041,0x0000003e,
0x00000002,0x00050051,0x00000006,0x00000042,0x0000003e,0x00000003,0x00070050,0x0000002c,
0x00000043,0x0000003f,0x00000040,0x00000041,0x00000042,0x0003003e,0x0000003d,0x00000043,
0x00050041,0x0000001e,0x00000045,0x00000015,0x00000044,0x0004003d,0x00000012,0x00000046,
0x00000045,0x000500ab,0x00000021,0x00000047,0x00000046,0x00000022,0x000300f7,0x00000049,
0x00000000,0x000400fa,0x00000047,0x00000048,0x0000004e,0x000200f8,0x00000048,0x0004003d,
0x0000002c,0x0000004a,0x0000003d,0x0007004f,0x00000007,0x0000004b,0x0000004a,0x0000004a,
0x00000000,0x00000003,0x0004003d,0x0000002c,0x0000004c,0x0000003d,0x0009004f,0x0000002c,
0x0000004d,0x0000004c,0x0000004b,0x00000004,0x00000005,0x00000002,0x00000003,0x0003003e,
0x0000003d,0x0000004d,0x000200f9,0x00000049,0x000200f8,0x0000004e,0x00050041,0x0000001e,
0x00000050,0x00000015,0x0000004f,0x0004003d,0x00000012,0x00000051,0x00000050,0x000500ab,
0x00000021,0x00000052,0x00000051,0x00000022,0x000300f7,0x00000054,0x00000000,0x000400fa,
0x00000052,0x00000053,0x00000054,0x000200f8,0x00000053,0x00050041,0x00000027,0x00000056,
0x0000003d,0x00000055,0x0004003d,0x00000006,0x00000057,0x00000056,0x00050041,0x00000027,
0x00000058,0x0000003d,0x00000022,0x0003003e,0x00000058,0x00000057,0x000200f9,0x00000054,
0x000200f8,0x00000054,0x000200f9,0x00000049,0x000200f8,0x00000049,0x0004003d,0x0000002c,
0x0000005b,0x0000003d,0x0003003e,0x0000005a,0x0000005b,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform itexture2D src;
layout(location = 0)out ivec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
ivec4 destValue = ivec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code

Просмотреть файл

@ -0,0 +1,125 @@
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000006[] = {
0x07230203,0x00010000,0x00080007,0x0000005a,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000058,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003f,
0x74736564,0x756c6156,0x00000065,0x00040005,0x00000058,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x00000058,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000012,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000012,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x00040017,0x0000003d,0x00000006,0x00000004,0x00040020,
0x0000003e,0x00000007,0x0000003d,0x0004002b,0x00000006,0x00000042,0x00000001,0x0004002b,
0x00000006,0x0000004d,0x00000002,0x0004002b,0x00000012,0x00000053,0x00000003,0x00040020,
0x00000057,0x00000003,0x0000003d,0x0004003b,0x00000057,0x00000058,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000003e,0x0000003f,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x00000040,0x0000002e,0x0004007c,0x0000003d,0x00000041,0x00000040,0x0003003e,0x0000003f,
0x00000041,0x00050041,0x0000001e,0x00000043,0x00000015,0x00000042,0x0004003d,0x00000012,
0x00000044,0x00000043,0x000500ab,0x00000021,0x00000045,0x00000044,0x00000022,0x000300f7,
0x00000047,0x00000000,0x000400fa,0x00000045,0x00000046,0x0000004c,0x000200f8,0x00000046,
0x0004003d,0x0000003d,0x00000048,0x0000003f,0x0007004f,0x00000007,0x00000049,0x00000048,
0x00000048,0x00000000,0x00000003,0x0004003d,0x0000003d,0x0000004a,0x0000003f,0x0009004f,
0x0000003d,0x0000004b,0x0000004a,0x00000049,0x00000004,0x00000005,0x00000002,0x00000003,
0x0003003e,0x0000003f,0x0000004b,0x000200f9,0x00000047,0x000200f8,0x0000004c,0x00050041,
0x0000001e,0x0000004e,0x00000015,0x0000004d,0x0004003d,0x00000012,0x0000004f,0x0000004e,
0x000500ab,0x00000021,0x00000050,0x0000004f,0x00000022,0x000300f7,0x00000052,0x00000000,
0x000400fa,0x00000050,0x00000051,0x00000052,0x000200f8,0x00000051,0x00050041,0x00000027,
0x00000054,0x0000003f,0x00000053,0x0004003d,0x00000006,0x00000055,0x00000054,0x00050041,
0x00000027,0x00000056,0x0000003f,0x00000022,0x0003003e,0x00000056,0x00000055,0x000200f9,
0x00000052,0x000200f8,0x00000052,0x000200f9,0x00000047,0x000200f8,0x00000047,0x0004003d,
0x0000003d,0x00000059,0x0000003f,0x0003003e,0x00000058,0x00000059,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform utexture2D src;
layout(location = 0)out ivec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
uvec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
ivec4 destValue = ivec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code

Просмотреть файл

@ -0,0 +1,126 @@
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000008[] = {
0x07230203,0x00010000,0x00080007,0x0000005b,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000059,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002d,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000030,0x00637273,0x00050005,0x0000003e,
0x74736564,0x756c6156,0x00000065,0x00040005,0x00000059,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000030,0x00000022,0x00000000,
0x00040047,0x00000030,0x00000021,0x00000000,0x00040047,0x00000059,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040020,0x0000002c,
0x00000007,0x0000000b,0x00090019,0x0000002e,0x0000000a,0x00000001,0x00000000,0x00000000,
0x00000000,0x00000001,0x00000000,0x00040020,0x0000002f,0x00000000,0x0000002e,0x0004003b,
0x0000002f,0x00000030,0x00000000,0x0004002b,0x00000006,0x00000032,0x00000004,0x0004002b,
0x00000006,0x00000037,0x00000003,0x00040020,0x00000038,0x00000009,0x00000006,0x00040017,
0x0000003c,0x00000012,0x00000004,0x00040020,0x0000003d,0x00000007,0x0000003c,0x0004002b,
0x00000006,0x00000041,0x00000001,0x00040017,0x00000047,0x00000012,0x00000002,0x0004002b,
0x00000006,0x0000004d,0x00000002,0x0004002b,0x00000012,0x00000053,0x00000003,0x00040020,
0x00000054,0x00000007,0x00000012,0x00040020,0x00000058,0x00000003,0x0000003c,0x0004003b,
0x00000058,0x00000059,0x00000003,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,
0x000200f8,0x00000005,0x0004003b,0x00000008,0x00000009,0x00000007,0x0004003b,0x00000008,
0x0000001b,0x00000007,0x0004003b,0x0000002c,0x0000002d,0x00000007,0x0004003b,0x0000003d,
0x0000003e,0x00000007,0x0004003d,0x0000000b,0x0000000f,0x0000000d,0x0007004f,0x0000000e,
0x00000010,0x0000000f,0x0000000f,0x00000000,0x00000001,0x0004006e,0x00000007,0x00000011,
0x00000010,0x00050041,0x00000017,0x00000018,0x00000015,0x00000016,0x0004003d,0x00000007,
0x00000019,0x00000018,0x00050082,0x00000007,0x0000001a,0x00000011,0x00000019,0x0003003e,
0x00000009,0x0000001a,0x0004003d,0x00000007,0x0000001c,0x00000009,0x0003003e,0x0000001b,
0x0000001c,0x00050041,0x0000001e,0x0000001f,0x00000015,0x0000001d,0x0004003d,0x00000012,
0x00000020,0x0000001f,0x000500ab,0x00000021,0x00000023,0x00000020,0x00000022,0x000300f7,
0x00000025,0x00000000,0x000400fa,0x00000023,0x00000024,0x00000025,0x000200f8,0x00000024,
0x00050041,0x00000027,0x00000028,0x0000001b,0x00000026,0x0004003d,0x00000006,0x00000029,
0x00000028,0x0004007e,0x00000006,0x0000002a,0x00000029,0x00050041,0x00000027,0x0000002b,
0x0000001b,0x00000026,0x0003003e,0x0000002b,0x0000002a,0x000200f9,0x00000025,0x000200f8,
0x00000025,0x0004003d,0x0000002e,0x00000031,0x00000030,0x00050041,0x00000017,0x00000033,
0x00000015,0x00000032,0x0004003d,0x00000007,0x00000034,0x00000033,0x0004003d,0x00000007,
0x00000035,0x0000001b,0x00050080,0x00000007,0x00000036,0x00000034,0x00000035,0x00050041,
0x00000038,0x00000039,0x00000015,0x00000037,0x0004003d,0x00000006,0x0000003a,0x00000039,
0x0007005f,0x0000000b,0x0000003b,0x00000031,0x00000036,0x00000002,0x0000003a,0x0003003e,
0x0000002d,0x0000003b,0x0004003d,0x0000000b,0x0000003f,0x0000002d,0x0004006d,0x0000003c,
0x00000040,0x0000003f,0x0003003e,0x0000003e,0x00000040,0x00050041,0x0000001e,0x00000042,
0x00000015,0x00000041,0x0004003d,0x00000012,0x00000043,0x00000042,0x000500ab,0x00000021,
0x00000044,0x00000043,0x00000022,0x000300f7,0x00000046,0x00000000,0x000400fa,0x00000044,
0x00000045,0x0000004c,0x000200f8,0x00000045,0x0004003d,0x0000003c,0x00000048,0x0000003e,
0x0007004f,0x00000047,0x00000049,0x00000048,0x00000048,0x00000000,0x00000003,0x0004003d,
0x0000003c,0x0000004a,0x0000003e,0x0009004f,0x0000003c,0x0000004b,0x0000004a,0x00000049,
0x00000004,0x00000005,0x00000002,0x00000003,0x0003003e,0x0000003e,0x0000004b,0x000200f9,
0x00000046,0x000200f8,0x0000004c,0x00050041,0x0000001e,0x0000004e,0x00000015,0x0000004d,
0x0004003d,0x00000012,0x0000004f,0x0000004e,0x000500ab,0x00000021,0x00000050,0x0000004f,
0x00000022,0x000300f7,0x00000052,0x00000000,0x000400fa,0x00000050,0x00000051,0x00000052,
0x000200f8,0x00000051,0x00050041,0x00000054,0x00000055,0x0000003e,0x00000053,0x0004003d,
0x00000012,0x00000056,0x00000055,0x00050041,0x00000054,0x00000057,0x0000003e,0x00000022,
0x0003003e,0x00000057,0x00000056,0x000200f9,0x00000052,0x000200f8,0x00000052,0x000200f9,
0x00000046,0x000200f8,0x00000046,0x0004003d,0x0000003c,0x0000005a,0x0000003e,0x0003003e,
0x00000059,0x0000005a,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform texture2D src;
layout(location = 0)out uvec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
vec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
uvec4 destValue = uvec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code

Просмотреть файл

@ -0,0 +1,126 @@
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000009[] = {
0x07230203,0x00010000,0x00080007,0x0000005c,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x0000005a,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003f,
0x74736564,0x756c6156,0x00000065,0x00040005,0x0000005a,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x0000005a,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000006,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000006,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x00040017,0x0000003d,0x00000012,0x00000004,0x00040020,
0x0000003e,0x00000007,0x0000003d,0x0004002b,0x00000006,0x00000042,0x00000001,0x00040017,
0x00000048,0x00000012,0x00000002,0x0004002b,0x00000006,0x0000004e,0x00000002,0x0004002b,
0x00000012,0x00000054,0x00000003,0x00040020,0x00000055,0x00000007,0x00000012,0x00040020,
0x00000059,0x00000003,0x0000003d,0x0004003b,0x00000059,0x0000005a,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000003e,0x0000003f,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x00000040,0x0000002e,0x0004007c,0x0000003d,0x00000041,0x00000040,0x0003003e,0x0000003f,
0x00000041,0x00050041,0x0000001e,0x00000043,0x00000015,0x00000042,0x0004003d,0x00000012,
0x00000044,0x00000043,0x000500ab,0x00000021,0x00000045,0x00000044,0x00000022,0x000300f7,
0x00000047,0x00000000,0x000400fa,0x00000045,0x00000046,0x0000004d,0x000200f8,0x00000046,
0x0004003d,0x0000003d,0x00000049,0x0000003f,0x0007004f,0x00000048,0x0000004a,0x00000049,
0x00000049,0x00000000,0x00000003,0x0004003d,0x0000003d,0x0000004b,0x0000003f,0x0009004f,
0x0000003d,0x0000004c,0x0000004b,0x0000004a,0x00000004,0x00000005,0x00000002,0x00000003,
0x0003003e,0x0000003f,0x0000004c,0x000200f9,0x00000047,0x000200f8,0x0000004d,0x00050041,
0x0000001e,0x0000004f,0x00000015,0x0000004e,0x0004003d,0x00000012,0x00000050,0x0000004f,
0x000500ab,0x00000021,0x00000051,0x00000050,0x00000022,0x000300f7,0x00000053,0x00000000,
0x000400fa,0x00000051,0x00000052,0x00000053,0x000200f8,0x00000052,0x00050041,0x00000055,
0x00000056,0x0000003f,0x00000054,0x0004003d,0x00000012,0x00000057,0x00000056,0x00050041,
0x00000055,0x00000058,0x0000003f,0x00000022,0x0003003e,0x00000058,0x00000057,0x000200f9,
0x00000053,0x000200f8,0x00000053,0x000200f9,0x00000047,0x000200f8,0x00000047,0x0004003d,
0x0000003d,0x0000005b,0x0000003f,0x0003003e,0x0000005a,0x0000005b,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform itexture2D src;
layout(location = 0)out uvec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
uvec4 destValue = uvec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code

Просмотреть файл

@ -0,0 +1,128 @@
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_0000000A[] = {
0x07230203,0x00010000,0x00080007,0x0000005e,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x0000005c,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003d,
0x74736564,0x756c6156,0x00000065,0x00040005,0x0000005c,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x0000005c,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000012,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000012,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x0004002b,0x00000006,0x00000044,0x00000001,0x00040017,
0x0000004a,0x00000012,0x00000002,0x0004002b,0x00000006,0x00000050,0x00000002,0x0004002b,
0x00000012,0x00000056,0x00000003,0x00040020,0x00000057,0x00000007,0x00000012,0x00040020,
0x0000005b,0x00000003,0x0000002c,0x0004003b,0x0000005b,0x0000005c,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000002d,0x0000003d,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x0000003e,0x0000002e,0x00050051,0x00000012,0x0000003f,0x0000003e,0x00000000,0x00050051,
0x00000012,0x00000040,0x0000003e,0x00000001,0x00050051,0x00000012,0x00000041,0x0000003e,
0x00000002,0x00050051,0x00000012,0x00000042,0x0000003e,0x00000003,0x00070050,0x0000002c,
0x00000043,0x0000003f,0x00000040,0x00000041,0x00000042,0x0003003e,0x0000003d,0x00000043,
0x00050041,0x0000001e,0x00000045,0x00000015,0x00000044,0x0004003d,0x00000012,0x00000046,
0x00000045,0x000500ab,0x00000021,0x00000047,0x00000046,0x00000022,0x000300f7,0x00000049,
0x00000000,0x000400fa,0x00000047,0x00000048,0x0000004f,0x000200f8,0x00000048,0x0004003d,
0x0000002c,0x0000004b,0x0000003d,0x0007004f,0x0000004a,0x0000004c,0x0000004b,0x0000004b,
0x00000000,0x00000003,0x0004003d,0x0000002c,0x0000004d,0x0000003d,0x0009004f,0x0000002c,
0x0000004e,0x0000004d,0x0000004c,0x00000004,0x00000005,0x00000002,0x00000003,0x0003003e,
0x0000003d,0x0000004e,0x000200f9,0x00000049,0x000200f8,0x0000004f,0x00050041,0x0000001e,
0x00000051,0x00000015,0x00000050,0x0004003d,0x00000012,0x00000052,0x00000051,0x000500ab,
0x00000021,0x00000053,0x00000052,0x00000022,0x000300f7,0x00000055,0x00000000,0x000400fa,
0x00000053,0x00000054,0x00000055,0x000200f8,0x00000054,0x00050041,0x00000057,0x00000058,
0x0000003d,0x00000056,0x0004003d,0x00000012,0x00000059,0x00000058,0x00050041,0x00000057,
0x0000005a,0x0000003d,0x00000022,0x0003003e,0x0000005a,0x00000059,0x000200f9,0x00000055,
0x000200f8,0x00000055,0x000200f9,0x00000049,0x000200f8,0x00000049,0x0004003d,0x0000002c,
0x0000005d,0x0000003d,0x0003003e,0x0000005c,0x0000005d,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform utexture2D src;
layout(location = 0)out uvec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
uvec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
uvec4 destValue = uvec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code

Просмотреть файл

@ -0,0 +1,77 @@
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ImageCopy.frag: Copy parts of an image to another.
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
#if SrcIsFloat
#define SRC_RESOURCE(type) type
#define SrcType vec4
#elif SrcIsInt
#define SRC_RESOURCE(type) i ## type
#define SrcType ivec4
#elif SrcIsUint
#define SRC_RESOURCE(type) u ## type
#define SrcType uvec4
#else
#error "Not all source formats are accounted for"
#endif
#if DestIsFloat
#define DestType vec4
#elif DestIsInt
#define DestType ivec4
#elif DestIsUint
#define DestType uvec4
#else
#error "Not all destinatoin formats are accounted for"
#endif
layout(set = 0, binding = 0) uniform SRC_RESOURCE(texture2D) src;
layout(location = 0) out DestType dest;
layout(push_constant) uniform PushConstants {
// Whether y needs to be flipped
bool flipY;
// Whether destination is emulated luminance/alpha.
bool destHasLuminance;
bool destIsAlpha;
// Translation from source to destination coordinates.
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord.xy) - params.destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
// If flipping Y, srcOffset would contain the opposite y coordinate, so we can
// simply reverse the direction in which y grows.
if (params.flipY)
srcSubImageCoords.y = -srcSubImageCoords.y;
SrcType srcValue = texelFetch(src, params.srcOffset + srcSubImageCoords, params.srcMip);
// Convert value to destination type.
DestType destValue = DestType(srcValue);
// If dest is luminance/alpha, it's implemented with R or RG. Do the appropriate swizzle.
if (params.destHasLuminance)
{
destValue.rg = destValue.ra;
}
else if (params.destIsAlpha)
{
destValue.r = destValue.a;
}
dest = destValue;
}

Просмотреть файл

@ -0,0 +1,20 @@
{
"Description": [
"Copyright 2018 The ANGLE Project Authors. All rights reserved.",
"Use of this source code is governed by a BSD-style license that can be",
"found in the LICENSE file.",
"",
"ImageCopy.frag.json: Build parameters for ImageCopy.frag."
],
"SrcFormat": [
"SrcIsFloat",
"SrcIsInt",
"SrcIsUint"
],
"DestFormat": [
"DestIsFloat",
"DestIsInt",
"DestIsUint"
]
}

Просмотреть файл

@ -8,6 +8,7 @@
#include "libANGLE/renderer/vulkan/vk_format_utils.h"
#include "libANGLE/Texture.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/renderer/load_functions_table.h"
#include "libANGLE/renderer/vulkan/RendererVk.h"
@ -235,4 +236,44 @@ size_t GetVertexInputAlignment(const vk::Format &format)
size_t pixelBytes = bufferFormat.pixelBytes;
return format.vkBufferFormatIsPacked ? pixelBytes : (pixelBytes / bufferFormat.channelCount());
}
void MapSwizzleState(const vk::Format &format,
const gl::SwizzleState &swizzleState,
gl::SwizzleState *swizzleStateOut)
{
const angle::Format &angleFormat = format.angleFormat();
switch (format.internalFormat)
{
case GL_LUMINANCE8_OES:
swizzleStateOut->swizzleRed = swizzleState.swizzleRed;
swizzleStateOut->swizzleGreen = swizzleState.swizzleRed;
swizzleStateOut->swizzleBlue = swizzleState.swizzleRed;
swizzleStateOut->swizzleAlpha = GL_ONE;
break;
case GL_LUMINANCE8_ALPHA8_OES:
swizzleStateOut->swizzleRed = swizzleState.swizzleRed;
swizzleStateOut->swizzleGreen = swizzleState.swizzleRed;
swizzleStateOut->swizzleBlue = swizzleState.swizzleRed;
swizzleStateOut->swizzleAlpha = swizzleState.swizzleGreen;
break;
case GL_ALPHA8_OES:
swizzleStateOut->swizzleRed = GL_ZERO;
swizzleStateOut->swizzleGreen = GL_ZERO;
swizzleStateOut->swizzleBlue = GL_ZERO;
swizzleStateOut->swizzleAlpha = swizzleState.swizzleRed;
break;
default:
// Set any missing channel to default in case the emulated format has that channel.
swizzleStateOut->swizzleRed =
angleFormat.redBits > 0 ? swizzleState.swizzleRed : GL_ZERO;
swizzleStateOut->swizzleGreen =
angleFormat.greenBits > 0 ? swizzleState.swizzleGreen : GL_ZERO;
swizzleStateOut->swizzleBlue =
angleFormat.blueBits > 0 ? swizzleState.swizzleBlue : GL_ZERO;
swizzleStateOut->swizzleAlpha =
angleFormat.alphaBits > 0 ? swizzleState.swizzleAlpha : GL_ONE;
break;
}
}
} // namespace rx

Просмотреть файл

@ -21,6 +21,7 @@
namespace gl
{
struct SwizzleState;
class TextureCapsMap;
} // namespace gl
@ -115,6 +116,10 @@ const VkFormatProperties &GetMandatoryFormatSupport(VkFormat vkFormat);
// Returns the alignment for a buffer to be used with the vertex input stage in Vulkan. This
// calculation is listed in the Vulkan spec at the end of the section 'Vertex Input Description'.
size_t GetVertexInputAlignment(const vk::Format &format);
void MapSwizzleState(const vk::Format &format,
const gl::SwizzleState &swizzleState,
gl::SwizzleState *swizzleStateOut);
} // namespace rx
#endif // LIBANGLE_RENDERER_VULKAN_VK_FORMAT_UTILS_H_

Просмотреть файл

@ -1101,7 +1101,8 @@ ImageHelper::ImageHelper()
mFormat(nullptr),
mSamples(0),
mCurrentLayout(VK_IMAGE_LAYOUT_UNDEFINED),
mLayerCount(0)
mLayerCount(0),
mLevelCount(0)
{}
ImageHelper::ImageHelper(ImageHelper &&other)
@ -1112,10 +1113,12 @@ ImageHelper::ImageHelper(ImageHelper &&other)
mFormat(other.mFormat),
mSamples(other.mSamples),
mCurrentLayout(other.mCurrentLayout),
mLayerCount(other.mLayerCount)
mLayerCount(other.mLayerCount),
mLevelCount(other.mLevelCount)
{
other.mCurrentLayout = VK_IMAGE_LAYOUT_UNDEFINED;
other.mLayerCount = 0;
other.mLevelCount = 0;
}
ImageHelper::~ImageHelper()
@ -1137,6 +1140,7 @@ angle::Result ImageHelper::init(Context *context,
mFormat = &format;
mSamples = samples;
mLayerCount = GetImageLayerCount(textureType);
mLevelCount = mipLevels;
VkImageCreateInfo imageInfo = {};
imageInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
@ -1189,7 +1193,7 @@ angle::Result ImageHelper::initImageView(Context *context,
ImageView *imageViewOut,
uint32_t levelCount)
{
return initLayerImageView(context, textureType, aspectMask, swizzleMap, imageViewOut,
return initLayerImageView(context, textureType, aspectMask, swizzleMap, imageViewOut, 0,
levelCount, 0, mLayerCount);
}
@ -1198,6 +1202,7 @@ angle::Result ImageHelper::initLayerImageView(Context *context,
VkImageAspectFlags aspectMask,
const gl::SwizzleState &swizzleMap,
ImageView *imageViewOut,
uint32_t baseMipLevel,
uint32_t levelCount,
uint32_t baseArrayLayer,
uint32_t layerCount)
@ -1223,7 +1228,7 @@ angle::Result ImageHelper::initLayerImageView(Context *context,
viewInfo.components.a = VK_COMPONENT_SWIZZLE_IDENTITY;
}
viewInfo.subresourceRange.aspectMask = aspectMask;
viewInfo.subresourceRange.baseMipLevel = 0;
viewInfo.subresourceRange.baseMipLevel = baseMipLevel;
viewInfo.subresourceRange.levelCount = levelCount;
viewInfo.subresourceRange.baseArrayLayer = baseArrayLayer;
viewInfo.subresourceRange.layerCount = layerCount;
@ -1238,6 +1243,7 @@ void ImageHelper::destroy(VkDevice device)
mDeviceMemory.destroy(device);
mCurrentLayout = VK_IMAGE_LAYOUT_UNDEFINED;
mLayerCount = 0;
mLevelCount = 0;
}
void ImageHelper::init2DWeakReference(VkImage handle,
@ -1251,6 +1257,7 @@ void ImageHelper::init2DWeakReference(VkImage handle,
mFormat = &format;
mSamples = samples;
mLayerCount = 1;
mLevelCount = 1;
mImage.setHandle(handle);
}
@ -1267,6 +1274,7 @@ angle::Result ImageHelper::init2DStaging(Context *context,
mFormat = &format;
mSamples = 1;
mLayerCount = 1;
mLevelCount = 1;
// Use Preinitialized for writable staging images - in these cases we want to map the memory
// before we do a copy. For readback images, use an undefined layout.
@ -1360,7 +1368,7 @@ void ImageHelper::changeLayoutWithStages(VkImageAspectFlags aspectMask,
// TODO(jmadill): Is this needed for mipped/layer images?
imageMemoryBarrier.subresourceRange.aspectMask = aspectMask;
imageMemoryBarrier.subresourceRange.baseMipLevel = 0;
imageMemoryBarrier.subresourceRange.levelCount = VK_REMAINING_MIP_LEVELS;
imageMemoryBarrier.subresourceRange.levelCount = mLevelCount;
imageMemoryBarrier.subresourceRange.baseArrayLayer = 0;
imageMemoryBarrier.subresourceRange.layerCount = mLayerCount;

Просмотреть файл

@ -474,6 +474,7 @@ class ImageHelper final : public RecordableGraphResource
VkImageAspectFlags aspectMask,
const gl::SwizzleState &swizzleMap,
ImageView *imageViewOut,
uint32_t baseMipLevel,
uint32_t levelCount,
uint32_t baseArrayLayer,
uint32_t layerCount);
@ -507,6 +508,8 @@ class ImageHelper final : public RecordableGraphResource
const DeviceMemory &getDeviceMemory() const;
const gl::Extents &getExtents() const;
uint32_t getLayerCount() const { return mLayerCount; }
uint32_t getLevelCount() const { return mLevelCount; }
const Format &getFormat() const;
GLint getSamples() const;
@ -561,6 +564,7 @@ class ImageHelper final : public RecordableGraphResource
// Cached properties.
uint32_t mLayerCount;
uint32_t mLevelCount;
};
class FramebufferHelper : public RecordableGraphResource

Просмотреть файл

@ -1,7 +1,7 @@
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_vk_internal_shaders.py using data from shaders/src/*
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@ -46,6 +46,15 @@ namespace
#include "libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.0000000F.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/FullScreenQuad.vert.00000000.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageClear.frag.00000000.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000000.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000001.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000002.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000004.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000005.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000006.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000008.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000009.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.0000000A.inc"
// This is SPIR-V binary blob and the size.
struct ShaderBlob
@ -92,6 +101,19 @@ constexpr ShaderBlob kFullScreenQuad_vert_shaders[] = {
constexpr ShaderBlob kImageClear_frag_shaders[] = {
{kImageClear_frag_00000000, sizeof(kImageClear_frag_00000000)},
};
constexpr ShaderBlob kImageCopy_frag_shaders[] = {
{kImageCopy_frag_00000000, sizeof(kImageCopy_frag_00000000)},
{kImageCopy_frag_00000001, sizeof(kImageCopy_frag_00000001)},
{kImageCopy_frag_00000002, sizeof(kImageCopy_frag_00000002)},
{nullptr, 0}, // 0x00000003
{kImageCopy_frag_00000004, sizeof(kImageCopy_frag_00000004)},
{kImageCopy_frag_00000005, sizeof(kImageCopy_frag_00000005)},
{kImageCopy_frag_00000006, sizeof(kImageCopy_frag_00000006)},
{nullptr, 0}, // 0x00000007
{kImageCopy_frag_00000008, sizeof(kImageCopy_frag_00000008)},
{kImageCopy_frag_00000009, sizeof(kImageCopy_frag_00000009)},
{kImageCopy_frag_0000000A, sizeof(kImageCopy_frag_0000000A)},
};
angle::Result GetShader(Context *context,
RefCounted<ShaderAndSerial> *shaders,
@ -139,6 +161,10 @@ void ShaderLibrary::destroy(VkDevice device)
{
shader.get().destroy(device);
}
for (RefCounted<ShaderAndSerial> &shader : mImageCopy_frag_shaders)
{
shader.get().destroy(device);
}
}
angle::Result ShaderLibrary::getBufferUtils_comp(Context *context,
@ -173,5 +199,13 @@ angle::Result ShaderLibrary::getImageClear_frag(Context *context,
ArraySize(kImageClear_frag_shaders), shaderFlags, shaderOut);
}
angle::Result ShaderLibrary::getImageCopy_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut)
{
return GetShader(context, mImageCopy_frag_shaders, kImageCopy_frag_shaders,
ArraySize(kImageCopy_frag_shaders), shaderFlags, shaderOut);
}
} // namespace vk
} // namespace rx

Просмотреть файл

@ -1,7 +1,7 @@
# GENERATED FILE - DO NOT EDIT.
# Generated by gen_vk_internal_shaders.py using data from shaders/src/*
#
# Copyright 2018 The ANGLE Project Authors. All rights reserved.
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
@ -39,4 +39,13 @@ angle_vulkan_internal_shaders = [
"shaders/gen/ConvertVertex.comp.0000000F.inc",
"shaders/gen/FullScreenQuad.vert.00000000.inc",
"shaders/gen/ImageClear.frag.00000000.inc",
"shaders/gen/ImageCopy.frag.00000000.inc",
"shaders/gen/ImageCopy.frag.00000001.inc",
"shaders/gen/ImageCopy.frag.00000002.inc",
"shaders/gen/ImageCopy.frag.00000004.inc",
"shaders/gen/ImageCopy.frag.00000005.inc",
"shaders/gen/ImageCopy.frag.00000006.inc",
"shaders/gen/ImageCopy.frag.00000008.inc",
"shaders/gen/ImageCopy.frag.00000009.inc",
"shaders/gen/ImageCopy.frag.0000000A.inc",
]

Просмотреть файл

@ -1,7 +1,7 @@
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_vk_internal_shaders.py using data from shaders/src/*
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@ -68,6 +68,24 @@ namespace FullScreenQuad_vert
namespace ImageClear_frag
{} // namespace ImageClear_frag
namespace ImageCopy_frag
{
enum SrcFormat
{
kSrcIsFloat = 0x00000000,
kSrcIsInt = 0x00000001,
kSrcIsUint = 0x00000002,
kSrcFormatMask = 0x00000003,
};
enum DestFormat
{
kDestIsFloat = 0x00000000,
kDestIsInt = 0x00000004,
kDestIsUint = 0x00000008,
kDestFormatMask = 0x0000000C,
};
} // namespace ImageCopy_frag
} // namespace InternalShader
class ShaderLibrary final : angle::NonCopyable
@ -90,6 +108,9 @@ class ShaderLibrary final : angle::NonCopyable
angle::Result getImageClear_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut);
angle::Result getImageCopy_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut);
private:
RefCounted<ShaderAndSerial>
@ -101,6 +122,9 @@ class ShaderLibrary final : angle::NonCopyable
InternalShader::ConvertVertex_comp::kConversionMask];
RefCounted<ShaderAndSerial> mFullScreenQuad_vert_shaders[1];
RefCounted<ShaderAndSerial> mImageClear_frag_shaders[1];
RefCounted<ShaderAndSerial>
mImageCopy_frag_shaders[InternalShader::ImageCopy_frag::kSrcFormatMask |
InternalShader::ImageCopy_frag::kDestFormatMask];
};
} // namespace vk
} // namespace rx