aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state_inlines.h
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-03-05 15:46:56 +0100
committerChristian König <[email protected]>2011-03-05 15:46:56 +0100
commit199034a3cc46e09e7a325690ac5b2b097e90249f (patch)
tree7977b528517d926d04d7fa990b27b09c653ba087 /src/gallium/drivers/r300/r300_state_inlines.h
parent54f11a27a1ec28fcf9734f4454dee870bc0113f8 (diff)
parent533bf171d4c926e4ab6fcd0d51396b195b9e024f (diff)
Merge remote branch 'origin/master' into pipe-video
Diffstat (limited to 'src/gallium/drivers/r300/r300_state_inlines.h')
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h
index 06da04c7ad7..54dae1acd98 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -38,23 +38,24 @@ static INLINE int pack_float_16_6x(float f) {
/* Blend state. */
-static INLINE uint32_t r300_translate_blend_function(int blend_func)
+static INLINE uint32_t r300_translate_blend_function(int blend_func,
+ boolean clamp)
{
switch (blend_func) {
- case PIPE_BLEND_ADD:
- return R300_COMB_FCN_ADD_CLAMP;
- case PIPE_BLEND_SUBTRACT:
- return R300_COMB_FCN_SUB_CLAMP;
- case PIPE_BLEND_REVERSE_SUBTRACT:
- return R300_COMB_FCN_RSUB_CLAMP;
- case PIPE_BLEND_MIN:
- return R300_COMB_FCN_MIN;
- case PIPE_BLEND_MAX:
- return R300_COMB_FCN_MAX;
- default:
- fprintf(stderr, "r300: Unknown blend function %d\n", blend_func);
- assert(0);
- break;
+ case PIPE_BLEND_ADD:
+ return clamp ? R300_COMB_FCN_ADD_CLAMP : R300_COMB_FCN_ADD_NOCLAMP;
+ case PIPE_BLEND_SUBTRACT:
+ return clamp ? R300_COMB_FCN_SUB_CLAMP : R300_COMB_FCN_SUB_NOCLAMP;
+ case PIPE_BLEND_REVERSE_SUBTRACT:
+ return clamp ? R300_COMB_FCN_RSUB_CLAMP : R300_COMB_FCN_RSUB_NOCLAMP;
+ case PIPE_BLEND_MIN:
+ return R300_COMB_FCN_MIN;
+ case PIPE_BLEND_MAX:
+ return R300_COMB_FCN_MAX;
+ default:
+ fprintf(stderr, "r300: Unknown blend function %d\n", blend_func);
+ assert(0);
+ break;
}
return 0;
}