mcst-linux-kernel/patches-2024.06.26/gl4es-1.1.4/0128-Fixed-again-issue-with...

33 lines
1.2 KiB
Diff

From f3cea7e39866d82522080626ab2d0955df6a4d55 Mon Sep 17 00:00:00 2001
From: ptitSeb <sebastien.chev@gmail.com>
Date: Wed, 24 Mar 2021 08:48:08 +0100
Subject: [PATCH 128/233] Fixed (again) issue with attached texture paramters
(should help #276)
---
src/gl/texture_params.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gl/texture_params.c b/src/gl/texture_params.c
index c84819fe..0f09b261 100644
--- a/src/gl/texture_params.c
+++ b/src/gl/texture_params.c
@@ -771,12 +771,12 @@ void realize_1texture(GLenum target, int wantedTMU, gltexture_t* tex, glsampler_
// check sampler stuff
if(!sampler) sampler = &tex->sampler;
GLuint oldtex = 0;
+ int TMU = (wantedTMU==-1)?glstate->gleshard->active:wantedTMU;
if(wantedTMU==-1) {
- gltexture_t *bound = glstate->texture.bound[glstate->texture.active][ENABLED_TEX2D];
+ gltexture_t *bound = glstate->texture.bound[TMU][ENABLED_TEX2D];
oldtex = bound->glname;
if (oldtex!=tex->glname) gles_glBindTexture(GL_TEXTURE_2D, tex->glname);
}
- int TMU = (wantedTMU==-1)?glstate->texture.active:TMU;
GLenum param;
param = get_texture_min_filter(tex, sampler);
if(tex->actual.min_filter!=param) {
--
2.11.0