| // GENERATED FILE - DO NOT EDIT. |
| // Generated by gen_vk_internal_shaders.py. |
| // |
| // Copyright 2018 The ANGLE Project Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // |
| // shaders/gen/ImageCopy.frag.00000005.inc: |
| // Pre-generated shader for the ANGLE Vulkan back-end. |
| |
| #pragma once |
| constexpr uint8_t kImageCopy_frag_00000005[] = { |
| 0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x02,0xff,0x85,0x96,0xcb,0x6f,0x55,0x55, |
| 0x14,0xc6,0xf7,0x3e,0xb7,0xed,0xed,0x83,0x42,0x2b,0x5c,0x4a,0x51,0x0b,0xa5,0x90, |
| 0xaa,0x6d,0x6f,0x49,0x44,0x20,0x11,0x9b,0x5a,0x31,0xe5,0x51,0x7c,0x75,0xd8,0x81, |
| 0x31,0x71,0xe2,0x40,0x18,0xe8,0x88,0x81,0x31,0x46,0x34,0xe9,0x8c,0x7f,0x81,0x87, |
| 0x68,0x4c,0x45,0x0d,0x52,0x18,0x8a,0x8f,0x46,0x53,0xb5,0xd1,0x14,0x6d,0xec,0x48, |
| 0x6d,0x8c,0x10,0xab,0x36,0xb6,0x54,0x62,0x8d,0x6b,0x9d,0xfd,0x5b,0xdc,0x95,0x86, |
| 0x84,0x9b,0xac,0x9c,0xb3,0xbf,0xf5,0xfa,0xd6,0xe3,0xec,0xdc,0x42,0xd6,0x51,0x0c, |
| 0x21,0x86,0xfa,0x50,0x1b,0x9e,0x88,0x21,0xff,0x35,0x87,0x2c,0xe8,0x6b,0x43,0xa8, |
| 0xc9,0x9f,0x83,0x43,0xc3,0x43,0xe5,0x97,0x5e,0x7e,0xbe,0xbc,0xeb,0xa1,0x9d,0xaa, |
| 0x5f,0x1b,0x0a,0xb9,0x9d,0xea,0xd6,0x85,0x62,0xa8,0x92,0xa7,0xca,0x8b,0xcf,0xbd, |
| 0x70,0x54,0xf1,0xb3,0x22,0x97,0x45,0x9a,0xc4,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0xe1,0x2b,0x6a, |
| 0xe8,0x76,0x35,0x7c,0x0d,0x6e,0x35,0x7c,0x03,0x66,0x35,0x4c,0xbb,0x1a,0x54,0x37, |
| 0x25,0x32,0x4d,0xde,0x29,0x57,0xc3,0xb7,0xe4,0x8e,0xae,0x86,0xef,0xc0,0xad,0x86, |
| 0xdd,0x31,0x61,0x66,0xa7,0x35,0x58,0xac,0x69,0x57,0xc3,0xfe,0x98,0x6c,0x26,0xf1, |
| 0x99,0x72,0x35,0x5c,0xa5,0x86,0x3d,0xae,0x86,0xef,0xc1,0xad,0x86,0x1f,0xc0,0xac, |
| 0x86,0x59,0x57,0x83,0xea,0x66,0x44,0x66,0xc9,0x3b,0xc3,0x1e,0x69,0xde,0x1f,0xc9, |
| 0xbd,0x3f,0x56,0xf6,0x59,0x39,0x9a,0xed,0xac,0xe3,0xf8,0x38,0x76,0xd3,0xf8,0xcd, |
| 0xc0,0x47,0x77,0xfe,0x7d,0xf6,0xdd,0x76,0xee,0x03,0x38,0x8f,0xb8,0x9d,0xfb,0x10, |
| 0xfc,0x55,0x76,0xee,0x02,0x98,0xc6,0x55,0x3f,0xfd,0xc6,0x3f,0xc2,0x6f,0x14,0x3f, |
| 0xed,0xe9,0x45,0xf0,0x67,0xc5,0x4b,0xbf,0x9f,0x71,0xf2,0x5d,0xe0,0x1b,0xbd,0xe8, |
| 0x7a,0xf5,0x13,0xfe,0x03,0xae,0x57,0x3f,0x83,0x5b,0xaf,0x7e,0x01,0xb3,0x5e,0x65, |
| 0xb1,0xd2,0x2b,0xd5,0xcd,0x89,0xcc,0x53,0xff,0x9c,0x9b,0xf7,0xaf,0xe4,0x2e,0xe4, |
| 0xfd,0xab,0xcd,0xef,0xbc,0xdf,0xc0,0xc6,0xdd,0x77,0xa8,0x9c,0x9e,0x12,0x0f,0xd5, |
| 0x5f,0xc3,0xcf,0xe4,0x75,0x89,0xa5,0xf8,0x75,0x7c,0xaf,0xe5,0xb1,0xea,0xf2,0xba, |
| 0x7e,0x27,0xce,0x75,0xee,0x82,0x6a,0x77,0xa7,0xea,0x4c,0x94,0xa7,0x72,0x9a,0x77, |
| 0xf5,0xfe,0x41,0xbd,0xc3,0xae,0xde,0x3f,0xc1,0xad,0xde,0xbf,0xc0,0xac,0xde,0x25, |
| 0xb7,0x1b,0xaa,0x5b,0x10,0x59,0xa2,0xde,0x05,0x57,0xef,0xdf,0xae,0xde,0x31,0x62, |
| 0x2d,0x82,0x8f,0xc0,0xc9,0xfc,0x96,0xd8,0x93,0x6d,0x79,0x8e,0x94,0x73,0x1e,0xfb, |
| 0x05,0xf2,0x46,0xd7,0xe7,0x1b,0xb9,0x5f,0xc8,0x31,0xf5,0x5f,0x76,0x79,0x6f,0xde, |
| 0xa6,0xcf,0xff,0xde,0xa1,0xcf,0x2b,0xf8,0x99,0xbc,0x49,0x9f,0xff,0xc3,0x77,0xc5, |
| 0xf5,0x59,0x9d,0xc7,0xd1,0xdd,0xae,0xcf,0xc6,0x49,0x9f,0x8b,0xec,0xdc,0x01,0x7c, |
| 0x96,0xf0,0x5f,0x5e,0x35,0x93,0xcc,0xd9,0x0e,0xc6,0x34,0xcb,0x39,0xfc,0x62,0xac, |
| 0xcc,0xab,0x2e,0xa6,0x79,0x1d,0x73,0xf3,0xaa,0x8f,0x09,0xb7,0x79,0x35,0xc4,0x84, |
| 0xd9,0xbc,0x7a,0x5d,0xdf,0x54,0xb7,0x46,0xa4,0x99,0xbc,0xfa,0x6e,0x75,0x35,0xc5, |
| 0x94,0x5b,0xc5,0xfe,0x53,0x66,0xae,0xae,0x5e,0x7c,0x9a,0x1d,0x9f,0xbb,0xe0,0x73, |
| 0xdc,0xf1,0x59,0x1f,0x13,0x6e,0x7c,0x36,0xc4,0x84,0x19,0x9f,0xb2,0xe3,0xa3,0xba, |
| 0x92,0x48,0x2b,0xb1,0xf5,0xdd,0xe6,0xd8,0x02,0x97,0x02,0xf7,0xa1,0x72,0xdc,0x17, |
| 0x2b,0xb8,0xdd,0x35,0x65,0x7c,0x5b,0xdd,0x3d,0xb0,0x19,0x5e,0x27,0xdc,0x3d,0x70, |
| 0x77,0x4c,0xf8,0x04,0xf1,0xef,0x8d,0x09,0x1b,0x75,0xbb,0xde,0x16,0x13,0x3e,0x02, |
| 0xd7,0x76,0xc7,0x55,0x75,0x5b,0x44,0xda,0xc9,0xa7,0xef,0xc6,0xab,0x0f,0x9f,0x41, |
| 0x77,0x4f,0x9b,0x5d,0xbb,0x9b,0xed,0x41,0xb8,0x2b,0xd7,0x3e,0xe2,0x19,0x9f,0x0e, |
| 0xf8,0x9c,0x74,0x7c,0xb6,0xc7,0x84,0x1b,0x9f,0x4e,0xc7,0x47,0x75,0x3b,0x44,0x3a, |
| 0xc9,0xb3,0xc3,0xf1,0xe9,0xc7,0x47,0xf3,0x65,0xf0,0x31,0xbb,0x4e,0xc7,0xe7,0x50, |
| 0x4c,0x36,0xca,0xb1,0x9f,0x78,0xc6,0xe7,0x7e,0xf8,0x0c,0x3b,0x3e,0x0f,0xc4,0x84, |
| 0x1b,0x9f,0x1e,0xc7,0x47,0x75,0x5d,0x22,0x3d,0xe4,0xe9,0x72,0x7c,0x06,0x62,0xfa, |
| 0xff,0x70,0x28,0x56,0xf6,0xc9,0xec,0x7a,0x1c,0x9f,0x23,0x31,0xd9,0x28,0xc7,0x01, |
| 0xe2,0xf9,0x19,0x97,0x9d,0xed,0x50,0x4c,0xfb,0xa0,0x3b,0x73,0x84,0xbc,0x7e,0x4f, |
| 0x7b,0x9d,0xed,0xe1,0x98,0xf6,0x5b,0xf7,0x5d,0xfd,0x34,0x4e,0x9f,0x30,0xb9,0x8c, |
| 0x6e,0x45,0xa6,0xb6,0x57,0xe4,0x7f,0xb3,0xf8,0x9c,0x61,0xac,0x0d,0x00,0x00 |
| }; |
| |
| // Generated from: |
| // |
| // #version 450 core |
| // |
| // #extension GL_GOOGLE_include_directive : require |
| // #extension GL_EXT_samplerless_texture_functions : require |
| // |
| // layout(set = 0, binding = 0)uniform itexture2D src; |
| // layout(location = 0)out ivec4 dst; |
| // |
| // #line 1 "shaders/src/ImageCopy.inc" |
| // |
| // layout(push_constant)uniform PushConstants { |
| // |
| // ivec2 srcOffset; |
| // ivec2 dstOffset; |
| // int srcMip; |
| // int srcLayer; |
| // int srcSampleCount; |
| // |
| // bool flipX; |
| // bool flipY; |
| // |
| // bool premultiplyAlpha; |
| // bool unmultiplyAlpha; |
| // |
| // bool dstHasLuminance; |
| // bool dstIsAlpha; |
| // |
| // bool srcIsSRGB; |
| // bool dstIsSRGB; |
| // |
| // int dstDefaultChannelsMask; |
| // bool rotateXY; |
| // } params; |
| // |
| // ivec2 transformImageCoords(ivec2 glFragCoords) |
| // { |
| // ivec2 imageCoordsOut = glFragCoords - params . dstOffset; |
| // |
| // if(params . flipX) |
| // { |
| // imageCoordsOut . x = - imageCoordsOut . x; |
| // } |
| // if(params . flipY) |
| // { |
| // imageCoordsOut . y = - imageCoordsOut . y; |
| // } |
| // if(params . rotateXY) |
| // { |
| // imageCoordsOut . xy = imageCoordsOut . yx; |
| // } |
| // |
| // return imageCoordsOut; |
| // } |
| // |
| // ivec4 transformSrcValue(ivec4 srcValue) |
| // { |
| // |
| // if(params . premultiplyAlpha) |
| // { |
| // srcValue . rgb *= srcValue . a; |
| // } |
| // else if(params . unmultiplyAlpha && srcValue . a > 0) |
| // { |
| // srcValue . rgb /= srcValue . a; |
| // } |
| // |
| // ivec4 dstValue = ivec4(srcValue); |
| // |
| // if(params . dstHasLuminance) |
| // { |
| // dstValue . rg = dstValue . ra; |
| // } |
| // else if(params . dstIsAlpha) |
| // { |
| // dstValue . r = dstValue . a; |
| // } |
| // else |
| // { |
| // int defaultChannelsMask = params . dstDefaultChannelsMask; |
| // if((defaultChannelsMask & 2)!= 0) |
| // { |
| // dstValue . g = 0; |
| // } |
| // if((defaultChannelsMask & 4)!= 0) |
| // { |
| // dstValue . b = 0; |
| // } |
| // if((defaultChannelsMask & 8)!= 0) |
| // { |
| // dstValue . a = 1; |
| // } |
| // } |
| // |
| // return dstValue; |
| // } |
| // #line 56 "shaders/src/ImageCopy.frag" |
| // |
| // void main() |
| // { |
| // ivec2 srcSubImageCoords = transformImageCoords(ivec2(gl_FragCoord . xy)); |
| // |
| // ivec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip); |
| // |
| // dst = transformSrcValue(srcValue); |
| // } |