diff --git a/tests/d3d12_sm_advanced.c b/tests/d3d12_sm_advanced.c index a61a5211..77db36e7 100644 --- a/tests/d3d12_sm_advanced.c +++ b/tests/d3d12_sm_advanced.c @@ -22,6 +22,652 @@ #define VKD3D_DBG_CHANNEL VKD3D_DBG_CHANNEL_API #include "d3d12_crosstest.h" +static void run_64bit_atomics_test(struct test_context *context, + D3D12_SHADER_BYTECODE cs, + bool use_heap, bool use_typed) +{ + static const uint64_t inputs[] = { 1ull << 40, 3ull << 31, 3ull << 29, 1ull << 63 }; + D3D12_ROOT_SIGNATURE_DESC root_signature_desc; + D3D12_DESCRIPTOR_RANGE descriptor_range[2]; + D3D12_UNORDERED_ACCESS_VIEW_DESC uav_desc; + D3D12_SHADER_RESOURCE_VIEW_DESC srv_desc; + D3D12_ROOT_PARAMETER root_parameters[3]; + ID3D12RootSignature *root_signature; + ID3D12Resource *output_texture; + ID3D12Resource *output_buffer; + D3D12_CPU_DESCRIPTOR_HANDLE h; + ID3D12Resource *input_buffer; + uint64_t expected_values[11]; + struct resource_readback rb; + ID3D12DescriptorHeap *heap; + ID3D12PipelineState *pso; + const uint64_t *values; + unsigned int i, j; + + input_buffer = create_upload_buffer(context->device, sizeof(inputs), inputs); + output_buffer = create_default_buffer(context->device, sizeof(expected_values), + D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_UNORDERED_ACCESS); + output_texture = create_default_texture2d(context->device, + ARRAY_SIZE(expected_values), ARRAY_SIZE(expected_values), + 1, 1, DXGI_FORMAT_R32G32_UINT, + D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS, + D3D12_RESOURCE_STATE_UNORDERED_ACCESS); + + expected_values[0] = inputs[0] + inputs[1] + inputs[2] + inputs[3]; + expected_values[1] = ~inputs[0] & ~inputs[1] & ~inputs[2] & ~inputs[3]; + expected_values[2] = inputs[0] | inputs[1] | inputs[2] | inputs[3]; + expected_values[3] = inputs[3]; + expected_values[4] = inputs[2]; + expected_values[5] = inputs[0]; + expected_values[6] = inputs[3]; + expected_values[7] = ~0ull ^ inputs[0] ^ inputs[1] ^ inputs[2] ^ inputs[3]; + + heap = NULL; + + if (use_heap) + { + heap = create_gpu_descriptor_heap(context->device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 3); + memset(&root_signature_desc, 0, sizeof(root_signature_desc)); + memset(root_parameters, 0, sizeof(root_parameters)); + memset(descriptor_range, 0, sizeof(descriptor_range)); + root_signature_desc.NumParameters = 1; + root_signature_desc.pParameters = &root_parameters[0]; + root_parameters[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE; + root_parameters[0].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; + root_parameters[0].DescriptorTable.NumDescriptorRanges = ARRAY_SIZE(descriptor_range); + root_parameters[0].DescriptorTable.pDescriptorRanges = descriptor_range; + descriptor_range[0].RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV; + descriptor_range[0].NumDescriptors = 1; + descriptor_range[1].RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_UAV; + descriptor_range[1].NumDescriptors = 2; + descriptor_range[1].BaseShaderRegister = 0; + descriptor_range[1].OffsetInDescriptorsFromTableStart = 1; + + memset(&srv_desc, 0, sizeof(srv_desc)); + srv_desc.Format = DXGI_FORMAT_UNKNOWN; + srv_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; + srv_desc.ViewDimension = D3D12_SRV_DIMENSION_BUFFER; + srv_desc.Buffer.FirstElement = 0; + srv_desc.Buffer.NumElements = 4; + srv_desc.Buffer.StructureByteStride = 8; + h = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap); + ID3D12Device_CreateShaderResourceView(context->device, input_buffer, &srv_desc, h); + + memset(&uav_desc, 0, sizeof(uav_desc)); + h = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap); + + if (use_typed) + { + uav_desc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE2D; + uav_desc.Format = DXGI_FORMAT_R32G32_UINT; + h.ptr += ID3D12Device_GetDescriptorHandleIncrementSize(context->device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); + ID3D12Device_CreateUnorderedAccessView(context->device, output_texture, NULL, &uav_desc, h); + + uav_desc.ViewDimension = D3D12_UAV_DIMENSION_BUFFER; + memset(&uav_desc.Buffer, 0, sizeof(uav_desc.Buffer)); + uav_desc.Buffer.NumElements = ARRAY_SIZE(expected_values); + h.ptr += ID3D12Device_GetDescriptorHandleIncrementSize(context->device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); + ID3D12Device_CreateUnorderedAccessView(context->device, output_buffer, NULL, &uav_desc, h); + } + else + { + uav_desc.ViewDimension = D3D12_UAV_DIMENSION_BUFFER; + uav_desc.Buffer.FirstElement = 0; + uav_desc.Buffer.NumElements = ARRAY_SIZE(expected_values); + uav_desc.Format = DXGI_FORMAT_UNKNOWN; + uav_desc.Buffer.StructureByteStride = 8; + + h.ptr += ID3D12Device_GetDescriptorHandleIncrementSize(context->device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); + ID3D12Device_CreateUnorderedAccessView(context->device, output_buffer, NULL, &uav_desc, h); + h.ptr += ID3D12Device_GetDescriptorHandleIncrementSize(context->device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); + ID3D12Device_CreateUnorderedAccessView(context->device, output_buffer, NULL, &uav_desc, h); + } + } + else + { + memset(&root_signature_desc, 0, sizeof(root_signature_desc)); + memset(root_parameters, 0, sizeof(root_parameters)); + root_signature_desc.NumParameters = ARRAY_SIZE(root_parameters); + root_signature_desc.pParameters = root_parameters; + root_parameters[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_SRV; + root_parameters[0].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; + root_parameters[1].ParameterType = D3D12_ROOT_PARAMETER_TYPE_UAV; + root_parameters[1].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; + root_parameters[2].ParameterType = D3D12_ROOT_PARAMETER_TYPE_UAV; + root_parameters[2].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; + root_parameters[2].Descriptor.ShaderRegister = 1; + } + + create_root_signature(context->device, &root_signature_desc, &root_signature); + pso = create_compute_pipeline_state(context->device, root_signature, cs); + if (heap) + ID3D12GraphicsCommandList_SetDescriptorHeaps(context->list, 1, &heap); + ID3D12GraphicsCommandList_SetComputeRootSignature(context->list, root_signature); + if (heap) + { + ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(context->list, 0, + ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(heap)); + } + else + { + ID3D12GraphicsCommandList_SetComputeRootShaderResourceView(context->list, 0, + ID3D12Resource_GetGPUVirtualAddress(input_buffer)); + ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(context->list, 1, + ID3D12Resource_GetGPUVirtualAddress(output_buffer)); + ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(context->list, 2, + ID3D12Resource_GetGPUVirtualAddress(output_buffer)); + } + ID3D12GraphicsCommandList_SetPipelineState(context->list, pso); + ID3D12GraphicsCommandList_Dispatch(context->list, 1, 1, 1); + transition_resource_state(context->list, output_buffer, + D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); + get_buffer_readback_with_command_list(output_buffer, 0, &rb, context->queue, context->list); + reset_command_list(context->list, context->allocator); + + values = get_readback_data(&rb, 0, 0, 0, 1); + for (i = 0; i < 8; i++) + { + if (use_typed && i != 5 && i != 6) + continue; + + ok(values[i] == expected_values[i], "Value %u = 0x%"PRIx64", expected 0x%"PRIx64"\n", + i, values[i], expected_values[i]); + } + + /* We're spamming exchanges or compare exchanges. There is only one winner. */ + if (!use_typed) + { + for (i = 8; i < ARRAY_SIZE(expected_values); i++) + { + for (j = 0; j < ARRAY_SIZE(inputs); j++) + if (values[i] == inputs[j]) + break; + + ok(j < ARRAY_SIZE(inputs), "Got value 0x%"PRIx64", but it does not exist in inputs.\n", values[i]); + } + } + + release_resource_readback(&rb); + + if (use_typed) + { + transition_resource_state(context->list, output_texture, + D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); + get_texture_readback_with_command_list(output_texture, 0, &rb, context->queue, context->list); + reset_command_list(context->list, context->allocator); + + for (i = 0; i < 8; i++) + { + if (i == 5 || i == 6) + continue; + values = get_readback_data(&rb, i, i, 0, sizeof(uint64_t)); + ok(*values == expected_values[i], "Value %u = 0x%"PRIx64", expected 0x%"PRIx64"\n", + i, *values, expected_values[i]); + } + + for (i = 8; i < ARRAY_SIZE(expected_values); i++) + { + values = get_readback_data(&rb, i, i, 0, sizeof(uint64_t)); + for (j = 0; j < ARRAY_SIZE(inputs); j++) + if (*values == inputs[j]) + break; + + ok(j < ARRAY_SIZE(inputs), "Got value 0x%"PRIx64", but it does not exist in inputs.\n", *values); + } + release_resource_readback(&rb); + } + + if (heap) + ID3D12DescriptorHeap_Release(heap); + ID3D12Resource_Release(output_texture); + ID3D12Resource_Release(input_buffer); + ID3D12Resource_Release(output_buffer); + ID3D12PipelineState_Release(pso); + ID3D12RootSignature_Release(root_signature); +} + +void test_shader_sm66_64bit_atomics(void) +{ + D3D12_FEATURE_DATA_SHADER_MODEL shader_model; + D3D12_FEATURE_DATA_D3D12_OPTIONS11 options11; + D3D12_FEATURE_DATA_D3D12_OPTIONS1 options1; + D3D12_FEATURE_DATA_D3D12_OPTIONS9 options9; + struct test_context context; + ID3D12Device *device; + HRESULT hr; + + static const BYTE cs_code_64bit_atomic[] = + { +#if 0 + StructuredBuffer RO : register(t0); + RWStructuredBuffer RW : register(u0); + RWStructuredBuffer RWSigned : register(u1); + + [numthreads(4, 1, 1)] + void main(uint thr : SV_DispatchThreadID) + { + if (thr == 0) + { + RW[1] = uint64_t(-1); + RW[4] = uint64_t(-1); + RW[7] = uint64_t(-1); + } + AllMemoryBarrierWithGroupSync(); + + uint64_t v = RO[thr]; + InterlockedAdd(RW[0], v); + InterlockedAnd(RW[1], ~v); + InterlockedOr(RW[2], v); + InterlockedMax(RW[3], v); + InterlockedMin(RW[4], v); + InterlockedMax(RWSigned[5], v); + InterlockedMin(RWSigned[6], v); + InterlockedXor(RW[7], v); + uint64_t old_value; + InterlockedExchange(RW[8], v, old_value); + InterlockedCompareStore(RW[9], 0, v); + InterlockedCompareStore(RW[9], 0, v + 1); + + InterlockedCompareExchange(RW[10], 0, v, old_value); + InterlockedCompareExchange(RW[10], 0, v + 1, old_value); + } +#endif + 0x44, 0x58, 0x42, 0x43, 0x0e, 0x0f, 0x0b, 0x8b, 0x37, 0xac, 0x1d, 0xe5, 0x09, 0x72, 0x31, 0x81, 0x63, 0xd3, 0x82, 0xea, 0x01, 0x00, 0x00, 0x00, 0x68, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x1c, 0x01, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x53, 0x56, 0x30, 0x90, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x50, 0x51, 0x66, 0xc3, 0x15, 0x1f, 0x0f, 0x1f, 0xb8, 0xd7, 0x53, 0x61, 0x8b, 0xe3, 0xe7, 0x44, 0x58, 0x49, 0x4c, + 0x44, 0x09, 0x00, 0x00, 0x66, 0x00, 0x05, 0x00, 0x51, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x06, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2c, 0x09, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, + 0x21, 0x0c, 0x00, 0x00, 0x48, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, + 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, + 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, + 0x51, 0x18, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, + 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x36, 0x18, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x03, 0x48, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, + 0x20, 0x4c, 0x08, 0x86, 0x09, 0x01, 0x01, 0x00, 0x89, 0x20, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, + 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x90, 0xc1, 0x08, 0x40, 0x09, 0x00, 0x0a, 0xe6, 0x08, 0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x0f, 0xea, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xc0, 0x80, 0x1d, 0xde, + 0xc1, 0x1d, 0xce, 0x01, 0x0c, 0xd8, 0xe1, 0x1d, 0xdc, 0xe1, 0x1c, 0xfc, 0x00, 0x05, 0x06, 0x75, 0x33, 0xb1, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x81, 0x2c, 0xdc, 0xc2, 0x2c, + 0xd0, 0x83, 0x3c, 0xd4, 0xc3, 0x38, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0x90, 0x83, 0x28, 0xd4, 0x83, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x03, 0x1f, 0xd4, 0x83, 0x3b, 0xcc, 0x43, 0x3a, 0x9c, 0x83, + 0x3b, 0x94, 0x03, 0x39, 0x80, 0x01, 0x3b, 0xbc, 0x83, 0x3b, 0x9c, 0x03, 0x18, 0xb0, 0xc3, 0x3b, 0xb8, 0xc3, 0x39, 0xf8, 0x01, 0x0a, 0x0c, 0xfa, 0x66, 0x1a, 0x83, 0x71, 0x60, 0x87, 0x70, 0x98, + 0x87, 0x79, 0x70, 0x03, 0x59, 0xb8, 0x85, 0x59, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x71, 0xa0, 0x87, 0x7a, 0x90, 0x87, 0x72, 0x20, 0x07, 0x51, 0xa8, 0x07, 0x73, 0x30, 0x87, 0x72, 0x90, 0x07, 0x3e, + 0x60, 0x87, 0x77, 0x70, 0x87, 0x73, 0x00, 0x03, 0x76, 0x78, 0x07, 0x77, 0x38, 0x07, 0x3f, 0x40, 0x81, 0x41, 0xe1, 0x14, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, + 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, + 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, + 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, + 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, + 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x04, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x14, 0x20, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x60, 0xc8, 0x13, 0x01, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x67, 0x02, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x8f, + 0x05, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1e, 0x0d, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x40, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x4a, 0xa0, 0x18, 0x46, 0x00, 0x0a, 0xa3, 0x20, 0xca, 0xa0, 0x10, 0xc8, 0x28, 0x50, 0x40, 0xc0, + 0x00, 0xca, 0x46, 0x00, 0xc8, 0x9b, 0x01, 0x20, 0x70, 0x06, 0x80, 0xc4, 0x19, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, + 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, + 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x84, 0x21, 0x99, 0x20, 0x0c, 0xca, 0x06, 0x61, 0x20, 0x28, 0x8c, 0xcd, 0x6d, 0x18, 0x0c, 0x82, 0x98, + 0x20, 0x0c, 0xcb, 0x04, 0xc1, 0x93, 0x08, 0x4c, 0x10, 0x06, 0x66, 0x82, 0x30, 0x34, 0x1b, 0x84, 0x81, 0xd9, 0x90, 0x20, 0x89, 0x82, 0x20, 0xc3, 0x82, 0x34, 0x1b, 0x02, 0x67, 0x82, 0x00, 0x06, + 0xd3, 0x04, 0x21, 0x8b, 0x26, 0x08, 0x83, 0xb3, 0x81, 0x18, 0x18, 0x69, 0xd8, 0xb0, 0x20, 0x90, 0x82, 0x20, 0xc3, 0x12, 0x45, 0xd1, 0x34, 0x41, 0x10, 0x03, 0x6a, 0xc3, 0x32, 0x54, 0x0a, 0x32, + 0x0c, 0x4b, 0x14, 0x45, 0xd3, 0x06, 0x81, 0xb2, 0x36, 0x10, 0xcf, 0x05, 0x00, 0x13, 0x04, 0x01, 0x20, 0xd1, 0x16, 0x96, 0xe6, 0x36, 0x41, 0x30, 0xa0, 0x09, 0xc2, 0xf0, 0x6c, 0x18, 0xb8, 0x61, + 0xd8, 0x40, 0x20, 0x1b, 0xd7, 0x6d, 0x28, 0x32, 0x0d, 0xc0, 0xbc, 0x2a, 0x6c, 0x6c, 0x76, 0x6d, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, 0x82, 0xa0, 0x0a, 0x19, 0x9e, 0x8b, 0x5d, 0x99, 0xdc, + 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x80, 0x68, 0x42, 0x86, 0xe7, 0x62, 0x17, 0xc6, 0x66, 0x57, 0x26, 0x37, 0x25, 0x20, 0xea, 0x90, 0xe1, 0xb9, 0xcc, 0xa1, 0x85, 0x91, 0x95, 0xc9, 0x35, 0xbd, 0x91, + 0x95, 0xb1, 0x4d, 0x09, 0x8c, 0x32, 0x64, 0x78, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x82, 0xab, 0x0e, 0x19, 0x9e, 0x4b, 0x99, 0x1b, 0x9d, 0x5c, 0x1e, 0xd4, 0x5b, + 0x9a, 0x1b, 0xdd, 0xdc, 0x94, 0xc0, 0x03, 0x00, 0x79, 0x18, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, + 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, + 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, + 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, + 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, + 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, + 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79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c, 0xbe, 0xf3, 0xf8, 0xc0, 0xe4, 0x30, 0x88, 0xc0, 0x39, 0xcc, 0x03, 0x44, 0x84, 0x77, 0x09, 0x07, 0xd0, 0x18, 0x84, 0x8f, 0xe8, 0xb8, 0x19, 0x34, 0xc3, 0xe5, 0x3b, 0x8f, 0x1f, + 0x00, 0x51, 0x84, 0x10, 0x91, 0x21, 0x74, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x44, 0x04, 0x30, 0x11, 0x21, 0xd0, 0x0c, 0x0b, 0xf1, 0x45, 0x0e, 0xb3, 0x21, 0xcd, 0x80, 0x34, 0x86, 0x0d, 0x5c, 0xc3, + 0xe5, 0x3b, 0x8f, 0x1f, 0x01, 0xd6, 0x46, 0x15, 0x05, 0x11, 0x95, 0x0e, 0x30, 0xf8, 0x88, 0x8e, 0x1b, 0x01, 0x36, 0x5c, 0xbe, 0xf3, 0xf8, 0x11, 0x60, 0x6d, 0x54, 0x51, 0x10, 0x11, 0x3b, 0x39, + 0x11, 0xe1, 0x23, 0x3a, 0x6e, 0x01, 0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x4f, 0x47, 0x44, 0x00, 0x83, 0x38, 0xf8, 0xc8, 0x6d, 0x1b, 0x00, 0xc1, 0x00, 0x48, 0x03, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, + 0xa8, 0x00, 0x00, 0x00, 0x13, 0x04, 0x43, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x34, 0x14, 0xec, 0xc0, 0x0c, 0x40, 0x71, 0x06, 0x94, 0x67, 0x40, 0xc9, 0x0e, 0x14, 0xa6, 0x40, + 0x39, 0x14, 0x41, 0x29, 0x94, 0x44, 0x51, 0x94, 0x6e, 0x40, 0x61, 0x02, 0x15, 0x68, 0x40, 0x59, 0x94, 0xa5, 0x00, 0x19, 0x33, 0x00, 0x35, 0x30, 0x02, 0x50, 0x02, 0x74, 0x94, 0x00, 0x55, 0x73, + 0x08, 0x61, 0xd0, 0xcc, 0x21, 0x30, 0x0d, 0x61, 0x73, 0x10, 0x49, 0xb2, 0xa4, 0xc1, 0x1c, 0xc4, 0xb2, 0x2c, 0x69, 0x30, 0x02, 0x00, 0x00, 0x00, 0x23, 0x06, 0x08, 0x00, 0x82, 0x60, 0xa0, 0x9d, + 0x81, 0x35, 0x98, 0x81, 0x37, 0x62, 0x80, 0x00, 0x20, 0x08, 0x06, 0x1a, 0x1a, 0x5c, 0x43, 0x19, 0x7c, 0x23, 0x06, 0x08, 0x00, 0x82, 0x60, 0xa0, 0xa5, 0x01, 0x36, 0x98, 0x01, 0x18, 0x8c, 0x18, + 0x18, 0x00, 0x08, 0x82, 0x01, 0x11, 0x07, 0xd2, 0x19, 0x0c, 0x37, 0x04, 0x68, 0x00, 0x06, 0xb3, 0x0c, 0x81, 0x10, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x81, 0xd5, 0x06, 0x1f, 0xa1, 0x8c, 0x18, + 0x38, 0x00, 0x08, 0x82, 0xc1, 0x13, 0x07, 0x5b, 0xc0, 0x06, 0x6a, 0xf0, 0x40, 0x10, 0xc4, 0xa0, 0xc1, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x58, 0x6e, 0x00, 0x06, 0xc5, 0x32, 0x62, 0xe0, 0x00, + 0x20, 0x08, 0x06, 0x8f, 0x1c, 0x70, 0xc1, 0x19, 0xac, 0x01, 0x14, 0x45, 0x51, 0x93, 0x06, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x60, 0xbd, 0x41, 0x18, 0x18, 0xcc, 0x88, 0x81, 0x03, 0x80, 0x20, + 0x18, 0x3c, 0x73, 0xd0, 0x05, 0x1c, 0x1b, 0x44, 0x92, 0x24, 0x39, 0x6a, 0x30, 0x4b, 0x20, 0x8c, 0x18, 0x18, 0x00, 0x08, 0x82, 0xc1, 0x14, 0x07, 0x15, 0x35, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, + 0x16, 0x1c, 0x88, 0x81, 0xc1, 0x8c, 0x18, 0x28, 0x00, 0x08, 0x82, 0x41, 0x53, 0x07, 0x54, 0x60, 0xb4, 0xc1, 0xb3, 0x06, 0xa3, 0x09, 0x01, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0xd6, 0x1c, + 0x94, 0x81, 0x02, 0x8d, 0x18, 0x2c, 0x00, 0x08, 0x82, 0x81, 0x92, 0x07, 0x64, 0x10, 0xc0, 0x01, 0x1c, 0xc0, 0x41, 0x19, 0x08, 0x35, 0x58, 0x3c, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x96, 0x1d, + 0xa0, 0x41, 0x33, 0x8d, 0x18, 0x2c, 0x00, 0x08, 0x82, 0x81, 0xc2, 0x07, 0x67, 0x10, 0xd4, 0x41, 0x1d, 0xcc, 0x01, 0x1a, 0x08, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x60, 0xe1, 0x81, 0x1a, 0x3c, + 0xd5, 0x88, 0xc1, 0x02, 0x80, 0x20, 0x18, 0x28, 0x7e, 0x90, 0x06, 0x01, 0x19, 0x90, 0x41, 0x1d, 0xa8, 0xc1, 0x31, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x96, 0x1e, 0xb0, 0x41, 0x74, 0x8d, 0x18, + 0x2c, 0x00, 0x08, 0x82, 0x81, 0x02, 0x0a, 0x6b, 0x10, 0x9c, 0x01, 0x1d, 0xdc, 0x01, 0x1b, 0x24, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x60, 0xf1, 0x81, 0x1b, 0x4c, 0xd9, 0x88, 0xc1, 0x02, 0x80, + 0x20, 0x18, 0x28, 0xa2, 0xd0, 0x06, 0x81, 0x1e, 0xd4, 0x41, 0x1e, 0xb8, 0xc1, 0x32, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x96, 0x1f, 0xc0, 0x81, 0xb5, 0x8d, 0x18, 0x2c, 0x00, 0x08, 0x82, 0x81, + 0x42, 0x0a, 0x6f, 0x10, 0xa4, 0x41, 0x1a, 0xec, 0x01, 0x1c, 0x34, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x60, 0x81, 0x82, 0x1c, 0x60, 0xdd, 0x88, 0xc1, 0x02, 0x80, 0x20, 0x18, 0x28, 0xa6, 0x10, + 0x07, 0x41, 0x1e, 0xf8, 0x41, 0x1f, 0xc8, 0xc1, 0x33, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x96, 0x28, 0xd0, 0x41, 0xf6, 0x8d, 0x18, 0x2c, 0x00, 0x08, 0x82, 0x81, 0x82, 0x0a, 0x73, 0x10, 0xf0, + 0xc1, 0x1b, 0xfc, 0x01, 0x1d, 0x44, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x60, 0x91, 0x82, 0x1d, 0x6c, 0x61, 0x30, 0x62, 0xb0, 0x00, 0x20, 0x08, 0x06, 0x8a, 0x2a, 0xd4, 0x41, 0xf0, 0x07, 0x7f, + 0x10, 0x0a, 0x76, 0x30, 0x8d, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x81, 0x65, 0x0a, 0x78, 0xd0, 0x8d, 0xc1, 0x88, 0xc1, 0x02, 0x80, 0x20, 0x18, 0x44, 0xa9, 0x60, 0x07, 0x01, 0x1c, 0x8c, 0x02, 0x1e, + 0x9c, 0x41, 0x55, 0xd6, 0x19, 0xc0, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x58, 0xa9, 0xb0, 0x07, 0x60, 0x60, 0x06, 0x23, 0x06, 0x0b, 0x00, 0x82, 0x60, 0x10, 0xb1, 0x42, 0x1e, 0x04, 0x73, 0x60, + 0x0a, 0x7b, 0xa0, 0x06, 0xc2, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x58, 0xab, 0xd0, 0x07, 0x62, 0x80, 0x06, 0x23, 0x06, 0x0b, 0x00, 0x82, 0x60, 0x10, 0xb9, 0xc2, 0x1e, 0x04, 0x74, 0x80, 0x0a, + 0x7d, 0xc0, 0x06, 0xda, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x58, 0xad, 0xf0, 0x07, 0x64, 0xa0, 0x06, 0x23, 0x06, 0x0b, 0x00, 0x82, 0x60, 0x10, 0xc1, 0x42, 0x1f, 0x04, 0x76, 0xa0, 0x0a, 0x7f, + 0xe0, 0x06, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, + }; + + static const BYTE cs_code_64bit_atomic_typed[] = + { +#if 0 + StructuredBuffer RO : register(t0); + RWTexture2D RW : register(u0); + RWBuffer RWSigned : register(u1); + + [numthreads(4, 1, 1)] + void main(uint thr : SV_DispatchThreadID) + { + if (thr == 0) + { + RW[int2(1, 1)] = uint64_t(-1); + RW[int2(4, 4)] = uint64_t(-1); + RW[int2(7, 7)] = uint64_t(-1); + } + AllMemoryBarrierWithGroupSync(); + + uint64_t v = RO[thr]; + InterlockedAdd(RW[int2(0, 0)], v); + InterlockedAnd(RW[int2(1, 1)], ~v); + InterlockedOr(RW[int2(2, 2)], v); + InterlockedMax(RW[int2(3, 3)], v); + InterlockedMin(RW[int2(4, 4)], v); + InterlockedMax(RWSigned[5], v); + InterlockedMin(RWSigned[6], v); + InterlockedXor(RW[int2(7, 7)], v); + uint64_t old_value; + InterlockedExchange(RW[int2(8, 8)], v, old_value); + InterlockedCompareStore(RW[int2(9, 9)], 0, v); + InterlockedCompareStore(RW[int2(9, 9)], 0, v + 1); + + InterlockedCompareExchange(RW[int2(10, 10)], 0, v, old_value); + InterlockedCompareExchange(RW[int2(10, 10)], 0, v + 1, old_value); + } +#endif + 0x44, 0x58, 0x42, 0x43, 0x3c, 0xc1, 0xda, 0x34, 0xf2, 0x59, 0x4d, 0x8b, 0x20, 0x3f, 0xab, 0x14, 0xcb, 0x67, 0x8f, 0x61, 0x01, 0x00, 0x00, 0x00, 0x6c, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x1c, 0x01, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x53, 0x56, 0x30, 0x90, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x51, 0xa0, 0x91, 0x3c, 0x45, 0x25, 0x13, 0xcc, 0x4e, 0x79, 0x1d, 0x96, 0x1e, 0x4b, 0xb8, 0x44, 0x58, 0x49, 0x4c, + 0x48, 0x09, 0x00, 0x00, 0x66, 0x00, 0x05, 0x00, 0x52, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x06, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x30, 0x09, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, + 0x21, 0x0c, 0x00, 0x00, 0x49, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, + 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, + 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, + 0x51, 0x18, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, + 0xff, 0xff, 0xff, 0x1f, 0x00, 0x06, 0x90, 0x36, 0x18, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x54, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, + 0x20, 0x4c, 0x08, 0x86, 0x09, 0x01, 0x01, 0x00, 0x89, 0x20, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, + 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x90, 0xc1, 0x08, 0x40, 0x09, 0x00, 0x0a, 0xe6, 0x08, 0xc0, 0xa0, 0x0c, 0xc3, 0x30, 0x10, 0x31, 0x47, 0x80, 0x90, + 0x71, 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10, 0x28, 0x38, 0xca, 0x02, 0x0c, 0xc8, 0x30, 0x0c, 0xc3, 0x30, 0x0c, 0x06, 0x25, 0x73, 0x04, 0xa0, 0x50, 0x90, 0x65, + 0x40, 0x86, 0x61, 0x18, 0x16, 0x62, 0x0a, 0xb2, 0x0c, 0xc8, 0x30, 0x0c, 0xcb, 0x42, 0x4e, 0x19, 0x80, 0x61, 0x20, 0xe8, 0xa6, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x7f, 0x25, 0xa4, 0x95, 0x98, + 0x7c, 0x44, 0xc7, 0x51, 0xb1, 0x2c, 0xcb, 0x32, 0x94, 0x43, 0x1a, 0x90, 0x61, 0x30, 0x06, 0x9a, 0x6e, 0x1b, 0x2e, 0x7f, 0xc2, 0x1e,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6f, 0xa6, 0x6c, 0x1c, 0xd8, 0x21, 0x1c, 0xe6, 0x61, 0x1e, 0xdc, 0x40, 0x16, 0x6e, 0x41, 0x14, 0xea, 0xc1, 0x1c, + 0xcc, 0xa1, 0x1c, 0xe4, 0x81, 0x0f, 0xd8, 0xe1, 0x1d, 0xdc, 0xe1, 0x1c, 0xc0, 0x80, 0x1d, 0xde, 0xc1, 0x1d, 0xce, 0xc1, 0x0f, 0x50, 0xb0, 0x50, 0x38, 0x05, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, + 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, + 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, + 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, + 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, + 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x04, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0c, 0x79, 0x12, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x30, 0x40, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x71, 0x80, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x03, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x67, 0x02, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x21, 0x8f, 0x05, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1e, 0x0d, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x40, 0x00, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x4a, 0xa0, 0x18, 0x46, 0x00, 0x0a, 0xa3, 0x20, 0x8a, 0xa0, 0x14, 0xca, + 0xa0, 0x28, 0x0a, 0x81, 0x96, 0x02, 0x05, 0x04, 0x0c, 0x0c, 0xa0, 0x6c, 0x04, 0x80, 0xbc, 0x19, 0x00, 0x02, 0x67, 0x00, 0x48, 0x9c, 0x01, 0x00, 0x79, 0x18, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, + 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, + 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x84, 0x21, 0x99, 0x20, 0x0c, 0xca, 0x06, 0x61, 0x20, + 0x28, 0x8c, 0xcd, 0x6d, 0x18, 0x0c, 0x82, 0x98, 0x20, 0x0c, 0xcb, 0x04, 0xc1, 0xab, 0x08, 0x4c, 0x10, 0x06, 0x66, 0x82, 0x30, 0x34, 0x1b, 0x84, 0x81, 0xd9, 0x90, 0x20, 0x89, 0x82, 0x20, 0xc3, + 0x82, 0x34, 0x1b, 0x02, 0x67, 0x82, 0x00, 0x06, 0xd6, 0x04, 0x61, 0x70, 0x26, 0x08, 0x19, 0x35, 0x41, 0x18, 0x9e, 0x09, 0xc2, 0x00, 0x6d, 0x20, 0x90, 0x89, 0x1a, 0x36, 0x2c, 0x08, 0xa4, 0x20, + 0xc8, 0x10, 0x49, 0x92, 0x54, 0x4d, 0x10, 0xc4, 0xe0, 0x9a, 0x20, 0x0c, 0xd1, 0x86, 0x65, 0xb8, 0x14, 0x64, 0x18, 0x30, 0x49, 0x92, 0xaa, 0x0d, 0x82, 0x95, 0x6d, 0x20, 0x1e, 0x0d, 0x00, 0x26, + 0x08, 0x02, 0x40, 0xa2, 0x2d, 0x2c, 0xcd, 0x6d, 0x82, 0xb0, 0x4c, 0x13, 0x84, 0x41, 0xda, 0x30, 0x7c, 0xc3, 0xb0, 0x81, 0x40, 0xbc, 0x0f, 0x0c, 0x36, 0x14, 0x5c, 0x07, 0x6c, 0x61, 0x50, 0x85, + 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x4a, 0x10, 0x54, 0x21, 0xc3, 0x73, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x9b, 0x12, 0x10, 0x4d, 0xc8, 0xf0, 0x5c, 0xec, 0xc2, + 0xd8, 0xec, 0xca, 0xe4, 0xa6, 0x04, 0x44, 0x1d, 0x32, 0x3c, 0x97, 0x39, 0xb4, 0x30, 0xb2, 0x32, 0xb9, 0xa6, 0x37, 0xb2, 0x32, 0xb6, 0x29, 0x81, 0x51, 0x86, 0x0c, 0xcf, 0x45, 0xae, 0x6c, 0xee, + 0xad, 0x4e, 0x6e, 0xac, 0x6c, 0x6e, 0x4a, 0xa0, 0xd5, 0x21, 0xc3, 0x73, 0x29, 0x73, 0xa3, 0x93, 0xcb, 0x83, 0x7a, 0x4b, 0x73, 0xa3, 0x9b, 0x9b, 0x12, 0x84, 0x01, 0x00, 0x79, 0x18, 0x00, 0x00, + 0x51, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, + 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, + 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, + 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, + 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, + 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, + 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, + 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, + 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, + 0x0e, 0xe7, 0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 0x3c, 0xfe, 0x74, 0x44, + 0x04, 0x30, 0x88, 0x83, 0x8f, 0xdc, 0xb6, 0x01, 0x10, 0x0c, 0x80, 0x34, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x13, 0x04, 0x43, 0x2c, 0x10, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x34, 0xcc, 0x00, 0x14, 0xec, 0x40, 0x0d, 0x14, 0x67, 0x40, 0x39, 0x94, 0x67, 0x40, 0x49, 0x94, 0xec, 0x40, 0x19, 0x06, 0x94, 0x22, 0x41, 0xe9, 0x06, 0x14, 0x21, 0x50, + 0x81, 0x06, 0x94, 0x45, 0x59, 0x0a, 0x14, 0x25, 0x10, 0x19, 0x25, 0x50, 0x1e, 0xb4, 0x8c, 0x00, 0xd4, 0x40, 0x09, 0x50, 0x35, 0x87, 0x30, 0x06, 0x61, 0x30, 0x87, 0x70, 0x06, 0x61, 0x30, 0x87, + 0xc0, 0x34, 0x84, 0xcd, 0x41, 0x24, 0xc9, 0x82, 0x06, 0x73, 0x10, 0xcb, 0xb2, 0xa0, 0xc1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x23, 0x06, 0x08, 0x00, 0x82, 0x60, 0xa0, 0xad, 0x01, 0x35, 0xa8, 0xc1, + 0x37, 0x62, 0x80, 0x00, 0x20, 0x08, 0x06, 0x1a, 0x1b, 0x54, 0x43, 0x1a, 0x80, 0xc1, 0x88, 0x01, 0x02, 0x80, 0x20, 0x18, 0x68, 0x6d, 0x60, 0x0d, 0x6a, 0x10, 0x06, 0x23, 0x06, 0x06, 0x00, 0x82, + 0x60, 0x40, 0xd4, 0x01, 0xb5, 0x06, 0xc3, 0x0d, 0x01, 0x1b, 0x80, 0xc1, 0x2c, 0x43, 0x20, 0x04, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x60, 0xc5, 0xc1, 0x47, 0x2c, 0x23, 0x06, 0x0e, 0x00, 0x82, + 0x60, 0x90, 0xdc, 0x41, 0x16, 0xc0, 0x01, 0x1c, 0x84, 0xc1, 0xf7, 0x7d, 0x1f, 0x34, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x96, 0x1c, 0x80, 0x41, 0xc1, 0x8c, 0x18, 0x38, 0x00, 0x08, 0x82, 0x41, + 0x82, 0x07, 0x5a, 0x80, 0x06, 0x68, 0x20, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0xd1, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x58, 0x73, 0x10, 0x06, 0x46, 0x33, 0x62, 0xe0, 0x00, 0x20, 0x08, + 0x06, 0x49, 0x1e, 0x6c, 0xc1, 0xf7, 0x8d, 0x41, 0x18, 0x84, 0x41, 0x18, 0x84, 0x81, 0x34, 0x4b, 0x20, 0x8c, 0x18, 0x18, 0x00, 0x08, 0x82, 0x01, 0x64, 0x07, 0x97, 0x35, 0x62, 0x70, 0x00, 0x20, + 0x08, 0x06, 0x16, 0x1d, 0x88, 0x81, 0xc1, 0x8c, 0x18, 0x28, 0x00, 0x08, 0x82, 0xc1, 0x64, 0x07, 0x56, 0x60, 0xc4, 0x01, 0xf5, 0x06, 0xa3, 0x09, 0x01, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, + 0xd6, 0x1d, 0x94, 0x81, 0x12, 0x8d, 0x18, 0x2c, 0x00, 0x08, 0x82, 0x01, 0xc3, 0x07, 0x64, 0x10, 0xd0, 0x01, 0x1d, 0xd0, 0xc1, 0x19, 0x08, 0x35, 0x54, 0x3c, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, + 0x96, 0x1e, 0xa0, 0x41, 0x43, 0x8d, 0x18, 0x2c, 0x00, 0x08, 0x82, 0x01, 0xf3, 0x07, 0x67, 0x10, 0xe4, 0x41, 0x1e, 0xe4, 0x81, 0x1a, 0x08, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x60, 0xf1, 0x81, + 0x1a, 0x3c, 0xd6, 0x88, 0xc1, 0x02, 0x80, 0x20, 0x18, 0x30, 0xa1, 0x90, 0x06, 0x81, 0x1d, 0xd8, 0x81, 0x1d, 0xb0, 0xc1, 0x31, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x96, 0x1f, 0xb0, 0x41, 0x84, + 0x8d, 0x18, 0x2c, 0x00, 0x08, 0x82, 0x01, 0x33, 0x0a, 0x6b, 0x10, 0xa8, 0x81, 0x1d, 0xd8, 0x81, 0x1b, 0x24, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x60, 0x81, 0x82, 0x1b, 0x4c, 0xda, 0x88, 0xc1, + 0x02, 0x80, 0x20, 0x18, 0x30, 0xa5, 0xd0, 0x06, 0x81, 0x1f, 0xd8, 0x81, 0x1d, 0xc0, 0xc1, 0x32, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x96, 0x28, 0xc0, 0x81, 0xb5, 0x8d, 0x18, 0x2c, 0x00, 0x08, + 0x82, 0x01, 0x73, 0x0a, 0x6f, 0x10, 0xec, 0xc1, 0x1e, 0xc8, 0x81, 0x1c, 0x34, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x60, 0x91, 0x82, 0x1c, 0x60, 0xdd, 0x88, 0xc1, 0x02, 0x80, 0x20, 0x18, 0x30, + 0xa9, 0x10, 0x07, 0x81, 0x1e, 0x88, 0x02, 0x1d, 0xd0, 0xc1, 0x33, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x96, 0x29, 0xd0, 0x41, 0x06, 0x06, 0x23, 0x06, 0x0b, 0x00, 0x82, 0x60, 0xc0, 0xac, 0xc2, + 0x1c, 0x04, 0x7e, 0x20, 0x07, 0x72, 0x60, 0x07, 0xd1, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x58, 0xa8, 0x60, 0x07, 0x9b, 0x18, 0x8c, 0x18, 0x2c, 0x00, 0x08, 0x82, 0x01, 0xd3, 0x0a, 0x75, 0x10, + 0x8c, 0xc2, 0x28, 0x8c, 0x02, 0x1e, 0x4c, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x60, 0xa9, 0x02, 0x1e, 0x74, 0x64, 0x30, 0x62, 0xb0, 0x00, 0x20, 0x08, 0x06, 0x8e, 0x2b, 0xd4, 0x41, 0x40, 0x07, + 0x74, 0xa0, 0x07, 0x68, 0x50, 0x95, 0x75, 0x06, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x56, 0x2b, 0xec, 0x01, 0x18, 0x9c, 0xc1, 0x88, 0xc1, 0x02, 0x80, 0x20, 0x18, 0x38, 0xb1, 0x80, 0x07, + 0xc1, 0x1d, 0xdc, 0x41, 0x1f, 0xac, 0x81, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0xd6, 0x2b, 0xf4, 0x81, 0x18, 0xa4, 0xc1, 0x88, 0xc1, 0x02, 0x80, 0x20, 0x18, 0x38, 0xb3, 0xa0, 0x07, 0x81, + 0x29, 0x98, 0xc2, 0x1f, 0xb4, 0x81, 0x36, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x56, 0x2c, 0xfc, 0x01, 0x19, 0xac, 0xc1, 0x88, 0xc1, 0x02, 0x80, 0x20, 0x18, 0x38, 0xb5, 0xc0, 0x07, 0x01, 0x2a, + 0xa0, 0x42, 0x28, 0xbc, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; + + static const BYTE cs_code_64bit_atomic_shared[] = + { +#if 0 + StructuredBuffer RO : register(t0); + RWStructuredBuffer RW : register(u0); + + groupshared uint64_t uv[11]; + groupshared int64_t sv[11]; + + [numthreads(11, 1, 1)] + void main(uint thr : SV_DispatchThreadID) + { + uv[thr] = thr == 1 || thr == 4 || thr == 7 ? uint64_t(-1) : uint64_t(0); + sv[thr] = 0; + GroupMemoryBarrierWithGroupSync(); + + if (thr < 4) + { + uint64_t v = RO[thr]; + InterlockedAdd(uv[0], v); + InterlockedAnd(uv[1], ~v); + InterlockedOr(uv[2], v); + InterlockedMax(uv[3], v); + InterlockedMin(uv[4], v); + + InterlockedMax(sv[5], v); + InterlockedMin(sv[6], v); + + InterlockedXor(uv[7], v); + uint64_t old_value; + InterlockedExchange(uv[8], v, old_value); + InterlockedCompareStore(uv[9], 0, v); + InterlockedCompareStore(uv[9], 0, v + 1); + InterlockedCompareExchange(uv[10], 0, v, old_value); + InterlockedCompareExchange(uv[10], 0, v + 1, old_value); + } + + GroupMemoryBarrierWithGroupSync(); + + RW[thr] = thr == 5 || thr == 6 ? uint64_t(sv[thr]) : uv[thr]; + } +#endif + 0x44, 0x58, 0x42, 0x43, 0xa5, 0xe0, 0x11, 0x7e, 0x39, 0x74, 0x8e, 0x8a, 0xb4, 0x4d, 0x47, 0x6e, 0x2a, 0xed, 0x7a, 0xab, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x53, 0x56, 0x30, 0x78, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x46, 0x8b, 0x93, 0xd2, 0x3a, 0x9a, 0xb6, 0xe1, 0x07, 0x33, 0xc8, + 0x4a, 0xc3, 0x46, 0xb4, 0x44, 0x58, 0x49, 0x4c, 0x70, 0x08, 0x00, 0x00, 0x66, 0x00, 0x05, 0x00, 0x1c, 0x02, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x06, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x58, 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, + 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4, 0x10, 0x32, 0x14, + 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, + 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x86, 0xf0, 0xff, 0xff, + 0xff, 0xff, 0x03, 0xc0, 0x00, 0xd2, 0x06, 0x62, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x90, 0x36, 0x18, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x54, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x86, 0x09, 0x01, 0x01, 0x00, 0x89, 0x20, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, + 0x13, 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x88, 0xc1, 0x1c, 0x01, 0x28, 0xe4, 0x02, 0x30, 0x88, 0x10, 0x0c, + 0x23, 0x00, 0x25, 0x18, 0x88, 0x98, 0x23, 0x00, 0x83, 0x32, 0x18, 0x86, 0x41, 0x47, 0x19, 0x06, 0xc3, 0xa0, 0x64, 0x8e,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36, 0x13, 0x1b, 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xc8, 0xc2, 0x2d, 0xcc, 0x02, 0x3d, 0xc8, 0x43, + 0x3d, 0x8c, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94, 0x03, 0x39, 0x88, 0x42, 0x3d, 0x98, 0x83, 0x39, 0x94, 0x83, 0x3c, 0xf0, 0x41, 0x3d, 0xb8, 0xc3, 0x3c, 0xa4, 0xc3, 0x39, 0xb8, 0x43, 0x39, 0x90, + 0x03, 0x18, 0xb0, 0xc3, 0x3b, 0xb8, 0xc3, 0x39, 0x80, 0x01, 0x3b, 0xbc, 0x83, 0x3b, 0x9c, 0x83, 0x1f, 0xa0, 0x00, 0xa0, 0x6e, 0x10, 0x01, 0x18, 0xa6, 0x00, 0x8c, 0x00, 0x5c, 0x00, 0x00, 0x00, + 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, + 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, + 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, + 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, + 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f, 0x24, 0x90, 0x21, 0x23, 0x45, 0x46, 0x00, 0x76, 0x00, 0x40, 0x76, 0x00, 0xc0, 0x21, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x9e, 0x03, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x09, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0c, 0x79, 0x1c, 0x20, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x44, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0xa1, 0x80, 0x00, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x83, 0x01, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, + 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x02, 0x0a, 0x14, 0x10, 0x30, 0x50, 0x60, 0x04, 0x80, 0x8c, 0x12, 0x28, 0x86, 0x11, 0x80, 0xc2, 0x28, 0x88, 0x42, 0x28, 0x0b, + 0xba, 0x46, 0x00, 0x88, 0x9b, 0x01, 0x20, 0x6f, 0x06, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, + 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, + 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x63, 0x99, 0x20, 0x18, 0xcc, 0x06, 0x61, 0x20, 0x28, 0x8c, 0xcd, 0x6d, 0x18, 0x0c, 0x82, 0x98, 0x20, 0x18, 0xcd, 0x04, + 0x81, 0x9b, 0x08, 0x4c, 0x10, 0x0c, 0x67, 0x82, 0x60, 0x3c, 0x1b, 0x84, 0x81, 0xd9, 0x90, 0x20, 0x89, 0x82, 0x20, 0xc3, 0x82, 0x34, 0x1b, 0x02, 0x67, 0x82, 0xe0, 0x51, 0x13, 0x84, 0x4b, 0xda, + 0xb0, 0x20, 0x90, 0x82, 0x20, 0xc3, 0x12, 0x45, 0x51, 0xb3, 0x21, 0x90, 0x36, 0x10, 0xcf, 0x04, 0x00, 0x13, 0x84, 0x42, 0x20, 0xd1, 0x16, 0x96, 0xe6, 0x36, 0x41, 0x00, 0x92, 0x09, 0x82, 0x01, + 0x4d, 0x10, 0x8c, 0x68, 0xc3, 0x90, 0x0d, 0xc3, 0x06, 0x02, 0xb9, 0x30, 0x6d, 0x43, 0x51, 0x59, 0x00, 0xb5, 0x31, 0x61, 0x7b, 0x73, 0x3b, 0x03, 0x61, 0x7b, 0x73, 0x3b, 0xe3, 0xf3, 0xd6, 0xe6, + 0x96, 0x06, 0xf7, 0x46, 0x57, 0xe6, 0x46, 0x07, 0x32, 0x86, 0x16, 0x26, 0xc7, 0x68, 0x2a, 0xad, 0x0d, 0x8e, 0xad, 0x0c, 0x64, 0xe8, 0x65, 0x68, 0x65, 0x05, 0x84, 0x4a, 0x28, 0x28, 0x68, 0x43, + 0xf0, 0x4d, 0x10, 0x00, 0x65, 0xc3, 0xe0, 0x81, 0x41, 0x18, 0x6c, 0x18, 0x3a, 0x31, 0x08, 0x83, 0x0d, 0xc3, 0x18, 0x8c, 0x41, 0x18, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, + 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x01, 0x51, 0x87, + 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x60, 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b, 0x9b, 0x12, 0x4c, + 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2, 0xa0, 0xde, 0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x04, 0x1b, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, + 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, + 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, + 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, + 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, + 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, + 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, + 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, + 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, + 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, + 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x30, 0x83, 0x81, 0xc8, 0x01, 0x1f, 0xdc, 0x40, 0x1c, 0xe4, 0xa1, 0x1c, 0xc2, 0x61, 0x1d, 0xdc, 0x40, 0x1c, 0xe4, 0x01, 0x00, 0x00, 0x00, + 0x71, 0x20, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x15, 0xc0, 0x04, 0x7e, 0x73, 0x3b, 0x10, 0x38, 0x83, 0x06, 0xbf, 0xca, 0x60, 0x01, 0x30, 0x81, 0x5f, 0xdd, 0x0e, 0x04, 0xce, 0xa0, 0xc1, 0xef, + 0x32, 0x68, 0x07, 0xd4, 0x70, 0xf9, 0xce, 0xe3, 0x03, 0x4d, 0xe3, 0x4c, 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x11, 0x34, 0xc3, 0xe5, 0x3b, 0x8f, 0x1f, 0x00, 0x51, 0x84, 0x10, 0x91, 0x21, + 0x74, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x44, 0x04, 0x30, 0x11, 0x21, 0xd0, 0x0c, 0x0b, 0xf1, 0x45, 0x0e, 0xb3, 0x21, 0xcd, 0x80, 0x34, 0x86, 0x19, 0x5c, 0xc3, 0xe5, 0x3b, 0x8f, 0x1f, 0x01, 0xd6, + 0x46, 0x15, 0x05, 0x11, 0x95, 0x0e, 0x30, 0xf8, 0x88, 0x8e, 0x5b, 0x01, 0x36, 0x5c, 0xbe, 0xf3, 0xf8, 0x11, 0x60, 0x6d, 0x54, 0x51, 0x10, 0x11, 0x3b, 0x39, 0x11, 0xe1, 0x23, 0x3a, 0x6e, 0x03, + 0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x4f, 0x47, 0x44, 0x00, 0x83, 0x38, 0xf8, 0xc8, 0x6d, 0x9b, 0x00, 0xc1, 0x00, 0x48, 0x03, 0x61, 0x20, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x13, 0x04, 0x43, 0x2c, + 0x10, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x04, 0xcc, 0x00, 0xd4, 0x40, 0x09, 0x90, 0x51, 0x12, 0x25, 0x3b, 0x50, 0x0e, 0x05, 0x1a, 0x50, 0xb0, 0x03, 0x45, 0x50, 0xba, 0x01, 0x65, 0x29, + 0x50, 0x06, 0xa5, 0x50, 0x14, 0xb5, 0x50, 0x98, 0x40, 0x85, 0x29, 0x40, 0x4b, 0x09, 0xd0, 0x34, 0x87, 0xe0, 0x3c, 0x73, 0x08, 0x64, 0xf0, 0x90, 0x35, 0x07, 0xd1, 0x34, 0x8d, 0x19, 0x8c, 0x00, + 0xd0, 0x37, 0xd4, 0x11, 0x08, 0x80, 0xd1, 0x18, 0xd8, 0x50, 0x47, 0x20, 0x00, 0x46, 0x63, 0x88, 0xc1, 0x50, 0x47, 0x20, 0x00, 0x46, 0x63, 0x34, 0x43, 0x1d, 0x81, 0x00, 0x18, 0x8d, 0xb1, 0x0c, + 0x75, 0x04, 0x02, 0x60, 0x34, 0x46, 0x37, 0xd4, 0x11, 0x08, 0x80, 0xd1, 0x18, 0x60, 0x30, 0xd4, 0x11, 0x08, 0x80, 0xd1, 0x18, 0xd0, 0x50, 0x47, 0x20, 0x04, 0x46, 0x63, 0x84, 0xc1, 0x50, 0x47, + 0x20, 0x04, 0x46, 0x63, 0x30, 0x43, 0x1d, 0x81, 0x00, 0x18, 0x8d, 0xa1, 0x0d, 0x75, 0x04, 0x02, 0x60, 0x34, 0xc6, 0x03, 0x23, 0x06, 0x08, 0x00, 0x82, 0x60, 0x80, 0xb9, 0x41, 0xd7, 0xa4, 0x01, + 0x19, 0x8c, 0x18, 0x20, 0x00, 0x08, 0x82, 0x01, 0xf6, 0x06, 0x5e, 0xa3, 0x06, 0x65, 0x30, 0x62, 0x60, 0x00, 0x20, 0x08, 0x06, 0x47, 0x1d, 0x68, 0x6b, 0x30, 0xdc, 0x10, 0xb8, 0x01, 0x18, 0x0c, + 0x37, 0x08, 0x6a, 0x00, 0x06, 0x25, 0x04, 0x3b, 0xdc, 0x40, 0x88, 0x01, 0x18, 0x54, 0x20, 0xec, 0x05, 0x80, 0xac, 0x60, 0xf8, 0x03, 0x39, 0x38, 0x86, 0x0d, 0x88, 0x40, 0x20, 0x80, 0x15, 0x0c, + 0x7f, 0x30, 0x07, 0xc8, 0xb0, 0x01, 0x11, 0xdc, 0x01, 0x01, 0x8c, 0x18, 0x18, 0x00, 0x08, 0x82, 0x41, 0xd2, 0x07, 0x66, 0x90, 0x06, 0xc3, 0x0d, 0x49, 0x1c, 0x90, 0xc1, 0x2c, 0x43, 0x20, 0x04, + 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x40, 0xed, 0x81, 0x19, 0x2c, 0xdb, 0x88, 0x81, 0x02, 0x80, 0x20, 0x18, 0x44, 0x7d, 0x40, 0x06, 0xc1, 0x62, 0x07, 0x1d, 0x1d, 0x8c, 0x26, 0x04, 0xc0, 0x98, + 0x81, 0x81, 0x05, 0x01, 0x60, 0x04, 0x25, 0xc0, 0x01, 0x8f, 0x19, 0x18, 0x59, 0x30, 0x00, 0x46, 0x30, 0x66, 0x60, 0x64, 0x44, 0x01, 0x18, 0xc1, 0x98, 0x81, 0x91, 0x15, 0x09, 0x60, 0x04, 0x63, + 0x06, 0x46, 0x66, 0x28, 0x80, 0x11, 0x8c, 0x19, 0x18, 0xd9, 0x71, 0x00, 0x46, 0x30, 0x66, 0x60, 0x64, 0x08, 0x02, 0x18, 0xc1, 0x98, 0x81, 0x91, 0x25, 0x06, 0x60, 0x04, 0x63, 0x06, 0x46, 0xa6, + 0x00, 0x80, 0x11, 0x8c, 0x1b, 0x20, 0x64, 0x50, 0x0a, 0x0b, 0x60, 0x04, 0x06, 0x50, 0x4c, 0x1e, 0xc0, 0xb8, 0x01, 0x62, 0x06, 0xa7, 0x10, 0x00, 0x46, 0x60, 0x00, 0xe3, 0x06, 0x88, 0x19, 0xa0, + 0x82, 0x03, 0x18, 0x81, 0x01, 0x8c, 0x1b, 0x20, 0x67, 0x90, 0x0a, 0x03, 0x60, 0x04, 0x06, 0x30, 0x4b, 0x20, 0x8c, 0x18, 0x18, 0x00, 0x08, 0x82, 0x41, 0x02, 0x0b, 0x79, 0xc0, 0x07, 0xc5, 0xc5, + 0x01, 0x0c, 0x37, 0x04, 0x78, 0x40, 0x06, 0x64, 0x01, 0x84, 0x30, 0x80, 0x4c, 0x37, 0x08, 0xc1, 0x30, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x94, 0x2c, 0xf4, 0xc1, 0x18, 0xc4, 0xc1, 0x88, 0x81, + 0x03, 0x80, 0x20, 0x18, 0x38, 0xb5, 0x50, 0x07, 0x81, 0x18, 0xb4, 0x82, 0x50, 0x0a, 0xa5, 0x50, 0x0a, 0x74, 0xb0, 0x0a, 0x18, 0x10, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x5b, 0x06, 0x25, 0x18, + 0x83, 0x2d, 0x03, 0x13, 0x8c, 0xc1, 0x96, 0xc1, 0x0c, 0x82, 0x31, 0xd8, 0x32, 0x9c, 0x41, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; + static const D3D12_SHADER_BYTECODE cs_64bit_atomic = SHADER_BYTECODE(cs_code_64bit_atomic); + static const D3D12_SHADER_BYTECODE cs_64bit_atomic_typed = SHADER_BYTECODE(cs_code_64bit_atomic_typed); + static const D3D12_SHADER_BYTECODE cs_64bit_atomic_shared = SHADER_BYTECODE(cs_code_64bit_atomic_shared); + + if (!init_compute_test_context(&context)) + return; + + device = context.device; + + memset(&options9, 0, sizeof(options9)); + memset(&options11, 0, sizeof(options11)); + hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_D3D12_OPTIONS9, &options9, sizeof(options9)); + ok(SUCCEEDED(hr), "OPTIONS9 is not supported by runtime.\n"); + hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_D3D12_OPTIONS11, &options11, sizeof(options11)); + ok(SUCCEEDED(hr), "OPTIONS11 is not supported by runtime.\n"); + /* For later, when we test more exotic 64-bit atomic scenarios ... */ + + hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_D3D12_OPTIONS1, &options1, sizeof(options1)); + if (FAILED(hr) || !options1.Int64ShaderOps) + { + skip("64-bit shader operations not supported, skipping ...\n"); + destroy_test_context(&context); + return; + } + + shader_model.HighestShaderModel = D3D_SHADER_MODEL_6_6; + hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_SHADER_MODEL, &shader_model, sizeof(shader_model)); + if (FAILED(hr) || shader_model.HighestShaderModel < D3D_SHADER_MODEL_6_6) + { + skip("Device does not support SM 6.6.\n"); + destroy_test_context(&context); + return; + } + + vkd3d_test_set_context("64-bit atomic root descriptor"); + run_64bit_atomics_test(&context, cs_64bit_atomic, false, false); + vkd3d_test_set_context(NULL); + + if (options11.AtomicInt64OnDescriptorHeapResourceSupported) + { + vkd3d_test_set_context("64-bit atomic table (raw)"); + run_64bit_atomics_test(&context, cs_64bit_atomic, true, false); + vkd3d_test_set_context(NULL); + } + else + skip("AtomicInt64OnDescriptorHeapResourceSupported not set, skipping.\n"); + + if (options11.AtomicInt64OnDescriptorHeapResourceSupported && + options9.AtomicInt64OnTypedResourceSupported) + { + vkd3d_test_set_context("64-bit atomic table (typed)"); + run_64bit_atomics_test(&context, cs_64bit_atomic_typed, true, true); + vkd3d_test_set_context(NULL); + } + else + skip("AtomicInt64OnTypedResourceSupported is not set, skipping.\n"); + + if (options9.AtomicInt64OnGroupSharedSupported) + { + vkd3d_test_set_context("64-bit atomic groupshared"); + run_64bit_atomics_test(&context, cs_64bit_atomic_shared, false, false); + vkd3d_test_set_context(NULL); + } + else + skip("AtomicInt64OnGroupSharedSupported is not set, skipping.\n"); + + destroy_test_context(&context); +} + void test_shader_sm66_compute_derivatives(void) { D3D12_ROOT_SIGNATURE_DESC root_signature_desc; diff --git a/tests/d3d12_test_utils.h b/tests/d3d12_test_utils.h index 71dc68ab..515c00f3 100644 --- a/tests/d3d12_test_utils.h +++ b/tests/d3d12_test_utils.h @@ -302,6 +302,8 @@ static inline unsigned int format_size(DXGI_FORMAT format) case DXGI_FORMAT_R8G8_UNORM: return 16; case DXGI_FORMAT_R16G16B16A16_TYPELESS: + case DXGI_FORMAT_R32G32_UINT: + case DXGI_FORMAT_R32G32_TYPELESS: return 8; case DXGI_FORMAT_R32_TYPELESS: case DXGI_FORMAT_D32_FLOAT: diff --git a/tests/d3d12_tests.h b/tests/d3d12_tests.h index e7bfe2ef..46c90f16 100644 --- a/tests/d3d12_tests.h +++ b/tests/d3d12_tests.h @@ -275,6 +275,7 @@ decl_test(test_shader_sm64_packed); decl_test(test_shader_sm65_wave_intrinsics); decl_test(test_shader_sm66_quad_op_semantics); decl_test(test_shader_sm66_compute_derivatives); +decl_test(test_shader_sm66_64bit_atomics); decl_test(test_get_copyable_footprints_planar); decl_test(test_depth_stencil_test_no_dsv); decl_test(test_copy_buffer_to_depth_stencil);