diff options
author | Brian Paul <brianp@vmware.com> | 2010-09-20 13:26:27 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-09-20 13:26:27 -0600 |
commit | b7a5eac1f3723a369885bad369a04c456bdf1565 (patch) | |
tree | c3b1f75725a6e9062a63f8a70928755ad7feeefc /src | |
parent | 924c18da95bbc62492f8e54bd8273a4981a919dc (diff) |
llvmpipe: clean-up, comments in setup_point_coefficient()
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_point.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c index 5521cbbe87..fb4fb2c436 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_point.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c @@ -152,6 +152,7 @@ setup_point_coefficients( struct lp_setup_context *setup, struct lp_rast_triangle *point, const struct point_info *info) { + const struct lp_fragment_shader *shader = setup->fs.current.variant->shader; unsigned fragcoord_usage_mask = TGSI_WRITEMASK_XYZ; unsigned slot; @@ -172,12 +173,16 @@ setup_point_coefficients( struct lp_setup_context *setup, fragcoord_usage_mask |= usage_mask; break; + case LP_INTERP_LINEAR: + /* Sprite tex coords may use linear interpolation someday */ + /* fall-through */ + case LP_INTERP_PERSPECTIVE: - /* For point sprite textures */ - if (setup->fs.current.variant->shader->info.input_semantic_name[slot] - == TGSI_SEMANTIC_GENERIC) - { - int index = setup->fs.current.variant->shader->info.input_semantic_index[slot]; + /* check if the sprite coord flag is set for this attribute. + * If so, set it up so it up so x any y vary from 0 to 1. + */ + if (shader->info.input_semantic_name[slot] == TGSI_SEMANTIC_GENERIC) { + const int index = shader->info.input_semantic_index[slot]; if (setup->sprite & (1 << index)) { for (i = 0; i < NUM_CHANNELS; i++) |