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/GenerateMipmap.comp.00000003.inc: 9// Pre-generated shader for the ANGLE Vulkan back-end. 10 11#pragma once 12constexpr uint8_t kGenerateMipmap_comp_00000003[] = { 13 0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x02,0xff,0x7d,0x59,0x6d,0x8c,0x55,0xd5, 14 0x15,0xbd,0x6f,0xe6,0xdd,0x73,0xef,0x1b,0x32,0x02,0x45,0x14,0x1d,0xa0,0x2a,0xd8, 15 0xca,0x87,0x80,0x95,0x69,0x6c,0x94,0xd2,0x49,0x4d,0xda,0x00,0x06,0x0c,0x10,0xfb, 16 0xab,0x0d,0x15,0x0a,0xb4,0xa9,0x35,0x42,0x32,0xb4,0x41,0x0a,0x85,0x21,0x50,0x81, 17 0x87,0xd5,0x36,0xb5,0x46,0x5a,0x0a,0xfc,0x60,0x24,0x65,0xea,0x1f,0x6b,0x75,0xd2, 18 0xfa,0xcd,0x87,0x7c,0xa8,0xad,0x30,0x38,0xd3,0xb4,0x58,0xa5,0x8a,0x4d,0x84,0x01, 19 0x69,0xa1,0xd0,0x9e,0xf5,0xd6,0xda,0x79,0x7b,0x1e,0x53,0x27,0xb9,0x9c,0xbb,0xd7, 20 0x3e,0x67,0xef,0x7d,0xd6,0x59,0x77,0xdf,0xf7,0x1e,0xf5,0x75,0xa3,0xb2,0xa4,0xbe, 21 0x90,0x34,0x24,0x79,0x32,0xa1,0x31,0xa9,0xfc,0x0d,0x4e,0xea,0x92,0x82,0xc6,0x92, 22 0xc6,0x29,0x1a,0xef,0x8c,0xe3,0x80,0x24,0x54,0xfc,0x5f,0x99,0x31,0x7b,0xc6,0x84, 23 0x25,0x4b,0xe7,0x4f,0x98,0xdc,0x3c,0x09,0xeb,0xae,0x48,0xea,0x2b,0xeb,0xe1,0x1b, 24 0x98,0x64,0x49,0x1a,0xc7,0x62,0xbc,0xbe,0x3b,0x6f,0xf1,0x7d,0xc0,0xcb,0xd1,0x78, 25 0x38,0x5e,0x83,0xe2,0xfa,0x62,0x25,0x1e,0x27,0x17,0xb4,0xe6,0xab,0x71,0xc5,0x01, 26 0x96,0x90,0x8c,0xd2,0x68,0x58,0x41,0x58,0x8e,0xbc,0x31,0x0f,0xb0,0xba,0xca,0x7d, 27 0x31,0x39,0x16,0xc7,0x1b,0x34,0xdf,0xec,0xeb,0xb5,0x06,0xf6,0xc9,0x1a,0xff,0x49, 28 0xf9,0x13,0xc5,0x82,0x7d,0xb5,0x7c,0xa8,0x71,0x40,0xbc,0xbf,0x56,0xf6,0xc3,0xb2, 29 0x47,0xc8,0xde,0x22,0xfb,0x9a,0x78,0x0d,0x89,0x15,0xd4,0x55,0x62,0xd5,0x57,0x76, 30 0x8e,0xfb,0xa1,0x71,0x4e,0x88,0xe3,0x75,0x8a,0x7f,0x75,0xb4,0x87,0xc4,0x31,0x38, 31 0xff,0x30,0xf9,0x0b,0xf2,0x23,0xd6,0x30,0xf9,0xaf,0x8a,0x91,0x9a,0x12,0x70,0x44, 32 0xdf,0xf0,0x38,0x36,0x89,0xc7,0x2b,0xe3,0x8c,0xa9,0x71,0x1c,0xa7,0x18,0xdb,0x94, 33 0x63,0x9c,0x72,0xee,0x54,0x0c,0xb3,0xdb,0xe3,0x55,0xef,0xec,0x0e,0xe5,0x44,0x8e, 34 0x57,0x55,0x03,0x72,0xec,0x89,0xe3,0xab,0x5a,0x3b,0x32,0xda,0xe0,0x76,0x8f,0x6a, 35 0xbe,0x2e,0xda,0x07,0xe3,0x08,0x1d,0x00,0xbf,0x5d,0xf6,0x21,0x61,0xf0,0x1f,0xd6, 36 0xfd,0x9e,0x0a,0x2f,0xa5,0xe4,0x88,0xe2,0x15,0x92,0xbe,0x7f,0x66,0x37,0xc5,0xfc, 37 0x47,0xe3,0x78,0x44,0xeb,0xb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xb3,0x1d,0x76,0x6f,0x46,0x7c,0xae,0xab,0x6b,0x7e,0x46,0x1c,0x75,0xd9,0xe7, 105 0x9a,0x41,0x81,0x9f,0x4d,0xf0,0x19,0xb4,0x5d,0xda,0x1d,0x1c,0x88,0xa3,0x4e,0x68, 106 0x77,0x49,0xa8,0x6a,0x17,0xbe,0x4f,0xe1,0x39,0x90,0x56,0x71,0x6f,0xef,0xfd,0xa1, 107 0x81,0xef,0xfd,0x31,0xee,0xbd,0x7f,0x55,0x20,0xbe,0x56,0xf9,0x86,0x85,0xcb,0x3f, 108 0x8b,0x5c,0x13,0x88,0xdb,0x9c,0xa6,0x70,0xf9,0x67,0x91,0xe1,0x81,0xb8,0xf5,0x8e, 109 0x11,0x81,0xeb,0x86,0x87,0x6a,0xef,0x18,0x19,0x98,0x6f,0x84,0x7b,0xcf,0x2e,0xcc, 110 0xf8,0x9e,0xed,0x48,0xaa,0xcf,0xf2,0xa2,0x8c,0xb8,0x3d,0xcb,0xdf,0xc9,0xa8,0x71, 111 0x3c,0xcb,0xf0,0x21,0x0e,0xb0,0x96,0x58,0x0d,0xbe,0x3f,0xdd,0x9f,0xf1,0x3b,0xd5, 112 0x30,0xd5,0xf0,0xc5,0xc8,0xc9,0xfd,0x5a,0x63,0x3d,0x7f,0xa2,0xf6,0x80,0xcf,0x74, 113 0x56,0xf3,0xa4,0x40,0xdc,0x6a,0x9e,0x1c,0x88,0xf9,0x9a,0x9b,0x55,0xf3,0x64,0xd7, 114 0x6b,0x96,0xd6,0xd4,0xd7,0x9a,0x51,0xeb,0xa8,0x0f,0x3e,0xac,0x69,0x75,0xf5,0x2d, 115 0x57,0x7d,0x13,0x5d,0x7d,0xcb,0xb5,0xc6,0xea,0x9b,0x66,0xfc,0xb9,0xfa,0xa6,0x07, 116 0xe2,0x56,0xdf,0x0c,0x71,0x3a,0xdd,0xd5,0x77,0x97,0xea,0x9b,0xe1,0xea,0x5b,0x59, 117 0x53,0xdf,0xea,0x8c,0x9a,0x47,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xed,0x2d,0x85,0x9c,0xb8,0x69,0xb1,0x2e, 131 0xe7,0x3a,0xe0,0xa6,0xc5,0xfa,0x9c,0xf9,0xe0,0xb3,0xde,0x72,0x5b,0xce,0xde,0xb2, 132 0xd3,0xf5,0x96,0x2f,0xe4,0xc4,0x4d,0x9f,0x77,0xe4,0xe4,0x06,0xfa,0x84,0x0f,0x71, 133 0x80,0x19,0x47,0x0d,0xca,0x8d,0x18,0xf6,0xac,0x0e,0xc8,0xb9,0x8f,0x86,0xbc,0xaa, 134 0x85,0x16,0x69,0x61,0x80,0xea,0x87,0x8e,0x5b,0x14,0x1b,0x7a,0x32,0xce,0x30,0x9a, 135 0x2e,0x9f,0x95,0x2e,0xdb,0xa5,0xcb,0x4e,0xa7,0x4b,0xf8,0x9e,0x8b,0x57,0xa7,0x74, 136 0xf8,0x5c,0x8d,0x2e,0x3b,0xfb,0xd1,0x65,0x87,0xe2,0xce,0xcc,0xab,0xdf,0xf1,0x11, 137 0x77,0x99,0x3b,0x43,0xf8,0x66,0xc5,0x6b,0x99,0xea,0x99,0xe5,0xf6,0x3a,0xc7,0x71, 138 0x6f,0x7b,0x9d,0x9b,0xf3,0x3b,0xcc,0x1c,0xb7,0xd7,0x07,0xb5,0x57,0xf8,0xf0,0x99, 139 0xdc,0x74,0xbf,0x22,0xa7,0xcf,0x74,0xfc,0x90,0x74,0xbc,0xa2,0x46,0xf7,0x1b,0x1d, 140 0xee,0x75,0x5f,0x76,0xb8,0xd7,0xfd,0x63,0x39,0xb1,0x87,0x9c,0xc6,0x1f,0xcf,0x89, 141 0x6f,0x74,0xd8,0x13,0x39,0xf1,0xb2,0xd3,0xfd,0x96,0x9c,0x78,0x83,0xb8,0x68,0xad, 142 0xd1,0xf3,0xd7,0xa3,0xdd,0x2a,0x2e,0x70,0x6f,0x7a,0x9e,0x97,0x53,0xcf,0xe3,0x9c, 143 0x9e,0xbf,0x99,0x13,0x37,0xad,0xce,0xcf,0x2f,0xd7,0xf3,0x82,0x9c,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 0xbe,0xd6,0x8f,0xbe,0x0f,0xe4,0xc4,0x6d,0xce,0xa1,0x7e,0xf4,0x7d,0x38,0x27,0x6e, 158 0xfa,0x7e,0x3d,0xe7,0xba,0xc3,0x4e,0xdf,0x6f,0xe4,0xcc,0xf7,0xba,0xd3,0x77,0x28, 159 0x51,0xdf,0x65,0xf7,0x9b,0x4b,0x56,0x22,0x6e,0xfa,0x6e,0x28,0x71,0xcf,0xd0,0x37, 160 0x7c,0x88,0x03,0xcc,0xce,0xb8,0x4b,0xf5,0x75,0x17,0xab,0xe7,0x39,0xb0,0xc4,0xf3, 161 0xec,0xd2,0x39,0x41,0xdf,0x03,0x15,0x07,0x3a,0x34,0x7e,0xba,0xa5,0x6f,0xd3,0x53, 162 0x8f,0xd3,0xf7,0x11,0xe9,0x1b,0xbf,0xf5,0x82,0xe7,0x2e,0xa7,0x6f,0xf8,0x8e,0xc6, 163 0xab,0x4b,0x7a,0x3e,0x5a,0xa3,0xef,0xae,0x4f,0xd0,0xf7,0xb5,0xa5,0xea,0x3b,0x18, 164 0x71,0xc7,0x96,0xaa,0x71,0xe1,0x6b,0x8a,0x17,0x30,0xc4,0xc1,0xbd,0xed,0x69,0xa2, 165 0xf6,0x84,0xb5,0xf6,0x1b,0x55,0xe5,0x33,0x42,0x89,0x3e,0xd3,0xdc,0x94,0x12,0x35, 166 0x07,0xdc,0x6b,0x74,0xaa,0xc3,0xbd,0x46,0x5b,0x1c,0xee,0x35,0x3a,0xbd,0x44,0x0c, 167 0xf1,0x0c,0xbb,0xab,0x44,0x7c,0xaa,0xc3,0x66,0x96,0x88,0x23,0x8e,0x69,0x74,0x56, 168 0x89,0xb8,0x69,0x74,0x4c,0xa9,0xaf,0x46,0x47,0x45,0x7b,0x8c,0xf6,0x88,0x7b,0xd3, 169 0xe3,0x8d,0x25,0x6a,0xd4,0xf4,0x31,0x5b,0xfa,0xc0,0x19,0x98,0x3e,0xe6,0x94,0x88, 170 0x9b,0x3e,0xee,0x29,0x31,0x1f,0xf4,0x01,0x1f,0x62,0xdc,0xa3,0x73,0xb6,0x1c,0x63, 171 0x64,0x1b,0xaf,0x63,0x4b,0x7d,0xcf,0x0b,0xa3,0x9d,0xcf,0x07,0x45,0x9e,0x3b,0xfe, 172 0x4f,0x04,0xb5,0x7f,0x58,0xac,0xd6,0x0e,0xdf,0xc9,0x78,0x7d,0xa8,0xdf,0xd9,0x71, 173 0x8f,0x38,0x17,0x64,0x03,0xaf,0x3d,0x77,0xef,0xc7,0x78,0x31,0x29,0x24,0xb7,0xc5, 174 0xeb,0x7f,0xa1,0xf4,0x46,0x1e,0x90,0x1d,0x00,0x00 175}; 176 177// Generated from: 178// 179// #version 450 core 180// 181// #extension GL_GOOGLE_include_directive : require 182// #extension GL_EXT_samplerless_texture_functions : require 183// 184// layout(local_size_x = 256, local_size_y = 1, local_size_z = 1)in; 185// 186// layout(set = 0, binding = 0, rgba8)uniform coherent image2D dst[6]; 187// layout(set = 0, binding = 1)uniform sampler2D src; 188// 189// layout(push_constant)uniform PushConstants { 190// 191// vec2 invSrcExtent; 192// 193// uint levelCount; 194// } params; 195// 196// #line 1 "shaders/src/third_party/ffx_spd/ffx_a.h" 197// 198// #extension GL_EXT_shader_16bit_storage : require 199// #extension GL_EXT_shader_explicit_arithmetic_types : require 200// 201// float AF1_x(float a){ return float(a);} 202// vec2 AF2_x(float a){ return vec2(a, a);} 203// vec3 AF3_x(float a){ return vec3(a, a, a);} 204// vec4 AF4_x(float a){ return vec4(a, a, a, a);} 205// 206// uint AU1_x(uint a){ return uint(a);} 207// uvec2 AU2_x(uint a){ return uvec2(a, a);} 208// uvec3 AU3_x(uint a){ return uvec3(a, a, a);} 209// uvec4 AU4_x(uint a){ return uvec4(a, a, a, a);} 210// 211// uint AAbsSU1(uint a){ return uint(abs(int(a)));} 212// uvec2 AAbsSU2(uvec2 a){ return uvec2(abs(ivec2(a)));} 213// uvec3 AAbsSU3(uvec3 a){ return uvec3(abs(ivec3(a)));} 214// uvec4 AAbsSU4(uvec4 a){ return uvec4(abs(ivec4(a)));} 215// 216// uint ABfe(uint src, uint off, uint bits){ return bitfieldExtract(src, int(off), int(bits));} 217// uint ABfi(uint src, uint ins, uint mask){ return(ins & mask)|(src &(~ mask));} 218// 219// uint ABfiM(uint src, uint ins, uint bits){ return bitfieldInsert(src, ins, 0, int(bits));} 220// 221// float AFractF1(float x){ return fract(x);} 222// vec2 AFractF2(vec2 x){ return fract(x);} 223// vec3 AFractF3(vec3 x){ return fract(x);} 224// vec4 AFractF4(vec4 x){ return fract(x);} 225// 226// float ALerpF1(float x, float y, float a){ return mix(x, y, a);} 227// vec2 ALerpF2(vec2 x, vec2 y, vec2 a){ return mix(x, y, a);} 228// vec3 ALerpF3(vec3 x, vec3 y, vec3 a){ return mix(x, y, a);} 229// vec4 ALerpF4(vec4 x, vec4 y, vec4 a){ return mix(x, y, a);} 230// 231// float AMax3F1(float x, float y, float z){ return max(x, max(y, z));} 232// vec2 AMax3F2(vec2 x, vec2 y, vec2 z){ return max(x, max(y, z));} 233// vec3 AMax3F3(vec3 x, vec3 y, vec3 z){ return max(x, max(y, z));} 234// vec4 AMax3F4(vec4 x, vec4 y, vec4 z){ return max(x, max(y, z));} 235// 236// uint AMax3SU1(uint x, uint y, uint z){ return uint(max(int(x), max(int(y), int(z))));} 237// uvec2 AMax3SU2(uvec2 x, uvec2 y, uvec2 z){ return uvec2(max(ivec2(x), max(ivec2(y), ivec2(z))));} 238// uvec3 AMax3SU3(uvec3 x, uvec3 y, uvec3 z){ return uvec3(max(ivec3(x), max(ivec3(y), ivec3(z))));} 239// uvec4 AMax3SU4(uvec4 x, uvec4 y, uvec4 z){ return uvec4(max(ivec4(x), max(ivec4(y), ivec4(z))));} 240// 241// uint AMax3U1(uint x, uint y, uint z){ return max(x, max(y, z));} 242// uvec2 AMax3U2(uvec2 x, uvec2 y, uvec2 z){ return max(x, max(y, z));} 243// uvec3 AMax3U3(uvec3 x, uvec3 y, uvec3 z){ return max(x, max(y, z));} 244// uvec4 AMax3U4(uvec4 x, uvec4 y, uvec4 z){ return max(x, max(y, z));} 245// 246// uint AMaxSU1(uint a, uint b){ return uint(max(int(a), int(b)));} 247// uvec2 AMaxSU2(uvec2 a, uvec2 b){ return uvec2(max(ivec2(a), ivec2(b)));} 248// uvec3 AMaxSU3(uvec3 a, uvec3 b){ return uvec3(max(ivec3(a), ivec3(b)));} 249// uvec4 AMaxSU4(uvec4 a, uvec4 b){ return uvec4(max(ivec4(a), ivec4(b)));} 250// 251// float AMed3F1(float x, float y, float z){ return max(min(x, y), min(max(x, y), z));} 252// vec2 AMed3F2(vec2 x, vec2 y, vec2 z){ return max(min(x, y), min(max(x, y), z));} 253// vec3 AMed3F3(vec3 x, vec3 y, vec3 z){ return max(min(x, y), min(max(x, y), z));} 254// vec4 AMed3F4(vec4 x, vec4 y, vec4 z){ return max(min(x, y), min(max(x, y), z));} 255// 256// float AMin3F1(float x, float y, float z){ return min(x, min(y, z));} 257// vec2 AMin3F2(vec2 x, vec2 y, vec2 z){ return min(x, min(y, z));} 258// vec3 AMin3F3(vec3 x, vec3 y, vec3 z){ return min(x, min(y, z));} 259// vec4 AMin3F4(vec4 x, vec4 y, vec4 z){ return min(x, min(y, z));} 260// 261// uint AMin3SU1(uint x, uint y, uint z){ return uint(min(int(x), min(int(y), int(z))));} 262// uvec2 AMin3SU2(uvec2 x, uvec2 y, uvec2 z){ return uvec2(min(ivec2(x), min(ivec2(y), ivec2(z))));} 263// uvec3 AMin3SU3(uvec3 x, uvec3 y, uvec3 z){ return uvec3(min(ivec3(x), min(ivec3(y), ivec3(z))));} 264// uvec4 AMin3SU4(uvec4 x, uvec4 y, uvec4 z){ return uvec4(min(ivec4(x), min(ivec4(y), ivec4(z))));} 265// 266// uint AMin3U1(uint x, uint y, uint z){ return min(x, min(y, z));} 267// uvec2 AMin3U2(uvec2 x, uvec2 y, uvec2 z){ return min(x, min(y, z));} 268// uvec3 AMin3U3(uvec3 x, uvec3 y, uvec3 z){ return min(x, min(y, z));} 269// uvec4 AMin3U4(uvec4 x, uvec4 y, uvec4 z){ return min(x, min(y, z));} 270// 271// uint AMinSU1(uint a, uint b){ return uint(min(int(a), int(b)));} 272// uvec2 AMinSU2(uvec2 a, uvec2 b){ return uvec2(min(ivec2(a), ivec2(b)));} 273// uvec3 AMinSU3(uvec3 a, uvec3 b){ return uvec3(min(ivec3(a), ivec3(b)));} 274// uvec4 AMinSU4(uvec4 a, uvec4 b){ return uvec4(min(ivec4(a), ivec4(b)));} 275// 276// float ANCosF1(float x){ return cos(x * AF1_x(float(6.28318530718)));} 277// vec2 ANCosF2(vec2 x){ return cos(x * AF2_x(float(6.28318530718)));} 278// vec3 ANCosF3(vec3 x){ return cos(x * AF3_x(float(6.28318530718)));} 279// vec4 ANCosF4(vec4 x){ return cos(x * AF4_x(float(6.28318530718)));} 280// 281// float ANSinF1(float x){ return sin(x * AF1_x(float(6.28318530718)));} 282// vec2 ANSinF2(vec2 x){ return sin(x * AF2_x(float(6.28318530718)));} 283// vec3 ANSinF3(vec3 x){ return sin(x * AF3_x(float(6.28318530718)));} 284// vec4 ANSinF4(vec4 x){ return sin(x * AF4_x(float(6.28318530718)));} 285// 286// float ARcpF1(float x){ return AF1_x(float(1.0))/ x;} 287// vec2 ARcpF2(vec2 x){ return AF2_x(float(1.0))/ x;} 288// vec3 ARcpF3(vec3 x){ return AF3_x(float(1.0))/ x;} 289// vec4 ARcpF4(vec4 x){ return AF4_x(float(1.0))/ x;} 290// 291// float ARsqF1(float x){ return AF1_x(float(1.0))/ sqrt(x);} 292// vec2 ARsqF2(vec2 x){ return AF2_x(float(1.0))/ sqrt(x);} 293// vec3 ARsqF3(vec3 x){ return AF3_x(float(1.0))/ sqrt(x);} 294// vec4 ARsqF4(vec4 x){ return AF4_x(float(1.0))/ sqrt(x);} 295// 296// float ASatF1(float x){ return clamp(x, AF1_x(float(0.0)), AF1_x(float(1.0)));} 297// vec2 ASatF2(vec2 x){ return clamp(x, AF2_x(float(0.0)), AF2_x(float(1.0)));} 298// vec3 ASatF3(vec3 x){ return clamp(x, AF3_x(float(0.0)), AF3_x(float(1.0)));} 299// vec4 ASatF4(vec4 x){ return clamp(x, AF4_x(float(0.0)), AF4_x(float(1.0)));} 300// 301// uint AShrSU1(uint a, uint b){ return uint(int(a)>> int(b));} 302// uvec2 AShrSU2(uvec2 a, uvec2 b){ return uvec2(ivec2(a)>> ivec2(b));} 303// uvec3 AShrSU3(uvec3 a, uvec3 b){ return uvec3(ivec3(a)>> ivec3(b));} 304// uvec4 AShrSU4(uvec4 a, uvec4 b){ return uvec4(ivec4(a)>> ivec4(b));} 305// 306// f16vec4 AH4_AU2_x(uvec2 x){ return f16vec4(unpackFloat2x16(x . x), unpackFloat2x16(x . y));} 307// 308// uvec2 AU2_AH4_x(f16vec4 x){ return uvec2(packFloat2x16(x . xy), packFloat2x16(x . zw));} 309// 310// float16_t AH1_x(float16_t a){ return float16_t(a);} 311// f16vec2 AH2_x(float16_t a){ return f16vec2(a, a);} 312// f16vec3 AH3_x(float16_t a){ return f16vec3(a, a, a);} 313// f16vec4 AH4_x(float16_t a){ return f16vec4(a, a, a, a);} 314// 315// uint16_t AW1_x(uint16_t a){ return uint16_t(a);} 316// u16vec2 AW2_x(uint16_t a){ return u16vec2(a, a);} 317// u16vec3 AW3_x(uint16_t a){ return u16vec3(a, a, a);} 318// u16vec4 AW4_x(uint16_t a){ return u16vec4(a, a, a, a);} 319// 320// uint16_t AAbsSW1(uint16_t a){ return uint16_t(abs(int16_t(a)));} 321// u16vec2 AAbsSW2(u16vec2 a){ return u16vec2(abs(i16vec2(a)));} 322// u16vec3 AAbsSW3(u16vec3 a){ return u16vec3(abs(i16vec3(a)));} 323// u16vec4 AAbsSW4(u16vec4 a){ return u16vec4(abs(i16vec4(a)));} 324// 325// float16_t AFractH1(float16_t x){ return fract(x);} 326// f16vec2 AFractH2(f16vec2 x){ return fract(x);} 327// f16vec3 AFractH3(f16vec3 x){ return fract(x);} 328// f16vec4 AFractH4(f16vec4 x){ return fract(x);} 329// 330// float16_t ALerpH1(float16_t x, float16_t y, float16_t a){ return mix(x, y, a);} 331// f16vec2 ALerpH2(f16vec2 x, f16vec2 y, f16vec2 a){ return mix(x, y, a);} 332// f16vec3 ALerpH3(f16vec3 x, f16vec3 y, f16vec3 a){ return mix(x, y, a);} 333// f16vec4 ALerpH4(f16vec4 x, f16vec4 y, f16vec4 a){ return mix(x, y, a);} 334// 335// float16_t AMax3H1(float16_t x, float16_t y, float16_t z){ return max(x, max(y, z));} 336// f16vec2 AMax3H2(f16vec2 x, f16vec2 y, f16vec2 z){ return max(x, max(y, z));} 337// f16vec3 AMax3H3(f16vec3 x, f16vec3 y, f16vec3 z){ return max(x, max(y, z));} 338// f16vec4 AMax3H4(f16vec4 x, f16vec4 y, f16vec4 z){ return max(x, max(y, z));} 339// 340// uint16_t AMaxSW1(uint16_t a, uint16_t b){ return uint16_t(max(int(a), int(b)));} 341// u16vec2 AMaxSW2(u16vec2 a, u16vec2 b){ return u16vec2(max(ivec2(a), ivec2(b)));} 342// u16vec3 AMaxSW3(u16vec3 a, u16vec3 b){ return u16vec3(max(ivec3(a), ivec3(b)));} 343// u16vec4 AMaxSW4(u16vec4 a, u16vec4 b){ return u16vec4(max(ivec4(a), ivec4(b)));} 344// 345// float16_t AMin3H1(float16_t x, float16_t y, float16_t z){ return min(x, min(y, z));} 346// f16vec2 AMin3H2(f16vec2 x, f16vec2 y, f16vec2 z){ return min(x, min(y, z));} 347// f16vec3 AMin3H3(f16vec3 x, f16vec3 y, f16vec3 z){ return min(x, min(y, z));} 348// f16vec4 AMin3H4(f16vec4 x, f16vec4 y, f16vec4 z){ return min(x, min(y, z));} 349// 350// uint16_t AMinSW1(uint16_t a, uint16_t b){ return uint16_t(min(int(a), int(b)));} 351// u16vec2 AMinSW2(u16vec2 a, u16vec2 b){ return u16vec2(min(ivec2(a), ivec2(b)));} 352// u16vec3 AMinSW3(u16vec3 a, u16vec3 b){ return u16vec3(min(ivec3(a), ivec3(b)));} 353// u16vec4 AMinSW4(u16vec4 a, u16vec4 b){ return u16vec4(min(ivec4(a), ivec4(b)));} 354// 355// float16_t ARcpH1(float16_t x){ return AH1_x(float16_t(1.0))/ x;} 356// f16vec2 ARcpH2(f16vec2 x){ return AH2_x(float16_t(1.0))/ x;} 357// f16vec3 ARcpH3(f16vec3 x){ return AH3_x(float16_t(1.0))/ x;} 358// f16vec4 ARcpH4(f16vec4 x){ return AH4_x(float16_t(1.0))/ x;} 359// 360// float16_t ARsqH1(float16_t x){ return AH1_x(float16_t(1.0))/ sqrt(x);} 361// f16vec2 ARsqH2(f16vec2 x){ return AH2_x(float16_t(1.0))/ sqrt(x);} 362// f16vec3 ARsqH3(f16vec3 x){ return AH3_x(float16_t(1.0))/ sqrt(x);} 363// f16vec4 ARsqH4(f16vec4 x){ return AH4_x(float16_t(1.0))/ sqrt(x);} 364// 365// float16_t ASatH1(float16_t x){ return clamp(x, AH1_x(float16_t(0.0)), AH1_x(float16_t(1.0)));} 366// f16vec2 ASatH2(f16vec2 x){ return clamp(x, AH2_x(float16_t(0.0)), AH2_x(float16_t(1.0)));} 367// f16vec3 ASatH3(f16vec3 x){ return clamp(x, AH3_x(float16_t(0.0)), AH3_x(float16_t(1.0)));} 368// f16vec4 ASatH4(f16vec4 x){ return clamp(x, AH4_x(float16_t(0.0)), AH4_x(float16_t(1.0)));} 369// 370// uint16_t AShrSW1(uint16_t a, uint16_t b){ return uint16_t(int16_t(a)>> int16_t(b));} 371// u16vec2 AShrSW2(u16vec2 a, u16vec2 b){ return u16vec2(i16vec2(a)>> i16vec2(b));} 372// u16vec3 AShrSW3(u16vec3 a, u16vec3 b){ return u16vec3(i16vec3(a)>> i16vec3(b));} 373// u16vec4 AShrSW4(u16vec4 a, u16vec4 b){ return u16vec4(i16vec4(a)>> i16vec4(b));} 374// 375// float ACpySgnF1(float d, float s){ return uintBitsToFloat(uint(floatBitsToUint(float(d))|(floatBitsToUint(float(s))& AU1_x(uint(0x80000000u)))));} 376// vec2 ACpySgnF2(vec2 d, vec2 s){ return uintBitsToFloat(uvec2(floatBitsToUint(vec2(d))|(floatBitsToUint(vec2(s))& AU2_x(uint(0x80000000u)))));} 377// vec3 ACpySgnF3(vec3 d, vec3 s){ return uintBitsToFloat(uvec3(floatBitsToUint(vec3(d))|(floatBitsToUint(vec3(s))& AU3_x(uint(0x80000000u)))));} 378// vec4 ACpySgnF4(vec4 d, vec4 s){ return uintBitsToFloat(uvec4(floatBitsToUint(vec4(d))|(floatBitsToUint(vec4(s))& AU4_x(uint(0x80000000u)))));} 379// 380// float ASignedF1(float m){ return ASatF1(m * AF1_x(float(uintBitsToFloat(uint(0x7f800000u)))));} 381// vec2 ASignedF2(vec2 m){ return ASatF2(m * AF2_x(float(uintBitsToFloat(uint(0x7f800000u)))));} 382// vec3 ASignedF3(vec3 m){ return ASatF3(m * AF3_x(float(uintBitsToFloat(uint(0x7f800000u)))));} 383// vec4 ASignedF4(vec4 m){ return ASatF4(m * AF4_x(float(uintBitsToFloat(uint(0x7f800000u)))));} 384// 385// float16_t ACpySgnH1(float16_t d, float16_t s){ return uint16BitsToHalf(uint16_t(halfBitsToUint16(float16_t(d))|(halfBitsToUint16(float16_t(s))& AW1_x(uint16_t(0x8000u)))));} 386// f16vec2 ACpySgnH2(f16vec2 d, f16vec2 s){ return uint16BitsToHalf(u16vec2(halfBitsToUint16(f16vec2(d))|(halfBitsToUint16(f16vec2(s))& AW2_x(uint16_t(0x8000u)))));} 387// f16vec3 ACpySgnH3(f16vec3 d, f16vec3 s){ return uint16BitsToHalf(u16vec3(halfBitsToUint16(f16vec3(d))|(halfBitsToUint16(f16vec3(s))& AW3_x(uint16_t(0x8000u)))));} 388// f16vec4 ACpySgnH4(f16vec4 d, f16vec4 s){ return uint16BitsToHalf(u16vec4(halfBitsToUint16(f16vec4(d))|(halfBitsToUint16(f16vec4(s))& AW4_x(uint16_t(0x8000u)))));} 389// 390// float16_t ASignedH1(float16_t m){ return ASatH1(m * AH1_x(float16_t(uint16BitsToHalf(uint16_t(0x7c00u)))));} 391// f16vec2 ASignedH2(f16vec2 m){ return ASatH2(m * AH2_x(float16_t(uint16BitsToHalf(uint16_t(0x7c00u)))));} 392// f16vec3 ASignedH3(f16vec3 m){ return ASatH3(m * AH3_x(float16_t(uint16BitsToHalf(uint16_t(0x7c00u)))));} 393// f16vec4 ASignedH4(f16vec4 m){ return ASatH4(m * AH4_x(float16_t(uint16BitsToHalf(uint16_t(0x7c00u)))));} 394// 395// float16_t APrxLoSqrtH1(float16_t a){ return uint16BitsToHalf(uint16_t((halfBitsToUint16(float16_t(a))>> AW1_x(uint16_t(1)))+ AW1_x(uint16_t(0x1de2))));} 396// f16vec2 APrxLoSqrtH2(f16vec2 a){ return uint16BitsToHalf(u16vec2((halfBitsToUint16(f16vec2(a))>> AW2_x(uint16_t(1)))+ AW2_x(uint16_t(0x1de2))));} 397// 398// float16_t APrxLoRcpH1(float16_t a){ return uint16BitsToHalf(uint16_t(AW1_x(uint16_t(0x7784))- halfBitsToUint16(float16_t(a))));} 399// f16vec2 APrxLoRcpH2(f16vec2 a){ return uint16BitsToHalf(u16vec2(AW2_x(uint16_t(0x7784))- halfBitsToUint16(f16vec2(a))));} 400// 401// float16_t APrxMedRcpH1(float16_t a){ float16_t b = uint16BitsToHalf(uint16_t(AW1_x(uint16_t(0x778d))- halfBitsToUint16(float16_t(a))));return b *(- b * a + AH1_x(float16_t(2.0)));} 402// f16vec2 APrxMedRcpH2(f16vec2 a){ f16vec2 b = uint16BitsToHalf(u16vec2(AW2_x(uint16_t(0x778d))- halfBitsToUint16(f16vec2(a))));return b *(- b * a + AH2_x(float16_t(2.0)));} 403// 404// float16_t APrxLoRsqH1(float16_t a){ return uint16BitsToHalf(uint16_t(AW1_x(uint16_t(0x59a3))-(halfBitsToUint16(float16_t(a))>> AW1_x(uint16_t(1)))));} 405// f16vec2 APrxLoRsqH2(f16vec2 a){ return uint16BitsToHalf(u16vec2(AW2_x(uint16_t(0x59a3))-(halfBitsToUint16(f16vec2(a))>> AW2_x(uint16_t(1)))));} 406// 407// float APrxLoSqrtF1(float a){ return uintBitsToFloat(uint((floatBitsToUint(float(a))>> AU1_x(uint(1)))+ AU1_x(uint(0x1fbc4639))));} 408// float APrxLoRcpF1(float a){ return uintBitsToFloat(uint(AU1_x(uint(0x7ef07ebb))- floatBitsToUint(float(a))));} 409// float APrxMedRcpF1(float a){ float b = uintBitsToFloat(uint(AU1_x(uint(0x7ef19fff))- floatBitsToUint(float(a))));return b *(- b * a + AF1_x(float(2.0)));} 410// float APrxLoRsqF1(float a){ return uintBitsToFloat(uint(AU1_x(uint(0x5f347d74))-(floatBitsToUint(float(a))>> AU1_x(uint(1)))));} 411// 412// float APSinF1(float x){ return x * abs(x)- x;} 413// float APCosF1(float x){ x = AFractF1(x * AF1_x(float(0.5))+ AF1_x(float(0.75)));x = x * AF1_x(float(2.0))- AF1_x(float(1.0));return APSinF1(x);} 414// 415// f16vec2 APSinH2(f16vec2 x){ return x * abs(x)- x;} 416// f16vec2 APCosH2(f16vec2 x){ x = AFractH2(x * AH2_x(float16_t(0.5))+ AH2_x(float16_t(0.75)));x = x * AH2_x(float16_t(2.0))- AH2_x(float16_t(1.0));return APSinH2(x);} 417// 418// float ATo709F1(float c){ return max(min(c * AF1_x(float(4.5)), AF1_x(float(0.018))), AF1_x(float(1.099))* pow(c, AF1_x(float(0.45)))- AF1_x(float(0.099)));} 419// 420// float AToGammaF1(float c, float rcpX){ return pow(c, rcpX);} 421// 422// float AToPqF1(float x){ float p = pow(x, AF1_x(float(0.159302))); 423// return pow((AF1_x(float(0.835938))+ AF1_x(float(18.8516))* p)/(AF1_x(float(1.0))+ AF1_x(float(18.6875))* p), AF1_x(float(78.8438)));} 424// 425// float AToSrgbF1(float c){ return max(min(c * AF1_x(float(12.92)), AF1_x(float(0.0031308))), AF1_x(float(1.055))* pow(c, AF1_x(float(0.41666)))- AF1_x(float(0.055)));} 426// 427// float AToTwoF1(float c){ return sqrt(c);} 428// 429// float AFrom709F1(float c){ return max(min(c * AF1_x(float(1.0 / 4.5)), AF1_x(float(0.081))), 430// pow((c + AF1_x(float(0.099)))*(AF1_x(float(1.0))/(AF1_x(float(1.099)))), AF1_x(float(1.0 / 0.45))));} 431// 432// float AFromGammaF1(float c, float x){ return pow(c, x);} 433// 434// float AFromPqF1(float x){ float p = pow(x, AF1_x(float(0.0126833))); 435// return pow(ASatF1(p - AF1_x(float(0.835938)))/(AF1_x(float(18.8516))- AF1_x(float(18.6875))* p), AF1_x(float(6.27739)));} 436// 437// float AFromSrgbF1(float c){ return max(min(c * AF1_x(float(1.0 / 12.92)), AF1_x(float(0.04045))), 438// pow((c + AF1_x(float(0.055)))*(AF1_x(float(1.0))/ AF1_x(float(1.055))), AF1_x(float(2.4))));} 439// 440// float AFromTwoF1(float c){ return c * c;} 441// 442// f16vec2 ATo709H2(f16vec2 c){ return max(min(c * AH2_x(float16_t(4.5)), AH2_x(float16_t(0.018))), AH2_x(float16_t(1.099))* pow(c, AH2_x(float16_t(0.45)))- AH2_x(float16_t(0.099)));} 443// 444// f16vec2 AToGammaH2(f16vec2 c, float16_t rcpX){ return pow(c, AH2_x(float16_t(rcpX)));} 445// 446// f16vec2 AToSrgbH2(f16vec2 c){ return max(min(c * AH2_x(float16_t(12.92)), AH2_x(float16_t(0.0031308))), AH2_x(float16_t(1.055))* pow(c, AH2_x(float16_t(0.41666)))- AH2_x(float16_t(0.055)));} 447// 448// f16vec2 AToTwoH2(f16vec2 c){ return sqrt(c);} 449// 450// f16vec2 AFrom709H2(f16vec2 c){ return max(min(c * AH2_x(float16_t(1.0 / 4.5)), AH2_x(float16_t(0.081))), 451// pow((c + AH2_x(float16_t(0.099)))*(AH2_x(float16_t(1.0))/(AH2_x(float16_t(1.099)))), AH2_x(float16_t(1.0 / 0.45))));} 452// 453// f16vec2 AFromGammaH2(f16vec2 c, float16_t x){ return pow(c, AH2_x(float16_t(x)));} 454// 455// f16vec2 AFromSrgbH2(f16vec2 c){ return max(min(c * AH2_x(float16_t(1.0 / 12.92)), AH2_x(float16_t(0.04045))), 456// pow((c + AH2_x(float16_t(0.055)))*(AH2_x(float16_t(1.0))/ AH2_x(float16_t(1.055))), AH2_x(float16_t(2.4))));} 457// 458// f16vec2 AFromTwoH2(f16vec2 c){ return c * c;} 459// 460// uvec2 ARmp8x8(uint a){ return uvec2(ABfe(a, 1u, 3u), ABfiM(ABfe(a, 3u, 3u), a, 1u));} 461// 462// uvec2 ARmpRed8x8(uint a){ return uvec2(ABfiM(ABfe(a, 2u, 3u), a, 1u), ABfiM(ABfe(a, 3u, 3u), ABfe(a, 1u, 2u), 2u));} 463// 464// vec2 opAAbsF2(out vec2 d, in vec2 a){ d = abs(a);return d;} 465// vec3 opAAbsF3(out vec3 d, in vec3 a){ d = abs(a);return d;} 466// vec4 opAAbsF4(out vec4 d, in vec4 a){ d = abs(a);return d;} 467// 468// vec2 opAAddF2(out vec2 d, in vec2 a, in vec2 b){ d = a + b;return d;} 469// vec3 opAAddF3(out vec3 d, in vec3 a, in vec3 b){ d = a + b;return d;} 470// vec4 opAAddF4(out vec4 d, in vec4 a, in vec4 b){ d = a + b;return d;} 471// 472// vec2 opACpyF2(out vec2 d, in vec2 a){ d = a;return d;} 473// vec3 opACpyF3(out vec3 d, in vec3 a){ d = a;return d;} 474// vec4 opACpyF4(out vec4 d, in vec4 a){ d = a;return d;} 475// 476// vec2 opALerpF2(out vec2 d, in vec2 a, in vec2 b, in vec2 c){ d = ALerpF2(a, b, c);return d;} 477// vec3 opALerpF3(out vec3 d, in vec3 a, in vec3 b, in vec3 c){ d = ALerpF3(a, b, c);return d;} 478// vec4 opALerpF4(out vec4 d, in vec4 a, in vec4 b, in vec4 c){ d = ALerpF4(a, b, c);return d;} 479// 480// vec2 opALerpOneF2(out vec2 d, in vec2 a, in vec2 b, float c){ d = ALerpF2(a, b, AF2_x(float(c)));return d;} 481// vec3 opALerpOneF3(out vec3 d, in vec3 a, in vec3 b, float c){ d = ALerpF3(a, b, AF3_x(float(c)));return d;} 482// vec4 opALerpOneF4(out vec4 d, in vec4 a, in vec4 b, float c){ d = ALerpF4(a, b, AF4_x(float(c)));return d;} 483// 484// vec2 opAMaxF2(out vec2 d, in vec2 a, in vec2 b){ d = max(a, b);return d;} 485// vec3 opAMaxF3(out vec3 d, in vec3 a, in vec3 b){ d = max(a, b);return d;} 486// vec4 opAMaxF4(out vec4 d, in vec4 a, in vec4 b){ d = max(a, b);return d;} 487// 488// vec2 opAMinF2(out vec2 d, in vec2 a, in vec2 b){ d = min(a, b);return d;} 489// vec3 opAMinF3(out vec3 d, in vec3 a, in vec3 b){ d = min(a, b);return d;} 490// vec4 opAMinF4(out vec4 d, in vec4 a, in vec4 b){ d = min(a, b);return d;} 491// 492// vec2 opAMulF2(out vec2 d, in vec2 a, in vec2 b){ d = a * b;return d;} 493// vec3 opAMulF3(out vec3 d, in vec3 a, in vec3 b){ d = a * b;return d;} 494// vec4 opAMulF4(out vec4 d, in vec4 a, in vec4 b){ d = a * b;return d;} 495// 496// vec2 opAMulOneF2(out vec2 d, in vec2 a, float b){ d = a * AF2_x(float(b));return d;} 497// vec3 opAMulOneF3(out vec3 d, in vec3 a, float b){ d = a * AF3_x(float(b));return d;} 498// vec4 opAMulOneF4(out vec4 d, in vec4 a, float b){ d = a * AF4_x(float(b));return d;} 499// 500// vec2 opANegF2(out vec2 d, in vec2 a){ d = - a;return d;} 501// vec3 opANegF3(out vec3 d, in vec3 a){ d = - a;return d;} 502// vec4 opANegF4(out vec4 d, in vec4 a){ d = - a;return d;} 503// 504// vec2 opARcpF2(out vec2 d, in vec2 a){ d = ARcpF2(a);return d;} 505// vec3 opARcpF3(out vec3 d, in vec3 a){ d = ARcpF3(a);return d;} 506// vec4 opARcpF4(out vec4 d, in vec4 a){ d = ARcpF4(a);return d;} 507// 508// #line 70 "shaders/src/GenerateMipmap.comp" 509// 510// shared f16vec4 spd_intermediate[16][16]; 511// 512// shared uint spd_counter; 513// 514// f16vec4 SpdLoadSourceImageH(ivec2 p) 515// { 516// vec2 textureCoord = p * params . invSrcExtent + params . invSrcExtent; 517// return f16vec4(texture(src, textureCoord)); 518// } 519// 520// f16vec4 SpdLoadH(ivec2 p) 521// { 522// return f16vec4(0); 523// } 524// 525// void SpdStoreH(ivec2 p, f16vec4 value, uint mip) 526// { 527// imageStore(dst[mip], p, vec4(value)); 528// } 529// 530// f16vec4 SpdLoadIntermediateH(uint x, uint y) 531// { 532// return spd_intermediate[x][y]; 533// } 534// void SpdStoreIntermediateH(uint x, uint y, f16vec4 value) 535// { 536// spd_intermediate[x][y]= value; 537// } 538// 539// f16vec4 SpdReduce4H(f16vec4 v0, f16vec4 v1, f16vec4 v2, f16vec4 v3) 540// { 541// return(v0 + v1 + v2 + v3)* float16_t(0.25); 542// } 543// 544// #line 1 "shaders/src/third_party/ffx_spd/ffx_spd.h" 545// 546// vec4 SpdLoadSourceImage(ivec2 p){ return vec4(0.0, 0.0, 0.0, 0.0);} 547// vec4 SpdLoad(ivec2 p){ return vec4(0.0, 0.0, 0.0, 0.0);} 548// void SpdStore(ivec2 p, vec4 value, uint mip){ } 549// vec4 SpdLoadIntermediate(uint x, uint y){ return vec4(0.0, 0.0, 0.0, 0.0);} 550// void SpdStoreIntermediate(uint x, uint y, vec4 value){ } 551// vec4 SpdReduce4(vec4 v0, vec4 v1, vec4 v2, vec4 v3){ return vec4(0.0, 0.0, 0.0, 0.0);} 552// 553// #extension GL_KHR_shader_subgroup_quad : require 554// 555// void SpdWorkgroupShuffleBarrier(){ 556// 557// barrier(); 558// 559// } 560// 561// bool SpdExitWorkgroup(uint numWorkGroups, uint localInvocationIndex) 562// { 563// 564// if(localInvocationIndex == 0) 565// { 566// ; 567// } 568// SpdWorkgroupShuffleBarrier(); 569// return(0 !=(numWorkGroups - 1)); 570// } 571// 572// vec4 SpdReduceQuad(vec4 v) 573// { 574// 575// vec4 v0 = v; 576// vec4 v1 = subgroupQuadSwapHorizontal(v); 577// vec4 v2 = subgroupQuadSwapVertical(v); 578// vec4 v3 = subgroupQuadSwapDiagonal(v); 579// return SpdReduce4(v0, v1, v2, v3); 580// 581// return AF4_x(0.0); 582// } 583// 584// vec4 SpdReduceIntermediate(uvec2 i0, uvec2 i1, uvec2 i2, uvec2 i3) 585// { 586// vec4 v0 = SpdLoadIntermediate(i0 . x, i0 . y); 587// vec4 v1 = SpdLoadIntermediate(i1 . x, i1 . y); 588// vec4 v2 = SpdLoadIntermediate(i2 . x, i2 . y); 589// vec4 v3 = SpdLoadIntermediate(i3 . x, i3 . y); 590// return SpdReduce4(v0, v1, v2, v3); 591// } 592// 593// vec4 SpdReduceLoad4(uvec2 i0, uvec2 i1, uvec2 i2, uvec2 i3) 594// { 595// vec4 v0 = SpdLoad(ivec2(i0)); 596// vec4 v1 = SpdLoad(ivec2(i1)); 597// vec4 v2 = SpdLoad(ivec2(i2)); 598// vec4 v3 = SpdLoad(ivec2(i3)); 599// return SpdReduce4(v0, v1, v2, v3); 600// } 601// 602// vec4 SpdReduceLoad4(uvec2 base) 603// { 604// return SpdReduceLoad4( 605// uvec2(base + uvec2(0, 0)), 606// uvec2(base + uvec2(0, 1)), 607// uvec2(base + uvec2(1, 0)), 608// uvec2(base + uvec2(1, 1))); 609// } 610// 611// vec4 SpdReduceLoadSourceImage4(uvec2 i0, uvec2 i1, uvec2 i2, uvec2 i3) 612// { 613// vec4 v0 = SpdLoadSourceImage(ivec2(i0)); 614// vec4 v1 = SpdLoadSourceImage(ivec2(i1)); 615// vec4 v2 = SpdLoadSourceImage(ivec2(i2)); 616// vec4 v3 = SpdLoadSourceImage(ivec2(i3)); 617// return SpdReduce4(v0, v1, v2, v3); 618// } 619// 620// vec4 SpdReduceLoadSourceImage4(uvec2 base) 621// { 622// 623// return SpdLoadSourceImage(ivec2(base)); 624// 625// } 626// 627// void SpdDownsampleMips_0_1_Intrinsics(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mip) 628// { 629// vec4 v[4]; 630// 631// ivec2 tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2, y * 2); 632// ivec2 pix = ivec2(workGroupID . xy * 32)+ ivec2(x, y); 633// v[0]= SpdReduceLoadSourceImage4(tex); 634// SpdStore(pix, v[0], 0); 635// 636// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2 + 32, y * 2); 637// pix = ivec2(workGroupID . xy * 32)+ ivec2(x + 16, y); 638// v[1]= SpdReduceLoadSourceImage4(tex); 639// SpdStore(pix, v[1], 0); 640// 641// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2, y * 2 + 32); 642// pix = ivec2(workGroupID . xy * 32)+ ivec2(x, y + 16); 643// v[2]= SpdReduceLoadSourceImage4(tex); 644// SpdStore(pix, v[2], 0); 645// 646// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2 + 32, y * 2 + 32); 647// pix = ivec2(workGroupID . xy * 32)+ ivec2(x + 16, y + 16); 648// v[3]= SpdReduceLoadSourceImage4(tex); 649// SpdStore(pix, v[3], 0); 650// 651// if(mip <= 1) 652// return; 653// 654// v[0]= SpdReduceQuad(v[0]); 655// v[1]= SpdReduceQuad(v[1]); 656// v[2]= SpdReduceQuad(v[2]); 657// v[3]= SpdReduceQuad(v[3]); 658// 659// if((localInvocationIndex % 4)== 0) 660// { 661// SpdStore(ivec2(workGroupID . xy * 16)+ 662// ivec2(x / 2, y / 2), v[0], 1); 663// SpdStoreIntermediate( 664// x / 2, y / 2, v[0]); 665// 666// SpdStore(ivec2(workGroupID . xy * 16)+ 667// ivec2(x / 2 + 8, y / 2), v[1], 1); 668// SpdStoreIntermediate( 669// x / 2 + 8, y / 2, v[1]); 670// 671// SpdStore(ivec2(workGroupID . xy * 16)+ 672// ivec2(x / 2, y / 2 + 8), v[2], 1); 673// SpdStoreIntermediate( 674// x / 2, y / 2 + 8, v[2]); 675// 676// SpdStore(ivec2(workGroupID . xy * 16)+ 677// ivec2(x / 2 + 8, y / 2 + 8), v[3], 1); 678// SpdStoreIntermediate( 679// x / 2 + 8, y / 2 + 8, v[3]); 680// } 681// } 682// 683// void SpdDownsampleMips_0_1_LDS(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mip) 684// { 685// vec4 v[4]; 686// 687// ivec2 tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2, y * 2); 688// ivec2 pix = ivec2(workGroupID . xy * 32)+ ivec2(x, y); 689// v[0]= SpdReduceLoadSourceImage4(tex); 690// SpdStore(pix, v[0], 0); 691// 692// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2 + 32, y * 2); 693// pix = ivec2(workGroupID . xy * 32)+ ivec2(x + 16, y); 694// v[1]= SpdReduceLoadSourceImage4(tex); 695// SpdStore(pix, v[1], 0); 696// 697// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2, y * 2 + 32); 698// pix = ivec2(workGroupID . xy * 32)+ ivec2(x, y + 16); 699// v[2]= SpdReduceLoadSourceImage4(tex); 700// SpdStore(pix, v[2], 0); 701// 702// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2 + 32, y * 2 + 32); 703// pix = ivec2(workGroupID . xy * 32)+ ivec2(x + 16, y + 16); 704// v[3]= SpdReduceLoadSourceImage4(tex); 705// SpdStore(pix, v[3], 0); 706// 707// if(mip <= 1) 708// return; 709// 710// for(int i = 0;i < 4;i ++) 711// { 712// SpdStoreIntermediate(x, y, v[i]); 713// SpdWorkgroupShuffleBarrier(); 714// if(localInvocationIndex < 64) 715// { 716// v[i]= SpdReduceIntermediate( 717// uvec2(x * 2 + 0, y * 2 + 0), 718// uvec2(x * 2 + 1, y * 2 + 0), 719// uvec2(x * 2 + 0, y * 2 + 1), 720// uvec2(x * 2 + 1, y * 2 + 1) 721// ); 722// SpdStore(ivec2(workGroupID . xy * 16)+ ivec2(x +(i % 2)* 8, y +(i / 2)* 8), v[i], 1); 723// } 724// SpdWorkgroupShuffleBarrier(); 725// } 726// 727// if(localInvocationIndex < 64) 728// { 729// SpdStoreIntermediate(x + 0, y + 0, v[0]); 730// SpdStoreIntermediate(x + 8, y + 0, v[1]); 731// SpdStoreIntermediate(x + 0, y + 8, v[2]); 732// SpdStoreIntermediate(x + 8, y + 8, v[3]); 733// } 734// } 735// 736// void SpdDownsampleMips_0_1(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mip) 737// { 738// 739// SpdDownsampleMips_0_1_Intrinsics(x, y, workGroupID, localInvocationIndex, mip); 740// 741// } 742// 743// void SpdDownsampleMip_2(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mip) 744// { 745// 746// vec4 v = SpdLoadIntermediate(x, y); 747// v = SpdReduceQuad(v); 748// 749// if(localInvocationIndex % 4 == 0) 750// { 751// SpdStore(ivec2(workGroupID . xy * 8)+ ivec2(x / 2, y / 2), v, mip); 752// SpdStoreIntermediate(x +(y / 2)% 2, y, v); 753// } 754// 755// } 756// 757// void SpdDownsampleMip_3(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mip) 758// { 759// 760// if(localInvocationIndex < 64) 761// { 762// vec4 v = SpdLoadIntermediate(x * 2 + y % 2, y * 2); 763// v = SpdReduceQuad(v); 764// 765// if(localInvocationIndex % 4 == 0) 766// { 767// SpdStore(ivec2(workGroupID . xy * 4)+ ivec2(x / 2, y / 2), v, mip); 768// SpdStoreIntermediate(x * 2 + y / 2, y * 2, v); 769// } 770// } 771// 772// } 773// 774// void SpdDownsampleMip_4(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mip) 775// { 776// 777// if(localInvocationIndex < 16) 778// { 779// vec4 v = SpdLoadIntermediate(x * 4 + y, y * 4); 780// v = SpdReduceQuad(v); 781// 782// if(localInvocationIndex % 4 == 0) 783// { 784// SpdStore(ivec2(workGroupID . xy * 2)+ ivec2(x / 2, y / 2), v, mip); 785// SpdStoreIntermediate(x / 2 + y, 0, v); 786// } 787// } 788// 789// } 790// 791// void SpdDownsampleMip_5(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mip) 792// { 793// 794// if(localInvocationIndex < 4) 795// { 796// vec4 v = SpdLoadIntermediate(localInvocationIndex, 0); 797// v = SpdReduceQuad(v); 798// 799// if(localInvocationIndex % 4 == 0) 800// { 801// SpdStore(ivec2(workGroupID . xy), v, mip); 802// } 803// } 804// 805// } 806// 807// void SpdDownsampleMips_6_7(uint x, uint y, uint mips) 808// { 809// ivec2 tex = ivec2(x * 4 + 0, y * 4 + 0); 810// ivec2 pix = ivec2(x * 2 + 0, y * 2 + 0); 811// vec4 v0 = SpdReduceLoad4(tex); 812// SpdStore(pix, v0, 6); 813// 814// tex = ivec2(x * 4 + 2, y * 4 + 0); 815// pix = ivec2(x * 2 + 1, y * 2 + 0); 816// vec4 v1 = SpdReduceLoad4(tex); 817// SpdStore(pix, v1, 6); 818// 819// tex = ivec2(x * 4 + 0, y * 4 + 2); 820// pix = ivec2(x * 2 + 0, y * 2 + 1); 821// vec4 v2 = SpdReduceLoad4(tex); 822// SpdStore(pix, v2, 6); 823// 824// tex = ivec2(x * 4 + 2, y * 4 + 2); 825// pix = ivec2(x * 2 + 1, y * 2 + 1); 826// vec4 v3 = SpdReduceLoad4(tex); 827// SpdStore(pix, v3, 6); 828// 829// if(mips <= 7)return; 830// 831// vec4 v = SpdReduce4(v0, v1, v2, v3); 832// SpdStore(ivec2(x, y), v, 7); 833// SpdStoreIntermediate(x, y, v); 834// } 835// 836// void SpdDownsampleNextFour(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint baseMip, uint mips) 837// { 838// if(mips <= baseMip)return; 839// SpdWorkgroupShuffleBarrier(); 840// SpdDownsampleMip_2(x, y, workGroupID, localInvocationIndex, baseMip); 841// 842// if(mips <= baseMip + 1)return; 843// SpdWorkgroupShuffleBarrier(); 844// SpdDownsampleMip_3(x, y, workGroupID, localInvocationIndex, baseMip + 1); 845// 846// if(mips <= baseMip + 2)return; 847// SpdWorkgroupShuffleBarrier(); 848// SpdDownsampleMip_4(x, y, workGroupID, localInvocationIndex, baseMip + 2); 849// 850// if(mips <= baseMip + 3)return; 851// SpdWorkgroupShuffleBarrier(); 852// SpdDownsampleMip_5(x, y, workGroupID, localInvocationIndex, baseMip + 3); 853// } 854// 855// void SpdDownsample( 856// uvec2 workGroupID, 857// uint localInvocationIndex, 858// uint mips, 859// uint numWorkGroups 860// ){ 861// uvec2 sub_xy = ARmpRed8x8(localInvocationIndex % 64); 862// uint x = sub_xy . x + 8 *((localInvocationIndex >> 6)% 2); 863// uint y = sub_xy . y + 8 *((localInvocationIndex >> 7)); 864// SpdDownsampleMips_0_1(x, y, workGroupID, localInvocationIndex, mips); 865// 866// SpdDownsampleNextFour(x, y, workGroupID, localInvocationIndex, 2, mips); 867// 868// if(mips <= 6)return; 869// 870// if(SpdExitWorkgroup(numWorkGroups, localInvocationIndex))return; 871// 872// SpdDownsampleMips_6_7(x, y, mips); 873// 874// SpdDownsampleNextFour(x, y, uvec2(0, 0), localInvocationIndex, 8, mips); 875// } 876// 877// #extension GL_EXT_shader_subgroup_extended_types_float16 : require 878// 879// f16vec4 SpdReduceQuadH(f16vec4 v) 880// { 881// 882// f16vec4 v0 = v; 883// f16vec4 v1 = subgroupQuadSwapHorizontal(v); 884// f16vec4 v2 = subgroupQuadSwapVertical(v); 885// f16vec4 v3 = subgroupQuadSwapDiagonal(v); 886// return SpdReduce4H(v0, v1, v2, v3); 887// 888// return f16vec4(0.0, 0.0, 0.0, 0.0); 889// 890// } 891// 892// f16vec4 SpdReduceIntermediateH(uvec2 i0, uvec2 i1, uvec2 i2, uvec2 i3) 893// { 894// f16vec4 v0 = SpdLoadIntermediateH(i0 . x, i0 . y); 895// f16vec4 v1 = SpdLoadIntermediateH(i1 . x, i1 . y); 896// f16vec4 v2 = SpdLoadIntermediateH(i2 . x, i2 . y); 897// f16vec4 v3 = SpdLoadIntermediateH(i3 . x, i3 . y); 898// return SpdReduce4H(v0, v1, v2, v3); 899// } 900// 901// f16vec4 SpdReduceLoad4H(uvec2 i0, uvec2 i1, uvec2 i2, uvec2 i3) 902// { 903// f16vec4 v0 = SpdLoadH(ivec2(i0)); 904// f16vec4 v1 = SpdLoadH(ivec2(i1)); 905// f16vec4 v2 = SpdLoadH(ivec2(i2)); 906// f16vec4 v3 = SpdLoadH(ivec2(i3)); 907// return SpdReduce4H(v0, v1, v2, v3); 908// } 909// 910// f16vec4 SpdReduceLoad4H(uvec2 base) 911// { 912// return SpdReduceLoad4H( 913// uvec2(base + uvec2(0, 0)), 914// uvec2(base + uvec2(0, 1)), 915// uvec2(base + uvec2(1, 0)), 916// uvec2(base + uvec2(1, 1))); 917// } 918// 919// f16vec4 SpdReduceLoadSourceImage4H(uvec2 i0, uvec2 i1, uvec2 i2, uvec2 i3) 920// { 921// f16vec4 v0 = SpdLoadSourceImageH(ivec2(i0)); 922// f16vec4 v1 = SpdLoadSourceImageH(ivec2(i1)); 923// f16vec4 v2 = SpdLoadSourceImageH(ivec2(i2)); 924// f16vec4 v3 = SpdLoadSourceImageH(ivec2(i3)); 925// return SpdReduce4H(v0, v1, v2, v3); 926// } 927// 928// f16vec4 SpdReduceLoadSourceImage4H(uvec2 base) 929// { 930// 931// return SpdLoadSourceImageH(ivec2(base)); 932// 933// } 934// 935// void SpdDownsampleMips_0_1_IntrinsicsH(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mips) 936// { 937// f16vec4 v[4]; 938// 939// ivec2 tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2, y * 2); 940// ivec2 pix = ivec2(workGroupID . xy * 32)+ ivec2(x, y); 941// v[0]= SpdReduceLoadSourceImage4H(tex); 942// SpdStoreH(pix, v[0], 0); 943// 944// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2 + 32, y * 2); 945// pix = ivec2(workGroupID . xy * 32)+ ivec2(x + 16, y); 946// v[1]= SpdReduceLoadSourceImage4H(tex); 947// SpdStoreH(pix, v[1], 0); 948// 949// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2, y * 2 + 32); 950// pix = ivec2(workGroupID . xy * 32)+ ivec2(x, y + 16); 951// v[2]= SpdReduceLoadSourceImage4H(tex); 952// SpdStoreH(pix, v[2], 0); 953// 954// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2 + 32, y * 2 + 32); 955// pix = ivec2(workGroupID . xy * 32)+ ivec2(x + 16, y + 16); 956// v[3]= SpdReduceLoadSourceImage4H(tex); 957// SpdStoreH(pix, v[3], 0); 958// 959// if(mips <= 1) 960// return; 961// 962// v[0]= SpdReduceQuadH(v[0]); 963// v[1]= SpdReduceQuadH(v[1]); 964// v[2]= SpdReduceQuadH(v[2]); 965// v[3]= SpdReduceQuadH(v[3]); 966// 967// if((localInvocationIndex % 4)== 0) 968// { 969// SpdStoreH(ivec2(workGroupID . xy * 16)+ ivec2(x / 2, y / 2), v[0], 1); 970// SpdStoreIntermediateH(x / 2, y / 2, v[0]); 971// 972// SpdStoreH(ivec2(workGroupID . xy * 16)+ ivec2(x / 2 + 8, y / 2), v[1], 1); 973// SpdStoreIntermediateH(x / 2 + 8, y / 2, v[1]); 974// 975// SpdStoreH(ivec2(workGroupID . xy * 16)+ ivec2(x / 2, y / 2 + 8), v[2], 1); 976// SpdStoreIntermediateH(x / 2, y / 2 + 8, v[2]); 977// 978// SpdStoreH(ivec2(workGroupID . xy * 16)+ ivec2(x / 2 + 8, y / 2 + 8), v[3], 1); 979// SpdStoreIntermediateH(x / 2 + 8, y / 2 + 8, v[3]); 980// } 981// } 982// 983// void SpdDownsampleMips_0_1_LDSH(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mips) 984// { 985// f16vec4 v[4]; 986// 987// ivec2 tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2, y * 2); 988// ivec2 pix = ivec2(workGroupID . xy * 32)+ ivec2(x, y); 989// v[0]= SpdReduceLoadSourceImage4H(tex); 990// SpdStoreH(pix, v[0], 0); 991// 992// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2 + 32, y * 2); 993// pix = ivec2(workGroupID . xy * 32)+ ivec2(x + 16, y); 994// v[1]= SpdReduceLoadSourceImage4H(tex); 995// SpdStoreH(pix, v[1], 0); 996// 997// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2, y * 2 + 32); 998// pix = ivec2(workGroupID . xy * 32)+ ivec2(x, y + 16); 999// v[2]= SpdReduceLoadSourceImage4H(tex); 1000// SpdStoreH(pix, v[2], 0); 1001// 1002// tex = ivec2(workGroupID . xy * 64)+ ivec2(x * 2 + 32, y * 2 + 32); 1003// pix = ivec2(workGroupID . xy * 32)+ ivec2(x + 16, y + 16); 1004// v[3]= SpdReduceLoadSourceImage4H(tex); 1005// SpdStoreH(pix, v[3], 0); 1006// 1007// if(mips <= 1) 1008// return; 1009// 1010// for(int i = 0;i < 4;i ++) 1011// { 1012// SpdStoreIntermediateH(x, y, v[i]); 1013// SpdWorkgroupShuffleBarrier(); 1014// if(localInvocationIndex < 64) 1015// { 1016// v[i]= SpdReduceIntermediateH( 1017// uvec2(x * 2 + 0, y * 2 + 0), 1018// uvec2(x * 2 + 1, y * 2 + 0), 1019// uvec2(x * 2 + 0, y * 2 + 1), 1020// uvec2(x * 2 + 1, y * 2 + 1) 1021// ); 1022// SpdStoreH(ivec2(workGroupID . xy * 16)+ ivec2(x +(i % 2)* 8, y +(i / 2)* 8), v[i], 1); 1023// } 1024// SpdWorkgroupShuffleBarrier(); 1025// } 1026// 1027// if(localInvocationIndex < 64) 1028// { 1029// SpdStoreIntermediateH(x + 0, y + 0, v[0]); 1030// SpdStoreIntermediateH(x + 8, y + 0, v[1]); 1031// SpdStoreIntermediateH(x + 0, y + 8, v[2]); 1032// SpdStoreIntermediateH(x + 8, y + 8, v[3]); 1033// } 1034// } 1035// 1036// void SpdDownsampleMips_0_1H(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mips) 1037// { 1038// 1039// SpdDownsampleMips_0_1_IntrinsicsH(x, y, workGroupID, localInvocationIndex, mips); 1040// 1041// } 1042// 1043// void SpdDownsampleMip_2H(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mip) 1044// { 1045// 1046// f16vec4 v = SpdLoadIntermediateH(x, y); 1047// v = SpdReduceQuadH(v); 1048// 1049// if(localInvocationIndex % 4 == 0) 1050// { 1051// SpdStoreH(ivec2(workGroupID . xy * 8)+ ivec2(x / 2, y / 2), v, mip); 1052// SpdStoreIntermediateH(x +(y / 2)% 2, y, v); 1053// } 1054// 1055// } 1056// 1057// void SpdDownsampleMip_3H(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mip) 1058// { 1059// 1060// if(localInvocationIndex < 64) 1061// { 1062// f16vec4 v = SpdLoadIntermediateH(x * 2 + y % 2, y * 2); 1063// v = SpdReduceQuadH(v); 1064// 1065// if(localInvocationIndex % 4 == 0) 1066// { 1067// SpdStoreH(ivec2(workGroupID . xy * 4)+ ivec2(x / 2, y / 2), v, mip); 1068// SpdStoreIntermediateH(x * 2 + y / 2, y * 2, v); 1069// } 1070// } 1071// 1072// } 1073// 1074// void SpdDownsampleMip_4H(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mip) 1075// { 1076// 1077// if(localInvocationIndex < 16) 1078// { 1079// f16vec4 v = SpdLoadIntermediateH(x * 4 + y, y * 4); 1080// v = SpdReduceQuadH(v); 1081// 1082// if(localInvocationIndex % 4 == 0) 1083// { 1084// SpdStoreH(ivec2(workGroupID . xy * 2)+ ivec2(x / 2, y / 2), v, mip); 1085// SpdStoreIntermediateH(x / 2 + y, 0, v); 1086// } 1087// } 1088// 1089// } 1090// 1091// void SpdDownsampleMip_5H(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint mip) 1092// { 1093// 1094// if(localInvocationIndex < 4) 1095// { 1096// f16vec4 v = SpdLoadIntermediateH(localInvocationIndex, 0); 1097// v = SpdReduceQuadH(v); 1098// 1099// if(localInvocationIndex % 4 == 0) 1100// { 1101// SpdStoreH(ivec2(workGroupID . xy), v, mip); 1102// } 1103// } 1104// 1105// } 1106// 1107// void SpdDownsampleMips_6_7H(uint x, uint y, uint mips) 1108// { 1109// ivec2 tex = ivec2(x * 4 + 0, y * 4 + 0); 1110// ivec2 pix = ivec2(x * 2 + 0, y * 2 + 0); 1111// f16vec4 v0 = SpdReduceLoad4H(tex); 1112// SpdStoreH(pix, v0, 6); 1113// 1114// tex = ivec2(x * 4 + 2, y * 4 + 0); 1115// pix = ivec2(x * 2 + 1, y * 2 + 0); 1116// f16vec4 v1 = SpdReduceLoad4H(tex); 1117// SpdStoreH(pix, v1, 6); 1118// 1119// tex = ivec2(x * 4 + 0, y * 4 + 2); 1120// pix = ivec2(x * 2 + 0, y * 2 + 1); 1121// f16vec4 v2 = SpdReduceLoad4H(tex); 1122// SpdStoreH(pix, v2, 6); 1123// 1124// tex = ivec2(x * 4 + 2, y * 4 + 2); 1125// pix = ivec2(x * 2 + 1, y * 2 + 1); 1126// f16vec4 v3 = SpdReduceLoad4H(tex); 1127// SpdStoreH(pix, v3, 6); 1128// 1129// if(mips < 8)return; 1130// 1131// f16vec4 v = SpdReduce4H(v0, v1, v2, v3); 1132// SpdStoreH(ivec2(x, y), v, 7); 1133// SpdStoreIntermediateH(x, y, v); 1134// } 1135// 1136// void SpdDownsampleNextFourH(uint x, uint y, uvec2 workGroupID, uint localInvocationIndex, uint baseMip, uint mips) 1137// { 1138// if(mips <= baseMip)return; 1139// SpdWorkgroupShuffleBarrier(); 1140// SpdDownsampleMip_2H(x, y, workGroupID, localInvocationIndex, baseMip); 1141// 1142// if(mips <= baseMip + 1)return; 1143// SpdWorkgroupShuffleBarrier(); 1144// SpdDownsampleMip_3H(x, y, workGroupID, localInvocationIndex, baseMip + 1); 1145// 1146// if(mips <= baseMip + 2)return; 1147// SpdWorkgroupShuffleBarrier(); 1148// SpdDownsampleMip_4H(x, y, workGroupID, localInvocationIndex, baseMip + 2); 1149// 1150// if(mips <= baseMip + 3)return; 1151// SpdWorkgroupShuffleBarrier(); 1152// SpdDownsampleMip_5H(x, y, workGroupID, localInvocationIndex, baseMip + 3); 1153// } 1154// 1155// void SpdDownsampleH( 1156// uvec2 workGroupID, 1157// uint localInvocationIndex, 1158// uint mips, 1159// uint numWorkGroups 1160// ){ 1161// uvec2 sub_xy = ARmpRed8x8(localInvocationIndex % 64); 1162// uint x = sub_xy . x + 8 *((localInvocationIndex >> 6)% 2); 1163// uint y = sub_xy . y + 8 *((localInvocationIndex >> 7)); 1164// 1165// SpdDownsampleMips_0_1H(x, y, workGroupID, localInvocationIndex, mips); 1166// 1167// SpdDownsampleNextFourH(x, y, workGroupID, localInvocationIndex, 2, mips); 1168// 1169// if(mips < 7)return; 1170// 1171// if(SpdExitWorkgroup(numWorkGroups, localInvocationIndex))return; 1172// 1173// SpdDownsampleMips_6_7H(x, y, mips); 1174// 1175// SpdDownsampleNextFourH(x, y, uvec2(0, 0), localInvocationIndex, 8, mips); 1176// } 1177// 1178// #line 175 "shaders/src/GenerateMipmap.comp" 1179// 1180// void main() 1181// { 1182// 1183// SpdDownsampleH(gl_WorkGroupID . xy, gl_LocalInvocationIndex, params . levelCount, 0); 1184// 1185// } 1186