mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 03:44:32 +01:00
Unify/centralize SetFramebufferSamplingParams. Some include cleanup.
This commit is contained in:
1 parent
d8263d50f4
commit
5190f85c8e
16 files changed
+33
-87
No files matched your search
@@ -130,20 +130,6 @@ void TextureCacheGLES::ApplySamplingParams(const SamplerCacheKey &key) {
|
||||
MagFiltGL[magKey], key.minFilt ? GL_LINEAR : GL_NEAREST, aniso);
|
||||
}
|
||||
|
||||
void TextureCacheGLES::SetFramebufferSamplingParams(u16 bufferWidth, u16 bufferHeight, SamplerCacheKey &key) {
|
||||
UpdateSamplingParams(0, 0, key);
|
||||
key.mipEnable = false; // framebuffers can't mipmap.
|
||||
// Often the framebuffer will not match the texture size. We'll wrap/clamp in the shader in that case.
|
||||
// This happens whether we have OES_texture_npot or not.
|
||||
int w = gstate.getTextureWidth(0);
|
||||
int h = gstate.getTextureHeight(0);
|
||||
if (w != bufferWidth || h != bufferHeight) {
|
||||
key.sClamp = true;
|
||||
key.tClamp = true;
|
||||
}
|
||||
key.aniso = 0.0f;
|
||||
}
|
||||
|
||||
static void ConvertColors(void *dstBuf, const void *srcBuf, Draw::DataFormat dstFmt, int numPixels) {
|
||||
const u32 *src = (const u32 *)srcBuf;
|
||||
u32 *dst = (u32 *)dstBuf;
|
||||
|
||||
Reference in new issue
Block a user