summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_context.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-08-06 01:08:12 +0200
committerMarek Olšák <[email protected]>2010-08-06 03:14:43 +0200
commit4d10ec4f18cfb6c386feb65805713584ff730652 (patch)
treedc620987052633f6615a6001f5afd9a2560c5f59 /src/gallium/drivers/r300/r300_context.c
parent1a3a04d56b01714e4fa19aa7efcdae4b6644af46 (diff)
r300g: do not emit GB_Z_PEQ_CONFIG on non-r500 if DRM < 2.6.0
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r--src/gallium/drivers/r300/r300_context.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 4658ab0ff55..e8b6c4f7af8 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -171,6 +171,7 @@ static void r300_setup_atoms(struct r300_context* r300)
boolean is_r500 = r300->screen->caps.is_r500;
boolean has_tcl = r300->screen->caps.has_tcl;
boolean drm_2_3_0 = r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0);
+ boolean drm_2_6_0 = r300->rws->get_value(r300->rws, R300_VID_DRM_2_6_0);
boolean has_hyperz = r300->rws->get_value(r300->rws, R300_CAN_HYPERZ);
boolean has_hiz_ram = r300->screen->caps.hiz_ram > 0;
@@ -195,7 +196,7 @@ static void r300_setup_atoms(struct r300_context* r300)
R300_INIT_ATOM(gpu_flush, 9);
R300_INIT_ATOM(aa_state, 4);
R300_INIT_ATOM(fb_state, 0);
- R300_INIT_ATOM(hyperz_state, is_rv350 ? 10 : 8);
+ R300_INIT_ATOM(hyperz_state, is_r500 || (is_rv350 && drm_2_6_0) ? 10 : 8);
/* ZB (unpipelined), SC. */
R300_INIT_ATOM(ztop_state, 2);
/* ZB, FG. */
@@ -373,7 +374,9 @@ static void r300_init_states(struct pipe_context *pipe)
OUT_CB_REG(R300_ZB_DEPTHCLEARVALUE, 0);
OUT_CB_REG(R300_SC_HYPERZ, R300_SC_HYPERZ_ADJ_2);
- if (r300->screen->caps.is_rv350) {
+ if (r300->screen->caps.is_r500 ||
+ (r300->screen->caps.is_rv350 &&
+ r300->rws->get_value(r300->rws, R300_VID_DRM_2_6_0))) {
OUT_CB_REG(R300_GB_Z_PEQ_CONFIG, 0);
}
END_CB;