}
static void
-nouveau_depth_range(struct gl_context *ctx, GLclampd nearval, GLclampd farval)
+nouveau_read_buffer(struct gl_context *ctx, GLenum buffer)
{
- context_dirty(ctx, VIEWPORT);
+ nouveau_validate_framebuffer(ctx);
}
static void
}
static void
-nouveau_polygon_offset(struct gl_context *ctx, GLfloat factor, GLfloat units)
+nouveau_polygon_offset(struct gl_context *ctx, GLfloat factor, GLfloat units, GLfloat clamp)
{
context_dirty(ctx, POLYGON_OFFSET);
}
context_dirty(ctx, RENDER_MODE);
}
-static void
-nouveau_scissor(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
-{
- context_dirty(ctx, SCISSOR);
-}
-
static void
nouveau_shade_model(struct gl_context *ctx, GLenum mode)
{
}
static void
-nouveau_tex_parameter(struct gl_context *ctx, GLenum target,
+nouveau_tex_parameter(struct gl_context *ctx,
struct gl_texture_object *t, GLenum pname,
const GLfloat *params)
{
}
}
-static void
-nouveau_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
-{
- context_dirty(ctx, VIEWPORT);
-}
-
void
nouveau_emit_nothing(struct gl_context *ctx, int emit)
{
context_dirty_i(ctx, TEX_MAT, i);
}
+ if (new_state & _NEW_SCISSOR)
+ context_dirty(ctx, SCISSOR);
+
+ if (new_state & _NEW_VIEWPORT)
+ context_dirty(ctx, VIEWPORT);
+
if (new_state & _NEW_CURRENT_ATTRIB &&
new_state & _NEW_LIGHT) {
context_dirty(ctx, MATERIAL_FRONT_AMBIENT);
context_dirty(ctx, MATERIAL_BACK_SHININESS);
}
+ if (new_state & _NEW_TEXTURE) {
+ for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
+ if (ctx->Texture.Unit[i].Sampler)
+ context_dirty_i(ctx, TEX_OBJ, i);
+ }
+ }
+
_swrast_InvalidateState(ctx, new_state);
_tnl_InvalidateState(ctx, new_state);
+ _vbo_InvalidateState(ctx, new_state);
nouveau_state_emit(ctx);
}
ctx->Driver.FrontFace = nouveau_front_face;
ctx->Driver.DepthFunc = nouveau_depth_func;
ctx->Driver.DepthMask = nouveau_depth_mask;
- ctx->Driver.DepthRange = nouveau_depth_range;
+ ctx->Driver.ReadBuffer = nouveau_read_buffer;
ctx->Driver.DrawBuffers = nouveau_draw_buffers;
ctx->Driver.Enable = nouveau_enable;
ctx->Driver.Fogfv = nouveau_fog;
ctx->Driver.PolygonOffset = nouveau_polygon_offset;
ctx->Driver.PolygonStipple = nouveau_polygon_stipple;
ctx->Driver.RenderMode = nouveau_render_mode;
- ctx->Driver.Scissor = nouveau_scissor;
ctx->Driver.ShadeModel = nouveau_shade_model;
ctx->Driver.StencilFuncSeparate = nouveau_stencil_func_separate;
ctx->Driver.StencilMaskSeparate = nouveau_stencil_mask_separate;
ctx->Driver.TexGen = nouveau_tex_gen;
ctx->Driver.TexEnv = nouveau_tex_env;
ctx->Driver.TexParameter = nouveau_tex_parameter;
- ctx->Driver.Viewport = nouveau_viewport;
ctx->Driver.UpdateState = nouveau_update_state;