/** gl_context::Stencil */
uint64_t NewStencil;
+
+ /** gl_context::Transform::Clip* */
+ uint64_t NewClipControl;
+
+ /** gl_context::ViewportArray */
+ uint64_t NewViewport;
};
struct gl_uniform_buffer_binding
GLfloat x, GLfloat y,
GLfloat width, GLfloat height)
{
- FLUSH_VERTICES(ctx, _NEW_VIEWPORT);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewViewport ? 0 : _NEW_VIEWPORT);
+ ctx->NewDriverState |= ctx->DriverFlags.NewViewport;
/* clamp width and height to the implementation dependent range */
width = MIN2(width, (GLfloat) ctx->Const.MaxViewportWidth);
ctx->ViewportArray[idx].Far == farval)
return;
+ /* The depth range is needed by program state constants. */
FLUSH_VERTICES(ctx, _NEW_VIEWPORT);
+ ctx->NewDriverState |= ctx->DriverFlags.NewViewport;
ctx->ViewportArray[idx].Near = CLAMP(nearval, 0.0, 1.0);
ctx->ViewportArray[idx].Far = CLAMP(farval, 0.0, 1.0);
return;
/* Affects transform state and the viewport transform */
- FLUSH_VERTICES(ctx, _NEW_TRANSFORM | _NEW_VIEWPORT);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewClipControl ? 0 :
+ _NEW_TRANSFORM | _NEW_VIEWPORT);
+ ctx->NewDriverState |= ctx->DriverFlags.NewClipControl;
if (ctx->Transform.ClipOrigin != origin) {
ctx->Transform.ClipOrigin = origin;
if (new_state & _NEW_POLYGONSTIPPLE)
st->dirty |= ST_NEW_POLY_STIPPLE;
- if (new_state & _NEW_VIEWPORT)
- st->dirty |= ST_NEW_VIEWPORT;
-
if (new_state & _NEW_FRAG_CLAMP) {
if (st->clamp_frag_color_in_shader)
st->dirty |= ST_NEW_FS_STATE;
} else {
f->NewSampleShading |= ST_NEW_RASTERIZER;
}
+
+ f->NewClipControl = ST_NEW_VIEWPORT | ST_NEW_RASTERIZER;
+ f->NewViewport = ST_NEW_VIEWPORT;
}
struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,