From 57b27c1556564128ea4151910c88094892961119 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Thu, 6 Feb 2025 10:08:46 +0100 Subject: [PATCH] Reproduce GPU hang. --- tests/d3d12_sparse.c | 2 +- tests/shaders/sparse/headers/update_tile_mappings.h | 8 ++++---- tests/shaders/sparse/update_tile_mappings.cs_5_0.hlsl | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/d3d12_sparse.c b/tests/d3d12_sparse.c index c3cdd8dbbe..eac9f48eaa 100644 --- a/tests/d3d12_sparse.c +++ b/tests/d3d12_sparse.c @@ -473,7 +473,7 @@ void test_update_tile_mappings_remap_stress(void) ID3D12Resource_GetGPUVirtualAddress(resource) + OFFSET_INTO_PAGE); ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(context.list, 1, ID3D12Resource_GetGPUVirtualAddress(output_resource)); - ID3D12GraphicsCommandList_Dispatch(context.list, 1, 1, 1); + ID3D12GraphicsCommandList_Dispatch(context.list, 64, 1, 1); transition_resource_state(context.list, output_resource, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); get_buffer_readback_with_command_list(output_resource, DXGI_FORMAT_R32_UINT, &rb, context.queue, context.list); diff --git a/tests/shaders/sparse/headers/update_tile_mappings.h b/tests/shaders/sparse/headers/update_tile_mappings.h index 8c183f6d85..bfdaf8b41c 100644 --- a/tests/shaders/sparse/headers/update_tile_mappings.h +++ b/tests/shaders/sparse/headers/update_tile_mappings.h @@ -1,13 +1,13 @@ static const DWORD update_tile_mappings_code_dxbc[] = { - 0x43425844, 0xa8625c41, 0xfd85df89, 0xcedb7945, 0x0e3444ea, 0x00000001, 0x00000108, 0x00000003, + 0x43425844, 0x37ca9b62, 0x19067318, 0xe3db2632, 0x5a979287, 0x00000001, 0x00000108, 0x00000003, 0x0000002c, 0x0000003c, 0x0000004c, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f, 0x00000008, 0x00000000, 0x00000008, 0x58454853, 0x000000b4, 0x00050050, 0x0000002d, 0x0100086a, 0x040000a2, 0x00107000, 0x00000000, 0x00000004, 0x0400009e, 0x0011e000, 0x00000000, 0x00000004, - 0x0200005f, 0x00020012, 0x02000068, 0x00000001, 0x0400009b, 0x00000040, 0x00000001, 0x00000001, - 0x06000029, 0x00100012, 0x00000000, 0x0002000a, 0x00004001, 0x0000000e, 0x8b0000a7, 0x80002302, + 0x0200005f, 0x00021012, 0x02000068, 0x00000001, 0x0400009b, 0x00000001, 0x00000001, 0x00000001, + 0x06000029, 0x00100012, 0x00000000, 0x0002100a, 0x00004001, 0x0000000e, 0x8b0000a7, 0x80002302, 0x00199983, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x00000000, 0x00107006, - 0x00000000, 0x080000a8, 0x0011e012, 0x00000000, 0x0002000a, 0x00004001, 0x00000000, 0x0010000a, + 0x00000000, 0x080000a8, 0x0011e012, 0x00000000, 0x0002100a, 0x00004001, 0x00000000, 0x0010000a, 0x00000000, 0x0100003e, }; #ifdef __GNUC__ diff --git a/tests/shaders/sparse/update_tile_mappings.cs_5_0.hlsl b/tests/shaders/sparse/update_tile_mappings.cs_5_0.hlsl index bf53ef019e..dcfdc14c7f 100644 --- a/tests/shaders/sparse/update_tile_mappings.cs_5_0.hlsl +++ b/tests/shaders/sparse/update_tile_mappings.cs_5_0.hlsl @@ -1,8 +1,8 @@ StructuredBuffer tiled_buffer : register(t0); RWStructuredBuffer out_buffer : register(u0); -[numthreads(64, 1, 1)] -void main(uint3 thread_id : SV_DispatchThreadID) +[numthreads(1, 1, 1)] +void main(uint3 group_id : SV_GroupID) { - out_buffer[thread_id.x] = tiled_buffer[16384 * thread_id.x]; -} \ No newline at end of file + out_buffer[group_id.x] = tiled_buffer[16384 * group_id.x]; +}