projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7820b2c
)
glsl: fix isinf() for doubles
author
Connor Abbott
<connor.w.abbott@intel.com>
Fri, 14 Aug 2015 18:58:07 +0000
(11:58 -0700)
committer
Iago Toral Quiroga
<itoral@igalia.com>
Thu, 19 Nov 2015 08:16:18 +0000
(09:16 +0100)
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
src/glsl/builtin_functions.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/builtin_functions.cpp
b/src/glsl/builtin_functions.cpp
index eb438d9fd450e592d1d7be09d4e9dbac4321f4f1..1824b831f2861f055da056a6115a542160966434 100644
(file)
--- a/
src/glsl/builtin_functions.cpp
+++ b/
src/glsl/builtin_functions.cpp
@@
-3573,7
+3573,16
@@
builtin_builder::_isinf(builtin_available_predicate avail, const glsl_type *type
ir_constant_data infinities;
for (int i = 0; i < type->vector_elements; i++) {
- infinities.f[i] = INFINITY;
+ switch (type->base_type) {
+ case GLSL_TYPE_FLOAT:
+ infinities.f[i] = INFINITY;
+ break;
+ case GLSL_TYPE_DOUBLE:
+ infinities.d[i] = INFINITY;
+ break;
+ default:
+ unreachable("unknown type");
+ }
}
body.emit(ret(equal(abs(x), imm(type, infinities))));