diff options
author | Brian Paul <[email protected]> | 2018-01-25 12:50:12 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-01-26 13:52:48 -0700 |
commit | bacf72a18dc07ee2a9fb23e8f17aeb04ec31ea50 (patch) | |
tree | 43a24017244f7ddc5aa9d775f6211be1cd8893ee /src/mesa/main | |
parent | aff5d9c256d471de1722dbfcacdc09faa260799b (diff) |
mesa: change gl_link_status enums to uppercase
follow the convention of other enums.
Reviewed-by: Neha Bhende <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/mtypes.h | 10 | ||||
-rw-r--r-- | src/mesa/main/program_binary.c | 6 | ||||
-rw-r--r-- | src/mesa/main/program_resource.c | 2 | ||||
-rw-r--r-- | src/mesa/main/shaderapi.c | 8 | ||||
-rw-r--r-- | src/mesa/main/uniforms.c | 2 |
5 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index d6d3a075917..20aa80a52f2 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2603,7 +2603,7 @@ struct gl_linked_shader /** - * Compile status enum. compile_skipped is used to indicate the compile + * Compile status enum. COMPILE_SKIPPED is used to indicate the compile * was skipped due to the shader matching one that's been seen before by * the on-disk cache. */ @@ -2895,14 +2895,14 @@ struct gl_program_resource }; /** - * Link status enum. linking_skipped is used to indicate linking + * Link status enum. LINKING_SKIPPED is used to indicate linking * was skipped due to the shader being loaded from the on-disk cache. */ enum gl_link_status { - linking_failure = 0, - linking_success, - linking_skipped + LINKING_FAILURE = 0, + LINKING_SUCCESS, + LINKING_SKIPPED }; /** diff --git a/src/mesa/main/program_binary.c b/src/mesa/main/program_binary.c index 2786487362f..3df70059342 100644 --- a/src/mesa/main/program_binary.c +++ b/src/mesa/main/program_binary.c @@ -275,7 +275,7 @@ _mesa_program_binary(struct gl_context *ctx, struct gl_shader_program *sh_prog, binary, length); if (payload == NULL) { - sh_prog->data->LinkStatus = linking_failure; + sh_prog->data->LinkStatus = LINKING_FAILURE; return; } @@ -283,9 +283,9 @@ _mesa_program_binary(struct gl_context *ctx, struct gl_shader_program *sh_prog, blob_reader_init(&blob, payload, length - header_size); if (!read_program_payload(ctx, &blob, binary_format, sh_prog)) { - sh_prog->data->LinkStatus = linking_failure; + sh_prog->data->LinkStatus = LINKING_FAILURE; return; } - sh_prog->data->LinkStatus = linking_success; + sh_prog->data->LinkStatus = LINKING_SUCCESS; } diff --git a/src/mesa/main/program_resource.c b/src/mesa/main/program_resource.c index 5fa5d7573bf..41024d68cec 100644 --- a/src/mesa/main/program_resource.c +++ b/src/mesa/main/program_resource.c @@ -76,7 +76,7 @@ lookup_linked_program(GLuint program, const char *caller) if (!prog) return NULL; - if (prog->data->LinkStatus == linking_failure) { + if (prog->data->LinkStatus == LINKING_FAILURE) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(program not linked)", caller); return NULL; diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 91b1f4940ea..d0d2ef9a0f0 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -870,7 +870,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, } case GL_PROGRAM_SEPARABLE: /* If the program has not been linked, return initial value 0. */ - *params = (shProg->data->LinkStatus == linking_failure) ? 0 : shProg->SeparateShader; + *params = (shProg->data->LinkStatus == LINKING_FAILURE) ? 0 : shProg->SeparateShader; return; /* ARB_tessellation_shader */ @@ -1252,7 +1252,7 @@ link_program(struct gl_context *ctx, struct gl_shader_program *shProg, ralloc_free(filename); } - if (shProg->data->LinkStatus == linking_failure && + if (shProg->data->LinkStatus == LINKING_FAILURE && (ctx->_Shader->Flags & GLSL_REPORT_ERRORS)) { _mesa_debug(ctx, "Error linking program %u:\n%s\n", shProg->Name, shProg->data->InfoLog); @@ -2304,7 +2304,7 @@ _mesa_ProgramBinary(GLuint program, GLenum binaryFormat, * Since any value of binaryFormat passed "is not one of those specified as * allowable for [this] command, an INVALID_ENUM error is generated." */ - shProg->data->LinkStatus = linking_failure; + shProg->data->LinkStatus = LINKING_FAILURE; _mesa_error(ctx, GL_INVALID_ENUM, "glProgramBinary"); } else { _mesa_program_binary(ctx, shProg, binaryFormat, binary, length); @@ -2521,7 +2521,7 @@ _mesa_CreateShaderProgramv(GLenum type, GLsizei count, /* Possibly... */ if (active-user-defined-varyings-in-linked-program) { append-error-to-info-log; - shProg->data->LinkStatus = linking_failure; + shProg->data->LinkStatus = LINKING_FAILURE; } #endif } diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index ddfe9064c2d..64124e2d59d 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -1016,7 +1016,7 @@ _mesa_GetUniformLocation(GLuint programObj, const GLcharARB *name) * "If program has not been successfully linked, the error * INVALID_OPERATION is generated." */ - if (shProg->data->LinkStatus == linking_failure) { + if (shProg->data->LinkStatus == LINKING_FAILURE) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformLocation(program not linked)"); return -1; |