Added vertex attrib half caps.

This commit is contained in:
bkaradzic 2013-12-02 19:47:12 -08:00
parent 5c1c86bba7
commit 25002b301d
4 changed files with 18 additions and 5 deletions

View file

@ -243,8 +243,9 @@
#define BGFX_CAPS_TEXTURE_FORMAT_PTC22 UINT64_C(0x0000000000002000)
#define BGFX_CAPS_TEXTURE_FORMAT_PTC24 UINT64_C(0x0000000000004000)
#define BGFX_CAPS_TEXTURE_3D UINT64_C(0x0000000000010000)
#define BGFX_CAPS_INSTANCING UINT64_C(0x0000000000020000)
#define BGFX_CAPS_RENDERER_MULTITHREADED UINT64_C(0x0000000000040000)
#define BGFX_CAPS_VERTEX_ATTRIB_HALF UINT64_C(0x0000000000020000)
#define BGFX_CAPS_INSTANCING UINT64_C(0x0000000000040000)
#define BGFX_CAPS_RENDERER_MULTITHREADED UINT64_C(0x0000000000080000)
///
#define BGFX_HANDLE(_name) \
@ -316,7 +317,7 @@ namespace bgfx
{
Uint8,
Int16,
Half,
Half, // Availability depends on: BGFX_CAPS_VERTEX_ATTRIB_HALF.
Float,
Count
@ -325,6 +326,7 @@ namespace bgfx
struct TextureFormat
{
// Availability depends on BGFX_CAPS_TEXTURE_FORMAT_*.
enum Enum
{
BC1, // DXT1

View file

@ -490,6 +490,7 @@ namespace bgfx
g_caps.supported |= ( 0
| BGFX_CAPS_INSTANCING
| BGFX_CAPS_TEXTURE_3D
| BGFX_CAPS_VERTEX_ATTRIB_HALF
);
g_caps.maxTextureSize = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION;

View file

@ -407,7 +407,10 @@ namespace bgfx
| BGFX_CAPS_TEXTURE_FORMAT_BC2
| BGFX_CAPS_TEXTURE_FORMAT_BC3
);
g_caps.supported |= BGFX_CAPS_TEXTURE_3D;
g_caps.supported |= ( 0
| BGFX_CAPS_TEXTURE_3D
| BGFX_CAPS_VERTEX_ATTRIB_HALF
);
g_caps.maxTextureSize = bx::uint32_min(m_caps.MaxTextureWidth, m_caps.MaxTextureHeight);
#if BGFX_CONFIG_RENDERER_USE_EXTENSIONS

View file

@ -2409,7 +2409,14 @@ namespace bgfx
| ptc1Supported ? BGFX_CAPS_TEXTURE_FORMAT_PTC12|BGFX_CAPS_TEXTURE_FORMAT_PTC14|BGFX_CAPS_TEXTURE_FORMAT_PTC14A|BGFX_CAPS_TEXTURE_FORMAT_PTC12A : 0
| ptc2Supported ? BGFX_CAPS_TEXTURE_FORMAT_PTC22|BGFX_CAPS_TEXTURE_FORMAT_PTC24 : 0
);
g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL|BGFX_CONFIG_RENDERER_OPENGLES3) ? BGFX_CAPS_TEXTURE_3D : 0;
g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL|BGFX_CONFIG_RENDERER_OPENGLES3)
? BGFX_CAPS_TEXTURE_3D
: 0
;
g_caps.supported |= BGFX_CONFIG_RENDERER_OPENGL|BGFX_CONFIG_RENDERER_OPENGLES3|s_extension[Extension::OES_vertex_half_float].m_supported
? BGFX_CAPS_VERTEX_ATTRIB_HALF
: 0
;
g_caps.maxTextureSize = glGet(GL_MAX_TEXTURE_SIZE);
s_renderCtx->m_vaoSupport = !!BGFX_CONFIG_RENDERER_OPENGLES3