Mesa (master): llvmpipe: handle FACING interpolants in line and point setup
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Sat Sep 25 11:40:50 UTC 2010
Module: Mesa
Branch: master
Commit: 60a45b03c389f708c513bb2b70c5973175f01068
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=60a45b03c389f708c513bb2b70c5973175f01068
Author: Keith Whitwell <keithw at vmware.com>
Date: Fri Sep 24 10:30:52 2010 +0100
llvmpipe: handle FACING interpolants in line and point setup
---
src/gallium/drivers/llvmpipe/lp_setup_line.c | 6 ++++++
src/gallium/drivers/llvmpipe/lp_setup_point.c | 16 +++++++++++++---
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c
index 829eb8a..156bd63 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_line.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c
@@ -208,6 +208,12 @@ static void setup_line_coefficients( struct lp_setup_context *setup,
fragcoord_usage_mask |= usage_mask;
break;
+ case LP_INTERP_FACING:
+ for (i = 0; i < NUM_CHANNELS; i++)
+ if (usage_mask & (1 << i))
+ constant_coef(setup, tri, slot+1, 1.0, i);
+ break;
+
default:
assert(0);
}
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c
index 2c354d1..a95c157 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_point.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c
@@ -232,13 +232,23 @@ setup_point_coefficients( struct lp_setup_context *setup,
break;
}
}
-
- /* Otherwise fallthrough */
- default:
+ /* FALLTHROUGH */
+ case LP_INTERP_CONSTANT:
for (i = 0; i < NUM_CHANNELS; i++) {
if (usage_mask & (1 << i))
constant_coef(setup, point, slot+1, info->v0[vert_attr][i], i);
}
+ break;
+
+ case LP_INTERP_FACING:
+ for (i = 0; i < NUM_CHANNELS; i++)
+ if (usage_mask & (1 << i))
+ constant_coef(setup, point, slot+1, 1.0, i);
+ break;
+
+ default:
+ assert(0);
+ break;
}
}
More information about the mesa-commit
mailing list