Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
26d692f3 by Steve Lhomme at 2026-01-11T04:57:18+00:00
d3d11_tonemap: keep the context in the staging picture_sys_t

Since 833b02552a6d6055f1ed1d5f84827ac213db5774 it's used to detect external GPU 
decoding.

Similar to 084400e20af8ca762d945719684d0fbadc3f43b0

Fixes #29502

- - - - -
1067383b by Steve Lhomme at 2026-01-11T04:57:18+00:00
d3d11_tonemap: remove unused variables

- - - - -


1 changed file:

- modules/video_output/win32/d3d11_tonemap.cpp


Changes:

=====================================
modules/video_output/win32/d3d11_tonemap.cpp
=====================================
@@ -203,6 +203,11 @@ HRESULT d3d11_tonemapper::UpdateTexture(vlc_object_t *vd, 
d3d11_device_t *d3d_de
         picsys.processorOutput->Release();
         picsys.processorOutput = NULL;
     }
+    if (picsys.context)
+    {
+        picsys.context->Release();
+        picsys.context = nullptr;
+    }
     _texture[0] = texture.Get();
     _texture[1] = texture.Get();
     _texture[2] = texture.Get();
@@ -231,6 +236,8 @@ HRESULT d3d11_tonemapper::UpdateTexture(vlc_object_t *vd, 
d3d11_device_t *d3d_de
     picsys.texture[0] = texture.Get();
     picsys.resourceView[0] = SRV.Get();
     picsys.formatTexture = texDesc.Format;
+    picsys.context = d3d_dev->d3dcontext;
+    picsys.context->AddRef();
 
     Width  = texDesc.Width;
     Height = texDesc.Height;
@@ -299,9 +306,7 @@ int D3D11_TonemapperUpdate(vlc_object_t *vd, 
d3d11_tonemapper *tonemapProc, d3d1
                            video_format_t *quad_fmt)
 {
     HRESULT hr;
-    ID3D11Texture2D *_texture[D3D11_MAX_SHADER_VIEW];
     ComPtr<ID3D11Texture2D> texture;
-    D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC outDesc{ };
     D3D11_VIDEO_COLOR black{};
     black.RGBA.A = 1.f;
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/ebe82c1d4bbc609d5f9449bf1a93accdb5613bad...1067383ba25fa01d872a67d508187bcfa08c8ddb

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/ebe82c1d4bbc609d5f9449bf1a93accdb5613bad...1067383ba25fa01d872a67d508187bcfa08c8ddb
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to