mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-26 16:44:00 -05:00
GL: Added num mips to sampler state cache hash value.
This commit is contained in:
parent
2fdea069ac
commit
f4260eb405
2 changed files with 3 additions and 1 deletions
|
@ -190,7 +190,8 @@
|
||||||
#define BGFX_TEXTURE_MIP_POINT UINT32_C(0x00100000)
|
#define BGFX_TEXTURE_MIP_POINT UINT32_C(0x00100000)
|
||||||
#define BGFX_TEXTURE_MIP_SHIFT 20
|
#define BGFX_TEXTURE_MIP_SHIFT 20
|
||||||
#define BGFX_TEXTURE_MIP_MASK UINT32_C(0x00100000)
|
#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)
|
#define BGFX_RENDER_TARGET_NONE UINT32_C(0x00000000)
|
||||||
|
|
|
@ -708,6 +708,7 @@ namespace bgfx
|
||||||
#else
|
#else
|
||||||
if (0 == (BGFX_SAMPLER_DEFAULT_FLAGS & _flags) )
|
if (0 == (BGFX_SAMPLER_DEFAULT_FLAGS & _flags) )
|
||||||
{
|
{
|
||||||
|
_flags = (_flags&(~BGFX_TEXTURE_RESERVED_MASK) ) | (_numMips<<BGFX_TEXTURE_RESERVED_SHIFT);
|
||||||
GLuint sampler = m_samplerStateCache.find(_flags);
|
GLuint sampler = m_samplerStateCache.find(_flags);
|
||||||
|
|
||||||
if (UINT32_MAX == sampler)
|
if (UINT32_MAX == sampler)
|
||||||
|
|
Loading…
Reference in a new issue