Hash :
8c341cfd
Author :
Date :
2023-10-04T12:49:59
Vulkan: Fix blits involving 3D images The layer vs depth value involved with 3D images when calling vkCmdBlitImage is fixed in this change. However, that brought to light that the combination of VUID-vkCmdBlitImage-srcImage-00240 and VUID-vkCmdBlitImage-dstImage-00252 make it impossible to blit between 3D and 2D array images, which is likely a spec oversight. This change makes 3D<->2DArray blits fall back to draw-based blit. This in turn exposed the fact that 3D images as src were not handled in BlitResolve.frag. A new Blit3DSrc.frag shader is added which shares code with BlitResolve.frag to implement this. This is a separate shader to avoid creating unnecessary and invalid combinations of shaders. VK_EXT_image_2d_view_of_3d could have been used to avoid this new shader, but that is not ubiquitous. Bug: angleproject:7291 Bug: dawn:1962 Change-Id: I6a96162f95829304b4731d43208d9d054f538105 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911800 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
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
// 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/BlitResolve.frag.00000000.inc:
// Pre-generated shader for the ANGLE Vulkan back-end.
#pragma once
constexpr uint8_t kBlitResolve_frag_00000000[] = {
0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x02,0xff,0x5d,0x95,0x5f,0x68,0xd6,0x65,
0x14,0xc7,0x9f,0xdf,0xfb,0x77,0xb9,0xb1,0x94,0xe6,0xd4,0x6d,0x3a,0xcd,0x06,0xa1,
0xb1,0xbc,0xb0,0x18,0x84,0x61,0x78,0x61,0x17,0xa2,0x59,0x30,0x2f,0x76,0xb3,0x60,
0x37,0xef,0x45,0xc1,0x28,0x6f,0x76,0x61,0xc1,0x4b,0x78,0xb3,0x0b,0x6f,0x76,0x63,
0x6a,0xb3,0x48,0x83,0x2e,0x22,0x4b,0x52,0x2a,0x87,0xb1,0x72,0x14,0xab,0xc4,0x81,
0x56,0x0c,0x4a,0x06,0x25,0x83,0x92,0x81,0xda,0x22,0xa5,0xf3,0xfd,0xbd,0x9f,0xb3,
0x0e,0xef,0x0b,0x67,0xbf,0xdf,0xf7,0xfb,0x3d,0xcf,0xf9,0x3e,0xe7,0xbc,0xcf,0xf3,
0xae,0x58,0xd8,0x5a,0x4d,0x29,0x4b,0xab,0x52,0x4b,0x5a,0x9f,0xa5,0xfc,0xb3,0x26,
0x15,0x92,0x5e,0x5b,0x53,0x25,0x7f,0xee,0xdd,0xf7,0xd2,0xbe,0xfe,0xd7,0x5e,0x1f,
0xe9,0xdf,0xf9,0xd4,0x0e,0xe9,0xed,0xa9,0x98,0xe7,0x49,0x7b,0xd8,0x50,0xc9,0x9e,
0x8a,0x57,0x5e,0xae,0xbd,0x2a,0xbe,0xc3,0xe2,0x90,0xc5,0xb0,0x45,0xcd,0x62,0xd4,
0x62,0xcc,0xa2,0x6e,0x31,0x6e,0x31,0x61,0xb1,0xda,0x6a,0x68,0x4d,0x55,0xf5,0xed,
0xad,0x23,0xf7,0x53,0xbd,0x94,0x9e,0x4f,0xe5,0xd4,0xd3,0xd8,0x4a,0xda,0xca,0xd3,
0xb9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8b,0x05,0x6a,0xdd,0xc4,0x67,0x38,0xf8,0xb8,0xb6,0x10,0x7c,0x7e,0xc7,0x67,
0x24,0xf8,0xfc,0x01,0xef,0x3e,0x8b,0xc1,0x47,0xda,0x2d,0x8b,0x45,0x6a,0xdd,0xc2,
0xa7,0x16,0x7c,0x5c,0x5b,0x0c,0x3e,0x7f,0xe2,0x33,0x10,0x7c,0xfe,0x82,0x77,0x9f,
0xa5,0xe0,0x23,0xed,0xb6,0xc5,0x12,0xb5,0x6e,0xe3,0x33,0x1a,0x7c,0x5c,0x5b,0x0a,
0x3e,0x77,0xf0,0x39,0x1c,0x7c,0xee,0xc2,0xbb,0xcf,0x72,0xf0,0xb9,0x9b,0x73,0x29,
0xe7,0x54,0xeb,0x1e,0x3e,0x63,0xc1,0xc7,0xb5,0xe5,0xe0,0xf3,0x2f,0x3e,0x47,0x82,
0xcf,0x7d,0x78,0xf7,0xf1,0xcb,0x20,0x1f,0x69,0x0f,0xf8,0x67,0xa2,0x5a,0x0f,0xf0,
0xa9,0x07,0x1f,0xd7,0xf4,0x74,0x9f,0x62,0xd6,0xf0,0x39,0x1a,0x7c,0x4a,0x59,0x83,
0x77,0x9f,0x6a,0xf0,0x91,0x56,0xb6,0xa8,0x52,0x4b,0xef,0xf2,0x19,0x0f,0x3e,0xae,
0x55,0x83,0xcf,0x2a,0x7c,0x8e,0x05,0x9f,0xd6,0xac,0xc1,0xbb,0x4f,0x7b,0xf0,0x91,
0xd6,0x66,0xd1,0x4e,0xad,0x36,0x7c,0x26,0x82,0x8f,0x6b,0x7a,0xde,0xb7,0xa6,0x06,
0x2c,0xfe,0x03,0xad,0x5f,0xf0,0xc4,0xf8,0x0b,0x00,0x00
};
// Generated from:
//
// #version 450 core
//
// #extension GL_GOOGLE_include_directive : require
//
// layout(set = 0, binding = 0)uniform texture2D color;
//
// layout(location = 0)out vec4 colorOut0;
// layout(location = 1)out vec4 colorOut1;
// layout(location = 2)out vec4 colorOut2;
// layout(location = 3)out vec4 colorOut3;
// layout(location = 4)out vec4 colorOut4;
// layout(location = 5)out vec4 colorOut5;
// layout(location = 6)out vec4 colorOut6;
// layout(location = 7)out vec4 colorOut7;
//
// layout(set = 0, binding = 2)uniform sampler blitSampler;
//
// #line 1 "shaders/src/BlitResolve.inc"
//
// layout(push_constant)uniform PushConstants {
//
// vec2 offset;
// vec2 stretch;
// vec2 invSrcExtent;
// int srcLayer;
// int samples;
// float invSamples;
//
// int outputMask;
//
// bool flipX;
// bool flipY;
// bool rotateXY;
// } params;
//
// vec2 getSrcImageCoords()
// {
//
// vec2 srcImageCoords = vec2(gl_FragCoord . xy);
//
// srcImageCoords *= params . stretch;
//
// srcImageCoords -= params . offset;
//
// if(params . flipX)
// srcImageCoords . x = - srcImageCoords . x;
// if(params . flipY)
// srcImageCoords . y = - srcImageCoords . y;
// if(params . rotateXY)
// srcImageCoords . xy = srcImageCoords . yx;
//
// return srcImageCoords;
// }
//
// void broadcastColor(vec4 colorValue)
// {
//
// 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;
// }
// }
//
// #line 123 "shaders/src/BlitResolve.frag"
//
// void main()
// {
// vec2 srcImageCoords = getSrcImageCoords();
//
// vec4 colorValue = texture(sampler2D(color, blitSampler), srcImageCoords * params . invSrcExtent);
//
// broadcastColor(colorValue);
//
// }