Added fragment depth caps flag.

This commit is contained in:
bkaradzic 2013-12-15 12:30:23 -08:00
parent ee8a277774
commit 2fdea069ac
4 changed files with 8 additions and 1 deletions

View file

@ -246,6 +246,7 @@
#define BGFX_CAPS_VERTEX_ATTRIB_HALF UINT64_C(0x0000000000020000) #define BGFX_CAPS_VERTEX_ATTRIB_HALF UINT64_C(0x0000000000020000)
#define BGFX_CAPS_INSTANCING UINT64_C(0x0000000000040000) #define BGFX_CAPS_INSTANCING UINT64_C(0x0000000000040000)
#define BGFX_CAPS_RENDERER_MULTITHREADED UINT64_C(0x0000000000080000) #define BGFX_CAPS_RENDERER_MULTITHREADED UINT64_C(0x0000000000080000)
#define BGFX_CAPS_FRAGMENT_DEPTH UINT64_C(0x0000000000100000)
/// ///
#define BGFX_HANDLE(_name) \ #define BGFX_HANDLE(_name) \

View file

@ -491,6 +491,7 @@ namespace bgfx
| BGFX_CAPS_INSTANCING | BGFX_CAPS_INSTANCING
| BGFX_CAPS_TEXTURE_3D | BGFX_CAPS_TEXTURE_3D
| BGFX_CAPS_VERTEX_ATTRIB_HALF | BGFX_CAPS_VERTEX_ATTRIB_HALF
| BGFX_CAPS_FRAGMENT_DEPTH
); );
g_caps.maxTextureSize = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; g_caps.maxTextureSize = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION;

View file

@ -410,6 +410,7 @@ namespace bgfx
g_caps.supported |= ( 0 g_caps.supported |= ( 0
| BGFX_CAPS_TEXTURE_3D | BGFX_CAPS_TEXTURE_3D
| BGFX_CAPS_VERTEX_ATTRIB_HALF | BGFX_CAPS_VERTEX_ATTRIB_HALF
| BGFX_CAPS_FRAGMENT_DEPTH
); );
g_caps.maxTextureSize = bx::uint32_min(m_caps.MaxTextureWidth, m_caps.MaxTextureHeight); g_caps.maxTextureSize = bx::uint32_min(m_caps.MaxTextureWidth, m_caps.MaxTextureHeight);

View file

@ -1775,7 +1775,7 @@ namespace bgfx
void writeString(bx::WriterI* _writer, const char* _str) void writeString(bx::WriterI* _writer, const char* _str)
{ {
bx::write(_writer, _str, strlen(_str) ); bx::write(_writer, _str, (int32_t)strlen(_str) );
} }
const char* findMatch(const char* _str, const char* _word) const char* findMatch(const char* _str, const char* _word)
@ -2597,6 +2597,10 @@ namespace bgfx
? BGFX_CAPS_VERTEX_ATTRIB_HALF ? BGFX_CAPS_VERTEX_ATTRIB_HALF
: 0 : 0
; ;
g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL|BGFX_CONFIG_RENDERER_OPENGLES3)|s_extension[Extension::EXT_frag_depth].m_supported
? BGFX_CAPS_FRAGMENT_DEPTH
: 0
;
g_caps.maxTextureSize = glGet(GL_MAX_TEXTURE_SIZE); g_caps.maxTextureSize = glGet(GL_MAX_TEXTURE_SIZE);
s_renderCtx->m_vaoSupport = !!BGFX_CONFIG_RENDERER_OPENGLES3 s_renderCtx->m_vaoSupport = !!BGFX_CONFIG_RENDERER_OPENGLES3