Commit 769769a7 by Dian Xiang

Adding in checks for program and shader names to return INVALID_OPERATION

When a valid program is given instead of a shader, an INVALID_OPERATION is returned rather than INVALID_VALUE when a shader related function is called. The reverse happens when a program related function is called and a valid shader program is given to it. This commit also refactors other places that requires a similar check to use the same validation function and error message. BUG=angleproject:1029 dEQP-GLES2.functional.negative_api.state.get_shader_info_log dEQP-GLES2.functional.negative_api.state.get_shader_source dEQP-GLES2.functional.negative_api.state.get_programiv dEQP-GLES2.functional.negative_api.state.get_program_info_log BUG=angleproject:1101 dEQP-GLES3.functional.negative_api.state.get_shader_info_log dEQP-GLES3.functional.negative_api.state.get_shader_source dEQP-GLES3.functional.negative_api.state.get_programiv dEQP-GLES3.functional.negative_api.state.get_program_info_log Change-Id: I707b6ba10da0288128af185ce8dfb906fca0f766 Reviewed-on: https://chromium-review.googlesource.com/298604Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org> Tryjob-Request: Dian Xiang <dianx@google.com> Tested-by: 's avatarDian Xiang <dianx@google.com>
parent e8f47137
...@@ -326,28 +326,50 @@ bool ValidQueryType(const Context *context, GLenum queryType) ...@@ -326,28 +326,50 @@ bool ValidQueryType(const Context *context, GLenum queryType)
} }
} }
bool ValidProgram(Context *context, GLuint id) Program *GetValidProgram(Context *context, GLuint id)
{ {
// ES3 spec (section 2.11.1) -- "Commands that accept shader or program object names will generate the // ES3 spec (section 2.11.1) -- "Commands that accept shader or program object names will generate the
// error INVALID_VALUE if the provided name is not the name of either a shader or program object and // error INVALID_VALUE if the provided name is not the name of either a shader or program object and
// INVALID_OPERATION if the provided name identifies an object that is not the expected type." // INVALID_OPERATION if the provided name identifies an object that is not the expected type."
if (context->getProgram(id) != NULL) Program *validProgram = context->getProgram(id);
{
return true; if (!validProgram)
}
else if (context->getShader(id) != NULL)
{ {
// ID is the wrong type if (context->getShader(id))
context->recordError(Error(GL_INVALID_OPERATION)); {
return false; context->recordError(
Error(GL_INVALID_OPERATION, "Expected a program name, but found a shader name"));
}
else
{
context->recordError(Error(GL_INVALID_VALUE, "Program name is not valid"));
}
} }
else
return validProgram;
}
Shader *GetValidShader(Context *context, GLuint id)
{
// See ValidProgram for spec details.
Shader *validShader = context->getShader(id);
if (!validShader)
{ {
// No shader/program object has this ID if (context->getProgram(id))
context->recordError(Error(GL_INVALID_VALUE)); {
return false; context->recordError(
Error(GL_INVALID_OPERATION, "Expected a shader name, but found a program name"));
}
else
{
context->recordError(Error(GL_INVALID_VALUE, "Shader name is invalid"));
}
} }
return validShader;
} }
bool ValidateAttachmentTarget(gl::Context *context, GLenum attachment) bool ValidateAttachmentTarget(gl::Context *context, GLenum attachment)
...@@ -1880,13 +1902,12 @@ bool ValidateGetUniformBase(Context *context, GLuint program, GLint location) ...@@ -1880,13 +1902,12 @@ bool ValidateGetUniformBase(Context *context, GLuint program, GLint location)
return false; return false;
} }
if (!ValidProgram(context, program)) gl::Program *programObject = GetValidProgram(context, program);
if (!programObject)
{ {
return false; return false;
} }
gl::Program *programObject = context->getProgram(program);
if (!programObject || !programObject->isLinked()) if (!programObject || !programObject->isLinked())
{ {
context->recordError(Error(GL_INVALID_OPERATION)); context->recordError(Error(GL_INVALID_OPERATION));
......
...@@ -24,6 +24,8 @@ namespace gl ...@@ -24,6 +24,8 @@ namespace gl
{ {
class Context; class Context;
class Program;
class Shader;
bool ValidCap(const Context *context, GLenum cap); bool ValidCap(const Context *context, GLenum cap);
bool ValidTextureTarget(const Context *context, GLenum target); bool ValidTextureTarget(const Context *context, GLenum target);
...@@ -35,7 +37,16 @@ bool ValidMipLevel(const Context *context, GLenum target, GLint level); ...@@ -35,7 +37,16 @@ bool ValidMipLevel(const Context *context, GLenum target, GLint level);
bool ValidImageSize(const Context *context, GLenum target, GLint level, GLsizei width, GLsizei height, GLsizei depth); bool ValidImageSize(const Context *context, GLenum target, GLint level, GLsizei width, GLsizei height, GLsizei depth);
bool ValidCompressedImageSize(const Context *context, GLenum internalFormat, GLsizei width, GLsizei height); bool ValidCompressedImageSize(const Context *context, GLenum internalFormat, GLsizei width, GLsizei height);
bool ValidQueryType(const Context *context, GLenum queryType); bool ValidQueryType(const Context *context, GLenum queryType);
bool ValidProgram(Context *context, GLuint id);
// Returns valid program if id is a valid program name
// Errors INVALID_OPERATION if valid shader is given and returns NULL
// Errors INVALID_VALUE otherwise and returns NULL
Program *GetValidProgram(Context *context, GLuint id);
// Returns valid shader if id is a valid shader name
// Errors INVALID_OPERATION if valid program is given and returns NULL
// Errors INVALID_VALUE otherwise and returns NULL
Shader *GetValidShader(Context *context, GLuint id);
bool ValidateAttachmentTarget(Context *context, GLenum attachment); bool ValidateAttachmentTarget(Context *context, GLenum attachment);
bool ValidateRenderbufferStorageParametersBase(Context *context, GLenum target, GLsizei samples, bool ValidateRenderbufferStorageParametersBase(Context *context, GLenum target, GLsizei samples,
......
...@@ -59,35 +59,16 @@ void GL_APIENTRY AttachShader(GLuint program, GLuint shader) ...@@ -59,35 +59,16 @@ void GL_APIENTRY AttachShader(GLuint program, GLuint shader)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
Shader *shaderObject = context->getShader(shader);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
Shader *shaderObject = GetValidShader(context, shader);
if (!shaderObject) if (!shaderObject)
{ {
if (context->getProgram(shader)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
if (!programObject->attachShader(shaderObject)) if (!programObject->attachShader(shaderObject))
...@@ -111,20 +92,11 @@ void GL_APIENTRY BindAttribLocation(GLuint program, GLuint index, const GLchar* ...@@ -111,20 +92,11 @@ void GL_APIENTRY BindAttribLocation(GLuint program, GLuint index, const GLchar*
return; return;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
if (strncmp(name, "gl_", 3) == 0) if (strncmp(name, "gl_", 3) == 0)
...@@ -698,22 +670,11 @@ void GL_APIENTRY CompileShader(GLuint shader) ...@@ -698,22 +670,11 @@ void GL_APIENTRY CompileShader(GLuint shader)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
Shader *shaderObject = context->getShader(shader); Shader *shaderObject = GetValidShader(context, shader);
if (!shaderObject) if (!shaderObject)
{ {
if (context->getProgram(shader)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
shaderObject->compile(context->getCompiler()); shaderObject->compile(context->getCompiler());
} }
} }
...@@ -1140,38 +1101,16 @@ void GL_APIENTRY DetachShader(GLuint program, GLuint shader) ...@@ -1140,38 +1101,16 @@ void GL_APIENTRY DetachShader(GLuint program, GLuint shader)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
Shader *shaderObject = context->getShader(shader);
if (!programObject) if (!programObject)
{ {
Shader *shaderByProgramHandle; return;
shaderByProgramHandle = context->getShader(program);
if (!shaderByProgramHandle)
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
else
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
} }
Shader *shaderObject = GetValidShader(context, shader);
if (!shaderObject) if (!shaderObject)
{ {
Program *programByShaderHandle = context->getProgram(shader); return;
if (!programByShaderHandle)
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
else
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
} }
if (!programObject->detachShader(shaderObject)) if (!programObject->detachShader(shaderObject))
...@@ -1608,20 +1547,11 @@ void GL_APIENTRY GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, ...@@ -1608,20 +1547,11 @@ void GL_APIENTRY GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize,
return; return;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
if (index >= (GLuint)programObject->getActiveAttributeCount()) if (index >= (GLuint)programObject->getActiveAttributeCount())
...@@ -1650,20 +1580,11 @@ void GL_APIENTRY GetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, ...@@ -1650,20 +1580,11 @@ void GL_APIENTRY GetActiveUniform(GLuint program, GLuint index, GLsizei bufsize,
return; return;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
if (index >= (GLuint)programObject->getActiveUniformCount()) if (index >= (GLuint)programObject->getActiveUniformCount())
...@@ -1690,20 +1611,11 @@ void GL_APIENTRY GetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* c ...@@ -1690,20 +1611,11 @@ void GL_APIENTRY GetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* c
return; return;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
return programObject->getAttachedShaders(maxcount, count, shaders); return programObject->getAttachedShaders(maxcount, count, shaders);
...@@ -1717,20 +1629,11 @@ GLint GL_APIENTRY GetAttribLocation(GLuint program, const GLchar* name) ...@@ -1717,20 +1629,11 @@ GLint GL_APIENTRY GetAttribLocation(GLuint program, const GLchar* name)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return -1;
{
context->recordError(Error(GL_INVALID_OPERATION));
return -1;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return -1;
}
} }
if (!programObject->isLinked()) if (!programObject->isLinked())
...@@ -2163,11 +2066,10 @@ void GL_APIENTRY GetProgramiv(GLuint program, GLenum pname, GLint* params) ...@@ -2163,11 +2066,10 @@ void GL_APIENTRY GetProgramiv(GLuint program, GLenum pname, GLint* params)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
context->recordError(Error(GL_INVALID_VALUE));
return; return;
} }
...@@ -2254,11 +2156,9 @@ void GL_APIENTRY GetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* len ...@@ -2254,11 +2156,9 @@ void GL_APIENTRY GetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* len
return; return;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
context->recordError(Error(GL_INVALID_VALUE));
return; return;
} }
...@@ -2322,21 +2222,9 @@ void GL_APIENTRY GetShaderiv(GLuint shader, GLenum pname, GLint* params) ...@@ -2322,21 +2222,9 @@ void GL_APIENTRY GetShaderiv(GLuint shader, GLenum pname, GLint* params)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
Shader *shaderObject = context->getShader(shader); Shader *shaderObject = GetValidShader(context, shader);
if (!shaderObject) if (!shaderObject)
{ {
Program *programObject = context->getProgram(shader);
if (programObject)
{
context->recordError(Error(GL_INVALID_OPERATION,
"Expected a shader name, but found a program name"));
}
else
{
context->recordError(Error(GL_INVALID_VALUE, "Shader name is invalid"));
}
return; return;
} }
...@@ -2382,11 +2270,9 @@ void GL_APIENTRY GetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* lengt ...@@ -2382,11 +2270,9 @@ void GL_APIENTRY GetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* lengt
return; return;
} }
Shader *shaderObject = context->getShader(shader); Shader *shaderObject = GetValidShader(context, shader);
if (!shaderObject) if (!shaderObject)
{ {
context->recordError(Error(GL_INVALID_VALUE));
return; return;
} }
...@@ -2482,11 +2368,9 @@ void GL_APIENTRY GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length ...@@ -2482,11 +2368,9 @@ void GL_APIENTRY GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length
return; return;
} }
Shader *shaderObject = context->getShader(shader); Shader *shaderObject = GetValidShader(context, shader);
if (!shaderObject) if (!shaderObject)
{ {
context->recordError(Error(GL_INVALID_OPERATION));
return; return;
} }
...@@ -2872,20 +2756,11 @@ GLint GL_APIENTRY GetUniformLocation(GLuint program, const GLchar* name) ...@@ -2872,20 +2756,11 @@ GLint GL_APIENTRY GetUniformLocation(GLuint program, const GLchar* name)
return -1; return -1;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return -1;
{
context->recordError(Error(GL_INVALID_OPERATION));
return -1;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return -1;
}
} }
if (!programObject->isLinked()) if (!programObject->isLinked())
...@@ -3179,20 +3054,10 @@ void GL_APIENTRY LinkProgram(GLuint program) ...@@ -3179,20 +3054,10 @@ void GL_APIENTRY LinkProgram(GLuint program)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
Error error = programObject->link(context->getData()); Error error = programObject->link(context->getData());
...@@ -3461,22 +3326,11 @@ void GL_APIENTRY ShaderSource(GLuint shader, GLsizei count, const GLchar* const* ...@@ -3461,22 +3326,11 @@ void GL_APIENTRY ShaderSource(GLuint shader, GLsizei count, const GLchar* const*
return; return;
} }
Shader *shaderObject = context->getShader(shader); Shader *shaderObject = GetValidShader(context, shader);
if (!shaderObject) if (!shaderObject)
{ {
if (context->getProgram(shader)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
shaderObject->setSource(count, string, length); shaderObject->setSource(count, string, length);
} }
} }
...@@ -4129,20 +3983,11 @@ void GL_APIENTRY ValidateProgram(GLuint program) ...@@ -4129,20 +3983,11 @@ void GL_APIENTRY ValidateProgram(GLuint program)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
programObject->validate(context->getCaps()); programObject->validate(context->getCaps());
......
...@@ -1247,14 +1247,12 @@ void GL_APIENTRY TransformFeedbackVaryings(GLuint program, GLsizei count, const ...@@ -1247,14 +1247,12 @@ void GL_APIENTRY TransformFeedbackVaryings(GLuint program, GLsizei count, const
return; return;
} }
if (!ValidProgram(context, program)) Program *programObject = GetValidProgram(context, program);
if (!programObject)
{ {
return; return;
} }
Program *programObject = context->getProgram(program);
ASSERT(programObject);
programObject->setTransformFeedbackVaryings(count, varyings, bufferMode); programObject->setTransformFeedbackVaryings(count, varyings, bufferMode);
} }
} }
...@@ -1280,14 +1278,12 @@ void GL_APIENTRY GetTransformFeedbackVarying(GLuint program, GLuint index, GLsiz ...@@ -1280,14 +1278,12 @@ void GL_APIENTRY GetTransformFeedbackVarying(GLuint program, GLuint index, GLsiz
return; return;
} }
if (!ValidProgram(context, program)) Program *programObject = GetValidProgram(context, program);
if (!programObject)
{ {
return; return;
} }
Program *programObject = context->getProgram(program);
ASSERT(programObject);
if (index >= static_cast<GLuint>(programObject->getTransformFeedbackVaryingCount())) if (index >= static_cast<GLuint>(programObject->getTransformFeedbackVaryingCount()))
{ {
context->recordError(Error(GL_INVALID_VALUE)); context->recordError(Error(GL_INVALID_VALUE));
...@@ -1991,20 +1987,11 @@ void GL_APIENTRY GetUniformIndices(GLuint program, GLsizei uniformCount, const G ...@@ -1991,20 +1987,11 @@ void GL_APIENTRY GetUniformIndices(GLuint program, GLsizei uniformCount, const G
return; return;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
if (!programObject->isLinked()) if (!programObject->isLinked())
...@@ -2044,20 +2031,11 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const ...@@ -2044,20 +2031,11 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const
return; return;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
switch (pname) switch (pname)
...@@ -2115,20 +2093,10 @@ GLuint GL_APIENTRY GetUniformBlockIndex(GLuint program, const GLchar* uniformBlo ...@@ -2115,20 +2093,10 @@ GLuint GL_APIENTRY GetUniformBlockIndex(GLuint program, const GLchar* uniformBlo
return GL_INVALID_INDEX; return GL_INVALID_INDEX;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return GL_INVALID_INDEX;
{
context->recordError(Error(GL_INVALID_OPERATION));
return GL_INVALID_INDEX;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return GL_INVALID_INDEX;
}
} }
return programObject->getUniformBlockIndex(uniformBlockName); return programObject->getUniformBlockIndex(uniformBlockName);
...@@ -2150,20 +2118,11 @@ void GL_APIENTRY GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockInde ...@@ -2150,20 +2118,11 @@ void GL_APIENTRY GetActiveUniformBlockiv(GLuint program, GLuint uniformBlockInde
context->recordError(Error(GL_INVALID_OPERATION)); context->recordError(Error(GL_INVALID_OPERATION));
return; return;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
if (uniformBlockIndex >= programObject->getActiveUniformBlockCount()) if (uniformBlockIndex >= programObject->getActiveUniformBlockCount())
...@@ -2208,20 +2167,11 @@ void GL_APIENTRY GetActiveUniformBlockName(GLuint program, GLuint uniformBlockIn ...@@ -2208,20 +2167,11 @@ void GL_APIENTRY GetActiveUniformBlockName(GLuint program, GLuint uniformBlockIn
return; return;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
if (uniformBlockIndex >= programObject->getActiveUniformBlockCount()) if (uniformBlockIndex >= programObject->getActiveUniformBlockCount())
...@@ -2254,20 +2204,11 @@ void GL_APIENTRY UniformBlockBinding(GLuint program, GLuint uniformBlockIndex, G ...@@ -2254,20 +2204,11 @@ void GL_APIENTRY UniformBlockBinding(GLuint program, GLuint uniformBlockIndex, G
return; return;
} }
Program *programObject = context->getProgram(program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
if (context->getShader(program)) return;
{
context->recordError(Error(GL_INVALID_OPERATION));
return;
}
else
{
context->recordError(Error(GL_INVALID_VALUE));
return;
}
} }
// if never linked, there won't be any uniform blocks // if never linked, there won't be any uniform blocks
......
...@@ -244,11 +244,6 @@ ...@@ -244,11 +244,6 @@
1028 WIN LINUX : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_component_unsigned_short = FAIL 1028 WIN LINUX : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_component_unsigned_short = FAIL
1028 WIN LINUX : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_component_unsigned_int = FAIL 1028 WIN LINUX : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.depth_component_unsigned_int = FAIL
1028 WIN LINUX : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.srgb8 = FAIL 1028 WIN LINUX : dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.srgb8 = FAIL
1029 WIN LINUX : dEQP-GLES2.functional.negative_api.state.get_shaderiv = FAIL
1029 WIN LINUX : dEQP-GLES2.functional.negative_api.state.get_shader_info_log = FAIL
1029 WIN LINUX : dEQP-GLES2.functional.negative_api.state.get_shader_source = FAIL
1029 WIN LINUX : dEQP-GLES2.functional.negative_api.state.get_programiv = FAIL
1029 WIN LINUX : dEQP-GLES2.functional.negative_api.state.get_program_info_log = FAIL
1029 WIN LINUX : dEQP-GLES2.functional.negative_api.texture.compressedteximage_2d_invalid_format_tex2d = FAIL 1029 WIN LINUX : dEQP-GLES2.functional.negative_api.texture.compressedteximage_2d_invalid_format_tex2d = FAIL
1029 WIN LINUX : dEQP-GLES2.functional.negative_api.texture.compressedteximage_2d_invalid_format_cube = FAIL 1029 WIN LINUX : dEQP-GLES2.functional.negative_api.texture.compressedteximage_2d_invalid_format_cube = FAIL
1128 WIN LINUX : dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_invalid_size = FAIL 1128 WIN LINUX : dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_invalid_size = FAIL
......
...@@ -1149,11 +1149,6 @@ ...@@ -1149,11 +1149,6 @@
1101 WIN : dEQP-GLES3.functional.negative_api.vertex_array.draw_range_elements = FAIL 1101 WIN : dEQP-GLES3.functional.negative_api.vertex_array.draw_range_elements = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.vertex_array.draw_range_elements_invalid_program = FAIL 1101 WIN : dEQP-GLES3.functional.negative_api.vertex_array.draw_range_elements_invalid_program = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.vertex_array.draw_range_elements_incomplete_primitive = FAIL 1101 WIN : dEQP-GLES3.functional.negative_api.vertex_array.draw_range_elements_incomplete_primitive = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.state.get_shaderiv = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.state.get_shader_info_log = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.state.get_shader_source = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.state.get_programiv = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.state.get_program_info_log = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.state.get_buffer_pointerv = FAIL 1101 WIN : dEQP-GLES3.functional.negative_api.state.get_buffer_pointerv = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.state.get_framebuffer_attachment_parameteriv = FAIL 1101 WIN : dEQP-GLES3.functional.negative_api.state.get_framebuffer_attachment_parameteriv = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.state.is_transform_feedback = FAIL 1101 WIN : dEQP-GLES3.functional.negative_api.state.is_transform_feedback = FAIL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment