This commit is contained in:
Branimir Karadžić 2014-07-30 20:34:26 -07:00
parent 1d0a9841d7
commit f580110d7f
4 changed files with 1 additions and 20 deletions

View file

@ -127,16 +127,7 @@ namespace stl
#define BGFX_DEFAULT_WIDTH 1280
#define BGFX_DEFAULT_HEIGHT 720
#define BGFX_STATE_TEX0 UINT64_C(0x0100000000000000)
#define BGFX_STATE_TEX1 UINT64_C(0x0200000000000000)
#define BGFX_STATE_TEX2 UINT64_C(0x0400000000000000)
#define BGFX_STATE_TEX3 UINT64_C(0x0800000000000000)
#define BGFX_STATE_TEX4 UINT64_C(0x1000000000000000)
#define BGFX_STATE_TEX5 UINT64_C(0x2000000000000000)
#define BGFX_STATE_TEX6 UINT64_C(0x4000000000000000)
#define BGFX_STATE_TEX7 UINT64_C(0x8000000000000000)
#define BGFX_STATE_TEX_MASK UINT64_C(0xff00000000000000)
#define BGFX_STATE_TEX_COUNT 8
#define BGFX_STATE_TEX_COUNT 16
#define BGFX_MAX_COMPUTE_BINDINGS 8
@ -1274,7 +1265,6 @@ namespace bgfx
void setTexture(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint32_t _flags)
{
m_flags |= BGFX_STATE_TEX0<<_stage;
Sampler& sampler = m_draw.m_sampler[_stage];
sampler.m_idx = _handle.idx;
sampler.m_flags = (_flags&BGFX_SAMPLER_DEFAULT_FLAGS) ? BGFX_SAMPLER_DEFAULT_FLAGS : _flags;

View file

@ -2980,10 +2980,8 @@ namespace bgfx
}
}
// if (BGFX_STATE_TEX_MASK & changedFlags)
{
uint32_t changes = 0;
uint64_t flag = BGFX_STATE_TEX0;
for (uint32_t stage = 0; stage < BGFX_STATE_TEX_COUNT; ++stage)
{
const Sampler& sampler = draw.m_sampler[stage];
@ -3007,7 +3005,6 @@ namespace bgfx
}
current = sampler;
flag <<= 1;
}
if (0 < changes)

View file

@ -2974,9 +2974,7 @@ namespace bgfx
}
}
// if (BGFX_STATE_TEX_MASK & changedFlags)
{
uint64_t flag = BGFX_STATE_TEX0;
for (uint32_t stage = 0; stage < BGFX_STATE_TEX_COUNT; ++stage)
{
const Sampler& sampler = draw.m_sampler[stage];
@ -2996,7 +2994,6 @@ namespace bgfx
}
current = sampler;
flag <<= 1;
}
}

View file

@ -4423,9 +4423,7 @@ namespace bgfx
}
}
// if (BGFX_STATE_TEX_MASK & changedFlags)
{
uint64_t flag = BGFX_STATE_TEX0;
for (uint32_t stage = 0; stage < BGFX_STATE_TEX_COUNT; ++stage)
{
const Sampler& sampler = draw.m_sampler[stage];
@ -4442,7 +4440,6 @@ namespace bgfx
}
current = sampler;
flag <<= 1;
}
}