r300g: fix pointer arithmetic with void* in transfer_inline_write
authorMarek Olšák <maraeo@gmail.com>
Fri, 3 Dec 2010 05:08:50 +0000 (06:08 +0100)
committerMarek Olšák <maraeo@gmail.com>
Fri, 3 Dec 2010 05:08:50 +0000 (06:08 +0100)
src/gallium/drivers/r300/r300_screen_buffer.h
src/gallium/drivers/r300/r300_state.c

index a184ead3a354c2f6ef3fd39ea8fab9e858779190..0b3555dd813583d62cb0ebcf0a83d66389f5770c 100644 (file)
@@ -55,8 +55,8 @@ struct r300_buffer
 
     enum r300_buffer_domain domain;
 
-    void *user_buffer;
-    void *constant_buffer;
+    uint8_t *user_buffer;
+    uint8_t *constant_buffer;
     struct r300_buffer_range ranges[R300_BUFFER_MAX_RANGES];
     unsigned num_ranges;
 };
index d4e20635586076b616b490ef171f460556d76775..092c0320929859203d188ac16567880584cb1b5e 100644 (file)
@@ -1824,7 +1824,7 @@ static void r300_set_constant_buffer(struct pipe_context *pipe,
     }
 
     if (buf == NULL || buf->width0 == 0 ||
-        (mapped = r300_buffer(buf)->constant_buffer) == NULL) {
+        (mapped = (uint32_t*)r300_buffer(buf)->constant_buffer) == NULL) {
         return;
     }