opengles emulator: GLES2 translator / codec
fix glGetAttachedShaders NULL is allowed in count parameter fix problem with nvidia driver which returned invalid count Change-Id: Icfaa5688b04325de2890486eb87b163babaddf30
This commit is contained in:
committed by
David 'Digit' Turner
parent
0fd3ee21c8
commit
50c0fb0eff
@@ -778,7 +778,9 @@ GL_APICALL void GL_APIENTRY glGetAttachedShaders(GLuint program, GLsizei maxcou
|
||||
const GLuint globalProgramName = ctx->shareGroup()->getGlobalName(SHADER,program);
|
||||
SET_ERROR_IF(globalProgramName==0, GL_INVALID_VALUE);
|
||||
ctx->dispatcher().glGetAttachedShaders(globalProgramName,maxcount,count,shaders);
|
||||
for(int i=0 ; i < *count ;i++){
|
||||
GLint numShaders=0;
|
||||
ctx->dispatcher().glGetProgramiv(globalProgramName,GL_ATTACHED_SHADERS,&numShaders);
|
||||
for(int i=0 ; i < maxcount && i<numShaders ;i++){
|
||||
shaders[i] = ctx->shareGroup()->getLocalName(SHADER,shaders[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ glGetAttachedShaders
|
||||
len shaders (maxcount*sizeof(GLuint))
|
||||
dir shaders out
|
||||
dir count out
|
||||
var_flag count nullAllowed
|
||||
len count (sizeof(GLsizei))
|
||||
|
||||
#int glGetAttribLocation(GLuint program, GLchar *name)
|
||||
|
||||
Reference in New Issue
Block a user