[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: direct3d11: fix BGRX mask reported to the core
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Oct 1 14:41:58 UTC 2026
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
5753cb91 by Steve Lhomme at 2026-10-01T14:24:29+00:00
direct3d11: fix BGRX mask reported to the core
screen/win32 which is actually a BGRX format sets this mask.
BGR0 sources are also mapped correctly with this fix.
Fixes #30181
Fixes #30177
- - - - -
3b742900 by Steve Lhomme at 2026-10-01T14:24:29+00:00
dxgi_fmt: remove unused function
It was also removed in 4.0 with the RGB mask cleanup.
- - - - -
3 changed files:
- modules/video_chroma/dxgi_fmt.c
- modules/video_chroma/dxgi_fmt.h
- modules/video_output/win32/direct3d11.c
Changes:
=====================================
modules/video_chroma/dxgi_fmt.c
=====================================
@@ -119,16 +119,6 @@ const d3d_format_t *GetRenderFormatList(void)
return d3d_formats;
}
-void DxgiFormatMask(DXGI_FORMAT format, video_format_t *fmt)
-{
- if (format == DXGI_FORMAT_B8G8R8X8_UNORM)
- {
- fmt->i_rmask = 0x0000ff00;
- fmt->i_gmask = 0x00ff0000;
- fmt->i_bmask = 0xff000000;
- }
-}
-
const char *DxgiVendorStr(int gpu_vendor)
{
static const struct {
=====================================
modules/video_chroma/dxgi_fmt.h
=====================================
@@ -58,7 +58,6 @@ typedef struct
const char *DxgiFormatToStr(DXGI_FORMAT format);
vlc_fourcc_t DxgiFormatFourcc(DXGI_FORMAT format);
const d3d_format_t *GetRenderFormatList(void);
-void DxgiFormatMask(DXGI_FORMAT format, video_format_t *);
const char *DxgiVendorStr(int gpu_vendor);
UINT DxgiResourceCount(const d3d_format_t *);
=====================================
modules/video_output/win32/direct3d11.c
=====================================
@@ -1925,7 +1925,13 @@ static int SetupOutputFormat(vout_display_t *vd, video_format_t *fmt, video_form
msg_Dbg( vd, "Using pixel format %s for chroma %4.4s", sys->pool_d3dfmt->name,
(char *)&fmt->i_chroma );
fmt->i_chroma = sys->pool_d3dfmt->fourcc;
- DxgiFormatMask( sys->picQuad.formatInfo->formatTexture, fmt );
+ if (sys->picQuad.formatInfo->formatTexture == DXGI_FORMAT_B8G8R8X8_UNORM)
+ {
+ // BGRX in RV32, similar to the BGRX mask set in screen/win32.c
+ fmt->i_rmask = 0x00ff0000;
+ fmt->i_gmask = 0x0000ff00;
+ fmt->i_bmask = 0x000000ff;
+ }
InitTonemapProcessor(vd, quad_fmt);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a438aba4927380c3593e628618181e0c91012bc6...3b742900dabccf6bde3360325c65d32799393118
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a438aba4927380c3593e628618181e0c91012bc6...3b742900dabccf6bde3360325c65d32799393118
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list