• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// GENERATED FILE - DO NOT EDIT.
2// Generated by gen_vk_internal_shaders.py.
3//
4// Copyright 2018 The ANGLE Project Authors. All rights reserved.
5// Use of this source code is governed by a BSD-style license that can be
6// found in the LICENSE file.
7//
8// shaders/gen/ImageCopy.frag.00000002.inc:
9//   Pre-generated shader for the ANGLE Vulkan back-end.
10
11#pragma once
12constexpr uint8_t kImageCopy_frag_00000002[] = {
13    0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x02,0xff,0x85,0x57,0xfb,0x6b,0x96,0x65,
14    0x18,0x7e,0xef,0x6f,0x27,0x9d,0xdf,0xd4,0x9c,0xb3,0x03,0xf3,0x34,0x93,0x92,0xad,
15    0xb5,0x6c,0xcb,0x79,0x9e,0x16,0x4e,0x74,0xe9,0x3c,0x81,0x96,0x22,0xeb,0x24,0xa3,
16    0xa6,0xa4,0xa9,0x3f,0x44,0x29,0x13,0xf3,0xf0,0x43,0x92,0x18,0x96,0x82,0x20,0x89,
17    0x92,0xba,0x20,0x10,0x0d,0x6d,0x3f,0x0d,0x11,0xd3,0x88,0x98,0xa7,0xca,0xac,0x30,
18    0xd3,0x7f,0x40,0xf2,0x90,0xd6,0x7d,0xbd,0xf7,0x75,0xb7,0x9b,0x8f,0x24,0xe1,0xf1,
19    0xfb,0x9e,0xeb,0x3e,0x5d,0xf7,0xf5,0xdc,0xcf,0xfb,0xbd,0xcb,0xcb,0x8c,0x28,0x4a,
20    0x12,0x49,0x8a,0x93,0x5e,0xc9,0x65,0x49,0xd2,0x7f,0x0f,0x25,0x99,0x04,0x5f,0xfb,
21    0x24,0x85,0xe9,0x67,0x63,0xd3,0xbc,0xa6,0xea,0x55,0xef,0xbc,0x56,0x5d,0x5b,0x57,
22    0x03,0x7b,0xdf,0x24,0x2f,0xf5,0x83,0xad,0x5f,0x52,0x94,0xe4,0xeb,0x27,0x56,0x5b,
23    0x4b,0xeb,0x72,0xe0,0xe7,0x74,0xdd,0xd0,0xd5,0x5f,0xfd,0x80,0x6b,0x81,0x64,0x7a,
24    0x52,0x90,0x3c,0x63,0xe9,0x93,0x11,0xfc,0x74,0x4c,0x88,0xf5,0x0a,0x58,0x86,0x58,
25    0xff,0x80,0xe5,0x11,0x1b,0x18,0xb0,0x7c,0x62,0x8f,0x04,0xac,0x80,0x58,0x79,0xc0,
26    0x0a,0x89,0x0d,0x0b,0x58,0x11,0xb1,0xc7,0x03,0xd6,0x8b,0xd8,0x93,0x01,0xeb,0x4d,
27    0xac,0x2a,0x60,0xc5,0xc4,0x6a,0x02,0xd6,0x87,0x58,0x6d,0xc0,0xb2,0xc4,0xea,0x03,
28    0x56,0x42,0x6c,0x42,0xc0,0xfa,0x12,0x6b,0x80,0xde,0xda,0xa9,0x6b,0xd0,0xa8,0x1d,
29    0x9e,0x63,0xee,0x7e,0xdc,0x5f,0xd1,0xcf,0x0a,0x6a,0xe8,0xfb,0xe1,0x61,0x0f,0xed,
30    0x87,0x70,0x5f,0xaa,0x59,0x32,0xa9,0x3d,0x2f,0xd5,0x0f,0xdf,0x07,0xe9,0xb7,0x42,
31    0x6a,0x51,0xa6,0xfe,0x59,0x7e,0xc7,0x39,0x3c,0xac,0xfb,0x12,0xf2,0xce,0x70,0x5f,
32    0x4a,0xfd,0xf2,0xe9,0x5f,0x46,0xff,0x84,0xf6,0x41,0x29,0x6e,0xf6,0x4a,0xfd,0xbf,
33    0x90,0xda,0x97,0x57,0xbf,0x38,0x7e,0xa0,0x66,0x19,0x1c,0x70,0xf0,0x9e,0xfb,0xd5,
34    0xac,0x29,0xbe,0x7f,0x42,0xd7,0x82,0x05,0xe7,0x27,0xf9,0x7e,0x94,0xae,0x89,0xc5,
35    0x9b,0x26,0xfb,0xbe,0x52,0xd7,0x17,0x8d,0x2d,0x13,0x87,0xe8,0x54,0xba,0x76,0xce,
36    0xcf,0x57,0xd9,0xff,0x2c,0xf7,0x19,0xa6,0x39,0x47,0xf3,0x3c,0x91,0x6b,0x3c,0xf7,
37    0xcf,0x12,0xab,0xa4,0x16,0xb5,0xd4,0x02,0xfe,0x75,0xb4,0x95,0x04,0xfb,0x58,0xce,
38    0x18,0xec,0xe3,0x68,0x2f,0xa3,0x1d,0x9f,0x13,0xa9,0x8d,0xfb,0x4f,0xa3,0x7e,0x6e,
39    0x6f,0x62,0x7e,0xb7,0xcf,0xe1,0xf9,0xfb,0x7e,0x31,0xcf,0xdb,0xf7,0x2b,0x39,0xab,
40    0xd0,0xfa,0x5d,0xe6,0xca,0x0b,0xf6,0x76,0xce,0xad,0x6b,0xb6,0x35,0xd4,0xc7,0x7e,
41    0x67,0xba,0x5b,0xf7,0xbc,0xfb,0xef,0xc9,0xe9,0xf7,0x20,0xe7,0xd9,0xf7,0x47,0xd9,
42    0x2f,0xfa,0x3b,0x46,0xdf,0x6c,0xb0,0x9f,0xe0,0x6c,0xf8,0xbe,0x33,0xa7,0xdf,0x2e,
43    0xce,0x02,0xe2,0xbb,0xd9,0x6b,0x29,0xf5,0xee,0xe6,0xf3,0xc1,0x67,0xed,0x3c,0xfb,
44    0x41,0xbe,0x47,0xb5,0xd2,0x65,0xee,0xf9,0x28,0xfa,0xf7,0x9f,0xef,0x91,0xf3,0x67,
45    0x7e,0xbf,0xcc,0x9c,0xd8,0x5f,0x09,0xf6,0xeb,0xd4,0x67,0x10,0xed,0xd7,0xf9,0x3c,
46    0x02,0xf6,0x9c,0x9e,0x5c,0x86,0xfc,0x12,0x62,0xb7,0x14,0x29,0x48,0xcf,0xcd,0x66,
47    0xfd,0x02,0x39,0xce,0x56,0xd5,0xc1,0xef,0x22,0xb1,0x0b,0x81,0xcb,0x72,0xde,0x93,
48    0x4b,0xb4,0x4f,0xd1,0x0c,0x75,0x69,0x2e,0x9b,0xa7,0x5a,0xe6,0x83,0xcf,0x6d,0xe2,
49    0xed,0xea,0x83,0xfd,0x1d,0xc6,0xdd,0x66,0x1c,0x66,0xe8,0x2e,0xe3,0xc6,0x32,0x0e,
50    0x73,0xf2,0x17,0xf1,0x43,0xea,0x83,0x3b,0x74,0x8f,0x18,0xe6,0xeb,0x4f,0xdc,0x67,
51    0x8a,0x72,0x47,0xfd,0x61,0xbb,0x8f,0x7e,0xc4,0xfa,0xb9,0x9f,0xce,0x55,0x41,0x7a,
52    0x1e,0x20,0x7c,0x87,0xdc,0xdf,0xe7,0x19,0x89,0x18,0x3e,0x57,0xd5,0x06,0xa7,0x2f,
53    0xc5,0x30,0xf7,0xbb,0xad,0x39,0x3c,0x17,0x3e,0x6f,0xaa,0x16,0xf0,0xfb,0x86,0x3e,
54    0x05,0x8c,0xb9,0x1f,0x7a,0xc8,0x17,0xeb,0x61,0x5a,0xe8,0xa1,0x40,0x0c,0xf7,0x1e,
55    0x0a,0xc5,0x30,0xef,0x21,0x1b,0x7a,0x80,0xad,0x48,0x57,0x96,0x75,0xf1,0xdd,0x7b,
56    0xe8,0x2d,0x56,0x5b,0x42,0x0f,0xc5,0x62,0xb8,0xf7,0x70,0x44,0x0c,0x73,0x3f,0xf4,
57    0xe0,0xb9,0xb2,0xa1,0x87,0x33,0xf4,0x41,0x5f,0x47,0x58,0xd3,0x7b,0x28,0x61,0x0f,
58    0x73,0x42,0x0f,0x7d,0xc5,0x70,0xef,0xa1,0x9f,0x18,0xe6,0x3d,0x94,0x86,0x1e,0x60,
59    0xeb,0xaf,0xab,0x94,0x75,0xf1,0x7d,0x36,0xeb,0x0e,0x10,0xab,0x7d,0x46,0x7a,0xe6,
60    0x19,0x1c,0xdd,0xb7,0x34,0x70,0x3c,0x4b,0x3f,0xf0,0x1e,0xc0,0x9c,0xe0,0x83,0x99,
61    0xff,0x85,0xf3,0xee,0x33,0xf7,0x2b,0x67,0xa7,0x33,0xcc,0xdc,0x6f,0xc4,0xd7,0x73,
62    0xe6,0xae,0x12,0x3b,0xcb,0x5e,0x71,0xaf,0x7f,0x67,0xdc,0x09,0xc6,0x41,0xd3,0x6b,
63    0xc4,0x97,0x2a,0x0f,0xdc,0x85,0x3f,0x58,0xef,0x2a,0xef,0xe8,0xb5,0x70,0xde,0xe5,
64    0xd4,0x6a,0x71,0xd0,0x6a,0xb0,0x18,0xee,0x5a,0x0d,0x11,0xc3,0x5c,0xab,0xaa,0xa0,
65    0x15,0x6c,0x43,0x75,0x55,0xb1,0xff,0xa1,0x3c,0x6f,0xdc,0xff,0xe1,0x62,0xb5,0x13,
66    0xc6,0x6d,0x61,0xdc,0x5d,0xfd,0x8e,0x5c,0xef,0x31,0x06,0x9f,0x5f,0xb3,0xd6,0x3a,
67    0xb1,0xb8,0x72,0xc6,0x6c,0x0e,0xb5,0x60,0x5b,0xaf,0x6b,0x03,0xe3,0xf0,0x99,0xd5,
68    0x1e,0x51,0x6b,0x23,0xcf,0xe3,0x31,0xd6,0xc5,0x6f,0xd2,0x46,0xf2,0xf8,0x40,0xcc,
69    0x8e,0xdf,0xa5,0x0d,0xc4,0x36,0x89,0xe1,0x95,0x3c,0xbf,0x2d,0xcc,0x89,0xfc,0x1e,
70    0xd7,0x4e,0x2e,0x15,0x39,0x3e,0xe0,0xf4,0xb7,0x56,0xbb,0x45,0xec,0x26,0x39,0x7c,
71    0x2b,0x96,0x17,0xbc,0xda,0xc9,0x15,0x73,0x8d,0x33,0x38,0x26,0x66,0x77,0x3d,0x5c,
72    0xa3,0x91,0xc4,0x84,0xfd,0xee,0xce,0xd1,0x68,0x1b,0x6b,0x6e,0x0b,0x1a,0x7d,0x24,
73    0x16,0xe7,0x1a,0xed,0x0a,0x1a,0xc1,0xb6,0x5d,0xd7,0xc7,0x8c,0xfb,0x38,0x68,0xb4,
74    0x33,0x68,0x34,0x32,0x47,0xa3,0x4f,0xc4,0xec,0x51,0xa3,0x4f,0xc5,0x70,0xd7,0x68,
75    0x37,0x73,0x6e,0x0f,0x1a,0xed,0x20,0x97,0x8a,0x1c,0x9f,0x5d,0x41,0xa3,0xdd,0x41,
76    0xa3,0xef,0xc4,0xf2,0x82,0xd7,0x0e,0x72,0x75,0x8d,0x8e,0x8b,0xd9,0x8f,0x91,0xa7,
77    0x6b,0x34,0x8a,0x1a,0x65,0xd8,0x6f,0x47,0x8e,0x46,0x7b,0x59,0x73,0x6f,0xd0,0xe8,
78    0x33,0xb1,0x38,0xd7,0xe8,0x70,0xd0,0x08,0xb6,0x7d,0xba,0x0e,0x30,0xee,0x40,0xd0,
79    0xe8,0xf3,0xa0,0xd1,0xa8,0x1c,0x8d,0x0e,0x8a,0xd9,0xa3,0x46,0x87,0xc4,0x70,0xd7,
80    0xa8,0x83,0x39,0xf7,0x05,0x8d,0xf6,0x93,0x4b,0x45,0x8e,0xcf,0xe1,0xa0,0x51,0x47,
81    0xd0,0xe8,0x7b,0xb1,0xbc,0xe0,0xb5,0x9f,0x5c,0x5d,0xa3,0x4e,0x31,0x3b,0xb4,0xca,
82    0x30,0x9f,0xdf,0xbd,0x2a,0xe6,0x80,0x5f,0x37,0x35,0xc3,0xf3,0x08,0x31,0x1d,0xe1,
83    0xf9,0xf8,0x14,0xef,0xfc,0xca,0x70,0xe7,0xab,0xc5,0x70,0xbf,0xf3,0x4f,0x8b,0x61,
84    0x7e,0xe7,0x9b,0x82,0x7e,0xb0,0xd5,0xe8,0xaa,0x67,0xdd,0xfa,0x90,0x7b,0x2c,0x73,
85    0xb7,0x87,0xdc,0xe3,0xc4,0x70,0xcf,0x3d,0x5e,0x0c,0xf3,0xdc,0x0d,0x21,0x37,0x6c,
86    0x13,0x74,0x35,0x30,0xf7,0x84,0xf0,0x3c,0x99,0x24,0xd6,0x17,0x7e,0xef,0x8f,0x33,
87    0xd7,0x64,0x31,0x7c,0x2b,0xb5,0xf0,0xb8,0x06,0x6a,0x01,0x9f,0x29,0x62,0x35,0xc1,
88    0x73,0x32,0xf3,0xa3,0xee,0xcc,0x50,0x17,0x3e,0x53,0x75,0xcd,0x64,0xfc,0xd4,0x50,
89    0xf7,0x85,0x50,0x77,0xb6,0xbe,0xa5,0xe1,0xfd,0x6d,0x1a,0xb1,0x6e,0xe9,0x79,0x9f,
90    0xc0,0x79,0x34,0x6b,0x04,0xec,0x8d,0x62,0x71,0xbe,0x36,0x6b,0x2e,0xe0,0xd3,0xc5,
91    0x62,0x1b,0xd3,0xdf,0x94,0xde,0xe9,0x59,0xcd,0x60,0x1e,0xd8,0xf2,0xf9,0xbb,0xec,
92    0xef,0x87,0xe8,0xc9,0x39,0xcd,0x0c,0xe7,0x7b,0x81,0x31,0xe8,0x73,0x06,0xb9,0xc3,
93    0xb7,0x89,0xbe,0x35,0x81,0xff,0xe8,0xff,0xe0,0x5f,0xfb,0x00,0xfe,0x1f,0x92,0x67,
94    0x9d,0x98,0xcf,0xe8,0xc0,0x73,0x0c,0xfd,0xeb,0x1e,0xc0,0xd3,0x6b,0x37,0x05,0x9e,
95    0xe7,0xc5,0xb8,0x82,0xfb,0x18,0xce,0x0d,0x6a,0xc0,0x36,0x4b,0xcc,0x8e,0x77,0xdb,
96    0x36,0xfe,0x0d,0xd2,0x2c,0x86,0xfb,0x3c,0xcd,0xe1,0x3c,0xed,0x09,0xf3,0x34,0x57,
97    0x0c,0xf7,0x79,0x9a,0x27,0x86,0xf9,0x3c,0xad,0x0d,0xe7,0x0a,0xdb,0x7c,0x5d,0x8b,
98    0xc8,0x6d,0x51,0xc8,0xfd,0x12,0x73,0x1f,0x0c,0xb9,0x5f,0x16,0xc3,0x3d,0xf7,0x62,
99    0x31,0xcc,0x73,0xaf,0x09,0xb9,0x61,0x5b,0xa2,0xab,0x85,0xb9,0x5b,0xc2,0xef,0xf2,
100    0x2b,0xcc,0x7d,0x34,0xfc,0x2e,0xbf,0x2a,0x86,0x9f,0xe2,0xfb,0xd0,0xeb,0x62,0xd8,
101    0x89,0xf0,0x7e,0xf8,0x86,0x18,0xde,0xc9,0x7a,0xad,0xa1,0x1e,0x6c,0xcb,0x74,0xb5,
102    0xb2,0xde,0x32,0x3e,0x17,0xa0,0xdb,0x49,0x72,0x6c,0x0e,0xef,0x4d,0xee,0xd7,0xca,
103    0xf3,0x80,0xdf,0x45,0x31,0x1f,0x70,0x3d,0xc9,0x7c,0xce,0xe7,0x4d,0xf2,0xe9,0x0a,
104    0x7c,0xde,0x12,0xc3,0x9d,0xcf,0x8a,0xc0,0x07,0xb6,0x36,0x5d,0x2b,0x58,0xa7,0x2d,
105    0xf0,0x39,0x45,0x3e,0x17,0xc3,0x73,0xca,0xfd,0x56,0x04,0x3e,0x97,0xc4,0x7c,0xc0,
106    0xf1,0x14,0xf3,0x39,0x9f,0xb7,0xc9,0xa7,0x3d,0xf0,0x59,0x29,0x86,0x3b,0x9f,0xd5,
107    0x81,0x0f,0x6c,0xab,0x74,0xad,0x66,0x9d,0x55,0x81,0xcf,0x69,0xb1,0xbf,0xd9,0x2e,
108    0x49,0xcf,0xbc,0xba,0xdf,0xea,0xc0,0xe7,0x27,0x31,0x1f,0x70,0x3c,0xcd,0x7c,0xf0,
109    0x5d,0x43,0xdf,0x25,0xbc,0x57,0x98,0x95,0xa5,0xd4,0x12,0xf9,0xbc,0x4e,0x97,0xf4,
110    0xe0,0xfe,0x6e,0xe8,0xb1,0x6b,0x42,0x9d,0x1f,0xc5,0x6a,0xa1,0x76,0x17,0xe7,0x08,
111    0xbe,0x6b,0xe9,0x3b,0x9f,0xf7,0x0e,0xbe,0x0b,0x99,0xaf,0x99,0xf7,0xae,0x88,0x77,
112    0xd5,0xfb,0xf0,0x98,0xb5,0x21,0xff,0x0f,0x62,0x35,0x50,0x73,0x21,0xef,0xc0,0x24,
113    0x8d,0xb8,0x41,0xdb,0x3d,0x9d,0x92,0x7a,0x5d,0xff,0x00,0x80,0xb0,0xd2,0x98,0x3c,
114    0x12,0x00,0x00
115};
116
117// Generated from:
118//
119// #version 450 core
120//
121// #extension GL_GOOGLE_include_directive : require
122// #extension GL_EXT_samplerless_texture_functions : require
123//
124// layout(set = 0, binding = 0)uniform texture2D src;
125// layout(location = 0)out uvec4 dst;
126//
127// #line 1 "shaders/src/ImageCopy.inc"
128//
129// layout(push_constant)uniform PushConstants {
130//
131//     ivec2 srcOffset;
132//     ivec2 dstOffset;
133//     int srcMip;
134//     int srcLayer;
135//     int srcSampleCount;
136//
137//     bool flipX;
138//     bool flipY;
139//
140//     bool premultiplyAlpha;
141//     bool unmultiplyAlpha;
142//
143//     bool dstHasLuminance;
144//     bool dstIsAlpha;
145//
146//     bool srcIsSRGB;
147//     bool dstIsSRGB;
148//
149//     int dstDefaultChannelsMask;
150//     bool rotateXY;
151// } params;
152//
153// float linearToSRGB(float linear)
154// {
155//
156//     if(linear <= 0.0031308)
157//     {
158//         return linear * 12.92;
159//     }
160//     else
161//     {
162//         return pow(linear,(1.0f / 2.4f))* 1.055f - 0.055f;
163//     }
164// }
165//
166// ivec2 transformImageCoords(ivec2 glFragCoords)
167// {
168//     ivec2 imageCoordsOut = glFragCoords - params . dstOffset;
169//
170//     if(params . flipX)
171//     {
172//         imageCoordsOut . x = - imageCoordsOut . x;
173//     }
174//     if(params . flipY)
175//     {
176//         imageCoordsOut . y = - imageCoordsOut . y;
177//     }
178//     if(params . rotateXY)
179//     {
180//         imageCoordsOut . xy = imageCoordsOut . yx;
181//     }
182//
183//     return imageCoordsOut;
184// }
185//
186//       uvec4 transformSrcValue(vec4 srcValue)
187// {
188//
189//     if(params . srcIsSRGB)
190//     {
191//
192//         srcValue . r = linearToSRGB(srcValue . r);
193//         srcValue . g = linearToSRGB(srcValue . g);
194//         srcValue . b = linearToSRGB(srcValue . b);
195//     }
196//
197//     if(params . premultiplyAlpha)
198//     {
199//         srcValue . rgb *= srcValue . a;
200//     }
201//     else if(params . unmultiplyAlpha && srcValue . a > 0)
202//     {
203//         srcValue . rgb /= srcValue . a;
204//     }
205//
206//     srcValue *= 255.0;
207//
208//           uvec4 dstValue = uvec4(srcValue);
209//
210//     if(params . dstHasLuminance)
211//     {
212//         dstValue . rg = dstValue . ra;
213//     }
214//     else if(params . dstIsAlpha)
215//     {
216//         dstValue . r = dstValue . a;
217//     }
218//     else
219//     {
220//         int defaultChannelsMask = params . dstDefaultChannelsMask;
221//         if((defaultChannelsMask & 2)!= 0)
222//         {
223//             dstValue . g = 0;
224//         }
225//         if((defaultChannelsMask & 4)!= 0)
226//         {
227//             dstValue . b = 0;
228//         }
229//         if((defaultChannelsMask & 8)!= 0)
230//         {
231//             dstValue . a = 1;
232//         }
233//     }
234//
235//     return dstValue;
236// }
237// #line 56 "shaders/src/ImageCopy.frag"
238//
239// void main()
240// {
241//     ivec2 srcSubImageCoords = transformImageCoords(ivec2(gl_FragCoord . xy));
242//
243//           vec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
244//
245//     dst = transformSrcValue(srcValue);
246// }
247