r300g: only set clip_halfz for chips with HW TCL
authorMarek Olšák <marek.olsak@amd.com>
Tue, 28 Oct 2014 10:12:27 +0000 (11:12 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 28 Oct 2014 22:20:45 +0000 (23:20 +0100)
I forgot that we cannot emit vertex shader state on a chip without VS.
In such a case, clip_halfz is handled by the Draw module.

src/gallium/drivers/r300/r300_state.c

index cfcc19d1c68d2e1136e8ca78d2a8c9609804f6d9..6ce03293e94b394d37fee54289af9a5e5d3886ac 100644 (file)
@@ -1432,7 +1432,7 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state)
         }
     }
 
-    if (last_clip_halfz != r300->clip_halfz) {
+    if (r300->screen->caps.has_tcl && last_clip_halfz != r300->clip_halfz) {
         r300_mark_atom_dirty(r300, &r300->vs_state);
     }
 }