mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
test(shader): order the contended LDS 64-bit atomics with barriers
On a device whose subgroups are narrower than the wave, the recompiled wave runs as several subgroups, so one subgroup's zeroing write could land after another's atomics, and a read could run before another subgroup's atomics. An s_barrier after the zeroing writes and another after the atomics order them on any subgroup width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ constexpr std::uint32_t ReturningOperations = 18;
|
||||
alignas(256) std::array<std::uint32_t, Threads * Inputs> Input{};
|
||||
alignas(256) std::array<std::uint32_t, Threads * Results> Output{};
|
||||
|
||||
alignas(256) constexpr std::array<std::uint32_t, 473> Code{
|
||||
alignas(256) constexpr std::array<std::uint32_t, 475> Code{
|
||||
0x34020085, 0x34060089, 0x34040083, 0x7ef80280, 0x7efa0280, 0x7efc0280, 0xe0301000, 0x80000401,
|
||||
0xe0301004, 0x80000501, 0xe0301008, 0x80000601, 0xe030100c, 0x80000701, 0xe0301010, 0x80000801,
|
||||
0xe0301014, 0x80000901, 0xbf8c3f70, 0xd9340000, 0x00000402, 0xd9340100, 0x00000402, 0xd9340200,
|
||||
@@ -35,55 +35,55 @@ alignas(256) constexpr std::array<std::uint32_t, 473> Code{
|
||||
0x00000402, 0xd9341700, 0x00000402, 0xd9341800, 0x00000402, 0xd9341900, 0x00000402, 0xd9341a00,
|
||||
0x00000402, 0xd9341b00, 0x00000402, 0xd9341c00, 0x00000402, 0xd9341d00, 0x00000402, 0xd9341e00,
|
||||
0x00000402, 0xd9341f00, 0x00000402, 0xd9342000, 0x00000402, 0xd9342100, 0x00000402, 0xd9342200,
|
||||
0x00000402, 0xd9342300, 0x00007c7e, 0xd9342308, 0x00007c7e, 0xbf8cc07f, 0xd9000000, 0x00000602,
|
||||
0xd9040100, 0x00000602, 0xd9080200, 0x00000602, 0xd90c0300, 0x00000602, 0xd9100400, 0x00000602,
|
||||
0xd9140500, 0x00000602, 0xd9180600, 0x00000602, 0xd91c0700, 0x00000602, 0xd9200800, 0x00000602,
|
||||
0xd9240900, 0x00000602, 0xd9280a00, 0x00000602, 0xd92c0b00, 0x00000602, 0xd9300c00, 0x00080602,
|
||||
0xd9400d00, 0x00080602, 0xd9440e00, 0x00080602, 0xd9480f00, 0x00000602, 0xd94c1000, 0x00000602,
|
||||
0xd9801100, 0x0a000602, 0xd9841200, 0x0c000602, 0xd9881300, 0x0e000602, 0xd98c1400, 0x10000602,
|
||||
0xd9901500, 0x12000602, 0xd9941600, 0x14000602, 0xd9981700, 0x16000602, 0xd99c1800, 0x18000602,
|
||||
0xd9a01900, 0x1a000602, 0xd9a41a00, 0x1c000602, 0xd9a81b00, 0x1e000602, 0xd9ac1c00, 0x20000602,
|
||||
0xd9b01d00, 0x22080602, 0xd9b41e00, 0x24000602, 0xd9c01f00, 0x26080602, 0xd9c42000, 0x28080602,
|
||||
0xd9c82100, 0x2a000602, 0xd9cc2200, 0x2c000602, 0xd9802300, 0x2e00067e, 0xd9a02308, 0x3000087e,
|
||||
0xbf8cc07f, 0xd9d80000, 0x32000002, 0xd9d80100, 0x34000002, 0xd9d80200, 0x36000002, 0xd9d80300,
|
||||
0x38000002, 0xd9d80400, 0x3a000002, 0xd9d80500, 0x3c000002, 0xd9d80600, 0x3e000002, 0xd9d80700,
|
||||
0x40000002, 0xd9d80800, 0x42000002, 0xd9d80900, 0x44000002, 0xd9d80a00, 0x46000002, 0xd9d80b00,
|
||||
0x48000002, 0xd9d80c00, 0x4a000002, 0xd9d80d00, 0x4c000002, 0xd9d80e00, 0x4e000002, 0xd9d80f00,
|
||||
0x50000002, 0xd9d81000, 0x52000002, 0xd9d81100, 0x54000002, 0xd9d81200, 0x56000002, 0xd9d81300,
|
||||
0x58000002, 0xd9d81400, 0x5a000002, 0xd9d81500, 0x5c000002, 0xd9d81600, 0x5e000002, 0xd9d81700,
|
||||
0x60000002, 0xd9d81800, 0x62000002, 0xd9d81900, 0x64000002, 0xd9d81a00, 0x66000002, 0xd9d81b00,
|
||||
0x68000002, 0xd9d81c00, 0x6a000002, 0xd9d81d00, 0x6c000002, 0xd9d81e00, 0x6e000002, 0xd9d81f00,
|
||||
0x70000002, 0xd9d82000, 0x72000002, 0xd9d82100, 0x74000002, 0xd9d82200, 0x76000002, 0xd9d82300,
|
||||
0x7800007e, 0xd9d82308, 0x7a00007e, 0xbf8cc07f, 0xe0701000, 0x80013203, 0xe0701004, 0x80013303,
|
||||
0xe0701008, 0x80013403, 0xe070100c, 0x80013503, 0xe0701010, 0x80013603, 0xe0701014, 0x80013703,
|
||||
0xe0701018, 0x80013803, 0xe070101c, 0x80013903, 0xe0701020, 0x80013a03, 0xe0701024, 0x80013b03,
|
||||
0xe0701028, 0x80013c03, 0xe070102c, 0x80013d03, 0xe0701030, 0x80013e03, 0xe0701034, 0x80013f03,
|
||||
0xe0701038, 0x80014003, 0xe070103c, 0x80014103, 0xe0701040, 0x80014203, 0xe0701044, 0x80014303,
|
||||
0xe0701048, 0x80014403, 0xe070104c, 0x80014503, 0xe0701050, 0x80014603, 0xe0701054, 0x80014703,
|
||||
0xe0701058, 0x80014803, 0xe070105c, 0x80014903, 0xe0701060, 0x80014a03, 0xe0701064, 0x80014b03,
|
||||
0xe0701068, 0x80014c03, 0xe070106c, 0x80014d03, 0xe0701070, 0x80014e03, 0xe0701074, 0x80014f03,
|
||||
0xe0701078, 0x80015003, 0xe070107c, 0x80015103, 0xe0701080, 0x80015203, 0xe0701084, 0x80015303,
|
||||
0xe0701088, 0x80015403, 0xe070108c, 0x80015503, 0xe0701090, 0x80015603, 0xe0701094, 0x80015703,
|
||||
0xe0701098, 0x80015803, 0xe070109c, 0x80015903, 0xe07010a0, 0x80015a03, 0xe07010a4, 0x80015b03,
|
||||
0xe07010a8, 0x80015c03, 0xe07010ac, 0x80015d03, 0xe07010b0, 0x80015e03, 0xe07010b4, 0x80015f03,
|
||||
0xe07010b8, 0x80016003, 0xe07010bc, 0x80016103, 0xe07010c0, 0x80016203, 0xe07010c4, 0x80016303,
|
||||
0xe07010c8, 0x80016403, 0xe07010cc, 0x80016503, 0xe07010d0, 0x80016603, 0xe07010d4, 0x80016703,
|
||||
0xe07010d8, 0x80016803, 0xe07010dc, 0x80016903, 0xe07010e0, 0x80016a03, 0xe07010e4, 0x80016b03,
|
||||
0xe07010e8, 0x80016c03, 0xe07010ec, 0x80016d03, 0xe07010f0, 0x80016e03, 0xe07010f4, 0x80016f03,
|
||||
0xe07010f8, 0x80017003, 0xe07010fc, 0x80017103, 0xe0701100, 0x80017203, 0xe0701104, 0x80017303,
|
||||
0xe0701108, 0x80017403, 0xe070110c, 0x80017503, 0xe0701110, 0x80017603, 0xe0701114, 0x80017703,
|
||||
0xe0701118, 0x80017803, 0xe070111c, 0x80017903, 0xe0701120, 0x80017a03, 0xe0701124, 0x80017b03,
|
||||
0xe0701128, 0x80010a03, 0xe070112c, 0x80010b03, 0xe0701130, 0x80010c03, 0xe0701134, 0x80010d03,
|
||||
0xe0701138, 0x80010e03, 0xe070113c, 0x80010f03, 0xe0701140, 0x80011003, 0xe0701144, 0x80011103,
|
||||
0xe0701148, 0x80011203, 0xe070114c, 0x80011303, 0xe0701150, 0x80011403, 0xe0701154, 0x80011503,
|
||||
0xe0701158, 0x80011603, 0xe070115c, 0x80011703, 0xe0701160, 0x80011803, 0xe0701164, 0x80011903,
|
||||
0xe0701168, 0x80011a03, 0xe070116c, 0x80011b03, 0xe0701170, 0x80011c03, 0xe0701174, 0x80011d03,
|
||||
0xe0701178, 0x80011e03, 0xe070117c, 0x80011f03, 0xe0701180, 0x80012003, 0xe0701184, 0x80012103,
|
||||
0xe0701188, 0x80012203, 0xe070118c, 0x80012303, 0xe0701190, 0x80012403, 0xe0701194, 0x80012503,
|
||||
0xe0701198, 0x80012603, 0xe070119c, 0x80012703, 0xe07011a0, 0x80012803, 0xe07011a4, 0x80012903,
|
||||
0xe07011a8, 0x80012a03, 0xe07011ac, 0x80012b03, 0xe07011b0, 0x80012c03, 0xe07011b4, 0x80012d03,
|
||||
0xe07011b8, 0x80012e03, 0xe07011bc, 0x80012f03, 0xe07011c0, 0x80013003, 0xe07011c4, 0x80013103,
|
||||
0xbf810000,
|
||||
0x00000402, 0xd9342300, 0x00007c7e, 0xd9342308, 0x00007c7e, 0xbf8cc07f, 0xbf8a0000, 0xd9000000,
|
||||
0x00000602, 0xd9040100, 0x00000602, 0xd9080200, 0x00000602, 0xd90c0300, 0x00000602, 0xd9100400,
|
||||
0x00000602, 0xd9140500, 0x00000602, 0xd9180600, 0x00000602, 0xd91c0700, 0x00000602, 0xd9200800,
|
||||
0x00000602, 0xd9240900, 0x00000602, 0xd9280a00, 0x00000602, 0xd92c0b00, 0x00000602, 0xd9300c00,
|
||||
0x00080602, 0xd9400d00, 0x00080602, 0xd9440e00, 0x00080602, 0xd9480f00, 0x00000602, 0xd94c1000,
|
||||
0x00000602, 0xd9801100, 0x0a000602, 0xd9841200, 0x0c000602, 0xd9881300, 0x0e000602, 0xd98c1400,
|
||||
0x10000602, 0xd9901500, 0x12000602, 0xd9941600, 0x14000602, 0xd9981700, 0x16000602, 0xd99c1800,
|
||||
0x18000602, 0xd9a01900, 0x1a000602, 0xd9a41a00, 0x1c000602, 0xd9a81b00, 0x1e000602, 0xd9ac1c00,
|
||||
0x20000602, 0xd9b01d00, 0x22080602, 0xd9b41e00, 0x24000602, 0xd9c01f00, 0x26080602, 0xd9c42000,
|
||||
0x28080602, 0xd9c82100, 0x2a000602, 0xd9cc2200, 0x2c000602, 0xd9802300, 0x2e00067e, 0xd9a02308,
|
||||
0x3000087e, 0xbf8cc07f, 0xbf8a0000, 0xd9d80000, 0x32000002, 0xd9d80100, 0x34000002, 0xd9d80200,
|
||||
0x36000002, 0xd9d80300, 0x38000002, 0xd9d80400, 0x3a000002, 0xd9d80500, 0x3c000002, 0xd9d80600,
|
||||
0x3e000002, 0xd9d80700, 0x40000002, 0xd9d80800, 0x42000002, 0xd9d80900, 0x44000002, 0xd9d80a00,
|
||||
0x46000002, 0xd9d80b00, 0x48000002, 0xd9d80c00, 0x4a000002, 0xd9d80d00, 0x4c000002, 0xd9d80e00,
|
||||
0x4e000002, 0xd9d80f00, 0x50000002, 0xd9d81000, 0x52000002, 0xd9d81100, 0x54000002, 0xd9d81200,
|
||||
0x56000002, 0xd9d81300, 0x58000002, 0xd9d81400, 0x5a000002, 0xd9d81500, 0x5c000002, 0xd9d81600,
|
||||
0x5e000002, 0xd9d81700, 0x60000002, 0xd9d81800, 0x62000002, 0xd9d81900, 0x64000002, 0xd9d81a00,
|
||||
0x66000002, 0xd9d81b00, 0x68000002, 0xd9d81c00, 0x6a000002, 0xd9d81d00, 0x6c000002, 0xd9d81e00,
|
||||
0x6e000002, 0xd9d81f00, 0x70000002, 0xd9d82000, 0x72000002, 0xd9d82100, 0x74000002, 0xd9d82200,
|
||||
0x76000002, 0xd9d82300, 0x7800007e, 0xd9d82308, 0x7a00007e, 0xbf8cc07f, 0xe0701000, 0x80013203,
|
||||
0xe0701004, 0x80013303, 0xe0701008, 0x80013403, 0xe070100c, 0x80013503, 0xe0701010, 0x80013603,
|
||||
0xe0701014, 0x80013703, 0xe0701018, 0x80013803, 0xe070101c, 0x80013903, 0xe0701020, 0x80013a03,
|
||||
0xe0701024, 0x80013b03, 0xe0701028, 0x80013c03, 0xe070102c, 0x80013d03, 0xe0701030, 0x80013e03,
|
||||
0xe0701034, 0x80013f03, 0xe0701038, 0x80014003, 0xe070103c, 0x80014103, 0xe0701040, 0x80014203,
|
||||
0xe0701044, 0x80014303, 0xe0701048, 0x80014403, 0xe070104c, 0x80014503, 0xe0701050, 0x80014603,
|
||||
0xe0701054, 0x80014703, 0xe0701058, 0x80014803, 0xe070105c, 0x80014903, 0xe0701060, 0x80014a03,
|
||||
0xe0701064, 0x80014b03, 0xe0701068, 0x80014c03, 0xe070106c, 0x80014d03, 0xe0701070, 0x80014e03,
|
||||
0xe0701074, 0x80014f03, 0xe0701078, 0x80015003, 0xe070107c, 0x80015103, 0xe0701080, 0x80015203,
|
||||
0xe0701084, 0x80015303, 0xe0701088, 0x80015403, 0xe070108c, 0x80015503, 0xe0701090, 0x80015603,
|
||||
0xe0701094, 0x80015703, 0xe0701098, 0x80015803, 0xe070109c, 0x80015903, 0xe07010a0, 0x80015a03,
|
||||
0xe07010a4, 0x80015b03, 0xe07010a8, 0x80015c03, 0xe07010ac, 0x80015d03, 0xe07010b0, 0x80015e03,
|
||||
0xe07010b4, 0x80015f03, 0xe07010b8, 0x80016003, 0xe07010bc, 0x80016103, 0xe07010c0, 0x80016203,
|
||||
0xe07010c4, 0x80016303, 0xe07010c8, 0x80016403, 0xe07010cc, 0x80016503, 0xe07010d0, 0x80016603,
|
||||
0xe07010d4, 0x80016703, 0xe07010d8, 0x80016803, 0xe07010dc, 0x80016903, 0xe07010e0, 0x80016a03,
|
||||
0xe07010e4, 0x80016b03, 0xe07010e8, 0x80016c03, 0xe07010ec, 0x80016d03, 0xe07010f0, 0x80016e03,
|
||||
0xe07010f4, 0x80016f03, 0xe07010f8, 0x80017003, 0xe07010fc, 0x80017103, 0xe0701100, 0x80017203,
|
||||
0xe0701104, 0x80017303, 0xe0701108, 0x80017403, 0xe070110c, 0x80017503, 0xe0701110, 0x80017603,
|
||||
0xe0701114, 0x80017703, 0xe0701118, 0x80017803, 0xe070111c, 0x80017903, 0xe0701120, 0x80017a03,
|
||||
0xe0701124, 0x80017b03, 0xe0701128, 0x80010a03, 0xe070112c, 0x80010b03, 0xe0701130, 0x80010c03,
|
||||
0xe0701134, 0x80010d03, 0xe0701138, 0x80010e03, 0xe070113c, 0x80010f03, 0xe0701140, 0x80011003,
|
||||
0xe0701144, 0x80011103, 0xe0701148, 0x80011203, 0xe070114c, 0x80011303, 0xe0701150, 0x80011403,
|
||||
0xe0701154, 0x80011503, 0xe0701158, 0x80011603, 0xe070115c, 0x80011703, 0xe0701160, 0x80011803,
|
||||
0xe0701164, 0x80011903, 0xe0701168, 0x80011a03, 0xe070116c, 0x80011b03, 0xe0701170, 0x80011c03,
|
||||
0xe0701174, 0x80011d03, 0xe0701178, 0x80011e03, 0xe070117c, 0x80011f03, 0xe0701180, 0x80012003,
|
||||
0xe0701184, 0x80012103, 0xe0701188, 0x80012203, 0xe070118c, 0x80012303, 0xe0701190, 0x80012403,
|
||||
0xe0701194, 0x80012503, 0xe0701198, 0x80012603, 0xe070119c, 0x80012703, 0xe07011a0, 0x80012803,
|
||||
0xe07011a4, 0x80012903, 0xe07011a8, 0x80012a03, 0xe07011ac, 0x80012b03, 0xe07011b0, 0x80012c03,
|
||||
0xe07011b4, 0x80012d03, 0xe07011b8, 0x80012e03, 0xe07011bc, 0x80012f03, 0xe07011c0, 0x80013003,
|
||||
0xe07011c4, 0x80013103, 0xbf810000,
|
||||
};
|
||||
|
||||
constexpr std::uint64_t Sign = 0x8000000000000000ull;
|
||||
|
||||
Reference in New Issue
Block a user