D3D9: Fixed crash on resize.

This commit is contained in:
Branimir Karadžić 2015-09-10 13:29:12 -07:00
parent 96dea0ebfa
commit 05490b53ca

View file

@ -1422,8 +1422,11 @@ namespace bgfx { namespace d3d9
static void setSamplerState(IDirect3DDevice9* _device, DWORD _stage, D3DSAMPLERSTATETYPE _type,DWORD _value)
{
DX_CHECK(_device->SetSamplerState(_stage, _type, _value) );
if (4 > _stage)
{
DX_CHECK(_device->SetSamplerState(D3DVERTEXTEXTURESAMPLER0 + _stage, _type, _value) );
}
}
void setSamplerState(uint8_t _stage, uint32_t _flags)
{
@ -2746,8 +2749,11 @@ namespace bgfx { namespace d3d9
);
IDirect3DDevice9* device = s_renderD3D9->m_device;
DX_CHECK(device->SetTexture(_stage, m_ptr) );
if (4 > _stage)
{
DX_CHECK(device->SetTexture(D3DVERTEXTEXTURESAMPLER0 + _stage, m_ptr) );
}
}
void TextureD3D9::resolve() const
{