summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-09-25 20:23:44 +1000
committerDave Airlie <[email protected]>2010-09-25 22:14:08 +1000
commitb6469a8dc712f550bafef624f854f265c5c8360f (patch)
tree8b70bfdae2b6e0e84d17487ba803f635cc98d458 /src/gallium
parentebca23149a8d73317a5e00ba544f28ca0cde31ec (diff)
r600g: add eg db count control register.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/eg_hw_states.c5
-rw-r--r--src/gallium/drivers/r600/eg_states_inc.h15
-rw-r--r--src/gallium/winsys/r600/drm/eg_states.h1
3 files changed, 12 insertions, 9 deletions
diff --git a/src/gallium/drivers/r600/eg_hw_states.c b/src/gallium/drivers/r600/eg_hw_states.c
index 272972d4189..889eedadef5 100644
--- a/src/gallium/drivers/r600/eg_hw_states.c
+++ b/src/gallium/drivers/r600/eg_hw_states.c
@@ -364,6 +364,7 @@ static void eg_dsa(struct r600_context *rctx, struct radeon_state *rstate)
struct r600_screen *rscreen = rctx->screen;
unsigned db_depth_control, alpha_test_control, alpha_ref, db_shader_control;
unsigned stencil_ref_mask, stencil_ref_mask_bf, db_render_override, db_render_control;
+ unsigned db_count_control = 0;
struct r600_shader *rshader;
struct r600_query *rquery = NULL;
boolean query_running;
@@ -439,7 +440,7 @@ static void eg_dsa(struct r600_context *rctx, struct radeon_state *rstate)
if (query_running) {
db_render_override |= S_02800C_NOOP_CULL_DISABLE(1);
-// db_render_control |= S_028000_PERFECT_ZPASS_COUNTS(1);
+ db_count_control |= S_028004_PERFECT_ZPASS_COUNTS(1);
}
rstate->states[EG_DSA__DB_STENCIL_CLEAR] = 0x00000000;
@@ -455,7 +456,7 @@ static void eg_dsa(struct r600_context *rctx, struct radeon_state *rstate)
rstate->states[EG_DSA__DB_SHADER_CONTROL] = db_shader_control;
rstate->states[EG_DSA__DB_RENDER_CONTROL] = db_render_control;
rstate->states[EG_DSA__DB_RENDER_OVERRIDE] = db_render_override;
-
+ rstate->states[EG_DSA__DB_COUNT_CONTROL] = db_count_control;
rstate->states[EG_DSA__DB_SRESULTS_COMPARE_STATE1] = 0x00000000;
rstate->states[EG_DSA__DB_PRELOAD_CONTROL] = 0x00000000;
rstate->states[EG_DSA__DB_ALPHA_TO_MASK] = 0x0000AA00;
diff --git a/src/gallium/drivers/r600/eg_states_inc.h b/src/gallium/drivers/r600/eg_states_inc.h
index 9f8007c8e91..1379c11291f 100644
--- a/src/gallium/drivers/r600/eg_states_inc.h
+++ b/src/gallium/drivers/r600/eg_states_inc.h
@@ -150,13 +150,14 @@
#define EG_DSA__DB_DEPTH_CONTROL 7
#define EG_DSA__DB_SHADER_CONTROL 8
#define EG_DSA__DB_RENDER_CONTROL 9
-#define EG_DSA__DB_RENDER_OVERRIDE 10
-#define EG_DSA__DB_RENDER_OVERRIDE2 11
-#define EG_DSA__DB_SRESULTS_COMPARE_STATE0 12
-#define EG_DSA__DB_SRESULTS_COMPARE_STATE1 13
-#define EG_DSA__DB_PRELOAD_CONTROL 14
-#define EG_DSA__DB_ALPHA_TO_MASK 15
-#define EG_DSA_SIZE 16
+#define EG_DSA__DB_COUNT_CONTROL 10
+#define EG_DSA__DB_RENDER_OVERRIDE 11
+#define EG_DSA__DB_RENDER_OVERRIDE2 12
+#define EG_DSA__DB_SRESULTS_COMPARE_STATE0 13
+#define EG_DSA__DB_SRESULTS_COMPARE_STATE1 14
+#define EG_DSA__DB_PRELOAD_CONTROL 15
+#define EG_DSA__DB_ALPHA_TO_MASK 16
+#define EG_DSA_SIZE 17
#define EG_DSA_PM4 128
/* EG_VS_SHADER */
diff --git a/src/gallium/winsys/r600/drm/eg_states.h b/src/gallium/winsys/r600/drm/eg_states.h
index d87109fb801..ced7f147c0f 100644
--- a/src/gallium/winsys/r600/drm/eg_states.h
+++ b/src/gallium/winsys/r600/drm/eg_states.h
@@ -164,6 +164,7 @@ static const struct radeon_register EG_names_DSA[] = {
{0x00028800, 0, 0, "DB_DEPTH_CONTROL"},
{0x0002880C, 0, 0, "DB_SHADER_CONTROL"},
{0x00028000, 0, 0, "DB_RENDER_CONTROL"},
+ {0x00028004, 0, 0, "DB_COUNT_CONTROL"},
{0x0002800C, 0, 0, "DB_RENDER_OVERRIDE"},
{0x00028010, 0, 0, "DB_RENDER_OVERRIDE2"},
{0x00028AC0, 0, 0, "DB_SRESULTS_COMPARE_STATE0"},