It's no problem to send fewer of these per MR. I have included the complete set because all but the last introduce no functional changes, and upstreaming a smaller set would leave the changes in a half-done state with unnecessary buffering.
-- v7: vkd3d: Store command list commands in a buffer until executed. vkd3d: Store WriteBufferImmediate() arguments in a buffer. vkd3d: Store ExecuteIndirect() arguments in a buffer. vkd3d: Store SetPredication() arguments in a buffer. vkd3d: Store ResolveQueryData() arguments in a buffer. vkd3d: Store EndQuery() arguments in a buffer. vkd3d: Store BeginQuery() arguments in a buffer. vkd3d: Store d3d12_command_list_clear_uav() arguments in a buffer. vkd3d: Store ClearRenderTargetView() arguments in a buffer. vkd3d: Store ClearDepthStencilView() arguments in a buffer. vkd3d: Store OMSetRenderTargets() arguments in a buffer. vkd3d: Store SOSetTargets() arguments in a buffer. vkd3d: Store IASetVertexBuffers() arguments in a buffer. vkd3d: Store IASetIndexBuffer() arguments in a buffer. vkd3d: Store d3d12_command_list_set_root_descriptor() arguments in a buffer. vkd3d: Store d3d12_command_list_set_root_cbv() arguments in a buffer. vkd3d: Store d3d12_command_list_set_root_constants() arguments in a buffer. vkd3d: Store d3d12_command_list_set_descriptor_table() arguments in a buffer. vkd3d: Store d3d12_command_list_set_root_signature() arguments in a buffer. vkd3d: Add an internal refcount to struct d3d12_root_signature. vkd3d: Store ResourceBarrier() arguments in a buffer. vkd3d: Store SetPipelineState() arguments in a buffer. vkd3d: Store OMSetStencilRef() arguments in a buffer. vkd3d: Store OMSetBlendFactor() arguments in a buffer. vkd3d: Store RSSetScissorRects() arguments in a buffer. vkd3d: Store RSSetViewports() arguments in a buffer. vkd3d: Store IASetPrimitiveTopology() arguments in a buffer. vkd3d: Store ResolveSubresource() arguments in a buffer. vkd3d: Store CopyResource() arguments in a buffer. vkd3d: Store CopyTextureRegion() arguments in a buffer. vkd3d: Store CopyBufferRegion() arguments in a buffer. vkd3d: Store Dispatch() arguments in a buffer. vkd3d: Store DrawIndexedInstanced() arguments in a buffer. vkd3d: Store DrawInstanced() arguments in a buffer.
This merge request has too many patches to be relayed via email. Please visit the URL below to see the contents of the merge request. https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/294
Fixing up function names and parameters to match the switch to `struct d3d12_command_list_state` makes the last commit much larger but the result is more rational.
This whole series can be shelved until we need out-of-order query resolution, or more correct state promotion, or the potential performance gains are implemented and proven. The downside is we can't fix the validation layer spam from layout mismatches.
The issues with resource initial transitions can instead be solved by keeping an array of untransitioned resources and submitting the transitions in a separate command list in `d3d12_command_queue_execute()`. Buffering of queue ops ensures the sequencing is correct there. This should fix AC: Valhalla. Even with buffered command lists we would still need to do this to correctly support re-execution of command lists.