Mesa (master): r300: Fix scons build.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Jan 1 04:20:08 PST 2010


Module: Mesa
Branch: master
Commit: 486ccb55a89f229ffbd181f79f9372cf0b4cbdb6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=486ccb55a89f229ffbd181f79f9372cf0b4cbdb6

Author: José Fonseca <jfonseca at vmware.com>
Date:   Fri Jan  1 00:35:43 2010 +0000

r300: Fix scons build.

---

 .gitignore                             |    1 +
 src/gallium/drivers/r300/SConscript    |    7 ++++++-
 src/gallium/drivers/r300/r300_render.c |    7 ++++---
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index 1c3d446..f43ff37 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@
 *.ilk
 *.o
 *.obj
+*.os
 *.pc
 *.pdb
 *.pyc
diff --git a/src/gallium/drivers/r300/SConscript b/src/gallium/drivers/r300/SConscript
index 0d2de17..183aa17 100644
--- a/src/gallium/drivers/r300/SConscript
+++ b/src/gallium/drivers/r300/SConscript
@@ -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',
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 82089f9..a89cb63 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -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,



More information about the mesa-commit mailing list