swrast: use ASSIGN_4V() macro
[mesa.git] / src / mesa / swrast / s_feedback.c
index 606afc63ba9dce865f3b1b2ab8ef50194bf73977..aa79531277ced51fd90ce03de7c30b81c794215f 100644 (file)
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include "glheader.h"
-#include "colormac.h"
-#include "context.h"
-#include "enums.h"
-#include "feedback.h"
-#include "macros.h"
+#include "main/glheader.h"
+#include "main/colormac.h"
+#include "main/context.h"
+#include "main/enums.h"
+#include "main/feedback.h"
+#include "main/macros.h"
 
 #include "s_context.h"
 #include "s_feedback.h"
@@ -39,19 +39,14 @@ static void
 feedback_vertex(GLcontext * ctx, const SWvertex * v, const SWvertex * pv)
 {
    GLfloat win[4];
-   GLfloat color[4];
    const GLfloat *vtc = v->attrib[FRAG_ATTRIB_TEX0];
+   const GLfloat *color = v->attrib[FRAG_ATTRIB_COL0];
 
    win[0] = v->attrib[FRAG_ATTRIB_WPOS][0];
    win[1] = v->attrib[FRAG_ATTRIB_WPOS][1];
    win[2] = v->attrib[FRAG_ATTRIB_WPOS][2] / ctx->DrawBuffer->_DepthMaxF;
    win[3] = 1.0F / v->attrib[FRAG_ATTRIB_WPOS][3];
 
-   color[0] = CHAN_TO_FLOAT(pv->color[0]);
-   color[1] = CHAN_TO_FLOAT(pv->color[1]);
-   color[2] = CHAN_TO_FLOAT(pv->color[2]);
-   color[3] = CHAN_TO_FLOAT(pv->color[3]);
-
    _mesa_feedback_vertex(ctx, win, color, v->attrib[FRAG_ATTRIB_CI][0], vtc);
 }