projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27a88a9
)
util: Tiny optimisation for the linear→srgb conversion
author
Neil Roberts
<neil@linux.intel.com>
Thu, 26 Nov 2015 16:53:42 +0000
(17:53 +0100)
committer
Neil Roberts
<neil@linux.intel.com>
Fri, 27 Nov 2015 09:55:22 +0000
(10:55 +0100)
When converting 0.0 it would be nice if it didn't do any arithmetic.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/util/format_srgb.h
patch
|
blob
|
history
diff --git
a/src/util/format_srgb.h
b/src/util/format_srgb.h
index
4a8d73f
..
34b50af
100644
(file)
--- a/
src/util/format_srgb.h
+++ b/
src/util/format_srgb.h
@@
-57,7
+57,7
@@
util_format_linear_to_srgb_helper_table[104];
static inline float
util_format_linear_to_srgb_float(float cl)
{
- if (cl < 0.0f)
+ if (cl <
=
0.0f)
return 0.0f;
else if (cl < 0.0031308f)
return 12.92f * cl;