d3d12: Add HAVE_GALLIUM_D3D12_VIDEO guards for d3d12_video_encoder_set_max_async_queue_depth/d3d12_video_encoder_get_last_slice_completion_fence

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14709
Fixes: e55b2b5064 ("d3d12: Add get_video_enc_last_slice_completion_fence interop")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39457>
(cherry picked from commit 4b366f8824)
This commit is contained in:
Silvio Vilerino 2026-01-22 09:46:45 -05:00 committed by Eric Engestrom
parent 944bcc85a0
commit 00632c8dfc
4 changed files with 11 additions and 1 deletions

View file

@ -3504,7 +3504,7 @@
"description": "d3d12: Add HAVE_GALLIUM_D3D12_VIDEO guards for d3d12_video_encoder_set_max_async_queue_depth/d3d12_video_encoder_get_last_slice_completion_fence",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "e55b2b506492f692db37a568d317fe175290528d",
"notes": null

View file

@ -333,6 +333,7 @@ d3d12_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags);
int
d3d12_context_set_queue_priority_manager(struct pipe_context *ctx, struct d3d12_context_queue_priority_manager *priority_manager);
#ifdef HAVE_GALLIUM_D3D12_VIDEO
int
d3d12_video_encoder_set_max_async_queue_depth(struct pipe_context *ctx, uint32_t max_async_depth);
@ -340,6 +341,7 @@ int
d3d12_video_encoder_get_last_slice_completion_fence(struct pipe_video_codec *codec,
void *feedback,
pipe_fence_handle **last_slice_completion_fence);
#endif // HAVE_GALLIUM_D3D12_VIDEO
bool
d3d12_enable_fake_so_buffers(struct d3d12_context *ctx, unsigned factor);

View file

@ -480,6 +480,7 @@ d3d12_context_set_queue_priority_manager(struct pipe_context *ctx, struct d3d12_
return 0;
}
#ifdef HAVE_GALLIUM_D3D12_VIDEO
int
d3d12_video_encoder_set_max_async_queue_depth(struct pipe_context *ctx, uint32_t max_async_depth)
{
@ -492,6 +493,7 @@ d3d12_video_encoder_set_max_async_queue_depth(struct pipe_context *ctx, uint32_t
d3d12_ctx->max_video_encoding_async_depth = max_async_depth;
return 0;
}
#endif // HAVE_GALLIUM_D3D12_VIDEO
struct pipe_context *
d3d12_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)

View file

@ -1161,8 +1161,14 @@ d3d12_interop_query_device_info(struct pipe_screen *pscreen, uint32_t data_size,
if (data_size >= sizeof(d3d12_interop_device_info1)) {
d3d12_interop_device_info1 *info1 = (d3d12_interop_device_info1 *)data;
info1->set_context_queue_priority_manager = d3d12_context_set_queue_priority_manager;
#ifdef HAVE_GALLIUM_D3D12_VIDEO
info1->set_video_encoder_max_async_queue_depth = d3d12_video_encoder_set_max_async_queue_depth;
info1->get_video_enc_last_slice_completion_fence = d3d12_video_encoder_get_last_slice_completion_fence;
#else
info1->set_video_encoder_max_async_queue_depth = NULL;
info1->get_video_enc_last_slice_completion_fence = NULL;
#endif // HAVE_GALLIUM_D3D12_VIDEO
return sizeof(*info1);
}