Merge branch 'master' of github.com:bkaradzic/bgfx

This commit is contained in:
bkaradzic 2013-12-20 16:42:01 -08:00
commit 0f3d6037a6
4 changed files with 11 additions and 2 deletions

View file

@ -190,7 +190,8 @@
#define BGFX_TEXTURE_MIP_POINT UINT32_C(0x00100000)
#define BGFX_TEXTURE_MIP_SHIFT 20
#define BGFX_TEXTURE_MIP_MASK UINT32_C(0x00100000)
#define BGFX_TEXTURE_RESERVED_MASK UINT32_C(0xf0000000)
#define BGFX_TEXTURE_RESERVED_SHIFT 24
#define BGFX_TEXTURE_RESERVED_MASK UINT32_C(0xff000000)
///
#define BGFX_RENDER_TARGET_NONE UINT32_C(0x00000000)
@ -246,6 +247,7 @@
#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_CAPS_FRAGMENT_DEPTH UINT64_C(0x0000000000100000)
///
#define BGFX_HANDLE(_name) \

View file

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

View file

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

View file

@ -708,6 +708,7 @@ namespace bgfx
#else
if (0 == (BGFX_SAMPLER_DEFAULT_FLAGS & _flags) )
{
_flags = (_flags&(~BGFX_TEXTURE_RESERVED_MASK) ) | (_numMips<<BGFX_TEXTURE_RESERVED_SHIFT);
GLuint sampler = m_samplerStateCache.find(_flags);
if (UINT32_MAX == sampler)
@ -1775,7 +1776,7 @@ namespace bgfx
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)
@ -2597,6 +2598,10 @@ namespace bgfx
? BGFX_CAPS_VERTEX_ATTRIB_HALF
: 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);
s_renderCtx->m_vaoSupport = !!BGFX_CONFIG_RENDERER_OPENGLES3