summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/SamplerCache.h
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2015-05-29 00:53:07 +0200
committerdegasus <wickmarkus@web.de>2015-05-29 14:03:03 +0200
commitc4fc141ced900bfa73b06155e5e566df131e2f67 (patch)
tree2ba8ade1ad89a0eb6ee6087387e37dac51de1cf7 /Source/Core/VideoBackends/OGL/SamplerCache.h
parent61c53babf4c5ea8e7a0f35f8f0979ae931c8de97 (diff)
OGL: Always use sampler objects.
We are used to use the texture parameter for all util draw calls, but AMD seems to have a bug where they use the sampler parameter of stage 0 if no sampler is bound to the used stage. So as workaround (and a bit as nicer code), we now use sampler objects everywhere.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/SamplerCache.h')
-rw-r--r--Source/Core/VideoBackends/OGL/SamplerCache.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/OGL/SamplerCache.h b/Source/Core/VideoBackends/OGL/SamplerCache.h
index a970fff8f8..ec469a81da 100644
--- a/Source/Core/VideoBackends/OGL/SamplerCache.h
+++ b/Source/Core/VideoBackends/OGL/SamplerCache.h
@@ -20,6 +20,8 @@ public:
void SetSamplerState(int stage, const TexMode0& tm0, const TexMode1& tm1, bool custom_tex);
void Clear();
+ void BindNearestSampler(int stage);
+ void BindLinearSampler(int stage);
private:
struct Params
@@ -73,6 +75,7 @@ private:
std::pair<Params, Value> m_active_samplers[8];
int m_last_max_anisotropy;
+ u32 m_sampler_id[2];
};
extern SamplerCache *g_sampler_cache;