projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eff70f6
)
clamp colors during float->int conversion
author
Brian
<brian.paul@tungstengraphics.com>
Mon, 14 Jan 2008 23:37:13 +0000
(16:37 -0700)
committer
Brian
<brian.paul@tungstengraphics.com>
Mon, 14 Jan 2008 23:37:13 +0000
(16:37 -0700)
src/mesa/pipe/cell/spu/spu_tri.c
patch
|
blob
|
history
diff --git
a/src/mesa/pipe/cell/spu/spu_tri.c
b/src/mesa/pipe/cell/spu/spu_tri.c
index b42b321c32855adca62629be337842fc49db8973..ddd5e662d2f507cd0c3e0b8df3e4ec520e325cac 100644
(file)
--- a/
src/mesa/pipe/cell/spu/spu_tri.c
+++ b/
src/mesa/pipe/cell/spu/spu_tri.c
@@
-236,6
+236,10
@@
pack_color(const float color[4])
uint g = (uint) (color[1] * 255.0);
uint b = (uint) (color[2] * 255.0);
uint a = (uint) (color[3] * 255.0);
+ r = MIN2(r, 255);
+ g = MIN2(g, 255);
+ b = MIN2(b, 255);
+ a = MIN2(a, 255);
switch (spu.fb.color_format) {
case PIPE_FORMAT_A8R8G8B8_UNORM:
return (a << 24) | (r << 16) | (g << 8) | b;