CSO_BIT_SAMPLE_MASK |
CSO_BIT_MIN_SAMPLES |
CSO_BIT_VIEWPORT |
- CSO_BIT_FRAGMENT_SHADER |
CSO_BIT_STREAM_OUTPUTS |
- CSO_BIT_VERTEX_SHADER |
- CSO_BIT_TESSCTRL_SHADER |
- CSO_BIT_TESSEVAL_SHADER |
- CSO_BIT_GEOMETRY_SHADER |
CSO_BIT_VERTEX_ELEMENTS |
- CSO_BIT_AUX_VERTEX_BUFFER_SLOT));
+ CSO_BIT_AUX_VERTEX_BUFFER_SLOT |
+ CSO_BIT_PAUSE_QUERIES |
+ CSO_BITS_ALL_SHADERS));
/* blend state: RGBA masking */
{
blend.rt[i].colormask |= PIPE_MASK_A;
}
- if (st->ctx->Color.DitherFlag)
+ if (ctx->Color.DitherFlag)
blend.dither = 1;
}
cso_set_blend(cso, &blend);
static inline GLboolean
is_scissor_enabled(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
+ const struct gl_scissor_rect *scissor = &ctx->Scissor.ScissorArray[0];
+
return (ctx->Scissor.EnableFlags & 1) &&
- (ctx->Scissor.ScissorArray[0].X > 0 ||
- ctx->Scissor.ScissorArray[0].Y > 0 ||
- (unsigned) ctx->Scissor.ScissorArray[0].Width < rb->Width ||
- (unsigned) ctx->Scissor.ScissorArray[0].Height < rb->Height);
+ (scissor->X > 0 ||
+ scissor->Y > 0 ||
+ scissor->X + scissor->Width < (int)rb->Width ||
+ scissor->Y + scissor->Height < (int)rb->Height);
+}
+
+/**
+ * Return if window rectangles must be enabled during the clear.
+ */
+static inline bool
+is_window_rectangle_enabled(struct gl_context *ctx)
+{
+ if (ctx->DrawBuffer == ctx->WinSysDrawBuffer)
+ return false;
+ return ctx->Scissor.NumWindowRects > 0 ||
+ ctx->Scissor.WindowRectMode == GL_INCLUSIVE_EXT;
}
GLuint i;
st_flush_bitmap_cache(st);
+ st_invalidate_readpix_cache(st);
/* This makes sure the pipe has the latest scissor, etc values */
- st_validate_state( st, ST_PIPELINE_RENDER );
+ st_validate_state(st, ST_PIPELINE_CLEAR);
if (mask & BUFFER_BITS_COLOR) {
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
continue;
if (is_scissor_enabled(ctx, rb) ||
+ is_window_rectangle_enabled(ctx) ||
is_color_masked(ctx, colormask_index))
quad_buffers |= PIPE_CLEAR_COLOR0 << i;
else
struct st_renderbuffer *strb = st_renderbuffer(depthRb);
if (strb->surface && ctx->Depth.Mask) {
- if (is_scissor_enabled(ctx, depthRb))
+ if (is_scissor_enabled(ctx, depthRb) ||
+ is_window_rectangle_enabled(ctx))
quad_buffers |= PIPE_CLEAR_DEPTH;
else
clear_buffers |= PIPE_CLEAR_DEPTH;
if (strb->surface && !is_stencil_disabled(ctx, stencilRb)) {
if (is_scissor_enabled(ctx, stencilRb) ||
+ is_window_rectangle_enabled(ctx) ||
is_stencil_masked(ctx, stencilRb))
quad_buffers |= PIPE_CLEAR_STENCIL;
else