aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i965
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-11-05 17:43:57 +0000
committerKeith Whitwell <[email protected]>2009-11-05 19:57:28 +0000
commitb229ee342f2cef5396a251525d5b499760280933 (patch)
treedb8d942fa43a2595456dd3441bba65570844e957 /src/gallium/drivers/i965
parenta70e6178d4841f490ff318b6017a1ddacfadf752 (diff)
brw: push more dumping into the winsys
Diffstat (limited to 'src/gallium/drivers/i965')
-rw-r--r--src/gallium/drivers/i965/brw_batchbuffer.c22
-rw-r--r--src/gallium/drivers/i965/brw_vs_emit.c2
-rw-r--r--src/gallium/drivers/i965/brw_winsys.h8
3 files changed, 11 insertions, 21 deletions
diff --git a/src/gallium/drivers/i965/brw_batchbuffer.c b/src/gallium/drivers/i965/brw_batchbuffer.c
index e5f73bd6a31..76a7d2d2afc 100644
--- a/src/gallium/drivers/i965/brw_batchbuffer.c
+++ b/src/gallium/drivers/i965/brw_batchbuffer.c
@@ -54,7 +54,7 @@ brw_batchbuffer_reset(struct brw_batchbuffer *batch)
batch->map = batch->malloc_buffer;
else
batch->map = batch->sws->bo_map(batch->buf,
- BRW_DATA_OTHER,
+ BRW_DATA_BATCH_BUFFER,
GL_TRUE);
batch->size = BRW_BATCH_SIZE;
@@ -136,7 +136,7 @@ _brw_batchbuffer_flush(struct brw_batchbuffer *batch,
if (batch->use_malloc_buffer) {
batch->sws->bo_subdata(batch->buf,
- BRW_DATA_OTHER,
+ BRW_DATA_BATCH_BUFFER,
0, used,
batch->map );
batch->map = NULL;
@@ -150,19 +150,6 @@ _brw_batchbuffer_flush(struct brw_batchbuffer *batch,
batch->sws->bo_exec(batch->buf, used );
- if (1 /*BRW_DEBUG & DEBUG_BATCH*/) {
- void *ptr = batch->sws->bo_map(batch->buf,
- BRW_DATA_OTHER,
- GL_FALSE);
-
- intel_decode(ptr,
- used / 4,
- batch->buf->offset[0],
- batch->chipset.pci_id);
-
- batch->sws->bo_unmap(batch->buf);
- }
-
if (BRW_DEBUG & DEBUG_SYNC) {
/* Abuse map/unmap to achieve wait-for-fence.
*
@@ -170,10 +157,7 @@ _brw_batchbuffer_flush(struct brw_batchbuffer *batch,
* interface.
*/
debug_printf("waiting for idle\n");
- batch->sws->bo_map(batch->buf,
- BRW_DATA_OTHER,
- GL_TRUE);
- batch->sws->bo_unmap(batch->buf);
+ batch->sws->bo_wait_idle(batch->buf);
}
/* Reset the buffer:
diff --git a/src/gallium/drivers/i965/brw_vs_emit.c b/src/gallium/drivers/i965/brw_vs_emit.c
index d86e2104d8d..3217777acba 100644
--- a/src/gallium/drivers/i965/brw_vs_emit.c
+++ b/src/gallium/drivers/i965/brw_vs_emit.c
@@ -1624,8 +1624,6 @@ void brw_vs_emit(struct brw_vs_compile *c)
post_vs_emit(c, end_inst, last_inst);
if (BRW_DEBUG & DEBUG_VS) {
- int i;
-
debug_printf("vs-native:\n");
brw_disasm(stderr, p->store, p->nr_insn);
}
diff --git a/src/gallium/drivers/i965/brw_winsys.h b/src/gallium/drivers/i965/brw_winsys.h
index f61c541ad15..e041b0acafc 100644
--- a/src/gallium/drivers/i965/brw_winsys.h
+++ b/src/gallium/drivers/i965/brw_winsys.h
@@ -105,6 +105,8 @@ enum brw_buffer_data_type {
BRW_DATA_GS_CLIP_PROG,
BRW_DATA_SS_SURFACE,
BRW_DATA_SS_SURF_BIND,
+ BRW_DATA_CONSTANT_BUFFER,
+ BRW_DATA_BATCH_BUFFER,
BRW_DATA_OTHER,
BRW_DATA_MAX
};
@@ -176,6 +178,12 @@ struct brw_winsys_screen {
void (*bo_unmap)(struct brw_winsys_buffer *buffer);
/*@}*/
+
+ /* Wait for buffer to go idle. Similar to map+unmap, but doesn't
+ * mark buffer contents as dirty.
+ */
+ void (*bo_wait_idle)(struct brw_winsys_buffer *buffer);
+
/**
* Destroy the winsys.
*/