Commit 6d9b8908 by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Merge Color and Depth/Stencil resolve shaders

There is a good deal of overlap in the way these shaders calculate offsets, flip etc. This change merges the two shaders together, as well as the UtilsVk functions that invoke them. This is in preparation for adding blit functionality to the same shader. Bug: angleproject:3200 Change-Id: Id7c2cf12e05db1802ae497766fb361fe4bef6479 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1635750 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
parent a2ad3619
......@@ -335,30 +335,30 @@
"084c1b02964cf2baefcc733b7f4e4786",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000015.inc":
"6a2e5e10e686370f3350a96cda2441a0",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000000.inc":
"4383093a2f16549fad7b693435284178",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000001.inc":
"21f96b0c3175d5b7e6d01635414ec376",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000002.inc":
"b6bfc26249df1ddd0beeed009037e101",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000003.inc":
"8f5aebf34010a7df080365a80efa5e04",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000004.inc":
"569364903ade942f5ebc482d4e3d917e",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000005.inc":
"a5d0c416d47045f2a27d878335eb719f",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000000.inc":
"de4c4c10ecb82ff8f55574f15a8b3e4b",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000001.inc":
"3ff50121e47e0f1ce1dfe302d573fb86",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000002.inc":
"be186017048b0ab4a494f3a82cad4b5f",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000003.inc":
"eae087130f7a5d4437984f24698a2f6f",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000004.inc":
"69e0611ce405ee7525af2a59fe3dce02",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000005.inc":
"ba039e31d7c2259337f80ed6038aafd5",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000000.inc":
"84fa20e6ba68fb79779a722267a1ad91",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000001.inc":
"83d7ac2143f0cf2c4aee30c19460b83e",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000002.inc":
"0ad619b74d9656525192fe1256ebf9a7",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000003.inc":
"08fb6f2d172844ed477ea9543de4100d",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000004.inc":
"9aa55cb9940e64b7b95d8cbdefdff423",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000005.inc":
"05335cdf088745d86888aecba393bca5",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000006.inc":
"d58c013c101739e4872fa3344a134aaa",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000007.inc":
"53203083fc6c9ca36d6d39c41fc0fee9",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000008.inc":
"bb20b6b10d20c8f38ac434f61cd38312",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000009.inc":
"9345a1e02ad4adfb2abcc9bc72270a2e",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.0000000A.inc":
"940cd724621b6c71c92c2f0ce86a15f2",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.0000000B.inc":
"285e1051de156004be9d0aeaf71d8ac9",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveStencilNoExport.comp.00000000.inc":
"46e731194edd3eca95a8aeade5fea543",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/gen/ResolveStencilNoExport.comp.00000001.inc":
......@@ -373,16 +373,14 @@
"7f562c60e5df018b0087ecb8642ac821",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/src/ImageCopy.frag":
"20c83ade1efb48a802dc34ca838a2be6",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/src/ResolveColor.frag":
"8279b03e2a8b9a495167bf7fe2567716",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/src/ResolveDepthStencil.frag":
"59a1e12ffdb34a4aacf92f96a4fe9c5a",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/src/Resolve.frag":
"3994385f9b857445423dc7abd2707554",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/shaders/src/ResolveStencilNoExport.comp":
"645d157257fd8b5315ed56cc12bc94b9",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp":
"0826fbfe8c7282b0c99739f75f32f3ed",
"f41ce1c729f1fb8adc179d7767cda072",
"Vulkan internal shader programs:src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.h":
"c2fe4b6694f433e53177ab9377e4f487",
"d903e4852d80ccb8b7f817728f8fb887",
"Vulkan internal shader programs:tools/glslang/glslang_validator.exe.sha1":
"9f1f0fc61116a657e065c40f9296e5ab",
"Vulkan internal shader programs:tools/glslang/glslang_validator.sha1":
......
......@@ -960,14 +960,15 @@ angle::Result FramebufferVk::resolve(ContextVk *contextVk,
bool hasShaderStencilExport =
contextVk->getRenderer()->getFeatures().supportsShaderStencilExport.enabled;
vk::ImageView noStencilView;
// Resolve depth. If shader stencil export is present, resolve stencil as well.
if (resolveDepthBuffer || (resolveStencilBuffer && hasShaderStencilExport))
{
ANGLE_TRY(utilsVk.depthStencilResolve(
contextVk, this, depthStencilImage, &depthView.get(),
hasShaderStencilExport ? &stencilView.get() : &noStencilView, params));
vk::ImageView *depth = resolveDepthBuffer ? &depthView.get() : nullptr;
vk::ImageView *stencil =
resolveStencilBuffer && hasShaderStencilExport ? &stencilView.get() : nullptr;
ANGLE_TRY(utilsVk.depthStencilResolve(contextVk, this, depthStencilImage, depth,
stencil, params));
}
// If shader stencil export is not present, resolve stencil through a different path.
......
......@@ -204,9 +204,9 @@ class UtilsVk : angle::NonCopyable
uint32_t destDefaultChannelsMask = 0;
};
struct ResolveColorShaderParams
struct ResolveShaderParams
{
// Structure matching PushConstants in ResolveColor.frag
// Structure matching PushConstants in Resolve.frag
int32_t srcExtent[2] = {};
int32_t srcOffset[2] = {};
int32_t destOffset[2] = {};
......@@ -218,17 +218,6 @@ class UtilsVk : angle::NonCopyable
uint32_t flipY = 0;
};
struct ResolveDepthStencilShaderParams
{
// Structure matching PushConstants in ResolveDepthStencil.frag
int32_t srcExtent[2] = {};
int32_t srcOffset[2] = {};
int32_t destOffset[2] = {};
int32_t srcLayer = 0;
uint32_t flipX = 0;
uint32_t flipY = 0;
};
struct ResolveStencilNoExportShaderParams
{
// Structure matching PushConstants in ResolveStencilNoExport.comp
......@@ -245,20 +234,19 @@ class UtilsVk : angle::NonCopyable
enum class Function
{
// Functions implemented in graphics
ImageClear = 0,
ImageCopy = 1,
ResolveColor = 2,
ResolveDepthStencil = 3,
ImageClear = 0,
ImageCopy = 1,
Resolve = 2,
// Functions implemented in compute
ComputeStartIndex = 4, // Special value to separate draw and dispatch functions.
BufferClear = 4,
BufferCopy = 5,
ConvertVertexBuffer = 6,
ResolveStencilNoExport = 7,
InvalidEnum = 8,
EnumCount = 8,
ComputeStartIndex = 3, // Special value to separate draw and dispatch functions.
BufferClear = 3,
BufferCopy = 4,
ConvertVertexBuffer = 5,
ResolveStencilNoExport = 6,
InvalidEnum = 7,
EnumCount = 7,
};
// Common function that creates the pipeline for the specified function, binds it and prepares
......@@ -295,8 +283,7 @@ class UtilsVk : angle::NonCopyable
angle::Result ensureConvertVertexResourcesInitialized(ContextVk *context);
angle::Result ensureImageClearResourcesInitialized(ContextVk *context);
angle::Result ensureImageCopyResourcesInitialized(ContextVk *context);
angle::Result ensureResolveColorResourcesInitialized(ContextVk *context);
angle::Result ensureResolveDepthStencilResourcesInitialized(ContextVk *context);
angle::Result ensureResolveResourcesInitialized(ContextVk *context);
angle::Result ensureResolveStencilNoExportResourcesInitialized(ContextVk *context);
angle::Result startRenderPass(ContextVk *contextVk,
......@@ -306,6 +293,15 @@ class UtilsVk : angle::NonCopyable
const gl::Rectangle &renderArea,
vk::CommandBuffer **commandBufferOut);
// Resolves either color or depth/stencil, based on which view is given.
angle::Result resolveImpl(ContextVk *contextVk,
FramebufferVk *framebuffer,
vk::ImageHelper *src,
const vk::ImageView *srcColorView,
const vk::ImageView *srcDepthView,
const vk::ImageView *srcStencilView,
const ResolveParameters &params);
angle::PackedEnumMap<Function, vk::DescriptorSetLayoutPointerArray> mDescriptorSetLayouts;
angle::PackedEnumMap<Function, vk::BindingPointer<vk::PipelineLayout>> mPipelineLayouts;
angle::PackedEnumMap<Function, vk::DynamicDescriptorPool> mDescriptorPools;
......@@ -324,12 +320,8 @@ class UtilsVk : angle::NonCopyable
vk::ShaderProgramHelper mImageCopyPrograms[vk::InternalShader::ImageCopy_frag::kFlagsMask |
vk::InternalShader::ImageCopy_frag::kSrcFormatMask |
vk::InternalShader::ImageCopy_frag::kDestFormatMask];
vk::ShaderProgramHelper
mResolveColorPrograms[vk::InternalShader::ResolveColor_frag::kFlagsMask |
vk::InternalShader::ResolveColor_frag::kFormatMask];
vk::ShaderProgramHelper
mResolveDepthStencilPrograms[vk::InternalShader::ResolveDepthStencil_frag::kFlagsMask |
vk::InternalShader::ResolveDepthStencil_frag::kResolveMask];
vk::ShaderProgramHelper mResolvePrograms[vk::InternalShader::Resolve_frag::kFlagsMask |
vk::InternalShader::Resolve_frag::kResolveMask];
vk::ShaderProgramHelper mResolveStencilNoExportPrograms
[vk::InternalShader::ResolveStencilNoExport_comp::kFlagsMask];
};
......
// 7.12.3226
#pragma once
const uint32_t kResolve_frag_00000006[] = {
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,0x00030010,0x00000004,0x0000000c,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,0x00060006,0x00000013,0x00000000,0x45637273,0x6e657478,0x00000074,
0x00060006,0x00000013,0x00000001,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,
0x00000002,0x74736564,0x7366664f,0x00007465,0x00060006,0x00000013,0x00000003,0x4c637273,
0x72657961,0x00000000,0x00050006,0x00000013,0x00000004,0x706d6173,0x0073656c,0x00060006,
0x00000013,0x00000005,0x53766e69,0x6c706d61,0x00007365,0x00060006,0x00000013,0x00000006,
0x7074756f,0x614d7475,0x00006b73,0x00050006,0x00000013,0x00000007,0x70696c66,0x00000058,
0x00050006,0x00000013,0x00000008,0x70696c66,0x00000059,0x00040005,0x00000015,0x61726170,
0x0000736d,0x00070005,0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,
0x00060005,0x00000036,0x49637273,0x6567616d,0x726f6f43,0x00007364,0x00070005,0x0000003d,
0x69577369,0x6e696874,0x42637253,0x646e756f,0x00000073,0x00050005,0x0000004d,0x74706564,
0x6c615668,0x00006575,0x00040005,0x00000054,0x74706564,0x00000068,0x00060005,0x0000005a,
0x465f6c67,0x44676172,0x68747065,0x00000000,0x00040047,0x0000000d,0x0000000b,0x0000000f,
0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,0x00050048,0x00000013,0x00000001,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000002,0x00000023,0x00000010,0x00050048,
0x00000013,0x00000003,0x00000023,0x00000018,0x00050048,0x00000013,0x00000004,0x00000023,
0x0000001c,0x00050048,0x00000013,0x00000005,0x00000023,0x00000020,0x00050048,0x00000013,
0x00000006,0x00000023,0x00000024,0x00050048,0x00000013,0x00000007,0x00000023,0x00000028,
0x00050048,0x00000013,0x00000008,0x00000023,0x0000002c,0x00030047,0x00000013,0x00000002,
0x00040047,0x00000054,0x00000022,0x00000000,0x00040047,0x00000054,0x00000021,0x00000000,
0x00040047,0x0000005a,0x0000000b,0x00000016,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,0x000b001e,0x00000013,0x00000007,0x00000007,
0x00000007,0x00000006,0x00000006,0x0000000a,0x00000006,0x00000012,0x00000012,0x00040020,
0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,0x0004002b,
0x00000006,0x00000016,0x00000002,0x00040020,0x00000017,0x00000009,0x00000007,0x0004002b,
0x00000006,0x0000001d,0x00000007,0x00040020,0x0000001e,0x00000009,0x00000012,0x00020014,
0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x00040020,0x00000026,0x00000007,
0x00000006,0x0004002b,0x00000006,0x0000002b,0x00000008,0x0004002b,0x00000012,0x00000031,
0x00000001,0x0004002b,0x00000006,0x00000037,0x00000001,0x00040020,0x0000003c,0x00000007,
0x00000021,0x0004002b,0x00000006,0x0000003e,0x00000000,0x0005002c,0x00000007,0x0000003f,
0x0000003e,0x0000003e,0x00040017,0x00000041,0x00000021,0x00000002,0x00040020,0x0000004c,
0x00000007,0x0000000a,0x0004002b,0x0000000a,0x0000004e,0x00000000,0x00090019,0x00000052,
0x0000000a,0x00000001,0x00000000,0x00000000,0x00000001,0x00000001,0x00000000,0x00040020,
0x00000053,0x00000000,0x00000052,0x0004003b,0x00000053,0x00000054,0x00000000,0x00040020,
0x00000059,0x00000003,0x0000000a,0x0004003b,0x00000059,0x0000005a,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x00000008,
0x00000036,0x00000007,0x0004003b,0x0000003c,0x0000003d,0x00000007,0x0004003b,0x0000004c,
0x0000004d,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,0x00000026,0x00000027,0x0000001b,0x00000022,0x0004003d,0x00000006,0x00000028,
0x00000027,0x0004007e,0x00000006,0x00000029,0x00000028,0x00050041,0x00000026,0x0000002a,
0x0000001b,0x00000022,0x0003003e,0x0000002a,0x00000029,0x000200f9,0x00000025,0x000200f8,
0x00000025,0x00050041,0x0000001e,0x0000002c,0x00000015,0x0000002b,0x0004003d,0x00000012,
0x0000002d,0x0000002c,0x000500ab,0x00000021,0x0000002e,0x0000002d,0x00000022,0x000300f7,
0x00000030,0x00000000,0x000400fa,0x0000002e,0x0000002f,0x00000030,0x000200f8,0x0000002f,
0x00050041,0x00000026,0x00000032,0x0000001b,0x00000031,0x0004003d,0x00000006,0x00000033,
0x00000032,0x0004007e,0x00000006,0x00000034,0x00000033,0x00050041,0x00000026,0x00000035,
0x0000001b,0x00000031,0x0003003e,0x00000035,0x00000034,0x000200f9,0x00000030,0x000200f8,
0x00000030,0x00050041,0x00000017,0x00000038,0x00000015,0x00000037,0x0004003d,0x00000007,
0x00000039,0x00000038,0x0004003d,0x00000007,0x0000003a,0x0000001b,0x00050080,0x00000007,
0x0000003b,0x00000039,0x0000003a,0x0003003e,0x00000036,0x0000003b,0x0004003d,0x00000007,
0x00000040,0x00000036,0x000500b3,0x00000041,0x00000042,0x0000003f,0x00000040,0x0004009a,
0x00000021,0x00000043,0x00000042,0x000300f7,0x00000045,0x00000000,0x000400fa,0x00000043,
0x00000044,0x00000045,0x000200f8,0x00000044,0x0004003d,0x00000007,0x00000046,0x00000036,
0x00050041,0x00000017,0x00000047,0x00000015,0x0000003e,0x0004003d,0x00000007,0x00000048,
0x00000047,0x000500b1,0x00000041,0x00000049,0x00000046,0x00000048,0x0004009a,0x00000021,
0x0000004a,0x00000049,0x000200f9,0x00000045,0x000200f8,0x00000045,0x000700f5,0x00000021,
0x0000004b,0x00000043,0x00000030,0x0000004a,0x00000044,0x0003003e,0x0000003d,0x0000004b,
0x0003003e,0x0000004d,0x0000004e,0x0004003d,0x00000021,0x0000004f,0x0000003d,0x000300f7,
0x00000051,0x00000000,0x000400fa,0x0000004f,0x00000050,0x00000051,0x000200f8,0x00000050,
0x0004003d,0x00000052,0x00000055,0x00000054,0x0004003d,0x00000007,0x00000056,0x00000036,
0x0007005f,0x0000000b,0x00000057,0x00000055,0x00000056,0x00000040,0x0000003e,0x00050051,
0x0000000a,0x00000058,0x00000057,0x00000000,0x0003003e,0x0000004d,0x00000058,0x000200f9,
0x00000051,0x000200f8,0x00000051,0x0004003d,0x0000000a,0x0000005b,0x0000004d,0x0003003e,
0x0000005a,0x0000005b,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(push_constant)uniform PushConstants {
ivec2 srcExtent;
ivec2 srcOffset;
ivec2 destOffset;
int srcLayer;
int samples;
float invSamples;
int outputMask;
bool flipX;
bool flipY;
} params;
layout(set = 0, binding = 0)uniform texture2DMS depth;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipX)
srcSubImageCoords . x = - srcSubImageCoords . x;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec2 srcImageCoords = params . srcOffset + srcSubImageCoords;
bool isWithinSrcBounds = any(lessThanEqual(ivec2(0), srcImageCoords))&&
any(lessThan(srcImageCoords, params . srcExtent));
float depthValue = 0;
if(isWithinSrcBounds)
{
depthValue = texelFetch(depth, srcImageCoords, 0). x;
}
gl_FragDepth = depthValue;
}
#endif // Preprocessed code
// 7.12.3226
#pragma once
const uint32_t kResolve_frag_00000007[] = {
0x07230203,0x00010000,0x00080007,0x00000064,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000062,0x00030010,
0x00000004,0x00000007,0x00030010,0x00000004,0x0000000c,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,0x00060006,0x00000013,0x00000000,0x45637273,0x6e657478,0x00000074,
0x00060006,0x00000013,0x00000001,0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,
0x00000002,0x74736564,0x7366664f,0x00007465,0x00060006,0x00000013,0x00000003,0x4c637273,
0x72657961,0x00000000,0x00050006,0x00000013,0x00000004,0x706d6173,0x0073656c,0x00060006,
0x00000013,0x00000005,0x53766e69,0x6c706d61,0x00007365,0x00060006,0x00000013,0x00000006,
0x7074756f,0x614d7475,0x00006b73,0x00050006,0x00000013,0x00000007,0x70696c66,0x00000058,
0x00050006,0x00000013,0x00000008,0x70696c66,0x00000059,0x00040005,0x00000015,0x61726170,
0x0000736d,0x00070005,0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,
0x00060005,0x00000036,0x49637273,0x6567616d,0x726f6f43,0x00007364,0x00070005,0x0000003d,
0x69577369,0x6e696874,0x42637253,0x646e756f,0x00000073,0x00050005,0x0000004d,0x74706564,
0x6c615668,0x00006575,0x00040005,0x00000054,0x74706564,0x00000068,0x00060005,0x00000062,
0x465f6c67,0x44676172,0x68747065,0x00000000,0x00040047,0x0000000d,0x0000000b,0x0000000f,
0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,0x00050048,0x00000013,0x00000001,
0x00000023,0x00000008,0x00050048,0x00000013,0x00000002,0x00000023,0x00000010,0x00050048,
0x00000013,0x00000003,0x00000023,0x00000018,0x00050048,0x00000013,0x00000004,0x00000023,
0x0000001c,0x00050048,0x00000013,0x00000005,0x00000023,0x00000020,0x00050048,0x00000013,
0x00000006,0x00000023,0x00000024,0x00050048,0x00000013,0x00000007,0x00000023,0x00000028,
0x00050048,0x00000013,0x00000008,0x00000023,0x0000002c,0x00030047,0x00000013,0x00000002,
0x00040047,0x00000054,0x00000022,0x00000000,0x00040047,0x00000054,0x00000021,0x00000000,
0x00040047,0x00000062,0x0000000b,0x00000016,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,0x000b001e,0x00000013,0x00000007,0x00000007,
0x00000007,0x00000006,0x00000006,0x0000000a,0x00000006,0x00000012,0x00000012,0x00040020,
0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,0x0004002b,
0x00000006,0x00000016,0x00000002,0x00040020,0x00000017,0x00000009,0x00000007,0x0004002b,
0x00000006,0x0000001d,0x00000007,0x00040020,0x0000001e,0x00000009,0x00000012,0x00020014,
0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x00040020,0x00000026,0x00000007,
0x00000006,0x0004002b,0x00000006,0x0000002b,0x00000008,0x0004002b,0x00000012,0x00000031,
0x00000001,0x0004002b,0x00000006,0x00000037,0x00000001,0x00040020,0x0000003c,0x00000007,
0x00000021,0x0004002b,0x00000006,0x0000003e,0x00000000,0x0005002c,0x00000007,0x0000003f,
0x0000003e,0x0000003e,0x00040017,0x00000041,0x00000021,0x00000002,0x00040020,0x0000004c,
0x00000007,0x0000000a,0x0004002b,0x0000000a,0x0000004e,0x00000000,0x00090019,0x00000052,
0x0000000a,0x00000001,0x00000000,0x00000001,0x00000001,0x00000001,0x00000000,0x00040020,
0x00000053,0x00000000,0x00000052,0x0004003b,0x00000053,0x00000054,0x00000000,0x0004002b,
0x00000006,0x00000057,0x00000003,0x00040020,0x00000058,0x00000009,0x00000006,0x00040017,
0x0000005b,0x00000006,0x00000003,0x00040020,0x00000061,0x00000003,0x0000000a,0x0004003b,
0x00000061,0x00000062,0x00000003,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,
0x000200f8,0x00000005,0x0004003b,0x00000008,0x00000009,0x00000007,0x0004003b,0x00000008,
0x0000001b,0x00000007,0x0004003b,0x00000008,0x00000036,0x00000007,0x0004003b,0x0000003c,
0x0000003d,0x00000007,0x0004003b,0x0000004c,0x0000004d,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,0x00000026,0x00000027,0x0000001b,
0x00000022,0x0004003d,0x00000006,0x00000028,0x00000027,0x0004007e,0x00000006,0x00000029,
0x00000028,0x00050041,0x00000026,0x0000002a,0x0000001b,0x00000022,0x0003003e,0x0000002a,
0x00000029,0x000200f9,0x00000025,0x000200f8,0x00000025,0x00050041,0x0000001e,0x0000002c,
0x00000015,0x0000002b,0x0004003d,0x00000012,0x0000002d,0x0000002c,0x000500ab,0x00000021,
0x0000002e,0x0000002d,0x00000022,0x000300f7,0x00000030,0x00000000,0x000400fa,0x0000002e,
0x0000002f,0x00000030,0x000200f8,0x0000002f,0x00050041,0x00000026,0x00000032,0x0000001b,
0x00000031,0x0004003d,0x00000006,0x00000033,0x00000032,0x0004007e,0x00000006,0x00000034,
0x00000033,0x00050041,0x00000026,0x00000035,0x0000001b,0x00000031,0x0003003e,0x00000035,
0x00000034,0x000200f9,0x00000030,0x000200f8,0x00000030,0x00050041,0x00000017,0x00000038,
0x00000015,0x00000037,0x0004003d,0x00000007,0x00000039,0x00000038,0x0004003d,0x00000007,
0x0000003a,0x0000001b,0x00050080,0x00000007,0x0000003b,0x00000039,0x0000003a,0x0003003e,
0x00000036,0x0000003b,0x0004003d,0x00000007,0x00000040,0x00000036,0x000500b3,0x00000041,
0x00000042,0x0000003f,0x00000040,0x0004009a,0x00000021,0x00000043,0x00000042,0x000300f7,
0x00000045,0x00000000,0x000400fa,0x00000043,0x00000044,0x00000045,0x000200f8,0x00000044,
0x0004003d,0x00000007,0x00000046,0x00000036,0x00050041,0x00000017,0x00000047,0x00000015,
0x0000003e,0x0004003d,0x00000007,0x00000048,0x00000047,0x000500b1,0x00000041,0x00000049,
0x00000046,0x00000048,0x0004009a,0x00000021,0x0000004a,0x00000049,0x000200f9,0x00000045,
0x000200f8,0x00000045,0x000700f5,0x00000021,0x0000004b,0x00000043,0x00000030,0x0000004a,
0x00000044,0x0003003e,0x0000003d,0x0000004b,0x0003003e,0x0000004d,0x0000004e,0x0004003d,
0x00000021,0x0000004f,0x0000003d,0x000300f7,0x00000051,0x00000000,0x000400fa,0x0000004f,
0x00000050,0x00000051,0x000200f8,0x00000050,0x0004003d,0x00000052,0x00000055,0x00000054,
0x0004003d,0x00000007,0x00000056,0x00000036,0x00050041,0x00000058,0x00000059,0x00000015,
0x00000057,0x0004003d,0x00000006,0x0000005a,0x00000059,0x00050051,0x00000006,0x0000005c,
0x00000056,0x00000000,0x00050051,0x00000006,0x0000005d,0x00000056,0x00000001,0x00060050,
0x0000005b,0x0000005e,0x0000005c,0x0000005d,0x0000005a,0x0007005f,0x0000000b,0x0000005f,
0x00000055,0x0000005e,0x00000040,0x0000003e,0x00050051,0x0000000a,0x00000060,0x0000005f,
0x00000000,0x0003003e,0x0000004d,0x00000060,0x000200f9,0x00000051,0x000200f8,0x00000051,
0x0004003d,0x0000000a,0x00000063,0x0000004d,0x0003003e,0x00000062,0x00000063,0x000100fd,
0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
layout(push_constant)uniform PushConstants {
ivec2 srcExtent;
ivec2 srcOffset;
ivec2 destOffset;
int srcLayer;
int samples;
float invSamples;
int outputMask;
bool flipX;
bool flipY;
} params;
layout(set = 0, binding = 0)uniform texture2DMSArray depth;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipX)
srcSubImageCoords . x = - srcSubImageCoords . x;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec2 srcImageCoords = params . srcOffset + srcSubImageCoords;
bool isWithinSrcBounds = any(lessThanEqual(ivec2(0), srcImageCoords))&&
any(lessThan(srcImageCoords, params . srcExtent));
float depthValue = 0;
if(isWithinSrcBounds)
{
depthValue = texelFetch(depth, ivec3(srcImageCoords, params . srcLayer), 0). x;
}
gl_FragDepth = depthValue;
}
#endif // Preprocessed code
// 7.12.3226
#pragma once
const uint32_t kResolve_frag_00000008[] = {
0x07230203,0x00010000,0x00080007,0x0000005d,0x00000000,0x00020011,0x00000001,0x00020011,
0x00001395,0x0009000a,0x5f565053,0x5f545845,0x64616873,0x735f7265,0x636e6574,0x655f6c69,
0x726f7078,0x00000074,0x0006000b,0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,
0x0003000e,0x00000000,0x00000001,0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,
0x0000000d,0x0000005a,0x00030010,0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,
0x00090004,0x415f4c47,0x735f4252,0x65646168,0x74735f72,0x69636e65,0x78655f6c,0x74726f70,
0x00000000,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,0x00060006,0x00000013,0x00000000,0x45637273,0x6e657478,
0x00000074,0x00060006,0x00000013,0x00000001,0x4f637273,0x65736666,0x00000074,0x00060006,
0x00000013,0x00000002,0x74736564,0x7366664f,0x00007465,0x00060006,0x00000013,0x00000003,
0x4c637273,0x72657961,0x00000000,0x00050006,0x00000013,0x00000004,0x706d6173,0x0073656c,
0x00060006,0x00000013,0x00000005,0x53766e69,0x6c706d61,0x00007365,0x00060006,0x00000013,
0x00000006,0x7074756f,0x614d7475,0x00006b73,0x00050006,0x00000013,0x00000007,0x70696c66,
0x00000058,0x00050006,0x00000013,0x00000008,0x70696c66,0x00000059,0x00040005,0x00000015,
0x61726170,0x0000736d,0x00070005,0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,
0x00000073,0x00060005,0x00000036,0x49637273,0x6567616d,0x726f6f43,0x00007364,0x00070005,
0x0000003d,0x69577369,0x6e696874,0x42637253,0x646e756f,0x00000073,0x00060005,0x0000004d,
0x6e657473,0x566c6963,0x65756c61,0x00000000,0x00040005,0x00000053,0x6e657473,0x006c6963,
0x00080005,0x0000005a,0x465f6c67,0x53676172,0x636e6574,0x65526c69,0x42524166,0x00000000,
0x00040047,0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,
0x00000000,0x00050048,0x00000013,0x00000001,0x00000023,0x00000008,0x00050048,0x00000013,
0x00000002,0x00000023,0x00000010,0x00050048,0x00000013,0x00000003,0x00000023,0x00000018,
0x00050048,0x00000013,0x00000004,0x00000023,0x0000001c,0x00050048,0x00000013,0x00000005,
0x00000023,0x00000020,0x00050048,0x00000013,0x00000006,0x00000023,0x00000024,0x00050048,
0x00000013,0x00000007,0x00000023,0x00000028,0x00050048,0x00000013,0x00000008,0x00000023,
0x0000002c,0x00030047,0x00000013,0x00000002,0x00040047,0x00000053,0x00000022,0x00000000,
0x00040047,0x00000053,0x00000021,0x00000001,0x00040047,0x0000005a,0x0000000b,0x00001396,
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,
0x000b001e,0x00000013,0x00000007,0x00000007,0x00000007,0x00000006,0x00000006,0x0000000a,
0x00000006,0x00000012,0x00000012,0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,
0x00000014,0x00000015,0x00000009,0x0004002b,0x00000006,0x00000016,0x00000002,0x00040020,
0x00000017,0x00000009,0x00000007,0x0004002b,0x00000006,0x0000001d,0x00000007,0x00040020,
0x0000001e,0x00000009,0x00000012,0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,
0x00000000,0x00040020,0x00000026,0x00000007,0x00000006,0x0004002b,0x00000006,0x0000002b,
0x00000008,0x0004002b,0x00000012,0x00000031,0x00000001,0x0004002b,0x00000006,0x00000037,
0x00000001,0x00040020,0x0000003c,0x00000007,0x00000021,0x0004002b,0x00000006,0x0000003e,
0x00000000,0x0005002c,0x00000007,0x0000003f,0x0000003e,0x0000003e,0x00040017,0x00000041,
0x00000021,0x00000002,0x00040020,0x0000004c,0x00000007,0x00000012,0x00090019,0x00000051,
0x00000012,0x00000001,0x00000000,0x00000000,0x00000001,0x00000001,0x00000000,0x00040020,
0x00000052,0x00000000,0x00000051,0x0004003b,0x00000052,0x00000053,0x00000000,0x00040017,
0x00000056,0x00000012,0x00000004,0x00040020,0x00000059,0x00000003,0x00000006,0x0004003b,
0x00000059,0x0000005a,0x00000003,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,
0x000200f8,0x00000005,0x0004003b,0x00000008,0x00000009,0x00000007,0x0004003b,0x00000008,
0x0000001b,0x00000007,0x0004003b,0x00000008,0x00000036,0x00000007,0x0004003b,0x0000003c,
0x0000003d,0x00000007,0x0004003b,0x0000004c,0x0000004d,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,0x00000026,0x00000027,0x0000001b,
0x00000022,0x0004003d,0x00000006,0x00000028,0x00000027,0x0004007e,0x00000006,0x00000029,
0x00000028,0x00050041,0x00000026,0x0000002a,0x0000001b,0x00000022,0x0003003e,0x0000002a,
0x00000029,0x000200f9,0x00000025,0x000200f8,0x00000025,0x00050041,0x0000001e,0x0000002c,
0x00000015,0x0000002b,0x0004003d,0x00000012,0x0000002d,0x0000002c,0x000500ab,0x00000021,
0x0000002e,0x0000002d,0x00000022,0x000300f7,0x00000030,0x00000000,0x000400fa,0x0000002e,
0x0000002f,0x00000030,0x000200f8,0x0000002f,0x00050041,0x00000026,0x00000032,0x0000001b,
0x00000031,0x0004003d,0x00000006,0x00000033,0x00000032,0x0004007e,0x00000006,0x00000034,
0x00000033,0x00050041,0x00000026,0x00000035,0x0000001b,0x00000031,0x0003003e,0x00000035,
0x00000034,0x000200f9,0x00000030,0x000200f8,0x00000030,0x00050041,0x00000017,0x00000038,
0x00000015,0x00000037,0x0004003d,0x00000007,0x00000039,0x00000038,0x0004003d,0x00000007,
0x0000003a,0x0000001b,0x00050080,0x00000007,0x0000003b,0x00000039,0x0000003a,0x0003003e,
0x00000036,0x0000003b,0x0004003d,0x00000007,0x00000040,0x00000036,0x000500b3,0x00000041,
0x00000042,0x0000003f,0x00000040,0x0004009a,0x00000021,0x00000043,0x00000042,0x000300f7,
0x00000045,0x00000000,0x000400fa,0x00000043,0x00000044,0x00000045,0x000200f8,0x00000044,
0x0004003d,0x00000007,0x00000046,0x00000036,0x00050041,0x00000017,0x00000047,0x00000015,
0x0000003e,0x0004003d,0x00000007,0x00000048,0x00000047,0x000500b1,0x00000041,0x00000049,
0x00000046,0x00000048,0x0004009a,0x00000021,0x0000004a,0x00000049,0x000200f9,0x00000045,
0x000200f8,0x00000045,0x000700f5,0x00000021,0x0000004b,0x00000043,0x00000030,0x0000004a,
0x00000044,0x0003003e,0x0000003d,0x0000004b,0x0003003e,0x0000004d,0x00000022,0x0004003d,
0x00000021,0x0000004e,0x0000003d,0x000300f7,0x00000050,0x00000000,0x000400fa,0x0000004e,
0x0000004f,0x00000050,0x000200f8,0x0000004f,0x0004003d,0x00000051,0x00000054,0x00000053,
0x0004003d,0x00000007,0x00000055,0x00000036,0x0007005f,0x00000056,0x00000057,0x00000054,
0x00000055,0x00000040,0x0000003e,0x00050051,0x00000012,0x00000058,0x00000057,0x00000000,
0x0003003e,0x0000004d,0x00000058,0x000200f9,0x00000050,0x000200f8,0x00000050,0x0004003d,
0x00000012,0x0000005b,0x0000004d,0x0004007c,0x00000006,0x0000005c,0x0000005b,0x0003003e,
0x0000005a,0x0000005c,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
#extension GL_ARB_shader_stencil_export : require
layout(push_constant)uniform PushConstants {
ivec2 srcExtent;
ivec2 srcOffset;
ivec2 destOffset;
int srcLayer;
int samples;
float invSamples;
int outputMask;
bool flipX;
bool flipY;
} params;
layout(set = 0, binding = 1)uniform utexture2DMS stencil;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipX)
srcSubImageCoords . x = - srcSubImageCoords . x;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec2 srcImageCoords = params . srcOffset + srcSubImageCoords;
bool isWithinSrcBounds = any(lessThanEqual(ivec2(0), srcImageCoords))&&
any(lessThan(srcImageCoords, params . srcExtent));
uint stencilValue = 0;
if(isWithinSrcBounds)
{
stencilValue = texelFetch(stencil, srcImageCoords, 0). x;
}
gl_FragStencilRefARB = int(stencilValue);
}
#endif // Preprocessed code
// 7.12.3226
#pragma once
const uint32_t kResolve_frag_00000009[] = {
0x07230203,0x00010000,0x00080007,0x00000065,0x00000000,0x00020011,0x00000001,0x00020011,
0x00001395,0x0009000a,0x5f565053,0x5f545845,0x64616873,0x735f7265,0x636e6574,0x655f6c69,
0x726f7078,0x00000074,0x0006000b,0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,
0x0003000e,0x00000000,0x00000001,0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,
0x0000000d,0x00000062,0x00030010,0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,
0x00090004,0x415f4c47,0x735f4252,0x65646168,0x74735f72,0x69636e65,0x78655f6c,0x74726f70,
0x00000000,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,0x00060006,0x00000013,0x00000000,0x45637273,0x6e657478,
0x00000074,0x00060006,0x00000013,0x00000001,0x4f637273,0x65736666,0x00000074,0x00060006,
0x00000013,0x00000002,0x74736564,0x7366664f,0x00007465,0x00060006,0x00000013,0x00000003,
0x4c637273,0x72657961,0x00000000,0x00050006,0x00000013,0x00000004,0x706d6173,0x0073656c,
0x00060006,0x00000013,0x00000005,0x53766e69,0x6c706d61,0x00007365,0x00060006,0x00000013,
0x00000006,0x7074756f,0x614d7475,0x00006b73,0x00050006,0x00000013,0x00000007,0x70696c66,
0x00000058,0x00050006,0x00000013,0x00000008,0x70696c66,0x00000059,0x00040005,0x00000015,
0x61726170,0x0000736d,0x00070005,0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,
0x00000073,0x00060005,0x00000036,0x49637273,0x6567616d,0x726f6f43,0x00007364,0x00070005,
0x0000003d,0x69577369,0x6e696874,0x42637253,0x646e756f,0x00000073,0x00060005,0x0000004d,
0x6e657473,0x566c6963,0x65756c61,0x00000000,0x00040005,0x00000053,0x6e657473,0x006c6963,
0x00080005,0x00000062,0x465f6c67,0x53676172,0x636e6574,0x65526c69,0x42524166,0x00000000,
0x00040047,0x0000000d,0x0000000b,0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,
0x00000000,0x00050048,0x00000013,0x00000001,0x00000023,0x00000008,0x00050048,0x00000013,
0x00000002,0x00000023,0x00000010,0x00050048,0x00000013,0x00000003,0x00000023,0x00000018,
0x00050048,0x00000013,0x00000004,0x00000023,0x0000001c,0x00050048,0x00000013,0x00000005,
0x00000023,0x00000020,0x00050048,0x00000013,0x00000006,0x00000023,0x00000024,0x00050048,
0x00000013,0x00000007,0x00000023,0x00000028,0x00050048,0x00000013,0x00000008,0x00000023,
0x0000002c,0x00030047,0x00000013,0x00000002,0x00040047,0x00000053,0x00000022,0x00000000,
0x00040047,0x00000053,0x00000021,0x00000001,0x00040047,0x00000062,0x0000000b,0x00001396,
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,
0x000b001e,0x00000013,0x00000007,0x00000007,0x00000007,0x00000006,0x00000006,0x0000000a,
0x00000006,0x00000012,0x00000012,0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,
0x00000014,0x00000015,0x00000009,0x0004002b,0x00000006,0x00000016,0x00000002,0x00040020,
0x00000017,0x00000009,0x00000007,0x0004002b,0x00000006,0x0000001d,0x00000007,0x00040020,
0x0000001e,0x00000009,0x00000012,0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,
0x00000000,0x00040020,0x00000026,0x00000007,0x00000006,0x0004002b,0x00000006,0x0000002b,
0x00000008,0x0004002b,0x00000012,0x00000031,0x00000001,0x0004002b,0x00000006,0x00000037,
0x00000001,0x00040020,0x0000003c,0x00000007,0x00000021,0x0004002b,0x00000006,0x0000003e,
0x00000000,0x0005002c,0x00000007,0x0000003f,0x0000003e,0x0000003e,0x00040017,0x00000041,
0x00000021,0x00000002,0x00040020,0x0000004c,0x00000007,0x00000012,0x00090019,0x00000051,
0x00000012,0x00000001,0x00000000,0x00000001,0x00000001,0x00000001,0x00000000,0x00040020,
0x00000052,0x00000000,0x00000051,0x0004003b,0x00000052,0x00000053,0x00000000,0x0004002b,
0x00000006,0x00000056,0x00000003,0x00040020,0x00000057,0x00000009,0x00000006,0x00040017,
0x0000005a,0x00000006,0x00000003,0x00040017,0x0000005e,0x00000012,0x00000004,0x00040020,
0x00000061,0x00000003,0x00000006,0x0004003b,0x00000061,0x00000062,0x00000003,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x00000008,
0x00000036,0x00000007,0x0004003b,0x0000003c,0x0000003d,0x00000007,0x0004003b,0x0000004c,
0x0000004d,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,0x00000026,0x00000027,0x0000001b,0x00000022,0x0004003d,0x00000006,0x00000028,
0x00000027,0x0004007e,0x00000006,0x00000029,0x00000028,0x00050041,0x00000026,0x0000002a,
0x0000001b,0x00000022,0x0003003e,0x0000002a,0x00000029,0x000200f9,0x00000025,0x000200f8,
0x00000025,0x00050041,0x0000001e,0x0000002c,0x00000015,0x0000002b,0x0004003d,0x00000012,
0x0000002d,0x0000002c,0x000500ab,0x00000021,0x0000002e,0x0000002d,0x00000022,0x000300f7,
0x00000030,0x00000000,0x000400fa,0x0000002e,0x0000002f,0x00000030,0x000200f8,0x0000002f,
0x00050041,0x00000026,0x00000032,0x0000001b,0x00000031,0x0004003d,0x00000006,0x00000033,
0x00000032,0x0004007e,0x00000006,0x00000034,0x00000033,0x00050041,0x00000026,0x00000035,
0x0000001b,0x00000031,0x0003003e,0x00000035,0x00000034,0x000200f9,0x00000030,0x000200f8,
0x00000030,0x00050041,0x00000017,0x00000038,0x00000015,0x00000037,0x0004003d,0x00000007,
0x00000039,0x00000038,0x0004003d,0x00000007,0x0000003a,0x0000001b,0x00050080,0x00000007,
0x0000003b,0x00000039,0x0000003a,0x0003003e,0x00000036,0x0000003b,0x0004003d,0x00000007,
0x00000040,0x00000036,0x000500b3,0x00000041,0x00000042,0x0000003f,0x00000040,0x0004009a,
0x00000021,0x00000043,0x00000042,0x000300f7,0x00000045,0x00000000,0x000400fa,0x00000043,
0x00000044,0x00000045,0x000200f8,0x00000044,0x0004003d,0x00000007,0x00000046,0x00000036,
0x00050041,0x00000017,0x00000047,0x00000015,0x0000003e,0x0004003d,0x00000007,0x00000048,
0x00000047,0x000500b1,0x00000041,0x00000049,0x00000046,0x00000048,0x0004009a,0x00000021,
0x0000004a,0x00000049,0x000200f9,0x00000045,0x000200f8,0x00000045,0x000700f5,0x00000021,
0x0000004b,0x00000043,0x00000030,0x0000004a,0x00000044,0x0003003e,0x0000003d,0x0000004b,
0x0003003e,0x0000004d,0x00000022,0x0004003d,0x00000021,0x0000004e,0x0000003d,0x000300f7,
0x00000050,0x00000000,0x000400fa,0x0000004e,0x0000004f,0x00000050,0x000200f8,0x0000004f,
0x0004003d,0x00000051,0x00000054,0x00000053,0x0004003d,0x00000007,0x00000055,0x00000036,
0x00050041,0x00000057,0x00000058,0x00000015,0x00000056,0x0004003d,0x00000006,0x00000059,
0x00000058,0x00050051,0x00000006,0x0000005b,0x00000055,0x00000000,0x00050051,0x00000006,
0x0000005c,0x00000055,0x00000001,0x00060050,0x0000005a,0x0000005d,0x0000005b,0x0000005c,
0x00000059,0x0007005f,0x0000005e,0x0000005f,0x00000054,0x0000005d,0x00000040,0x0000003e,
0x00050051,0x00000012,0x00000060,0x0000005f,0x00000000,0x0003003e,0x0000004d,0x00000060,
0x000200f9,0x00000050,0x000200f8,0x00000050,0x0004003d,0x00000012,0x00000063,0x0000004d,
0x0004007c,0x00000006,0x00000064,0x00000063,0x0003003e,0x00000062,0x00000064,0x000100fd,
0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
#extension GL_ARB_shader_stencil_export : require
layout(push_constant)uniform PushConstants {
ivec2 srcExtent;
ivec2 srcOffset;
ivec2 destOffset;
int srcLayer;
int samples;
float invSamples;
int outputMask;
bool flipX;
bool flipY;
} params;
layout(set = 0, binding = 1)uniform utexture2DMSArray stencil;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipX)
srcSubImageCoords . x = - srcSubImageCoords . x;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec2 srcImageCoords = params . srcOffset + srcSubImageCoords;
bool isWithinSrcBounds = any(lessThanEqual(ivec2(0), srcImageCoords))&&
any(lessThan(srcImageCoords, params . srcExtent));
uint stencilValue = 0;
if(isWithinSrcBounds)
{
stencilValue = texelFetch(stencil, ivec3(srcImageCoords, params . srcLayer), 0). x;
}
gl_FragStencilRefARB = int(stencilValue);
}
#endif // Preprocessed code
// 7.12.3226
#pragma once
const uint32_t kResolveDepthStencil_frag_00000000[] = {
0x07230203,0x00010000,0x00080007,0x0000005d,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x0000005b,0x00030010,
0x00000004,0x00000007,0x00030010,0x00000004,0x0000000c,0x00030003,0x00000002,0x000001c2,
0x00090004,0x415f4c47,0x735f4252,0x65646168,0x74735f72,0x69636e65,0x78655f6c,0x74726f70,
0x00000000,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,0x00060006,0x00000013,0x00000000,0x45637273,0x6e657478,
0x00000074,0x00060006,0x00000013,0x00000001,0x4f637273,0x65736666,0x00000074,0x00060006,
0x00000013,0x00000002,0x74736564,0x7366664f,0x00007465,0x00060006,0x00000013,0x00000003,
0x4c637273,0x72657961,0x00000000,0x00050006,0x00000013,0x00000004,0x70696c66,0x00000058,
0x00050006,0x00000013,0x00000005,0x70696c66,0x00000059,0x00040005,0x00000015,0x61726170,
0x0000736d,0x00070005,0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,
0x00060005,0x00000036,0x49637273,0x6567616d,0x726f6f43,0x00007364,0x00050005,0x0000004e,
0x74706564,0x6c615668,0x00006575,0x00060005,0x00000051,0x6e657473,0x566c6963,0x65756c61,
0x00000000,0x00040005,0x00000055,0x74706564,0x00000068,0x00060005,0x0000005b,0x465f6c67,
0x44676172,0x68747065,0x00000000,0x00040047,0x0000000d,0x0000000b,0x0000000f,0x00050048,
0x00000013,0x00000000,0x00000023,0x00000000,0x00050048,0x00000013,0x00000001,0x00000023,
0x00000008,0x00050048,0x00000013,0x00000002,0x00000023,0x00000010,0x00050048,0x00000013,
0x00000003,0x00000023,0x00000018,0x00050048,0x00000013,0x00000004,0x00000023,0x0000001c,
0x00050048,0x00000013,0x00000005,0x00000023,0x00000020,0x00030047,0x00000013,0x00000002,
0x00040047,0x00000055,0x00000022,0x00000000,0x00040047,0x00000055,0x00000021,0x00000000,
0x00040047,0x0000005b,0x0000000b,0x00000016,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,0x00000007,0x00000007,
0x00000007,0x00000006,0x00000012,0x00000012,0x00040020,0x00000014,0x00000009,0x00000013,
0x0004003b,0x00000014,0x00000015,0x00000009,0x0004002b,0x00000006,0x00000016,0x00000002,
0x00040020,0x00000017,0x00000009,0x00000007,0x0004002b,0x00000006,0x0000001d,0x00000004,
0x00040020,0x0000001e,0x00000009,0x00000012,0x00020014,0x00000021,0x0004002b,0x00000012,
0x00000022,0x00000000,0x00040020,0x00000026,0x00000007,0x00000006,0x0004002b,0x00000006,
0x0000002b,0x00000005,0x0004002b,0x00000012,0x00000031,0x00000001,0x0004002b,0x00000006,
0x00000037,0x00000001,0x0004002b,0x00000006,0x0000003d,0x00000000,0x0005002c,0x00000007,
0x0000003e,0x0000003d,0x0000003d,0x00040017,0x0000003f,0x00000021,0x00000002,0x00040020,
0x0000004d,0x00000007,0x0000000a,0x0004002b,0x0000000a,0x0000004f,0x00000000,0x00040020,
0x00000050,0x00000007,0x00000012,0x00090019,0x00000053,0x0000000a,0x00000001,0x00000000,
0x00000000,0x00000001,0x00000001,0x00000000,0x00040020,0x00000054,0x00000000,0x00000053,
0x0004003b,0x00000054,0x00000055,0x00000000,0x00040020,0x0000005a,0x00000003,0x0000000a,
0x0004003b,0x0000005a,0x0000005b,0x00000003,0x00050036,0x00000002,0x00000004,0x00000000,
0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,0x00000009,0x00000007,0x0004003b,
0x00000008,0x0000001b,0x00000007,0x0004003b,0x00000008,0x00000036,0x00000007,0x0004003b,
0x0000004d,0x0000004e,0x00000007,0x0004003b,0x00000050,0x00000051,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,0x00000026,0x00000027,
0x0000001b,0x00000022,0x0004003d,0x00000006,0x00000028,0x00000027,0x0004007e,0x00000006,
0x00000029,0x00000028,0x00050041,0x00000026,0x0000002a,0x0000001b,0x00000022,0x0003003e,
0x0000002a,0x00000029,0x000200f9,0x00000025,0x000200f8,0x00000025,0x00050041,0x0000001e,
0x0000002c,0x00000015,0x0000002b,0x0004003d,0x00000012,0x0000002d,0x0000002c,0x000500ab,
0x00000021,0x0000002e,0x0000002d,0x00000022,0x000300f7,0x00000030,0x00000000,0x000400fa,
0x0000002e,0x0000002f,0x00000030,0x000200f8,0x0000002f,0x00050041,0x00000026,0x00000032,
0x0000001b,0x00000031,0x0004003d,0x00000006,0x00000033,0x00000032,0x0004007e,0x00000006,
0x00000034,0x00000033,0x00050041,0x00000026,0x00000035,0x0000001b,0x00000031,0x0003003e,
0x00000035,0x00000034,0x000200f9,0x00000030,0x000200f8,0x00000030,0x00050041,0x00000017,
0x00000038,0x00000015,0x00000037,0x0004003d,0x00000007,0x00000039,0x00000038,0x0004003d,
0x00000007,0x0000003a,0x0000001b,0x00050080,0x00000007,0x0000003b,0x00000039,0x0000003a,
0x0003003e,0x00000036,0x0000003b,0x0004003d,0x00000007,0x0000003c,0x00000036,0x000500b1,
0x0000003f,0x00000040,0x0000003c,0x0000003e,0x0004009a,0x00000021,0x00000041,0x00000040,
0x000400a8,0x00000021,0x00000042,0x00000041,0x000300f7,0x00000044,0x00000000,0x000400fa,
0x00000042,0x00000043,0x00000044,0x000200f8,0x00000043,0x00050041,0x00000017,0x00000045,
0x00000015,0x0000003d,0x0004003d,0x00000007,0x00000046,0x00000045,0x0004003d,0x00000007,
0x00000047,0x00000036,0x000500b3,0x0000003f,0x00000048,0x00000046,0x00000047,0x0004009a,
0x00000021,0x00000049,0x00000048,0x000200f9,0x00000044,0x000200f8,0x00000044,0x000700f5,
0x00000021,0x0000004a,0x00000041,0x00000030,0x00000049,0x00000043,0x000300f7,0x0000004c,
0x00000000,0x000400fa,0x0000004a,0x0000004b,0x00000052,0x000200f8,0x0000004b,0x0003003e,
0x0000004e,0x0000004f,0x0003003e,0x00000051,0x00000022,0x000200f9,0x0000004c,0x000200f8,
0x00000052,0x0004003d,0x00000053,0x00000056,0x00000055,0x0004003d,0x00000007,0x00000057,
0x00000036,0x0007005f,0x0000000b,0x00000058,0x00000056,0x00000057,0x00000040,0x0000003d,
0x00050051,0x0000000a,0x00000059,0x00000058,0x00000000,0x0003003e,0x0000004e,0x00000059,
0x000200f9,0x0000004c,0x000200f8,0x0000004c,0x0004003d,0x0000000a,0x0000005c,0x0000004e,
0x0003003e,0x0000005b,0x0000005c,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
#extension GL_ARB_shader_stencil_export : require
layout(push_constant)uniform PushConstants {
ivec2 srcExtent;
ivec2 srcOffset;
ivec2 destOffset;
int srcLayer;
bool flipX;
bool flipY;
} params;
layout(set = 0, binding = 0)uniform texture2DMS depth;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipX)
srcSubImageCoords . x = - srcSubImageCoords . x;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec2 srcImageCoords = params . srcOffset + srcSubImageCoords;
float depthValue;
uint stencilValue;
if(any(lessThan(srcImageCoords, ivec2(0)))||
any(lessThanEqual(params . srcExtent, srcImageCoords)))
{
depthValue = 0;
stencilValue = 0;
}
else
{
depthValue = texelFetch(depth, srcImageCoords, 0). x;
}
gl_FragDepth = depthValue;
}
#endif // Preprocessed code
// 7.12.3226
#pragma once
const uint32_t kResolveDepthStencil_frag_00000001[] = {
0x07230203,0x00010000,0x00080007,0x00000065,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000000d,0x00000063,0x00030010,
0x00000004,0x00000007,0x00030010,0x00000004,0x0000000c,0x00030003,0x00000002,0x000001c2,
0x00090004,0x415f4c47,0x735f4252,0x65646168,0x74735f72,0x69636e65,0x78655f6c,0x74726f70,
0x00000000,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,0x00060006,0x00000013,0x00000000,0x45637273,0x6e657478,
0x00000074,0x00060006,0x00000013,0x00000001,0x4f637273,0x65736666,0x00000074,0x00060006,
0x00000013,0x00000002,0x74736564,0x7366664f,0x00007465,0x00060006,0x00000013,0x00000003,
0x4c637273,0x72657961,0x00000000,0x00050006,0x00000013,0x00000004,0x70696c66,0x00000058,
0x00050006,0x00000013,0x00000005,0x70696c66,0x00000059,0x00040005,0x00000015,0x61726170,
0x0000736d,0x00070005,0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,
0x00060005,0x00000036,0x49637273,0x6567616d,0x726f6f43,0x00007364,0x00050005,0x0000004e,
0x74706564,0x6c615668,0x00006575,0x00060005,0x00000051,0x6e657473,0x566c6963,0x65756c61,
0x00000000,0x00040005,0x00000055,0x74706564,0x00000068,0x00060005,0x00000063,0x465f6c67,
0x44676172,0x68747065,0x00000000,0x00040047,0x0000000d,0x0000000b,0x0000000f,0x00050048,
0x00000013,0x00000000,0x00000023,0x00000000,0x00050048,0x00000013,0x00000001,0x00000023,
0x00000008,0x00050048,0x00000013,0x00000002,0x00000023,0x00000010,0x00050048,0x00000013,
0x00000003,0x00000023,0x00000018,0x00050048,0x00000013,0x00000004,0x00000023,0x0000001c,
0x00050048,0x00000013,0x00000005,0x00000023,0x00000020,0x00030047,0x00000013,0x00000002,
0x00040047,0x00000055,0x00000022,0x00000000,0x00040047,0x00000055,0x00000021,0x00000000,
0x00040047,0x00000063,0x0000000b,0x00000016,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,0x00000007,0x00000007,
0x00000007,0x00000006,0x00000012,0x00000012,0x00040020,0x00000014,0x00000009,0x00000013,
0x0004003b,0x00000014,0x00000015,0x00000009,0x0004002b,0x00000006,0x00000016,0x00000002,
0x00040020,0x00000017,0x00000009,0x00000007,0x0004002b,0x00000006,0x0000001d,0x00000004,
0x00040020,0x0000001e,0x00000009,0x00000012,0x00020014,0x00000021,0x0004002b,0x00000012,
0x00000022,0x00000000,0x00040020,0x00000026,0x00000007,0x00000006,0x0004002b,0x00000006,
0x0000002b,0x00000005,0x0004002b,0x00000012,0x00000031,0x00000001,0x0004002b,0x00000006,
0x00000037,0x00000001,0x0004002b,0x00000006,0x0000003d,0x00000000,0x0005002c,0x00000007,
0x0000003e,0x0000003d,0x0000003d,0x00040017,0x0000003f,0x00000021,0x00000002,0x00040020,
0x0000004d,0x00000007,0x0000000a,0x0004002b,0x0000000a,0x0000004f,0x00000000,0x00040020,
0x00000050,0x00000007,0x00000012,0x00090019,0x00000053,0x0000000a,0x00000001,0x00000000,
0x00000001,0x00000001,0x00000001,0x00000000,0x00040020,0x00000054,0x00000000,0x00000053,
0x0004003b,0x00000054,0x00000055,0x00000000,0x0004002b,0x00000006,0x00000058,0x00000003,
0x00040020,0x00000059,0x00000009,0x00000006,0x00040017,0x0000005c,0x00000006,0x00000003,
0x00040020,0x00000062,0x00000003,0x0000000a,0x0004003b,0x00000062,0x00000063,0x00000003,
0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,
0x00000008,0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,
0x00000008,0x00000036,0x00000007,0x0004003b,0x0000004d,0x0000004e,0x00000007,0x0004003b,
0x00000050,0x00000051,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,0x00000026,0x00000027,0x0000001b,0x00000022,0x0004003d,0x00000006,
0x00000028,0x00000027,0x0004007e,0x00000006,0x00000029,0x00000028,0x00050041,0x00000026,
0x0000002a,0x0000001b,0x00000022,0x0003003e,0x0000002a,0x00000029,0x000200f9,0x00000025,
0x000200f8,0x00000025,0x00050041,0x0000001e,0x0000002c,0x00000015,0x0000002b,0x0004003d,
0x00000012,0x0000002d,0x0000002c,0x000500ab,0x00000021,0x0000002e,0x0000002d,0x00000022,
0x000300f7,0x00000030,0x00000000,0x000400fa,0x0000002e,0x0000002f,0x00000030,0x000200f8,
0x0000002f,0x00050041,0x00000026,0x00000032,0x0000001b,0x00000031,0x0004003d,0x00000006,
0x00000033,0x00000032,0x0004007e,0x00000006,0x00000034,0x00000033,0x00050041,0x00000026,
0x00000035,0x0000001b,0x00000031,0x0003003e,0x00000035,0x00000034,0x000200f9,0x00000030,
0x000200f8,0x00000030,0x00050041,0x00000017,0x00000038,0x00000015,0x00000037,0x0004003d,
0x00000007,0x00000039,0x00000038,0x0004003d,0x00000007,0x0000003a,0x0000001b,0x00050080,
0x00000007,0x0000003b,0x00000039,0x0000003a,0x0003003e,0x00000036,0x0000003b,0x0004003d,
0x00000007,0x0000003c,0x00000036,0x000500b1,0x0000003f,0x00000040,0x0000003c,0x0000003e,
0x0004009a,0x00000021,0x00000041,0x00000040,0x000400a8,0x00000021,0x00000042,0x00000041,
0x000300f7,0x00000044,0x00000000,0x000400fa,0x00000042,0x00000043,0x00000044,0x000200f8,
0x00000043,0x00050041,0x00000017,0x00000045,0x00000015,0x0000003d,0x0004003d,0x00000007,
0x00000046,0x00000045,0x0004003d,0x00000007,0x00000047,0x00000036,0x000500b3,0x0000003f,
0x00000048,0x00000046,0x00000047,0x0004009a,0x00000021,0x00000049,0x00000048,0x000200f9,
0x00000044,0x000200f8,0x00000044,0x000700f5,0x00000021,0x0000004a,0x00000041,0x00000030,
0x00000049,0x00000043,0x000300f7,0x0000004c,0x00000000,0x000400fa,0x0000004a,0x0000004b,
0x00000052,0x000200f8,0x0000004b,0x0003003e,0x0000004e,0x0000004f,0x0003003e,0x00000051,
0x00000022,0x000200f9,0x0000004c,0x000200f8,0x00000052,0x0004003d,0x00000053,0x00000056,
0x00000055,0x0004003d,0x00000007,0x00000057,0x00000036,0x00050041,0x00000059,0x0000005a,
0x00000015,0x00000058,0x0004003d,0x00000006,0x0000005b,0x0000005a,0x00050051,0x00000006,
0x0000005d,0x00000057,0x00000000,0x00050051,0x00000006,0x0000005e,0x00000057,0x00000001,
0x00060050,0x0000005c,0x0000005f,0x0000005d,0x0000005e,0x0000005b,0x0007005f,0x0000000b,
0x00000060,0x00000056,0x0000005f,0x00000040,0x0000003d,0x00050051,0x0000000a,0x00000061,
0x00000060,0x00000000,0x0003003e,0x0000004e,0x00000061,0x000200f9,0x0000004c,0x000200f8,
0x0000004c,0x0004003d,0x0000000a,0x00000064,0x0000004e,0x0003003e,0x00000063,0x00000064,
0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
#extension GL_ARB_shader_stencil_export : require
layout(push_constant)uniform PushConstants {
ivec2 srcExtent;
ivec2 srcOffset;
ivec2 destOffset;
int srcLayer;
bool flipX;
bool flipY;
} params;
layout(set = 0, binding = 0)uniform texture2DMSArray depth;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipX)
srcSubImageCoords . x = - srcSubImageCoords . x;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec2 srcImageCoords = params . srcOffset + srcSubImageCoords;
float depthValue;
uint stencilValue;
if(any(lessThan(srcImageCoords, ivec2(0)))||
any(lessThanEqual(params . srcExtent, srcImageCoords)))
{
depthValue = 0;
stencilValue = 0;
}
else
{
depthValue = texelFetch(depth, ivec3(srcImageCoords, params . srcLayer), 0). x;
}
gl_FragDepth = depthValue;
}
#endif // Preprocessed code
// 7.12.3226
#pragma once
const uint32_t kResolveDepthStencil_frag_00000002[] = {
0x07230203,0x00010000,0x00080007,0x0000005f,0x00000000,0x00020011,0x00000001,0x00020011,
0x00001395,0x0009000a,0x5f565053,0x5f545845,0x64616873,0x735f7265,0x636e6574,0x655f6c69,
0x726f7078,0x00000074,0x0006000b,0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,
0x0003000e,0x00000000,0x00000001,0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,
0x0000000d,0x0000005c,0x00030010,0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,
0x00090004,0x415f4c47,0x735f4252,0x65646168,0x74735f72,0x69636e65,0x78655f6c,0x74726f70,
0x00000000,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,0x00060006,0x00000013,0x00000000,0x45637273,0x6e657478,
0x00000074,0x00060006,0x00000013,0x00000001,0x4f637273,0x65736666,0x00000074,0x00060006,
0x00000013,0x00000002,0x74736564,0x7366664f,0x00007465,0x00060006,0x00000013,0x00000003,
0x4c637273,0x72657961,0x00000000,0x00050006,0x00000013,0x00000004,0x70696c66,0x00000058,
0x00050006,0x00000013,0x00000005,0x70696c66,0x00000059,0x00040005,0x00000015,0x61726170,
0x0000736d,0x00070005,0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,
0x00060005,0x00000036,0x49637273,0x6567616d,0x726f6f43,0x00007364,0x00050005,0x0000004e,
0x74706564,0x6c615668,0x00006575,0x00060005,0x00000051,0x6e657473,0x566c6963,0x65756c61,
0x00000000,0x00040005,0x00000055,0x6e657473,0x006c6963,0x00080005,0x0000005c,0x465f6c67,
0x53676172,0x636e6574,0x65526c69,0x42524166,0x00000000,0x00040047,0x0000000d,0x0000000b,
0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,0x00050048,0x00000013,
0x00000001,0x00000023,0x00000008,0x00050048,0x00000013,0x00000002,0x00000023,0x00000010,
0x00050048,0x00000013,0x00000003,0x00000023,0x00000018,0x00050048,0x00000013,0x00000004,
0x00000023,0x0000001c,0x00050048,0x00000013,0x00000005,0x00000023,0x00000020,0x00030047,
0x00000013,0x00000002,0x00040047,0x00000055,0x00000022,0x00000000,0x00040047,0x00000055,
0x00000021,0x00000001,0x00040047,0x0000005c,0x0000000b,0x00001396,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,
0x00000007,0x00000007,0x00000007,0x00000006,0x00000012,0x00000012,0x00040020,0x00000014,
0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,0x0004002b,0x00000006,
0x00000016,0x00000002,0x00040020,0x00000017,0x00000009,0x00000007,0x0004002b,0x00000006,
0x0000001d,0x00000004,0x00040020,0x0000001e,0x00000009,0x00000012,0x00020014,0x00000021,
0x0004002b,0x00000012,0x00000022,0x00000000,0x00040020,0x00000026,0x00000007,0x00000006,
0x0004002b,0x00000006,0x0000002b,0x00000005,0x0004002b,0x00000012,0x00000031,0x00000001,
0x0004002b,0x00000006,0x00000037,0x00000001,0x0004002b,0x00000006,0x0000003d,0x00000000,
0x0005002c,0x00000007,0x0000003e,0x0000003d,0x0000003d,0x00040017,0x0000003f,0x00000021,
0x00000002,0x00040020,0x0000004d,0x00000007,0x0000000a,0x0004002b,0x0000000a,0x0000004f,
0x00000000,0x00040020,0x00000050,0x00000007,0x00000012,0x00090019,0x00000053,0x00000012,
0x00000001,0x00000000,0x00000000,0x00000001,0x00000001,0x00000000,0x00040020,0x00000054,
0x00000000,0x00000053,0x0004003b,0x00000054,0x00000055,0x00000000,0x00040017,0x00000058,
0x00000012,0x00000004,0x00040020,0x0000005b,0x00000003,0x00000006,0x0004003b,0x0000005b,
0x0000005c,0x00000003,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,
0x00000005,0x0004003b,0x00000008,0x00000009,0x00000007,0x0004003b,0x00000008,0x0000001b,
0x00000007,0x0004003b,0x00000008,0x00000036,0x00000007,0x0004003b,0x0000004d,0x0000004e,
0x00000007,0x0004003b,0x00000050,0x00000051,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,0x00000026,0x00000027,0x0000001b,0x00000022,
0x0004003d,0x00000006,0x00000028,0x00000027,0x0004007e,0x00000006,0x00000029,0x00000028,
0x00050041,0x00000026,0x0000002a,0x0000001b,0x00000022,0x0003003e,0x0000002a,0x00000029,
0x000200f9,0x00000025,0x000200f8,0x00000025,0x00050041,0x0000001e,0x0000002c,0x00000015,
0x0000002b,0x0004003d,0x00000012,0x0000002d,0x0000002c,0x000500ab,0x00000021,0x0000002e,
0x0000002d,0x00000022,0x000300f7,0x00000030,0x00000000,0x000400fa,0x0000002e,0x0000002f,
0x00000030,0x000200f8,0x0000002f,0x00050041,0x00000026,0x00000032,0x0000001b,0x00000031,
0x0004003d,0x00000006,0x00000033,0x00000032,0x0004007e,0x00000006,0x00000034,0x00000033,
0x00050041,0x00000026,0x00000035,0x0000001b,0x00000031,0x0003003e,0x00000035,0x00000034,
0x000200f9,0x00000030,0x000200f8,0x00000030,0x00050041,0x00000017,0x00000038,0x00000015,
0x00000037,0x0004003d,0x00000007,0x00000039,0x00000038,0x0004003d,0x00000007,0x0000003a,
0x0000001b,0x00050080,0x00000007,0x0000003b,0x00000039,0x0000003a,0x0003003e,0x00000036,
0x0000003b,0x0004003d,0x00000007,0x0000003c,0x00000036,0x000500b1,0x0000003f,0x00000040,
0x0000003c,0x0000003e,0x0004009a,0x00000021,0x00000041,0x00000040,0x000400a8,0x00000021,
0x00000042,0x00000041,0x000300f7,0x00000044,0x00000000,0x000400fa,0x00000042,0x00000043,
0x00000044,0x000200f8,0x00000043,0x00050041,0x00000017,0x00000045,0x00000015,0x0000003d,
0x0004003d,0x00000007,0x00000046,0x00000045,0x0004003d,0x00000007,0x00000047,0x00000036,
0x000500b3,0x0000003f,0x00000048,0x00000046,0x00000047,0x0004009a,0x00000021,0x00000049,
0x00000048,0x000200f9,0x00000044,0x000200f8,0x00000044,0x000700f5,0x00000021,0x0000004a,
0x00000041,0x00000030,0x00000049,0x00000043,0x000300f7,0x0000004c,0x00000000,0x000400fa,
0x0000004a,0x0000004b,0x00000052,0x000200f8,0x0000004b,0x0003003e,0x0000004e,0x0000004f,
0x0003003e,0x00000051,0x00000022,0x000200f9,0x0000004c,0x000200f8,0x00000052,0x0004003d,
0x00000053,0x00000056,0x00000055,0x0004003d,0x00000007,0x00000057,0x00000036,0x0007005f,
0x00000058,0x00000059,0x00000056,0x00000057,0x00000040,0x0000003d,0x00050051,0x00000012,
0x0000005a,0x00000059,0x00000000,0x0003003e,0x00000051,0x0000005a,0x000200f9,0x0000004c,
0x000200f8,0x0000004c,0x0004003d,0x00000012,0x0000005d,0x00000051,0x0004007c,0x00000006,
0x0000005e,0x0000005d,0x0003003e,0x0000005c,0x0000005e,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
#extension GL_ARB_shader_stencil_export : require
layout(push_constant)uniform PushConstants {
ivec2 srcExtent;
ivec2 srcOffset;
ivec2 destOffset;
int srcLayer;
bool flipX;
bool flipY;
} params;
layout(set = 0, binding = 1)uniform utexture2DMS stencil;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipX)
srcSubImageCoords . x = - srcSubImageCoords . x;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec2 srcImageCoords = params . srcOffset + srcSubImageCoords;
float depthValue;
uint stencilValue;
if(any(lessThan(srcImageCoords, ivec2(0)))||
any(lessThanEqual(params . srcExtent, srcImageCoords)))
{
depthValue = 0;
stencilValue = 0;
}
else
{
stencilValue = texelFetch(stencil, srcImageCoords, 0). x;
}
gl_FragStencilRefARB = int(stencilValue);
}
#endif // Preprocessed code
// 7.12.3226
#pragma once
const uint32_t kResolveDepthStencil_frag_00000003[] = {
0x07230203,0x00010000,0x00080007,0x00000067,0x00000000,0x00020011,0x00000001,0x00020011,
0x00001395,0x0009000a,0x5f565053,0x5f545845,0x64616873,0x735f7265,0x636e6574,0x655f6c69,
0x726f7078,0x00000074,0x0006000b,0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,
0x0003000e,0x00000000,0x00000001,0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,
0x0000000d,0x00000064,0x00030010,0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,
0x00090004,0x415f4c47,0x735f4252,0x65646168,0x74735f72,0x69636e65,0x78655f6c,0x74726f70,
0x00000000,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,0x00060006,0x00000013,0x00000000,0x45637273,0x6e657478,
0x00000074,0x00060006,0x00000013,0x00000001,0x4f637273,0x65736666,0x00000074,0x00060006,
0x00000013,0x00000002,0x74736564,0x7366664f,0x00007465,0x00060006,0x00000013,0x00000003,
0x4c637273,0x72657961,0x00000000,0x00050006,0x00000013,0x00000004,0x70696c66,0x00000058,
0x00050006,0x00000013,0x00000005,0x70696c66,0x00000059,0x00040005,0x00000015,0x61726170,
0x0000736d,0x00070005,0x0000001b,0x53637273,0x6d496275,0x43656761,0x64726f6f,0x00000073,
0x00060005,0x00000036,0x49637273,0x6567616d,0x726f6f43,0x00007364,0x00050005,0x0000004e,
0x74706564,0x6c615668,0x00006575,0x00060005,0x00000051,0x6e657473,0x566c6963,0x65756c61,
0x00000000,0x00040005,0x00000055,0x6e657473,0x006c6963,0x00080005,0x00000064,0x465f6c67,
0x53676172,0x636e6574,0x65526c69,0x42524166,0x00000000,0x00040047,0x0000000d,0x0000000b,
0x0000000f,0x00050048,0x00000013,0x00000000,0x00000023,0x00000000,0x00050048,0x00000013,
0x00000001,0x00000023,0x00000008,0x00050048,0x00000013,0x00000002,0x00000023,0x00000010,
0x00050048,0x00000013,0x00000003,0x00000023,0x00000018,0x00050048,0x00000013,0x00000004,
0x00000023,0x0000001c,0x00050048,0x00000013,0x00000005,0x00000023,0x00000020,0x00030047,
0x00000013,0x00000002,0x00040047,0x00000055,0x00000022,0x00000000,0x00040047,0x00000055,
0x00000021,0x00000001,0x00040047,0x00000064,0x0000000b,0x00001396,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,
0x00000007,0x00000007,0x00000007,0x00000006,0x00000012,0x00000012,0x00040020,0x00000014,
0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,0x0004002b,0x00000006,
0x00000016,0x00000002,0x00040020,0x00000017,0x00000009,0x00000007,0x0004002b,0x00000006,
0x0000001d,0x00000004,0x00040020,0x0000001e,0x00000009,0x00000012,0x00020014,0x00000021,
0x0004002b,0x00000012,0x00000022,0x00000000,0x00040020,0x00000026,0x00000007,0x00000006,
0x0004002b,0x00000006,0x0000002b,0x00000005,0x0004002b,0x00000012,0x00000031,0x00000001,
0x0004002b,0x00000006,0x00000037,0x00000001,0x0004002b,0x00000006,0x0000003d,0x00000000,
0x0005002c,0x00000007,0x0000003e,0x0000003d,0x0000003d,0x00040017,0x0000003f,0x00000021,
0x00000002,0x00040020,0x0000004d,0x00000007,0x0000000a,0x0004002b,0x0000000a,0x0000004f,
0x00000000,0x00040020,0x00000050,0x00000007,0x00000012,0x00090019,0x00000053,0x00000012,
0x00000001,0x00000000,0x00000001,0x00000001,0x00000001,0x00000000,0x00040020,0x00000054,
0x00000000,0x00000053,0x0004003b,0x00000054,0x00000055,0x00000000,0x0004002b,0x00000006,
0x00000058,0x00000003,0x00040020,0x00000059,0x00000009,0x00000006,0x00040017,0x0000005c,
0x00000006,0x00000003,0x00040017,0x00000060,0x00000012,0x00000004,0x00040020,0x00000063,
0x00000003,0x00000006,0x0004003b,0x00000063,0x00000064,0x00000003,0x00050036,0x00000002,
0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,0x00000009,
0x00000007,0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x00000008,0x00000036,
0x00000007,0x0004003b,0x0000004d,0x0000004e,0x00000007,0x0004003b,0x00000050,0x00000051,
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,
0x00000026,0x00000027,0x0000001b,0x00000022,0x0004003d,0x00000006,0x00000028,0x00000027,
0x0004007e,0x00000006,0x00000029,0x00000028,0x00050041,0x00000026,0x0000002a,0x0000001b,
0x00000022,0x0003003e,0x0000002a,0x00000029,0x000200f9,0x00000025,0x000200f8,0x00000025,
0x00050041,0x0000001e,0x0000002c,0x00000015,0x0000002b,0x0004003d,0x00000012,0x0000002d,
0x0000002c,0x000500ab,0x00000021,0x0000002e,0x0000002d,0x00000022,0x000300f7,0x00000030,
0x00000000,0x000400fa,0x0000002e,0x0000002f,0x00000030,0x000200f8,0x0000002f,0x00050041,
0x00000026,0x00000032,0x0000001b,0x00000031,0x0004003d,0x00000006,0x00000033,0x00000032,
0x0004007e,0x00000006,0x00000034,0x00000033,0x00050041,0x00000026,0x00000035,0x0000001b,
0x00000031,0x0003003e,0x00000035,0x00000034,0x000200f9,0x00000030,0x000200f8,0x00000030,
0x00050041,0x00000017,0x00000038,0x00000015,0x00000037,0x0004003d,0x00000007,0x00000039,
0x00000038,0x0004003d,0x00000007,0x0000003a,0x0000001b,0x00050080,0x00000007,0x0000003b,
0x00000039,0x0000003a,0x0003003e,0x00000036,0x0000003b,0x0004003d,0x00000007,0x0000003c,
0x00000036,0x000500b1,0x0000003f,0x00000040,0x0000003c,0x0000003e,0x0004009a,0x00000021,
0x00000041,0x00000040,0x000400a8,0x00000021,0x00000042,0x00000041,0x000300f7,0x00000044,
0x00000000,0x000400fa,0x00000042,0x00000043,0x00000044,0x000200f8,0x00000043,0x00050041,
0x00000017,0x00000045,0x00000015,0x0000003d,0x0004003d,0x00000007,0x00000046,0x00000045,
0x0004003d,0x00000007,0x00000047,0x00000036,0x000500b3,0x0000003f,0x00000048,0x00000046,
0x00000047,0x0004009a,0x00000021,0x00000049,0x00000048,0x000200f9,0x00000044,0x000200f8,
0x00000044,0x000700f5,0x00000021,0x0000004a,0x00000041,0x00000030,0x00000049,0x00000043,
0x000300f7,0x0000004c,0x00000000,0x000400fa,0x0000004a,0x0000004b,0x00000052,0x000200f8,
0x0000004b,0x0003003e,0x0000004e,0x0000004f,0x0003003e,0x00000051,0x00000022,0x000200f9,
0x0000004c,0x000200f8,0x00000052,0x0004003d,0x00000053,0x00000056,0x00000055,0x0004003d,
0x00000007,0x00000057,0x00000036,0x00050041,0x00000059,0x0000005a,0x00000015,0x00000058,
0x0004003d,0x00000006,0x0000005b,0x0000005a,0x00050051,0x00000006,0x0000005d,0x00000057,
0x00000000,0x00050051,0x00000006,0x0000005e,0x00000057,0x00000001,0x00060050,0x0000005c,
0x0000005f,0x0000005d,0x0000005e,0x0000005b,0x0007005f,0x00000060,0x00000061,0x00000056,
0x0000005f,0x00000040,0x0000003d,0x00050051,0x00000012,0x00000062,0x00000061,0x00000000,
0x0003003e,0x00000051,0x00000062,0x000200f9,0x0000004c,0x000200f8,0x0000004c,0x0004003d,
0x00000012,0x00000065,0x00000051,0x0004007c,0x00000006,0x00000066,0x00000065,0x0003003e,
0x00000064,0x00000066,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
#extension GL_ARB_shader_stencil_export : require
layout(push_constant)uniform PushConstants {
ivec2 srcExtent;
ivec2 srcOffset;
ivec2 destOffset;
int srcLayer;
bool flipX;
bool flipY;
} params;
layout(set = 0, binding = 1)uniform utexture2DMSArray stencil;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipX)
srcSubImageCoords . x = - srcSubImageCoords . x;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec2 srcImageCoords = params . srcOffset + srcSubImageCoords;
float depthValue;
uint stencilValue;
if(any(lessThan(srcImageCoords, ivec2(0)))||
any(lessThanEqual(params . srcExtent, srcImageCoords)))
{
depthValue = 0;
stencilValue = 0;
}
else
{
stencilValue = texelFetch(stencil, ivec3(srcImageCoords, params . srcLayer), 0). x;
}
gl_FragStencilRefARB = int(stencilValue);
}
#endif // Preprocessed code
// 7.12.3226
#pragma once
const uint32_t kResolveDepthStencil_frag_00000004[] = {
0x07230203,0x00010000,0x00080007,0x00000069,0x00000000,0x00020011,0x00000001,0x00020011,
0x00001395,0x0009000a,0x5f565053,0x5f545845,0x64616873,0x735f7265,0x636e6574,0x655f6c69,
0x726f7078,0x00000074,0x0006000b,0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,
0x0003000e,0x00000000,0x00000001,0x0008000f,0x00000004,0x00000004,0x6e69616d,0x00000000,
0x0000000d,0x00000063,0x00000066,0x00030010,0x00000004,0x00000007,0x00030010,0x00000004,
0x0000000c,0x00030003,0x00000002,0x000001c2,0x00090004,0x415f4c47,0x735f4252,0x65646168,
0x74735f72,0x69636e65,0x78655f6c,0x74726f70,0x00000000,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,0x00060006,
0x00000013,0x00000000,0x45637273,0x6e657478,0x00000074,0x00060006,0x00000013,0x00000001,
0x4f637273,0x65736666,0x00000074,0x00060006,0x00000013,0x00000002,0x74736564,0x7366664f,
0x00007465,0x00060006,0x00000013,0x00000003,0x4c637273,0x72657961,0x00000000,0x00050006,
0x00000013,0x00000004,0x70696c66,0x00000058,0x00050006,0x00000013,0x00000005,0x70696c66,
0x00000059,0x00040005,0x00000015,0x61726170,0x0000736d,0x00070005,0x0000001b,0x53637273,
0x6d496275,0x43656761,0x64726f6f,0x00000073,0x00060005,0x00000036,0x49637273,0x6567616d,
0x726f6f43,0x00007364,0x00050005,0x0000004e,0x74706564,0x6c615668,0x00006575,0x00060005,
0x00000051,0x6e657473,0x566c6963,0x65756c61,0x00000000,0x00040005,0x00000055,0x74706564,
0x00000068,0x00040005,0x0000005c,0x6e657473,0x006c6963,0x00060005,0x00000063,0x465f6c67,
0x44676172,0x68747065,0x00000000,0x00080005,0x00000066,0x465f6c67,0x53676172,0x636e6574,
0x65526c69,0x42524166,0x00000000,0x00040047,0x0000000d,0x0000000b,0x0000000f,0x00050048,
0x00000013,0x00000000,0x00000023,0x00000000,0x00050048,0x00000013,0x00000001,0x00000023,
0x00000008,0x00050048,0x00000013,0x00000002,0x00000023,0x00000010,0x00050048,0x00000013,
0x00000003,0x00000023,0x00000018,0x00050048,0x00000013,0x00000004,0x00000023,0x0000001c,
0x00050048,0x00000013,0x00000005,0x00000023,0x00000020,0x00030047,0x00000013,0x00000002,
0x00040047,0x00000055,0x00000022,0x00000000,0x00040047,0x00000055,0x00000021,0x00000000,
0x00040047,0x0000005c,0x00000022,0x00000000,0x00040047,0x0000005c,0x00000021,0x00000001,
0x00040047,0x00000063,0x0000000b,0x00000016,0x00040047,0x00000066,0x0000000b,0x00001396,
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,0x00000007,0x00000007,0x00000007,0x00000006,0x00000012,0x00000012,
0x00040020,0x00000014,0x00000009,0x00000013,0x0004003b,0x00000014,0x00000015,0x00000009,
0x0004002b,0x00000006,0x00000016,0x00000002,0x00040020,0x00000017,0x00000009,0x00000007,
0x0004002b,0x00000006,0x0000001d,0x00000004,0x00040020,0x0000001e,0x00000009,0x00000012,
0x00020014,0x00000021,0x0004002b,0x00000012,0x00000022,0x00000000,0x00040020,0x00000026,
0x00000007,0x00000006,0x0004002b,0x00000006,0x0000002b,0x00000005,0x0004002b,0x00000012,
0x00000031,0x00000001,0x0004002b,0x00000006,0x00000037,0x00000001,0x0004002b,0x00000006,
0x0000003d,0x00000000,0x0005002c,0x00000007,0x0000003e,0x0000003d,0x0000003d,0x00040017,
0x0000003f,0x00000021,0x00000002,0x00040020,0x0000004d,0x00000007,0x0000000a,0x0004002b,
0x0000000a,0x0000004f,0x00000000,0x00040020,0x00000050,0x00000007,0x00000012,0x00090019,
0x00000053,0x0000000a,0x00000001,0x00000000,0x00000000,0x00000001,0x00000001,0x00000000,
0x00040020,0x00000054,0x00000000,0x00000053,0x0004003b,0x00000054,0x00000055,0x00000000,
0x00090019,0x0000005a,0x00000012,0x00000001,0x00000000,0x00000000,0x00000001,0x00000001,
0x00000000,0x00040020,0x0000005b,0x00000000,0x0000005a,0x0004003b,0x0000005b,0x0000005c,
0x00000000,0x00040017,0x0000005f,0x00000012,0x00000004,0x00040020,0x00000062,0x00000003,
0x0000000a,0x0004003b,0x00000062,0x00000063,0x00000003,0x00040020,0x00000065,0x00000003,
0x00000006,0x0004003b,0x00000065,0x00000066,0x00000003,0x00050036,0x00000002,0x00000004,
0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,0x00000009,0x00000007,
0x0004003b,0x00000008,0x0000001b,0x00000007,0x0004003b,0x00000008,0x00000036,0x00000007,
0x0004003b,0x0000004d,0x0000004e,0x00000007,0x0004003b,0x00000050,0x00000051,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,0x00000026,
0x00000027,0x0000001b,0x00000022,0x0004003d,0x00000006,0x00000028,0x00000027,0x0004007e,
0x00000006,0x00000029,0x00000028,0x00050041,0x00000026,0x0000002a,0x0000001b,0x00000022,
0x0003003e,0x0000002a,0x00000029,0x000200f9,0x00000025,0x000200f8,0x00000025,0x00050041,
0x0000001e,0x0000002c,0x00000015,0x0000002b,0x0004003d,0x00000012,0x0000002d,0x0000002c,
0x000500ab,0x00000021,0x0000002e,0x0000002d,0x00000022,0x000300f7,0x00000030,0x00000000,
0x000400fa,0x0000002e,0x0000002f,0x00000030,0x000200f8,0x0000002f,0x00050041,0x00000026,
0x00000032,0x0000001b,0x00000031,0x0004003d,0x00000006,0x00000033,0x00000032,0x0004007e,
0x00000006,0x00000034,0x00000033,0x00050041,0x00000026,0x00000035,0x0000001b,0x00000031,
0x0003003e,0x00000035,0x00000034,0x000200f9,0x00000030,0x000200f8,0x00000030,0x00050041,
0x00000017,0x00000038,0x00000015,0x00000037,0x0004003d,0x00000007,0x00000039,0x00000038,
0x0004003d,0x00000007,0x0000003a,0x0000001b,0x00050080,0x00000007,0x0000003b,0x00000039,
0x0000003a,0x0003003e,0x00000036,0x0000003b,0x0004003d,0x00000007,0x0000003c,0x00000036,
0x000500b1,0x0000003f,0x00000040,0x0000003c,0x0000003e,0x0004009a,0x00000021,0x00000041,
0x00000040,0x000400a8,0x00000021,0x00000042,0x00000041,0x000300f7,0x00000044,0x00000000,
0x000400fa,0x00000042,0x00000043,0x00000044,0x000200f8,0x00000043,0x00050041,0x00000017,
0x00000045,0x00000015,0x0000003d,0x0004003d,0x00000007,0x00000046,0x00000045,0x0004003d,
0x00000007,0x00000047,0x00000036,0x000500b3,0x0000003f,0x00000048,0x00000046,0x00000047,
0x0004009a,0x00000021,0x00000049,0x00000048,0x000200f9,0x00000044,0x000200f8,0x00000044,
0x000700f5,0x00000021,0x0000004a,0x00000041,0x00000030,0x00000049,0x00000043,0x000300f7,
0x0000004c,0x00000000,0x000400fa,0x0000004a,0x0000004b,0x00000052,0x000200f8,0x0000004b,
0x0003003e,0x0000004e,0x0000004f,0x0003003e,0x00000051,0x00000022,0x000200f9,0x0000004c,
0x000200f8,0x00000052,0x0004003d,0x00000053,0x00000056,0x00000055,0x0004003d,0x00000007,
0x00000057,0x00000036,0x0007005f,0x0000000b,0x00000058,0x00000056,0x00000057,0x00000040,
0x0000003d,0x00050051,0x0000000a,0x00000059,0x00000058,0x00000000,0x0003003e,0x0000004e,
0x00000059,0x0004003d,0x0000005a,0x0000005d,0x0000005c,0x0004003d,0x00000007,0x0000005e,
0x00000036,0x0007005f,0x0000005f,0x00000060,0x0000005d,0x0000005e,0x00000040,0x0000003d,
0x00050051,0x00000012,0x00000061,0x00000060,0x00000000,0x0003003e,0x00000051,0x00000061,
0x000200f9,0x0000004c,0x000200f8,0x0000004c,0x0004003d,0x0000000a,0x00000064,0x0000004e,
0x0003003e,0x00000063,0x00000064,0x0004003d,0x00000012,0x00000067,0x00000051,0x0004007c,
0x00000006,0x00000068,0x00000067,0x0003003e,0x00000066,0x00000068,0x000100fd,0x00010038
};
#if 0 // Generated from:
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
#extension GL_ARB_shader_stencil_export : require
layout(push_constant)uniform PushConstants {
ivec2 srcExtent;
ivec2 srcOffset;
ivec2 destOffset;
int srcLayer;
bool flipX;
bool flipY;
} params;
layout(set = 0, binding = 0)uniform texture2DMS depth;
layout(set = 0, binding = 1)uniform utexture2DMS stencil;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord . xy)- params . destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
if(params . flipX)
srcSubImageCoords . x = - srcSubImageCoords . x;
if(params . flipY)
srcSubImageCoords . y = - srcSubImageCoords . y;
ivec2 srcImageCoords = params . srcOffset + srcSubImageCoords;
float depthValue;
uint stencilValue;
if(any(lessThan(srcImageCoords, ivec2(0)))||
any(lessThanEqual(params . srcExtent, srcImageCoords)))
{
depthValue = 0;
stencilValue = 0;
}
else
{
depthValue = texelFetch(depth, srcImageCoords, 0). x;
stencilValue = texelFetch(stencil, srcImageCoords, 0). x;
}
gl_FragDepth = depthValue;
gl_FragStencilRefARB = int(stencilValue);
}
#endif // Preprocessed code
......@@ -3,33 +3,69 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ResolveDepthStencil.frag: Resolve multisampled depth/stencil images.
// Resolve.frag: Resolve multisampled color or depth/stencil images.
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
#extension GL_ARB_shader_stencil_export : require
#define MAKE_SRC_RESOURCE(prefix, type) prefix ## type
#define DEPTH_SRC_RESOURCE(type) type
#define STENCIL_SRC_RESOURCE(type) MAKE_SRC_RESOURCE(u, type)
#if ResolveColorFloat
#if SrcIsArray
#define SRC_RESOURCE_NAME texture2DMSArray
#else
#define SRC_RESOURCE_NAME texture2DMS
#endif
#define IsResolveColor 1
#define COLOR_SRC_RESOURCE(type) type
#define ColorType vec4
#elif ResolveColorInt
#define IsResolveColor 1
#define COLOR_SRC_RESOURCE(type) MAKE_SRC_RESOURCE(i, type)
#define ColorType ivec4
#elif ResolveColorUint
#define IsResolveColor 1
#define COLOR_SRC_RESOURCE(type) MAKE_SRC_RESOURCE(u, type)
#define ColorType uvec4
#elif ResolveDepth
#if ResolveDepth
#define IsResolveDepth 1
#elif ResolveStencil
#define IsResolveStencil 1
#elif ResolveDepthStencil
#define IsResolveDepth 1
#define IsResolveStencil 1
#else
#error "Not all resolve targets are accounted for"
#endif
#if IsResolveColor && (IsResolveDepth || IsResolveStencil)
#error "The shader doesn't resolve color and depth/stencil at the same time."
#endif
#extension GL_EXT_samplerless_texture_functions : require
#if IsResolveStencil
#extension GL_ARB_shader_stencil_export : require
#endif
#define MAKE_SRC_RESOURCE(prefix, type) prefix ## type
#define DEPTH_SRC_RESOURCE(type) type
#define STENCIL_SRC_RESOURCE(type) MAKE_SRC_RESOURCE(u, type)
#if SrcIsArray
#define SRC_RESOURCE_NAME texture2DMSArray
#define TEXEL_FETCH(src, coord, sample) texelFetch(src, ivec3(coord, params.srcLayer), sample)
#else
#define SRC_RESOURCE_NAME texture2DMS
#define TEXEL_FETCH(src, coord, sample) texelFetch(src, coord, sample)
#endif
layout(push_constant) uniform PushConstants {
......@@ -39,11 +75,27 @@ layout(push_constant) uniform PushConstants {
ivec2 srcOffset;
ivec2 destOffset;
int srcLayer;
int samples;
float invSamples;
// Mask to output only to color attachments that are actually present.
int outputMask;
// Flip control.
bool flipX;
bool flipY;
} params;
#if IsResolveColor
layout(set = 0, binding = 0) uniform COLOR_SRC_RESOURCE(SRC_RESOURCE_NAME) color;
layout(location = 0) out ColorType colorOut0;
layout(location = 1) out ColorType colorOut1;
layout(location = 2) out ColorType colorOut2;
layout(location = 3) out ColorType colorOut3;
layout(location = 4) out ColorType colorOut4;
layout(location = 5) out ColorType colorOut5;
layout(location = 6) out ColorType colorOut6;
layout(location = 7) out ColorType colorOut7;
#endif
#if IsResolveDepth
layout(set = 0, binding = 0) uniform DEPTH_SRC_RESOURCE(SRC_RESOURCE_NAME) depth;
#endif
......@@ -66,41 +118,81 @@ void main()
ivec2 srcImageCoords = params.srcOffset + srcSubImageCoords;
float depthValue;
uint stencilValue;
if (any(lessThan(srcImageCoords, ivec2(0))) ||
any(lessThanEqual(params.srcExtent, srcImageCoords)))
{
depthValue = 0;
stencilValue = 0;
}
else
{
// Note: always resolve using sample 0. GLES3 gives us freedom in choosing how to resolve
// depth/stencil images.
bool isWithinSrcBounds = any(lessThanEqual(ivec2(0), srcImageCoords)) &&
any(lessThan(srcImageCoords, params.srcExtent));
#if IsResolveDepth
#if SrcIsArray
depthValue = texelFetch(depth, ivec3(srcImageCoords, params.srcLayer), 0).x;
#if IsResolveColor
ColorType colorValue = ColorType(0, 0, 0, 1);
if (isWithinSrcBounds)
{
for (int i = 0; i < params.samples; ++i)
{
colorValue += TEXEL_FETCH(color, srcImageCoords, i);
}
#if IsFloat
colorValue *= params.invSamples;
#else
depthValue = texelFetch(depth, srcImageCoords, 0).x;
#endif
colorValue = ColorType(round(colorValue * params.invSamples));
#endif
}
#if IsResolveStencil
#if SrcIsArray
stencilValue = texelFetch(stencil, ivec3(srcImageCoords, params.srcLayer), 0).x;
#else
stencilValue = texelFetch(stencil, srcImageCoords, 0).x;
#endif
#endif
// Note: not exporting to render targets that are not present optimizes the number of export
// instructions, which would have otherwise been a likely bottleneck.
if ((params.outputMask & (1 << 0)) != 0)
{
colorOut0 = colorValue;
}
if ((params.outputMask & (1 << 1)) != 0)
{
colorOut1 = colorValue;
}
if ((params.outputMask & (1 << 2)) != 0)
{
colorOut2 = colorValue;
}
if ((params.outputMask & (1 << 3)) != 0)
{
colorOut3 = colorValue;
}
if ((params.outputMask & (1 << 4)) != 0)
{
colorOut4 = colorValue;
}
if ((params.outputMask & (1 << 5)) != 0)
{
colorOut5 = colorValue;
}
if ((params.outputMask & (1 << 6)) != 0)
{
colorOut6 = colorValue;
}
if ((params.outputMask & (1 << 7)) != 0)
{
colorOut7 = colorValue;
}
#endif // IsResolveColor
// Note: always resolve depth/stencil using sample 0. GLES3 gives us freedom in choosing how
// to resolve depth/stencil images.
#if IsResolveDepth
float depthValue = 0;
if (isWithinSrcBounds)
{
depthValue = TEXEL_FETCH(depth, srcImageCoords, 0).x;
}
gl_FragDepth = depthValue;
#endif
#endif // IsResolveDepth
#if IsResolveStencil
uint stencilValue = 0;
if (isWithinSrcBounds)
{
stencilValue = TEXEL_FETCH(stencil, srcImageCoords, 0).x;
}
gl_FragStencilRefARB = int(stencilValue);
#endif
#endif // IsResolveStencil
}
......@@ -4,12 +4,15 @@
"Use of this source code is governed by a BSD-style license that can be",
"found in the LICENSE file.",
"",
"ResolveDepthStencil.frag.json: Build parameters for ResolveDepthStencil.frag."
"Resolve.frag.json: Build parameters for Resolve.frag."
],
"Flags": [
"SrcIsArray"
],
"Resolve": [
"ResolveColorFloat",
"ResolveColorInt",
"ResolveColorUint",
"ResolveDepth",
"ResolveStencil",
"ResolveDepthStencil"
......
//
// 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.
//
// ResolveColor.frag: Resolve multisampled color images.
#version 450 core
#extension GL_EXT_samplerless_texture_functions : require
#define MAKE_SRC_RESOURCE(prefix, type) prefix ## type
#if IsFloat
#define SRC_RESOURCE(type) type
#define Type vec4
#elif IsInt
#define SRC_RESOURCE(type) MAKE_SRC_RESOURCE(i, type)
#define Type ivec4
#elif IsUint
#define SRC_RESOURCE(type) MAKE_SRC_RESOURCE(u, type)
#define Type uvec4
#else
#error "Not all formats are accounted for"
#endif
#if SrcIsArray
#define SRC_RESOURCE_NAME texture2DMSArray
#else
#define SRC_RESOURCE_NAME texture2DMS
#endif
layout(push_constant) uniform PushConstants {
// Robust access.
ivec2 srcExtent;
// Translation from source to destination coordinates.
ivec2 srcOffset;
ivec2 destOffset;
int srcLayer;
int samples;
float invSamples;
// Mask to output only to attachments that are actually present.
int outputMask;
// Flip control.
bool flipX;
bool flipY;
} params;
layout(set = 0, binding = 0) uniform SRC_RESOURCE(SRC_RESOURCE_NAME) src;
layout(location = 0) out Type colorOut0;
layout(location = 1) out Type colorOut1;
layout(location = 2) out Type colorOut2;
layout(location = 3) out Type colorOut3;
layout(location = 4) out Type colorOut4;
layout(location = 5) out Type colorOut5;
layout(location = 6) out Type colorOut6;
layout(location = 7) out Type colorOut7;
void main()
{
ivec2 destSubImageCoords = ivec2(gl_FragCoord.xy) - params.destOffset;
ivec2 srcSubImageCoords = destSubImageCoords;
// If flipping, srcOffset would contain the opposite coordinates, so we can
// simply reverse the direction in which x/y grows.
if (params.flipX)
srcSubImageCoords.x = -srcSubImageCoords.x;
if (params.flipY)
srcSubImageCoords.y = -srcSubImageCoords.y;
ivec2 srcImageCoords = params.srcOffset + srcSubImageCoords;
Type srcValue;
if (any(lessThan(srcImageCoords, ivec2(0))) ||
any(lessThanEqual(params.srcExtent, srcImageCoords)))
{
srcValue = Type(0, 0, 0, 1);
}
else
{
srcValue = Type(0, 0, 0, 0);
for (int i = 0; i < params.samples; ++i)
{
#if SrcIsArray
srcValue += texelFetch(src, ivec3(srcImageCoords, params.srcLayer), i);
#else
srcValue += texelFetch(src, srcImageCoords, i);
#endif
}
#if IsFloat
srcValue *= params.invSamples;
#else
srcValue = Type(round(srcValue * params.invSamples));
#endif
}
// Note: not exporting to render targets that are not present optimizes the number of export
// instructions, which would have otherwise been a likely bottleneck.
if ((params.outputMask & (1 << 0)) != 0)
{
colorOut0 = srcValue;
}
if ((params.outputMask & (1 << 1)) != 0)
{
colorOut1 = srcValue;
}
if ((params.outputMask & (1 << 2)) != 0)
{
colorOut2 = srcValue;
}
if ((params.outputMask & (1 << 3)) != 0)
{
colorOut3 = srcValue;
}
if ((params.outputMask & (1 << 4)) != 0)
{
colorOut4 = srcValue;
}
if ((params.outputMask & (1 << 5)) != 0)
{
colorOut5 = srcValue;
}
if ((params.outputMask & (1 << 6)) != 0)
{
colorOut6 = srcValue;
}
if ((params.outputMask & (1 << 7)) != 0)
{
colorOut7 = srcValue;
}
}
{
"Description": [
"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.",
"",
"ResolveColor.frag.json: Build parameters for ResolveColor.frag."
],
"Flags": [
"SrcIsArray"
],
"Format": [
"IsFloat",
"IsInt",
"IsUint"
]
}
......@@ -87,18 +87,18 @@ namespace
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000013.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000014.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000015.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000000.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000001.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000002.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000003.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000004.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveColor.frag.00000005.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000000.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000001.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000002.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000003.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000004.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveDepthStencil.frag.00000005.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000000.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000001.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000002.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000003.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000004.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000005.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000006.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000007.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000008.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.00000009.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.0000000A.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/Resolve.frag.0000000B.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveStencilNoExport.comp.00000000.inc"
#include "libANGLE/renderer/vulkan/shaders/gen/ResolveStencilNoExport.comp.00000001.inc"
......@@ -194,21 +194,19 @@ constexpr ShaderBlob kImageCopy_frag_shaders[] = {
{kImageCopy_frag_00000014, sizeof(kImageCopy_frag_00000014)},
{kImageCopy_frag_00000015, sizeof(kImageCopy_frag_00000015)},
};
constexpr ShaderBlob kResolveColor_frag_shaders[] = {
{kResolveColor_frag_00000000, sizeof(kResolveColor_frag_00000000)},
{kResolveColor_frag_00000001, sizeof(kResolveColor_frag_00000001)},
{kResolveColor_frag_00000002, sizeof(kResolveColor_frag_00000002)},
{kResolveColor_frag_00000003, sizeof(kResolveColor_frag_00000003)},
{kResolveColor_frag_00000004, sizeof(kResolveColor_frag_00000004)},
{kResolveColor_frag_00000005, sizeof(kResolveColor_frag_00000005)},
};
constexpr ShaderBlob kResolveDepthStencil_frag_shaders[] = {
{kResolveDepthStencil_frag_00000000, sizeof(kResolveDepthStencil_frag_00000000)},
{kResolveDepthStencil_frag_00000001, sizeof(kResolveDepthStencil_frag_00000001)},
{kResolveDepthStencil_frag_00000002, sizeof(kResolveDepthStencil_frag_00000002)},
{kResolveDepthStencil_frag_00000003, sizeof(kResolveDepthStencil_frag_00000003)},
{kResolveDepthStencil_frag_00000004, sizeof(kResolveDepthStencil_frag_00000004)},
{kResolveDepthStencil_frag_00000005, sizeof(kResolveDepthStencil_frag_00000005)},
constexpr ShaderBlob kResolve_frag_shaders[] = {
{kResolve_frag_00000000, sizeof(kResolve_frag_00000000)},
{kResolve_frag_00000001, sizeof(kResolve_frag_00000001)},
{kResolve_frag_00000002, sizeof(kResolve_frag_00000002)},
{kResolve_frag_00000003, sizeof(kResolve_frag_00000003)},
{kResolve_frag_00000004, sizeof(kResolve_frag_00000004)},
{kResolve_frag_00000005, sizeof(kResolve_frag_00000005)},
{kResolve_frag_00000006, sizeof(kResolve_frag_00000006)},
{kResolve_frag_00000007, sizeof(kResolve_frag_00000007)},
{kResolve_frag_00000008, sizeof(kResolve_frag_00000008)},
{kResolve_frag_00000009, sizeof(kResolve_frag_00000009)},
{kResolve_frag_0000000A, sizeof(kResolve_frag_0000000A)},
{kResolve_frag_0000000B, sizeof(kResolve_frag_0000000B)},
};
constexpr ShaderBlob kResolveStencilNoExport_comp_shaders[] = {
{kResolveStencilNoExport_comp_00000000, sizeof(kResolveStencilNoExport_comp_00000000)},
......@@ -265,11 +263,7 @@ void ShaderLibrary::destroy(VkDevice device)
{
shader.get().destroy(device);
}
for (RefCounted<ShaderAndSerial> &shader : mResolveColor_frag_shaders)
{
shader.get().destroy(device);
}
for (RefCounted<ShaderAndSerial> &shader : mResolveDepthStencil_frag_shaders)
for (RefCounted<ShaderAndSerial> &shader : mResolve_frag_shaders)
{
shader.get().destroy(device);
}
......@@ -319,20 +313,12 @@ angle::Result ShaderLibrary::getImageCopy_frag(Context *context,
ArraySize(kImageCopy_frag_shaders), shaderFlags, shaderOut);
}
angle::Result ShaderLibrary::getResolveColor_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut)
{
return GetShader(context, mResolveColor_frag_shaders, kResolveColor_frag_shaders,
ArraySize(kResolveColor_frag_shaders), shaderFlags, shaderOut);
}
angle::Result ShaderLibrary::getResolveDepthStencil_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut)
angle::Result ShaderLibrary::getResolve_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut)
{
return GetShader(context, mResolveDepthStencil_frag_shaders, kResolveDepthStencil_frag_shaders,
ArraySize(kResolveDepthStencil_frag_shaders), shaderFlags, shaderOut);
return GetShader(context, mResolve_frag_shaders, kResolve_frag_shaders,
ArraySize(kResolve_frag_shaders), shaderFlags, shaderOut);
}
angle::Result ShaderLibrary::getResolveStencilNoExport_comp(Context *context,
......
......@@ -80,18 +80,18 @@ angle_vulkan_internal_shaders = [
"shaders/gen/ImageCopy.frag.00000013.inc",
"shaders/gen/ImageCopy.frag.00000014.inc",
"shaders/gen/ImageCopy.frag.00000015.inc",
"shaders/gen/ResolveColor.frag.00000000.inc",
"shaders/gen/ResolveColor.frag.00000001.inc",
"shaders/gen/ResolveColor.frag.00000002.inc",
"shaders/gen/ResolveColor.frag.00000003.inc",
"shaders/gen/ResolveColor.frag.00000004.inc",
"shaders/gen/ResolveColor.frag.00000005.inc",
"shaders/gen/ResolveDepthStencil.frag.00000000.inc",
"shaders/gen/ResolveDepthStencil.frag.00000001.inc",
"shaders/gen/ResolveDepthStencil.frag.00000002.inc",
"shaders/gen/ResolveDepthStencil.frag.00000003.inc",
"shaders/gen/ResolveDepthStencil.frag.00000004.inc",
"shaders/gen/ResolveDepthStencil.frag.00000005.inc",
"shaders/gen/Resolve.frag.00000000.inc",
"shaders/gen/Resolve.frag.00000001.inc",
"shaders/gen/Resolve.frag.00000002.inc",
"shaders/gen/Resolve.frag.00000003.inc",
"shaders/gen/Resolve.frag.00000004.inc",
"shaders/gen/Resolve.frag.00000005.inc",
"shaders/gen/Resolve.frag.00000006.inc",
"shaders/gen/Resolve.frag.00000007.inc",
"shaders/gen/Resolve.frag.00000008.inc",
"shaders/gen/Resolve.frag.00000009.inc",
"shaders/gen/Resolve.frag.0000000A.inc",
"shaders/gen/Resolve.frag.0000000B.inc",
"shaders/gen/ResolveStencilNoExport.comp.00000000.inc",
"shaders/gen/ResolveStencilNoExport.comp.00000001.inc",
]
......@@ -111,23 +111,7 @@ enum DestFormat
};
} // namespace ImageCopy_frag
namespace ResolveColor_frag
{
enum flags
{
kSrcIsArray = 0x00000001,
kFlagsMask = 0x00000001,
};
enum Format
{
kIsFloat = 0x00000000,
kIsInt = 0x00000002,
kIsUint = 0x00000004,
kFormatMask = 0x00000006,
};
} // namespace ResolveColor_frag
namespace ResolveDepthStencil_frag
namespace Resolve_frag
{
enum flags
{
......@@ -136,12 +120,15 @@ enum flags
};
enum Resolve
{
kResolveDepth = 0x00000000,
kResolveStencil = 0x00000002,
kResolveDepthStencil = 0x00000004,
kResolveMask = 0x00000006,
kResolveColorFloat = 0x00000000,
kResolveColorInt = 0x00000002,
kResolveColorUint = 0x00000004,
kResolveDepth = 0x00000006,
kResolveStencil = 0x00000008,
kResolveDepthStencil = 0x0000000A,
kResolveMask = 0x0000000E,
};
} // namespace ResolveDepthStencil_frag
} // namespace Resolve_frag
namespace ResolveStencilNoExport_comp
{
......@@ -177,12 +164,9 @@ class ShaderLibrary final : angle::NonCopyable
angle::Result getImageCopy_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut);
angle::Result getResolveColor_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut);
angle::Result getResolveDepthStencil_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut);
angle::Result getResolve_frag(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut);
angle::Result getResolveStencilNoExport_comp(Context *context,
uint32_t shaderFlags,
RefCounted<ShaderAndSerial> **shaderOut);
......@@ -203,12 +187,8 @@ class ShaderLibrary final : angle::NonCopyable
mImageCopy_frag_shaders[InternalShader::ImageCopy_frag::kFlagsMask |
InternalShader::ImageCopy_frag::kSrcFormatMask |
InternalShader::ImageCopy_frag::kDestFormatMask];
RefCounted<ShaderAndSerial>
mResolveColor_frag_shaders[InternalShader::ResolveColor_frag::kFlagsMask |
InternalShader::ResolveColor_frag::kFormatMask];
RefCounted<ShaderAndSerial>
mResolveDepthStencil_frag_shaders[InternalShader::ResolveDepthStencil_frag::kFlagsMask |
InternalShader::ResolveDepthStencil_frag::kResolveMask];
RefCounted<ShaderAndSerial> mResolve_frag_shaders[InternalShader::Resolve_frag::kFlagsMask |
InternalShader::Resolve_frag::kResolveMask];
RefCounted<ShaderAndSerial> mResolveStencilNoExport_comp_shaders
[InternalShader::ResolveStencilNoExport_comp::kFlagsMask];
};
......
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