Commit f83a28a6 by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Shader path for framebuffer-to-texture copy

Part 1 in a series of changes to perform image copies on the GPU. Bug: angleproject:2958 Change-Id: I6264a880865c4738c0866f2dc71af63425fc4118 Reviewed-on: https://chromium-review.googlesource.com/c/1370724 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent d7969cdd
......@@ -32,6 +32,7 @@ struct Format final : private angle::NonCopyable
GLuint greenBits,
GLuint blueBits,
GLuint alphaBits,
GLuint luminanceBits,
GLuint depthBits,
GLuint stencilBits,
GLuint pixelBytes,
......@@ -42,8 +43,15 @@ struct Format final : private angle::NonCopyable
static FormatID InternalFormatToID(GLenum internalFormat);
constexpr bool hasDepthOrStencilBits() const;
constexpr bool isLUMA() const;
constexpr GLuint channelCount() const;
constexpr bool isInt() const;
constexpr bool isUint() const;
constexpr bool isSnorm() const;
constexpr bool isUnorm() const;
constexpr bool isFloat() const;
bool operator==(const Format &other) const { return this->id == other.id; }
FormatID id;
......@@ -70,6 +78,7 @@ struct Format final : private angle::NonCopyable
GLuint greenBits;
GLuint blueBits;
GLuint alphaBits;
GLuint luminanceBits;
GLuint depthBits;
GLuint stencilBits;
......@@ -91,6 +100,7 @@ constexpr Format::Format(FormatID id,
GLuint greenBits,
GLuint blueBits,
GLuint alphaBits,
GLuint luminanceBits,
GLuint depthBits,
GLuint stencilBits,
GLuint pixelBytes,
......@@ -108,6 +118,7 @@ constexpr Format::Format(FormatID id,
greenBits(greenBits),
blueBits(blueBits),
alphaBits(alphaBits),
luminanceBits(luminanceBits),
depthBits(depthBits),
stencilBits(stencilBits),
pixelBytes(pixelBytes),
......@@ -120,11 +131,44 @@ constexpr bool Format::hasDepthOrStencilBits() const
return depthBits > 0 || stencilBits > 0;
}
constexpr bool Format::isLUMA() const
{
// There's no format with G or B without R
ASSERT(redBits > 0 || (greenBits == 0 && blueBits == 0));
return redBits == 0 && (luminanceBits > 0 || alphaBits > 0);
}
constexpr GLuint Format::channelCount() const
{
return (redBits > 0) + (greenBits > 0) + (blueBits > 0) + (alphaBits > 0) + (depthBits > 0) +
(stencilBits > 0);
return (redBits > 0) + (greenBits > 0) + (blueBits > 0) + (alphaBits > 0) +
(luminanceBits > 0) + (depthBits > 0) + (stencilBits > 0);
}
constexpr bool Format::isInt() const
{
return componentType == GL_INT;
}
constexpr bool Format::isUint() const
{
return componentType == GL_UNSIGNED_INT;
}
constexpr bool Format::isSnorm() const
{
return componentType == GL_SIGNED_NORMALIZED;
}
constexpr bool Format::isUnorm() const
{
return componentType == GL_UNSIGNED_NORMALIZED;
}
constexpr bool Format::isFloat() const
{
return componentType == GL_FLOAT;
}
} // namespace angle
#include "libANGLE/renderer/FormatID_autogen.inc"
......
......@@ -63,7 +63,7 @@ static constexpr rx::FastCopyFunctionMap NoCopyFunctions;
constexpr Format g_formatInfoTable[] = {{
// clang-format off
{{ FormatID::NONE, GL_NONE, GL_NONE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_NONE, 0, 0, 0, 0, 0, 0, 0, false, false }},
{{ FormatID::NONE, GL_NONE, GL_NONE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_NONE, 0, 0, 0, 0, 0, 0, 0, 0, false, false }},
{angle_format_info_cases} // clang-format on
}};
......@@ -170,7 +170,7 @@ def get_color_write_function(angle_format):
return 'WriteColor<' + channel_struct + ', '+ write_component_type + '>'
format_entry_template = """ {{ FormatID::{id}, {glInternalFormat}, {fboImplementationInternalFormat}, {mipGenerationFunction}, {fastCopyFunctions}, {colorReadFunction}, {colorWriteFunction}, {namedComponentType}, {R}, {G}, {B}, {A}, {D}, {S}, {pixelBytes}, {isBlock}, {isFixed} }},
format_entry_template = """ {{ FormatID::{id}, {glInternalFormat}, {fboImplementationInternalFormat}, {mipGenerationFunction}, {fastCopyFunctions}, {colorReadFunction}, {colorWriteFunction}, {namedComponentType}, {R}, {G}, {B}, {A}, {L}, {D}, {S}, {pixelBytes}, {isBlock}, {isFixed} }},
"""
def get_named_component_type(component_type):
......
......@@ -206,7 +206,7 @@ class RecordableGraphResource : public CommandGraphResource
angle::Result recordCommands(Context *context, CommandBuffer **commandBufferOut);
// Begins a command buffer on the current graph node for in-RenderPass rendering.
// Currently only called from FramebufferVk::startNewRenderPass.
// Called from FramebufferVk::startNewRenderPass and UtilsVk functions.
angle::Result beginRenderPass(Context *context,
const Framebuffer &framebuffer,
const gl::Rectangle &renderArea,
......
......@@ -401,18 +401,9 @@ angle::Result ContextVk::handleDirtyTextures(const gl::Context *context,
{
ANGLE_TRY(updateActiveTextures(context));
// TODO(jmadill): Should probably merge this for loop with programVk's descriptor update.
for (size_t textureIndex : mProgram->getState().getActiveSamplersMask())
{
// Ensure any writes to the textures are flushed before we read from them.
TextureVk *textureVk = mActiveTextures[textureIndex];
ANGLE_TRY(textureVk->ensureImageInitialized(this));
textureVk->getImage().addReadDependency(mDrawFramebuffer->getFramebuffer());
}
if (mProgram->hasTextures())
{
ANGLE_TRY(mProgram->updateTexturesDescriptorSet(this));
ANGLE_TRY(mProgram->updateTexturesDescriptorSet(this, mDrawFramebuffer->getFramebuffer()));
}
return angle::Result::Continue;
}
......
......@@ -856,7 +856,7 @@ angle::Result FramebufferVk::getFramebuffer(ContextVk *contextVk, vk::Framebuffe
{
RenderTargetVk *colorRenderTarget = colorRenderTargets[colorIndex];
ASSERT(colorRenderTarget);
attachments.push_back(colorRenderTarget->getImageView()->getHandle());
attachments.push_back(colorRenderTarget->getDrawImageView()->getHandle());
ASSERT(attachmentsSize.empty() || attachmentsSize == colorRenderTarget->getImageExtents());
attachmentsSize = colorRenderTarget->getImageExtents();
......@@ -865,7 +865,7 @@ angle::Result FramebufferVk::getFramebuffer(ContextVk *contextVk, vk::Framebuffe
RenderTargetVk *depthStencilRenderTarget = mRenderTargetCache.getDepthStencil();
if (depthStencilRenderTarget)
{
attachments.push_back(depthStencilRenderTarget->getImageView()->getHandle());
attachments.push_back(depthStencilRenderTarget->getDrawImageView()->getHandle());
ASSERT(attachmentsSize.empty() ||
attachmentsSize == depthStencilRenderTarget->getImageExtents());
......
......@@ -861,7 +861,8 @@ angle::Result ProgramVk::updateDefaultUniformsDescriptorSet(ContextVk *contextVk
return angle::Result::Continue;
}
angle::Result ProgramVk::updateTexturesDescriptorSet(ContextVk *contextVk)
angle::Result ProgramVk::updateTexturesDescriptorSet(ContextVk *contextVk,
vk::FramebufferHelper *framebuffer)
{
ASSERT(hasTextures());
ANGLE_TRY(allocateDescriptorSet(contextVk, kTextureDescriptorSetIndex));
......@@ -887,12 +888,29 @@ angle::Result ProgramVk::updateTexturesDescriptorSet(ContextVk *contextVk)
{
GLuint textureUnit = samplerBinding.boundTextureUnits[arrayElement];
TextureVk *textureVk = activeTextures[textureUnit];
const vk::ImageHelper &image = textureVk->getImage();
// Ensure any writes to the textures are flushed before we read from them.
ANGLE_TRY(textureVk->ensureImageInitialized(contextVk));
vk::ImageHelper &image = textureVk->getImage();
// Ensure the image is in read-only layout
if (image.getCurrentLayout() != VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL)
{
vk::CommandBuffer *srcLayoutChange;
ANGLE_TRY(image.recordCommands(contextVk, &srcLayoutChange));
image.changeLayoutWithStages(
VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
srcLayoutChange);
}
image.addReadDependency(framebuffer);
VkDescriptorImageInfo &imageInfo = descriptorImageInfo[writeCount];
imageInfo.sampler = textureVk->getSampler().getHandle();
imageInfo.imageView = textureVk->getImageView().getHandle();
imageInfo.imageView = textureVk->getReadImageView().getHandle();
imageInfo.imageLayout = image.getCurrentLayout();
VkWriteDescriptorSet &writeInfo = writeDescriptorInfo[writeCount];
......
......@@ -99,7 +99,8 @@ class ProgramVk : public ProgramImpl
// Also initializes the pipeline layout, descriptor set layouts, and used descriptor ranges.
angle::Result updateUniforms(ContextVk *contextVk);
angle::Result updateTexturesDescriptorSet(ContextVk *contextVk);
angle::Result updateTexturesDescriptorSet(ContextVk *contextVk,
vk::FramebufferHelper *framebuffer);
angle::Result updateDescriptorSets(ContextVk *contextVk, vk::CommandBuffer *commandBuffer);
......
......@@ -67,18 +67,29 @@ void RenderTargetVk::onDepthStencilDraw(vk::FramebufferHelper *framebufferVk,
mImage->addWriteDependency(framebufferVk);
}
vk::ImageHelper &RenderTargetVk::getImage()
{
ASSERT(mImage && mImage->valid());
return *mImage;
}
const vk::ImageHelper &RenderTargetVk::getImage() const
{
ASSERT(mImage && mImage->valid());
return *mImage;
}
vk::ImageView *RenderTargetVk::getImageView() const
vk::ImageView *RenderTargetVk::getDrawImageView() const
{
ASSERT(mImageView && mImageView->valid());
return mImageView;
}
vk::ImageView *RenderTargetVk::getReadImageView() const
{
return getDrawImageView();
}
const vk::Format &RenderTargetVk::getImageFormat() const
{
ASSERT(mImage && mImage->valid());
......
......@@ -30,7 +30,7 @@ class RenderPassDesc;
// This is a very light-weight class that does not own to the resources it points to.
// It's meant only to copy across some information from a FramebufferAttachment to the
// business rendering logic. It stores Images and ImageView by pointer for performance.
// business rendering logic. It stores Images and ImageViews by pointer for performance.
class RenderTargetVk final : public FramebufferAttachmentRenderTarget
{
public:
......@@ -48,6 +48,7 @@ class RenderTargetVk final : public FramebufferAttachmentRenderTarget
vk::CommandBuffer *commandBuffer,
vk::RenderPassDesc *renderPassDesc);
vk::ImageHelper &getImage();
const vk::ImageHelper &getImage() const;
// getImageForRead will also transition the resource to the given layout.
......@@ -55,7 +56,9 @@ class RenderTargetVk final : public FramebufferAttachmentRenderTarget
VkImageLayout layout,
vk::CommandBuffer *commandBuffer);
vk::ImageHelper *getImageForWrite(vk::RecordableGraphResource *writingResource) const;
vk::ImageView *getImageView() const;
vk::ImageView *getDrawImageView() const;
vk::ImageView *getReadImageView() const;
const vk::Format &getImageFormat() const;
const gl::Extents &getImageExtents() const;
......@@ -67,6 +70,8 @@ class RenderTargetVk final : public FramebufferAttachmentRenderTarget
private:
vk::ImageHelper *mImage;
// Note that the draw and read image views are the same, given the requirements of a render
// target.
vk::ImageView *mImageView;
size_t mLayerIndex;
};
......
......@@ -77,6 +77,8 @@ angle::Result RenderbufferVk::setStorage(const gl::Context *context,
VkImageAspectFlags aspect = vk::GetFormatAspectFlags(textureFormat);
// Note that LUMA textures are not color-renderable, so a read-view with swizzle is not
// needed.
ANGLE_TRY(mImage.initImageView(contextVk, gl::TextureType::_2D, aspect, gl::SwizzleState(),
&mImageView, 1));
......
......@@ -68,7 +68,7 @@ VkPresentModeKHR GetDesiredPresentMode(const std::vector<VkPresentModeKHR> &pres
constexpr VkImageUsageFlags kSurfaceVKImageUsageFlags =
VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
constexpr VkImageUsageFlags kSurfaceVKColorImageUsageFlags =
kSurfaceVKImageUsageFlags | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
kSurfaceVKImageUsageFlags | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT;
constexpr VkImageUsageFlags kSurfaceVKDepthStencilImageUsageFlags =
kSurfaceVKImageUsageFlags | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
......@@ -487,6 +487,7 @@ angle::Result WindowSurfaceVk::initializeImpl(DisplayVk *displayVk)
{
SwapchainImage &member = mSwapchainImages[imageIndex];
member.image.init2DWeakReference(swapchainImages[imageIndex], extents, format, 1);
ANGLE_TRY(member.image.initImageView(displayVk, gl::TextureType::_2D,
VK_IMAGE_ASPECT_COLOR_BIT, gl::SwizzleState(),
&member.imageView, 1));
......
......@@ -204,7 +204,11 @@ class TextureVk : public TextureImpl
return mImage;
}
const vk::ImageView &getImageView() const;
const vk::ImageView &getReadImageView() const;
angle::Result getLayerLevelDrawImageView(vk::Context *context,
size_t layer,
size_t level,
vk::ImageView **imageViewOut);
const vk::Sampler &getSampler() const;
angle::Result ensureImageInitialized(ContextVk *contextVk);
......@@ -240,6 +244,13 @@ class TextureVk : public TextureImpl
const gl::InternalFormat &internalFormat,
gl::Framebuffer *source);
angle::Result copySubImageImplWithDraw(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
const gl::Offset &srcOffset,
const gl::Extents &extents,
FramebufferVk *source);
angle::Result copySubTextureImpl(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
......@@ -260,13 +271,19 @@ class TextureVk : public TextureImpl
uint32_t getLevelCount() const;
angle::Result initCubeMapRenderTargets(ContextVk *contextVk);
angle::Result ensureImageInitializedImpl(ContextVk *contextVk,
const gl::Extents &baseLevelExtents,
uint32_t levelCount,
const vk::Format &format);
vk::ImageHelper mImage;
vk::ImageView mBaseLevelImageView;
vk::ImageView mMipmapImageView;
vk::ImageView mDrawBaseLevelImageView;
vk::ImageView mReadBaseLevelImageView;
vk::ImageView mReadMipmapImageView;
std::vector<std::vector<vk::ImageView>> mLayerLevelDrawImageViews;
vk::Sampler mSampler;
RenderTargetVk mRenderTarget;
std::vector<vk::ImageView> mCubeMapFaceImageViews;
std::vector<RenderTargetVk> mCubeMapRenderTargets;
PixelBuffer mPixelBuffer;
......
......@@ -68,6 +68,16 @@ class UtilsVk : angle::NonCopyable
const vk::RenderPassDesc *renderPassDesc;
};
struct CopyImageParameters
{
int srcOffset[2];
int srcExtents[2];
int destOffset[2];
int srcMip;
int srcHeight;
bool flipY;
};
angle::Result clearBuffer(vk::Context *context,
vk::BufferHelper *dest,
const ClearParameters &params);
......@@ -87,6 +97,13 @@ class UtilsVk : angle::NonCopyable
FramebufferVk *framebuffer,
const ClearImageParameters &params);
angle::Result copyImage(vk::Context *context,
vk::ImageHelper *dest,
vk::ImageView *destView,
vk::ImageHelper *src,
vk::ImageView *srcView,
const CopyImageParameters &params);
private:
struct BufferUtilsShaderParams
{
......@@ -121,20 +138,32 @@ class UtilsVk : angle::NonCopyable
VkClearColorValue clearValue = {};
};
struct ImageCopyShaderParams
{
// Structure matching PushConstants in ImageCopy.frag
uint32_t flipY = 0;
uint32_t destHasLuminance = 0;
uint32_t destIsAlpha = 0;
int32_t srcMip = 0;
int32_t srcOffset[2] = {};
int32_t destOffset[2] = {};
};
// Functions implemented by the class:
enum class Function
{
// Functions implemented in graphics
ImageClear = 0,
ImageCopy = 1,
// Functions implemented in compute
ComputeStartIndex = 1, // Special value to separate draw and dispatch functions.
BufferClear = 1,
BufferCopy = 2,
ConvertVertexBuffer = 3,
ComputeStartIndex = 2, // Special value to separate draw and dispatch functions.
BufferClear = 2,
BufferCopy = 3,
ConvertVertexBuffer = 4,
InvalidEnum = 4,
EnumCount = 4,
InvalidEnum = 5,
EnumCount = 5,
};
// Common function that creates the pipeline for the specified function, binds it and prepares
......@@ -170,6 +199,14 @@ class UtilsVk : angle::NonCopyable
angle::Result ensureBufferCopyResourcesInitialized(vk::Context *context);
angle::Result ensureConvertVertexResourcesInitialized(vk::Context *context);
angle::Result ensureImageClearResourcesInitialized(vk::Context *context);
angle::Result ensureImageCopyResourcesInitialized(vk::Context *context);
angle::Result startRenderPass(vk::Context *context,
vk::ImageHelper *image,
vk::ImageView *imageView,
const vk::RenderPassDesc &renderPassDesc,
const gl::Rectangle &renderArea,
vk::CommandBuffer **commandBufferOut);
angle::PackedEnumMap<Function, vk::DescriptorSetLayoutPointerArray> mDescriptorSetLayouts;
angle::PackedEnumMap<Function, vk::BindingPointer<vk::PipelineLayout>> mPipelineLayouts;
......@@ -183,6 +220,8 @@ class UtilsVk : angle::NonCopyable
mConvertVertexPrograms[vk::InternalShader::ConvertVertex_comp::kFlagsMask |
vk::InternalShader::ConvertVertex_comp::kConversionMask];
vk::ShaderProgramHelper mImageClearProgram;
vk::ShaderProgramHelper mImageCopyPrograms[vk::InternalShader::ImageCopy_frag::kSrcFormatMask |
vk::InternalShader::ImageCopy_frag::kDestFormatMask];
};
} // namespace rx
......
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000000[] = {
0x07230203,0x00010000,0x00080007,0x0000005c,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x0000005a,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002d,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000030,0x00637273,0x00050005,0x0000003c,
0x74736564,0x756c6156,0x00000065,0x00040005,0x0000005a,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000030,0x00000022,0x00000000,
0x00040047,0x00000030,0x00000021,0x00000000,0x00040047,0x0000005a,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040020,0x0000002c,
0x00000007,0x0000000b,0x00090019,0x0000002e,0x0000000a,0x00000001,0x00000000,0x00000000,
0x00000000,0x00000001,0x00000000,0x00040020,0x0000002f,0x00000000,0x0000002e,0x0004003b,
0x0000002f,0x00000030,0x00000000,0x0004002b,0x00000006,0x00000032,0x00000004,0x0004002b,
0x00000006,0x00000037,0x00000003,0x00040020,0x00000038,0x00000009,0x00000006,0x0004002b,
0x00000006,0x00000043,0x00000001,0x0004002b,0x00000006,0x0000004e,0x00000002,0x0004002b,
0x00000012,0x00000054,0x00000003,0x00040020,0x00000055,0x00000007,0x0000000a,0x00040020,
0x00000059,0x00000003,0x0000000b,0x0004003b,0x00000059,0x0000005a,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002c,
0x0000002d,0x00000007,0x0004003b,0x0000002c,0x0000003c,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002e,0x00000031,
0x00000030,0x00050041,0x00000017,0x00000033,0x00000015,0x00000032,0x0004003d,0x00000007,
0x00000034,0x00000033,0x0004003d,0x00000007,0x00000035,0x0000001b,0x00050080,0x00000007,
0x00000036,0x00000034,0x00000035,0x00050041,0x00000038,0x00000039,0x00000015,0x00000037,
0x0004003d,0x00000006,0x0000003a,0x00000039,0x0007005f,0x0000000b,0x0000003b,0x00000031,
0x00000036,0x00000002,0x0000003a,0x0003003e,0x0000002d,0x0000003b,0x0004003d,0x0000000b,
0x0000003d,0x0000002d,0x00050051,0x0000000a,0x0000003e,0x0000003d,0x00000000,0x00050051,
0x0000000a,0x0000003f,0x0000003d,0x00000001,0x00050051,0x0000000a,0x00000040,0x0000003d,
0x00000002,0x00050051,0x0000000a,0x00000041,0x0000003d,0x00000003,0x00070050,0x0000000b,
0x00000042,0x0000003e,0x0000003f,0x00000040,0x00000041,0x0003003e,0x0000003c,0x00000042,
0x00050041,0x0000001e,0x00000044,0x00000015,0x00000043,0x0004003d,0x00000012,0x00000045,
0x00000044,0x000500ab,0x00000021,0x00000046,0x00000045,0x00000022,0x000300f7,0x00000048,
0x00000000,0x000400fa,0x00000046,0x00000047,0x0000004d,0x000200f8,0x00000047,0x0004003d,
0x0000000b,0x00000049,0x0000003c,0x0007004f,0x0000000e,0x0000004a,0x00000049,0x00000049,
0x00000000,0x00000003,0x0004003d,0x0000000b,0x0000004b,0x0000003c,0x0009004f,0x0000000b,
0x0000004c,0x0000004b,0x0000004a,0x00000004,0x00000005,0x00000002,0x00000003,0x0003003e,
0x0000003c,0x0000004c,0x000200f9,0x00000048,0x000200f8,0x0000004d,0x00050041,0x0000001e,
0x0000004f,0x00000015,0x0000004e,0x0004003d,0x00000012,0x00000050,0x0000004f,0x000500ab,
0x00000021,0x00000051,0x00000050,0x00000022,0x000300f7,0x00000053,0x00000000,0x000400fa,
0x00000051,0x00000052,0x00000053,0x000200f8,0x00000052,0x00050041,0x00000055,0x00000056,
0x0000003c,0x00000054,0x0004003d,0x0000000a,0x00000057,0x00000056,0x00050041,0x00000055,
0x00000058,0x0000003c,0x00000022,0x0003003e,0x00000058,0x00000057,0x000200f9,0x00000053,
0x000200f8,0x00000053,0x000200f9,0x00000048,0x000200f8,0x00000048,0x0004003d,0x0000000b,
0x0000005b,0x0000003c,0x0003003e,0x0000005a,0x0000005b,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform texture2D src;
layout(location = 0)out vec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
vec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
vec4 destValue = vec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000001[] = {
0x07230203,0x00010000,0x00080007,0x0000005a,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000058,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003e,
0x74736564,0x756c6156,0x00000065,0x00040005,0x00000058,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x00000058,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000006,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000006,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x00040020,0x0000003d,0x00000007,0x0000000b,0x0004002b,
0x00000006,0x00000041,0x00000001,0x0004002b,0x00000006,0x0000004c,0x00000002,0x0004002b,
0x00000012,0x00000052,0x00000003,0x00040020,0x00000053,0x00000007,0x0000000a,0x00040020,
0x00000057,0x00000003,0x0000000b,0x0004003b,0x00000057,0x00000058,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000003d,0x0000003e,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x0000003f,0x0000002e,0x0004006f,0x0000000b,0x00000040,0x0000003f,0x0003003e,0x0000003e,
0x00000040,0x00050041,0x0000001e,0x00000042,0x00000015,0x00000041,0x0004003d,0x00000012,
0x00000043,0x00000042,0x000500ab,0x00000021,0x00000044,0x00000043,0x00000022,0x000300f7,
0x00000046,0x00000000,0x000400fa,0x00000044,0x00000045,0x0000004b,0x000200f8,0x00000045,
0x0004003d,0x0000000b,0x00000047,0x0000003e,0x0007004f,0x0000000e,0x00000048,0x00000047,
0x00000047,0x00000000,0x00000003,0x0004003d,0x0000000b,0x00000049,0x0000003e,0x0009004f,
0x0000000b,0x0000004a,0x00000049,0x00000048,0x00000004,0x00000005,0x00000002,0x00000003,
0x0003003e,0x0000003e,0x0000004a,0x000200f9,0x00000046,0x000200f8,0x0000004b,0x00050041,
0x0000001e,0x0000004d,0x00000015,0x0000004c,0x0004003d,0x00000012,0x0000004e,0x0000004d,
0x000500ab,0x00000021,0x0000004f,0x0000004e,0x00000022,0x000300f7,0x00000051,0x00000000,
0x000400fa,0x0000004f,0x00000050,0x00000051,0x000200f8,0x00000050,0x00050041,0x00000053,
0x00000054,0x0000003e,0x00000052,0x0004003d,0x0000000a,0x00000055,0x00000054,0x00050041,
0x00000053,0x00000056,0x0000003e,0x00000022,0x0003003e,0x00000056,0x00000055,0x000200f9,
0x00000051,0x000200f8,0x00000051,0x000200f9,0x00000046,0x000200f8,0x00000046,0x0004003d,
0x0000000b,0x00000059,0x0000003e,0x0003003e,0x00000058,0x00000059,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform itexture2D src;
layout(location = 0)out vec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
vec4 destValue = vec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000002[] = {
0x07230203,0x00010000,0x00080007,0x0000005a,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000058,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003e,
0x74736564,0x756c6156,0x00000065,0x00040005,0x00000058,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x00000058,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000012,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000012,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x00040020,0x0000003d,0x00000007,0x0000000b,0x0004002b,
0x00000006,0x00000041,0x00000001,0x0004002b,0x00000006,0x0000004c,0x00000002,0x0004002b,
0x00000012,0x00000052,0x00000003,0x00040020,0x00000053,0x00000007,0x0000000a,0x00040020,
0x00000057,0x00000003,0x0000000b,0x0004003b,0x00000057,0x00000058,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000003d,0x0000003e,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x0000003f,0x0000002e,0x00040070,0x0000000b,0x00000040,0x0000003f,0x0003003e,0x0000003e,
0x00000040,0x00050041,0x0000001e,0x00000042,0x00000015,0x00000041,0x0004003d,0x00000012,
0x00000043,0x00000042,0x000500ab,0x00000021,0x00000044,0x00000043,0x00000022,0x000300f7,
0x00000046,0x00000000,0x000400fa,0x00000044,0x00000045,0x0000004b,0x000200f8,0x00000045,
0x0004003d,0x0000000b,0x00000047,0x0000003e,0x0007004f,0x0000000e,0x00000048,0x00000047,
0x00000047,0x00000000,0x00000003,0x0004003d,0x0000000b,0x00000049,0x0000003e,0x0009004f,
0x0000000b,0x0000004a,0x00000049,0x00000048,0x00000004,0x00000005,0x00000002,0x00000003,
0x0003003e,0x0000003e,0x0000004a,0x000200f9,0x00000046,0x000200f8,0x0000004b,0x00050041,
0x0000001e,0x0000004d,0x00000015,0x0000004c,0x0004003d,0x00000012,0x0000004e,0x0000004d,
0x000500ab,0x00000021,0x0000004f,0x0000004e,0x00000022,0x000300f7,0x00000051,0x00000000,
0x000400fa,0x0000004f,0x00000050,0x00000051,0x000200f8,0x00000050,0x00050041,0x00000053,
0x00000054,0x0000003e,0x00000052,0x0004003d,0x0000000a,0x00000055,0x00000054,0x00050041,
0x00000053,0x00000056,0x0000003e,0x00000022,0x0003003e,0x00000056,0x00000055,0x000200f9,
0x00000051,0x000200f8,0x00000051,0x000200f9,0x00000046,0x000200f8,0x00000046,0x0004003d,
0x0000000b,0x00000059,0x0000003e,0x0003003e,0x00000058,0x00000059,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform utexture2D src;
layout(location = 0)out vec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
uvec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
vec4 destValue = vec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000004[] = {
0x07230203,0x00010000,0x00080007,0x00000059,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000057,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002d,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000030,0x00637273,0x00050005,0x0000003e,
0x74736564,0x756c6156,0x00000065,0x00040005,0x00000057,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000030,0x00000022,0x00000000,
0x00040047,0x00000030,0x00000021,0x00000000,0x00040047,0x00000057,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040020,0x0000002c,
0x00000007,0x0000000b,0x00090019,0x0000002e,0x0000000a,0x00000001,0x00000000,0x00000000,
0x00000000,0x00000001,0x00000000,0x00040020,0x0000002f,0x00000000,0x0000002e,0x0004003b,
0x0000002f,0x00000030,0x00000000,0x0004002b,0x00000006,0x00000032,0x00000004,0x0004002b,
0x00000006,0x00000037,0x00000003,0x00040020,0x00000038,0x00000009,0x00000006,0x00040017,
0x0000003c,0x00000006,0x00000004,0x00040020,0x0000003d,0x00000007,0x0000003c,0x0004002b,
0x00000006,0x00000041,0x00000001,0x0004002b,0x00000006,0x0000004c,0x00000002,0x0004002b,
0x00000012,0x00000052,0x00000003,0x00040020,0x00000056,0x00000003,0x0000003c,0x0004003b,
0x00000056,0x00000057,0x00000003,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,
0x000200f8,0x00000005,0x0004003b,0x00000008,0x00000009,0x00000007,0x0004003b,0x00000008,
0x0000001b,0x00000007,0x0004003b,0x0000002c,0x0000002d,0x00000007,0x0004003b,0x0000003d,
0x0000003e,0x00000007,0x0004003d,0x0000000b,0x0000000f,0x0000000d,0x0007004f,0x0000000e,
0x00000010,0x0000000f,0x0000000f,0x00000000,0x00000001,0x0004006e,0x00000007,0x00000011,
0x00000010,0x00050041,0x00000017,0x00000018,0x00000015,0x00000016,0x0004003d,0x00000007,
0x00000019,0x00000018,0x00050082,0x00000007,0x0000001a,0x00000011,0x00000019,0x0003003e,
0x00000009,0x0000001a,0x0004003d,0x00000007,0x0000001c,0x00000009,0x0003003e,0x0000001b,
0x0000001c,0x00050041,0x0000001e,0x0000001f,0x00000015,0x0000001d,0x0004003d,0x00000012,
0x00000020,0x0000001f,0x000500ab,0x00000021,0x00000023,0x00000020,0x00000022,0x000300f7,
0x00000025,0x00000000,0x000400fa,0x00000023,0x00000024,0x00000025,0x000200f8,0x00000024,
0x00050041,0x00000027,0x00000028,0x0000001b,0x00000026,0x0004003d,0x00000006,0x00000029,
0x00000028,0x0004007e,0x00000006,0x0000002a,0x00000029,0x00050041,0x00000027,0x0000002b,
0x0000001b,0x00000026,0x0003003e,0x0000002b,0x0000002a,0x000200f9,0x00000025,0x000200f8,
0x00000025,0x0004003d,0x0000002e,0x00000031,0x00000030,0x00050041,0x00000017,0x00000033,
0x00000015,0x00000032,0x0004003d,0x00000007,0x00000034,0x00000033,0x0004003d,0x00000007,
0x00000035,0x0000001b,0x00050080,0x00000007,0x00000036,0x00000034,0x00000035,0x00050041,
0x00000038,0x00000039,0x00000015,0x00000037,0x0004003d,0x00000006,0x0000003a,0x00000039,
0x0007005f,0x0000000b,0x0000003b,0x00000031,0x00000036,0x00000002,0x0000003a,0x0003003e,
0x0000002d,0x0000003b,0x0004003d,0x0000000b,0x0000003f,0x0000002d,0x0004006e,0x0000003c,
0x00000040,0x0000003f,0x0003003e,0x0000003e,0x00000040,0x00050041,0x0000001e,0x00000042,
0x00000015,0x00000041,0x0004003d,0x00000012,0x00000043,0x00000042,0x000500ab,0x00000021,
0x00000044,0x00000043,0x00000022,0x000300f7,0x00000046,0x00000000,0x000400fa,0x00000044,
0x00000045,0x0000004b,0x000200f8,0x00000045,0x0004003d,0x0000003c,0x00000047,0x0000003e,
0x0007004f,0x00000007,0x00000048,0x00000047,0x00000047,0x00000000,0x00000003,0x0004003d,
0x0000003c,0x00000049,0x0000003e,0x0009004f,0x0000003c,0x0000004a,0x00000049,0x00000048,
0x00000004,0x00000005,0x00000002,0x00000003,0x0003003e,0x0000003e,0x0000004a,0x000200f9,
0x00000046,0x000200f8,0x0000004b,0x00050041,0x0000001e,0x0000004d,0x00000015,0x0000004c,
0x0004003d,0x00000012,0x0000004e,0x0000004d,0x000500ab,0x00000021,0x0000004f,0x0000004e,
0x00000022,0x000300f7,0x00000051,0x00000000,0x000400fa,0x0000004f,0x00000050,0x00000051,
0x000200f8,0x00000050,0x00050041,0x00000027,0x00000053,0x0000003e,0x00000052,0x0004003d,
0x00000006,0x00000054,0x00000053,0x00050041,0x00000027,0x00000055,0x0000003e,0x00000022,
0x0003003e,0x00000055,0x00000054,0x000200f9,0x00000051,0x000200f8,0x00000051,0x000200f9,
0x00000046,0x000200f8,0x00000046,0x0004003d,0x0000003c,0x00000058,0x0000003e,0x0003003e,
0x00000057,0x00000058,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform texture2D src;
layout(location = 0)out ivec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
vec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
ivec4 destValue = ivec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000005[] = {
0x07230203,0x00010000,0x00080007,0x0000005c,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x0000005a,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003d,
0x74736564,0x756c6156,0x00000065,0x00040005,0x0000005a,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x0000005a,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000006,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000006,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x0004002b,0x00000006,0x00000044,0x00000001,0x0004002b,
0x00000006,0x0000004f,0x00000002,0x0004002b,0x00000012,0x00000055,0x00000003,0x00040020,
0x00000059,0x00000003,0x0000002c,0x0004003b,0x00000059,0x0000005a,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000002d,0x0000003d,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x0000003e,0x0000002e,0x00050051,0x00000006,0x0000003f,0x0000003e,0x00000000,0x00050051,
0x00000006,0x00000040,0x0000003e,0x00000001,0x00050051,0x00000006,0x00000041,0x0000003e,
0x00000002,0x00050051,0x00000006,0x00000042,0x0000003e,0x00000003,0x00070050,0x0000002c,
0x00000043,0x0000003f,0x00000040,0x00000041,0x00000042,0x0003003e,0x0000003d,0x00000043,
0x00050041,0x0000001e,0x00000045,0x00000015,0x00000044,0x0004003d,0x00000012,0x00000046,
0x00000045,0x000500ab,0x00000021,0x00000047,0x00000046,0x00000022,0x000300f7,0x00000049,
0x00000000,0x000400fa,0x00000047,0x00000048,0x0000004e,0x000200f8,0x00000048,0x0004003d,
0x0000002c,0x0000004a,0x0000003d,0x0007004f,0x00000007,0x0000004b,0x0000004a,0x0000004a,
0x00000000,0x00000003,0x0004003d,0x0000002c,0x0000004c,0x0000003d,0x0009004f,0x0000002c,
0x0000004d,0x0000004c,0x0000004b,0x00000004,0x00000005,0x00000002,0x00000003,0x0003003e,
0x0000003d,0x0000004d,0x000200f9,0x00000049,0x000200f8,0x0000004e,0x00050041,0x0000001e,
0x00000050,0x00000015,0x0000004f,0x0004003d,0x00000012,0x00000051,0x00000050,0x000500ab,
0x00000021,0x00000052,0x00000051,0x00000022,0x000300f7,0x00000054,0x00000000,0x000400fa,
0x00000052,0x00000053,0x00000054,0x000200f8,0x00000053,0x00050041,0x00000027,0x00000056,
0x0000003d,0x00000055,0x0004003d,0x00000006,0x00000057,0x00000056,0x00050041,0x00000027,
0x00000058,0x0000003d,0x00000022,0x0003003e,0x00000058,0x00000057,0x000200f9,0x00000054,
0x000200f8,0x00000054,0x000200f9,0x00000049,0x000200f8,0x00000049,0x0004003d,0x0000002c,
0x0000005b,0x0000003d,0x0003003e,0x0000005a,0x0000005b,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform itexture2D src;
layout(location = 0)out ivec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
ivec4 destValue = ivec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000006[] = {
0x07230203,0x00010000,0x00080007,0x0000005a,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000058,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003f,
0x74736564,0x756c6156,0x00000065,0x00040005,0x00000058,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x00000058,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000012,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000012,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x00040017,0x0000003d,0x00000006,0x00000004,0x00040020,
0x0000003e,0x00000007,0x0000003d,0x0004002b,0x00000006,0x00000042,0x00000001,0x0004002b,
0x00000006,0x0000004d,0x00000002,0x0004002b,0x00000012,0x00000053,0x00000003,0x00040020,
0x00000057,0x00000003,0x0000003d,0x0004003b,0x00000057,0x00000058,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000003e,0x0000003f,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x00000040,0x0000002e,0x0004007c,0x0000003d,0x00000041,0x00000040,0x0003003e,0x0000003f,
0x00000041,0x00050041,0x0000001e,0x00000043,0x00000015,0x00000042,0x0004003d,0x00000012,
0x00000044,0x00000043,0x000500ab,0x00000021,0x00000045,0x00000044,0x00000022,0x000300f7,
0x00000047,0x00000000,0x000400fa,0x00000045,0x00000046,0x0000004c,0x000200f8,0x00000046,
0x0004003d,0x0000003d,0x00000048,0x0000003f,0x0007004f,0x00000007,0x00000049,0x00000048,
0x00000048,0x00000000,0x00000003,0x0004003d,0x0000003d,0x0000004a,0x0000003f,0x0009004f,
0x0000003d,0x0000004b,0x0000004a,0x00000049,0x00000004,0x00000005,0x00000002,0x00000003,
0x0003003e,0x0000003f,0x0000004b,0x000200f9,0x00000047,0x000200f8,0x0000004c,0x00050041,
0x0000001e,0x0000004e,0x00000015,0x0000004d,0x0004003d,0x00000012,0x0000004f,0x0000004e,
0x000500ab,0x00000021,0x00000050,0x0000004f,0x00000022,0x000300f7,0x00000052,0x00000000,
0x000400fa,0x00000050,0x00000051,0x00000052,0x000200f8,0x00000051,0x00050041,0x00000027,
0x00000054,0x0000003f,0x00000053,0x0004003d,0x00000006,0x00000055,0x00000054,0x00050041,
0x00000027,0x00000056,0x0000003f,0x00000022,0x0003003e,0x00000056,0x00000055,0x000200f9,
0x00000052,0x000200f8,0x00000052,0x000200f9,0x00000047,0x000200f8,0x00000047,0x0004003d,
0x0000003d,0x00000059,0x0000003f,0x0003003e,0x00000058,0x00000059,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform utexture2D src;
layout(location = 0)out ivec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
uvec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
ivec4 destValue = ivec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000008[] = {
0x07230203,0x00010000,0x00080007,0x0000005b,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000059,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002d,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000030,0x00637273,0x00050005,0x0000003e,
0x74736564,0x756c6156,0x00000065,0x00040005,0x00000059,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000030,0x00000022,0x00000000,
0x00040047,0x00000030,0x00000021,0x00000000,0x00040047,0x00000059,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040020,0x0000002c,
0x00000007,0x0000000b,0x00090019,0x0000002e,0x0000000a,0x00000001,0x00000000,0x00000000,
0x00000000,0x00000001,0x00000000,0x00040020,0x0000002f,0x00000000,0x0000002e,0x0004003b,
0x0000002f,0x00000030,0x00000000,0x0004002b,0x00000006,0x00000032,0x00000004,0x0004002b,
0x00000006,0x00000037,0x00000003,0x00040020,0x00000038,0x00000009,0x00000006,0x00040017,
0x0000003c,0x00000012,0x00000004,0x00040020,0x0000003d,0x00000007,0x0000003c,0x0004002b,
0x00000006,0x00000041,0x00000001,0x00040017,0x00000047,0x00000012,0x00000002,0x0004002b,
0x00000006,0x0000004d,0x00000002,0x0004002b,0x00000012,0x00000053,0x00000003,0x00040020,
0x00000054,0x00000007,0x00000012,0x00040020,0x00000058,0x00000003,0x0000003c,0x0004003b,
0x00000058,0x00000059,0x00000003,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,
0x000200f8,0x00000005,0x0004003b,0x00000008,0x00000009,0x00000007,0x0004003b,0x00000008,
0x0000001b,0x00000007,0x0004003b,0x0000002c,0x0000002d,0x00000007,0x0004003b,0x0000003d,
0x0000003e,0x00000007,0x0004003d,0x0000000b,0x0000000f,0x0000000d,0x0007004f,0x0000000e,
0x00000010,0x0000000f,0x0000000f,0x00000000,0x00000001,0x0004006e,0x00000007,0x00000011,
0x00000010,0x00050041,0x00000017,0x00000018,0x00000015,0x00000016,0x0004003d,0x00000007,
0x00000019,0x00000018,0x00050082,0x00000007,0x0000001a,0x00000011,0x00000019,0x0003003e,
0x00000009,0x0000001a,0x0004003d,0x00000007,0x0000001c,0x00000009,0x0003003e,0x0000001b,
0x0000001c,0x00050041,0x0000001e,0x0000001f,0x00000015,0x0000001d,0x0004003d,0x00000012,
0x00000020,0x0000001f,0x000500ab,0x00000021,0x00000023,0x00000020,0x00000022,0x000300f7,
0x00000025,0x00000000,0x000400fa,0x00000023,0x00000024,0x00000025,0x000200f8,0x00000024,
0x00050041,0x00000027,0x00000028,0x0000001b,0x00000026,0x0004003d,0x00000006,0x00000029,
0x00000028,0x0004007e,0x00000006,0x0000002a,0x00000029,0x00050041,0x00000027,0x0000002b,
0x0000001b,0x00000026,0x0003003e,0x0000002b,0x0000002a,0x000200f9,0x00000025,0x000200f8,
0x00000025,0x0004003d,0x0000002e,0x00000031,0x00000030,0x00050041,0x00000017,0x00000033,
0x00000015,0x00000032,0x0004003d,0x00000007,0x00000034,0x00000033,0x0004003d,0x00000007,
0x00000035,0x0000001b,0x00050080,0x00000007,0x00000036,0x00000034,0x00000035,0x00050041,
0x00000038,0x00000039,0x00000015,0x00000037,0x0004003d,0x00000006,0x0000003a,0x00000039,
0x0007005f,0x0000000b,0x0000003b,0x00000031,0x00000036,0x00000002,0x0000003a,0x0003003e,
0x0000002d,0x0000003b,0x0004003d,0x0000000b,0x0000003f,0x0000002d,0x0004006d,0x0000003c,
0x00000040,0x0000003f,0x0003003e,0x0000003e,0x00000040,0x00050041,0x0000001e,0x00000042,
0x00000015,0x00000041,0x0004003d,0x00000012,0x00000043,0x00000042,0x000500ab,0x00000021,
0x00000044,0x00000043,0x00000022,0x000300f7,0x00000046,0x00000000,0x000400fa,0x00000044,
0x00000045,0x0000004c,0x000200f8,0x00000045,0x0004003d,0x0000003c,0x00000048,0x0000003e,
0x0007004f,0x00000047,0x00000049,0x00000048,0x00000048,0x00000000,0x00000003,0x0004003d,
0x0000003c,0x0000004a,0x0000003e,0x0009004f,0x0000003c,0x0000004b,0x0000004a,0x00000049,
0x00000004,0x00000005,0x00000002,0x00000003,0x0003003e,0x0000003e,0x0000004b,0x000200f9,
0x00000046,0x000200f8,0x0000004c,0x00050041,0x0000001e,0x0000004e,0x00000015,0x0000004d,
0x0004003d,0x00000012,0x0000004f,0x0000004e,0x000500ab,0x00000021,0x00000050,0x0000004f,
0x00000022,0x000300f7,0x00000052,0x00000000,0x000400fa,0x00000050,0x00000051,0x00000052,
0x000200f8,0x00000051,0x00050041,0x00000054,0x00000055,0x0000003e,0x00000053,0x0004003d,
0x00000012,0x00000056,0x00000055,0x00050041,0x00000054,0x00000057,0x0000003e,0x00000022,
0x0003003e,0x00000057,0x00000056,0x000200f9,0x00000052,0x000200f8,0x00000052,0x000200f9,
0x00000046,0x000200f8,0x00000046,0x0004003d,0x0000003c,0x0000005a,0x0000003e,0x0003003e,
0x00000059,0x0000005a,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform texture2D src;
layout(location = 0)out uvec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
vec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
uvec4 destValue = uvec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_00000009[] = {
0x07230203,0x00010000,0x00080007,0x0000005c,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x0000005a,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003f,
0x74736564,0x756c6156,0x00000065,0x00040005,0x0000005a,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x0000005a,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000006,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000006,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x00040017,0x0000003d,0x00000012,0x00000004,0x00040020,
0x0000003e,0x00000007,0x0000003d,0x0004002b,0x00000006,0x00000042,0x00000001,0x00040017,
0x00000048,0x00000012,0x00000002,0x0004002b,0x00000006,0x0000004e,0x00000002,0x0004002b,
0x00000012,0x00000054,0x00000003,0x00040020,0x00000055,0x00000007,0x00000012,0x00040020,
0x00000059,0x00000003,0x0000003d,0x0004003b,0x00000059,0x0000005a,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000003e,0x0000003f,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x00000040,0x0000002e,0x0004007c,0x0000003d,0x00000041,0x00000040,0x0003003e,0x0000003f,
0x00000041,0x00050041,0x0000001e,0x00000043,0x00000015,0x00000042,0x0004003d,0x00000012,
0x00000044,0x00000043,0x000500ab,0x00000021,0x00000045,0x00000044,0x00000022,0x000300f7,
0x00000047,0x00000000,0x000400fa,0x00000045,0x00000046,0x0000004d,0x000200f8,0x00000046,
0x0004003d,0x0000003d,0x00000049,0x0000003f,0x0007004f,0x00000048,0x0000004a,0x00000049,
0x00000049,0x00000000,0x00000003,0x0004003d,0x0000003d,0x0000004b,0x0000003f,0x0009004f,
0x0000003d,0x0000004c,0x0000004b,0x0000004a,0x00000004,0x00000005,0x00000002,0x00000003,
0x0003003e,0x0000003f,0x0000004c,0x000200f9,0x00000047,0x000200f8,0x0000004d,0x00050041,
0x0000001e,0x0000004f,0x00000015,0x0000004e,0x0004003d,0x00000012,0x00000050,0x0000004f,
0x000500ab,0x00000021,0x00000051,0x00000050,0x00000022,0x000300f7,0x00000053,0x00000000,
0x000400fa,0x00000051,0x00000052,0x00000053,0x000200f8,0x00000052,0x00050041,0x00000055,
0x00000056,0x0000003f,0x00000054,0x0004003d,0x00000012,0x00000057,0x00000056,0x00050041,
0x00000055,0x00000058,0x0000003f,0x00000022,0x0003003e,0x00000058,0x00000057,0x000200f9,
0x00000053,0x000200f8,0x00000053,0x000200f9,0x00000047,0x000200f8,0x00000047,0x0004003d,
0x0000003d,0x0000005b,0x0000003f,0x0003003e,0x0000005a,0x0000005b,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform itexture2D src;
layout(location = 0)out uvec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
uvec4 destValue = uvec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code
// 7.11.3009
#pragma once
const uint32_t kImageCopy_frag_0000000A[] = {
0x07230203,0x00010000,0x00080007,0x0000005e,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x0000005c,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000b0004,0x455f4c47,0x735f5458,
0x6c706d61,0x656c7265,0x745f7373,0x75747865,0x665f6572,0x74636e75,0x736e6f69,0x00000000,
0x00040005,0x00000004,0x6e69616d,0x00000000,0x00070005,0x00000009,0x74736564,0x49627553,
0x6567616d,0x726f6f43,0x00007364,0x00060005,0x0000000d,0x465f6c67,0x43676172,0x64726f6f,
0x00000000,0x00060005,0x00000013,0x68737550,0x736e6f43,0x746e6174,0x00000073,0x00050006,
0x00000013,0x00000000,0x70696c66,0x00000059,0x00080006,0x00000013,0x00000001,0x74736564,
0x4c736148,0x6e696d75,0x65636e61,0x00000000,0x00060006,0x00000013,0x00000002,0x74736564,
0x6c417349,0x00616870,0x00050006,0x00000013,0x00000003,0x4d637273,0x00007069,0x00060006,
0x00000013,0x00000004,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000005,
0x74736564,0x7366664f,0x00007465,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,
0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00050005,0x0000002e,
0x56637273,0x65756c61,0x00000000,0x00030005,0x00000031,0x00637273,0x00050005,0x0000003d,
0x74736564,0x756c6156,0x00000065,0x00040005,0x0000005c,0x74736564,0x00000000,0x00040047,
0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,
0x00050048,0x00000013,0x00000001,0x00000023,0x00000004,0x00050048,0x00000013,0x00000002,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000003,0x00000023,0x0000000c,0x00050048,
0x00000013,0x00000004,0x00000023,0x00000010,0x00050048,0x00000013,0x00000005,0x00000023,
0x00000018,0x00030047,0x00000013,0x00000002,0x00040047,0x00000031,0x00000022,0x00000000,
0x00040047,0x00000031,0x00000021,0x00000000,0x00040047,0x0000005c,0x0000001e,0x00000000,
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,
0x00000001,0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,
0x00000007,0x00030016,0x0000000a,0x00000020,0x00040017,0x0000000b,0x0000000a,0x00000004,
0x00040020,0x0000000c,0x00000001,0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,
0x00040017,0x0000000e,0x0000000a,0x00000002,0x00040015,0x00000012,0x00000020,0x00000000,
0x0008001e,0x00000013,0x00000012,0x00000012,0x00000012,0x00000006,0x00000007,0x00000007,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000005,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000000,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x0004002b,0x00000012,
0x00000026,0x00000001,0x00040020,0x00000027,0x00000007,0x00000006,0x00040017,0x0000002c,
0x00000012,0x00000004,0x00040020,0x0000002d,0x00000007,0x0000002c,0x00090019,0x0000002f,
0x00000012,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,
0x00000030,0x00000000,0x0000002f,0x0004003b,0x00000030,0x00000031,0x00000000,0x0004002b,
0x00000006,0x00000033,0x00000004,0x0004002b,0x00000006,0x00000038,0x00000003,0x00040020,
0x00000039,0x00000009,0x00000006,0x0004002b,0x00000006,0x00000044,0x00000001,0x00040017,
0x0000004a,0x00000012,0x00000002,0x0004002b,0x00000006,0x00000050,0x00000002,0x0004002b,
0x00000012,0x00000056,0x00000003,0x00040020,0x00000057,0x00000007,0x00000012,0x00040020,
0x0000005b,0x00000003,0x0000002c,0x0004003b,0x0000005b,0x0000005c,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x0000002d,
0x0000002e,0x00000007,0x0004003b,0x0000002d,0x0000003d,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x0004006e,0x00000007,0x00000011,0x00000010,0x00050041,0x00000017,0x00000018,
0x00000015,0x00000016,0x0004003d,0x00000007,0x00000019,0x00000018,0x00050082,0x00000007,
0x0000001a,0x00000011,0x00000019,0x0003003e,0x00000009,0x0000001a,0x0004003d,0x00000007,
0x0000001c,0x00000009,0x0003003e,0x0000001b,0x0000001c,0x00050041,0x0000001e,0x0000001f,
0x00000015,0x0000001d,0x0004003d,0x00000012,0x00000020,0x0000001f,0x000500ab,0x00000021,
0x00000023,0x00000020,0x00000022,0x000300f7,0x00000025,0x00000000,0x000400fa,0x00000023,
0x00000024,0x00000025,0x000200f8,0x00000024,0x00050041,0x00000027,0x00000028,0x0000001b,
0x00000026,0x0004003d,0x00000006,0x00000029,0x00000028,0x0004007e,0x00000006,0x0000002a,
0x00000029,0x00050041,0x00000027,0x0000002b,0x0000001b,0x00000026,0x0003003e,0x0000002b,
0x0000002a,0x000200f9,0x00000025,0x000200f8,0x00000025,0x0004003d,0x0000002f,0x00000032,
0x00000031,0x00050041,0x00000017,0x00000034,0x00000015,0x00000033,0x0004003d,0x00000007,
0x00000035,0x00000034,0x0004003d,0x00000007,0x00000036,0x0000001b,0x00050080,0x00000007,
0x00000037,0x00000035,0x00000036,0x00050041,0x00000039,0x0000003a,0x00000015,0x00000038,
0x0004003d,0x00000006,0x0000003b,0x0000003a,0x0007005f,0x0000002c,0x0000003c,0x00000032,
0x00000037,0x00000002,0x0000003b,0x0003003e,0x0000002e,0x0000003c,0x0004003d,0x0000002c,
0x0000003e,0x0000002e,0x00050051,0x00000012,0x0000003f,0x0000003e,0x00000000,0x00050051,
0x00000012,0x00000040,0x0000003e,0x00000001,0x00050051,0x00000012,0x00000041,0x0000003e,
0x00000002,0x00050051,0x00000012,0x00000042,0x0000003e,0x00000003,0x00070050,0x0000002c,
0x00000043,0x0000003f,0x00000040,0x00000041,0x00000042,0x0003003e,0x0000003d,0x00000043,
0x00050041,0x0000001e,0x00000045,0x00000015,0x00000044,0x0004003d,0x00000012,0x00000046,
0x00000045,0x000500ab,0x00000021,0x00000047,0x00000046,0x00000022,0x000300f7,0x00000049,
0x00000000,0x000400fa,0x00000047,0x00000048,0x0000004f,0x000200f8,0x00000048,0x0004003d,
0x0000002c,0x0000004b,0x0000003d,0x0007004f,0x0000004a,0x0000004c,0x0000004b,0x0000004b,
0x00000000,0x00000003,0x0004003d,0x0000002c,0x0000004d,0x0000003d,0x0009004f,0x0000002c,
0x0000004e,0x0000004d,0x0000004c,0x00000004,0x00000005,0x00000002,0x00000003,0x0003003e,
0x0000003d,0x0000004e,0x000200f9,0x00000049,0x000200f8,0x0000004f,0x00050041,0x0000001e,
0x00000051,0x00000015,0x00000050,0x0004003d,0x00000012,0x00000052,0x00000051,0x000500ab,
0x00000021,0x00000053,0x00000052,0x00000022,0x000300f7,0x00000055,0x00000000,0x000400fa,
0x00000053,0x00000054,0x00000055,0x000200f8,0x00000054,0x00050041,0x00000057,0x00000058,
0x0000003d,0x00000056,0x0004003d,0x00000012,0x00000059,0x00000058,0x00050041,0x00000057,
0x0000005a,0x0000003d,0x00000022,0x0003003e,0x0000005a,0x00000059,0x000200f9,0x00000055,
0x000200f8,0x00000055,0x000200f9,0x00000049,0x000200f8,0x00000049,0x0004003d,0x0000002c,
0x0000005d,0x0000003d,0x0003003e,0x0000005c,0x0000005d,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(set = 0, binding = 0)uniform utexture2D src;
layout(location = 0)out uvec4 dest;
layout(push_constant)uniform PushConstants {
bool flipY;
bool destHasLuminance;
bool destIsAlpha;
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
uvec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
uvec4 destValue = uvec4(srcValue);
if(params . destHasLuminance)
{
destValue . rg = destValue . ra;
}
else if(params . destIsAlpha)
{
destValue . r = destValue . a;
}
dest = destValue;
}
#endif // Preprocessed code
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ImageCopy.frag: Copy parts of an image to another.
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
#if SrcIsFloat
#define SRC_RESOURCE(type) type
#define SrcType vec4
#elif SrcIsInt
#define SRC_RESOURCE(type) i ## type
#define SrcType ivec4
#elif SrcIsUint
#define SRC_RESOURCE(type) u ## type
#define SrcType uvec4
#else
#error "Not all source formats are accounted for"
#endif
#if DestIsFloat
#define DestType vec4
#elif DestIsInt
#define DestType ivec4
#elif DestIsUint
#define DestType uvec4
#else
#error "Not all destinatoin formats are accounted for"
#endif
layout(set = 0, binding = 0) uniform SRC_RESOURCE(texture2D) src;
layout(location = 0) out DestType dest;
layout(push_constant) uniform PushConstants {
// Whether y needs to be flipped
bool flipY;
// Whether destination is emulated luminance/alpha.
bool destHasLuminance;
bool destIsAlpha;
// Translation from source to destination coordinates.
int srcMip;
ivec2 srcOffset;
ivec2 destOffset;
} params;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord.xy) - params.destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
// If flipping Y, srcOffset would contain the opposite y coordinate, so we can
// simply reverse the direction in which y grows.
if (params.flipY)
srcSubImageCoords.y = -srcSubImageCoords.y;
SrcType srcValue = texelFetch(src, params.srcOffset + srcSubImageCoords, params.srcMip);
// Convert value to destination type.
DestType destValue = DestType(srcValue);
// If dest is luminance/alpha, it's implemented with R or RG. Do the appropriate swizzle.
if (params.destHasLuminance)
{
destValue.rg = destValue.ra;
}
else if (params.destIsAlpha)
{
destValue.r = destValue.a;
}
dest = destValue;
}
{
"Description": [
"Copyright 2018 The ANGLE Project Authors. All rights reserved.",
"Use of this source code is governed by a BSD-style license that can be",
"found in the LICENSE file.",
"",
"ImageCopy.frag.json: Build parameters for ImageCopy.frag."
],
"SrcFormat": [
"SrcIsFloat",
"SrcIsInt",
"SrcIsUint"
],
"DestFormat": [
"DestIsFloat",
"DestIsInt",
"DestIsUint"
]
}
......@@ -8,6 +8,7 @@
#include "libANGLE/renderer/vulkan/vk_format_utils.h"
#include "libANGLE/Texture.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/renderer/load_functions_table.h"
#include "libANGLE/renderer/vulkan/RendererVk.h"
......@@ -235,4 +236,44 @@ size_t GetVertexInputAlignment(const vk::Format &format)
size_t pixelBytes = bufferFormat.pixelBytes;
return format.vkBufferFormatIsPacked ? pixelBytes : (pixelBytes / bufferFormat.channelCount());
}
void MapSwizzleState(const vk::Format &format,
const gl::SwizzleState &swizzleState,
gl::SwizzleState *swizzleStateOut)
{
const angle::Format &angleFormat = format.angleFormat();
switch (format.internalFormat)
{
case GL_LUMINANCE8_OES:
swizzleStateOut->swizzleRed = swizzleState.swizzleRed;
swizzleStateOut->swizzleGreen = swizzleState.swizzleRed;
swizzleStateOut->swizzleBlue = swizzleState.swizzleRed;
swizzleStateOut->swizzleAlpha = GL_ONE;
break;
case GL_LUMINANCE8_ALPHA8_OES:
swizzleStateOut->swizzleRed = swizzleState.swizzleRed;
swizzleStateOut->swizzleGreen = swizzleState.swizzleRed;
swizzleStateOut->swizzleBlue = swizzleState.swizzleRed;
swizzleStateOut->swizzleAlpha = swizzleState.swizzleGreen;
break;
case GL_ALPHA8_OES:
swizzleStateOut->swizzleRed = GL_ZERO;
swizzleStateOut->swizzleGreen = GL_ZERO;
swizzleStateOut->swizzleBlue = GL_ZERO;
swizzleStateOut->swizzleAlpha = swizzleState.swizzleRed;
break;
default:
// Set any missing channel to default in case the emulated format has that channel.
swizzleStateOut->swizzleRed =
angleFormat.redBits > 0 ? swizzleState.swizzleRed : GL_ZERO;
swizzleStateOut->swizzleGreen =
angleFormat.greenBits > 0 ? swizzleState.swizzleGreen : GL_ZERO;
swizzleStateOut->swizzleBlue =
angleFormat.blueBits > 0 ? swizzleState.swizzleBlue : GL_ZERO;
swizzleStateOut->swizzleAlpha =
angleFormat.alphaBits > 0 ? swizzleState.swizzleAlpha : GL_ONE;
break;
}
}
} // namespace rx
......@@ -21,6 +21,7 @@
namespace gl
{
struct SwizzleState;
class TextureCapsMap;
} // namespace gl
......@@ -115,6 +116,10 @@ const VkFormatProperties &GetMandatoryFormatSupport(VkFormat vkFormat);
// Returns the alignment for a buffer to be used with the vertex input stage in Vulkan. This
// calculation is listed in the Vulkan spec at the end of the section 'Vertex Input Description'.
size_t GetVertexInputAlignment(const vk::Format &format);
void MapSwizzleState(const vk::Format &format,
const gl::SwizzleState &swizzleState,
gl::SwizzleState *swizzleStateOut);
} // namespace rx
#endif // LIBANGLE_RENDERER_VULKAN_VK_FORMAT_UTILS_H_
......@@ -1101,7 +1101,8 @@ ImageHelper::ImageHelper()
mFormat(nullptr),
mSamples(0),
mCurrentLayout(VK_IMAGE_LAYOUT_UNDEFINED),
mLayerCount(0)
mLayerCount(0),
mLevelCount(0)
{}
ImageHelper::ImageHelper(ImageHelper &&other)
......@@ -1112,10 +1113,12 @@ ImageHelper::ImageHelper(ImageHelper &&other)
mFormat(other.mFormat),
mSamples(other.mSamples),
mCurrentLayout(other.mCurrentLayout),
mLayerCount(other.mLayerCount)
mLayerCount(other.mLayerCount),
mLevelCount(other.mLevelCount)
{
other.mCurrentLayout = VK_IMAGE_LAYOUT_UNDEFINED;
other.mLayerCount = 0;
other.mLevelCount = 0;
}
ImageHelper::~ImageHelper()
......@@ -1137,6 +1140,7 @@ angle::Result ImageHelper::init(Context *context,
mFormat = &format;
mSamples = samples;
mLayerCount = GetImageLayerCount(textureType);
mLevelCount = mipLevels;
VkImageCreateInfo imageInfo = {};
imageInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
......@@ -1189,7 +1193,7 @@ angle::Result ImageHelper::initImageView(Context *context,
ImageView *imageViewOut,
uint32_t levelCount)
{
return initLayerImageView(context, textureType, aspectMask, swizzleMap, imageViewOut,
return initLayerImageView(context, textureType, aspectMask, swizzleMap, imageViewOut, 0,
levelCount, 0, mLayerCount);
}
......@@ -1198,6 +1202,7 @@ angle::Result ImageHelper::initLayerImageView(Context *context,
VkImageAspectFlags aspectMask,
const gl::SwizzleState &swizzleMap,
ImageView *imageViewOut,
uint32_t baseMipLevel,
uint32_t levelCount,
uint32_t baseArrayLayer,
uint32_t layerCount)
......@@ -1223,7 +1228,7 @@ angle::Result ImageHelper::initLayerImageView(Context *context,
viewInfo.components.a = VK_COMPONENT_SWIZZLE_IDENTITY;
}
viewInfo.subresourceRange.aspectMask = aspectMask;
viewInfo.subresourceRange.baseMipLevel = 0;
viewInfo.subresourceRange.baseMipLevel = baseMipLevel;
viewInfo.subresourceRange.levelCount = levelCount;
viewInfo.subresourceRange.baseArrayLayer = baseArrayLayer;
viewInfo.subresourceRange.layerCount = layerCount;
......@@ -1238,6 +1243,7 @@ void ImageHelper::destroy(VkDevice device)
mDeviceMemory.destroy(device);
mCurrentLayout = VK_IMAGE_LAYOUT_UNDEFINED;
mLayerCount = 0;
mLevelCount = 0;
}
void ImageHelper::init2DWeakReference(VkImage handle,
......@@ -1251,6 +1257,7 @@ void ImageHelper::init2DWeakReference(VkImage handle,
mFormat = &format;
mSamples = samples;
mLayerCount = 1;
mLevelCount = 1;
mImage.setHandle(handle);
}
......@@ -1267,6 +1274,7 @@ angle::Result ImageHelper::init2DStaging(Context *context,
mFormat = &format;
mSamples = 1;
mLayerCount = 1;
mLevelCount = 1;
// Use Preinitialized for writable staging images - in these cases we want to map the memory
// before we do a copy. For readback images, use an undefined layout.
......@@ -1360,7 +1368,7 @@ void ImageHelper::changeLayoutWithStages(VkImageAspectFlags aspectMask,
// TODO(jmadill): Is this needed for mipped/layer images?
imageMemoryBarrier.subresourceRange.aspectMask = aspectMask;
imageMemoryBarrier.subresourceRange.baseMipLevel = 0;
imageMemoryBarrier.subresourceRange.levelCount = VK_REMAINING_MIP_LEVELS;
imageMemoryBarrier.subresourceRange.levelCount = mLevelCount;
imageMemoryBarrier.subresourceRange.baseArrayLayer = 0;
imageMemoryBarrier.subresourceRange.layerCount = mLayerCount;
......
......@@ -474,6 +474,7 @@ class ImageHelper final : public RecordableGraphResource
VkImageAspectFlags aspectMask,
const gl::SwizzleState &swizzleMap,
ImageView *imageViewOut,
uint32_t baseMipLevel,
uint32_t levelCount,
uint32_t baseArrayLayer,
uint32_t layerCount);
......@@ -507,6 +508,8 @@ class ImageHelper final : public RecordableGraphResource
const DeviceMemory &getDeviceMemory() const;
const gl::Extents &getExtents() const;
uint32_t getLayerCount() const { return mLayerCount; }
uint32_t getLevelCount() const { return mLevelCount; }
const Format &getFormat() const;
GLint getSamples() const;
......@@ -561,6 +564,7 @@ class ImageHelper final : public RecordableGraphResource
// Cached properties.
uint32_t mLayerCount;
uint32_t mLevelCount;
};
class FramebufferHelper : public RecordableGraphResource
......
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_vk_internal_shaders.py using data from shaders/src/*
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
......@@ -46,6 +46,15 @@ namespace
#include "libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.0000000F.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/FullScreenQuad.vert.00000000.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageClear.frag.00000000.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000000.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000001.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000002.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000004.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000005.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000006.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000008.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000009.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.0000000A.inc"
// This is SPIR-V binary blob and the size.
struct ShaderBlob
......@@ -92,6 +101,19 @@ constexpr ShaderBlob kFullScreenQuad_vert_shaders[] = {
constexpr ShaderBlob kImageClear_frag_shaders[] = {
{kImageClear_frag_00000000, sizeof(kImageClear_frag_00000000)},
};
constexpr ShaderBlob kImageCopy_frag_shaders[] = {
{kImageCopy_frag_00000000, sizeof(kImageCopy_frag_00000000)},
{kImageCopy_frag_00000001, sizeof(kImageCopy_frag_00000001)},
{kImageCopy_frag_00000002, sizeof(kImageCopy_frag_00000002)},
{nullptr, 0}, // 0x00000003
{kImageCopy_frag_00000004, sizeof(kImageCopy_frag_00000004)},
{kImageCopy_frag_00000005, sizeof(kImageCopy_frag_00000005)},
{kImageCopy_frag_00000006, sizeof(kImageCopy_frag_00000006)},
{nullptr, 0}, // 0x00000007
{kImageCopy_frag_00000008, sizeof(kImageCopy_frag_00000008)},
{kImageCopy_frag_00000009, sizeof(kImageCopy_frag_00000009)},
{kImageCopy_frag_0000000A, sizeof(kImageCopy_frag_0000000A)},
};
angle::Result GetShader(Context *context,
RefCounted<ShaderAndSerial> *shaders,
......@@ -139,6 +161,10 @@ void ShaderLibrary::destroy(VkDevice device)
{
shader.get().destroy(device);
}
for (RefCounted<ShaderAndSerial> &shader : mImageCopy_frag_shaders)
{
shader.get().destroy(device);
}
}
angle::Result ShaderLibrary::getBufferUtils_comp(Context *context,
......@@ -173,5 +199,13 @@ angle::Result ShaderLibrary::getImageClear_frag(Context *context,
ArraySize(kImageClear_frag_shaders), shaderFlags, shaderOut);
}
angle::Result ShaderLibrary::getImageCopy_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut)
{
return GetShader(context, mImageCopy_frag_shaders, kImageCopy_frag_shaders,
ArraySize(kImageCopy_frag_shaders), shaderFlags, shaderOut);
}
} // namespace vk
} // namespace rx
# GENERATED FILE - DO NOT EDIT.
# Generated by gen_vk_internal_shaders.py using data from shaders/src/*
#
# Copyright 2018 The ANGLE Project Authors. All rights reserved.
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
......@@ -39,4 +39,13 @@ angle_vulkan_internal_shaders = [
"shaders/gen/ConvertVertex.comp.0000000F.inc",
"shaders/gen/FullScreenQuad.vert.00000000.inc",
"shaders/gen/ImageClear.frag.00000000.inc",
"shaders/gen/ImageCopy.frag.00000000.inc",
"shaders/gen/ImageCopy.frag.00000001.inc",
"shaders/gen/ImageCopy.frag.00000002.inc",
"shaders/gen/ImageCopy.frag.00000004.inc",
"shaders/gen/ImageCopy.frag.00000005.inc",
"shaders/gen/ImageCopy.frag.00000006.inc",
"shaders/gen/ImageCopy.frag.00000008.inc",
"shaders/gen/ImageCopy.frag.00000009.inc",
"shaders/gen/ImageCopy.frag.0000000A.inc",
]
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_vk_internal_shaders.py using data from shaders/src/*
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
......@@ -68,6 +68,24 @@ namespace FullScreenQuad_vert
namespace ImageClear_frag
{} // namespace ImageClear_frag
namespace ImageCopy_frag
{
enum SrcFormat
{
kSrcIsFloat = 0x00000000,
kSrcIsInt = 0x00000001,
kSrcIsUint = 0x00000002,
kSrcFormatMask = 0x00000003,
};
enum DestFormat
{
kDestIsFloat = 0x00000000,
kDestIsInt = 0x00000004,
kDestIsUint = 0x00000008,
kDestFormatMask = 0x0000000C,
};
} // namespace ImageCopy_frag
} // namespace InternalShader
class ShaderLibrary final : angle::NonCopyable
......@@ -90,6 +108,9 @@ class ShaderLibrary final : angle::NonCopyable
angle::Result getImageClear_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut);
angle::Result getImageCopy_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut);
private:
RefCounted<ShaderAndSerial>
......@@ -101,6 +122,9 @@ class ShaderLibrary final : angle::NonCopyable
InternalShader::ConvertVertex_comp::kConversionMask];
RefCounted<ShaderAndSerial> mFullScreenQuad_vert_shaders[1];
RefCounted<ShaderAndSerial> mImageClear_frag_shaders[1];
RefCounted<ShaderAndSerial>
mImageCopy_frag_shaders[InternalShader::ImageCopy_frag::kSrcFormatMask |
InternalShader::ImageCopy_frag::kDestFormatMask];
};
} // namespace vk
} // namespace rx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment