mesa: begin implementation of GL_ARB_draw_buffers_blend
[mesa.git] / src / mesa / drivers / dri / nouveau / nv04_state_raster.c
index a114f44b22bf6dd49ab26bc1e4d3a445715bead5..ecfbdfedff6641391bbe94f48fdfbab7ccd94917 100644 (file)
@@ -27,7 +27,8 @@
 #include "nouveau_driver.h"
 #include "nouveau_context.h"
 #include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv_object.xml.h"
+#include "nv04_3d.xml.h"
 #include "nv04_driver.h"
 
 static unsigned
@@ -142,7 +143,7 @@ nv04_emit_control(struct gl_context *ctx, int emit)
                int cull_mode = ctx->Polygon.CullFaceMode;
                int front_face = ctx->Polygon.FrontFace;
                uint32_t ctrl0 = 1 << 30 |
-                       NV04_MULTITEX_TRIANGLE_CONTROL0_ORIGIN;
+                       NV04_MULTITEX_TRIANGLE_CONTROL0_ORIGIN_CORNER;
                uint32_t ctrl1 = 0, ctrl2 = 0;
 
                /* Color mask. */
@@ -210,7 +211,7 @@ nv04_emit_control(struct gl_context *ctx, int emit)
                int cull_mode = ctx->Polygon.CullFaceMode;
                int front_face = ctx->Polygon.FrontFace;
                uint32_t ctrl = 1 << 30 |
-                       NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN;
+                       NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN_CORNER;
 
                /* Dithering. */
                if (ctx->Color.DitherFlag)
@@ -263,8 +264,8 @@ nv04_emit_blend(struct gl_context *ctx, int emit)
                        NV04_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE;
 
                /* Alpha blending. */
-               blend |= get_blend_func(ctx->Color.BlendDstRGB) << 28 |
-                       get_blend_func(ctx->Color.BlendSrcRGB) << 24;
+               blend |= get_blend_func(ctx->Color.Blend[0].DstRGB) << 28 |
+                       get_blend_func(ctx->Color.Blend[0].SrcRGB) << 24;
 
                if (ctx->Color.BlendEnabled)
                        blend |= NV04_MULTITEX_TRIANGLE_BLEND_BLEND_ENABLE;
@@ -295,8 +296,8 @@ nv04_emit_blend(struct gl_context *ctx, int emit)
                        NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE;
 
                /* Alpha blending. */
-               blend |= get_blend_func(ctx->Color.BlendDstRGB) << 28 |
-                       get_blend_func(ctx->Color.BlendSrcRGB) << 24;
+               blend |= get_blend_func(ctx->Color.Blend[0].DstRGB) << 28 |
+                       get_blend_func(ctx->Color.Blend[0].SrcRGB) << 24;
 
                if (ctx->Color.BlendEnabled)
                        blend |= NV04_TEXTURED_TRIANGLE_BLEND_BLEND_ENABLE;