glsl: fix clockARB builtin function
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 30 Mar 2017 06:54:46 +0000 (08:54 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 31 Mar 2017 05:56:25 +0000 (07:56 +0200)
The underlying intrinsic is defined to always have a uvec2 return type.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/compiler/glsl/builtin_functions.cpp

index e30509a4acd78f1525507251bc3fdba83b9b70ff..683217d7a35a26d95aa6e841236224aa400929cf 100644 (file)
@@ -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));