reset_command_list(test_context->list, test_context->allocator); + transition_resource_state(test_context->list, resource->resource, D3D12_RESOURCE_STATE_COPY_SOURCE, state); + hr = ID3D12GraphicsCommandList_Close(test_context->list); + assert_that(hr == S_OK, "Failed to close command list, hr %#x.\n", hr); + exec_command_list(test_context->queue, test_context->list); + wait_queue_idle(test_context->device, test_context->queue); + reset_command_list(test_context->list, test_context->allocator);
We're probably not overly concerned with the performance of the shader runner, but this doesn't seem ideal. It also seems like there might be a similar issue in d3d12_runner_create_resource(). Is there any chance we could instead do something like flushing the current command list in d3d12_runner_destroy_resource() if needed?