Skip to content

Commit

Permalink
Add MISC_SHARED to hwcontext_d3d11va for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
nyanmisaka committed Jan 12, 2023
1 parent fc263f0 commit 3f97a30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libavutil/hwcontext_d3d11va.c
Expand Up @@ -213,7 +213,7 @@ static AVBufferRef *d3d11va_alloc_single(AVHWFramesContext *ctx)
.ArraySize = 1,
.Usage = D3D11_USAGE_DEFAULT,
.BindFlags = hwctx->BindFlags,
.MiscFlags = hwctx->MiscFlags,
.MiscFlags = hwctx->MiscFlags | D3D11_RESOURCE_MISC_SHARED,
};

hr = ID3D11Device_CreateTexture2D(device_hwctx->device, &texDesc, NULL, &tex);
Expand Down Expand Up @@ -277,7 +277,7 @@ static int d3d11va_frames_init(AVHWFramesContext *ctx)
.ArraySize = ctx->initial_pool_size,
.Usage = D3D11_USAGE_DEFAULT,
.BindFlags = hwctx->BindFlags,
.MiscFlags = hwctx->MiscFlags,
.MiscFlags = hwctx->MiscFlags | D3D11_RESOURCE_MISC_SHARED,
};

if (hwctx->texture) {
Expand Down

0 comments on commit 3f97a30

Please sign in to comment.