summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i965
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-11-06 10:19:39 +0000
committerKeith Whitwell <[email protected]>2009-11-06 10:19:39 +0000
commit1d6b5957c6be221feb836bc25686246f67769bce (patch)
tree28898afbdc8a45ab472d9ade945a11c1ad9af362 /src/gallium/drivers/i965
parent5d7c0cf563b65aeb83f3d2f2ec709a96cf0fbae2 (diff)
i965g: add DEBUG_MIN_URB flag
Diffstat (limited to 'src/gallium/drivers/i965')
-rw-r--r--src/gallium/drivers/i965/brw_debug.h2
-rw-r--r--src/gallium/drivers/i965/brw_screen.c3
-rw-r--r--src/gallium/drivers/i965/brw_urb.c11
3 files changed, 13 insertions, 3 deletions
diff --git a/src/gallium/drivers/i965/brw_debug.h b/src/gallium/drivers/i965/brw_debug.h
index aee62f7a5be..ea3c87218be 100644
--- a/src/gallium/drivers/i965/brw_debug.h
+++ b/src/gallium/drivers/i965/brw_debug.h
@@ -15,7 +15,7 @@
#define DEBUG_BATCH 0x80
#define DEBUG_PIXEL 0x100
#define DEBUG_BUFMGR 0x200
-#define DEBUG_unused1 0x400
+#define DEBUG_MIN_URB 0x400
#define DEBUG_unused2 0x800
#define DEBUG_unused3 0x1000
#define DEBUG_SYNC 0x2000
diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c
index 04a3f81bcf0..275ff0959f9 100644
--- a/src/gallium/drivers/i965/brw_screen.c
+++ b/src/gallium/drivers/i965/brw_screen.c
@@ -48,6 +48,7 @@ static const struct debug_named_value debug_names[] = {
{ "bat", DEBUG_BATCH},
{ "pix", DEBUG_PIXEL},
{ "buf", DEBUG_BUFMGR},
+ { "min", DEBUG_MIN_URB},
{ "sync", DEBUG_SYNC},
{ "prim", DEBUG_PRIMS },
{ "vert", DEBUG_VERTS },
@@ -291,7 +292,7 @@ brw_create_screen(struct brw_winsys_screen *sws, uint pci_id)
#ifdef DEBUG
BRW_DEBUG = debug_get_flags_option("BRW_DEBUG", debug_names, 0);
BRW_DEBUG |= debug_get_flags_option("INTEL_DEBUG", debug_names, 0);
- BRW_DEBUG |= DEBUG_STATS;
+ BRW_DEBUG |= DEBUG_STATS | DEBUG_MIN_URB;
#endif
memset(&chipset, 0, sizeof chipset);
diff --git a/src/gallium/drivers/i965/brw_urb.c b/src/gallium/drivers/i965/brw_urb.c
index 57fd8f20b20..907ec56c6ca 100644
--- a/src/gallium/drivers/i965/brw_urb.c
+++ b/src/gallium/drivers/i965/brw_urb.c
@@ -84,7 +84,7 @@
* XXX: Verify min_nr_entries, esp for VS.
* XXX: Verify SF min_entry_size.
*/
-static const struct {
+static const struct urb_limits {
GLuint min_nr_entries;
GLuint preferred_nr_entries;
GLuint min_entry_size;
@@ -167,6 +167,15 @@ static int recalculate_urb_fence( struct brw_context *brw )
}
}
+ if (BRW_DEBUG & DEBUG_MIN_URB) {
+ brw->urb.nr_vs_entries = limits[VS].min_nr_entries;
+ brw->urb.nr_gs_entries = limits[GS].min_nr_entries;
+ brw->urb.nr_clip_entries = limits[CLP].min_nr_entries;
+ brw->urb.nr_sf_entries = limits[SF].min_nr_entries;
+ brw->urb.nr_cs_entries = limits[CS].min_nr_entries;
+ brw->urb.constrained = 1;
+ }
+
if (!check_urb_layout(brw)) {
brw->urb.nr_vs_entries = limits[VS].min_nr_entries;
brw->urb.nr_gs_entries = limits[GS].min_nr_entries;