| // 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/ConvertVertex.comp.00000007.inc: |
| // Pre-generated shader for the ANGLE Vulkan back-end. |
| |
| #pragma once |
| constexpr uint8_t kConvertVertex_comp_00000007[] = { |
| 0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x02,0xff,0x9d,0x57,0x5f,0x4c,0x95,0x75, |
| 0x18,0xfe,0xde,0x73,0x0e,0x07,0x12,0x54,0x08,0xfb,0xb7,0x99,0xb3,0x88,0x12,0x61, |
| 0xea,0x98,0xb5,0x96,0xab,0x95,0x37,0xe6,0xa2,0x15,0x69,0x23,0xb9,0x89,0x23,0xa7, |
| 0x99,0x2e,0x2c,0x07,0x9b,0x0e,0x88,0x61,0xab,0xb6,0x2e,0x62,0x5c,0x98,0xd9,0xd6, |
| 0x62,0x05,0x5b,0x61,0xa6,0x5e,0x58,0xb7,0x15,0x53,0x58,0x4d,0x2d,0x6e,0xcc,0xa6, |
| 0xa5,0x03,0x8f,0xe2,0x6d,0x25,0x51,0x19,0xf4,0x3e,0xdf,0xfb,0xfc,0xe2,0xed,0x9b, |
| 0x57,0x9d,0xed,0xb7,0xef,0x7b,0x9f,0xf7,0xff,0xf3,0xfb,0xf7,0x9d,0x74,0xaa,0xaa, |
| 0x38,0x8a,0x24,0x5a,0x10,0x95,0x44,0x57,0x25,0x8a,0x7f,0x15,0x51,0x2a,0xc2,0x6b, |
| 0x69,0x94,0x8d,0x9f,0x1b,0x1a,0x36,0x35,0xac,0x6a,0xef,0xc8,0xaf,0x5a,0x7b,0xff, |
| 0x1a,0xe8,0x17,0x45,0xe9,0xd8,0x0e,0xba,0xc5,0x6a,0x53,0xa4,0xcf,0x8c,0x8e,0xb6, |
| 0xdc,0xf6,0x9d,0xc0,0xa7,0x74,0x94,0x2b,0x9e,0x89,0x63,0x45,0xd1,0xa3,0xb4,0xc5, |
| 0x78,0x5c,0xad,0xab,0x2d,0x4d,0x54,0xc5,0x67,0xc0,0x84,0x58,0xc6,0x61,0x29,0x62, |
| 0x25,0x0e,0x4b,0x13,0x2b,0x73,0x58,0x86,0x58,0xb9,0xc3,0x8a,0x88,0x2d,0x71,0x58, |
| 0x96,0xd8,0xed,0x0e,0x2b,0x26,0xb6,0xd4,0x61,0x25,0xc4,0x96,0x3b,0xec,0x26,0x62, |
| 0xf7,0x38,0x6c,0x01,0xb1,0x15,0x0e,0x2b,0x25,0x56,0xe7,0xb0,0x32,0x62,0x6b,0x1c, |
| 0xb6,0x90,0xd8,0x5a,0x87,0x2d,0x22,0xf6,0x20,0x78,0xd7,0x4e,0x03,0x07,0x1b,0xb4, |
| 0xc3,0x16,0xd6,0x1f,0xf8,0xc9,0x25,0x78,0x84,0x7d,0x8e,0xfc,0xc0,0xbe,0x55,0x9f, |
| 0x77,0xff,0xab,0x33,0xf9,0x2e,0xf2,0x0c,0x79,0x22,0x11,0x6f,0xf2,0x06,0xf1,0x26, |
| 0x5d,0xbc,0x42,0x22,0x5e,0x81,0xf1,0x82,0x3c,0xc5,0xde,0x97,0x52,0x5e,0x29,0x26, |
| 0xdf,0xa1,0xa3,0x52,0xbb,0x48,0xc5,0xf6,0xe9,0x38,0x1e,0xde,0x6f,0x51,0x9b,0x2c, |
| 0x39,0xc6,0xef,0x56,0xd5,0x54,0x50,0x5e,0xa6,0x6f,0x61,0xbe,0xfe,0xef,0x58,0xae, |
| 0xf1,0xef,0xe5,0xbc,0x21,0xd6,0x3a,0xca,0xf7,0x11,0x43,0xfe,0x15,0xcc,0x07,0x4e, |
| 0x6a,0x29,0xd7,0x38,0xff,0x95,0xb4,0xcd,0x52,0x8f,0xe7,0x6a,0x72,0x16,0xec,0xeb, |
| 0xd9,0x4f,0xd0,0xaf,0xe3,0xfa,0x09,0xfa,0xf5,0x09,0xb9,0x81,0xfe,0x4b,0x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0x37,0x42,0xc8,0x7d,0x42,0x0c,0x6f, |
| 0x73,0x7b,0x74,0x54,0x0c,0xcf,0xf3,0x9b,0x28,0xc4,0x1f,0x13,0xd3,0x3d,0xad,0xbe, |
| 0xf8,0x3e,0xfa,0x46,0xe6,0x7b,0x2f,0x53,0x0b,0xd8,0x7c,0x2b,0xf6,0xfd,0xf2,0x10, |
| 0xf5,0xc7,0x99,0xfb,0xa4,0x98,0x6e,0x2c,0x51,0xdf,0xb8,0x9b,0x83,0x82,0x58,0x0f, |
| 0xe8,0xf1,0x24,0xfb,0x3e,0x41,0x7f,0xdc,0xf1,0xb8,0xf3,0x0b,0xf4,0x9f,0xe3,0x3d, |
| 0x37,0xe7,0xce,0xe6,0x6a,0xde,0xb1,0x43,0x89,0xef,0x86,0x59,0x77,0xff,0x9f,0xe1, |
| 0x7c,0x74,0xba,0xf9,0xf8,0x41,0x0c,0x0f,0xe7,0xf2,0x59,0x31,0xcc,0x9f,0xfb,0x3f, |
| 0xf2,0x5e,0x3f,0x2b,0xf3,0x67,0xf5,0x39,0xb1,0x6f,0xbd,0x3c,0xf5,0x8f,0xe8,0xdc, |
| 0x9d,0x63,0x9d,0xfe,0x3b,0xa6,0x36,0xfe,0x5e,0x10,0xfd,0x6f,0x26,0xd1,0x3f,0x7d, |
| 0xee,0xa5,0x37,0x38,0x0f,0x00,0x00 |
| }; |
| |
| // Generated from: |
| // |
| // #version 450 core |
| // |
| // layout(local_size_x = 64, local_size_y = 1, local_size_z = 1)in; |
| // |
| // layout(set = 0, binding = 0)buffer dst |
| // { |
| // uint destData[]; |
| // }; |
| // |
| // layout(set = 0, binding = 1)buffer src |
| // { |
| // uint srcData[]; |
| // }; |
| // |
| // layout(push_constant)uniform PushConstants |
| // { |
| // |
| // uint outputCount; |
| // |
| // uint componentCount; |
| // |
| // uint srcOffset; |
| // uint dstOffset; |
| // |
| // uint Ns; |
| // uint Bs; |
| // uint Ss; |
| // uint Es; |
| // |
| // uint Nd; |
| // uint Bd; |
| // uint Sd; |
| // uint Ed; |
| // |
| // uint srcEmulatedAlpha; |
| // |
| // bool isSrcHDR; |
| // bool isSrcA2BGR10; |
| // } params; |
| // |
| // uint getSourceComponentOffset(uint vertex, uint component) |
| // { |
| // return vertex * params . Ss + component * 4 + params . srcOffset; |
| // } |
| // |
| // uint getDestinationComponentOffset(uint vertex, uint component) |
| // { |
| // return vertex * params . Sd + component * params . Bd + params . dstOffset; |
| // } |
| // |
| // uint getShiftBits(uint offset, uint B) |
| // { |
| // |
| // uint shift =(offset % 4)* 8; |
| // |
| // return shift; |
| // } |
| // |
| // float loadSourceComponent(uint cd) |
| // { |
| // |
| // uint vertex = cd / params . Nd; |
| // uint component = cd % params . Nd; |
| // |
| // if(component >= params . Ns && component < 3) |
| // { |
| // return 0; |
| // } |
| // |
| // uint offset = getSourceComponentOffset(vertex, component); |
| // uint block = srcData[offset / 4]; |
| // |
| // uint shiftBits; |
| // uint valueBits; |
| // uint valueMask; |
| // |
| // if(params . isSrcHDR) |
| // { |
| // valueBits = component == 3 ? 2 : 10; |
| // valueMask = component == 3 ? 0x03 : 0x3FF; |
| // if(params . isSrcA2BGR10) |
| // { |
| // shiftBits = 10 * component; |
| // } |
| // else |
| // { |
| // |
| // shiftBits = component == 3 ? 0 :(valueBits *(2 - component)+ 2); |
| // } |
| // } |
| // else |
| // { |
| // shiftBits = getShiftBits(offset, 4); |
| // valueBits = 4 * 8; |
| // valueMask = valueBits == 32 ? - 1 :(1 << valueBits)- 1; |
| // } |
| // |
| // uint valueAsUint; |
| // |
| // if(component >= params . Ns && component == 3) |
| // { |
| // valueAsUint = params . srcEmulatedAlpha; |
| // } |
| // else |
| // { |
| // valueAsUint =(block >> shiftBits)& valueMask; |
| // } |
| // |
| // float value = uintBitsToFloat(valueAsUint); |
| // |
| // return value; |
| // } |
| // |
| // float convertComponent(float srcValue) |
| // { |
| // |
| // return srcValue; |
| // } |
| // |
| // uint makeDestinationComponent(uint cd, float value) |
| // { |
| // |
| // uint valueAsUint; |
| // |
| // if(params . Bd == 2) |
| // { |
| // |
| // uint shift =((cd & 1)== 0)? 0 : 16; |
| // valueAsUint = packHalf2x16(vec2(value, 0.0))<< shift; |
| // } |
| // else |
| // { |
| // valueAsUint = floatBitsToInt(value); |
| // } |
| // |
| // return valueAsUint; |
| // } |
| // |
| // void storeDestinationComponents(uint valueAsUint) |
| // { |
| // |
| // destData[gl_GlobalInvocationID . x + params . dstOffset / 4]= valueAsUint; |
| // } |
| // |
| // void main() |
| // { |
| // if(gl_GlobalInvocationID . x >= params . outputCount) |
| // return; |
| // |
| // uint valueOut = 0; |
| // for(uint i = 0;i < params . Ed;++ i) |
| // { |
| // uint cd = gl_GlobalInvocationID . x * params . Ed + i; |
| // if(cd >= params . componentCount) |
| // { |
| // break; |
| // } |
| // |
| // float srcValue = loadSourceComponent(cd); |
| // float destValue = convertComponent(srcValue); |
| // valueOut |= makeDestinationComponent(cd, destValue); |
| // } |
| // |
| // storeDestinationComponents(valueOut); |
| // } |