Commit a1f4000b authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

direct3d11: set the RGB mask for RGB32

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent bf2a7faf
......@@ -25,6 +25,7 @@
#endif
#include "dxgi_fmt.h"
#include <vlc_es.h>
typedef struct
{
......@@ -94,3 +95,15 @@ const d3d_format_t *GetRenderFormatList(void)
{
return d3d_formats;
}
void DxgiFormatMask(DXGI_FORMAT format, video_format_t *fmt)
{
switch (format)
{
case DXGI_FORMAT_B8G8R8X8_UNORM:
fmt->i_rmask = 0x0000ff00;
fmt->i_gmask = 0x00ff0000;
fmt->i_bmask = 0xff000000;
break;
}
}
......@@ -39,5 +39,6 @@ typedef struct
extern const char *DxgiFormatToStr(DXGI_FORMAT format);
extern const d3d_format_t *GetRenderFormatList(void);
extern void DxgiFormatMask(DXGI_FORMAT format, video_format_t *);
#endif /* include-guard */
......@@ -969,6 +969,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
msg_Dbg( vd, "Using pixel format %s from chroma %4.4s", output_format->name,
(char *)&i_src_chroma );
fmt->i_chroma = output_format->fourcc;
DxgiFormatMask( output_format->formatTexture, fmt );
sys->picQuadConfig.textureFormat = output_format->formatTexture;
sys->picQuadConfig.resourceFormatYRGB = output_format->formatY;
sys->picQuadConfig.resourceFormatUV = output_format->formatUV;
......@@ -991,6 +992,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
msg_Dbg( vd, "Using pixel format %s for chroma %4.4s", output_format->name,
(char *)&i_src_chroma );
fmt->i_chroma = output_format->fourcc;
DxgiFormatMask( output_format->formatTexture, fmt );
sys->picQuadConfig.textureFormat = output_format->formatTexture;
sys->picQuadConfig.resourceFormatYRGB = output_format->formatY;
sys->picQuadConfig.resourceFormatUV = output_format->formatUV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment