summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-11-22 13:10:18 +1100
committerTimothy Arceri <[email protected]>2017-01-19 17:05:26 +1100
commitae28c5a60c4d0986be22c250f8d6727661406596 (patch)
tree8e7e6543d1bef4ed5ac03af21130a4eae6ac8bb3
parent5c93d274231ad36934c5338747ce14b95231031d (diff)
st/mesa/glsl: set early_fragment_tests directly in shader_info
We also move EarlyFragmentTests out of the gl_shader_info struct as it is now only used by gl_shader. Reviewed-by: Lionel Landwerlin <[email protected]>
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp2
-rw-r--r--src/compiler/glsl/linker.cpp4
-rw-r--r--src/mesa/main/mtypes.h12
-rw-r--r--src/mesa/main/shaderapi.c1
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp2
5 files changed, 10 insertions, 11 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 1b84876079d..2b4dce0d359 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -1815,7 +1815,7 @@ set_shader_inout_layout(struct gl_shader *shader,
shader->info.origin_upper_left = state->fs_origin_upper_left;
shader->info.ARB_fragment_coord_conventions_enable =
state->ARB_fragment_coord_conventions_enable;
- shader->info.EarlyFragmentTests = state->fs_early_fragment_tests;
+ shader->EarlyFragmentTests = state->fs_early_fragment_tests;
shader->info.InnerCoverage = state->fs_inner_coverage;
shader->info.PostDepthCoverage = state->fs_post_depth_coverage;
shader->BlendSupport = state->fs_blend_support;
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 7073eac9d91..9e85155b6da 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -1887,8 +1887,8 @@ link_fs_inout_layout_qualifiers(struct gl_shader_program *prog,
shader->info.pixel_center_integer;
}
- linked_shader->info.EarlyFragmentTests |=
- shader->info.EarlyFragmentTests;
+ linked_shader->Program->info.fs.early_fragment_tests |=
+ shader->EarlyFragmentTests;
linked_shader->info.InnerCoverage |=
shader->info.InnerCoverage;
linked_shader->Program->info.fs.post_depth_coverage |=
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index f123142dc5c..94fc6e97f47 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2316,12 +2316,6 @@ struct gl_shader_info
} Geom;
/**
- * Whether early fragment tests are enabled as defined by
- * ARB_shader_image_load_store.
- */
- bool EarlyFragmentTests;
-
- /**
* Compute shader state from ARB_compute_shader and
* ARB_compute_variable_group_size layout qualifiers.
*/
@@ -2434,6 +2428,12 @@ struct gl_shader
*/
GLbitfield BlendSupport;
+ /**
+ * Whether early fragment tests are enabled as defined by
+ * ARB_shader_image_load_store.
+ */
+ bool EarlyFragmentTests;
+
struct gl_shader_info info;
};
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 3502cb2ee60..80cac37e8ec 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -2232,7 +2232,6 @@ _mesa_copy_linked_program_data(const struct gl_shader_program *src,
}
case MESA_SHADER_FRAGMENT: {
dst->info.fs.depth_layout = src->FragDepthLayout;
- dst->info.fs.early_fragment_tests = dst_sh->info.EarlyFragmentTests;
dst->info.fs.inner_coverage = dst_sh->info.InnerCoverage;
dst->info.fs.post_depth_coverage = dst_sh->info.PostDepthCoverage;
break;
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 4bdb3a6532e..a99e99178c6 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -6151,7 +6151,7 @@ st_translate_program(
}
if (procType == PIPE_SHADER_FRAGMENT) {
- if (program->shader->info.EarlyFragmentTests)
+ if (program->shader->Program->info.fs.early_fragment_tests)
ureg_property(ureg, TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL, 1);
if (proginfo->info.inputs_read & VARYING_BIT_POS) {