diff options
author | Timo Rothenpieler <[email protected]> | 2025-09-09 21:46:25 +0200 |
---|---|---|
committer | Timo Rothenpieler <[email protected]> | 2025-09-17 14:50:41 +0000 |
commit | efd484cb2dc3e3aa0eaf1855535186ccde3dc97c (patch) | |
tree | 54089bdbca1093a4c57aef1a40f55a803aa543a6 | |
parent | 00ddb408c53c39b8462931a06b28f56bd64bf8af (diff) |
avutil/hwcontext_d3d11va: remove D3D11_BIND_RENDER_TARGET restriction for array textures
This was added in 4f78711f9c28b11dae4e4b96be46b6b4925eb8c6, with the
commit message claiming that it's a Microsoft restriction that array
textures with ArraySize > 2 cannot be created with
D3D11_BIND_RENDER_TARGET.
I was unable to find any documentation or other references on that, and
a quick test also found it to not be the case. So this patch removes
that restriction.
This enables frame sources, like the d3d11 capture filters, to output
frames in an array texture, which is neccesary to pass those frames as
input to some hardware encoders.
-rw-r--r-- | libavutil/hwcontext_d3d11va.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index 9831f530c1..83414ad0d4 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -318,7 +318,7 @@ static int d3d11va_frames_init(AVHWFramesContext *ctx) ctx->initial_pool_size = texDesc2.ArraySize; hwctx->BindFlags = texDesc2.BindFlags; hwctx->MiscFlags = texDesc2.MiscFlags; - } else if (!(texDesc.BindFlags & D3D11_BIND_RENDER_TARGET) && texDesc.ArraySize > 0) { + } else if (texDesc.ArraySize > 0) { hr = ID3D11Device_CreateTexture2D(device_hwctx->device, &texDesc, NULL, &hwctx->texture); if (FAILED(hr)) { av_log(ctx, AV_LOG_ERROR, "Could not create the texture (%lx)\n", (long)hr); |