[host] dxgi: obtain HDR color space and monitor information
This commit is contained in:
1 parent
bde2eef175
commit
c5923b9b4d
3 files changed
+170
-2
No files matched your search
@@ -151,3 +151,43 @@ const char * GetDXGIFormatStr(DXGI_FORMAT format)
|
||||
return DXGI_FORMAT_STR[0];
|
||||
return DXGI_FORMAT_STR[format];
|
||||
}
|
||||
|
||||
static const char * DXGI_COLOR_SPACE_TYPE_STR[] =
|
||||
{
|
||||
"DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709",
|
||||
"DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709",
|
||||
"DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709",
|
||||
"DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020",
|
||||
"DXGI_COLOR_SPACE_RESERVED",
|
||||
"DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601",
|
||||
"DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601",
|
||||
"DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601",
|
||||
"DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709",
|
||||
"DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709",
|
||||
"DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020",
|
||||
"DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020",
|
||||
"DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020",
|
||||
"DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020",
|
||||
"DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020",
|
||||
"DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020",
|
||||
"DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020",
|
||||
"DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020",
|
||||
"DXGI_COLOR_SPACE_YCBCR_STUDIO_GHLG_TOPLEFT_P2020",
|
||||
"DXGI_COLOR_SPACE_YCBCR_FULL_GHLG_TOPLEFT_P2020",
|
||||
"DXGI_COLOR_SPACE_RGB_STUDIO_G24_NONE_P709",
|
||||
"DXGI_COLOR_SPACE_RGB_STUDIO_G24_NONE_P2020",
|
||||
"DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_LEFT_P709",
|
||||
"DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_LEFT_P2020",
|
||||
"DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_TOPLEFT_P2020"
|
||||
};
|
||||
|
||||
const char * GetDXGIColorSpaceTypeStr(DXGI_COLOR_SPACE_TYPE type)
|
||||
{
|
||||
if (type == DXGI_COLOR_SPACE_CUSTOM)
|
||||
return "DXGI_COLOR_SPACE_CUSTOM";
|
||||
|
||||
if (type > sizeof(DXGI_COLOR_SPACE_TYPE_STR) / sizeof(const char *))
|
||||
return "Invalid or Unknown";
|
||||
|
||||
return DXGI_COLOR_SPACE_TYPE_STR[type];
|
||||
}
|
||||
Reference in new issue
Block a user