This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 78f50dc45a85dbc1bbe8c4c6faa84f2f06f64d96 Author: softworkz <[email protected]> AuthorDate: Wed Sep 2 13:58:57 2026 +0200 Commit: Kacper Michajłow <[email protected]> CommitDate: Tue Sep 22 21:30:07 2026 +0000 avutil/hwcontext_d3d11va: Remove shader-resource bind flag for DXGI_FORMAT_420_OPAQUE format Microsoft’s DXGI_FORMAT_420_OPAQUE definition explicitly says shaders cannot be used with this format. See discussion here: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24046 Signed-off-by: softworkz <[email protected]> --- libavutil/hwcontext_d3d11va.c | 3 +++ libavutil/hwcontext_d3d11va.h | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index 834c2ce3dd..be0523b05b 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -294,6 +294,9 @@ static int d3d11va_frames_init(AVHWFramesContext *ctx) hwctx->BindFlags |= device_hwctx->BindFlags; hwctx->MiscFlags |= device_hwctx->MiscFlags; + if (s->format == DXGI_FORMAT_420_OPAQUE) + hwctx->BindFlags &= ~D3D11_BIND_SHADER_RESOURCE; + ctx->initial_pool_size = FFMIN(ctx->initial_pool_size, MAX_ARRAY_SIZE); texDesc = (D3D11_TEXTURE2D_DESC){ diff --git a/libavutil/hwcontext_d3d11va.h b/libavutil/hwcontext_d3d11va.h index b87b1e8fa2..1ed9746baf 100644 --- a/libavutil/hwcontext_d3d11va.h +++ b/libavutil/hwcontext_d3d11va.h @@ -98,7 +98,11 @@ typedef struct AVD3D11VADeviceContext { * D3D11_TEXTURE2D_DESC.BindFlags to be applied to D3D11 resources allocated * for frames using this device context. * - * It applies globally to all AVD3D11VAFramesContext allocated from this device context. + * It applies globally to all AVD3D11VAFramesContext allocated from this device context, + * except that flags incompatible with the selected format may be removed during frames + * initialization. + * In particular, D3D11_BIND_SHADER_RESOURCE is removed for + * AV_PIX_FMT_YUV420P / DXGI_FORMAT_420_OPAQUE. */ UINT BindFlags; /** @@ -169,6 +173,9 @@ typedef struct AVD3D11VAFramesContext { * D3D11_TEXTURE2D_DESC.BindFlags used for texture creation. The user must * at least set D3D11_BIND_DECODER if the frames context is to be used for * video decoding. + * Please note that flags incompatible with the selected format may be removed + * during frames initialization. In particular, D3D11_BIND_SHADER_RESOURCE is + * removed for AV_PIX_FMT_YUV420P / DXGI_FORMAT_420_OPAQUE. * This field is ignored/invalid if a user-allocated texture is provided. */ UINT BindFlags; -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
