8 #ifndef LIBANGLE_RENDERER_D3D_D3D11_TEXTURE_FORMAT_TABLE_UTILS_H_ 9 #define LIBANGLE_RENDERER_D3D_D3D11_TEXTURE_FORMAT_TABLE_UTILS_H_ 23 return (deviceCaps.
featureLevel >= D3D_FEATURE_LEVEL_10_0);
28 return (deviceCaps.
featureLevel == D3D_FEATURE_LEVEL_9_3);
34 UINT mustSupport = D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_TEXTURECUBE |
35 D3D11_FORMAT_SUPPORT_SHADER_SAMPLE | D3D11_FORMAT_SUPPORT_MIP |
36 D3D11_FORMAT_SUPPORT_RENDER_TARGET;
40 mustSupport |= D3D11_FORMAT_SUPPORT_TEXTURE3D;
43 bool fullSupport =
false;
44 if (format == DXGI_FORMAT_B5G6R5_UNORM)
48 mustSupport |= D3D11_FORMAT_SUPPORT_MIP_AUTOGEN;
49 fullSupport = ((deviceCaps.
B5G6R5support & mustSupport) == mustSupport);
51 else if (format == DXGI_FORMAT_B4G4R4A4_UNORM)
53 fullSupport = ((deviceCaps.
B4G4R4A4support & mustSupport) == mustSupport);
55 else if (format == DXGI_FORMAT_B5G5R5A1_UNORM)
57 fullSupport = ((deviceCaps.
B5G5R5A1support & mustSupport) == mustSupport);
77 #endif // LIBANGLE_RENDERER_D3D_D3D11_TEXTURE_FORMAT_TABLE_UTILS_H_ UINT B4G4R4A4support
Definition: Renderer11.h:53
GLint GLint GLint GLsizei GLsizei GLenum format
Definition: gl2.h:403
bool OnlyFL9_3(const Renderer11DeviceCaps &deviceCaps)
Definition: texture_format_table_utils.h:26
bool OnlyFL10Plus(const Renderer11DeviceCaps &deviceCaps)
Definition: texture_format_table_utils.h:21
GLint GetMaximumClientVersion(D3D_FEATURE_LEVEL featureLevel)
Definition: renderer11_utils.cpp:1025
#define UNREACHABLE
Definition: utils.h:36
Definition: mathutil.h:804
Definition: Renderer11.h:46
D3D_FEATURE_LEVEL featureLevel
Definition: Renderer11.h:48
bool(*)(const Renderer11DeviceCaps &) FormatSupportFunction
Definition: texture_format_table_utils.h:19
UINT B5G5R5A1support
Definition: Renderer11.h:54
bool SupportsFormat(DXGI_FORMAT format, const Renderer11DeviceCaps &deviceCaps)
Definition: texture_format_table_utils.h:31
UINT B5G6R5support
Definition: Renderer11.h:52