pipeline_mask = ST_PIPELINE_RENDER_STATE_MASK;
break;
+ case ST_PIPELINE_CLEAR:
+ st_manager_validate_framebuffers(st);
+ pipeline_mask = ST_PIPELINE_CLEAR_STATE_MASK;
+ break;
+
+ case ST_PIPELINE_UPDATE_FRAMEBUFFER:
+ st_manager_validate_framebuffers(st);
+ pipeline_mask = ST_PIPELINE_UPDATE_FB_STATE_MASK;
+ break;
+
case ST_PIPELINE_COMPUTE: {
struct st_compute_program *old_cp = st->cp;
struct gl_program *new_cp = ctx->ComputeProgram._Current;
*/
enum st_pipeline {
ST_PIPELINE_RENDER,
+ ST_PIPELINE_CLEAR,
+ ST_PIPELINE_UPDATE_FRAMEBUFFER,
ST_PIPELINE_COMPUTE,
};
/* All state flags within each group: */
#define ST_PIPELINE_RENDER_STATE_MASK (ST_NEW_CS_STATE - 1)
#define ST_PIPELINE_COMPUTE_STATE_MASK (0xffllu << ST_NEW_CS_STATE_INDEX)
+#define ST_PIPELINE_CLEAR_STATE_MASK (ST_NEW_FB_STATE | \
+ ST_NEW_SCISSOR | \
+ ST_NEW_WINDOW_RECTANGLES)
+/* For ReadPixels, ReadBuffer, GetSamplePosition: */
+#define ST_PIPELINE_UPDATE_FB_STATE_MASK (ST_NEW_FB_STATE)
#define ST_ALL_STATES_MASK (ST_PIPELINE_RENDER_STATE_MASK | \
ST_PIPELINE_COMPUTE_STATE_MASK)
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++) {
/* add the buffer */
st_manager_add_color_renderbuffer(st, fb, fb->_ColorReadBufferIndex);
_mesa_update_state(ctx);
- st_validate_state(st, ST_PIPELINE_RENDER);
+ st_validate_state(st, ST_PIPELINE_UPDATE_FRAMEBUFFER);
}
}
{
struct st_context *st = st_context(ctx);
- st_validate_state(st, ST_PIPELINE_RENDER);
+ st_validate_state(st, ST_PIPELINE_UPDATE_FRAMEBUFFER);
if (st->pipe->get_sample_position)
st->pipe->get_sample_position(st->pipe,
/* Validate state (to be sure we have up-to-date framebuffer surfaces)
* and flush the bitmap cache prior to reading. */
- st_validate_state(st, ST_PIPELINE_RENDER);
+ st_validate_state(st, ST_PIPELINE_UPDATE_FRAMEBUFFER);
st_flush_bitmap_cache(st);
if (!st->prefer_blit_based_texture_transfer) {