Hash :
8f367854
Author :
Date :
2024-10-13T13:45:17
Vulkan: Refactor ImageCopy shader - Refactor common shader code into "ImageCopy.inc" - Add ImageCopyFloat shader that supports only float src and dst formats - Perform YUV and multisampled image copies with ImageCopyFloat Bug: angleproject:372059358 Change-Id: I34bbaf49f98920494d9ed9e1fd290b413a89ea13 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5927276 Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
// 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.0000000A.inc:
// Pre-generated shader for the ANGLE Vulkan back-end.
#pragma once
constexpr uint8_t kImageCopy_frag_0000000A[] = {
0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x02,0xff,0x85,0x96,0xcd,0x6f,0x94,0x55,
0x14,0xc6,0xef,0x9d,0x99,0x76,0x5a,0x4a,0x07,0xb0,0xd0,0x52,0xc1,0x52,0x18,0x15,
0x9b,0x16,0x3a,0x35,0x20,0x4d,0x54,0x52,0x1b,0xa4,0x56,0x47,0x8b,0xda,0xbd,0x31,
0x71,0xe3,0x42,0x58,0xe8,0x8e,0xc4,0x18,0x63,0xea,0xa2,0xe9,0x8a,0x7f,0x81,0x0f,
0x11,0x13,0x44,0x0d,0xf2,0xb1,0x14,0x45,0x22,0xa9,0xda,0x68,0xaa,0x36,0x76,0xa5,
0x36,0x46,0x88,0x55,0x8b,0x94,0x46,0xd1,0x73,0xde,0xfb,0x3b,0xcc,0x49,0x43,0x42,
0x93,0x9b,0xf7,0xbd,0xcf,0xf9,0x7a,0x9e,0x73,0xce,0xbc,0x69,0x3e,0x57,0x2e,0x86,
0x10,0xc3,0x8a,0xd0,0x10,0xf6,0xc5,0x90,0xfd,0xad,0x09,0xb9,0xa0,0xaf,0x4d,0xa1,
0x3e,0x7b,0x0e,0x55,0x9f,0xaf,0x6e,0x7f,0xf5,0xb5,0x97,0xb6,0xef,0xd8,0x59,0x51,
0x7b,0x29,0xe4,0x33,0x3f,0xb5,0xad,0x0a,0xc5,0x50,0x90,0xa7,0x9e,0x57,0x5e,0x7c,
0x79,0xbf,0xe2,0xc7,0xe4,0x9c,0x97,0xb3,0x5a,0xfc,0x14,0x97,0x02,0xe1,0x89,0x50,
0x17,0x5a,0x53,0xfa,0x50,0xe6,0x69,0x58,0x04,0x6b,0x70,0x58,0x0e,0x6c,0xb5,0xc3,
0xf2,0x60,0x6b,0x1d,0x56,0x00,0x5b,0xef,0xb0,0x3a,0xb0,0x8d,0x0e,0xab,0x07,0xeb,
0x74,0x58,0x11,0xec,0x5e,0x87,0x35,0x80,0x3d,0xe0,0xb0,0x46,0xb0,0x1e,0x87,0xad,
0x00,0xab,0x38,0xac,0x09,0x6c,0x87,0xc3,0x56,0x82,0xf5,0x3b,0xac,0x19,0xec,0x11,
0x87,0x95,0xc0,0x06,0xb4,0xdf,0xa2,0xd4,0x7a,0x30,0x24,0x0a,0x8f,0x91,0x7b,0x15,
0xf7,0x53,0xf2,0xdc,0x42,0x0f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9d,
0x6d,0x8e,0xcf,0x9e,0x98,0xfe,0x1f,0xac,0xc6,0xda,0x3e,0x99,0x5f,0xaf,0xe3,0x33,
0x12,0x93,0x8f,0x72,0xdc,0x43,0x3e,0x3f,0xe3,0x8a,0xf3,0x7d,0x26,0xa6,0x7d,0xd0,
0x9d,0x19,0xa1,0xae,0xdf,0xd3,0x3e,0xe7,0xfb,0x74,0x4c,0xfb,0xad,0xfb,0xae,0x71,
0x9a,0x67,0xb7,0x30,0x39,0x8f,0xed,0x5f,0x99,0x5a,0xbf,0x9c,0xff,0x01,0x6b,0x67,
0x68,0x9c,0xbc,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 utexture2D src;
// layout(location = 0)out uvec4 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;
// }
//
// uvec4 transformSrcValue(uvec4 srcValue)
// {
//
// if(params . premultiplyAlpha)
// {
// srcValue . rgb *= srcValue . a;
// }
// else if(params . unmultiplyAlpha && srcValue . a > 0)
// {
// srcValue . rgb /= srcValue . a;
// }
//
// uvec4 dstValue = uvec4(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));
//
// uvec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
//
// dst = transformSrcValue(srcValue);
// }