summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-22 19:59:27 +0100
committerMarek Olšák <[email protected]>2017-02-25 00:03:09 +0100
commite027935a795ecf546f3e4abcc25655766f9615ac (patch)
tree0022dfc08cfa224309eee5f5913fa0b9a95c7c57 /src/mesa/state_tracker/st_atom.c
parentcc2f92b09f8ab0470106185585fdc1282da523e6 (diff)
st/mesa: don't update unrelated states in non-draw calls such as Clear
If a VAO isn't bound and u_vbuf isn't enabled because of the Core profile, we'll get user vertex buffers in drivers if we update vertex buffers in glClear. So don't do that. This fixes a regression since disabling u_vbuf for Core profiles. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_atom.c')
-rw-r--r--src/mesa/state_tracker/st_atom.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 65ac5170fdf..4bef3423b07 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -176,6 +176,16 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline )
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;