summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_query.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-04-04 00:31:49 -0700
committerCorbin Simpson <[email protected]>2009-04-04 00:36:04 -0700
commitbe1dbba0a4d0d75468461aff8c281a512a537ecc (patch)
tree6b0f57b58824d0d2d60025db3a13930beda03e4f /src/gallium/drivers/r300/r300_query.c
parenta7dc04fa73f9879d94ab4abf8fcd6f38ee2e9531 (diff)
r300-gallium: Clean up compile warnings and strict compile errors.
Diffstat (limited to 'src/gallium/drivers/r300/r300_query.c')
-rw-r--r--src/gallium/drivers/r300/r300_query.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c
index 5f5f4c4dbd4..8fc61c2dec7 100644
--- a/src/gallium/drivers/r300/r300_query.c
+++ b/src/gallium/drivers/r300/r300_query.c
@@ -46,12 +46,12 @@ static void r300_destroy_query(struct pipe_context* pipe,
static void r300_begin_query(struct pipe_context* pipe,
struct pipe_query* query)
{
+ uint32_t* map;
struct r300_context* r300 = r300_context(pipe);
struct r300_query* q = (struct r300_query*)query;
CS_LOCALS(r300);
- uint32_t* map = pipe_buffer_map(pipe->screen, q->buf,
- PIPE_BUFFER_USAGE_CPU_WRITE);
+ map = pipe_buffer_map(pipe->screen, q->buf, PIPE_BUFFER_USAGE_CPU_WRITE);
*map = ~0;
pipe_buffer_unmap(pipe->screen, q->buf);
@@ -79,6 +79,7 @@ static boolean r300_get_query_result(struct pipe_context* pipe,
uint64_t* result)
{
struct r300_query* q = (struct r300_query*)query;
+ uint32_t* map;
uint32_t temp;
if (wait) {
@@ -88,8 +89,7 @@ static boolean r300_get_query_result(struct pipe_context* pipe,
pipe->flush(pipe, 0, NULL);
}
- uint32_t* map = pipe_buffer_map(pipe->screen, q->buf,
- PIPE_BUFFER_USAGE_CPU_READ);
+ map = pipe_buffer_map(pipe->screen, q->buf, PIPE_BUFFER_USAGE_CPU_READ);
temp = *map;
pipe_buffer_unmap(pipe->screen, q->buf);