packages: Mesa/Mesa-git.patch, Mesa/Mesa.spec - up to 8.0.2 + git fixes

arekm arekm at pld-linux.org
Wed Apr 4 22:51:09 CEST 2012


Author: arekm                        Date: Wed Apr  4 20:51:09 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 8.0.2 + git fixes

---- Files affected:
packages/Mesa:
   Mesa-git.patch (1.19 -> 1.20) , Mesa.spec (1.319 -> 1.320) 

---- Diffs:

================================================================
Index: packages/Mesa/Mesa-git.patch
diff -u packages/Mesa/Mesa-git.patch:1.19 packages/Mesa/Mesa-git.patch:1.20
--- packages/Mesa/Mesa-git.patch:1.19	Sun Mar 18 21:32:15 2012
+++ packages/Mesa/Mesa-git.patch	Wed Apr  4 22:51:04 2012
@@ -1,994 +1,588 @@
-diff --git a/configs/darwin b/configs/darwin
-index e2ca70a..721fbc7 100644
---- a/configs/darwin
-+++ b/configs/darwin
-@@ -9,8 +9,8 @@ INSTALL_DIR = /usr/X11
- X11_DIR = $(INSTALL_DIR)
- 
- # Compiler and flags
--CC = gcc
--CXX = g++
-+CC = $(shell xcrun -find cc)
-+CXX = $(shell xcrun -find c++)
- PIC_FLAGS = -fPIC
- DEFINES =  -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
- 	   -DGLX_ALIAS_UNSUPPORTED \
-@@ -24,11 +24,14 @@ DEFINES =  -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
- # -DIN_DRI_DRIVER
- 
- ARCH_FLAGS += $(RC_CFLAGS)
-+INCLUDE_FLAGS = -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
-+OPT_FLAGS = -g3 -gdwarf-2 -Os -ffast-math -fno-strict-aliasing
-+WARN_FLAGS = -Wall -Wmissing-prototypes
- 
--CFLAGS =  -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -fvisibility=hidden \
--	-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
--CXXFLAGS =  -ggdb3 -Os -Wall -fno-strict-aliasing -fvisibility=hidden \
--	-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
-+CFLAGS = -std=c99 -fvisibility=hidden \
-+	$(OPT_FLAGS) $(WARN_FLAGS) $(INCLUDE_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) $(EXTRA_CFLAGS)
-+CXXFLAGS = -fvisibility=hidden \
-+	$(OPT_FLAGS) $(WARN_FLAGS) $(INCLUDE_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) $(EXTRA_CFLAGS)
- 
- # Library names (actual file names)
- GL_LIB_NAME = lib$(GL_LIB).dylib
-@@ -44,10 +47,10 @@ GLW_LIB_GLOB = lib$(GLW_LIB).*dylib
- OSMESA_LIB_GLOB = lib$(OSMESA_LIB).*dylib
- VG_LIB_GLOB = lib$(VG_LIB).*dylib
- 
--GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
--OSMESA_LIB_DEPS =
--GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
--GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt
-+GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11-xcb -lxcb -lX11 -lXext $(EXTRA_LDFLAGS)
-+OSMESA_LIB_DEPS = $(EXTRA_LDFLAGS)
-+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LDFLAGS)
-+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt $(EXTRA_LDFLAGS)
- 
- SRC_DIRS = glsl mapi/glapi mapi/vgapi glx/apple mesa gallium glu
- GLU_DIRS = sgi
-diff --git a/configs/darwin-fat-intel b/configs/darwin-fat-intel
-new file mode 100644
-index 0000000..273ae3d
---- /dev/null
-+++ b/configs/darwin-fat-intel
-@@ -0,0 +1,7 @@
-+# Configuration for Darwin / MacOS X, making 32bit and 64bit fat dynamic libs for intel
-+
-+RC_CFLAGS=-arch i386 -arch x86_64
-+
-+include $(TOP)/configs/darwin
-+
-+CONFIG_NAME = darwin-fat-intel
-diff --git a/docs/relnotes-8.0.1.html b/docs/relnotes-8.0.1.html
-index 8c8cd3f..29a314c 100644
---- a/docs/relnotes-8.0.1.html
-+++ b/docs/relnotes-8.0.1.html
-@@ -28,7 +28,9 @@ for DRI hardware acceleration.
- 
- <h2>MD5 checksums</h2>
- <pre>
--tdb
-+4855c2d93bd2ebd43f384bdcc92c9a27  MesaLib-8.0.1.tar.gz
-+24eeebf66971809d8f40775a379b36c9  MesaLib-8.0.1.tar.bz2
-+54e745d14dac5717f7f65b4e2d5c1df2  MesaLib-8.0.1.zip
- </pre>
- 
- <h2>New features</h2>
-diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h
-index 02c176e..f3a3f23 100644
---- a/src/gallium/auxiliary/draw/draw_context.h
-+++ b/src/gallium/auxiliary/draw/draw_context.h
-@@ -80,6 +80,21 @@ void draw_set_viewport_state( struct draw_context *draw,
- void draw_set_clip_state( struct draw_context *pipe,
-                           const struct pipe_clip_state *clip );
- 
-+/**
-+ * Sets the rasterization state used by the draw module.
-+ * The rast_handle is used to pass the driver specific representation
-+ * of the rasterization state. It's going to be used when the
-+ * draw module sets the state back on the driver itself using the
-+ * pipe::bind_rasterizer_state method.
-+ *
-+ * NOTE: if you're calling this function from within the pipe's
-+ * bind_rasterizer_state you should always call it before binding
-+ * the actual state - that's because the draw module can try to
-+ * bind its own rasterizer state which would reset your newly
-+ * set state. i.e. always do
-+ * draw_set_rasterizer_state(driver->draw, state->pipe_state, state);
-+ * driver->state.raster = state;
-+ */
- void draw_set_rasterizer_state( struct draw_context *draw,
-                                 const struct pipe_rasterizer_state *raster,
-                                 void *rast_handle );
-diff --git a/src/gallium/auxiliary/rtasm/rtasm_cpu.c b/src/gallium/auxiliary/rtasm/rtasm_cpu.c
-index 0461c81..7afcf14 100644
---- a/src/gallium/auxiliary/rtasm/rtasm_cpu.c
-+++ b/src/gallium/auxiliary/rtasm/rtasm_cpu.c
-@@ -25,43 +25,43 @@
-  *
-  **************************************************************************/
+diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
+index d132638..920612b 100644
+--- a/src/gallium/drivers/r300/r300_blit.c
++++ b/src/gallium/drivers/r300/r300_blit.c
+@@ -63,8 +63,13 @@ static void r300_blitter_begin(struct r300_context* r300, enum r300_blitter_op o
+     util_blitter_save_vertex_shader(r300->blitter, r300->vs_state.state);
+     util_blitter_save_viewport(r300->blitter, &r300->viewport);
+     util_blitter_save_vertex_elements(r300->blitter, r300->velems);
+-    util_blitter_save_vertex_buffers(r300->blitter, r300->vbuf_mgr->nr_vertex_buffers,
+-                                     r300->vbuf_mgr->vertex_buffer);
++    if (r300->vbuf_mgr) {
++        util_blitter_save_vertex_buffers(r300->blitter, r300->vbuf_mgr->nr_vertex_buffers,
++                                         r300->vbuf_mgr->vertex_buffer);
++    } else {
++        util_blitter_save_vertex_buffers(r300->blitter, r300->swtcl_nr_vertex_buffers,
++                                         r300->swtcl_vertex_buffer);
++    }
+ 
+     if (op & R300_SAVE_FRAMEBUFFER) {
+         util_blitter_save_framebuffer(r300->blitter, r300->fb_state.state);
+diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
+index 7d289ca..1626768 100644
+--- a/src/gallium/drivers/r300/r300_context.c
++++ b/src/gallium/drivers/r300/r300_context.c
+@@ -419,17 +419,19 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
+     r300_init_query_functions(r300);
+     r300_init_state_functions(r300);
+     r300_init_resource_functions(r300);
+-    
++
+     r300->context.create_video_decoder = vl_create_decoder;
+     r300->context.create_video_buffer = vl_video_buffer_create;
+ 
+-    r300->vbuf_mgr = u_vbuf_create(&r300->context, 1024 * 1024, 16,
++    if (r300->screen->caps.has_tcl) {
++        r300->vbuf_mgr = u_vbuf_create(&r300->context, 1024 * 1024, 16,
+                                        PIPE_BIND_VERTEX_BUFFER |
+                                        PIPE_BIND_INDEX_BUFFER,
+                                        U_VERTEX_FETCH_DWORD_ALIGNED);
+-    if (!r300->vbuf_mgr)
+-        goto fail;
+-    r300->vbuf_mgr->caps.format_fixed32 = 0;
++        if (!r300->vbuf_mgr)
++            goto fail;
++        r300->vbuf_mgr->caps.format_fixed32 = 0;
++    }
+ 
+     r300->blitter = util_blitter_create(&r300->context);
+     if (r300->blitter == NULL)
+diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
+index e40b7af..8264b28 100644
+--- a/src/gallium/drivers/r300/r300_context.h
++++ b/src/gallium/drivers/r300/r300_context.h
+@@ -581,6 +581,9 @@ struct r300_context {
+     void *dsa_decompress_zmask;
+ 
+     struct u_vbuf *vbuf_mgr;
++    struct pipe_index_buffer swtcl_index_buffer;
++    struct pipe_vertex_buffer swtcl_vertex_buffer[PIPE_MAX_ATTRIBS];
++    unsigned swtcl_nr_vertex_buffers;
+ 
+     struct util_slab_mempool pool_transfers;
+ 
+diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
+index 83cad42..1542648 100644
+--- a/src/gallium/drivers/r300/r300_render.c
++++ b/src/gallium/drivers/r300/r300_render.c
+@@ -818,7 +818,7 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
+     struct pipe_transfer *ib_transfer = NULL;
+     int i;
+     void *indices = NULL;
+-    boolean indexed = info->indexed && r300->vbuf_mgr->index_buffer.buffer;
++    boolean indexed = info->indexed && r300->swtcl_index_buffer.buffer;
+ 
+     if (r300->skip_rendering) {
+         return;
+@@ -831,10 +831,10 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
+             (indexed ? PREP_INDEXED : 0),
+             indexed ? 256 : 6);
+ 
+-    for (i = 0; i < r300->vbuf_mgr->nr_vertex_buffers; i++) {
+-        if (r300->vbuf_mgr->vertex_buffer[i].buffer) {
++    for (i = 0; i < r300->swtcl_nr_vertex_buffers; i++) {
++        if (r300->swtcl_vertex_buffer[i].buffer) {
+             void *buf = pipe_buffer_map(pipe,
+-                                  r300->vbuf_mgr->vertex_buffer[i].buffer,
++                                  r300->swtcl_vertex_buffer[i].buffer,
+                                   PIPE_TRANSFER_READ |
+                                   PIPE_TRANSFER_UNSYNCHRONIZED,
+                                   &vb_transfer[i]);
+@@ -843,7 +843,7 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
+     }
+ 
+     if (indexed) {
+-        indices = pipe_buffer_map(pipe, r300->vbuf_mgr->index_buffer.buffer,
++        indices = pipe_buffer_map(pipe, r300->swtcl_index_buffer.buffer,
+                                   PIPE_TRANSFER_READ |
+                                   PIPE_TRANSFER_UNSYNCHRONIZED, &ib_transfer);
+     }
+@@ -856,8 +856,8 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
+     draw_flush(r300->draw);
+     r300->draw_vbo_locked = FALSE;
+ 
+-    for (i = 0; i < r300->vbuf_mgr->nr_vertex_buffers; i++) {
+-        if (r300->vbuf_mgr->vertex_buffer[i].buffer) {
++    for (i = 0; i < r300->swtcl_nr_vertex_buffers; i++) {
++        if (r300->swtcl_vertex_buffer[i].buffer) {
+             pipe_buffer_unmap(pipe, vb_transfer[i]);
+             draw_set_mapped_vertex_buffer(r300->draw, i, NULL);
+         }
+diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
+index 763321b..f28b0be 100644
+--- a/src/gallium/drivers/r300/r300_screen.c
++++ b/src/gallium/drivers/r300/r300_screen.c
+@@ -212,6 +212,7 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e
+         switch (param)
+         {
+         case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
++        case PIPE_SHADER_CAP_SUBROUTINES:
+             return 0;
+         default:;
+         }
+diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
+index 2bc7036..c43352a 100644
+--- a/src/gallium/drivers/r300/r300_state.c
++++ b/src/gallium/drivers/r300/r300_state.c
+@@ -1048,6 +1048,10 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
+ 
+     /* Override some states for Draw. */
+     rs->rs_draw.sprite_coord_enable = 0; /* We can do this in HW. */
++    rs->rs_draw.offset_point = 0;
++    rs->rs_draw.offset_line = 0;
++    rs->rs_draw.offset_tri = 0;
++    rs->rs_draw.offset_clamp = 0;
+ 
+ #ifdef PIPE_ARCH_LITTLE_ENDIAN
+     vap_control_status = R300_VC_NO_SWAP;
+@@ -1595,7 +1599,6 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe,
+                                     const struct pipe_vertex_buffer* buffers)
+ {
+     struct r300_context* r300 = r300_context(pipe);
+-    unsigned i;
+     struct pipe_vertex_buffer dummy_vb = {0};
+ 
+     /* There must be at least one vertex buffer set, otherwise it locks up. */
+@@ -1605,18 +1608,13 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe,
+         count = 1;
+     }
  
-+#include "pipe/p_config.h"
-+#include "rtasm_cpu.h"
-+
-+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+-    u_vbuf_set_vertex_buffers(r300->vbuf_mgr, count, buffers);
+-
+     if (r300->screen->caps.has_tcl) {
+-        /* HW TCL. */
+-        for (i = 0; i < count; i++) {
+-            if (buffers[i].buffer &&
+-		!r300_resource(buffers[i].buffer)->b.user_ptr) {
+-            }
+-        }
++        u_vbuf_set_vertex_buffers(r300->vbuf_mgr, count, buffers);
+         r300->vertex_arrays_dirty = TRUE;
+     } else {
+-        /* SW TCL. */
++        util_copy_vertex_buffers(r300->swtcl_vertex_buffer,
++                                 &r300->swtcl_nr_vertex_buffers,
++                                 buffers, count);
+         draw_set_vertex_buffers(r300->draw, count, buffers);
+     }
+ }
+@@ -1626,9 +1624,15 @@ static void r300_set_index_buffer(struct pipe_context* pipe,
+ {
+     struct r300_context* r300 = r300_context(pipe);
+ 
+-    u_vbuf_set_index_buffer(r300->vbuf_mgr, ib);
+-
+-    if (!r300->screen->caps.has_tcl) {
++    if (r300->screen->caps.has_tcl) {
++        u_vbuf_set_index_buffer(r300->vbuf_mgr, ib);
++    } else {
++        if (ib) {
++            pipe_resource_reference(&r300->swtcl_index_buffer.buffer, ib->buffer);
++            memcpy(&r300->swtcl_index_buffer, ib, sizeof(*ib));
++        } else {
++            pipe_resource_reference(&r300->swtcl_index_buffer.buffer, NULL);
++        }
+         draw_set_index_buffer(r300->draw, ib);
+     }
+ }
+@@ -1702,11 +1706,11 @@ static void* r300_create_vertex_elements_state(struct pipe_context* pipe,
+         return NULL;
  
- #include "util/u_debug.h"
--#include "rtasm_cpu.h"
-+#include "util/u_cpu_detect.h"
+     velems->count = count;
+-    velems->vmgr_elements =
+-        u_vbuf_create_vertex_elements(r300->vbuf_mgr, count, attribs,
+-                                          velems->velem);
+ 
+     if (r300_screen(pipe->screen)->caps.has_tcl) {
++        velems->vmgr_elements =
++            u_vbuf_create_vertex_elements(r300->vbuf_mgr, count, attribs,
++                                          velems->velem);
+         /* Setup PSC.
+          * The unused components will be replaced by (..., 0, 1). */
+         r300_vertex_psc(velems);
+@@ -1716,6 +1720,8 @@ static void* r300_create_vertex_elements_state(struct pipe_context* pipe,
+                 align(util_format_get_blocksize(velems->velem[i].src_format), 4);
+             velems->vertex_size_dwords += velems->format_size[i] / 4;
+         }
++    } else {
++        memcpy(velems->velem, attribs, count * sizeof(struct pipe_vertex_element));
+     }
  
-+DEBUG_GET_ONCE_BOOL_OPTION(nosse, "GALLIUM_NOSSE", FALSE);
+     return velems;
+@@ -1733,9 +1739,9 @@ static void r300_bind_vertex_elements_state(struct pipe_context *pipe,
  
--#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
--static boolean rtasm_sse_enabled(void)
-+static struct util_cpu_caps *get_cpu_caps(void)
- {
--   static boolean firsttime = 1;
--   static boolean enabled;
--   
--   /* This gets called quite often at the moment:
--    */
--   if (firsttime) {
--      enabled =  !debug_get_bool_option("GALLIUM_NOSSE", FALSE);
--      firsttime = FALSE;
--   }
--   return enabled;
-+   util_cpu_detect();
-+   return &util_cpu_caps;
+     r300->velems = velems;
+ 
+-    u_vbuf_bind_vertex_elements(r300->vbuf_mgr, state, velems->vmgr_elements);
+-
+-    if (r300->draw) {
++    if (r300->screen->caps.has_tcl) {
++        u_vbuf_bind_vertex_elements(r300->vbuf_mgr, state, velems->vmgr_elements);
++    } else {
+         draw_set_vertex_elements(r300->draw, velems->count, velems->velem);
+         return;
+     }
+@@ -1750,7 +1756,9 @@ static void r300_delete_vertex_elements_state(struct pipe_context *pipe, void *s
+     struct r300_context *r300 = r300_context(pipe);
+     struct r300_vertex_element_state *velems = state;
+ 
+-    u_vbuf_destroy_vertex_elements(r300->vbuf_mgr, velems->vmgr_elements);
++    if (r300->screen->caps.has_tcl) {
++        u_vbuf_destroy_vertex_elements(r300->vbuf_mgr, velems->vmgr_elements);
++    }
+     FREE(state);
  }
--#endif
  
- int rtasm_cpu_has_sse(void)
+@@ -1765,10 +1773,10 @@ static void* r300_create_vs_state(struct pipe_context* pipe,
+     vs->state.tokens = tgsi_dup_tokens(shader->tokens);
+ 
+     if (r300->screen->caps.has_tcl) {
+-        r300_init_vs_outputs(vs);
++        r300_init_vs_outputs(r300, vs);
+         r300_translate_vertex_shader(r300, vs);
+     } else {
+-        r300_draw_init_vertex_shader(r300->draw, vs);
++        r300_draw_init_vertex_shader(r300, vs);
+     }
+ 
+     return vs;
+diff --git a/src/gallium/drivers/r300/r300_vs.c b/src/gallium/drivers/r300/r300_vs.c
+index 1eef071..4faf2b5 100644
+--- a/src/gallium/drivers/r300/r300_vs.c
++++ b/src/gallium/drivers/r300/r300_vs.c
+@@ -36,6 +36,7 @@
+ 
+ /* Convert info about VS output semantics into r300_shader_semantics. */
+ static void r300_shader_read_vs_outputs(
++    struct r300_context *r300,
+     struct tgsi_shader_info* info,
+     struct r300_shader_semantics* vs_outputs)
  {
--   /* FIXME: actually detect this at run-time */
--#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
--   return rtasm_sse_enabled();
--#else
--   return 0;
--#endif
-+   return !debug_get_option_nosse() && get_cpu_caps()->has_sse;
+@@ -83,6 +84,14 @@ static void r300_shader_read_vs_outputs(
+                 fprintf(stderr, "r300 VP: cannot handle edgeflag output.\n");
+                 break;
+ 
++            case TGSI_SEMANTIC_CLIPVERTEX:
++                assert(index == 0);
++                /* Draw does clip vertex for us. */
++                if (r300->screen->caps.has_tcl) {
++                    fprintf(stderr, "r300 VP: cannot handle clip vertex output.\n");
++                }
++                break;
++
+             default:
+                 fprintf(stderr, "r300 VP: unknown vertex output semantic: %i.\n",
+                         info->output_semantic_name[i]);
+@@ -160,10 +169,11 @@ static void set_vertex_inputs_outputs(struct r300_vertex_program_compiler * c)
+     c->code->outputs[outputs->wpos] = reg++;
  }
  
- int rtasm_cpu_has_sse2(void) 
+-void r300_init_vs_outputs(struct r300_vertex_shader *vs)
++void r300_init_vs_outputs(struct r300_context *r300,
++                          struct r300_vertex_shader *vs)
  {
--   /* FIXME: actually detect this at run-time */
--#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
--   return rtasm_sse_enabled();
-+   return !debug_get_option_nosse() && get_cpu_caps()->has_sse2;
-+}
-+
-+
- #else
-+
-+int rtasm_cpu_has_sse(void)
-+{
-    return 0;
--#endif
- }
-+
-+int rtasm_cpu_has_sse2(void)
-+{
-+   return 0;
-+}
-+
-+#endif
-diff --git a/src/gallium/auxiliary/util/u_debug_memory.c b/src/gallium/auxiliary/util/u_debug_memory.c
-index f1baa62..e24a8bc 100644
---- a/src/gallium/auxiliary/util/u_debug_memory.c
-+++ b/src/gallium/auxiliary/util/u_debug_memory.c
-@@ -38,6 +38,7 @@
- 
- #include "os/os_memory.h"
- #include "os/os_memory_debug.h"
-+#include "os/os_thread.h"
- 
- #include "util/u_debug.h" 
- #include "util/u_debug_stack.h" 
-@@ -72,6 +73,8 @@ struct debug_memory_footer
- 
- static struct list_head list = { &list, &list };
- 
-+pipe_static_mutex(list_mutex);
-+
- static unsigned long last_no = 0;
- 
- 
-@@ -132,7 +135,9 @@ debug_malloc(const char *file, unsigned line, const char *function,
-    ftr = footer_from_header(hdr);
-    ftr->magic = DEBUG_MEMORY_MAGIC;
-    
-+   pipe_mutex_lock(list_mutex);
-    LIST_ADDTAIL(&hdr->head, &list);
-+   pipe_mutex_unlock(list_mutex);
-    
-    return data_from_header(hdr);
- }
-@@ -164,7 +169,9 @@ debug_free(const char *file, unsigned line, const char *function,
-       debug_assert(0);
-    }
- 
-+   pipe_mutex_lock(list_mutex);
-    LIST_DEL(&hdr->head);
-+   pipe_mutex_unlock(list_mutex);
-    hdr->magic = 0;
-    ftr->magic = 0;
-    
-@@ -232,7 +239,9 @@ debug_realloc(const char *file, unsigned line, const char *function,
-    new_ftr = footer_from_header(new_hdr);
-    new_ftr->magic = DEBUG_MEMORY_MAGIC;
-    
-+   pipe_mutex_lock(list_mutex);
-    LIST_REPLACE(&old_hdr->head, &new_hdr->head);
-+   pipe_mutex_unlock(list_mutex);
- 
-    /* copy data */
-    new_ptr = data_from_header(new_hdr);
-diff --git a/src/gallium/drivers/r300/compiler/radeon_program_alu.c b/src/gallium/drivers/r300/compiler/radeon_program_alu.c
-index dd1dfb3..c48f936 100644
---- a/src/gallium/drivers/r300/compiler/radeon_program_alu.c
-+++ b/src/gallium/drivers/r300/compiler/radeon_program_alu.c
-@@ -1165,35 +1165,79 @@ int radeonTransformDeriv(struct radeon_compiler* c,
- }
- 
- /**
-+ * IF Temp[0].x -> IF Temp[0].x
-+ * ...          -> ...
-+ * KILP         -> KIL -abs(Temp[0].x)
-+ * ...          -> ...
-+ * ENDIF        -> ENDIF
-+ *
-+ * === OR ===
-+ *
-  * IF Temp[0].x -\
-  * KILP         - > KIL -abs(Temp[0].x)
-  * ENDIF        -/
+     tgsi_scan_shader(vs->state.tokens, &vs->info);
+-    r300_shader_read_vs_outputs(&vs->info, &vs->outputs);
++    r300_shader_read_vs_outputs(r300, &vs->info, &vs->outputs);
+ }
+ 
+ static void r300_dummy_vertex_shader(
+@@ -187,7 +197,7 @@ static void r300_dummy_vertex_shader(
+     ureg_destroy(ureg);
+ 
+     shader->dummy = TRUE;
+-    r300_init_vs_outputs(shader);
++    r300_init_vs_outputs(r300, shader);
+     r300_translate_vertex_shader(r300, shader);
+ }
+ 
+diff --git a/src/gallium/drivers/r300/r300_vs.h b/src/gallium/drivers/r300/r300_vs.h
+index a482ddc..b02d5d7 100644
+--- a/src/gallium/drivers/r300/r300_vs.h
++++ b/src/gallium/drivers/r300/r300_vs.h
+@@ -56,12 +56,13 @@ struct r300_vertex_shader {
+     void *draw_vs;
+ };
+ 
+-void r300_init_vs_outputs(struct r300_vertex_shader *vs);
++void r300_init_vs_outputs(struct r300_context *r300,
++                          struct r300_vertex_shader *vs);
+ 
+ void r300_translate_vertex_shader(struct r300_context *r300,
+                                   struct r300_vertex_shader *vs);
+ 
+-void r300_draw_init_vertex_shader(struct draw_context *draw,
++void r300_draw_init_vertex_shader(struct r300_context *r300,
+                                   struct r300_vertex_shader *vs);
+ 
+ #endif /* R300_VS_H */
+diff --git a/src/gallium/drivers/r300/r300_vs_draw.c b/src/gallium/drivers/r300/r300_vs_draw.c
+index 2939963..69d6758 100644
+--- a/src/gallium/drivers/r300/r300_vs_draw.c
++++ b/src/gallium/drivers/r300/r300_vs_draw.c
+@@ -29,7 +29,7 @@
   *
-- * This needs to be done in its own pass, because it modifies the instructions
-- * before and after KILP.
-+ * === OR ===
-+ *
-+ * IF Temp[0].x -> IF Temp[0].x
-+ * ...          -> ...
-+ * ELSE         -> ELSE
-+ * ...	        -> ...
-+ * KILP	        -> KIL -abs(Temp[0].x)
-+ * ...          -> ...
-+ * ENDIF        -> ENDIF
-+ *
-+ * === OR ===
-+ *
-+ * KILP         -> KIL -none.1111
-+ *
-+ * This needs to be done in its own pass, because it might modify the
-+ * instructions before and after KILP.
-  */
- void rc_transform_KILP(struct radeon_compiler * c, void *user)
+  * Transformations:
+  * 1) If the secondary color output is present, the primary color must be
+- *    inserted before it.
++ *    present too.
+  * 2) If any back-face color output is present, there must be all 4 color
+  *    outputs and missing ones must be inserted.
+  * 3) Insert a trailing texcoord output containing a copy of POS, for WPOS.
+@@ -52,7 +52,6 @@ struct vs_transform_context {
+ 
+     boolean color_used[2];
+     boolean bcolor_used[2];
+-    boolean temp_used[128];
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/packages/Mesa/Mesa-git.patch?r1=1.19&r2=1.20
    http://cvs.pld-linux.org/packages/Mesa/Mesa.spec?r1=1.319&r2=1.320



More information about the pld-cvs-commit mailing list