RetroArch
Macros | Functions
dxgi_common.c File Reference
#include <compat/strl.h>
#include <string/stdstring.h>
#include <retro_environment.h>
#include <assert.h>
#include "dxgi_common.h"
#include "../../configuration.h"
#include "../../verbosity.h"
#include "../../ui/ui_companion_driver.h"
#include "../video_driver.h"
#include "win32_common.h"
Include dependency graph for dxgi_common.c:

Macros

#define FORMAT_PROCESS_(src_type, src_rb, src_gb, src_bb, src_ab, src_rs, src_gs, src_bs, src_as, dst_type, dst_rb, dst_gb, dst_bb, dst_ab, dst_rs, dst_gs, dst_bs, dst_as)
 
#define FORMAT_PROCESS(args)   FORMAT_PROCESS_ args
 
#define FORMAT_DST(st, dt)
 
#define FORMAT_SRC(st)
 
#define DXGI_FORMAT_R8G8B8A8_UNORM_DESCS   UINT32, 8, 8, 8, 8, 0, 8, 16, 24
 
#define DXGI_FORMAT_B8G8R8X8_UNORM_DESCS   UINT32, 8, 8, 8, 0, 16, 8, 0, 0
 
#define DXGI_FORMAT_B8G8R8A8_UNORM_DESCS   UINT32, 8, 8, 8, 8, 16, 8, 0, 24
 
#define DXGI_FORMAT_A8_UNORM_DESCS   UINT8, 0, 0, 0, 8, 0, 0, 0, 0
 
#define DXGI_FORMAT_R8_UNORM_DESCS   UINT8, 8, 0, 0, 0, 0, 0, 0, 0
 
#define DXGI_FORMAT_B5G6R5_UNORM_DESCS   UINT16, 5, 6, 5, 0, 11, 5, 0, 0
 
#define DXGI_FORMAT_B5G5R5A1_UNORM_DESCS   UINT16, 5, 5, 5, 1, 10, 5, 0, 11
 
#define DXGI_FORMAT_B4G4R4A4_UNORM_DESCS   UINT16, 4, 4, 4, 4, 8, 4, 0, 12
 
#define DXGI_FORMAT_EX_A4R4G4B4_UNORM_DESCS   UINT16, 4, 4, 4, 4, 4, 8, 12, 0
 
#define FORMAT_SRC_LIST()
 
#define FORMAT_DST_LIST(srcfmt)
 
#define FMT_(x)   case SLANG_FORMAT_##x: return DXGI_FORMAT_##x
 
#define FMT2(x, y)   case SLANG_FORMAT_##x: return y
 

Functions

DXGI_FORMATdxgi_get_format_fallback_list (DXGI_FORMAT format)
 
void dxgi_copy (int width, int height, DXGI_FORMAT src_format, int src_pitch, const void *src_data, DXGI_FORMAT dst_format, int dst_pitch, void *dst_data)
 
void dxgi_update_title (video_frame_info_t *video_info)
 
DXGI_FORMAT glslang_format_to_dxgi (glslang_format fmt)
 

Macro Definition Documentation

◆ DXGI_FORMAT_A8_UNORM_DESCS

#define DXGI_FORMAT_A8_UNORM_DESCS   UINT8, 0, 0, 0, 8, 0, 0, 0, 0

◆ DXGI_FORMAT_B4G4R4A4_UNORM_DESCS

#define DXGI_FORMAT_B4G4R4A4_UNORM_DESCS   UINT16, 4, 4, 4, 4, 8, 4, 0, 12

◆ DXGI_FORMAT_B5G5R5A1_UNORM_DESCS

#define DXGI_FORMAT_B5G5R5A1_UNORM_DESCS   UINT16, 5, 5, 5, 1, 10, 5, 0, 11

◆ DXGI_FORMAT_B5G6R5_UNORM_DESCS

#define DXGI_FORMAT_B5G6R5_UNORM_DESCS   UINT16, 5, 6, 5, 0, 11, 5, 0, 0

◆ DXGI_FORMAT_B8G8R8A8_UNORM_DESCS

#define DXGI_FORMAT_B8G8R8A8_UNORM_DESCS   UINT32, 8, 8, 8, 8, 16, 8, 0, 24

◆ DXGI_FORMAT_B8G8R8X8_UNORM_DESCS

#define DXGI_FORMAT_B8G8R8X8_UNORM_DESCS   UINT32, 8, 8, 8, 0, 16, 8, 0, 0

◆ DXGI_FORMAT_EX_A4R4G4B4_UNORM_DESCS

#define DXGI_FORMAT_EX_A4R4G4B4_UNORM_DESCS   UINT16, 4, 4, 4, 4, 4, 8, 12, 0

◆ DXGI_FORMAT_R8_UNORM_DESCS

#define DXGI_FORMAT_R8_UNORM_DESCS   UINT8, 8, 0, 0, 0, 0, 0, 0, 0

◆ DXGI_FORMAT_R8G8B8A8_UNORM_DESCS

#define DXGI_FORMAT_R8G8B8A8_UNORM_DESCS   UINT32, 8, 8, 8, 8, 0, 8, 16, 24

◆ FMT2

#define FMT2 (   x,
  y 
)    case SLANG_FORMAT_##x: return y

◆ FMT_

#define FMT_ (   x)    case SLANG_FORMAT_##x: return DXGI_FORMAT_##x

◆ FORMAT_DST

#define FORMAT_DST (   st,
  dt 
)
Value:
case dt: \
{ \
FORMAT_PROCESS((st##_DESCS, dt##_DESCS)); \
break; \
}

◆ FORMAT_DST_LIST

#define FORMAT_DST_LIST (   srcfmt)
Value:
FORMAT_DST(srcfmt, DXGI_FORMAT_B8G8R8X8_UNORM); \
FORMAT_DST(srcfmt, DXGI_FORMAT_A8_UNORM); \
FORMAT_DST(srcfmt, DXGI_FORMAT_R8_UNORM); \
FORMAT_DST(srcfmt, DXGI_FORMAT_B5G6R5_UNORM); \
FORMAT_DST(srcfmt, DXGI_FORMAT_B5G5R5A1_UNORM); \
FORMAT_DST(srcfmt, DXGI_FORMAT_B4G4R4A4_UNORM); \
FORMAT_DST(srcfmt, DXGI_FORMAT_B8G8R8A8_UNORM); \
FORMAT_DST(srcfmt, DXGI_FORMAT_EX_A4R4G4B4_UNORM)
Definition: dxgi_common.h:795
Definition: dxgiformat.h:97
#define FORMAT_DST(st, dt)
Definition: dxgi_common.c:215
Definition: dxgiformat.h:127
Definition: dxgiformat.h:100
Definition: dxgiformat.h:77
Definition: dxgiformat.h:40
Definition: dxgiformat.h:73
Definition: dxgiformat.h:99
Definition: dxgiformat.h:98

◆ FORMAT_PROCESS

#define FORMAT_PROCESS (   args)    FORMAT_PROCESS_ args

◆ FORMAT_PROCESS_

#define FORMAT_PROCESS_ (   src_type,
  src_rb,
  src_gb,
  src_bb,
  src_ab,
  src_rs,
  src_gs,
  src_bs,
  src_as,
  dst_type,
  dst_rb,
  dst_gb,
  dst_bb,
  dst_ab,
  dst_rs,
  dst_gs,
  dst_bs,
  dst_as 
)

◆ FORMAT_SRC

#define FORMAT_SRC (   st)
Value:
case st: \
{ \
switch ((unsigned)dst_format) \
{ \
FORMAT_DST_LIST(st); \
default: \
assert(0); \
break; \
} \
break; \
}

◆ FORMAT_SRC_LIST

#define FORMAT_SRC_LIST ( )
Value:
FORMAT_SRC(DXGI_FORMAT_A8_UNORM); \
FORMAT_SRC(DXGI_FORMAT_R8_UNORM); \
FORMAT_SRC(DXGI_FORMAT_B5G6R5_UNORM); \
Definition: dxgi_common.h:795
Definition: dxgiformat.h:97
Definition: dxgiformat.h:127
Definition: dxgiformat.h:100
Definition: dxgiformat.h:77
Definition: dxgiformat.h:40
#define FORMAT_SRC(st)
Definition: dxgi_common.c:222
Definition: dxgiformat.h:73
Definition: dxgiformat.h:99
Definition: dxgiformat.h:98

Function Documentation

◆ dxgi_copy()

void dxgi_copy ( int  width,
int  height,
DXGI_FORMAT  src_format,
int  src_pitch,
const void src_data,
DXGI_FORMAT  dst_format,
int  dst_pitch,
void dst_data 
)
Here is the caller graph for this function:

◆ dxgi_get_format_fallback_list()

DXGI_FORMAT* dxgi_get_format_fallback_list ( DXGI_FORMAT  format)
Here is the caller graph for this function:

◆ dxgi_update_title()

void dxgi_update_title ( video_frame_info_t video_info)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ glslang_format_to_dxgi()

DXGI_FORMAT glslang_format_to_dxgi ( glslang_format  fmt)
Here is the caller graph for this function: