summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-02-20 16:11:52 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-02-21 12:02:15 -0500
commite41bdc223e0008ff08770feeb58c6601a59a7ba6 (patch)
treee1f2a97ca6d5240e0cbad614e62055e173fce177 /src
parent6ff7080a4c009b7fd02bf73d3b48b6b943d2b534 (diff)
r600g: don't enable ReZ mode on evergreen
Can cause lockups in certain cases when zfunc/zenable/zwrite change without a flush in between. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60969 and lockups on Civ4 with wine. This is a candidate for the 9.1 branch. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> (cherry picked from commit 2e4ef989a2142c9976be6fe0c6fafeb2bdf4e37d)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index c39827f68bb..389ad3cfd84 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -3472,9 +3472,12 @@ void evergreen_update_db_shader_control(struct r600_context * rctx)
* write to the zbuffer. Write to zbuffer is delayed after fragment shader
* execution and thus after alpha test so if discarded by the alpha test
* the z value is not written.
+ * If ReZ is enabled, and the zfunc/zenable/zwrite values change you can
+ * get a hang unless you flush the DB in between. For now just use
+ * LATE_Z.
*/
if (rctx->alphatest_state.sx_alpha_test_control) {
- db_shader_control |= S_02880C_Z_ORDER(V_02880C_RE_Z);
+ db_shader_control |= S_02880C_Z_ORDER(V_02880C_LATE_Z);
} else {
db_shader_control |= S_02880C_Z_ORDER(V_02880C_EARLY_Z_THEN_LATE_Z);
}