Fixed issue #225.

This commit is contained in:
Branimir Karadžić 2015-01-20 22:07:30 -08:00
parent a7756b8d7a
commit be8c9576f5
2 changed files with 10 additions and 7 deletions

View file

@ -160,17 +160,17 @@ namespace bgfx
{
0x10, // min linear
0x00, // min point
0x55, // anisotopic
0x55, // anisotropic
},
{
0x04, // mag linear
0x00, // mag point
0x55, // anisotopic
0x55, // anisotropic
},
{
0x01, // mip linear
0x00, // mip point
0x55, // anisotopic
0x55, // anisotropic
},
};
@ -1714,7 +1714,7 @@ namespace bgfx
sd.AddressV = s_textureAddress[(_flags&BGFX_TEXTURE_V_MASK)>>BGFX_TEXTURE_V_SHIFT];
sd.AddressW = s_textureAddress[(_flags&BGFX_TEXTURE_W_MASK)>>BGFX_TEXTURE_W_SHIFT];
sd.MipLODBias = 0.0f;
sd.MaxAnisotropy = 1;
sd.MaxAnisotropy = D3D11_REQ_MAXANISOTROPY;
sd.ComparisonFunc = 0 == cmpFunc ? D3D11_COMPARISON_NEVER : s_cmpFunc[cmpFunc];
sd.BorderColor[0] = 0.0f;
sd.BorderColor[1] = 0.0f;

View file

@ -459,6 +459,8 @@ namespace bgfx
m_caps.NumSimultaneousRTs = bx::uint32_min(m_caps.NumSimultaneousRTs, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS);
g_caps.maxFBAttachments = (uint8_t)m_caps.NumSimultaneousRTs;
m_caps.MaxAnisotropy = bx::uint32_min(m_caps.MaxAnisotropy, 1);
if (BX_ENABLED(BGFX_CONFIG_RENDERER_USE_EXTENSIONS) )
{
BX_TRACE("Extended formats:");
@ -1241,12 +1243,13 @@ namespace bgfx
D3DTEXTUREFILTERTYPE minFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MIN_MASK)>>BGFX_TEXTURE_MIN_SHIFT];
D3DTEXTUREFILTERTYPE magFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MAG_MASK)>>BGFX_TEXTURE_MAG_SHIFT];
D3DTEXTUREFILTERTYPE mipFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MIP_MASK)>>BGFX_TEXTURE_MIP_SHIFT];
DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_ADDRESSU, tau) );
DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_ADDRESSV, tav) );
DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_ADDRESSU, tau) );
DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_ADDRESSV, tav) );
DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_ADDRESSW, taw) );
DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_MINFILTER, minFilter) );
DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_MAGFILTER, magFilter) );
DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_MIPFILTER, mipFilter) );
DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_ADDRESSW, taw) );
DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_MAXANISOTROPY, m_caps.MaxAnisotropy) );
}
}