#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
return 0x5;
case GL_INVERT:
return 0x6;
+ case GL_INCR_WRAP:
+ return 0x7;
+ case GL_DECR_WRAP:
+ return 0x8;
default:
assert(0);
}
}
void
-nv04_defer_control(GLcontext *ctx, int emit)
+nv04_defer_control(struct gl_context *ctx, int emit)
{
context_dirty(ctx, CONTROL);
}
void
-nv04_emit_control(GLcontext *ctx, int emit)
+nv04_emit_control(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *fahrenheit = nv04_context_engine(ctx);
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. */
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)
}
void
-nv04_defer_blend(GLcontext *ctx, int emit)
+nv04_defer_blend(struct gl_context *ctx, int emit)
{
context_dirty(ctx, BLEND);
}
void
-nv04_emit_blend(GLcontext *ctx, int emit)
+nv04_emit_blend(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *fahrenheit = nv04_context_engine(ctx);
else
blend |= NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_FLAT;
+ /* Secondary color */
+ if (NEED_SECONDARY_COLOR(ctx))
+ blend |= NV04_MULTITEX_TRIANGLE_BLEND_SPECULAR_ENABLE;
+
/* Fog. */
if (ctx->Fog.Enabled)
blend |= NV04_MULTITEX_TRIANGLE_BLEND_FOG_ENABLE;
else
blend |= get_texenv_mode(GL_MODULATE);
+ /* Secondary color */
+ if (NEED_SECONDARY_COLOR(ctx))
+ blend |= NV04_TEXTURED_TRIANGLE_BLEND_SPECULAR_ENABLE;
+
/* Fog. */
if (ctx->Fog.Enabled)
blend |= NV04_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE;