Mesa (master): glsl: fix clockARB builtin function

Nicolai Hähnle nh at kemper.freedesktop.org
Fri Mar 31 05:57:01 UTC 2017


Module: Mesa
Branch: master
Commit: 44125b29d1924e3a24ee86c022c69749aaa38e07
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=44125b29d1924e3a24ee86c022c69749aaa38e07

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Thu Mar 30 08:54:46 2017 +0200

glsl: fix clockARB builtin function

The underlying intrinsic is defined to always have a uvec2 return type.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/compiler/glsl/builtin_functions.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp
index e30509a4ac..683217d7a3 100644
--- a/src/compiler/glsl/builtin_functions.cpp
+++ b/src/compiler/glsl/builtin_functions.cpp
@@ -5947,7 +5947,7 @@ builtin_builder::_shader_clock(builtin_available_predicate avail,
 {
    MAKE_SIG(type, avail, 0);
 
-   ir_variable *retval = body.make_temp(type, "clock_retval");
+   ir_variable *retval = body.make_temp(glsl_type::uvec2_type, "clock_retval");
 
    body.emit(call(shader->symbols->get_function("__intrinsic_shader_clock"),
                   retval, sig->parameters));




More information about the mesa-commit mailing list