[Mesa-dev] [PATCH 3/4] st/glsl_to_tgsi: enable lower_sqrt() conditionally
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Mar 17 00:06:56 UTC 2017
It relies on the force_glsl_abs_sqrt driconf option.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 0757d141fc..e22c77bf3a 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -6982,6 +6982,10 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
lower_discard(ir);
}
+ if (ctx->Const.ForceGLSLAbsSqrt) {
+ lower_sqrt(ir);
+ }
+
if (ctx->Const.GLSLOptimizeConservatively) {
/* Do it once and repeat only if there's unsupported control flow. */
do {
--
2.12.0
More information about the mesa-dev
mailing list