aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharlie Lao <cclao@google.com>2021-09-01 18:09:14 -0700
committerAngle LUCI CQ <angle-scoped@luci-project-accounts.iam.gserviceaccount.com>2021-09-08 22:57:31 +0000
commit856a0e03402b3108e5ef773ad547cda79807be0a (patch)
tree85c434c25b169b4a8c6f172f4303d2808628493a
parenta33d902bc3e28f91f1b4f06294ab7fbf0cbfaee6 (diff)
downloadplatform_external_angle-856a0e03402b3108e5ef773ad547cda79807be0a.tar.gz
platform_external_angle-856a0e03402b3108e5ef773ad547cda79807be0a.tar.bz2
platform_external_angle-856a0e03402b3108e5ef773ad547cda79807be0a.zip
Vulkan: Make vk::Format from struct to class
With all the recent changes that there are two actualImageFormatIDs, retrieve the actual format requires pass in a renderable boolean. And the vertex format also has a similar requirement to the real format may differ depends on if it is compressed or not. This struct no longer safe to expose the underline data members directly. This CL turns it into a class and expose the actual format via method that requires renderable or compressed boolean. Bug: b/196456356 Change-Id: Ie2f8308cc408bde1b0787e0b392e143187cc4425 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3139236 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
-rw-r--r--scripts/code_generation_hashes/Vulkan_format.json4
-rw-r--r--src/libANGLE/renderer/vulkan/MemoryObjectVk.cpp8
-rw-r--r--src/libANGLE/renderer/vulkan/RenderbufferVk.cpp6
-rw-r--r--src/libANGLE/renderer/vulkan/RendererVk.h2
-rw-r--r--src/libANGLE/renderer/vulkan/SurfaceVk.cpp2
-rw-r--r--src/libANGLE/renderer/vulkan/TextureVk.cpp47
-rw-r--r--src/libANGLE/renderer/vulkan/VertexArrayVk.cpp43
-rw-r--r--src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.cpp2
-rw-r--r--src/libANGLE/renderer/vulkan/gen_vk_format_table.py14
-rw-r--r--src/libANGLE/renderer/vulkan/vk_cache_utils.cpp35
-rw-r--r--src/libANGLE/renderer/vulkan/vk_caps_utils.cpp2
-rw-r--r--src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp2188
-rw-r--r--src/libANGLE/renderer/vulkan/vk_format_utils.cpp96
-rw-r--r--src/libANGLE/renderer/vulkan/vk_format_utils.h104
-rw-r--r--src/libANGLE/renderer/vulkan/vk_helpers.cpp10
-rw-r--r--src/libANGLE/renderer/vulkan/vk_utils.h2
16 files changed, 1289 insertions, 1276 deletions
diff --git a/scripts/code_generation_hashes/Vulkan_format.json b/scripts/code_generation_hashes/Vulkan_format.json
index 8c4f23aba..212f2b5c9 100644
--- a/scripts/code_generation_hashes/Vulkan_format.json
+++ b/scripts/code_generation_hashes/Vulkan_format.json
@@ -4,9 +4,9 @@
"src/libANGLE/renderer/angle_format_map.json":
"6606c1d7df94e6150ab51cfe96c6dcdc",
"src/libANGLE/renderer/vulkan/gen_vk_format_table.py":
- "ffeebc0e8ec8db860e472c7cf04cd880",
+ "d8e23d6ca2380a3471d85caffd765830",
"src/libANGLE/renderer/vulkan/vk_format_map.json":
"b5e35a7c708d764ae66ac39bf2beb054",
"src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp":
- "a116ed4afe6cbbf3f714f60ae255f584"
+ "d0479b2e58d2eb488247c7a0eab6e8c5"
} \ No newline at end of file
diff --git a/src/libANGLE/renderer/vulkan/MemoryObjectVk.cpp b/src/libANGLE/renderer/vulkan/MemoryObjectVk.cpp
index 414309e31..001ebcd78 100644
--- a/src/libANGLE/renderer/vulkan/MemoryObjectVk.cpp
+++ b/src/libANGLE/renderer/vulkan/MemoryObjectVk.cpp
@@ -213,10 +213,10 @@ angle::Result MemoryObjectVk::createImage(ContextVk *contextVk,
// |createFlags| are identical to their corresponding Vulkan value.
bool hasProtectedContent = mProtectedMemory;
ANGLE_TRY(image->initExternal(
- contextVk, type, vkExtents, vkFormat.intendedFormatID, actualFormatID, 1, imageUsageFlags,
- createFlags, vk::ImageLayout::Undefined, &externalMemoryImageCreateInfo, gl::LevelIndex(0),
- static_cast<uint32_t>(levels), layerCount, contextVk->isRobustResourceInitEnabled(),
- nullptr, hasProtectedContent));
+ contextVk, type, vkExtents, vkFormat.getIntendedFormatID(), actualFormatID, 1,
+ imageUsageFlags, createFlags, vk::ImageLayout::Undefined, &externalMemoryImageCreateInfo,
+ gl::LevelIndex(0), static_cast<uint32_t>(levels), layerCount,
+ contextVk->isRobustResourceInitEnabled(), nullptr, hasProtectedContent));
VkMemoryRequirements externalMemoryRequirements;
image->getImage().getMemoryRequirements(renderer->getDevice(), &externalMemoryRequirements);
diff --git a/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp b/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp
index ad4962728..4650413ce 100644
--- a/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp
@@ -105,9 +105,9 @@ angle::Result RenderbufferVk::setStorageImpl(const gl::Context *context,
VkExtent3D extents = {static_cast<uint32_t>(width), static_cast<uint32_t>(height), 1u};
ANGLE_TRY(mImage->initExternal(contextVk, gl::TextureType::_2D, extents,
- format.intendedFormatID, textureFormatID, imageSamples, usage,
- vk::kVkImageCreateFlagsNone, vk::ImageLayout::Undefined, nullptr,
- gl::LevelIndex(0), 1, 1, robustInit, nullptr, false));
+ format.getIntendedFormatID(), textureFormatID, imageSamples,
+ usage, vk::kVkImageCreateFlagsNone, vk::ImageLayout::Undefined,
+ nullptr, gl::LevelIndex(0), 1, 1, robustInit, nullptr, false));
VkMemoryPropertyFlags flags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
ANGLE_TRY(mImage->initMemory(contextVk, false, renderer->getMemoryProperties(), flags));
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.h b/src/libANGLE/renderer/vulkan/RendererVk.h
index a56cdc7cf..82db17cdd 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.h
+++ b/src/libANGLE/renderer/vulkan/RendererVk.h
@@ -53,7 +53,7 @@ class FramebufferVk;
namespace vk
{
-struct Format;
+class Format;
static constexpr size_t kMaxExtensionNames = 400;
using ExtensionNameList = angle::FixedVector<const char *, kMaxExtensionNames>;
diff --git a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
index 598706b0a..eb1a2260f 100644
--- a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
+++ b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
@@ -135,7 +135,7 @@ angle::Result InitImageHelper(DisplayVk *displayVk,
VkImageCreateFlags imageCreateFlags =
hasProtectedContent ? VK_IMAGE_CREATE_PROTECTED_BIT : vk::kVkImageCreateFlagsNone;
ANGLE_TRY(imageHelper->initExternal(
- displayVk, gl::TextureType::_2D, extents, vkFormat.intendedFormatID,
+ displayVk, gl::TextureType::_2D, extents, vkFormat.getIntendedFormatID(),
vkFormat.getActualRenderableImageFormatID(), samples, usage, imageCreateFlags,
vk::ImageLayout::Undefined, nullptr, gl::LevelIndex(0), 1, 1, isRobustResourceInitEnabled,
nullptr, hasProtectedContent));
diff --git a/src/libANGLE/renderer/vulkan/TextureVk.cpp b/src/libANGLE/renderer/vulkan/TextureVk.cpp
index 6b6196c58..384946200 100644
--- a/src/libANGLE/renderer/vulkan/TextureVk.cpp
+++ b/src/libANGLE/renderer/vulkan/TextureVk.cpp
@@ -415,13 +415,13 @@ bool TextureVk::isFastUnpackPossible(const vk::Format &vkFormat, size_t offset)
// 2. Can't perform a fast copy for emulated formats, except from non-emulated depth or stencil
// to emulated depth/stencil.
// 3. vkCmdCopyBufferToImage requires byte offset to be a multiple of 4
- const angle::Format &bufferFormat = vkFormat.actualBufferFormat(false);
+ const angle::Format &bufferFormat = vkFormat.getActualBufferFormat(false);
const bool isCombinedDepthStencil = bufferFormat.depthBits > 0 && bufferFormat.stencilBits > 0;
const bool isDepthXorStencil = (bufferFormat.depthBits > 0 && bufferFormat.stencilBits == 0) ||
(bufferFormat.depthBits == 0 && bufferFormat.stencilBits > 0);
- const bool isCompatibleDepth = vkFormat.intendedFormat().depthBits == bufferFormat.depthBits;
+ const bool isCompatibleDepth = vkFormat.getIntendedFormat().depthBits == bufferFormat.depthBits;
return mImage->valid() && !isCombinedDepthStencil &&
- (vkFormat.intendedFormatID ==
+ (vkFormat.getIntendedFormatID() ==
vkFormat.getActualImageFormatID(getRequiredImageAccess()) ||
(isDepthXorStencil && isCompatibleDepth)) &&
(offset & (kBufferOffsetMultiple - 1)) == 0;
@@ -497,7 +497,8 @@ angle::Result TextureVk::setSubImageImpl(const gl::Context *context,
// Note: cannot directly copy from a depth/stencil PBO. GL requires depth and stencil data
// to be packed, while Vulkan requires them to be separate.
- const VkImageAspectFlags aspectFlags = vk::GetFormatAspectFlags(vkFormat.intendedFormat());
+ const VkImageAspectFlags aspectFlags =
+ vk::GetFormatAspectFlags(vkFormat.getIntendedFormat());
if (!shouldUpdateBeStaged(gl::LevelIndex(index.getLevelIndex()),
vkFormat.getActualImageFormatID(getRequiredImageAccess())) &&
@@ -749,7 +750,7 @@ angle::Result TextureVk::copySubImageImpl(const gl::Context *context,
angle::FormatID srcActualFormatID = colorReadRT->getImageActualFormatID();
VkImageTiling srcTilingMode = colorReadRT->getImageForCopy().getTilingMode();
const vk::Format &destFormat = renderer->getFormat(internalFormat.sizedInternalFormat);
- angle::FormatID destIntendedFormatID = destFormat.intendedFormatID;
+ angle::FormatID destIntendedFormatID = destFormat.getIntendedFormatID();
angle::FormatID destActualFormatID =
destFormat.getActualImageFormatID(getRequiredImageAccess());
VkImageTiling destTilingMode = getTilingMode();
@@ -839,7 +840,7 @@ angle::Result TextureVk::copySubTextureImpl(ContextVk *contextVk,
// If it's possible to perform the copy with a transfer, that's the best option.
if (!unpackFlipY && !unpackPremultiplyAlpha && !unpackUnmultiplyAlpha &&
CanCopyWithTransferForCopyTexture(renderer, source->getImage(), srcTilingMode,
- destVkFormat.intendedFormatID, destFormatID,
+ destVkFormat.getIntendedFormatID(), destFormatID,
destTilingMode))
{
return copySubImageImplWithTransfer(contextVk, offsetImageIndex, destOffset, destVkFormat,
@@ -922,9 +923,9 @@ angle::Result TextureVk::copySubTextureImpl(ContextVk *contextVk,
{
pixelReadFunction = sourceIntendedFormat.pixelReadFunction;
}
- if (destVkFormat.intendedFormat().isLUMA())
+ if (destVkFormat.getIntendedFormat().isLUMA())
{
- pixelWriteFunction = destVkFormat.intendedFormat().pixelWriteFunction;
+ pixelWriteFunction = destVkFormat.getIntendedFormat().pixelWriteFunction;
}
CopyImageCHROMIUM(sourceData, sourceDataRowPitch, sourceTextureFormat.pixelBytes,
@@ -1035,7 +1036,7 @@ angle::Result TextureVk::copySubImageImplWithTransfer(ContextVk *contextVk,
ANGLE_TRY(stagingImage->get().init2DStaging(
contextVk, mState.hasProtectedContent(), renderer->getMemoryProperties(),
- gl::Extents(sourceBox.width, sourceBox.height, 1), destFormat.intendedFormatID,
+ gl::Extents(sourceBox.width, sourceBox.height, 1), destFormat.getIntendedFormatID(),
destFormat.getActualImageFormatID(getRequiredImageAccess()), kTransferStagingImageFlags,
layerCount));
@@ -1162,7 +1163,8 @@ angle::Result TextureVk::copySubImageImplWithDraw(ContextVk *contextVk,
gl::GetSizedInternalFormatInfo(srcImage->getIntendedFormat().glInternalFormat)
.colorEncoding;
params.destColorEncoding =
- gl::GetSizedInternalFormatInfo(destFormat.intendedGLFormat).colorEncoding;
+ gl::GetSizedInternalFormatInfo(destFormat.getIntendedFormat().glInternalFormat)
+ .colorEncoding;
// If destination is valid, copy the source directly into it.
if (mImage->valid() &&
@@ -1194,7 +1196,7 @@ angle::Result TextureVk::copySubImageImplWithDraw(ContextVk *contextVk,
ANGLE_TRY(stagingImage->get().init2DStaging(
contextVk, mState.hasProtectedContent(), renderer->getMemoryProperties(),
- gl::Extents(sourceBox.width, sourceBox.height, 1), destFormat.intendedFormatID,
+ gl::Extents(sourceBox.width, sourceBox.height, 1), destFormat.getIntendedFormatID(),
destFormat.getActualImageFormatID(getRequiredImageAccess()), kDrawStagingImageFlags,
layerCount));
@@ -1281,7 +1283,7 @@ angle::Result TextureVk::setStorageMultisample(const gl::Context *context,
ASSERT(mState.getImmutableFormat());
ASSERT(!mRedefinedLevels.any());
- ANGLE_TRY(initImage(contextVk, format.intendedFormatID,
+ ANGLE_TRY(initImage(contextVk, format.getIntendedFormatID(),
format.getActualImageFormatID(getRequiredImageAccess()),
ImageMipLevels::FullMipChain));
@@ -1623,8 +1625,8 @@ angle::Result TextureVk::redefineLevel(const gl::Context *context,
bool isInAllocatedImage = IsTextureLevelInAllocatedImage(*mImage, levelIndexGL);
bool isCompatibleRedefinition =
isInAllocatedImage && IsTextureLevelDefinitionCompatibleWithImage(
- *mImage, levelIndexGL, size, format.intendedFormatID,
- format.actualImageFormatID);
+ *mImage, levelIndexGL, size, format.getIntendedFormatID(),
+ format.getActualImageFormatID(getRequiredImageAccess()));
// Mark the level as incompatibly redefined if that's the case. Note that if the level
// was previously incompatibly defined, then later redefined to be compatible, the
@@ -2164,10 +2166,10 @@ angle::Result TextureVk::reinitImageAsRenderable(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).
- if (format.intendedFormat().isLUMA())
+ if (format.getIntendedFormat().isLUMA())
{
- pixelReadFunction = format.intendedFormat().pixelReadFunction;
- pixelWriteFunction = format.intendedFormat().pixelWriteFunction;
+ pixelReadFunction = format.getIntendedFormat().pixelReadFunction;
+ pixelWriteFunction = format.getIntendedFormat().pixelWriteFunction;
}
const gl::InternalFormat &destFormatInfo = *mState.getImageDesc(index).format.info;
@@ -2227,8 +2229,7 @@ angle::Result TextureVk::respecifyImageStorageAndLevels(ContextVk *contextVk,
// Create the image helper
ANGLE_TRY(ensureImageAllocated(contextVk, format));
-
- ANGLE_TRY(initImage(contextVk, format.intendedFormatID,
+ ANGLE_TRY(initImage(contextVk, format.getIntendedFormatID(),
format.getActualImageFormatID(getRequiredImageAccess()),
mState.getImmutableFormat() ? ImageMipLevels::FullMipChain
: ImageMipLevels::EnabledLevels));
@@ -2315,7 +2316,7 @@ angle::Result TextureVk::getAttachmentRenderTarget(const gl::Context *context,
// Immutable texture must already have a valid image
ASSERT(!mState.getImmutableFormat());
const vk::Format &format = getBaseLevelFormat(contextVk->getRenderer());
- ANGLE_TRY(initImage(contextVk, format.intendedFormatID,
+ ANGLE_TRY(initImage(contextVk, format.getIntendedFormatID(),
format.getActualImageFormatID(getRequiredImageAccess()),
ImageMipLevels::EnabledLevels));
}
@@ -2388,7 +2389,7 @@ angle::Result TextureVk::ensureImageInitialized(ContextVk *contextVk, ImageMipLe
ASSERT(!mRedefinedLevels.any());
const vk::Format &format = getBaseLevelFormat(contextVk->getRenderer());
- ANGLE_TRY(initImage(contextVk, format.intendedFormatID,
+ ANGLE_TRY(initImage(contextVk, format.getIntendedFormatID(),
format.getActualImageFormatID(getRequiredImageAccess()), mipLevels));
if (mipLevels == ImageMipLevels::FullMipChain)
@@ -2741,7 +2742,7 @@ angle::Result TextureVk::initializeContents(const gl::Context *context,
// Note that we cannot ensure the image is initialized because we might be calling subImage
// on a non-complete cube map.
return mImage->stageRobustResourceClearWithFormat(
- contextVk, imageIndex, desc.size, format.intendedFormat(),
+ contextVk, imageIndex, desc.size, format.getIntendedFormat(),
format.getActualImageFormat(getRequiredImageAccess()));
}
@@ -3332,7 +3333,7 @@ angle::Result TextureVk::ensureRenderable(ContextVk *contextVk)
// If we have staged update and it was encoded with different format, we need to flush out
// these staged update. The respecifyImageStorage should handle read back data and re-stage
// data with new format.
- angle::FormatID intendedFormatID = format.intendedFormatID;
+ angle::FormatID intendedFormatID = format.getIntendedFormatID();
angle::FormatID actualFormatID = format.getActualImageFormatID(vk::ImageAccess::Renderable);
gl::LevelIndex levelGLStart, levelGLEnd;
diff --git a/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp b/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
index ed416508c..a02a2dad7 100644
--- a/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
+++ b/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
@@ -61,9 +61,9 @@ angle::Result WarnOnVertexFormatConversion(ContextVk *contextVk,
std::ostringstream stream;
stream << "The Vulkan driver does not support the 0x" << std::hex
- << vertexFormat.intendedFormat().glInternalFormat
+ << vertexFormat.getIntendedFormat().glInternalFormat
<< " vertex attribute format; emulating with 0x"
- << vertexFormat.actualBufferFormat(compressed).glInternalFormat;
+ << vertexFormat.getActualBufferFormat(compressed).glInternalFormat;
ANGLE_PERF_WARNING(contextVk->getDebug(), GL_DEBUG_SEVERITY_LOW, stream.str().c_str());
if (insertEventMarker)
@@ -382,8 +382,8 @@ angle::Result VertexArrayVk::convertVertexBufferGPU(ContextVk *contextVk,
GLuint relativeOffset,
bool compressed)
{
- const angle::Format &srcFormat = vertexFormat.intendedFormat();
- const angle::Format &destFormat = vertexFormat.actualBufferFormat(compressed);
+ const angle::Format &srcFormat = vertexFormat.getIntendedFormat();
+ const angle::Format &destFormat = vertexFormat.getActualBufferFormat(compressed);
ASSERT(binding.getStride() % (srcFormat.pixelBytes / srcFormat.channelCount) == 0);
@@ -396,7 +396,7 @@ angle::Result VertexArrayVk::convertVertexBufferGPU(ContextVk *contextVk,
return angle::Result::Continue;
}
- ASSERT(GetVertexInputAlignment(vertexFormat, compressed) <= vk::kVertexBufferAlignment);
+ ASSERT(vertexFormat.getVertexInputAlignment(compressed) <= vk::kVertexBufferAlignment);
// Allocate buffer for results
conversion->data.releaseInFlightBuffers(contextVk);
@@ -434,8 +434,8 @@ angle::Result VertexArrayVk::convertVertexBufferCPU(ContextVk *contextVk,
{
ANGLE_TRACE_EVENT0("gpu.angle", "VertexArrayVk::convertVertexBufferCpu");
- unsigned srcFormatSize = vertexFormat.intendedFormat().pixelBytes;
- unsigned dstFormatSize = vertexFormat.actualBufferFormat(compressed).pixelBytes;
+ unsigned srcFormatSize = vertexFormat.getIntendedFormat().pixelBytes;
+ unsigned dstFormatSize = vertexFormat.getActualBufferFormat(compressed).pixelBytes;
conversion->data.releaseInFlightBuffers(contextVk);
@@ -449,7 +449,7 @@ angle::Result VertexArrayVk::convertVertexBufferCPU(ContextVk *contextVk,
ANGLE_TRY(srcBuffer->mapImpl(contextVk, &src));
const uint8_t *srcBytes = reinterpret_cast<const uint8_t *>(src);
srcBytes += binding.getOffset() + relativeOffset;
- ASSERT(GetVertexInputAlignment(vertexFormat, compressed) <= vk::kVertexBufferAlignment);
+ ASSERT(vertexFormat.getVertexInputAlignment(compressed) <= vk::kVertexBufferAlignment);
ANGLE_TRY(StreamVertexData(
contextVk, &conversion->data, srcBytes, numVertices * dstFormatSize, 0, numVertices,
binding.getStride(), srcFormatSize, vertexFormat.getVertexLoadFunction(compressed),
@@ -607,14 +607,13 @@ angle::Result VertexArrayVk::syncDirtyAttrib(ContextVk *contextVk,
if (!isStreamingVertexAttrib)
{
BufferVk *bufferVk = vk::GetImpl(bufferGL);
- const angle::Format &intendedFormat = vertexFormat.intendedFormat();
+ const angle::Format &intendedFormat = vertexFormat.getIntendedFormat();
bool bindingIsAligned = BindingIsAligned(
binding, intendedFormat, intendedFormat.channelCount, attrib.relativeOffset);
if (renderer->getFeatures().compressVertexData.enabled &&
gl::IsStaticBufferUsage(bufferGL->getUsage()) &&
- vertexFormat.actualCompressedBufferFormatID != angle::FormatID::NONE &&
- vertexFormat.actualBufferFormatID != vertexFormat.actualCompressedBufferFormatID)
+ vertexFormat.canCompressBufferData())
{
compressed = true;
}
@@ -631,11 +630,9 @@ angle::Result VertexArrayVk::syncDirtyAttrib(ContextVk *contextVk,
if (compressed)
{
INFO() << "Compressing vertex data in buffer " << bufferGL->id().value
- << " from "
- << static_cast<unsigned int>(vertexFormat.intendedFormatID) << " to "
- << static_cast<unsigned int>(
- vertexFormat.actualCompressedBufferFormatID)
- << ".";
+ << " from " << ToUnderlying(vertexFormat.getIntendedFormatID())
+ << " to "
+ << ToUnderlying(vertexFormat.getActualBufferFormat(true).id) << ".";
}
if (bindingIsAligned)
@@ -671,7 +668,7 @@ angle::Result VertexArrayVk::syncDirtyAttrib(ContextVk *contextVk,
mCurrentArrayBufferRelativeOffsets[attribIndex] = 0;
// Converted buffer is tightly packed
- stride = vertexFormat.actualBufferFormat(compressed).pixelBytes;
+ stride = vertexFormat.getActualBufferFormat(compressed).pixelBytes;
}
else
{
@@ -712,7 +709,7 @@ angle::Result VertexArrayVk::syncDirtyAttrib(ContextVk *contextVk,
mCurrentArrayBufferHandles[attribIndex] = emptyBuffer.getBuffer().getHandle();
mCurrentArrayBufferOffsets[attribIndex] = 0;
// Client side buffer will be transfered to a tightly packed buffer later
- stride = vertexFormat.actualBufferFormat(compressed).pixelBytes;
+ stride = vertexFormat.getActualBufferFormat(compressed).pixelBytes;
}
if (bufferOnly)
@@ -794,12 +791,12 @@ angle::Result VertexArrayVk::updateStreamedAttribs(const gl::Context *context,
const gl::VertexBinding &binding = bindings[attrib.bindingIndex];
const vk::Format &vertexFormat = renderer->getFormat(attrib.format->id);
- GLuint stride = vertexFormat.actualBufferFormat(false).pixelBytes;
+ GLuint stride = vertexFormat.getActualBufferFormat(false).pixelBytes;
bool compressed = false;
ANGLE_TRY(WarnOnVertexFormatConversion(contextVk, vertexFormat, compressed, false));
- ASSERT(GetVertexInputAlignment(vertexFormat, false) <= vk::kVertexBufferAlignment);
+ ASSERT(vertexFormat.getVertexInputAlignment(false) <= vk::kVertexBufferAlignment);
const uint8_t *src = static_cast<const uint8_t *>(attrib.pointer);
const uint32_t divisor = binding.getDivisor();
@@ -823,7 +820,7 @@ angle::Result VertexArrayVk::updateStreamedAttribs(const gl::Context *context,
ANGLE_TRY(StreamVertexData(contextVk, &mDynamicVertexData, src, bytesToAllocate, 0,
instanceCount, binding.getStride(), stride,
- vertexFormat.vertexLoadFunction,
+ vertexFormat.getVertexLoadFunction(compressed),
&mCurrentArrayBuffers[attribIndex],
&mCurrentArrayBufferOffsets[attribIndex], divisor));
if (bufferVk)
@@ -839,7 +836,7 @@ angle::Result VertexArrayVk::updateStreamedAttribs(const gl::Context *context,
ANGLE_TRY(StreamVertexData(contextVk, &mDynamicVertexData, src, bytesToAllocate, 0,
count, binding.getStride(), stride,
- vertexFormat.vertexLoadFunction,
+ vertexFormat.getVertexLoadFunction(compressed),
&mCurrentArrayBuffers[attribIndex],
&mCurrentArrayBufferOffsets[attribIndex], 1));
}
@@ -856,7 +853,7 @@ angle::Result VertexArrayVk::updateStreamedAttribs(const gl::Context *context,
ANGLE_TRY(StreamVertexData(
contextVk, &mDynamicVertexData, src, bytesToAllocate, destOffset, vertexCount,
- binding.getStride(), stride, vertexFormat.vertexLoadFunction,
+ binding.getStride(), stride, vertexFormat.getVertexLoadFunction(compressed),
&mCurrentArrayBuffers[attribIndex], &mCurrentArrayBufferOffsets[attribIndex], 1));
}
diff --git a/src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.cpp b/src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.cpp
index 35ad52a1c..c78b2d083 100644
--- a/src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.cpp
+++ b/src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.cpp
@@ -286,7 +286,7 @@ angle::Result HardwareBufferImageSiblingVkAndroid::initImpl(DisplayVk *displayVk
const vk::Format &format =
bufferFormatProperties.format == VK_FORMAT_UNDEFINED ? externalVkFormat : vkFormat;
ANGLE_TRY(mImage->initExternal(
- displayVk, gl::TextureType::_2D, vkExtents, format.intendedFormatID,
+ displayVk, gl::TextureType::_2D, vkExtents, format.getIntendedFormatID(),
format.getActualRenderableImageFormatID(), 1, usage, imageCreateFlags,
vk::ImageLayout::ExternalPreInitialized, &externalMemoryImageCreateInfo, gl::LevelIndex(0),
1, 1, robustInitEnabled, nullptr, hasProtectedContent()));
diff --git a/src/libANGLE/renderer/vulkan/gen_vk_format_table.py b/src/libANGLE/renderer/vulkan/gen_vk_format_table.py
index 423201156..b1d924a09 100644
--- a/src/libANGLE/renderer/vulkan/gen_vk_format_table.py
+++ b/src/libANGLE/renderer/vulkan/gen_vk_format_table.py
@@ -80,14 +80,14 @@ break;
"""
format_entry_template = """case angle::FormatID::{format_id}:
-intendedGLFormat = {internal_format};
+mIntendedGLFormat = {internal_format};
{image_template}
{buffer_template}
break;
"""
-image_basic_template = """actualImageFormatID = {image};
-imageInitializerFunction = {image_initializer};"""
+image_basic_template = """mActualSampleOnlyImageFormatID = {image};
+mImageInitializerFunction = {image_initializer};"""
image_struct_template = "{{{image}, {image_initializer}}}"
@@ -96,10 +96,10 @@ static constexpr ImageFormatInitInfo kInfo[] = {{{image_list}}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}}"""
-buffer_basic_template = """actualBufferFormatID = {buffer};
-vkBufferFormatIsPacked = {vk_buffer_format_is_packed};
-vertexLoadFunction = {vertex_load_function};
-vertexLoadRequiresConversion = {vertex_load_converts};"""
+buffer_basic_template = """mActualBufferFormatID = {buffer};
+mVkBufferFormatIsPacked = {vk_buffer_format_is_packed};
+mVertexLoadFunction = {vertex_load_function};
+mVertexLoadRequiresConversion = {vertex_load_converts};"""
buffer_struct_template = """{{{buffer}, {vk_buffer_format_is_packed},
{vertex_load_function}, {vertex_load_converts}}}"""
diff --git a/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp b/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
index 1403394fd..752bb3c1f 100644
--- a/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
+++ b/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
@@ -1789,13 +1789,13 @@ angle::Result GraphicsPipelineDesc::initializePipeline(
}
// Get the corresponding VkFormat for the attrib's format.
- angle::FormatID formatID = static_cast<angle::FormatID>(packedAttrib.format);
- const Format &format = contextVk->getRenderer()->getFormat(formatID);
- const angle::Format &angleFormat = format.intendedFormat();
- VkFormat vkFormat = format.actualBufferVkFormat(packedAttrib.compressed);
+ angle::FormatID formatID = static_cast<angle::FormatID>(packedAttrib.format);
+ const Format &format = contextVk->getRenderer()->getFormat(formatID);
+ const angle::Format &intendedFormat = format.getIntendedFormat();
+ VkFormat vkFormat = format.getActualBufferVkFormat(packedAttrib.compressed);
- gl::ComponentType attribType =
- GetVertexAttributeComponentType(angleFormat.isPureInt(), angleFormat.vertexAttribType);
+ gl::ComponentType attribType = GetVertexAttributeComponentType(
+ intendedFormat.isPureInt(), intendedFormat.vertexAttribType);
gl::ComponentType programAttribType =
gl::GetComponentTypeMask(programAttribsTypeMask, attribIndex);
@@ -1814,16 +1814,17 @@ angle::Result GraphicsPipelineDesc::initializePipeline(
{
// When converting from an unsigned to a signed format or vice versa, attempt to
// match the bit width.
- angle::FormatID convertedFormatID = gl::ConvertFormatSignedness(angleFormat);
+ angle::FormatID convertedFormatID = gl::ConvertFormatSignedness(intendedFormat);
const Format &convertedFormat =
contextVk->getRenderer()->getFormat(convertedFormatID);
- ASSERT(angleFormat.channelCount == convertedFormat.intendedFormat().channelCount);
- ASSERT(angleFormat.redBits == convertedFormat.intendedFormat().redBits);
- ASSERT(angleFormat.greenBits == convertedFormat.intendedFormat().greenBits);
- ASSERT(angleFormat.blueBits == convertedFormat.intendedFormat().blueBits);
- ASSERT(angleFormat.alphaBits == convertedFormat.intendedFormat().alphaBits);
-
- vkFormat = convertedFormat.actualBufferVkFormat(packedAttrib.compressed);
+ ASSERT(intendedFormat.channelCount ==
+ convertedFormat.getIntendedFormat().channelCount);
+ ASSERT(intendedFormat.redBits == convertedFormat.getIntendedFormat().redBits);
+ ASSERT(intendedFormat.greenBits == convertedFormat.getIntendedFormat().greenBits);
+ ASSERT(intendedFormat.blueBits == convertedFormat.getIntendedFormat().blueBits);
+ ASSERT(intendedFormat.alphaBits == convertedFormat.getIntendedFormat().alphaBits);
+
+ vkFormat = convertedFormat.getActualBufferVkFormat(packedAttrib.compressed);
}
ASSERT(contextVk->getNativeExtensions().relaxedVertexAttributeTypeANGLE);
@@ -3154,7 +3155,7 @@ void SamplerDesc::update(ContextVk *contextVk,
{
mIsExternalFormat = 0;
mExternalOrVkFormat = 0;
- if (vkFormat.intendedFormat().isYUV)
+ if (vkFormat.getIntendedFormat().isYUV)
{
ASSERT(!vkFormat.hasRenderableImageFallbackFormat());
mExternalOrVkFormat =
@@ -3209,9 +3210,9 @@ void SamplerDesc::update(ContextVk *contextVk,
(samplerState.getBorderColor().type == angle::ColorGeneric::Type::Float) ? 0 : 1;
mBorderColor = samplerState.getBorderColor().colorF;
- if (vkFormat.intendedFormatID != angle::FormatID::NONE)
+ if (vkFormat.getIntendedFormatID() != angle::FormatID::NONE)
{
- LoadTextureBorderFunctionInfo loadFunction = vkFormat.textureBorderLoadFunctions();
+ LoadTextureBorderFunctionInfo loadFunction = vkFormat.getTextureBorderLoadFunctions();
loadFunction.loadFunction(mBorderColor);
}
diff --git a/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp b/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
index a13146ea3..73edf3f06 100644
--- a/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
+++ b/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
@@ -177,7 +177,7 @@ bool HasTexelBufferSupport(const RendererVk *rendererVk, GLenum formatGL)
const Format &formatVk = rendererVk->getFormat(formatGL);
return rendererVk->hasBufferFormatFeatureBits(
- formatVk.actualBufferFormatID,
+ formatVk.getActualBufferFormat(false).id,
VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT);
}
diff --git a/src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp b/src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp
index 07445837e..1ac4c8a1a 100644
--- a/src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp
+++ b/src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp
@@ -26,214 +26,214 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
switch (angleFormat.id)
{
case angle::FormatID::A16_FLOAT:
- intendedGLFormat = GL_ALPHA16F_EXT;
- actualImageFormatID = angle::FormatID::R16_FLOAT;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_ALPHA16F_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16_FLOAT;
+ mImageInitializerFunction = nullptr;
break;
case angle::FormatID::A1R5G5B5_UNORM:
- intendedGLFormat = GL_A1RGB5_ANGLEX;
- actualImageFormatID = angle::FormatID::A1R5G5B5_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::A1R5G5B5_UNORM;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_A1RGB5_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::A1R5G5B5_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::A1R5G5B5_UNORM;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::A2R10G10B10_SINT_VERTEX:
- intendedGLFormat = GL_INT_10_10_10_2_OES;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<true, false, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_INT_10_10_10_2_OES;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<true, false, true>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::A2R10G10B10_SNORM_VERTEX:
- intendedGLFormat = GL_A2_RGB10_SNORM_ANGLEX;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<true, true, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_A2_RGB10_SNORM_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<true, true, true>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::A2R10G10B10_SSCALED_VERTEX:
- intendedGLFormat = GL_A2_RGB10_SSCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<true, false, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_A2_RGB10_SSCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<true, false, true>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::A2R10G10B10_UINT_VERTEX:
- intendedGLFormat = GL_UNSIGNED_INT_10_10_10_2_OES;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<false, false, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_UNSIGNED_INT_10_10_10_2_OES;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<false, false, true>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::A2R10G10B10_UNORM_VERTEX:
- intendedGLFormat = GL_A2_RGB10_UNORM_ANGLEX;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<false, true, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_A2_RGB10_UNORM_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<false, true, true>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::A2R10G10B10_USCALED_VERTEX:
- intendedGLFormat = GL_A2_RGB10_USCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<false, false, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_A2_RGB10_USCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyW2XYZ10ToXYZWFloatVertexData<false, false, true>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::A32_FLOAT:
- intendedGLFormat = GL_ALPHA32F_EXT;
- actualImageFormatID = angle::FormatID::R32_FLOAT;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_ALPHA32F_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32_FLOAT;
+ mImageInitializerFunction = nullptr;
break;
case angle::FormatID::A8_UNORM:
- intendedGLFormat = GL_ALPHA8_EXT;
- actualImageFormatID = angle::FormatID::R8_UNORM;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_ALPHA8_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8_UNORM;
+ mImageInitializerFunction = nullptr;
break;
case angle::FormatID::ASTC_10x10_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR;
- actualImageFormatID = angle::FormatID::ASTC_10x10_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_10x10_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_10x10_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_10x10_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_10x10_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_10x10_KHR;
- actualImageFormatID = angle::FormatID::ASTC_10x10_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_10x10_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_10x10_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_10x10_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_10x10_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_10x5_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR;
- actualImageFormatID = angle::FormatID::ASTC_10x5_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_10x5_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_10x5_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_10x5_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_10x5_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_10x5_KHR;
- actualImageFormatID = angle::FormatID::ASTC_10x5_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_10x5_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_10x5_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_10x5_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_10x5_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_10x6_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR;
- actualImageFormatID = angle::FormatID::ASTC_10x6_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_10x6_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_10x6_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_10x6_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_10x6_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_10x6_KHR;
- actualImageFormatID = angle::FormatID::ASTC_10x6_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_10x6_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_10x6_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_10x6_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_10x6_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_10x8_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR;
- actualImageFormatID = angle::FormatID::ASTC_10x8_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_10x8_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_10x8_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_10x8_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_10x8_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_10x8_KHR;
- actualImageFormatID = angle::FormatID::ASTC_10x8_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_10x8_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_10x8_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_10x8_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_10x8_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_12x10_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR;
- actualImageFormatID = angle::FormatID::ASTC_12x10_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_12x10_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_12x10_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_12x10_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_12x10_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_12x10_KHR;
- actualImageFormatID = angle::FormatID::ASTC_12x10_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_12x10_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_12x10_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_12x10_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_12x10_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_12x12_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR;
- actualImageFormatID = angle::FormatID::ASTC_12x12_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_12x12_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_12x12_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_12x12_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_12x12_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_12x12_KHR;
- actualImageFormatID = angle::FormatID::ASTC_12x12_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_12x12_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_12x12_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_12x12_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_12x12_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_3x3x3_UNORM_BLOCK:
@@ -253,23 +253,23 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::ASTC_4x4_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;
- actualImageFormatID = angle::FormatID::ASTC_4x4_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_4x4_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_4x4_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_4x4_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_4x4_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_4x4_KHR;
- actualImageFormatID = angle::FormatID::ASTC_4x4_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_4x4_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_4x4_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_4x4_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_4x4_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_4x4x3_UNORM_BLOCK:
@@ -289,23 +289,23 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::ASTC_5x4_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR;
- actualImageFormatID = angle::FormatID::ASTC_5x4_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_5x4_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_5x4_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_5x4_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_5x4_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_5x4_KHR;
- actualImageFormatID = angle::FormatID::ASTC_5x4_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_5x4_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_5x4_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_5x4_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_5x4_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_5x4x4_UNORM_BLOCK:
@@ -317,23 +317,23 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::ASTC_5x5_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR;
- actualImageFormatID = angle::FormatID::ASTC_5x5_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_5x5_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_5x5_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_5x5_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_5x5_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_5x5_KHR;
- actualImageFormatID = angle::FormatID::ASTC_5x5_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_5x5_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_5x5_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_5x5_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_5x5_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_5x5x4_UNORM_BLOCK:
@@ -353,23 +353,23 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::ASTC_6x5_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR;
- actualImageFormatID = angle::FormatID::ASTC_6x5_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_6x5_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_6x5_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_6x5_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_6x5_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_6x5_KHR;
- actualImageFormatID = angle::FormatID::ASTC_6x5_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_6x5_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_6x5_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_6x5_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_6x5_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_6x5x5_UNORM_BLOCK:
@@ -381,23 +381,23 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::ASTC_6x6_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR;
- actualImageFormatID = angle::FormatID::ASTC_6x6_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_6x6_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_6x6_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_6x6_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_6x6_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_6x6_KHR;
- actualImageFormatID = angle::FormatID::ASTC_6x6_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_6x6_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_6x6_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_6x6_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_6x6_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_6x6x5_UNORM_BLOCK:
@@ -417,103 +417,103 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::ASTC_8x5_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR;
- actualImageFormatID = angle::FormatID::ASTC_8x5_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_8x5_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_8x5_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_8x5_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_8x5_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_8x5_KHR;
- actualImageFormatID = angle::FormatID::ASTC_8x5_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_8x5_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_8x5_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_8x5_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_8x5_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_8x6_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR;
- actualImageFormatID = angle::FormatID::ASTC_8x6_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_8x6_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_8x6_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_8x6_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_8x6_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_8x6_KHR;
- actualImageFormatID = angle::FormatID::ASTC_8x6_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_8x6_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_8x6_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_8x6_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_8x6_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_8x8_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR;
- actualImageFormatID = angle::FormatID::ASTC_8x8_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_8x8_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_8x8_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_8x8_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ASTC_8x8_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_ASTC_8x8_KHR;
- actualImageFormatID = angle::FormatID::ASTC_8x8_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::ASTC_8x8_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_ASTC_8x8_KHR;
+ mActualSampleOnlyImageFormatID = angle::FormatID::ASTC_8x8_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::ASTC_8x8_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::B10G10R10A2_UNORM:
- intendedGLFormat = GL_BGR10_A2_ANGLEX;
- actualImageFormatID = angle::FormatID::B10G10R10A2_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::B10G10R10A2_UNORM;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_BGR10_A2_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::B10G10R10A2_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::B10G10R10A2_UNORM;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::B4G4R4A4_UNORM:
- intendedGLFormat = GL_BGRA4_ANGLEX;
- actualImageFormatID = angle::FormatID::B4G4R4A4_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::B4G4R4A4_UNORM;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_BGRA4_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::B4G4R4A4_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::B4G4R4A4_UNORM;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::B5G5R5A1_UNORM:
- intendedGLFormat = GL_BGR5_A1_ANGLEX;
- actualImageFormatID = angle::FormatID::B5G5R5A1_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::B5G5R5A1_UNORM;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_BGR5_A1_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::B5G5R5A1_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::B5G5R5A1_UNORM;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::B5G6R5_UNORM:
- intendedGLFormat = GL_BGR565_ANGLEX;
- actualImageFormatID = angle::FormatID::B5G6R5_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::B5G6R5_UNORM;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_BGR565_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::B5G6R5_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::B5G6R5_UNORM;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::B8G8R8A8_TYPELESS:
@@ -525,207 +525,207 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::B8G8R8A8_UNORM:
- intendedGLFormat = GL_BGRA8_EXT;
- actualImageFormatID = angle::FormatID::B8G8R8A8_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::B8G8R8A8_UNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_BGRA8_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::B8G8R8A8_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::B8G8R8A8_UNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::B8G8R8A8_UNORM_SRGB:
- intendedGLFormat = GL_BGRA8_SRGB_ANGLEX;
- actualImageFormatID = angle::FormatID::B8G8R8A8_UNORM_SRGB;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::B8G8R8A8_UNORM_SRGB;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_BGRA8_SRGB_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::B8G8R8A8_UNORM_SRGB;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::B8G8R8A8_UNORM_SRGB;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::B8G8R8X8_UNORM:
- intendedGLFormat = GL_BGRX8_ANGLEX;
- actualImageFormatID = angle::FormatID::B8G8R8A8_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::NONE;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_BGRX8_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::B8G8R8A8_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::NONE;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::BC1_RGBA_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
- actualImageFormatID = angle::FormatID::BC1_RGBA_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC1_RGBA_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC1_RGBA_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC1_RGBA_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC1_RGBA_UNORM_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
- actualImageFormatID = angle::FormatID::BC1_RGBA_UNORM_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC1_RGBA_UNORM_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC1_RGBA_UNORM_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC1_RGBA_UNORM_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC1_RGB_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
- actualImageFormatID = angle::FormatID::BC1_RGB_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC1_RGB_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC1_RGB_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC1_RGB_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC1_RGB_UNORM_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB_S3TC_DXT1_EXT;
- actualImageFormatID = angle::FormatID::BC1_RGB_UNORM_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC1_RGB_UNORM_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB_S3TC_DXT1_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC1_RGB_UNORM_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC1_RGB_UNORM_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC2_RGBA_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE;
- actualImageFormatID = angle::FormatID::BC2_RGBA_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC2_RGBA_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC2_RGBA_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC2_RGBA_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC2_RGBA_UNORM_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
- actualImageFormatID = angle::FormatID::BC2_RGBA_UNORM_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC2_RGBA_UNORM_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC2_RGBA_UNORM_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC2_RGBA_UNORM_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC3_RGBA_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE;
- actualImageFormatID = angle::FormatID::BC3_RGBA_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC3_RGBA_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC3_RGBA_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC3_RGBA_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC3_RGBA_UNORM_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
- actualImageFormatID = angle::FormatID::BC3_RGBA_UNORM_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC3_RGBA_UNORM_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC3_RGBA_UNORM_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC3_RGBA_UNORM_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC4_RED_SNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SIGNED_RED_RGTC1_EXT;
- actualImageFormatID = angle::FormatID::BC4_RED_SNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC4_RED_SNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SIGNED_RED_RGTC1_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC4_RED_SNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC4_RED_SNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC4_RED_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RED_RGTC1_EXT;
- actualImageFormatID = angle::FormatID::BC4_RED_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC4_RED_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RED_RGTC1_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC4_RED_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC4_RED_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC5_RG_SNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
- actualImageFormatID = angle::FormatID::BC5_RG_SNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC5_RG_SNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC5_RG_SNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC5_RG_SNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC5_RG_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RED_GREEN_RGTC2_EXT;
- actualImageFormatID = angle::FormatID::BC5_RG_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC5_RG_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RED_GREEN_RGTC2_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC5_RG_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC5_RG_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC6H_RGB_SFLOAT_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;
- actualImageFormatID = angle::FormatID::BC6H_RGB_SFLOAT_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC6H_RGB_SFLOAT_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC6H_RGB_SFLOAT_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC6H_RGB_SFLOAT_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC6H_RGB_UFLOAT_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT;
- actualImageFormatID = angle::FormatID::BC6H_RGB_UFLOAT_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC6H_RGB_UFLOAT_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC6H_RGB_UFLOAT_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC6H_RGB_UFLOAT_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC7_RGBA_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA_BPTC_UNORM_EXT;
- actualImageFormatID = angle::FormatID::BC7_RGBA_UNORM_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC7_RGBA_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA_BPTC_UNORM_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC7_RGBA_UNORM_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC7_RGBA_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC7_RGBA_UNORM_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;
- actualImageFormatID = angle::FormatID::BC7_RGBA_UNORM_SRGB_BLOCK;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::BC7_RGBA_UNORM_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::BC7_RGBA_UNORM_SRGB_BLOCK;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::BC7_RGBA_UNORM_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::D16_UNORM:
- intendedGLFormat = GL_DEPTH_COMPONENT16;
- actualImageFormatID = angle::FormatID::D16_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::D16_UNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_DEPTH_COMPONENT16;
+ mActualSampleOnlyImageFormatID = angle::FormatID::D16_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::D16_UNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::D24_UNORM_S8_UINT:
- intendedGLFormat = GL_DEPTH24_STENCIL8;
+ mIntendedGLFormat = GL_DEPTH24_STENCIL8;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::D24_UNORM_S8_UINT, nullptr},
@@ -733,14 +733,14 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
{angle::FormatID::D24_UNORM_S8_UINT, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::D24_UNORM_S8_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::D24_UNORM_S8_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::D24_UNORM_X8_UINT:
- intendedGLFormat = GL_DEPTH_COMPONENT24;
+ mIntendedGLFormat = GL_DEPTH_COMPONENT24;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::D24_UNORM_X8_UINT, nullptr},
@@ -748,24 +748,24 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
{angle::FormatID::D32_FLOAT_S8X24_UINT, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::D24_UNORM_X8_UINT;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::D24_UNORM_X8_UINT;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::D32_FLOAT:
- intendedGLFormat = GL_DEPTH_COMPONENT32F;
- actualImageFormatID = angle::FormatID::D32_FLOAT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::D32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLfloat, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_DEPTH_COMPONENT32F;
+ mActualSampleOnlyImageFormatID = angle::FormatID::D32_FLOAT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::D32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLfloat, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::D32_FLOAT_S8X24_UINT:
- intendedGLFormat = GL_DEPTH32F_STENCIL8;
+ mIntendedGLFormat = GL_DEPTH32F_STENCIL8;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::D32_FLOAT_S8X24_UINT, nullptr},
@@ -773,28 +773,28 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
{angle::FormatID::D32_FLOAT_S8X24_UINT, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::D32_FLOAT_S8X24_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLfloat, 3, 3, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::D32_FLOAT_S8X24_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLfloat, 3, 3, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::D32_UNORM:
- intendedGLFormat = GL_DEPTH_COMPONENT32_OES;
+ mIntendedGLFormat = GL_DEPTH_COMPONENT32_OES;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::D24_UNORM_S8_UINT, nullptr},
{angle::FormatID::D32_FLOAT, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::NONE;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::NONE;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::EAC_R11G11_SNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SIGNED_RG11_EAC;
+ mIntendedGLFormat = GL_COMPRESSED_SIGNED_RG11_EAC;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::EAC_R11G11_SNORM_BLOCK, nullptr},
@@ -802,14 +802,14 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
{angle::FormatID::R16G16_FLOAT, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::EAC_R11G11_SNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::EAC_R11G11_SNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::EAC_R11G11_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RG11_EAC;
+ mIntendedGLFormat = GL_COMPRESSED_RG11_EAC;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::EAC_R11G11_UNORM_BLOCK, nullptr},
@@ -817,14 +817,14 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
{angle::FormatID::R16G16_FLOAT, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::EAC_R11G11_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::EAC_R11G11_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::EAC_R11_SNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SIGNED_R11_EAC;
+ mIntendedGLFormat = GL_COMPRESSED_SIGNED_R11_EAC;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::EAC_R11_SNORM_BLOCK, nullptr},
@@ -832,14 +832,14 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
{angle::FormatID::R16_FLOAT, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::EAC_R11_SNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::EAC_R11_SNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::EAC_R11_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_R11_EAC;
+ mIntendedGLFormat = GL_COMPRESSED_R11_EAC;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::EAC_R11_UNORM_BLOCK, nullptr},
@@ -847,10 +847,10 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
{angle::FormatID::R16_FLOAT, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::EAC_R11_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::EAC_R11_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ETC1_LOSSY_DECODE_R8G8B8_UNORM_BLOCK:
@@ -858,7 +858,7 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::ETC1_R8G8B8_UNORM_BLOCK:
- intendedGLFormat = GL_ETC1_RGB8_OES;
+ mIntendedGLFormat = GL_ETC1_RGB8_OES;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::ETC2_R8G8B8_UNORM_BLOCK, nullptr},
@@ -866,28 +866,28 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::NONE;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::NONE;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::ETC2_R8G8B8A1_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::ETC2_R8G8B8A1_SRGB_BLOCK, nullptr},
{angle::FormatID::R8G8B8A8_UNORM_SRGB, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::ETC2_R8G8B8A1_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLbyte, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::ETC2_R8G8B8A1_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLbyte, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ETC2_R8G8B8A1_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2;
+ mIntendedGLFormat = GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::ETC2_R8G8B8A1_UNORM_BLOCK,
@@ -896,42 +896,42 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::ETC2_R8G8B8A1_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::ETC2_R8G8B8A1_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ETC2_R8G8B8A8_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::ETC2_R8G8B8A8_SRGB_BLOCK, nullptr},
{angle::FormatID::R8G8B8A8_UNORM_SRGB, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::ETC2_R8G8B8A8_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLbyte, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::ETC2_R8G8B8A8_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLbyte, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ETC2_R8G8B8A8_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGBA8_ETC2_EAC;
+ mIntendedGLFormat = GL_COMPRESSED_RGBA8_ETC2_EAC;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::ETC2_R8G8B8A8_UNORM_BLOCK, nullptr},
{angle::FormatID::R8G8B8A8_UNORM, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::ETC2_R8G8B8A8_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::ETC2_R8G8B8A8_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ETC2_R8G8B8_SRGB_BLOCK:
- intendedGLFormat = GL_COMPRESSED_SRGB8_ETC2;
+ mIntendedGLFormat = GL_COMPRESSED_SRGB8_ETC2;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::ETC2_R8G8B8_SRGB_BLOCK, nullptr},
@@ -939,14 +939,14 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::ETC2_R8G8B8_SRGB_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLbyte, 3, 3, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::ETC2_R8G8B8_SRGB_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLbyte, 3, 3, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::ETC2_R8G8B8_UNORM_BLOCK:
- intendedGLFormat = GL_COMPRESSED_RGB8_ETC2;
+ mIntendedGLFormat = GL_COMPRESSED_RGB8_ETC2;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::ETC2_R8G8B8_UNORM_BLOCK, nullptr},
@@ -954,82 +954,82 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::ETC2_R8G8B8_UNORM_BLOCK;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 3, 3, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::ETC2_R8G8B8_UNORM_BLOCK;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 3, 3, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::G8_B8R8_2PLANE_420_UNORM:
- intendedGLFormat = GL_G8_B8R8_2PLANE_420_UNORM_ANGLE;
- actualImageFormatID = angle::FormatID::G8_B8R8_2PLANE_420_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::G8_B8R8_2PLANE_420_UNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 3, 3, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_G8_B8R8_2PLANE_420_UNORM_ANGLE;
+ mActualSampleOnlyImageFormatID = angle::FormatID::G8_B8R8_2PLANE_420_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::G8_B8R8_2PLANE_420_UNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 3, 3, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::G8_B8_R8_3PLANE_420_UNORM:
- intendedGLFormat = GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE;
- actualImageFormatID = angle::FormatID::G8_B8_R8_3PLANE_420_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::G8_B8_R8_3PLANE_420_UNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 3, 3, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE;
+ mActualSampleOnlyImageFormatID = angle::FormatID::G8_B8_R8_3PLANE_420_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::G8_B8_R8_3PLANE_420_UNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 3, 3, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::L16A16_FLOAT:
- intendedGLFormat = GL_LUMINANCE_ALPHA16F_EXT;
- actualImageFormatID = angle::FormatID::R16G16_FLOAT;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_LUMINANCE_ALPHA16F_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16_FLOAT;
+ mImageInitializerFunction = nullptr;
break;
case angle::FormatID::L16_FLOAT:
- intendedGLFormat = GL_LUMINANCE16F_EXT;
- actualImageFormatID = angle::FormatID::R16_FLOAT;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_LUMINANCE16F_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16_FLOAT;
+ mImageInitializerFunction = nullptr;
break;
case angle::FormatID::L32A32_FLOAT:
- intendedGLFormat = GL_LUMINANCE_ALPHA32F_EXT;
- actualImageFormatID = angle::FormatID::R32G32_FLOAT;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_LUMINANCE_ALPHA32F_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32G32_FLOAT;
+ mImageInitializerFunction = nullptr;
break;
case angle::FormatID::L32_FLOAT:
- intendedGLFormat = GL_LUMINANCE32F_EXT;
- actualImageFormatID = angle::FormatID::R32_FLOAT;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_LUMINANCE32F_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32_FLOAT;
+ mImageInitializerFunction = nullptr;
break;
case angle::FormatID::L8A8_UNORM:
- intendedGLFormat = GL_LUMINANCE8_ALPHA8_EXT;
- actualImageFormatID = angle::FormatID::R8G8_UNORM;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_LUMINANCE8_ALPHA8_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8_UNORM;
+ mImageInitializerFunction = nullptr;
break;
case angle::FormatID::L8_UNORM:
- intendedGLFormat = GL_LUMINANCE8_EXT;
- actualImageFormatID = angle::FormatID::R8_UNORM;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_LUMINANCE8_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8_UNORM;
+ mImageInitializerFunction = nullptr;
break;
case angle::FormatID::NONE:
- intendedGLFormat = GL_NONE;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::NONE;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_NONE;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::NONE;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::PVRTC1_RGBA_2BPP_UNORM_BLOCK:
@@ -1065,9 +1065,9 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R10G10B10A2_SINT:
- intendedGLFormat = GL_RGB10_A2_SINT_ANGLEX;
- actualImageFormatID = angle::FormatID::R10G10B10A2_SINT;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGB10_A2_SINT_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R10G10B10A2_SINT;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R10G10B10A2_SINT, true, CopyNativeVertexData<GLuint, 1, 1, 0>,
@@ -1079,9 +1079,9 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R10G10B10A2_SNORM:
- intendedGLFormat = GL_RGB10_A2_SNORM_ANGLEX;
- actualImageFormatID = angle::FormatID::R10G10B10A2_SNORM;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGB10_A2_SNORM_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R10G10B10A2_SNORM;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R10G10B10A2_SNORM, true,
@@ -1093,9 +1093,9 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R10G10B10A2_SSCALED:
- intendedGLFormat = GL_RGB10_A2_SSCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R10G10B10A2_SSCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGB10_A2_SSCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R10G10B10A2_SSCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R10G10B10A2_SSCALED, true,
@@ -1107,9 +1107,9 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R10G10B10A2_UINT:
- intendedGLFormat = GL_RGB10_A2UI;
- actualImageFormatID = angle::FormatID::R10G10B10A2_UINT;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGB10_A2UI;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R10G10B10A2_UINT;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R10G10B10A2_UINT, true, CopyNativeVertexData<GLuint, 1, 1, 0>,
@@ -1121,19 +1121,19 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R10G10B10A2_UNORM:
- intendedGLFormat = GL_RGB10_A2;
- actualImageFormatID = angle::FormatID::R10G10B10A2_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R10G10B10A2_UNORM;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGB10_A2;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R10G10B10A2_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R10G10B10A2_UNORM;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R10G10B10A2_USCALED:
- intendedGLFormat = GL_RGB10_A2_USCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R10G10B10A2_USCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGB10_A2_USCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R10G10B10A2_USCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R10G10B10A2_USCALED, true,
@@ -1145,59 +1145,59 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R10G10B10X2_UNORM:
- intendedGLFormat = GL_RGB10_UNORM_ANGLEX;
- actualImageFormatID = angle::FormatID::R10G10B10A2_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::NONE;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_RGB10_UNORM_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R10G10B10A2_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::NONE;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R11G11B10_FLOAT:
- intendedGLFormat = GL_R11F_G11F_B10F;
- actualImageFormatID = angle::FormatID::R11G11B10_FLOAT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R11G11B10_FLOAT;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R11F_G11F_B10F;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R11G11B10_FLOAT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R11G11B10_FLOAT;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16G16B16A16_FLOAT:
- intendedGLFormat = GL_RGBA16F;
- actualImageFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLhalf, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGBA16F;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLhalf, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16G16B16A16_SINT:
- intendedGLFormat = GL_RGBA16I;
- actualImageFormatID = angle::FormatID::R16G16B16A16_SINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_SINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLshort, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGBA16I;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16B16A16_SINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_SINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLshort, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16G16B16A16_SNORM:
- intendedGLFormat = GL_RGBA16_SNORM_EXT;
- actualImageFormatID = angle::FormatID::R16G16B16A16_SNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_SNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLshort, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGBA16_SNORM_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16B16A16_SNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_SNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLshort, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16G16B16A16_SSCALED:
- intendedGLFormat = GL_RGBA16_SSCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R16G16B16A16_SSCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGBA16_SSCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16B16A16_SSCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R16G16B16A16_SSCALED, false,
@@ -1211,29 +1211,29 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16G16B16A16_UINT:
- intendedGLFormat = GL_RGBA16UI;
- actualImageFormatID = angle::FormatID::R16G16B16A16_UINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGBA16UI;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16B16A16_UINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16G16B16A16_UNORM:
- intendedGLFormat = GL_RGBA16_EXT;
- actualImageFormatID = angle::FormatID::R16G16B16A16_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_UNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGBA16_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16B16A16_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_UNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16G16B16A16_USCALED:
- intendedGLFormat = GL_RGBA16_USCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R16G16B16A16_USCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGBA16_USCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16B16A16_USCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R16G16B16A16_USCALED, false,
@@ -1247,7 +1247,7 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16G16B16_FLOAT:
- intendedGLFormat = GL_RGB16F;
+ mIntendedGLFormat = GL_RGB16F;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R16G16B16_FLOAT, nullptr},
@@ -1266,7 +1266,7 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16G16B16_SINT:
- intendedGLFormat = GL_RGB16I;
+ mIntendedGLFormat = GL_RGB16I;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R16G16B16_SINT, nullptr},
@@ -1285,9 +1285,9 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16G16B16_SNORM:
- intendedGLFormat = GL_RGB16_SNORM_EXT;
- actualImageFormatID = angle::FormatID::R16G16B16_SNORM;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGB16_SNORM_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16B16_SNORM;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R16G16B16_SNORM, false,
@@ -1303,9 +1303,9 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16G16B16_SSCALED:
- intendedGLFormat = GL_RGB16_SSCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R16G16B16_SSCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGB16_SSCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16B16_SSCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R16G16B16_SSCALED, false,
@@ -1321,7 +1321,7 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16G16B16_UINT:
- intendedGLFormat = GL_RGB16UI;
+ mIntendedGLFormat = GL_RGB16UI;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R16G16B16_UINT, nullptr},
@@ -1340,9 +1340,9 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16G16B16_UNORM:
- intendedGLFormat = GL_RGB16_EXT;
- actualImageFormatID = angle::FormatID::R16G16B16_UNORM;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGB16_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16B16_UNORM;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R16G16B16_UNORM, false,
@@ -1358,9 +1358,9 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16G16B16_USCALED:
- intendedGLFormat = GL_RGB16_USCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R16G16B16_USCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGB16_USCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16B16_USCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R16G16B16_USCALED, false,
@@ -1376,39 +1376,39 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16G16_FLOAT:
- intendedGLFormat = GL_RG16F;
- actualImageFormatID = angle::FormatID::R16G16_FLOAT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLhalf, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RG16F;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16_FLOAT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLhalf, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16G16_SINT:
- intendedGLFormat = GL_RG16I;
- actualImageFormatID = angle::FormatID::R16G16_SINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16_SINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLshort, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RG16I;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16_SINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16_SINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLshort, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16G16_SNORM:
- intendedGLFormat = GL_RG16_SNORM_EXT;
- actualImageFormatID = angle::FormatID::R16G16_SNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16_SNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLshort, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RG16_SNORM_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16_SNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16_SNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLshort, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16G16_SSCALED:
- intendedGLFormat = GL_RG16_SSCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R16G16_SSCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RG16_SSCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16_SSCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R16G16_SSCALED, false, CopyNativeVertexData<GLshort, 2, 2, 0>,
@@ -1422,29 +1422,29 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16G16_UINT:
- intendedGLFormat = GL_RG16UI;
- actualImageFormatID = angle::FormatID::R16G16_UINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RG16UI;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16_UINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16G16_UNORM:
- intendedGLFormat = GL_RG16_EXT;
- actualImageFormatID = angle::FormatID::R16G16_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16_UNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RG16_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16_UNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16G16_USCALED:
- intendedGLFormat = GL_RG16_USCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R16G16_USCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RG16_USCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16G16_USCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R16G16_USCALED, false,
@@ -1458,39 +1458,39 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16_FLOAT:
- intendedGLFormat = GL_R16F;
- actualImageFormatID = angle::FormatID::R16_FLOAT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLhalf, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R16F;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16_FLOAT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLhalf, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16_SINT:
- intendedGLFormat = GL_R16I;
- actualImageFormatID = angle::FormatID::R16_SINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16_SINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLshort, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R16I;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16_SINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16_SINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLshort, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16_SNORM:
- intendedGLFormat = GL_R16_SNORM_EXT;
- actualImageFormatID = angle::FormatID::R16_SNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16_SNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLshort, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R16_SNORM_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16_SNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16_SNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLshort, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16_SSCALED:
- intendedGLFormat = GL_R16_SSCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R16_SSCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_R16_SSCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16_SSCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R16_SSCALED, false, CopyNativeVertexData<GLshort, 1, 1, 0>,
@@ -1504,29 +1504,29 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R16_UINT:
- intendedGLFormat = GL_R16UI;
- actualImageFormatID = angle::FormatID::R16_UINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R16UI;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16_UINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16_UNORM:
- intendedGLFormat = GL_R16_EXT;
- actualImageFormatID = angle::FormatID::R16_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16_UNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R16_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16_UNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R16_USCALED:
- intendedGLFormat = GL_R16_USCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R16_USCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_R16_USCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R16_USCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R16_USCALED, false, CopyNativeVertexData<GLushort, 1, 1, 0>,
@@ -1540,18 +1540,18 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R32G32B32A32_FIXED:
- intendedGLFormat = GL_RGBA32_FIXED_ANGLEX;
+ mIntendedGLFormat = GL_RGBA32_FIXED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32B32A32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = Copy32FixedTo32FVertexData<4, 4>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32B32A32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = Copy32FixedTo32FVertexData<4, 4>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32B32A32_FLOAT:
- intendedGLFormat = GL_RGBA32F;
- actualImageFormatID = angle::FormatID::R32G32B32A32_FLOAT;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGBA32F;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32G32B32A32_FLOAT;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R32G32B32A32_FLOAT, false,
@@ -1563,72 +1563,72 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R32G32B32A32_SINT:
- intendedGLFormat = GL_RGBA32I;
- actualImageFormatID = angle::FormatID::R32G32B32A32_SINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R32G32B32A32_SINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLint, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGBA32I;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32G32B32A32_SINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R32G32B32A32_SINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLint, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R32G32B32A32_SNORM:
- intendedGLFormat = GL_RGBA32_SNORM_ANGLEX;
+ mIntendedGLFormat = GL_RGBA32_SNORM_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32B32A32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLint, 4, 4, true, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32B32A32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLint, 4, 4, true, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32B32A32_SSCALED:
- intendedGLFormat = GL_RGBA32_SSCALED_ANGLEX;
+ mIntendedGLFormat = GL_RGBA32_SSCALED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32B32A32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLint, 4, 4, false, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32B32A32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLint, 4, 4, false, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32B32A32_UINT:
- intendedGLFormat = GL_RGBA32UI;
- actualImageFormatID = angle::FormatID::R32G32B32A32_UINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R32G32B32A32_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLuint, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGBA32UI;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32G32B32A32_UINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R32G32B32A32_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLuint, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R32G32B32A32_UNORM:
- intendedGLFormat = GL_RGBA32_UNORM_ANGLEX;
+ mIntendedGLFormat = GL_RGBA32_UNORM_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32B32A32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLuint, 4, 4, true, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32B32A32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLuint, 4, 4, true, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32B32A32_USCALED:
- intendedGLFormat = GL_RGBA32_USCALED_ANGLEX;
+ mIntendedGLFormat = GL_RGBA32_USCALED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32B32A32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLuint, 4, 4, false, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32B32A32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLuint, 4, 4, false, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32B32_FIXED:
- intendedGLFormat = GL_RGB32_FIXED_ANGLEX;
+ mIntendedGLFormat = GL_RGB32_FIXED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32B32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = Copy32FixedTo32FVertexData<3, 3>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32B32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = Copy32FixedTo32FVertexData<3, 3>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32B32_FLOAT:
- intendedGLFormat = GL_RGB32F;
+ mIntendedGLFormat = GL_RGB32F;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R32G32B32_FLOAT, nullptr},
@@ -1650,7 +1650,7 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R32G32B32_SINT:
- intendedGLFormat = GL_RGB32I;
+ mIntendedGLFormat = GL_RGB32I;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R32G32B32_SINT, nullptr},
@@ -1659,32 +1659,32 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
0x00000001>}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::R32G32B32_SINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLint, 3, 3, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::R32G32B32_SINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLint, 3, 3, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R32G32B32_SNORM:
- intendedGLFormat = GL_RGB32_SNORM_ANGLEX;
+ mIntendedGLFormat = GL_RGB32_SNORM_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32B32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLint, 3, 3, true, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32B32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLint, 3, 3, true, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32B32_SSCALED:
- intendedGLFormat = GL_RGB32_SSCALED_ANGLEX;
+ mIntendedGLFormat = GL_RGB32_SSCALED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32B32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLint, 3, 3, false, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32B32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLint, 3, 3, false, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32B32_UINT:
- intendedGLFormat = GL_RGB32UI;
+ mIntendedGLFormat = GL_RGB32UI;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R32G32B32_UINT, nullptr},
@@ -1693,43 +1693,43 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
0x00000001>}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::R32G32B32_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLuint, 3, 3, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::R32G32B32_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLuint, 3, 3, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R32G32B32_UNORM:
- intendedGLFormat = GL_RGB32_UNORM_ANGLEX;
+ mIntendedGLFormat = GL_RGB32_UNORM_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32B32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLuint, 3, 3, true, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32B32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLuint, 3, 3, true, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32B32_USCALED:
- intendedGLFormat = GL_RGB32_USCALED_ANGLEX;
+ mIntendedGLFormat = GL_RGB32_USCALED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32B32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLuint, 3, 3, false, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32B32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLuint, 3, 3, false, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32_FIXED:
- intendedGLFormat = GL_RG32_FIXED_ANGLEX;
+ mIntendedGLFormat = GL_RG32_FIXED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = Copy32FixedTo32FVertexData<2, 2>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = Copy32FixedTo32FVertexData<2, 2>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32_FLOAT:
- intendedGLFormat = GL_RG32F;
- actualImageFormatID = angle::FormatID::R32G32_FLOAT;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RG32F;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32G32_FLOAT;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R32G32_FLOAT, false, CopyNativeVertexData<GLfloat, 2, 2, 0>,
@@ -1741,74 +1741,74 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R32G32_SINT:
- intendedGLFormat = GL_RG32I;
- actualImageFormatID = angle::FormatID::R32G32_SINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R32G32_SINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLint, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RG32I;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32G32_SINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R32G32_SINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLint, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R32G32_SNORM:
- intendedGLFormat = GL_RG32_SNORM_ANGLEX;
+ mIntendedGLFormat = GL_RG32_SNORM_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLint, 2, 2, true, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLint, 2, 2, true, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32_SSCALED:
- intendedGLFormat = GL_RG32_SSCALED_ANGLEX;
+ mIntendedGLFormat = GL_RG32_SSCALED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLint, 2, 2, false, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLint, 2, 2, false, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32_UINT:
- intendedGLFormat = GL_RG32UI;
- actualImageFormatID = angle::FormatID::R32G32_UINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R32G32_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLuint, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RG32UI;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32G32_UINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R32G32_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLuint, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R32G32_UNORM:
- intendedGLFormat = GL_RG32_UNORM_ANGLEX;
+ mIntendedGLFormat = GL_RG32_UNORM_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLuint, 2, 2, true, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLuint, 2, 2, true, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32G32_USCALED:
- intendedGLFormat = GL_RG32_USCALED_ANGLEX;
+ mIntendedGLFormat = GL_RG32_USCALED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32G32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLuint, 2, 2, false, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32G32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLuint, 2, 2, false, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32_FIXED:
- intendedGLFormat = GL_R32_FIXED_ANGLEX;
+ mIntendedGLFormat = GL_R32_FIXED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = Copy32FixedTo32FVertexData<1, 1>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = Copy32FixedTo32FVertexData<1, 1>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32_FLOAT:
- intendedGLFormat = GL_R32F;
- actualImageFormatID = angle::FormatID::R32_FLOAT;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_R32F;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32_FLOAT;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R32_FLOAT, false, CopyNativeVertexData<GLfloat, 1, 1, 0>,
@@ -1820,123 +1820,123 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R32_SINT:
- intendedGLFormat = GL_R32I;
- actualImageFormatID = angle::FormatID::R32_SINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R32_SINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLint, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R32I;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32_SINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R32_SINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLint, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R32_SNORM:
- intendedGLFormat = GL_R32_SNORM_ANGLEX;
+ mIntendedGLFormat = GL_R32_SNORM_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLint, 1, 1, true, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLint, 1, 1, true, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32_SSCALED:
- intendedGLFormat = GL_R32_SSCALED_ANGLEX;
+ mIntendedGLFormat = GL_R32_SSCALED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLint, 1, 1, false, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLint, 1, 1, false, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32_UINT:
- intendedGLFormat = GL_R32UI;
- actualImageFormatID = angle::FormatID::R32_UINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R32_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R32UI;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R32_UINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R32_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R32_UNORM:
- intendedGLFormat = GL_R32_UNORM_ANGLEX;
+ mIntendedGLFormat = GL_R32_UNORM_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLuint, 1, 1, true, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLuint, 1, 1, true, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R32_USCALED:
- intendedGLFormat = GL_R32_USCALED_ANGLEX;
+ mIntendedGLFormat = GL_R32_USCALED_ANGLEX;
- actualBufferFormatID = angle::FormatID::R32_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyToFloatVertexData<GLuint, 1, 1, false, false>;
- vertexLoadRequiresConversion = true;
+ mActualBufferFormatID = angle::FormatID::R32_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyToFloatVertexData<GLuint, 1, 1, false, false>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R4G4B4A4_UNORM:
- intendedGLFormat = GL_RGBA4;
+ mIntendedGLFormat = GL_RGBA4;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R4G4B4A4_UNORM, nullptr},
{angle::FormatID::R8G8B8A8_UNORM, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::R4G4B4A4_UNORM;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::R4G4B4A4_UNORM;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R5G5B5A1_UNORM:
- intendedGLFormat = GL_RGB5_A1;
+ mIntendedGLFormat = GL_RGB5_A1;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R5G5B5A1_UNORM, nullptr},
{angle::FormatID::A1R5G5B5_UNORM, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::R5G5B5A1_UNORM;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::R5G5B5A1_UNORM;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R5G6B5_UNORM:
- intendedGLFormat = GL_RGB565;
- actualImageFormatID = angle::FormatID::R5G6B5_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R5G6B5_UNORM;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGB565;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R5G6B5_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R5G6B5_UNORM;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLushort, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8B8A8_SINT:
- intendedGLFormat = GL_RGBA8I;
- actualImageFormatID = angle::FormatID::R8G8B8A8_SINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8G8B8A8_SINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLbyte, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGBA8I;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8B8A8_SINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8G8B8A8_SINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLbyte, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8B8A8_SNORM:
- intendedGLFormat = GL_RGBA8_SNORM;
- actualImageFormatID = angle::FormatID::R8G8B8A8_SNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8G8B8A8_SNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLbyte, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGBA8_SNORM;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8B8A8_SNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8G8B8A8_SNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLbyte, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8B8A8_SSCALED:
- intendedGLFormat = GL_RGBA8_SSCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R8G8B8A8_SSCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGBA8_SSCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8B8A8_SSCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8B8A8_SSCALED, false,
@@ -1956,39 +1956,39 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R8G8B8A8_UINT:
- intendedGLFormat = GL_RGBA8UI;
- actualImageFormatID = angle::FormatID::R8G8B8A8_UINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8G8B8A8_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGBA8UI;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8B8A8_UINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8G8B8A8_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8B8A8_UNORM:
- intendedGLFormat = GL_RGBA8;
- actualImageFormatID = angle::FormatID::R8G8B8A8_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8G8B8A8_UNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGBA8;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8B8A8_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8G8B8A8_UNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8B8A8_UNORM_SRGB:
- intendedGLFormat = GL_SRGB8_ALPHA8;
- actualImageFormatID = angle::FormatID::R8G8B8A8_UNORM_SRGB;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8G8B8A8_UNORM_SRGB;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_SRGB8_ALPHA8;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8B8A8_UNORM_SRGB;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8G8B8A8_UNORM_SRGB;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 4, 4, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8B8A8_USCALED:
- intendedGLFormat = GL_RGBA8_USCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R8G8B8A8_USCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGBA8_USCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8B8A8_USCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8B8A8_USCALED, false,
@@ -2000,7 +2000,7 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R8G8B8_SINT:
- intendedGLFormat = GL_RGB8I;
+ mIntendedGLFormat = GL_RGB8I;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8B8_SINT, nullptr},
@@ -2019,7 +2019,7 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R8G8B8_SNORM:
- intendedGLFormat = GL_RGB8_SNORM;
+ mIntendedGLFormat = GL_RGB8_SNORM;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8B8_SNORM, nullptr},
@@ -2038,9 +2038,9 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R8G8B8_SSCALED:
- intendedGLFormat = GL_RGB8_SSCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R8G8B8_SSCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGB8_SSCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8B8_SSCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8B8_SSCALED, false, CopyNativeVertexData<GLbyte, 3, 3, 0>,
@@ -2054,7 +2054,7 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R8G8B8_UINT:
- intendedGLFormat = GL_RGB8UI;
+ mIntendedGLFormat = GL_RGB8UI;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8B8_UINT, nullptr},
@@ -2073,18 +2073,18 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R8G8B8_UNORM:
- intendedGLFormat = GL_RGB8;
- actualImageFormatID = angle::FormatID::R8G8B8A8_UNORM;
- imageInitializerFunction = Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>;
- actualBufferFormatID = angle::FormatID::R8G8B8A8_UNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction =
+ mIntendedGLFormat = GL_RGB8;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8B8A8_UNORM;
+ mImageInitializerFunction = Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>;
+ mActualBufferFormatID = angle::FormatID::R8G8B8A8_UNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction =
CopyNativeVertexData<GLubyte, 3, 4, std::numeric_limits<GLubyte>::max()>;
- vertexLoadRequiresConversion = true;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::R8G8B8_UNORM_SRGB:
- intendedGLFormat = GL_SRGB8;
+ mIntendedGLFormat = GL_SRGB8;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8B8_UNORM_SRGB, nullptr},
@@ -2092,16 +2092,16 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::R8G8B8_UNORM_SRGB;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 3, 3, 0>;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::R8G8B8_UNORM_SRGB;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 3, 3, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8B8_USCALED:
- intendedGLFormat = GL_RGB8_USCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R8G8B8_USCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RGB8_USCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8B8_USCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8B8_USCALED, false, CopyNativeVertexData<GLubyte, 3, 3, 0>,
@@ -2115,29 +2115,29 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R8G8_SINT:
- intendedGLFormat = GL_RG8I;
- actualImageFormatID = angle::FormatID::R8G8_SINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8G8_SINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLbyte, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RG8I;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8_SINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8G8_SINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLbyte, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8_SNORM:
- intendedGLFormat = GL_RG8_SNORM;
- actualImageFormatID = angle::FormatID::R8G8_SNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8G8_SNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLbyte, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RG8_SNORM;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8_SNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8G8_SNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLbyte, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8_SSCALED:
- intendedGLFormat = GL_RG8_SSCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R8G8_SSCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RG8_SSCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8_SSCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8_SSCALED, false, CopyNativeVertexData<GLbyte, 2, 2, 0>,
@@ -2149,39 +2149,39 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R8G8_UINT:
- intendedGLFormat = GL_RG8UI;
- actualImageFormatID = angle::FormatID::R8G8_UINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8G8_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RG8UI;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8_UINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8G8_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8_UNORM:
- intendedGLFormat = GL_RG8;
- actualImageFormatID = angle::FormatID::R8G8_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8G8_UNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RG8;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8G8_UNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8_UNORM_SRGB:
- intendedGLFormat = GL_SRG8_EXT;
- actualImageFormatID = angle::FormatID::R8G8_UNORM_SRGB;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8G8_UNORM_SRGB;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 2, 2, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_SRG8_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8_UNORM_SRGB;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8G8_UNORM_SRGB;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 2, 2, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8G8_USCALED:
- intendedGLFormat = GL_RG8_USCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R8G8_USCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_RG8_USCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8G8_USCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R8G8_USCALED, false, CopyNativeVertexData<GLubyte, 2, 2, 0>,
@@ -2193,29 +2193,29 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R8_SINT:
- intendedGLFormat = GL_R8I;
- actualImageFormatID = angle::FormatID::R8_SINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8_SINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLbyte, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R8I;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8_SINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8_SINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLbyte, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8_SNORM:
- intendedGLFormat = GL_R8_SNORM;
- actualImageFormatID = angle::FormatID::R8_SNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8_SNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLbyte, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R8_SNORM;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8_SNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8_SNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLbyte, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8_SSCALED:
- intendedGLFormat = GL_R8_SSCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R8_SSCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_R8_SSCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8_SSCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R8_SSCALED, false, CopyNativeVertexData<GLbyte, 1, 1, 0>,
@@ -2227,39 +2227,39 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R8_UINT:
- intendedGLFormat = GL_R8UI;
- actualImageFormatID = angle::FormatID::R8_UINT;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R8UI;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8_UINT;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8_UNORM:
- intendedGLFormat = GL_R8;
- actualImageFormatID = angle::FormatID::R8_UNORM;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8_UNORM;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_R8;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8_UNORM;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8_UNORM;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8_UNORM_SRGB:
- intendedGLFormat = GL_SR8_EXT;
- actualImageFormatID = angle::FormatID::R8_UNORM_SRGB;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R8_UNORM_SRGB;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyNativeVertexData<GLubyte, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_SR8_EXT;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8_UNORM_SRGB;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R8_UNORM_SRGB;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyNativeVertexData<GLubyte, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::R8_USCALED:
- intendedGLFormat = GL_R8_USCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::R8_USCALED;
- imageInitializerFunction = nullptr;
+ mIntendedGLFormat = GL_R8_USCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R8_USCALED;
+ mImageInitializerFunction = nullptr;
{
static constexpr BufferFormatInitInfo kInfo[] = {
{angle::FormatID::R8_USCALED, false, CopyNativeVertexData<GLubyte, 1, 1, 0>,
@@ -2271,17 +2271,17 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
break;
case angle::FormatID::R9G9B9E5_SHAREDEXP:
- intendedGLFormat = GL_RGB9_E5;
- actualImageFormatID = angle::FormatID::R9G9B9E5_SHAREDEXP;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R9G9B9E5_SHAREDEXP;
- vkBufferFormatIsPacked = true;
- vertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
- vertexLoadRequiresConversion = false;
+ mIntendedGLFormat = GL_RGB9_E5;
+ mActualSampleOnlyImageFormatID = angle::FormatID::R9G9B9E5_SHAREDEXP;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R9G9B9E5_SHAREDEXP;
+ mVkBufferFormatIsPacked = true;
+ mVertexLoadFunction = CopyNativeVertexData<GLuint, 1, 1, 0>;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::S8_UINT:
- intendedGLFormat = GL_STENCIL_INDEX8;
+ mIntendedGLFormat = GL_STENCIL_INDEX8;
{
static constexpr ImageFormatInitInfo kInfo[] = {
{angle::FormatID::S8_UINT, nullptr},
@@ -2290,70 +2290,70 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
{angle::FormatID::S8_UINT, nullptr}};
initImageFallback(renderer, kInfo, ArraySize(kInfo));
}
- actualBufferFormatID = angle::FormatID::S8_UINT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = nullptr;
- vertexLoadRequiresConversion = false;
+ mActualBufferFormatID = angle::FormatID::S8_UINT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = nullptr;
+ mVertexLoadRequiresConversion = false;
break;
case angle::FormatID::X2R10G10B10_SINT_VERTEX:
- intendedGLFormat = GL_X2_RGB10_SINT_ANGLEX;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<true, false, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_X2_RGB10_SINT_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<true, false, true>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::X2R10G10B10_SNORM_VERTEX:
- intendedGLFormat = GL_X2_RGB10_SNORM_ANGLEX;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<true, true, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_X2_RGB10_SNORM_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<true, true, true>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::X2R10G10B10_SSCALED_VERTEX:
- intendedGLFormat = GL_X2_RGB10_SSCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<true, false, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_X2_RGB10_SSCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<true, false, true>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::X2R10G10B10_UINT_VERTEX:
- intendedGLFormat = GL_X2_RGB10_UINT_ANGLEX;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<false, false, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_X2_RGB10_UINT_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<false, false, true>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::X2R10G10B10_UNORM_VERTEX:
- intendedGLFormat = GL_X2_RGB10_UNORM_ANGLEX;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<false, true, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_X2_RGB10_UNORM_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<false, true, true>;
+ mVertexLoadRequiresConversion = true;
break;
case angle::FormatID::X2R10G10B10_USCALED_VERTEX:
- intendedGLFormat = GL_X2_RGB10_USCALED_ANGLEX;
- actualImageFormatID = angle::FormatID::NONE;
- imageInitializerFunction = nullptr;
- actualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
- vkBufferFormatIsPacked = false;
- vertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<false, false, true>;
- vertexLoadRequiresConversion = true;
+ mIntendedGLFormat = GL_X2_RGB10_USCALED_ANGLEX;
+ mActualSampleOnlyImageFormatID = angle::FormatID::NONE;
+ mImageInitializerFunction = nullptr;
+ mActualBufferFormatID = angle::FormatID::R16G16B16A16_FLOAT;
+ mVkBufferFormatIsPacked = false;
+ mVertexLoadFunction = CopyXYZ10ToXYZWFloatVertexData<false, false, true>;
+ mVertexLoadRequiresConversion = true;
break;
default:
diff --git a/src/libANGLE/renderer/vulkan/vk_format_utils.cpp b/src/libANGLE/renderer/vulkan/vk_format_utils.cpp
index 4c5a63466..4d8be4aa8 100644
--- a/src/libANGLE/renderer/vulkan/vk_format_utils.cpp
+++ b/src/libANGLE/renderer/vulkan/vk_format_utils.cpp
@@ -121,22 +121,22 @@ namespace vk
{
// Format implementation.
Format::Format()
- : intendedFormatID(angle::FormatID::NONE),
- intendedGLFormat(GL_NONE),
- actualImageFormatID(angle::FormatID::NONE),
- actualRenderableImageFormatID(angle::FormatID::NONE),
- actualBufferFormatID(angle::FormatID::NONE),
- actualCompressedBufferFormatID(angle::FormatID::NONE),
- imageInitializerFunction(nullptr),
- textureLoadFunctions(),
- renderableTextureLoadFunctions(),
- vertexLoadFunction(nullptr),
- compressedVertexLoadFunction(nullptr),
- vertexLoadRequiresConversion(false),
- compressedVertexLoadRequiresConversion(false),
- vkBufferFormatIsPacked(false),
- vkFormatIsInt(false),
- vkFormatIsUnsigned(false)
+ : mIntendedFormatID(angle::FormatID::NONE),
+ mIntendedGLFormat(GL_NONE),
+ mActualSampleOnlyImageFormatID(angle::FormatID::NONE),
+ mActualRenderableImageFormatID(angle::FormatID::NONE),
+ mActualBufferFormatID(angle::FormatID::NONE),
+ mActualCompressedBufferFormatID(angle::FormatID::NONE),
+ mImageInitializerFunction(nullptr),
+ mTextureLoadFunctions(),
+ mRenderableTextureLoadFunctions(),
+ mVertexLoadFunction(nullptr),
+ mCompressedVertexLoadFunction(nullptr),
+ mVertexLoadRequiresConversion(false),
+ mCompressedVertexLoadRequiresConversion(false),
+ mVkBufferFormatIsPacked(false),
+ mVkFormatIsInt(false),
+ mVkFormatIsUnsigned(false)
{}
void Format::initImageFallback(RendererVk *renderer, const ImageFormatInitInfo *info, int numInfo)
@@ -154,8 +154,8 @@ void Format::initImageFallback(RendererVk *renderer, const ImageFormatInitInfo *
}
int i = FindSupportedFormat(renderer, info, skip, static_cast<uint32_t>(numInfo), testFunction);
- actualImageFormatID = info[i].format;
- imageInitializerFunction = info[i].initializer;
+ mActualSampleOnlyImageFormatID = info[i].format;
+ mImageInitializerFunction = info[i].initializer;
// Set renderable format.
if (testFunction != HasNonFilterableTextureFormatSupport && !format.isSnorm() &&
@@ -166,7 +166,7 @@ void Format::initImageFallback(RendererVk *renderer, const ImageFormatInitInfo *
// Compressed textures also need to perform this check.
testFunction = HasFullTextureFormatSupport;
i = FindSupportedFormat(renderer, info, skip, static_cast<uint32_t>(numInfo), testFunction);
- actualRenderableImageFormatID = info[i].format;
+ mActualRenderableImageFormatID = info[i].format;
}
}
@@ -180,10 +180,10 @@ void Format::initBufferFallback(RendererVk *renderer,
int i = FindSupportedFormat(renderer, info, skip, compressedStartIndex,
HasFullBufferFormatSupport);
- actualBufferFormatID = info[i].format;
- vkBufferFormatIsPacked = info[i].vkFormatIsPacked;
- vertexLoadFunction = info[i].vertexLoadFunction;
- vertexLoadRequiresConversion = info[i].vertexLoadRequiresConversion;
+ mActualBufferFormatID = info[i].format;
+ mVkBufferFormatIsPacked = info[i].vkFormatIsPacked;
+ mVertexLoadFunction = info[i].vertexLoadFunction;
+ mVertexLoadRequiresConversion = info[i].vertexLoadRequiresConversion;
}
if (renderer->getFeatures().compressVertexData.enabled && compressedStartIndex < numInfo)
@@ -191,13 +191,20 @@ void Format::initBufferFallback(RendererVk *renderer,
int i = FindSupportedFormat(renderer, info, compressedStartIndex, numInfo,
HasFullBufferFormatSupport);
- actualCompressedBufferFormatID = info[i].format;
- vkCompressedBufferFormatIsPacked = info[i].vkFormatIsPacked;
- compressedVertexLoadFunction = info[i].vertexLoadFunction;
- compressedVertexLoadRequiresConversion = info[i].vertexLoadRequiresConversion;
+ mActualCompressedBufferFormatID = info[i].format;
+ mVkCompressedBufferFormatIsPacked = info[i].vkFormatIsPacked;
+ mCompressedVertexLoadFunction = info[i].vertexLoadFunction;
+ mCompressedVertexLoadRequiresConversion = info[i].vertexLoadRequiresConversion;
}
}
+size_t Format::getVertexInputAlignment(bool compressed) const
+{
+ const angle::Format &bufferFormat = getActualBufferFormat(compressed);
+ size_t pixelBytes = bufferFormat.pixelBytes;
+ return mVkBufferFormatIsPacked ? pixelBytes : (pixelBytes / bufferFormat.channelCount);
+}
+
bool HasEmulatedImageChannels(const angle::Format &intendedFormat,
const angle::Format &actualFormat)
{
@@ -239,14 +246,14 @@ void FormatTable::initialize(RendererVk *renderer,
const angle::Format &intendedAngleFormat = angle::Format::Get(intendedFormatID);
format.initialize(renderer, intendedAngleFormat);
- format.intendedFormatID = intendedFormatID;
+ format.mIntendedFormatID = intendedFormatID;
- if (format.actualRenderableImageFormatID == angle::FormatID::NONE)
+ if (format.mActualRenderableImageFormatID == angle::FormatID::NONE)
{
// If renderable format was not set, it means there is no fallback format for
// renderable. We populate this the same formatID as sampleOnly formatID so that
// getActualFormatID() will be simpler.
- format.actualRenderableImageFormatID = format.actualImageFormatID;
+ format.mActualRenderableImageFormatID = format.mActualSampleOnlyImageFormatID;
}
if (!format.valid())
@@ -255,35 +262,35 @@ void FormatTable::initialize(RendererVk *renderer,
}
gl::TextureCaps textureCaps;
- FillTextureFormatCaps(renderer, format.actualImageFormatID, &textureCaps);
+ FillTextureFormatCaps(renderer, format.mActualSampleOnlyImageFormatID, &textureCaps);
if (textureCaps.texturable)
{
- format.textureLoadFunctions =
- GetLoadFunctionsMap(format.intendedGLFormat, format.actualImageFormatID);
- format.textureBorderLoadFunctions = GetLoadTextureBorderFunctionsMap(
- format.intendedGLFormat, format.actualImageFormatID);
+ format.mTextureLoadFunctions = GetLoadFunctionsMap(
+ format.mIntendedGLFormat, format.mActualSampleOnlyImageFormatID);
+ format.mTextureBorderLoadFunctions = GetLoadTextureBorderFunctionsMap(
+ format.mIntendedGLFormat, format.mActualSampleOnlyImageFormatID);
}
- if (format.actualRenderableImageFormatID == format.actualImageFormatID)
+ if (format.mActualRenderableImageFormatID == format.mActualSampleOnlyImageFormatID)
{
outTextureCapsMap->set(intendedFormatID, textureCaps);
- format.renderableTextureLoadFunctions = format.textureLoadFunctions;
+ format.mRenderableTextureLoadFunctions = format.mTextureLoadFunctions;
}
else
{
- FillTextureFormatCaps(renderer, format.actualRenderableImageFormatID, &textureCaps);
+ FillTextureFormatCaps(renderer, format.mActualRenderableImageFormatID, &textureCaps);
outTextureCapsMap->set(intendedFormatID, textureCaps);
if (textureCaps.texturable)
{
- format.renderableTextureLoadFunctions = GetLoadFunctionsMap(
- format.intendedGLFormat, format.actualRenderableImageFormatID);
+ format.mRenderableTextureLoadFunctions = GetLoadFunctionsMap(
+ format.mIntendedGLFormat, format.mActualRenderableImageFormatID);
}
}
if (intendedAngleFormat.isBlock)
{
- outCompressedTextureFormats->push_back(format.intendedGLFormat);
+ outCompressedTextureFormats->push_back(format.mIntendedGLFormat);
}
}
}
@@ -390,13 +397,6 @@ bool HasNonRenderableTextureFormatSupport(RendererVk *renderer, angle::FormatID
renderer->hasImageFormatFeatureBits(formatID, kBitsDepth);
}
-size_t GetVertexInputAlignment(const vk::Format &format, bool compressed)
-{
- const angle::Format &bufferFormat = format.actualBufferFormat(compressed);
- size_t pixelBytes = bufferFormat.pixelBytes;
- return format.vkBufferFormatIsPacked ? pixelBytes : (pixelBytes / bufferFormat.channelCount);
-}
-
GLenum GetSwizzleStateComponent(const gl::SwizzleState &swizzleState, GLenum component)
{
switch (component)
diff --git a/src/libANGLE/renderer/vulkan/vk_format_utils.h b/src/libANGLE/renderer/vulkan/vk_format_utils.h
index 442635460..23182a33f 100644
--- a/src/libANGLE/renderer/vulkan/vk_format_utils.h
+++ b/src/libANGLE/renderer/vulkan/vk_format_utils.h
@@ -68,16 +68,18 @@ bool HasEmulatedImageFormat(angle::FormatID intendedFormatID, angle::FormatID ac
// Describes a Vulkan format. For more information on formats in the Vulkan back-end please see
// https://chromium.googlesource.com/angle/angle/+/main/src/libANGLE/renderer/vulkan/doc/FormatTablesAndEmulation.md
-struct Format final : private angle::NonCopyable
+class Format final : private angle::NonCopyable
{
+ public:
Format();
- bool valid() const { return intendedGLFormat != 0; }
+ bool valid() const { return mIntendedGLFormat != 0; }
// The intended format is the front-end format. For Textures this usually correponds to a
// GLenum in the headers. Buffer formats don't always have a corresponding GLenum type.
// Some Surface formats and unsized types also don't have a corresponding GLenum.
- const angle::Format &intendedFormat() const { return angle::Format::Get(intendedFormatID); }
+ angle::FormatID getIntendedFormatID() const { return mIntendedFormatID; }
+ const angle::Format &getIntendedFormat() const { return angle::Format::Get(mIntendedFormatID); }
// The actual Image format is used to implement the front-end format for Texture/Renderbuffers.
const angle::Format &getActualImageFormat(ImageAccess access) const
@@ -87,21 +89,21 @@ struct Format final : private angle::NonCopyable
angle::FormatID getActualRenderableImageFormatID() const
{
- return actualRenderableImageFormatID;
+ return mActualRenderableImageFormatID;
}
const angle::Format &getActualRenderableImageFormat() const
{
- return angle::Format::Get(actualRenderableImageFormatID);
+ return angle::Format::Get(mActualRenderableImageFormatID);
}
VkFormat getActualRenderableImageVkFormat() const
{
- return GetVkFormatFromFormatID(actualRenderableImageFormatID);
+ return GetVkFormatFromFormatID(mActualRenderableImageFormatID);
}
angle::FormatID getActualImageFormatID(ImageAccess access) const
{
- return ImageAccess::Renderable == access ? actualRenderableImageFormatID
- : actualImageFormatID;
+ return ImageAccess::Renderable == access ? mActualRenderableImageFormatID
+ : mActualSampleOnlyImageFormatID;
}
VkFormat getActualImageVkFormat(ImageAccess access) const
{
@@ -110,48 +112,66 @@ struct Format final : private angle::NonCopyable
LoadImageFunctionInfo getTextureLoadFunction(ImageAccess access, GLenum type) const
{
- return ImageAccess::Renderable == access ? renderableTextureLoadFunctions(type)
- : textureLoadFunctions(type);
+ return ImageAccess::Renderable == access ? mRenderableTextureLoadFunctions(type)
+ : mTextureLoadFunctions(type);
}
+ LoadTextureBorderFunctionInfo getTextureBorderLoadFunctions() const
+ {
+ return mTextureBorderLoadFunctions();
+ }
// The actual Buffer format is used to implement the front-end format for Buffers. This format
// is used by vertex buffers as well as texture buffers. Note that all formats required for
// GL_EXT_texture_buffer have mandatory support for vertex buffers in Vulkan, so they won't be
// using an emulated format.
- const angle::Format &actualBufferFormat(bool compressed) const
+ const angle::Format &getActualBufferFormat(bool compressed) const
{
- return angle::Format::Get(compressed ? actualCompressedBufferFormatID
- : actualBufferFormatID);
+ return angle::Format::Get(compressed ? mActualCompressedBufferFormatID
+ : mActualBufferFormatID);
}
- VkFormat actualBufferVkFormat(bool compressed) const
+ VkFormat getActualBufferVkFormat(bool compressed) const
{
- return GetVkFormatFromFormatID(compressed ? actualCompressedBufferFormatID
- : actualBufferFormatID);
+ return GetVkFormatFromFormatID(compressed ? mActualCompressedBufferFormatID
+ : mActualBufferFormatID);
}
VertexCopyFunction getVertexLoadFunction(bool compressed) const
{
- return compressed ? compressedVertexLoadFunction : vertexLoadFunction;
+ return compressed ? mCompressedVertexLoadFunction : mVertexLoadFunction;
}
bool getVertexLoadRequiresConversion(bool compressed) const
{
- return compressed ? compressedVertexLoadRequiresConversion : vertexLoadRequiresConversion;
+ return compressed ? mCompressedVertexLoadRequiresConversion : mVertexLoadRequiresConversion;
}
// |intendedGLFormat| always correponds to a valid GLenum type. For types that don't have a
// corresponding GLenum we do our best to specify a GLenum that is "close".
const gl::InternalFormat &getInternalFormatInfo(GLenum type) const
{
- return gl::GetInternalFormatInfo(intendedGLFormat, type);
+ return gl::GetInternalFormatInfo(mIntendedGLFormat, type);
}
bool hasRenderableImageFallbackFormat() const
{
- return actualImageFormatID != actualRenderableImageFormatID;
+ return mActualSampleOnlyImageFormatID != mActualRenderableImageFormatID;
}
+ bool canCompressBufferData() const
+ {
+ return mActualCompressedBufferFormatID != angle::FormatID::NONE &&
+ mActualBufferFormatID != mActualCompressedBufferFormatID;
+ }
+
+ // 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(bool compressed) const;
+
+ private:
+ friend class FormatTable;
+
// This is an auto-generated method in vk_format_table_autogen.cpp.
void initialize(RendererVk *renderer, const angle::Format &intendedAngleFormat);
@@ -162,26 +182,26 @@ struct Format final : private angle::NonCopyable
int numInfo,
int compressedStartIndex);
- angle::FormatID intendedFormatID;
- GLenum intendedGLFormat;
- angle::FormatID actualImageFormatID;
- angle::FormatID actualRenderableImageFormatID;
- angle::FormatID actualBufferFormatID;
- angle::FormatID actualCompressedBufferFormatID;
-
- InitializeTextureDataFunction imageInitializerFunction;
- LoadFunctionMap textureLoadFunctions;
- LoadTextureBorderFunctionMap textureBorderLoadFunctions;
- LoadFunctionMap renderableTextureLoadFunctions;
- VertexCopyFunction vertexLoadFunction;
- VertexCopyFunction compressedVertexLoadFunction;
-
- bool vertexLoadRequiresConversion;
- bool compressedVertexLoadRequiresConversion;
- bool vkBufferFormatIsPacked;
- bool vkCompressedBufferFormatIsPacked;
- bool vkFormatIsInt;
- bool vkFormatIsUnsigned;
+ angle::FormatID mIntendedFormatID;
+ GLenum mIntendedGLFormat;
+ angle::FormatID mActualSampleOnlyImageFormatID;
+ angle::FormatID mActualRenderableImageFormatID;
+ angle::FormatID mActualBufferFormatID;
+ angle::FormatID mActualCompressedBufferFormatID;
+
+ InitializeTextureDataFunction mImageInitializerFunction;
+ LoadFunctionMap mTextureLoadFunctions;
+ LoadTextureBorderFunctionMap mTextureBorderLoadFunctions;
+ LoadFunctionMap mRenderableTextureLoadFunctions;
+ VertexCopyFunction mVertexLoadFunction;
+ VertexCopyFunction mCompressedVertexLoadFunction;
+
+ bool mVertexLoadRequiresConversion;
+ bool mCompressedVertexLoadRequiresConversion;
+ bool mVkBufferFormatIsPacked;
+ bool mVkCompressedBufferFormatIsPacked;
+ bool mVkFormatIsInt;
+ bool mVkFormatIsUnsigned;
};
bool operator==(const Format &lhs, const Format &rhs);
@@ -229,10 +249,6 @@ bool HasFullTextureFormatSupport(RendererVk *renderer, angle::FormatID formatID)
// Checks if a Vulkan format supports all the features except rendering.
bool HasNonRenderableTextureFormatSupport(RendererVk *renderer, angle::FormatID formatID);
-// 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, bool compressed);
-
// Get the swizzle state based on format's requirements and emulations.
gl::SwizzleState GetFormatSwizzle(const ContextVk *contextVk,
const angle::Format &angleFormat,
diff --git a/src/libANGLE/renderer/vulkan/vk_helpers.cpp b/src/libANGLE/renderer/vulkan/vk_helpers.cpp
index f417390d1..fedf1422e 100644
--- a/src/libANGLE/renderer/vulkan/vk_helpers.cpp
+++ b/src/libANGLE/renderer/vulkan/vk_helpers.cpp
@@ -3955,7 +3955,7 @@ angle::Result ImageHelper::init(Context *context,
bool isRobustResourceInitEnabled,
bool hasProtectedContent)
{
- return initExternal(context, textureType, extents, format.intendedFormatID,
+ return initExternal(context, textureType, extents, format.getIntendedFormatID(),
format.getActualRenderableImageFormatID(), samples, usage,
kVkImageCreateFlagsNone, ImageLayout::Undefined, nullptr, firstLevel,
mipLevels, layerCount, isRobustResourceInitEnabled, nullptr,
@@ -3975,7 +3975,7 @@ angle::Result ImageHelper::initMSAASwapchain(Context *context,
bool isRobustResourceInitEnabled,
bool hasProtectedContent)
{
- ANGLE_TRY(initExternal(context, textureType, extents, format.intendedFormatID,
+ ANGLE_TRY(initExternal(context, textureType, extents, format.getIntendedFormatID(),
format.getActualRenderableImageFormatID(), samples, usage,
kVkImageCreateFlagsNone, ImageLayout::Undefined, nullptr, firstLevel,
mipLevels, layerCount, isRobustResourceInitEnabled, nullptr,
@@ -4532,7 +4532,7 @@ void ImageHelper::init2DWeakReference(Context *context,
gl_vk::GetExtent(glExtents, &mExtents);
mRotatedAspectRatio = rotatedAspectRatio;
- mIntendedFormatID = format.intendedFormatID;
+ mIntendedFormatID = format.getIntendedFormatID();
mActualFormatID = format.getActualRenderableImageFormatID();
mSamples = std::max(samples, 1);
mImageSerial = context->getRenderer()->getResourceSerialFactory().generateImageSerial();
@@ -8000,7 +8000,7 @@ angle::Result BufferViewHelper::getView(ContextVk *contextVk,
{
ASSERT(format.valid());
- VkFormat viewVkFormat = format.actualBufferVkFormat(false);
+ VkFormat viewVkFormat = format.getActualBufferVkFormat(false);
auto iter = mViews.find(viewVkFormat);
if (iter != mViews.end())
@@ -8012,7 +8012,7 @@ angle::Result BufferViewHelper::getView(ContextVk *contextVk,
// If the size is not a multiple of pixelBytes, remove the extra bytes. The last element cannot
// be read anyway, and this is a requirement of Vulkan (for size to be a multiple of format
// texel block size).
- const angle::Format &bufferFormat = format.actualBufferFormat(false);
+ const angle::Format &bufferFormat = format.getActualBufferFormat(false);
const GLuint pixelBytes = bufferFormat.pixelBytes;
VkDeviceSize size = mSize - mSize % pixelBytes;
diff --git a/src/libANGLE/renderer/vulkan/vk_utils.h b/src/libANGLE/renderer/vulkan/vk_utils.h
index 2a022cc88..3e71fda5a 100644
--- a/src/libANGLE/renderer/vulkan/vk_utils.h
+++ b/src/libANGLE/renderer/vulkan/vk_utils.h
@@ -112,8 +112,6 @@ constexpr uint32_t kAttributeOffsetMaxBits = 15;
namespace vk
{
-struct Format;
-
// A packed attachment index interface with vulkan API
class PackedAttachmentIndex final
{