* _NEW_BUFFERS to make sure we emit new SURFACE_STATE with the new fast
* clear color value.
*/
- brw->state.dirty.mesa |= _NEW_LIGHT | _NEW_BUFFERS;
+ brw->NewGLState |= _NEW_LIGHT | _NEW_BUFFERS;
brw->ctx.NewDriverState |= BRW_NEW_FRAGMENT_PROGRAM;
}
* color before resolve and sets irb->mt->fast_clear_state to UNRESOLVED if
* we render to it.
*/
- brw->state.dirty.mesa |= _NEW_BUFFERS;
+ brw->NewGLState |= _NEW_BUFFERS;
/* Set the custom state back to normal and dirty the same bits as above */
static inline bool
brw_state_dirty(struct brw_context *brw, GLuint mesa_flags, uint64_t brw_flags)
{
- return ((brw->state.dirty.mesa & mesa_flags) |
+ return ((brw->NewGLState & mesa_flags) |
(brw->ctx.NewDriverState & brw_flags)) != 0;
}
/* We need to make sure that the programs get regenerated, since
* any offsets leftover in brw_context will no longer be valid.
*/
- brw->state.dirty.mesa |= ~0;
+ brw->NewGLState |= ~0;
brw->ctx.NewDriverState |= ~0ull;
intel_batchbuffer_flush(brw);
}
brw_upload_initial_gpu_state(brw);
- brw->state.dirty.mesa = ~0;
+ brw->NewGLState = ~0;
brw->ctx.NewDriverState = ~0ull;
/* ~0 is a nonsensical value which won't match anything we program, so
merge_ctx_state(struct brw_context *brw,
struct brw_state_flags *state)
{
- state->mesa |= brw->state.dirty.mesa;
+ state->mesa |= brw->NewGLState;
+ assert(brw->state.dirty.mesa == 0);
state->brw |= brw->ctx.NewDriverState;
assert(brw->state.dirty.brw == 0ull);
}
static int dirty_count = 0;
struct brw_state_flags state = brw->state.pipelines[pipeline];
- brw_state->mesa |= brw->NewGLState;
- brw->NewGLState = 0;
-
if (0) {
/* Always re-emit all state. */
- brw_state->mesa |= ~0;
+ brw->NewGLState = ~0;
ctx->NewDriverState = ~0ull;
}
/* Save all dirty state into the other pipelines */
for (int i = 0; i < BRW_NUM_PIPELINES; i++) {
if (i != pipeline) {
- brw->state.pipelines[i].mesa |= state->mesa;
+ brw->state.pipelines[i].mesa |= brw->NewGLState;
brw->state.pipelines[i].brw |= brw->ctx.NewDriverState;
} else {
memset(&brw->state.pipelines[i], 0, sizeof(struct brw_state_flags));
}
}
+ brw->NewGLState = 0;
brw->ctx.NewDriverState = 0ull;
memset(state, 0, sizeof(*state));
}