On Thu, 7 Jul 2022 at 15:57, Conor McCarthy cmccarthy@codeweavers.com wrote:
- get_buffer_readback_with_command_list(resource, uav_desc.Format, &rb, queue, command_list);
- check_readback_data_vec4(&rb.rb, NULL, &expected, 0);
- release_resource_readback(&rb);
- reset_command_list(command_list, context.allocator);
- transition_sub_resource_state(command_list, resource, 0,
D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
- ID3D12PipelineState_Release(pipeline_state);
- pipeline_state = create_compute_pipeline_state(device, root_signature,
shader_bytecode(cs_vec4_load_code, sizeof(cs_vec4_load_code)));
- ID3D12GraphicsCommandList_SetPipelineState(command_list, pipeline_state);
- ID3D12GraphicsCommandList_SetComputeRootSignature(command_list, root_signature);
- ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(command_list, 0, gpu_descriptor_handle);
- ID3D12GraphicsCommandList_Dispatch(command_list, 2, 1, 1);
- transition_sub_resource_state(command_list, resource, 0,
D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE);
- get_buffer_readback_with_command_list(resource, uav_desc.Format, &rb, queue, command_list);
- todo check_readback_data_vec4(&rb.rb, NULL, &expected, 0);
- release_resource_readback(&rb);
It's a little unfortunate that simply skipping the dispatch above would make the test pass.