r300: Fix scons build.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 1 Jan 2010 00:35:43 +0000 (00:35 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 1 Jan 2010 12:16:20 +0000 (12:16 +0000)
.gitignore
src/gallium/drivers/r300/SConscript
src/gallium/drivers/r300/r300_render.c

index 1c3d44665e0778ab94b271d26e680ca7c28be047..f43ff3766cbb4acdb56ddf05361e1d663f116922 100644 (file)
@@ -4,6 +4,7 @@
 *.ilk
 *.o
 *.obj
+*.os
 *.pc
 *.pdb
 *.pyc
index 0d2de17be93205b8c5375709b18010b04a242fa7..183aa17f9b3361fe52e6dc9fa47aca187270f629 100644 (file)
@@ -4,7 +4,12 @@ r300compiler = SConscript('#/src/mesa/drivers/dri/r300/compiler/SConscript')
 
 env = env.Clone()
 # add the paths for r300compiler
-env.Append(CPPPATH = ['#/src/mesa/drivers/dri/r300/compiler', '#/include', '#/src/mesa'])
+env.Append(CPPPATH = [
+    '#/src/mesa/drivers/dri/r300/compiler', 
+    '#/src/gallium/winsys/drm/radeon/core',
+    '#/include', 
+    '#/src/mesa',
+])
 
 r300 = env.ConvenienceLibrary(
     target = 'r300',
index 82089f91617408026ddb1d5bf9e300685b2f2ace..a89cb633e0232610d801d05dbeec07576223fed2 100644 (file)
@@ -362,6 +362,7 @@ boolean r300_swtcl_draw_range_elements(struct pipe_context* pipe,
 {
     struct r300_context* r300 = r300_context(pipe);
     int i;
+    void* indices;
 
     if (!u_trim_pipe_prim(mode, &count)) {
         return FALSE;
@@ -378,8 +379,8 @@ boolean r300_swtcl_draw_range_elements(struct pipe_context* pipe,
         draw_set_mapped_vertex_buffer(r300->draw, i, buf);
     }
 
-    void* indices = pipe_buffer_map(pipe->screen, indexBuffer,
-                                    PIPE_BUFFER_USAGE_CPU_READ);
+    indices = pipe_buffer_map(pipe->screen, indexBuffer,
+                              PIPE_BUFFER_USAGE_CPU_READ);
     draw_set_mapped_element_buffer_range(r300->draw, indexSize,
                                          minIndex, maxIndex, indices);
 
@@ -476,7 +477,7 @@ static void* r300_render_map_vertices(struct vbuf_render* render)
     r300render->vbo_ptr = pipe_buffer_map(screen, r300render->vbo,
                                           PIPE_BUFFER_USAGE_CPU_WRITE);
 
-    return (r300render->vbo_ptr + r300render->vbo_offset);
+    return ((uint8_t*)r300render->vbo_ptr + r300render->vbo_offset);
 }
 
 static void r300_render_unmap_vertices(struct vbuf_render* render,