[vlc-commits] [Git][videolan/vlc][3.0.x] d3d11_scaler: keep the context in the staging picture_sys_t
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed May 14 06:15:55 UTC 2025
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
084400e2 by Steve Lhomme at 2025-05-14T05:50:27+00:00
d3d11_scaler: keep the context in the staging picture_sys_t
Since 833b02552a6d6055f1ed1d5f84827ac213db5774 it's used to detect external GPU decoding.
- - - - -
1 changed file:
- modules/video_output/win32/d3d11_scaler.cpp
Changes:
=====================================
modules/video_output/win32/d3d11_scaler.cpp
=====================================
@@ -444,10 +444,18 @@ int D3D11_UpscalerUpdate(vlc_object_t *vd, d3d11_scaler *scaleProc, d3d11_device
scaleProc->picsys.processorOutput->Release();
scaleProc->picsys.processorOutput = NULL;
}
+ if (scaleProc->picsys.context)
+ {
+ scaleProc->picsys.context->Release();
+ scaleProc->picsys.context = nullptr;
+ }
+
scaleProc->picsys.texture[0] = upscaled.Get();
for (size_t i=0; i<ARRAY_SIZE(scaleProc->picsys.resourceView); i++)
scaleProc->picsys.resourceView[i] = scaleProc->SRVs[i];
scaleProc->picsys.formatTexture = texDesc.Format;
+ scaleProc->picsys.context = d3d_dev->d3dcontext;
+ scaleProc->picsys.context->AddRef();
}
#ifdef HAVE_AMF_SCALER
@@ -732,8 +740,15 @@ int D3D11_UpscalerScale(vlc_object_t *vd, d3d11_scaler *scaleProc, picture_sys_t
scaleProc->picsys.processorOutput->Release();
scaleProc->picsys.processorOutput = NULL;
}
+ if (scaleProc->picsys.context)
+ {
+ scaleProc->picsys.context->Release();
+ scaleProc->picsys.context = nullptr;
+ }
scaleProc->picsys.texture[0] = out;
scaleProc->picsys.formatTexture = inputDesc.Format;
+ scaleProc->picsys.context = scaleProc->d3d_dev->d3dcontext;
+ scaleProc->picsys.context->AddRef();
amfOutput->Release();
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/084400e20af8ca762d945719684d0fbadc3f43b0
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/084400e20af8ca762d945719684d0fbadc3f43b0
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list