wined3d: Initialize maxAttribs in case it isn't changed by glGetIntegerv.
Philip Nilsson
pnilsson at nullref.se
Sat Mar 22 12:28:52 CDT 2008
My OpenGL implementation (NVIDIA's binary driver, version 169.12)
returns GL_NO_ERROR in this function, but doesn't change the passed
value. Uninitialized maxAttribs might be about 1500000 and thus
generate a couple hundred megabytes of GL_CHECK_CALL errors.
16 is what is set if glGetIntegerv returns some error, and is also the
minimum value required by an implementation.
---
dlls/wined3d/state.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 616b28f..355a5b6 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -3003,7 +3003,7 @@ static inline void unloadVertexData(IWineD3DStateBlockImpl *stateblock) {
*/
static inline void unloadNumberedArrays(IWineD3DStateBlockImpl *stateblock) {
/* disable any attribs (this is the same for both GLSL and ARB modes) */
- GLint maxAttribs;
+ GLint maxAttribs = 16;
int i;
/* Leave all the attribs disabled */
--
1.5.4.2
More information about the wine-patches
mailing list