Files
godot-angle-static/src/libANGLE/renderer/vulkan/shaders/gen/ImageCopy.frag.00000008.inc
Phan Quang Minh ef4327f6aa Vulkan: Make UtilsVk::copyImage copy YCbCr images properly
This changes the descriptor binding for the image from
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE to
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER for YCbCr source textures and
ensures that the copy pipelines and descriptor sets for YCbCr source
textures are created with the appropriate YCbCr samplers, and use the
`texture()` function instead of `texelFetch()` for YCbCr images.

Bug: angleproject:8252
Change-Id: Ife3e230d3669b275f4e0fab1922d75b6b6c4f8bd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4675806
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-07-19 14:44:41 +00:00

228 lines
11 KiB
SQL

// 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.00000008.inc:
// Pre-generated shader for the ANGLE Vulkan back-end.
#pragma once
constexpr uint8_t kImageCopy_frag_00000008[] = {
0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x02,0xff,0x7d,0x97,0xdb,0x6f,0x55,0x45,
0x14,0xc6,0x67,0xce,0x39,0x6d,0xb9,0x16,0xb0,0xad,0x0a,0x69,0xa4,0xe5,0x26,0x5a,
0x28,0xb7,0x72,0xb3,0x1c,0xa0,0x16,0x69,0x8d,0x08,0xd2,0x86,0x04,0x11,0x95,0x2a,
0xa2,0x40,0xe0,0x05,0x5f,0x48,0x90,0x8b,0x42,0x20,0x82,0x48,0x23,0xda,0xc6,0x08,
0xd1,0xc8,0x03,0x88,0xf4,0x45,0x50,0x68,0x34,0x04,0x8d,0x40,0xa2,0x34,0x51,0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x29,0xbc,0x8d,0xf7,0x49,0x8e,0x87,0x5d,0xee,0xbb,0x49,0xf5,
0xce,0x73,0x1f,0xa2,0x37,0xc7,0x27,0x3a,0xa7,0xb1,0x39,0x67,0xf2,0xf9,0x8e,0x7c,
0xa6,0x99,0x7c,0xbe,0x07,0xd7,0x7c,0xba,0x4c,0x3e,0x22,0xbb,0x10,0x56,0x17,0x71,
0x2e,0x98,0x7c,0x26,0x90,0xcf,0x1c,0xf3,0x9e,0x52,0xbd,0x2e,0x93,0xcf,0x5c,0x9f,
0xe8,0x9c,0xc7,0xe6,0x82,0xc9,0xe7,0x07,0xf2,0x39,0x62,0xf2,0xf9,0x11,0x5c,0xf3,
0xe9,0x36,0xf9,0x88,0xec,0x62,0x58,0xdd,0xc4,0xb9,0x68,0xf2,0x99,0xe4,0x93,0xff,
0xc1,0xe6,0xfa,0x5c,0xbf,0xaa,0x5e,0xb7,0xc9,0xa7,0xde,0x27,0x3a,0x5d,0xd8,0x5c,
0x44,0xb7,0x13,0xdd,0x53,0xcc,0x95,0xf4,0xca,0x57,0xf0,0x9d,0x36,0x71,0xaa,0x7c,
0x0e,0x77,0x79,0xb6,0x9d,0x26,0xce,0xa3,0x3e,0x89,0xd5,0x8d,0xcd,0x29,0x74,0x3b,
0xd0,0x3d,0xc6,0xdc,0x89,0xee,0x67,0xf8,0x3b,0xcc,0xdc,0x15,0x31,0xab,0xe9,0x3c,
0x9b,0x0e,0xe3,0xbf,0xce,0x27,0x31,0x3a,0xb1,0x17,0x7f,0xb3,0x83,0xc5,0x65,0x64,
0x3d,0xa1,0x4b,0x66,0x84,0xf5,0x0f,0xb7,0x23,0xca,0x37,0x14,0x12,0x00,0x00
};
// Generated from:
//
// #version 450 core
//
// #extension GL_EXT_samplerless_texture_functions : require
//
// layout(set = 0, binding = 0)uniform texture2D src;
// layout(location = 0)out uvec4 dst;
//
// layout(push_constant)uniform PushConstants {
//
// ivec2 srcOffset;
// ivec2 dstOffset;
// int srcMip;
// int srcLayer;
//
// bool flipX;
// bool flipY;
//
// bool premultiplyAlpha;
// bool unmultiplyAlpha;
//
// bool dstHasLuminance;
// bool dstIsAlpha;
//
// bool srcIsSRGB;
// bool dstIsSRGB;
//
// int dstDefaultChannelsMask;
// bool rotateXY;
// } params;
//
// float linearToSRGB(float linear)
// {
//
// if(linear <= 0.0031308)
// {
// return linear * 12.92;
// }
// else
// {
// return pow(linear,(1.0f / 2.4f))* 1.055f - 0.055f;
// }
// }
//
// void main()
// {
// ivec2 dstSubImageCoords = ivec2(gl_FragCoord . xy)- params . dstOffset;
//
// ivec2 srcSubImageCoords = dstSubImageCoords;
//
// if(params . flipX)
// {
// srcSubImageCoords . x = - srcSubImageCoords . x;
// }
// if(params . flipY)
// {
// srcSubImageCoords . y = - srcSubImageCoords . y;
// }
// if(params . rotateXY)
// {
// srcSubImageCoords . xy = srcSubImageCoords . yx;
// }
//
// vec4 srcValue = texelFetch(src, params . srcOffset + srcSubImageCoords, params . srcMip);
//
// if(params . srcIsSRGB)
// {
//
// srcValue . r = linearToSRGB(srcValue . r);
// srcValue . g = linearToSRGB(srcValue . g);
// srcValue . b = linearToSRGB(srcValue . b);
// }
//
// if(params . premultiplyAlpha)
// {
// srcValue . rgb *= srcValue . a;
// }
// else if(params . unmultiplyAlpha && srcValue . a > 0)
// {
// srcValue . rgb /= srcValue . a;
// }
//
// srcValue *= 255.0;
//
// 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;
// }
// }
//
// dst = dstValue;
// }