mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 01:29:41 +01:00
Don't allow wrapping on framebuffer textures. Fixes GTA on old NV Shield
This commit is contained in:
1 parent
d72d710714
commit
6858c77612
6 files changed
+19
-17
No files matched your search
@@ -326,10 +326,12 @@ void GLQueueRunner::InitCreateFramebuffer(const GLRInitStep &step) {
|
||||
fbo->color_texture.wrapT = GL_CLAMP_TO_EDGE;
|
||||
fbo->color_texture.magFilter = GL_LINEAR;
|
||||
fbo->color_texture.minFilter = GL_LINEAR;
|
||||
fbo->color_texture.canWrap = false;
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, fbo->color_texture.wrapS);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, fbo->color_texture.wrapT);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, fbo->color_texture.magFilter);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, fbo->color_texture.minFilter);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
|
||||
|
||||
if (gl_extensions.IsGLES) {
|
||||
if (gl_extensions.OES_packed_depth_stencil) {
|
||||
@@ -846,13 +848,15 @@ void GLQueueRunner::PerformRenderPass(const GLRStep &step) {
|
||||
if (!tex) {
|
||||
break;
|
||||
}
|
||||
if (tex->wrapS != c.textureSampler.wrapS) {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, c.textureSampler.wrapS);
|
||||
tex->wrapS = c.textureSampler.wrapS;
|
||||
}
|
||||
if (tex->wrapT != c.textureSampler.wrapT) {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, c.textureSampler.wrapT);
|
||||
tex->wrapT = c.textureSampler.wrapT;
|
||||
if (tex->canWrap) {
|
||||
if (tex->wrapS != c.textureSampler.wrapS) {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, c.textureSampler.wrapS);
|
||||
tex->wrapS = c.textureSampler.wrapS;
|
||||
}
|
||||
if (tex->wrapT != c.textureSampler.wrapT) {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, c.textureSampler.wrapT);
|
||||
tex->wrapT = c.textureSampler.wrapT;
|
||||
}
|
||||
}
|
||||
if (tex->magFilter != c.textureSampler.magFilter) {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, c.textureSampler.magFilter);
|
||||
|
||||
Reference in new issue
Block a user