Module: Mesa Branch: main Commit: 36990eca48ff24eb0b5174a3c840722f76d7b982 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=36990eca48ff24eb0b5174a3c840722f76d7b982
Author: Giancarlo Devich <[email protected]> Date: Wed Apr 12 10:56:35 2023 -0700 d3d12: Add ID3D12GraphicsCommandList8 to the context Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22454> --- src/gallium/drivers/d3d12/d3d12_batch.cpp | 3 +++ src/gallium/drivers/d3d12/d3d12_context.cpp | 2 ++ src/gallium/drivers/d3d12/d3d12_context.h | 1 + 3 files changed, 6 insertions(+) diff --git a/src/gallium/drivers/d3d12/d3d12_batch.cpp b/src/gallium/drivers/d3d12/d3d12_batch.cpp index ac096d7d5e4..357fc1d7fcf 100644 --- a/src/gallium/drivers/d3d12/d3d12_batch.cpp +++ b/src/gallium/drivers/d3d12/d3d12_batch.cpp @@ -218,6 +218,9 @@ d3d12_start_batch(struct d3d12_context *ctx, struct d3d12_batch *batch) batch->has_errors = true; return; } + if (FAILED(ctx->cmdlist->QueryInterface(IID_PPV_ARGS(&ctx->cmdlist8)))) { + ctx->cmdlist8 = nullptr; + } } ctx->cmdlist->SetDescriptorHeaps(2, heaps); diff --git a/src/gallium/drivers/d3d12/d3d12_context.cpp b/src/gallium/drivers/d3d12/d3d12_context.cpp index 08de834f0e1..0ba6abd2d1f 100644 --- a/src/gallium/drivers/d3d12/d3d12_context.cpp +++ b/src/gallium/drivers/d3d12/d3d12_context.cpp @@ -93,6 +93,8 @@ d3d12_context_destroy(struct pipe_context *pctx) for (unsigned i = 0; i < ARRAY_SIZE(ctx->batches); ++i) d3d12_destroy_batch(ctx, &ctx->batches[i]); ctx->cmdlist->Release(); + if (ctx->cmdlist8) + ctx->cmdlist8->Release(); d3d12_descriptor_pool_free(ctx->sampler_pool); util_primconvert_destroy(ctx->primconvert); slab_destroy_child(&ctx->transfer_pool); diff --git a/src/gallium/drivers/d3d12/d3d12_context.h b/src/gallium/drivers/d3d12/d3d12_context.h index 19b1720e100..148ba6ddfc7 100644 --- a/src/gallium/drivers/d3d12/d3d12_context.h +++ b/src/gallium/drivers/d3d12/d3d12_context.h @@ -257,6 +257,7 @@ struct d3d12_context { uint64_t submit_id; ID3D12GraphicsCommandList *cmdlist; + ID3D12GraphicsCommandList8 *cmdlist8; ID3D12GraphicsCommandList *state_fixup_cmdlist; struct list_head active_queries;
