base: bc7 encode shaders

This commit is contained in:
luboslenco
2026-09-30 17:47:41 +02:00
parent 54fe88fbbe
commit bece26a48a
5 changed files with 4825 additions and 0 deletions
+640
View File
@@ -0,0 +1,640 @@
// Generated from gpu_bc7.shader by gpu_bc7.sh, do not edit
#pragma once
static const uint32_t direct3d12_bc7_dxil[] = {
0x43425844,0xf59906fd,0xbd7c5eb9,0x42234ebf,
0xcbc9ebee,0x00000001,0x000027a4,0x00000007,
0x0000003c,0x0000004c,0x0000005c,0x0000006c,
0x000000e0,0x00000844,0x00000860,0x30494653,
0x00000008,0x00000000,0x00000000,0x31475349,
0x00000008,0x00000000,0x00000008,0x3147534f,
0x00000008,0x00000000,0x00000008,0x30565350,
0x0000006c,0x00000024,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0xffffffff,
0x00000005,0x00000000,0x00000000,0x00000003,
0x00000010,0x00000002,0x00000000,0x00000000,
0x00000000,0x00000005,0x00000000,0x00000000,
0x00000000,0x00000008,0x00000000,0x00000000,
0x00000000,0x00000004,0x00000000,0x00000000,
0x54415453,0x0000075c,0x00050060,0x000001d7,
0x4c495844,0x00000100,0x00000010,0x00000744,
0xdec04342,0x00000c21,0x000001ce,0x0020820b,
0x00000002,0x00000013,0x91238107,0x4904c841,
0x39321006,0x0c840192,0x19080525,0x628b041e,
0x02451880,0x420b9242,0x143210c4,0x4b180838,
0x8862320a,0x20149048,0xa5884643,0x42321900,
0x900e48e4,0x50c42311,0x8c815141,0x8ae583e1,
0x06463104,0x00001851,0x00000008,0xffe08c1b,
0x07ffffff,0x0da80240,0xfffff086,0x2003ffff,
0x6206d501,0xfffffff8,0x009001ff,0x00001849,
0x00000003,0x42608213,0x06084c20,0x00000000,
0x00002089,0x00000048,0x09882232,0x04856420,
0x84a42313,0xe3231304,0x1490a184,0x8c8c4c12,
0x4cc4840b,0x1cc18810,0x64cc1801,0x0ec0e306,
0xf30f30e1,0x70b206e0,0x0f40b30b,0xe30f50f2,
0x20f50f40,0x0e40e50f,0xe60f50a2,0x20e50e60,
0x0f507c0f,0xe90f30ee,0x50ee0e70,0x0600e40e,
0xf40ee0e9,0x002807e0,0x0c899828,0xc21d81c6,
0xc1e61e61,0x1e81660d,0xc61ea1e4,0x41ea1e81,
0x1c81ca1e,0xcc1ea144,0x41ca1cc1,0x1ea0f81e,
0xd21e61dc,0xa1dc1ce1,0x0c01c81c,0xe81dc1d2,
0x00500fc1,0x300330d0,0x2714408c,0x0c0a35fc,
0x4a00463a,0x06529090,0x29880000,0x05140144,
0x80286539,0x86a3a082,0x87b09fcb,0xa36e7c90,
0xfc98958a,0x5111b6e2,0x47314514,0xcf74d080,
0xf613f970,0x021f9210,0x2810b0cd,0x01210aa0,
0x1cd64015,0x0a8c5041,0xa3000098,0xf2e1a6ec,
0x2421ec27,0x95a4257f,0xb6e47c98,0x00000151,
0x03629400,0xae20002a,0x01500928,0xc0000000,
0xc040de44,0x0028011c,0xc0721413,0x87607487,
0x79876836,0xc0720368,0x50af0d87,0x0ed06d0e,
0x6d0e507a,0x307a0f00,0x07a07207,0x6d072073,
0xa0710e90,0x07207307,0x780e906d,0x207307a0,
0x0e906d07,0x7a076071,0xd0720730,0x0730e906,
0x7307a072,0x906d0720,0x0740760e,0x7407607a,
0x10e606d0,0x07a07607,0x6d072073,0x20730e60,
0x07307a07,0xe606d072,0xa0740760,0x07407607,
0x780ee06d,0x607107a0,0x07307a07,0x7607a072,
0x0f3a0740,0x23219064,0x66004445,0x00dcc000,
0x0001f980,0x2014790c,0x00000000,0x00000000,
0x30f21800,0x00040040,0x00000000,0xe4300000,
0x08008071,0x00000000,0x60000000,0x010103c8,
0x00000010,0x00000000,0x02c790c0,0x00004002,
0x00000000,0x4f218000,0x00800406,0x00000000,
0x43000000,0x00080e1e,0x00000001,0x00000000,
0x101e3c86,0x00000300,0x00000000,0x00816400,
0x00000013,0x18981e32,0x904c1119,0x4726098c,
0x024304c6,0xa004604a,0x10a30a18,0xca0ca40a,
0x006614a1,0x0300a24a,0x0faca90a,0x7ca279ca,
0x80580a07,0x6c2102c2,0x19868004,0x00662200,
0x200198e8,0x84800664,0x660a0019,0x00000000,
0x00001879,0x00000082,0x904c031a,0x44130246,
0x0b631835,0xb1033b73,0x4b9b932b,0x9903737b,
0x4101b971,0x9b3b0ba1,0x622a917b,0x2a9a0a2a,
0x81b99afa,0x734b3179,0xd94b630b,0x04130410,
0x00209960,0x206106cc,0x41040836,0x826e6c61,
0x861b3400,0x08262103,0x4be147c4,0x38008266,
0xd9e00413,0x86cd0c20,0x82165084,0xd9c21818,
0x04133c10,0x7c280c41,0xb0104ccd,0x4442c36e,
0xcc0c4112,0x86ce4d34,0x20209a80,0x2be14061,
0x40008266,0xbac2101b,0x80c06208,0x81b6410d,
0x980d2a80,0xc0630420,0x00826d00,0x40041344,
0xd300209a,0x3ce90306,0x098303e2,0x106d4002,
0x10d83108,0x8106c18c,0x430d8320,0x30650613,
0x09bc1841,0x3c0601c2,0xe6be62be,0x26caf4d2,
0xc1b54008,0x23c0d240,0x20d8353e,0xe1b06b60,
0x38333820,0x03403303,0x2c209836,0xc36006c3,
0x1bc1bc40,0x60e0086c,0x41b830c3,0x0b68901c,
0x209b734b,0x41370184,0x430dac00,0x06c30c1d,
0xc683a082,0x6e14360e,0x76c00730,0xe4c44407,
0xd0c6dcc2,0x0826e6ca,0x8cc345c0,0x6e8c2ded,
0x6000826e,0xe6dcd22c,0x0826e6e8,0xcd224640,
0x826e6e8d,0xe8446800,0xd8bef0ca,0x98c8c2de,
0x7de195d0,0xc9bdd1cd,0x4ba8b195,0x9b9ba373,
0x06db0020,0x60f40f27,0x0fa0f80f,0x400fe0fc,
0x51301421,0x14814618,0xd9b1b0aa,0x91a4b9b5,
0x4dd1b995,0x642a8209,0x65762e78,0x6f697372,
0xa202536e,0x8b9e1909,0x5d9b185d,0xa094dc99,
0xe78643a8,0x46168732,0xf4d72656,0x36c65646,
0x90ca4025,0x95c8b9e1,0xc9d5bdcd,0x4dcd958d,
0x644ab409,0x79742e78,0x6e416570,0x61746f6e,
0x6e6f6974,0x36045373,0x643a8388,0x6e652e78,
0x50797274,0x746e696f,0x3b825373,0xe78642e8,
0xe756f632,0x37265746,0x05202537,0x00000000,
0x00001879,0x00000051,0x1c800833,0x661ce1c4,
0x883d0114,0xc3843843,0x0780428c,0x73077879,
0xe60c7198,0x10ed0f00,0x0e80f40e,0x1e420c33,
0xce1dc1c2,0x30661ca1,0x43883d05,0x1b838438,
0xc83d03cc,0x038c3d43,0x8c78cc3d,0x7b077074,
0x48790708,0x07707087,0x7603707a,0x20708778,
0x11cc1987,0x0e90ec0e,0x6e0f30e1,0xf0e30f30,
0x0e50f00e,0x1dc41033,0xd81c21de,0x61c21d21,
0x8930661e,0x3b83bc3b,0xb43943d0,0x83bc3c03,
0x3b03843c,0x7614f0cc,0x687b0760,0x87683707,
0x37076872,0x90708780,0x07607087,0x76072876,
0x787605f8,0x87807787,0x7187085f,0x98728718,
0x81987987,0x0ef0ee2c,0xf50ee0ee,0x30ec0ec0,
0xa1c86203,0x1ca1e41c,0xe41ca1cc,0x61dc1ca1,
0x1c21ca1c,0xca1d81c4,0x90d60661,0x43c83943,
0x39439839,0xb83943c8,0x439438c3,0x3b038838,
0xbc2fc394,0x82fc3c83,0x3b03d43b,0xc40cc3b0,
0x707c0721,0x87287a03,0x19878076,0xf80e43d1,
0x20e406e0,0x06e0e70e,0xf20e10f6,0x90e10ec0,
0x0f50ef0f,0x818330f4,0xdc1f01c8,0xa1e41c40,
0x1d61c21c,0xe41c40dc,0x00000001,0x00002071,
0x0000002f,0x7e05f015,0x3810195f,0x5348feb3,
0xa63ebcba,0xb265e5d7,0x97366eb0,0x1024c0e5,
0x30802c18,0x33befc08,0xfd667020,0x29d7a491,
0xd31f5e5d,0x5932f2eb,0xcb9b3758,0x08126072,
0xf0809a0c,0x0d0056d7,0x7e3cef97,0x84403480,
0x5b6dc5f9,0xbe5c3502,0x5501f8f3,0x3a544414,
0xb723e0c0,0x70d50a6d,0x07e3cef9,0x11105154,
0xe111393b,0x076db723,0xcef970db,0x55010be3,
0x3a544414,0x061250c0,0x717e6020,0x0d2086db,
0xbe3cef97,0x44c01110,0x2c334084,0xc3481184,
0x3f8f3be5,0x0c01111d,0xb723e0e2,0x70cf066d,
0x53e3cef9,0x7e61100d,0x4036db71,0x00d20030,
0x00000000,0x48534148,0x00000014,0x00000000,
0x9bcafea1,0x57487115,0x43ae3169,0x73fe34ad,
0x4c495844,0x00001f3c,0x00050060,0x000007cf,
0x4c495844,0x00000100,0x00000010,0x00001f24,
0xdec04342,0x00000c21,0x000007c6,0x0020820b,
0x00000002,0x00000013,0x91238107,0x4904c841,
0x39321006,0x0c840192,0x19080525,0x628b041e,
0x02451880,0x420b9242,0x143210c4,0x4b180838,
0x8862320a,0x20149048,0xa5884643,0x42321900,
0x900e48e4,0x50c42311,0x8c815141,0x8ae583e1,
0x06463104,0x00001851,0x00000008,0xffe08c1b,
0x07ffffff,0x0da80240,0xfffff086,0x2003ffff,
0x6206d501,0xfffffff8,0x009001ff,0x00001849,
0x00000003,0x42608213,0x06084c20,0x00000000,
0x00002089,0x00000049,0x09882232,0x04856420,
0x84a42313,0xe3231304,0x1490a184,0x8c8c4c12,
0x4cc4840b,0x08c18c10,0x0a000940,0xa0c008e6,
0x1030c30c,0x08500331,0x3a0c3063,0x060c60ca,
0x970d4725,0x210f613f,0x1546dcf9,0xc5f9312b,
0x30c2236d,0x008e630c,0xe19ee621,0x21ec27f2,
0x9a043f24,0xd0502161,0x9c196214,0x82399e81,
0xc0ce18a0,0xd244430c,0x4fe5c34d,0xfe4843d8,
0x312b484a,0xa36dc8f9,0x61861862,0x38350528,
0x515540c3,0x8619c180,0x86061861,0x998081ae,
0xd81c60c8,0x61e61c21,0x1660dc1e,0xea1e41e8,
0xa1e81c61,0x1ca1e41e,0xea1441c8,0xa1cc1cc1,
0x0f81e41c,0xe61dc1ea,0xc1ce1d21,0x1c81ca1d,
0xdc1d20c0,0x00fc1e81,0x33690305,0xb038c199,
0xc3cc3843,0x2c81b83c,0xd02cc2dc,0xc3d43c83,
0x3d43d038,0x903943c8,0x83d42883,0x39439839,
0xd41f03c8,0x43cc3b83,0x3b839c3a,0x80390394,
0x03b83a41,0x0a01f83d,0x1186e206,0xbf84e308,
0xdf478146,0x4c28011c,0x00000001,0xc0721413,
0x87607487,0x79876836,0xc0720368,0x50af0d87,
0x0ed06d0e,0x6d0e507a,0x307a0f00,0x07a07207,
0x6d072073,0xa0710e90,0x07207307,0x780e906d,
0x207307a0,0x0e906d07,0x7a076071,0xd0720730,
0x0730e906,0x7307a072,0x906d0720,0x0740760e,
0x7407607a,0x10e606d0,0x07a07607,0x6d072073,
0x20730e60,0x07307a07,0xe606d072,0xa0740760,
0x07407607,0x780ee06d,0x607107a0,0x07307a07,
0x7607a072,0x9e430740,0x00000000,0x00000000,
0x86000000,0x0010043c,0x00000001,0x00000000,
0x200e790c,0x00000200,0x00000000,0x24f21800,
0x00040040,0x00000000,0xe4300000,0x10008079,
0x00000000,0x60000000,0x010123c8,0x00000020,
0x00000000,0x02a790c0,0x00004002,0x00000000,
0xcf218000,0x00c00405,0x00000000,0x59000000,
0x00000020,0x0000000c,0x14981e32,0x904c1119,
0x4726098c,0x1a4304c6,0xa004604a,0x30a18a14,
0x0a40a10a,0x11a28030,0x840b0a00,0x020019ba,
0x9b680067,0x00000001,0x00001879,0x00000045,
0x904c031a,0x44130246,0x0b631835,0xb1033b73,
0x4b9b932b,0x9903737b,0x4101b971,0x9b3b0ba1,
0x622a917b,0x2a9a0a2a,0x81b99afa,0x734b3179,
0xd94b630b,0x84130410,0x0c209901,0x206106c9,
0xb2830826,0x0a0c1841,0x84137363,0x2030d961,
0xd8413109,0x84130228,0x0c209981,0x706106cd,
0xc2c42436,0x10d0c410,0x9a0086cf,0x04d27420,
0x2c368221,0xc410c484,0xf4d34cd0,0x09a8086c,
0x134c1802,0x80d9c184,0x10431610,0x086c05c3,
0x54440db0,0x4104c065,0x85b44800,0x104db9a5,
0x209a20c2,0xc186cf0c,0x040d861b,0x86df39d1,
0x0d00e362,0xb1b0aa0c,0xa4b9b5d9,0xd1b99591,
0x2a82094d,0x762e7864,0x69737265,0x02536e6f,
0x9e1909a2,0x9b185d8b,0x94dc995d,0x8643a8c0,
0x168732e7,0xd7265646,0xc65646f4,0xca482536,
0xc8b9e190,0xd5bdcd95,0xcd958dc9,0x3ab2094d,
0x652e7864,0x7972746e,0x6e696f50,0x02537374,
0x00000030,0x00001879,0x00000051,0x1c800833,
0x661ce1c4,0x883d0114,0xc3843843,0x0780428c,
0x73077879,0xe60c7198,0x10ed0f00,0x0e80f40e,
0x1e420c33,0xce1dc1c2,0x30661ca1,0x43883d05,
0x1b838438,0xc83d03cc,0x038c3d43,0x8c78cc3d,
0x7b077074,0x48790708,0x07707087,0x7603707a,
0x20708778,0x11cc1987,0x0e90ec0e,0x6e0f30e1,
0xf0e30f30,0x0e50f00e,0x1dc41033,0xd81c21de,
0x61c21d21,0x8930661e,0x3b83bc3b,0xb43943d0,
0x83bc3c03,0x3b03843c,0x7614f0cc,0x687b0760,
0x87683707,0x37076872,0x90708780,0x07607087,
0x76072876,0x787605f8,0x87807787,0x7187085f,
0x98728718,0x81987987,0x0ef0ee2c,0xf50ee0ee,
0x30ec0ec0,0xa1c86203,0x1ca1e41c,0xe41ca1cc,
0x61dc1ca1,0x1c21ca1c,0xca1d81c4,0x90d60661,
0x43c83943,0x39439839,0xb83943c8,0x439438c3,
0x3b038838,0xbc2fc394,0x82fc3c83,0x3b03d43b,
0xc40cc3b0,0x707c0721,0x87287a03,0x19878076,
0xf80e43d1,0x20e406e0,0x06e0e70e,0xf20e10f6,
0x90e10ec0,0x0f50ef0f,0x818330f4,0xdc1f01c8,
0xa1e41c40,0x1d61c21c,0xe41c40dc,0x00000001,
0x00002071,0x0000001f,0x970d0026,0x807e3cef,
0xf9844034,0x019b6dc5,0xf3be5c35,0x145501f8,
0xc03a5444,0x6db723e0,0xf970d507,0x5407e3ce,
0x3b111051,0x23e11139,0xdb046db7,0xe3cef970,
0x1455010b,0xc03a5444,0x20061250,0xdb717e60,
0x970d2056,0x10be3cef,0x8444c011,0x842c3340,
0xe5c34805,0x1d3f8f3b,0xe20c0111,0x6db723e0,
0xf970cf03,0x0d53e3ce,0x717e6110,0x304006db,
0x0000d200,0x00002061,0x0000064d,0x10af0413,
0x0000040b,0x00000037,0x40ff9434,0xf1419519,
0x4062140f,0x11521501,0x94394414,0x5054c145,
0xc94494e1,0x147940d5,0xe9400cc7,0x71529406,
0x40769417,0xc95d94a9,0x14e94914,0x4b145155,
0xc1489589,0x06094f95,0x31006294,0x50023045,
0x118c6402,0xdfe82080,0x00463061,0x86ffa082,
0x080118c1,0x8dee2082,0x18248411,0xc118dce2,
0x7b77e77f,0x39cc118d,0x18dfce6b,0xace73981,
0xf4118dfd,0xdfcee8b1,0x82484118,0x118dde21,
0xc3fd25bc,0x5b0118df,0x8df9749e,0x6f65f011,
0x0118dee6,0x79bceb9a,0x68046306,0x39e6f3ae,
0x36a8118c,0x3078d33f,0x20820046,0x04637a08,
0x6cf20820,0x82004637,0x63739820,0x82082004,
0x118c1870,0xe2082080,0x080118df,0x8dfc2082,
0x00000000,0x00090623,0xbd206082,0xab5c1c02,
0x30a40ab0,0x20009062,0x2c120608,0x0ac641c4,
0x230a50ac,0x82000906,0x82c52060,0xd0ad6c1c,
0x6230a60a,0x08200060,0xb82d8406,0x188c2b81,
0x82080018,0x6f0b7101,0x06230b00,0x60820007,
0x1ac2d4f0,0x9a30b00c,0x0c170c10,0x0440dc33,
0x409a3063,0x330c1708,0x630480dc,0xb3b04450,
0x0410aa0c,0x700809a3,0x09a330c1,0x30c1704a,
0x0dc2a4d5,0x18c20437,0x300a20d4,0x420c10dd,
0x2570ad49,0x00815220,0x00080623,0x99506082,
0xc15c2cc3,0x04268c38,0xb0e61540,0x43410dc3,
0xc20dd306,0xc011d411,0x80020188,0xec541820,
0x905d0b90,0x0109a30e,0x803b0460,0x9821b860,
0x2182e0c8,0x5040382c,0x06230381,0x60820008,
0x3803cd50,0x0f004190,0x500109a3,0x70c03cc4,
0xc191a043,0x04608374,0x62305015,0x08200080,
0x983e5506,0xf6041a83,0x00109a30,0x0ec3e5c5,
0x18de0437,0x4270374c,0x48188150,0x188c1c05,
0x82080020,0xed120541,0x3f410710,0x4004268c,
0x188c1811,0x82080020,0xf0123541,0x48010740,
0x4004268c,0x188c0751,0x82080020,0xf3126541,
0x48c10770,0x4004268c,0x188c0a45,0x82080020,
0xf6129541,0x498107a0,0x4004268c,0xec3d41b1,
0x06e04370,0xc0dd3063,0x81504206,0x6c05481c,
0x08062300,0x50608200,0x843f44c1,0xa312d042,
0x04500109,0x0188c01a,0x18208002,0x12013354,
0xc4c010a4,0x14004268,0x62301c19,0x08200080,
0x8c4d9506,0x330429c4,0x00109a31,0x8c0a0615,
0x08002018,0x13954182,0x810aa126,0x04268c4d,
0x4a81f140,0xe04370ec,0xdd306307,0x504207c0,
0x05482881,0x0623007c,0x60820008,0x4b458150,
0x13d042c4,0x500109a3,0x88c01e04,0x20800201,
0x01635418,0x8010b413,0x004268c5,0x301c1d14,
0x20008062,0x59950608,0x042dc4cc,0x109a3163,
0x0a071500,0x0020188c,0x95418208,0x0ba13616,
0x268c5981,0x812cc004,0xc0315030,0xc20a704a,
0x17e18540,0x03082bc1,0x04680615,0x540c20af,
0xbc11a218,0x61503082,0x0af04690,0xa0c540c2,
0x082bc12b,0x58010dc3,0x4374c198,0x3042ac1c,
0xa606f0dd,0xb4374c20,0xd30c2801,0x07b06b0d,
0xe18370c4,0xdd306613,0x30450660,0x850640dd,
0x0620dd30,0x00dd30c5,0xdc310506,0x198588b0,
0x456c374c,0x1590dd30,0x55c374c2,0x550dd30c,
0x16f41441,0xfc10dc3a,0x374c1805,0xdc304614,
0x1805b430,0x4218374c,0xd050dc30,0x374c1805,
0x0150421c,0x7109685e,0x85e81581,0x581a2116,
0x19685f01,0x0dc38172,0xc1845f81,0x8c6b0374,
0x51887041,0x86751877,0x65186751,0xc7c019c4,
0x8f803388,0x1f006711,0x3e00ce23,0x01b50676,
0x0086e183,0x9660c036,0x33021061,0x663e427e,
0xcc7c8580,0x98f90b08,0x31f21621,0x63e42c45,
0xc7c858ca,0x8f90b214,0x9f216529,0x00038311,
0xca383041,0x9a083623,0x00383118,0xc3830410,
0xa883643c,0x03831189,0x38304100,0x083663ce,
0x3831189b,0x83041000,0x83683d03,0x831189b8,
0x30410003,0x3603d238,0x31189d08,0x04100038,
0x623d4383,0x1189d883,0x41000383,0x43d63830,
0x189e0836,0x10003831,0x3d838304,0x89e88366,
0x3ccd86e1,0x419660c0,0x82598221,0x88c2a062,
0x884f4389,0x26630a81,0x06213e0e,0x389a8c2a,
0xa81884fc,0x00e26e30,0x62a06215,0x76c389b8,
0xc086e188,0xba60cc37,0x22521de1,0x07686e98,
0x1ba61092,0x861fc1d6,0xc87486e9,0xc1b86207,
0x98330de0,0x2287206e,0x87106e98,0x006e9842,
0x6e986287,0x188285f0,0xc3c0586e,0x721ba60c,
0x1ba608a1,0xa610a16e,0x18a16a1b,0xa1661ba6,
0x0f6a0a20,0xfa086e1d,0x1ba60c03,0x6e18230a,
0x0c03d618,0x210c1ba6,0xe4286e18,0x1ba60c03,
0xc0a8210e,0xf784b43e,0x43f00ac0,0xac11008b,
0x0cb43f40,0x8c33c0f8,0x23a8c2ba,0x28c23a8c,
0x3e20ec23,0x7c41d846,0xf883b08c,0xf1076118,
0x03286e19,0xe9830118,0x820d4286,0x0d4286e9,
0x4286e984,0x86e9860d,0x0b080d42,0x30d8f902,
0x428ac7c8,0xf21c763e,0x8f802231,0x2c7c0305,
0x1c33e028,0xf386c811,0x471832cd,0x00606230,
0xc9060820,0x60889898,0xc7d011b6,0x263e4702,
0xc1b1f238,0x8e118f91,0x8e09667c,0x31030a81,
0xa818a0c8,0x0c831030,0x030a818a,0x18a0c831,
0x831030a8,0x300b0a0c,0xc9a0d8f9,0x3e4e0ac7,
0x31f27876,0x058f8021,0x302c7c04,0x188163e0,
0x5402c7c8,0x630d8f80,0x520b1f20,0x90563e01,
0x502c7c81,0x51d8f805,0x60b1f206,0xab63e015,
0x18302770,0x04e4086e,0x9019660c,0x9061b022,
0x7c86198f,0x63e4492c,0x0b1f230c,0x4058f804,
0x0302c7c0,0x4111c33e,0x2cdf387d,0x2304a243,
0x82000606,0x4a989060,0x1f96089a,0x982c7d01,
0x248263e4,0xf9221b1f,0x67c90118,0xe8194096,
0x0dc49030,0x0619fc10,0x61240c3a,0x867f4403,
0x49030e81,0x9fe100d4,0x40c3a061,0xfc403412,
0x58659867,0x25987222,0x8c2a0660,0x684060d4,
0x5230a819,0x65a11183,0x0d48c2a0,0x81968486,
0x1835230a,0x2a065a13,0x5060d88c,0x30a81968,
0xa1518362,0x88c2a065,0x9685860d,0x36230a81,
0x065a1718,0x60dc8c2a,0xa8196860,0x91837230,
0xc2a065a1,0x86860dc8,0x230a8196,0x5a1b1837,
0xf08c2a06,0x19687060,0x83c230a8,0xa065a1d1,
0x860f08c2,0x0a819687,0x1f183c23,0x8c2a065a,
0x68c060f4,0xd230a819,0x65a31183,0x0f48c2a0,
0x81968c86,0x183d230a,0x2a065a33,0xd060f88c,
0x30a81968,0xa35183e2,0x88c2a065,0x968d860f,
0x3e230a81,0x065a3718,0x60f8862a,0x6e196b48,
0x0cc56a08,0x03cc1ba6,0x86e18244,0x60cc5601,
0x843701ba,0x88a1b860,0x6e983315,0xa8210d50,
0x04b457a0,0x7e0ac15b,0x17388b45,0xf45c20ac,
0x308ea30a,0xeaa306ea,0x6e1d9791,0x0cc5c808,
0x23e41ba6,0x86e18245,0x60cc57e1,0x843c81ba,
0x00a1b860,0x6e983317,0xa8210db0,0x84b45d80,
0xdc0ac172,0x17b08b45,0xf45e00ac,0x308ea30a,
0xcaa306ea,0x6e1d976b,0x0cc5e608,0x23fc1ba6,
0x86e18246,0x60cc5dc1,0x843e01ba,0x78a1b860,
0x6e983317,0xa8210f10,0x04b45f60,0xfa0ac17a,
0x19288b45,0xf45fe0ac,0x308ea30a,0xaaa306ea,
0x8766420d,0x3191021b,0x1506e983,0xb86091d1,
0x3317e861,0x0fe06e98,0x286e1821,0xa60cc5fc,
0x0843dc1b,0x2d19502a,0x02b06461,0x6822d196,
0x19702b06,0x23a8c2bd,0x28c1ba8c,0x88d40383,
0x6a41898f,0xd528c7c4,0xab198f88,0x839b1f11,
0x958f88d5,0xc7c46b01,0x8f88d6ae,0x1f11ae25,
0x88d703b3,0x6bc1a18f,0xd834c7c4,0xb1318f88,
0x18631f11,0xc8c318f9,0x3e4618c7,0x31f230c6,
0x63e01c82,0xc7c03904,0x8f807208,0x1f00e411,
0x18f92883,0x20c7c944,0x51063e4a,0x1d0231f2,
0x3a0463e0,0x7408c7c0,0xe8118f80,0x38a31f00,
0xc9c518f9,0x3e4e28c7,0x31f27146,0x63e01d82,
0xc7c03b04,0x8f807608,0x1f00ec11,0x90300303,
0x1801818f,0x00c0c7c8,0x6063e40c,0x31f20600,
0x63e01e02,0xc7c03c04,0x8f807808,0x1f00f011,
0x90320343,0x1901a18f,0x80d0c7c8,0x6863e40c,
0x31f20640,0x63e01e82,0xc7c03d04,0x8f807a08,
0x1f00f411,0x90360363,0x1b01b18f,0x80d8c7c8,
0x6c63e40d,0x31f206c0,0x63e01f02,0xc7c03e04,
0x8f807c08,0x1f00f811,0x81db07c3,0x604370c1,
0xcb30683b,0xb58134c0,0xc7c01b81,0x8f803602,
0x1f006e05,0x80348343,0x0067058f,0x00d20b1f,
0x6406363e,0xc40b1f00,0x90163e00,0xfbcc7c01,
0x074163e0,0xf83e0b1f,0xc7c1a658,0x163e0c02,
0xaa31f068,0x13058f82,0xe0a82c7c,0xc8dd0a63,
0x91ba22c7,0x7c0f058f,0x63e0182c,0xc7c8de08,
0x8f91bc24,0x2c7c0d05,0x0963e018,0x26c7c8df,
0x058f91be,0x182c7c0e,0x606233e0,0x06082000,
0x4fe10809,0x00606232,0x49060820,0x318fe508,
0x20007062,0x08c70608,0x8c108fbd,0x08001818,
0x42324182,0x188c43fb,0x8208001c,0xf14251c1,
0x11c30423,0xdf08e981,0x04f3832c,0x7d023786,
0x63e4802c,0x1b1f2342,0x12ccf914,0x8615033c,
0x334198e1,0x0e186150,0x15033418,0x8d68e186,
0x1f206305,0x3e40ce1b,0x7c81ac56,0x63e0084c,
0x331f0101,0x863e40c4,0x4c7c8198,0x98f90369,
0x02c7c010,0x90b63e02,0x41ac7c81,0xf3d8f903,
0x2131f206,0x04058f80,0x0c0c467c,0x20c10400,
0x5a1a21e1,0x000c0c46,0xe920c104,0x463a1aa1,
0x04000e0c,0xa1f8e0c1,0x11821215,0x41000303,
0xe87e4830,0x83118886,0x30410003,0x85a8c238,
0x22386084,0x9be11f10,0x56055865,0x0c0c4608,
0x20c10400,0xe212a311,0xffffffd3,0xa0276ac1,
0xfaa5058f,0xc83fffff,0xfd5284c7,0xe41fffff,
0xfea94363,0xf20fffff,0x06882599,0xb2030c3a,
0x1bb0571b,0x30c3a065,0x0571bb20,0x3a0651bb,
0x1bb2030c,0x651bb057,0x3ba0c3a0,0xc15c6ec8,
0x020b146e,0xc830d8f9,0x3e428ac7,0x31f21c76,
0x058f8021,0x302c7c04,0x111c33e0,0xcdf10f8c,
0x30534832,0x6d2e20dc,0x0dd30614,0x813e43f2,
0x2c7c8105,0x8cf81f90,0x08001818,0x47724182,
0xfa98143a,0x80b1f404,0x0263e47e,0x86c7c8fe,
0x118f91fa,0x09667c88,0x030a81a6,0x1a20d891,
0x891030a8,0x0a81a20d,0x20d89103,0x1030a81a,
0x59a20d89,0xc2a06a02,0x1c29bfa0,0x830a81a8,
0xa070a6fe,0x7d062a06,0xa070a60c,0x38021b86,
0x86e98332,0x609dd9d0,0x6c6fe1ba,0xe86e9847,
0xa619d81b,0x7566f61b,0xc306e188,0xba60cc8d,
0x608a6ec1,0x0a6e81ba,0x6e41ba61,0x01ba618a,
0xb8620a6e,0x33239161,0x9b586e98,0x486e9822,
0x6e98429b,0x98629b38,0x829b286e,0x748fe828,
0x257821b8,0x286e9830,0x61b8608c,0x983023e8,
0x6084306e,0x2520a1b8,0x386e9830,0x5402a084,
0x094212d2,0x2d25502b,0x02b09642,0x4432d256,
0xea30cf09,0x308ea30a,0x8ca308ea,0x18f89940,
0x31f13281,0x63e26502,0xc7c4ca04,0x8f903484,
0x1f206b11,0x3e40da33,0xb1f00426,0x70cf8080,
0x539ccf03,0x06e1d818,0x8021b1f2,0x404374cf,
0x0706230c,0x70608200,0xc12e53c8,0x70623041,
0x06082000,0x12fd3cc7,0x0706081c,0xe18304ee,
0xc09d2086,0xa2a19660,0x48e42302,0x91cc463e,
0x03d04c7c,0x07a0d8f9,0x0f4231f2,0x1e8563e4,
0x9988c7c8,0x33118f81,0x66231f03,0xcc463e06,
0x0c467c0c,0xc104000e,0x762900e0,0xc468de22,
0x104000e0,0x6a908e0c,0x468e0227,0x04000e0c,
0x2910e0c1,0x68e22277,0x4000e0c4,0x918e0c10,
0x8e42277a,0x000e0c46,0x20e0c104,0xea2275a9,
0x00e0c468,0x8e0c1040,0xc2276292,0x0e0c468e,
0xe0c10400,0x2276a930,0xe0c468ee,0x0c104000,
0x2772938e,0x522c8f02,0xa498f905,0x49b1f20a,
0x9463e415,0x88c7c82a,0x118f81b1,0x231f0363,
0x463e06c6,0x467c0d8c,0x04000e0c,0x2980e0c1,
0x68fe227e,0x4000e0c4,0x988e0c10,0x940227ea,
0x000e0c46,0x90e0c104,0x42227f29,0x00e0c469,
0x8e0c1040,0x4227fa99,0x0e0c4694,0xe0c10400,
0x227da9a0,0xe0c4694a,0x0c104000,0x27e29a8e,
0x0c4694c2,0xc104000e,0x7ea9b0e0,0xc4694e22,
0x104000e0,0xf29b8e0c,0x6c950227,0xc163e020,
0x060b1f00,0xc17598f8,0x3e0b02c7,0x19f05816,
0xe108088e,0xb6586e9b,0xd961ba60,0x6586e984,
0x961ba61b,0xf86e988d,0xe1ba629e,0x86e98c7b,
0x1ba639ef,0x643107be,0xc963e49d,0x82c7c93a,
0x05cf825c,0x56505903,0x086e1827,0xa60d0aca,
0x084acc1b,0x9c021b86,0x86e98332,0x0b82129c,
0x8940b30c,0x7c81058f,0xf927ba6c,0xf24f7518,
0xe09ca0b1,0x1640c173,0x8609d5c4,0x42b8821b,
0xb906e983,0x86e18212,0x60ccac80,0x84aca1ba,
0x2cc302e0,0x4163e250,0x026b1f20,0x5247d8f8,
0x203031f2,0x2058f929,0x60b9f04f,0xeafc0b20,
0x810dc304,0x74c1a15f,0xc1095fc3,0x57104370,
0x20dd3066,0x81704257,0xf1281661,0x8f9020b1,
0x667c0135,0x17ebac19,0x4a620d6c,0x3106c63e,
0xfe0b1f25,0x0c173e09,0x9d6ac164,0x5821b860,
0x6e98342d,0x18212d60,0xcafc086e,0xfe1ba60c,
0x302e084a,0x3e2502cc,0xb1f20416,0x2ccf8026,
0x615035c1,0xdd571608,0x81640c1c,0x82a09d6d,
0x86e1dadb,0x60d0b700,0x84b721ba,0x6821b860,
0x6e98332d,0xb8212d70,0xf80b30c0,0x04163e20,
0x1838b9f2,0x3af002c8,0xb5e10541,0x78810dc3,
0xc374c1a1,0x70c10978,0x665b7043,0x5b80dd30,
0x61817042,0x7c41e816,0x63e4082c,0x7b9f004b,
0x582c8183,0xc05413af,0x10dc3b5e,0x4c1a17b4,
0x1097b837,0xe204370c,0x0dd30665,0x170425e3,
0x1e016618,0x4082c7c4,0xf004b63e,0xb2c06599,
0xf85cb096,0x2e98f92b,0x2e7c95fc,0xfc02c818,
0xf905413a,0x810dc3b5,0x74c1a17e,0xc1097ec3,
0x5ef04370,0x00dd3066,0x8170425f,0xf1281661,
0x8f9020b1,0x667c0135,0x0a81b209,0x6bb8c043,
0x03782238,0x0860bbe2,0x92d78743,0x6bc3a58f,
0xbe82c7c9,0x0305cf82,0x27629059,0x52086e18,
0x1ba60d0c,0x86084c54,0x32fe021b,0xfe86e983,
0x0c0b8212,0x8f8940b3,0x6c7c8105,0x3e4b761e,
0x25bb0f46,0x0b520b1f,0x640c173e,0x609d8d41,
0x31a821b8,0xb06e9834,0x6e182131,0x0ccc5008,
0x4c521ba6,0xcc302e08,0x163e2502,0x26b1f204,
0x03fd8f80,0x40c7c97a,0x63e4bd02,0xe7c16d81,
0x102c8182,0x370c13b3,0x06866204,0x26630dd3,
0x410dc304,0x74c1998d,0xc1098d83,0xa0598605,
0x4082c7c4,0xf004d63e,0xb6d06599,0xa895b0d1,
0x4b18f92f,0x2c7c97d4,0x5cf82f18,0x6f059030,
0x86e18276,0x60d0cde0,0x84ce01ba,0x1021b860,
0x6e983333,0xb8213318,0x940b30c0,0xc81058f8,
0x3e009ac7,0x40db04b3,0x5c682185,0x90307376,
0x82767a05,0x876cf60a,0x433e021b,0x3e86e983,
0x86e18213,0x60ccce20,0x84ce41ba,0x2cc302e0,
0x58f883e0,0xe2e7c810,0x480b2060,0x941504ed,
0x04370eda,0xd30686a6,0x0426a70d,0x9ec10dc3,
0x0374c199,0x05c1099f,0x07a05986,0x9020b1f1,
0x7c012d8f,0xb2060dee,0x504ed5e0,0x70edac01,
0x686b1043,0x6b20dd30,0x10dc3042,0x4c199a98,
0x109a9c37,0x0598605c,0x0b1f1078,0x12d8f902,
0x62f2c7c0,0xcb33e4cc,0x61f275c0,0xf266317a,
0x0b2060b9,0x1504ed78,0x370edaf4,0x0686be04,
0x26bf0dd3,0xc10dc304,0x74c199ac,0xc109ad03,
0xa0598605,0x4082c7c4,0xf004d63e,0x06e82599,
0xe3810c2a,0xe088e1b6,0x82ef880d,0x8c1cce21,
0xe208d4b2,0xc9984163,0x833102c7,0x590305cf,
0xa8276ee0,0xb8761d60,0x34076021,0x07686e98,
0x286e9821,0x877b7137,0x302106e1,0x6106e983,
0x98350c08,0x66c058f8,0xcda0b1f2,0x40c173e0,
0x09dbe416,0x1d87b02a,0x01ee086e,0xf01ba60d,
0x1b860841,0xa60cc582,0xb021181b,0x63e2b0d2,
0xc7c99d81,0xcf833b82,0x30590305,0x00a82772,
0x21b87624,0x98340908,0x2109106e,0x2a086e18,
0xb06e9833,0x63dac084,0x4163e4d6,0x82c7c418,
0x058f9350,0x0b9f06a2,0xe5c0b206,0x4ac1504e,
0xc04370ec,0xdd306812,0x304212d0,0x818010dc,
0x84374c19,0x1b5c1081,0x11306518,0x5602c7c4,
0xad058f93,0x060b9f06,0x4ee720b2,0xec1c8150,
0x07304370,0x40dd3068,0xdd304207,0x672d7300,
0x420dc307,0x0dd30660,0x4bd810c2,0xe0b1f130,
0x0163e4d6,0x82e7c1ae,0xbb202c81,0x07d05413,
0xf810dc3b,0x374c1a01,0x0c1081fc,0x198b0437,
0x4230374c,0xc5612c60,0x937082c7,0x06e2058f,
0xb2060b9f,0x504eedc0,0x70ec29c1,0x680a8043,
0x0a90dd30,0x10dc3042,0xdd306654,0xed810960,
0xc7c41802,0x8f937582,0x9f06ec05,0x00b2060b,
0x41504eef,0x4370ec2c,0x30680b20,0x420b30dd,
0x7c10dc30,0x00dd3066,0x4b304206,0x0c540de0,
0xfa0661bd,0x1503741e,0x01987943,0x40dd07bf,
0x661e50c5,0x3741efe0,0x9dc810dc,0x8c374c19,
0xd305af5a,0x6b86a10d,0x9fc374c2,0xdd30dac9,
0x46ad67d0,0x7018370c,0x0dd30667,0xd3045678,
0x0856760d,0x56740dd3,0x720dd30c,0x0dc31056,
0xc199dd0b,0x159b4374,0x9ac374c1,0x4374c215,
0x74c3159a,0x441599c3,0xc3a7a141,0x81ec410d,
0x614374c1,0xc30dc304,0x74c181df,0xc3042183,
0x81e9850d,0x21c374c1,0x9ea81504,0x587a3096,
0x1169eb01,0xb81587b4,0x7a41969e,0xc9dec268,
0x93bd8ac0,0x277b2181,0x18021303,0xe0c04058,
0x418cc302,0x30581bbd,0xc302e084,0x1bbd596c,
0xe0846058,0x31aec302,0x1be0966a,0x3d5830a8,
0x0c21e6f0,0xda062a06,0x0879bc0f,0xc18a8183,
0x1e6f03f6,0xf502c0c2,0xb805413b,0x1ec415b7,
0x220b1059,0x4213f530,0x883f8160,0x83f086a0,
0x40a8040a,0x568ed2fe,0xf9198110,0xcc128220,
0xa0102a0f,0x634bfb82,0xb6044150,0x4a0883d0,
0x40a83f58,0x2ff80a80,0x113df02d,0x227be1d8,
0x44f7c6b0,0x02004260,0x5c10080b,0x64059860,
0xd8931f10,0x101604ef,0x30c0b821,0x3e20ca0b,
0x09dfc0c6,0x7042402c,0x98166181,0x492c7c41,
0xeac163e4,0x438ec7c9,0x9eb0163e,0xe0182c7c,
0x1f218663,0x3e4f5c0b,0x99f00436,0x30030865,
0x03433380,0x9d81105d,0xa0884941,0xa00c1384,
0xc02a0102,0x302f20c1,0x883a02cc,0x7c81058f,
0xf93db82c,0x67c01298,0x060c2096,0x0c010c2a,
0x22386fac,0x9be203c0,0x20f2106e,0x83c06e98,
0x0f2c103c,0xc18030ca,0x86004370,0x32cc1801,
0x0c17c188,0x0c839c37,0xcb306806,0x10640630,
0x60d03a18,0x5e0a8270,0x8232d030,0x761da0ab,
0x060c8096,0x0c61062a,0x660c4378,0x0ca0cc19,
0x1c876a8c,0x1a02ae0c,0xe096b40c,0x9d87882a,
0x81833025,0x0328418a,0x930320f2,0x600c3907,
0xb410dc30,0xb3060061,0x05e0670c,0xa060fc85,
0x1d010dc3,0xcb306006,0x10680690,0x01839294,
0x0183a197,0xc1a412cf,0x3600c540,0x674e8068,
0xa8315030,0xcd881a13,0x0c540c19,0x67701a08,
0x20315030,0xc19d4068,0x27a0c540,0x67330068,
0xa0315030,0xcbf81a09,0x0c540c19,0xec068236,
0x15030672,0x01a08903,0x40c19cae,0x683380c5,
0x30672a20,0x0c983150,0x19c9c01a,0xf40c540c,
0x723e0682,0x03150306,0x8b01a0b8,0xa405419c,
0xa50d6418,0xa6156418,0xa71d6418,0xa8256418,
0xa92d6418,0xaa356418,0xab3d6418,0x1fd96418,
0xfe0549ff,0x61e81507,0x6a04b370,0xf0315030,
0xb30690a4,0xb8160a81,0xe1827062,0x03162106,
0x106e1834,0x83403140,0x6e9d8212,0x1660c568,
0x30fec083,0xdc304228,0x40629010,0x6b0cb306,
0x314106c0,0x2cdc18a1,0x370c1b41,0x88187f0c,
0x18723941,0x904374e0,0x4b30818b,0x150306d0,
0x0206b203,0x061f581b,0x1b86084c,0xc80c5582,
0x0dc19660,0xeba820de,0x259b830f,0x86e18380,
0x310314c1,0x030f0ca8,0xc0086e9c,0x09661031,
0x62a060e0,0x7840dc40,0x60c3f303,0x4370c10a,
0x19018b20,0x81c432cc,0x81b5041c,0x04b37062,
0x30dc3073,0x062062b4,0x8062c1d5,0x39c10dd3,
0xc12cc206,0x0c540c1c,0x72081c48,0x6818b060,
0x086e1821,0x83203172,0xa83a0659,0x40cca083,
0x259b8316,0x86e183b0,0x31031681,0xc7483428,
0x021ba700,0x59840c77,0xa8183b02,0x103a1018,
0x31c6c0ea,0x0c108308,0x18e00437,0xc32cc190,
0x5041e01d,0xc18e406a,0xc1e412cd,0x8bb0c370,
0x1b141881,0xd38062b0,0x063d410d,0x1e412cc2,
0xc80c540c,0x6078081d,0x41a018ae,0x821b8608,
0x60c80c73,0xf60f4196,0x783aa820,0x0966e0c5,
0x61b860f8,0x0c40c710,0x31600eea,0x8086e9c0,
0x9661031f,0x2a060f80,0x840f4406,0x0c59303d,
0xc30420de,0x063b810d,0xd0cb3064,0x54107e07,
0x7062cc1e,0x307f04b3,0x63a430dc,0x07b50620,
0x74e018e5,0x81923043,0x07f04b30,0xd2031503,
0xd81f8207,0x1076062d,0xa086e182,0x9832031e,
0x50850065,0xe0148a08,0x0259b831,0x186e1851,
0x831031e0,0x0c7a8532,0x5021ba70,0x259840c9,
0x8a818510,0x21050101,0xfc1b8614,0x300325a0,
0xc5f05b30,0x0dd302e0,0x82064b81,0x0a0064a5,
0x086e1821,0x832031fe,0x885c86e9,0x713020c9,
0x0421460c,0x48810dc3,0xbb506406,0x55c19350,
0x4e818f70,0x19360437,0x5b24650c,0x9815b081,
0x0a0056c2,0x6c1e815b,0x15b07405,0x8056c1b8,
0x18815b06,0x56dc056c,0xc12ced60,0x0c540c28,
0xc18c2882,0x0c540c29,0xc2882aa8,0x70c29c18,
0x01930043,0x9320981a,0x682a09c1,0x1ba740c9,
0x861da1dc,0x80ac040a,0xadb50325,0x4370c100,
0x190193a0,0x429032cc,0xcc250429,0x0445a064,
0x0a704b37,0x4d840dc3,0xcb306206,0x10a70a60,
0x45065bd8,0xc9b82a08,0x70090b40,0x0614e096,
0x1485063a,0x57205304,0x882a14a1,0x0cbaa2d6,
0x10dc3060,0x060065c0,0x30a80cb3,0x43a1810a,
0xc460803a,0x104001a0,0x0cbcae0c,0xc760324c,
0x80cbb820,0x2700c9c0,0x460c9c03,0xc074b032,
0xc30600cb,0x065d010d,0x90cb3060,0xcc106a0a,
0x5a02a812,0x453f063c,0x4ade0b1f,0x95ac263e,
0x2b386c7c,0xb012ccf9,0x618540c2,0x06b902ac,
0x618540cf,0x06af02ac,0x618540cf,0x06ad02ac,
0x25bc058f,0x4bc01b1f,0x9790563e,0xe0084c7c,
0x1f010163,0x3e4b7633,0x7c96fc86,0xf92f314c,
0xc7c01098,0xb63e0202,0xac7c96f4,0xd8f92f09,
0x31f25e83,0x058f8021,0x0c467c04,0xc104000c,
0xa0cda920,0xc4658335,0x104000c0,0x0cdb120c,
0x4638335c,0x04000e0c,0xcdc0e0c1,0x21033480,
0x00303118,0x04830410,0x0cd80337,0x03831188,
0x38304100,0xcd303374,0x23860840,0x840c9d82,
0x15a1966f,0x96b0215c,0x58fa040c,0x04c7c920,
0x28363e47,0x702599f2,0xc30a8185,0x60350568,
0xc30a8185,0x60310568,0xc30a8185,0x158d0568,
0x63e4082c,0x2b1f20c3,0x1098f90a,0x0202c7c0,
0x0111c33e,0x37cc065a,0x014110cb,0x00000000,
0x00000000,
};
+52
View File
@@ -0,0 +1,52 @@
#!/bin/sh
# Regenerates vulkan_bc7.h, direct3d12_bc7.h and metal_bc7.h from gpu_bc7.shader
set -e
cd "$(dirname "$0")"
case "$(uname -s)-$(uname -m)" in
Darwin-*) AMAKE=../../tools/bin/macos/amake ;;
Linux-aarch64) AMAKE=../../tools/bin/linux_arm64/amake ;;
Linux-*) AMAKE=../../tools/bin/linux_x64/amake ;;
*) AMAKE=../../tools/bin/windows_x64/amake.exe ;;
esac
DXC="$(pwd)/../../shaders/raytrace/src/dxc.exe"
DXC_RUN=${DXC_RUN-wine}
TMP=$(mktemp -d)
trap 'rm -rf "$TMP"' EXIT
$AMAKE --ashader spirv gpu_bc7.shader "$TMP/bc7.spv"
$AMAKE --ashader hlsl gpu_bc7.shader "$TMP/bc7.hlsl"
$AMAKE --ashader metal gpu_bc7.shader "$TMP/bc7.metal"
(cd "$TMP" && $DXC_RUN "$DXC" -T cs_6_0 -Fo bc7.cso bc7.hlsl > /dev/null)
words() {
od -An -v -tx4 "$1" | sed 's/ \([0-9a-f]*\)/0x\1,/g'
}
header() {
echo '// Generated from gpu_bc7.shader by gpu_bc7.sh, do not edit'
echo '#pragma once'
echo
}
{
header
echo 'static const uint32_t vulkan_bc7_spirv[] = {'
words "$TMP/bc7.spv"
echo '};'
} > vulkan_bc7.h
{
header
echo 'static const uint32_t direct3d12_bc7_dxil[] = {'
words "$TMP/bc7.cso"
echo '};'
} > direct3d12_bc7.h
{
header
echo 'static const char *metal_bc7_source ='
sed 's/\\/\\\\/g; s/"/\\"/g; s/^/\t"/; s/$/\\n"/' "$TMP/bc7.metal"
echo ';'
} > metal_bc7.h
+366
View File
@@ -0,0 +1,366 @@
// BC7 mode 6 encoder, a port of libs/bc7enc.c
// One thread per 4x4 block (dispatched as ceil(blocks_x / 64) x blocks_y groups), rgba8 pixels in, 128-bit blocks out
// Run gpu_bc7.sh after editing to regenerate vulkan_bc7.h, direct3d12_bc7.h and metal_bc7.h
cbuffer constant_buffer {
float4 size; // width, height, blocks_x, blocks_y
};
uint src[];
uint dst[];
// One row of 4 packed rgba8 pixels, read once: src lives in host memory
uint4 load_row(uint bx, uint by, int y) {
uint width = uint(constant_buffer.size.x);
uint height = uint(constant_buffer.size.y);
uint sy = by * uint(4) + uint(y);
if (sy >= height) {
sy = height - uint(1);
}
uint4 row = uint4(uint(0), uint(0), uint(0), uint(0));
uint sx = bx * uint(4);
row.x = src[sy * width + sx];
if (sx + uint(1) < width) {
sx = sx + uint(1);
}
row.y = src[sy * width + sx];
if (sx + uint(1) < width) {
sx = sx + uint(1);
}
row.z = src[sy * width + sx];
if (sx + uint(1) < width) {
sx = sx + uint(1);
}
row.w = src[sy * width + sx];
return row;
}
// Pixel i of the block from its rows, no local arrays in kong
uint4 pixel(uint4 r0, uint4 r1, uint4 r2, uint4 r3, int i) {
uint4 row = r0;
if (i >= 4) {
row = r1;
}
if (i >= 8) {
row = r2;
}
if (i >= 12) {
row = r3;
}
int x = i & 3;
uint v = row.x;
if (x == 1) {
v = row.y;
}
if (x == 2) {
v = row.z;
}
if (x == 3) {
v = row.w;
}
return uint4(v & uint(255), (v >> uint(8)) & uint(255), (v >> uint(16)) & uint(255), v >> uint(24));
}
float4 to_float4(uint4 p) {
return float4(float(p.x), float(p.y), float(p.z), float(p.w));
}
// find_optimal_solution: 7-bit endpoint with a p-bit, returns the 8-bit value (endpoint << 1 | p)
int quantize(float x, int p) {
int v = int((x * 255.0 - float(p)) / 2.0 + 0.5) * 2 + p;
if (v < p) {
v = p;
}
if (v > 254 + p) {
v = 254 + p;
}
return v;
}
float quantize_error(float4 x, int p, bool has_alpha) {
float d = float(quantize(x.x, p)) - x.x * 255.0;
float err = d * d;
d = float(quantize(x.y, p)) - x.y * 255.0;
err = err + d * d;
d = float(quantize(x.z, p)) - x.z * 255.0;
err = err + d * d;
if (has_alpha) {
d = float(quantize(x.w, p)) - x.w * 255.0;
err = err + d * d;
}
return err;
}
int best_pbit(float4 x, bool has_alpha) {
if (quantize_error(x, 1, has_alpha) < quantize_error(x, 0, has_alpha)) {
return 1;
}
return 0;
}
int interpolate(int a, int b, int j) {
int w = (j * 64 + 7) / 15; // 0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64
return (a * (64 - w) + b * w + 32) >> 6;
}
uint selector(uint lo, uint hi, int i) {
if (i < 8) {
return (lo >> uint(i * 4)) & uint(15);
}
return (hi >> uint((i - 8) * 4)) & uint(15);
}
// Part of a bit field at bit offset ofs that lands in 32-bit word
uint bits_in_word(uint val, int ofs, int word) {
int shift = ofs - word * 32;
if (shift >= 0 && shift < 32) {
return val << uint(shift);
}
if (shift < 0 && shift > -32) {
return val >> uint(0 - shift);
}
return uint(0);
}
#[compute, threads(64, 1, 1)]
void bc7_encode() {
uint3 id = dispatch_thread_id();
uint bx = id.x;
uint by = id.y;
if (bx >= uint(constant_buffer.size.z) || by >= uint(constant_buffer.size.w)) {
return;
}
uint4 r0 = load_row(bx, by, 0);
uint4 r1 = load_row(bx, by, 1);
uint4 r2 = load_row(bx, by, 2);
uint4 r3 = load_row(bx, by, 3);
bool has_alpha = false;
float4 mean_sum = float4(0.0, 0.0, 0.0, 0.0);
for (int i = 0; i < 16; i += 1) {
uint4 p = pixel(r0, r1, r2, r3, i);
if (p.w < uint(255)) {
has_alpha = true;
}
mean_sum = mean_sum + to_float4(p);
}
// Mean color and principal axis (color_cell_compression)
float4 mean_scaled = mean_sum * 0.0625;
float4 mean_color = clamp(mean_sum * 0.00024509803921568627, float4(0.0, 0.0, 0.0, 0.0), float4(1.0, 1.0, 1.0, 1.0)); // 1 / (16 * 255)
float4 axis = float4(0.0, 0.0, 0.0, 0.0);
if (has_alpha) {
// Incremental PCA
for (int i = 0; i < 16; i += 1) {
float4 color = to_float4(pixel(r0, r1, r2, r3, i)) - mean_scaled;
float4 n = axis;
if (i == 0) {
n = color;
}
float s = n.x * n.x + n.y * n.y + n.z * n.z + n.w * n.w;
if (s != 0.0) {
n = n * (1.0 / sqrt(s));
}
float4 a = color * color.x;
float4 b = color * color.y;
float4 c = color * color.z;
float4 d = color * color.w;
axis.x = axis.x + (a.x * n.x + a.y * n.y + a.z * n.z + a.w * n.w);
axis.y = axis.y + (b.x * n.x + b.y * n.y + b.z * n.z + b.w * n.w);
axis.z = axis.z + (c.x * n.x + c.y * n.y + c.z * n.z + c.w * n.w);
axis.w = axis.w + (d.x * n.x + d.y * n.y + d.z * n.z + d.w * n.w);
}
float s = axis.x * axis.x + axis.y * axis.y + axis.z * axis.z + axis.w * axis.w;
if (s != 0.0) {
axis = axis * (1.0 / sqrt(s));
}
}
else {
// Covariance, summed in 4 lanes like the simd path: (lane0 + lane1) + (lane2 + lane3)
float4 c0 = float4(0.0, 0.0, 0.0, 0.0);
float4 c1 = float4(0.0, 0.0, 0.0, 0.0);
float4 c2 = float4(0.0, 0.0, 0.0, 0.0);
float4 c3 = float4(0.0, 0.0, 0.0, 0.0);
float4 c4 = float4(0.0, 0.0, 0.0, 0.0);
float4 c5 = float4(0.0, 0.0, 0.0, 0.0);
for (int i = 0; i < 16; i += 4) {
float4 p0 = to_float4(pixel(r0, r1, r2, r3, i));
float4 p1 = to_float4(pixel(r0, r1, r2, r3, i + 1));
float4 p2 = to_float4(pixel(r0, r1, r2, r3, i + 2));
float4 p3 = to_float4(pixel(r0, r1, r2, r3, i + 3));
float4 r = float4(p0.x, p1.x, p2.x, p3.x) - float4(mean_scaled.x, mean_scaled.x, mean_scaled.x, mean_scaled.x);
float4 g = float4(p0.y, p1.y, p2.y, p3.y) - float4(mean_scaled.y, mean_scaled.y, mean_scaled.y, mean_scaled.y);
float4 b = float4(p0.z, p1.z, p2.z, p3.z) - float4(mean_scaled.z, mean_scaled.z, mean_scaled.z, mean_scaled.z);
c0 = c0 + r * r;
c1 = c1 + r * g;
c2 = c2 + r * b;
c3 = c3 + g * g;
c4 = c4 + g * b;
c5 = c5 + b * b;
}
float cov0 = (c0.x + c0.y) + (c0.z + c0.w);
float cov1 = (c1.x + c1.y) + (c1.z + c1.w);
float cov2 = (c2.x + c2.y) + (c2.z + c2.w);
float cov3 = (c3.x + c3.y) + (c3.z + c3.w);
float cov4 = (c4.x + c4.y) + (c4.z + c4.w);
float cov5 = (c5.x + c5.y) + (c5.z + c5.w);
float vfr = 0.9;
float vfg = 1.0;
float vfb = 0.7;
for (int iter = 0; iter < 3; iter += 1) {
float r = vfr * cov0 + vfg * cov1 + vfb * cov2;
float g = vfr * cov1 + vfg * cov3 + vfb * cov4;
float b = vfr * cov2 + vfg * cov4 + vfb * cov5;
float m = max(max(abs(r), abs(g)), abs(b));
if (m > 0.0000000001) {
m = 1.0 / m;
r = r * m;
g = g * m;
b = b * m;
}
vfr = r;
vfg = g;
vfb = b;
}
float len = vfr * vfr + vfg * vfg + vfb * vfb;
if (len >= 0.0000000001) {
len = 1.0 / sqrt(len);
axis = float4(vfr * len, vfg * len, vfb * len, 0.0);
}
}
if (axis.x * axis.x + axis.y * axis.y + axis.z * axis.z + axis.w * axis.w < 0.5) {
axis = float4(0.213, 0.715, 0.072, 0.0);
if (has_alpha) {
axis.w = 0.715;
}
float s = axis.x * axis.x + axis.y * axis.y + axis.z * axis.z + axis.w * axis.w;
axis = axis * (1.0 / sqrt(s));
}
float l = 1000000000.0;
float h = -1000000000.0;
for (int i = 0; i < 16; i += 1) {
float4 q = to_float4(pixel(r0, r1, r2, r3, i)) - mean_scaled;
float d = q.x * axis.x + q.y * axis.y + q.z * axis.z;
if (has_alpha) {
d = d + q.w * axis.w;
}
l = min(l, d);
h = max(h, d);
}
l = l * 0.00392156862745098; // 1 / 255
h = h * 0.00392156862745098;
float4 zero = float4(0.0, 0.0, 0.0, 0.0);
float4 one = float4(1.0, 1.0, 1.0, 1.0);
float4 min_color = clamp(mean_color + axis * l, zero, one);
float4 max_color = clamp(mean_color + axis * h, zero, one);
if (min_color.x + min_color.y + min_color.z + min_color.w > max_color.x + max_color.y + max_color.z + max_color.w) {
float4 t = min_color;
min_color = max_color;
max_color = t;
}
int pbit0 = best_pbit(min_color, has_alpha);
int pbit1 = best_pbit(max_color, has_alpha);
int lo_r = quantize(min_color.x, pbit0);
int lo_g = quantize(min_color.y, pbit0);
int lo_b = quantize(min_color.z, pbit0);
int lo_a = quantize(min_color.w, pbit0);
int hi_r = quantize(max_color.x, pbit1);
int hi_g = quantize(max_color.y, pbit1);
int hi_b = quantize(max_color.z, pbit1);
int hi_a = quantize(max_color.w, pbit1);
// evaluate_solution: 16 interpolated colors, pick the closest per pixel
uint sel_lo = uint(0);
uint sel_hi = uint(0);
for (int i = 0; i < 16; i += 1) {
uint4 p = pixel(r0, r1, r2, r3, i);
int pix_lum = int(p.x) * 109 + int(p.y) * 366 + int(p.z) * 37;
float pix_l = float(pix_lum);
float pix_cr = float(int(p.x) * 512 - pix_lum);
float pix_cb = float(int(p.z) * 512 - pix_lum);
float pix_a = float(p.w);
float best_err = 1000000000000000000000000000000.0;
int best_sel = 0;
for (int j = 0; j < 16; j += 1) {
int r = interpolate(lo_r, hi_r, j);
int g = interpolate(lo_g, hi_g, j);
int b = interpolate(lo_b, hi_b, j);
int lum = r * 109 + g * 366 + b * 37;
float dr = (float(lum) - pix_l) * 0.00390625;
float dg = (float(r * 512 - lum) - pix_cr) * 0.00390625;
float db = (float(b * 512 - lum) - pix_cb) * 0.00390625;
float err = 512.0 * (dr * dr);
err = err + 103.0 * (dg * dg);
err = err + 18.0 * (db * db);
if (has_alpha) {
float da = float(interpolate(lo_a, hi_a, j)) - pix_a;
err = err + 128.0 * (da * da);
}
if (err < best_err) {
best_err = err;
best_sel = j;
}
}
if (i < 8) {
sel_lo = sel_lo | (uint(best_sel) << uint(i * 4));
}
else {
sel_hi = sel_hi | (uint(best_sel) << uint((i - 8) * 4));
}
}
// encode_bc7_block: the anchor selector must have its high bit clear
int e_lo_r = lo_r >> 1;
int e_lo_g = lo_g >> 1;
int e_lo_b = lo_b >> 1;
int e_lo_a = lo_a >> 1;
int e_hi_r = hi_r >> 1;
int e_hi_g = hi_g >> 1;
int e_hi_b = hi_b >> 1;
int e_hi_a = hi_a >> 1;
if ((sel_lo & uint(8)) != uint(0)) {
uint all_ones = uint(65535) | (uint(65535) << uint(16));
sel_lo = sel_lo ^ all_ones;
sel_hi = sel_hi ^ all_ones;
e_lo_r = hi_r >> 1;
e_lo_g = hi_g >> 1;
e_lo_b = hi_b >> 1;
e_lo_a = hi_a >> 1;
e_hi_r = lo_r >> 1;
e_hi_g = lo_g >> 1;
e_hi_b = lo_b >> 1;
e_hi_a = lo_a >> 1;
int t = pbit0;
pbit0 = pbit1;
pbit1 = t;
}
// Mode 6 layout: mode bit 6, r g b a endpoint pairs (7 bits), p-bits, 3-bit anchor index, 15 4-bit indices
uint block_index = by * uint(constant_buffer.size.z) + bx;
for (int w = 0; w < 4; w += 1) {
uint word = bits_in_word(uint(64), 0, w);
word = word | bits_in_word(uint(e_lo_r), 7, w);
word = word | bits_in_word(uint(e_hi_r), 14, w);
word = word | bits_in_word(uint(e_lo_g), 21, w);
word = word | bits_in_word(uint(e_hi_g), 28, w);
word = word | bits_in_word(uint(e_lo_b), 35, w);
word = word | bits_in_word(uint(e_hi_b), 42, w);
word = word | bits_in_word(uint(e_lo_a), 49, w);
word = word | bits_in_word(uint(e_hi_a), 56, w);
word = word | bits_in_word(uint(pbit0), 63, w);
word = word | bits_in_word(uint(pbit1), 64, w);
word = word | bits_in_word(sel_lo & uint(7), 65, w);
for (int i = 1; i < 16; i += 1) {
word = word | bits_in_word(selector(sel_lo, sel_hi, i), 68 + (i - 1) * 4, w);
}
dst[block_index * uint(4) + uint(w)] = word;
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff