diff options
author | Paul Berry <stereotype441@gmail.com> | 2013-02-23 08:36:40 -0800 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2013-03-15 09:26:07 -0700 |
commit | f117abe66414e25be4f7bc61ca0df9e83ddaf543 (patch) | |
tree | 4dad2e8a97d6897fc0939f890ee8bd40885b4d8f /src/mesa/drivers/dri/i965/gen6_sf_state.c | |
parent | 10a131211ef18fa1d368dee394045df945dcbb6e (diff) | |
download | external_mesa3d-f117abe66414e25be4f7bc61ca0df9e83ddaf543.zip external_mesa3d-f117abe66414e25be4f7bc61ca0df9e83ddaf543.tar.gz external_mesa3d-f117abe66414e25be4f7bc61ca0df9e83ddaf543.tar.bz2 |
Get rid of _mesa_frag_attrib_to_vert_result().
Now that there is no difference between the enums that represent
vertex outputs and fragment inputs, there's no need for a conversion
function.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_sf_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_sf_state.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c index 3da220d..74b232f 100644 --- a/src/mesa/drivers/dri/i965/gen6_sf_state.c +++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c @@ -56,24 +56,23 @@ uint32_t get_attr_override(struct brw_vue_map *vue_map, int urb_entry_read_offset, int fs_attr, bool two_side_color, uint32_t *max_source_attr) { - int vs_attr = _mesa_frag_attrib_to_vert_result(fs_attr); - if (vs_attr < 0 || vs_attr == VARYING_SLOT_POS) { - /* These attributes will be overwritten by the fragment shader's - * interpolation code (see emit_interp() in brw_wm_fp.c), so just let - * them reference the first available attribute. + if (fs_attr == FRAG_ATTRIB_WPOS) { + /* This attribute will be overwritten by the fragment shader's + * interpolation code (see emit_interp() in brw_wm_fp.c), so just let it + * reference the first available attribute. */ return 0; } /* Find the VUE slot for this attribute. */ - int slot = vue_map->vert_result_to_slot[vs_attr]; + int slot = vue_map->vert_result_to_slot[fs_attr]; /* If there was only a back color written but not front, use back * as the color instead of undefined */ - if (slot == -1 && vs_attr == VARYING_SLOT_COL0) + if (slot == -1 && fs_attr == VARYING_SLOT_COL0) slot = vue_map->vert_result_to_slot[VARYING_SLOT_BFC0]; - if (slot == -1 && vs_attr == VARYING_SLOT_COL1) + if (slot == -1 && fs_attr == VARYING_SLOT_COL1) slot = vue_map->vert_result_to_slot[VARYING_SLOT_BFC1]; if (slot == -1) { |