summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i965
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-11-04 13:03:35 +0000
committerKeith Whitwell <[email protected]>2009-11-04 13:03:35 +0000
commit211d7ab22b13430aaae00a0dfe95492450bcca20 (patch)
treedb312543dec8016161b9df2afa596412bf34fbeb /src/gallium/drivers/i965
parenta277bb20debc413f6ccf46f529497bf8bafa64dd (diff)
i965g: add standalone xlib debug winsys
Create a dummy winsys that just debug-prints on calls into the winsys functions. Will use this to get to the point where we are generating sane-looking debug dumps and diassembly. Also fix various warnings generated with the new compiler flags set in this config.
Diffstat (limited to 'src/gallium/drivers/i965')
-rw-r--r--src/gallium/drivers/i965/brw_context.h5
-rw-r--r--src/gallium/drivers/i965/brw_curbe.c2
-rw-r--r--src/gallium/drivers/i965/brw_disasm.c1
-rw-r--r--src/gallium/drivers/i965/brw_state.h2
-rw-r--r--src/gallium/drivers/i965/brw_state_cache.c6
-rw-r--r--src/gallium/drivers/i965/brw_winsys.h1
6 files changed, 10 insertions, 7 deletions
diff --git a/src/gallium/drivers/i965/brw_context.h b/src/gallium/drivers/i965/brw_context.h
index b94c5114995..97b2a8e27dd 100644
--- a/src/gallium/drivers/i965/brw_context.h
+++ b/src/gallium/drivers/i965/brw_context.h
@@ -167,8 +167,8 @@ struct brw_fragment_shader {
unsigned iz_lookup;
//unsigned wm_lookup;
- boolean uses_depth:1;
- boolean has_flow_control:1;
+ unsigned uses_depth:1;
+ unsigned has_flow_control:1;
unsigned id;
struct brw_winsys_buffer *const_buffer; /** Program constant buffer/surface */
@@ -573,6 +573,7 @@ struct brw_context
} vb[PIPE_MAX_ATTRIBS];
struct {
+ int dummy;
} ve[PIPE_MAX_ATTRIBS];
unsigned nr_vb; /* currently the same as curr.num_vertex_buffers */
diff --git a/src/gallium/drivers/i965/brw_curbe.c b/src/gallium/drivers/i965/brw_curbe.c
index 3910174bda5..5763173bca6 100644
--- a/src/gallium/drivers/i965/brw_curbe.c
+++ b/src/gallium/drivers/i965/brw_curbe.c
@@ -243,7 +243,7 @@ static int prepare_curbe_buffer(struct brw_context *brw)
buf[i+0], buf[i+1], buf[i+2], buf[i+3]);
debug_printf("last_buf %p buf %p sz %d/%d cmp %d\n",
- brw->curbe.last_buf, buf,
+ (void *)brw->curbe.last_buf, (void *)buf,
bufsz, brw->curbe.last_bufsz,
brw->curbe.last_buf ? memcmp(buf, brw->curbe.last_buf, bufsz) : -1);
}
diff --git a/src/gallium/drivers/i965/brw_disasm.c b/src/gallium/drivers/i965/brw_disasm.c
index a84c581c033..29fe8480057 100644
--- a/src/gallium/drivers/i965/brw_disasm.c
+++ b/src/gallium/drivers/i965/brw_disasm.c
@@ -143,6 +143,7 @@ char *chan_sel[4] = {
};
char *dest_condmod[16] = {
+ [0] = NULL
};
char *debug_ctrl[2] = {
diff --git a/src/gallium/drivers/i965/brw_state.h b/src/gallium/drivers/i965/brw_state.h
index 3b9151ab2f9..94d2cb6f829 100644
--- a/src/gallium/drivers/i965/brw_state.h
+++ b/src/gallium/drivers/i965/brw_state.h
@@ -47,7 +47,7 @@ brw_add_validated_bo(struct brw_context *brw, struct brw_winsys_buffer *bo)
brw->sws->bo_reference(bo);
brw->state.validated_bos[brw->state.validated_bo_count++] = bo;
}
-};
+}
const struct brw_tracked_state brw_blend_constant_color;
const struct brw_tracked_state brw_cc_unit;
diff --git a/src/gallium/drivers/i965/brw_state_cache.c b/src/gallium/drivers/i965/brw_state_cache.c
index 9cf44f7a5cc..1cb1b5e7215 100644
--- a/src/gallium/drivers/i965/brw_state_cache.c
+++ b/src/gallium/drivers/i965/brw_state_cache.c
@@ -236,8 +236,8 @@ brw_upload_cache( struct brw_cache *cache,
tmp = MALLOC(key_size + aux_size + relocs_size);
memcpy(tmp, key, key_size);
- memcpy(tmp + key_size, aux, cache->aux_size[cache_id]);
- memcpy(tmp + key_size + aux_size, reloc_bufs, relocs_size);
+ memcpy((char *)tmp + key_size, aux, cache->aux_size[cache_id]);
+ memcpy((char *)tmp + key_size + aux_size, reloc_bufs, relocs_size);
for (i = 0; i < nr_reloc_bufs; i++) {
if (reloc_bufs[i] != NULL)
cache->sws->bo_reference(reloc_bufs[i]);
@@ -247,7 +247,7 @@ brw_upload_cache( struct brw_cache *cache,
item->key = tmp;
item->hash = hash;
item->key_size = key_size;
- item->reloc_bufs = tmp + key_size + aux_size;
+ item->reloc_bufs = (struct brw_winsys_buffer **)((char *)tmp + key_size + aux_size);
item->nr_reloc_bufs = nr_reloc_bufs;
item->bo = bo;
diff --git a/src/gallium/drivers/i965/brw_winsys.h b/src/gallium/drivers/i965/brw_winsys.h
index d0bd97d9946..9338923da34 100644
--- a/src/gallium/drivers/i965/brw_winsys.h
+++ b/src/gallium/drivers/i965/brw_winsys.h
@@ -54,6 +54,7 @@ enum brw_buffer_usage {
BRW_USAGE_SAMPLER, /* SAMPLER, 0 */
BRW_USAGE_VERTEX, /* VERTEX, 0 */
BRW_USAGE_SCRATCH, /* 0, 0 */
+ BRW_USAGE_MAX
};
/* Should be possible to validate usages above against buffer creation