Low priority: OpenGL error every frame in missions with a volumetric nebula
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- cpp
- Área
- computer-graphics
Línea de trabajo
Comienza en code/graphics/opengl/gropengldeferred.cpp en la restauración de la textura emisiva después de la pasada de nebulosa volumétrica y examina las llamadas circundantes de OpenGL al estado de la textura. Reproduce el problema con una misión que contenga una nebulosa volumétrica en una compilación de depuración y luego verifica que fs2_open.log ya no informe el error GL_INVALID_OPERATION por fotograma y que el filtro de la textura emisiva esté restaurado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Low priority: nothing looks wrong on screen, it only shows up as an OpenGL error in debug logs. Found while testing another PR.
Problem
On OpenGL, a mission with a volumetric nebula logs GL_INVALID_OPERATION in glBindTexture(target mismatch) about once per frame in a debug build. Missions without a volumetric nebula don't log it, and it goes away with -no_deferred.
After the volumetric nebula draws, the code switches back to the emissive texture with the one-argument GL_state.Texture.Enable(Scene_emissive_texture) (code/graphics/opengl/gropengldeferred.cpp, line 656 on master). That binds to whichever texture unit was active last, which is the unit the nebula's 3D volume texture was just bound to. So OpenGL is asked to bind a 2D texture as a 3D one and refuses. The glTexParameteri on the next line, which is meant to put the emissive texture's filter back to GL_LINEAR, then doesn't reach the emissive texture either.
Steps to reproduce
- Build current master (I used 12a36dc1a, Debug, Linux).
- Use MediaVPs 5.0.2 and a mission with a volumetric nebula. I copied MediaVPs' SM1-01 and added a
+Volumetric Nebula:block usingvolume_noise_sphere.poffrom Beyond the Aftermath 2.2.0 (any volumetric nebula should do). - Run it on OpenGL and fly for a few seconds.
- Open
fs2_open.log.
Expected vs. actual behavior
Expected: no OpenGL errors.
Actual: OpenGL Debug: ... Type:Error ... GL_INVALID_OPERATION in glBindTexture(target mismatch) every frame (19 in the first 5 seconds). A debugger breakpoint on the error puts it in opengl_texture_state::Enable(GLuint) called from gr_opengl_deferred_lighting_finish. Seen on Mesa's software OpenGL; I haven't checked a hardware OpenGL driver.
Proposed fixes
- Name the unit and target on that line:
GL_state.Texture.Enable(1, GL_TEXTURE_2D, Scene_emissive_texture). Unit 1 is where the emissive texture was bound for the nebula pass, so the filter reset after it lands on the right texture. - Set the emissive texture's filter back without depending on which unit is active, for example by binding it explicitly first in its own small helper, so later edits to the nebula pass can't break it again.
- Make the one-argument
Enablecheck that the active unit's target matches the texture it's asked to bind (and complain in debug builds), which would catch this pattern anywhere else in the OpenGL code.
- Lenguaje dominante
- C++
- Estrellas
- 488
- Forks
- 184
- Merge medio
- 6 d 30 min
- PR fusionados (30 d)
- 40
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de scp-fs2open/fs2open.github.com
-
P3: -gr_sync_validation reports itself enabled but never turns on synchronization validationAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
scp-fs2open/fs2open.github.com#7983 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
scp-fs2open/fs2open.github.com#7969 ·
Los mantenedores suelen responder en 2 días
-
P4: Standalone web API can read past its request buffer on a large request bodyPosiblemente ocupada @dustinspace217 la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
scp-fs2open/fs2open.github.com#7965 ·
Los mantenedores suelen responder en 2 días
-
P2: A ship-specific HUD with "$Load Retail Configuration: YES" loses most of its retail gaugesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
scp-fs2open/fs2open.github.com#7956 ·
Los mantenedores suelen responder en 2 días
-
bug HUD LLM-suggested
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
scp-fs2open/fs2open.github.com#7953 ·
Los mantenedores suelen responder en 2 días
Todos los issues de scp-fs2open/fs2open.github.com
Issues similares
-
#2754 make deepseek api not workAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
xiaoyifang/goldendict-ng#3148 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
triton-inference-server/server#9069 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 4 días
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100