summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2018-01-25 12:50:12 -0700
committerBrian Paul <[email protected]>2018-01-26 13:52:48 -0700
commitbacf72a18dc07ee2a9fb23e8f17aeb04ec31ea50 (patch)
tree43a24017244f7ddc5aa9d775f6211be1cd8893ee
parentaff5d9c256d471de1722dbfcacdc09faa260799b (diff)
mesa: change gl_link_status enums to uppercase
follow the convention of other enums. Reviewed-by: Neha Bhende <[email protected]>
-rw-r--r--src/compiler/glsl/linker.cpp6
-rw-r--r--src/compiler/glsl/shader_cache.cpp2
-rw-r--r--src/compiler/glsl/standalone.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_cs.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_disk_cache.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_link.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_tcs.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_tes.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c2
-rw-r--r--src/mesa/main/mtypes.h10
-rw-r--r--src/mesa/main/program_binary.c6
-rw-r--r--src/mesa/main/program_resource.c2
-rw-r--r--src/mesa/main/shaderapi.c8
-rw-r--r--src/mesa/main/uniforms.c2
-rw-r--r--src/mesa/program/ir_to_mesa.cpp12
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp2
-rw-r--r--src/mesa/state_tracker/st_shader_cache.c2
18 files changed, 35 insertions, 35 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 39fc3459d3a..ce101935b01 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -456,7 +456,7 @@ linker_error(gl_shader_program *prog, const char *fmt, ...)
ralloc_vasprintf_append(&prog->data->InfoLog, fmt, ap);
va_end(ap);
- prog->data->LinkStatus = linking_failure;
+ prog->data->LinkStatus = LINKING_FAILURE;
}
@@ -2282,7 +2282,7 @@ link_intrastage_shaders(void *mem_ctx,
_mesa_shader_stage_to_program(shader_list[0]->Stage),
prog->Name, false);
if (!gl_prog) {
- prog->data->LinkStatus = linking_failure;
+ prog->data->LinkStatus = LINKING_FAILURE;
_mesa_delete_linked_shader(ctx, linked);
return NULL;
}
@@ -4748,7 +4748,7 @@ linker_optimisation_loop(struct gl_context *ctx, exec_list *ir,
void
link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
{
- prog->data->LinkStatus = linking_success; /* All error paths will set this to false */
+ prog->data->LinkStatus = LINKING_SUCCESS; /* All error paths will set this to false */
prog->data->Validated = false;
/* Section 7.3 (Program Objects) of the OpenGL 4.5 Core Profile spec says:
diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index bdc045e1db6..bf884af7906 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -248,7 +248,7 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
}
/* This is used to flag a shader retrieved from cache */
- prog->data->LinkStatus = linking_skipped;
+ prog->data->LinkStatus = LINKING_SKIPPED;
/* Since the program load was successful, CompileStatus of all shaders at
* this point should normally be compile_skipped. However because of how
diff --git a/src/compiler/glsl/standalone.cpp b/src/compiler/glsl/standalone.cpp
index 6ece0746419..c989aeff71a 100644
--- a/src/compiler/glsl/standalone.cpp
+++ b/src/compiler/glsl/standalone.cpp
@@ -520,7 +520,7 @@ standalone_compile_shader(const struct standalone_options *_options,
} else {
const gl_shader_stage stage = whole_program->Shaders[0]->Stage;
- whole_program->data->LinkStatus = linking_success;
+ whole_program->data->LinkStatus = LINKING_SUCCESS;
whole_program->_LinkedShaders[stage] =
link_intrastage_shaders(whole_program /* mem_ctx */,
ctx,
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c
index 71d0beaae97..e3f8fc67a4b 100644
--- a/src/mesa/drivers/dri/i965/brw_cs.c
+++ b/src/mesa/drivers/dri/i965/brw_cs.c
@@ -62,7 +62,7 @@ brw_codegen_cs_prog(struct brw_context *brw,
memset(&prog_data, 0, sizeof(prog_data));
if (cp->program.info.cs.shared_size > 64 * 1024) {
- cp->program.sh.data->LinkStatus = linking_failure;
+ cp->program.sh.data->LinkStatus = LINKING_FAILURE;
const char *error_str =
"Compute shader used more than 64KB of shared variables";
ralloc_strcat(&cp->program.sh.data->InfoLog, error_str);
@@ -94,7 +94,7 @@ brw_codegen_cs_prog(struct brw_context *brw,
&prog_data, cp->program.nir, st_index,
&error_str);
if (program == NULL) {
- cp->program.sh.data->LinkStatus = linking_failure;
+ cp->program.sh.data->LinkStatus = LINKING_FAILURE;
ralloc_strcat(&cp->program.sh.data->InfoLog, error_str);
_mesa_problem(NULL, "Failed to compile compute shader: %s\n", error_str);
diff --git a/src/mesa/drivers/dri/i965/brw_disk_cache.c b/src/mesa/drivers/dri/i965/brw_disk_cache.c
index 65bb52726eb..7d965f6d0d9 100644
--- a/src/mesa/drivers/dri/i965/brw_disk_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_disk_cache.c
@@ -263,7 +263,7 @@ brw_disk_cache_upload_program(struct brw_context *brw, gl_shader_stage stage)
if (brw->ctx._Shader->Flags & GLSL_CACHE_FALLBACK)
goto fail;
- if (prog->sh.data->LinkStatus != linking_skipped)
+ if (prog->sh.data->LinkStatus != LINKING_SKIPPED)
goto fail;
if (!read_and_upload(brw, cache, prog, stage))
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp
index 64267671c05..fc35c006dcd 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -225,7 +225,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
unsigned int stage;
struct shader_info *infos[MESA_SHADER_STAGES] = { 0, };
- if (shProg->data->LinkStatus == linking_skipped)
+ if (shProg->data->LinkStatus == LINKING_SKIPPED)
return GL_TRUE;
for (stage = 0; stage < ARRAY_SIZE(shProg->_LinkedShaders); stage++) {
diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c
index 4424efea4f0..931ef64166c 100644
--- a/src/mesa/drivers/dri/i965/brw_tcs.c
+++ b/src/mesa/drivers/dri/i965/brw_tcs.c
@@ -232,7 +232,7 @@ brw_codegen_tcs_prog(struct brw_context *brw, struct brw_program *tcp,
&error_str);
if (program == NULL) {
if (tep) {
- tep->program.sh.data->LinkStatus = linking_failure;
+ tep->program.sh.data->LinkStatus = LINKING_FAILURE;
ralloc_strcat(&tep->program.sh.data->InfoLog, error_str);
}
diff --git a/src/mesa/drivers/dri/i965/brw_tes.c b/src/mesa/drivers/dri/i965/brw_tes.c
index 4222d4231fe..2f3697ce961 100644
--- a/src/mesa/drivers/dri/i965/brw_tes.c
+++ b/src/mesa/drivers/dri/i965/brw_tes.c
@@ -106,7 +106,7 @@ brw_codegen_tes_prog(struct brw_context *brw,
brw_compile_tes(compiler, brw, mem_ctx, key, &input_vue_map, &prog_data,
nir, &tep->program, st_index, &error_str);
if (program == NULL) {
- tep->program.sh.data->LinkStatus = linking_failure;
+ tep->program.sh.data->LinkStatus = LINKING_FAILURE;
ralloc_strcat(&tep->program.sh.data->InfoLog, error_str);
_mesa_problem(NULL, "Failed to compile tessellation evaluation shader: "
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 985d0bf04f0..22c7493e231 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -224,7 +224,7 @@ brw_codegen_vs_prog(struct brw_context *brw,
st_index, &error_str);
if (program == NULL) {
if (!vp->program.is_arb_asm) {
- vp->program.sh.data->LinkStatus = linking_failure;
+ vp->program.sh.data->LinkStatus = LINKING_FAILURE;
ralloc_strcat(&vp->program.sh.data->InfoLog, error_str);
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 0072bdd0fb4..cfc2d47a679 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -181,7 +181,7 @@ brw_codegen_wm_prog(struct brw_context *brw,
if (program == NULL) {
if (!fp->program.is_arb_asm) {
- fp->program.sh.data->LinkStatus = linking_failure;
+ fp->program.sh.data->LinkStatus = LINKING_FAILURE;
ralloc_strcat(&fp->program.sh.data->InfoLog, error_str);
}
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;
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 321d8870e4c..660e2c1bd04 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -3088,7 +3088,7 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
prog->data = _mesa_create_shader_program_data();
- prog->data->LinkStatus = linking_success;
+ prog->data->LinkStatus = LINKING_SUCCESS;
for (i = 0; i < prog->NumShaders; i++) {
if (!prog->Shaders[i]->CompileStatus) {
@@ -3114,21 +3114,21 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
link_shaders(ctx, prog);
}
- /* If LinkStatus is linking_success, then reset sampler validated to true.
+ /* If LinkStatus is LINKING_SUCCESS, then reset sampler validated to true.
* Validation happens via the LinkShader call below. If LinkStatus is
- * linking_skipped, then SamplersValidated will have been restored from the
+ * LINKING_SKIPPED, then SamplersValidated will have been restored from the
* shader cache.
*/
- if (prog->data->LinkStatus == linking_success) {
+ if (prog->data->LinkStatus == LINKING_SUCCESS) {
prog->SamplersValidated = GL_TRUE;
}
if (prog->data->LinkStatus && !ctx->Driver.LinkShader(ctx, prog)) {
- prog->data->LinkStatus = linking_failure;
+ prog->data->LinkStatus = LINKING_FAILURE;
}
/* Return early if we are loading the shader from on-disk cache */
- if (prog->data->LinkStatus == linking_skipped)
+ if (prog->data->LinkStatus == LINKING_SKIPPED)
return;
if (ctx->_Shader->Flags & GLSL_DUMP) {
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index e855b32cc15..094c79ade9e 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -363,7 +363,7 @@ fail_link(struct gl_shader_program *prog, const char *fmt, ...)
ralloc_vasprintf_append(&prog->data->InfoLog, fmt, args);
va_end(args);
- prog->data->LinkStatus = linking_failure;
+ prog->data->LinkStatus = LINKING_FAILURE;
}
int
diff --git a/src/mesa/state_tracker/st_shader_cache.c b/src/mesa/state_tracker/st_shader_cache.c
index a971b0d7ee7..b1b9d275f84 100644
--- a/src/mesa/state_tracker/st_shader_cache.c
+++ b/src/mesa/state_tracker/st_shader_cache.c
@@ -289,7 +289,7 @@ st_load_tgsi_from_disk_cache(struct gl_context *ctx,
/* If we didn't load the GLSL metadata from cache then we could not have
* loaded the tgsi either.
*/
- if (prog->data->LinkStatus != linking_skipped)
+ if (prog->data->LinkStatus != LINKING_SKIPPED)
return false;
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {