mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #898 from PCSX2/gsdx-aniso-hw-unit
gsdx-ogl: only enable aniso when sampling from the HW texture unit
This commit is contained in:
commit
059d4a1306
|
@ -562,10 +562,10 @@ void GSDeviceOGL::ClearStencil(GSTexture* t, uint8 c)
|
|||
|
||||
GLuint GSDeviceOGL::CreateSampler(PSSamplerSelector sel)
|
||||
{
|
||||
return CreateSampler(sel.ltf, sel.tau, sel.tav);
|
||||
return CreateSampler(sel.ltf, sel.tau, sel.tav, sel.aniso);
|
||||
}
|
||||
|
||||
GLuint GSDeviceOGL::CreateSampler(bool bilinear, bool tau, bool tav)
|
||||
GLuint GSDeviceOGL::CreateSampler(bool bilinear, bool tau, bool tav, bool aniso)
|
||||
{
|
||||
GL_PUSH("Create Sampler");
|
||||
|
||||
|
@ -594,7 +594,7 @@ GLuint GSDeviceOGL::CreateSampler(bool bilinear, bool tau, bool tav)
|
|||
glSamplerParameterf(sampler, GL_TEXTURE_MAX_LOD, 6);
|
||||
|
||||
int anisotropy = theApp.GetConfig("MaxAnisotropy", 0);
|
||||
if (GLLoader::found_GL_EXT_texture_filter_anisotropic && anisotropy && !theApp.GetConfig("paltex", 0))
|
||||
if (GLLoader::found_GL_EXT_texture_filter_anisotropic && anisotropy && aniso)
|
||||
glSamplerParameterf(sampler, GL_TEXTURE_MAX_ANISOTROPY_EXT, (float)anisotropy);
|
||||
|
||||
GL_POP();
|
||||
|
|
|
@ -312,8 +312,9 @@ class GSDeviceOGL : public GSDevice
|
|||
uint32 tau:1;
|
||||
uint32 tav:1;
|
||||
uint32 ltf:1;
|
||||
uint32 aniso:1;
|
||||
|
||||
uint32 _free:29;
|
||||
uint32 _free:28;
|
||||
};
|
||||
|
||||
uint32 key;
|
||||
|
@ -439,7 +440,7 @@ class GSDeviceOGL : public GSDevice
|
|||
|
||||
GLuint m_vs[1<<5];
|
||||
GLuint m_gs[1<<2];
|
||||
GLuint m_ps_ss[1<<3];
|
||||
GLuint m_ps_ss[1<<4];
|
||||
GSDepthStencilOGL* m_om_dss[1<<4];
|
||||
hash_map<uint64, GLuint > m_ps;
|
||||
GLuint m_apitrace;
|
||||
|
@ -533,7 +534,7 @@ class GSDeviceOGL : public GSDevice
|
|||
GLuint CompileVS(VSSelector sel, int logz);
|
||||
GLuint CompileGS(GSSelector sel);
|
||||
GLuint CompilePS(PSSelector sel);
|
||||
GLuint CreateSampler(bool bilinear, bool tau, bool tav);
|
||||
GLuint CreateSampler(bool bilinear, bool tau, bool tav, bool aniso = false);
|
||||
GLuint CreateSampler(PSSamplerSelector sel);
|
||||
GSDepthStencilOGL* CreateDepthStencil(OMDepthStencilSelector dssel);
|
||||
|
||||
|
|
|
@ -900,6 +900,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
|||
ps_ssel.tau = (m_context->CLAMP.WMS != CLAMP_CLAMP);
|
||||
ps_ssel.tav = (m_context->CLAMP.WMT != CLAMP_CLAMP);
|
||||
ps_ssel.ltf = bilinear && simple_sample;
|
||||
ps_ssel.aniso = simple_sample;
|
||||
|
||||
// Setup Texture ressources
|
||||
dev->SetupSampler(ps_ssel);
|
||||
|
|
Loading…
Reference in New Issue