Merge branch 'gallium-noconstbuf'
authorRoland Scheidegger <sroland@vmware.com>
Fri, 15 Jan 2010 17:09:45 +0000 (18:09 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 15 Jan 2010 17:09:45 +0000 (18:09 +0100)
Conflicts:
src/gallium/drivers/softpipe/sp_draw_arrays.c
src/mesa/state_tracker/st_draw_feedback.c

31 files changed:
1  2 
src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
src/gallium/drivers/cell/ppu/cell_context.h
src/gallium/drivers/cell/ppu/cell_draw_arrays.c
src/gallium/drivers/cell/ppu/cell_state_emit.c
src/gallium/drivers/i915/i915_state.c
src/gallium/drivers/i965/brw_pipe_shader.c
src/gallium/drivers/identity/id_context.c
src/gallium/drivers/llvmpipe/lp_context.c
src/gallium/drivers/llvmpipe/lp_context.h
src/gallium/drivers/llvmpipe/lp_state.h
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/gallium/drivers/nv04/nv04_state.c
src/gallium/drivers/nv30/nv30_state.c
src/gallium/drivers/nv40/nv40_state.c
src/gallium/drivers/nv50/nv50_state.c
src/gallium/drivers/r300/r300_state.c
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_context.h
src/gallium/drivers/softpipe/sp_draw_arrays.c
src/gallium/drivers/softpipe/sp_state.h
src/gallium/drivers/softpipe/sp_state_fs.c
src/gallium/drivers/trace/tr_context.c
src/gallium/drivers/trace/tr_dump_state.c
src/gallium/include/pipe/p_context.h
src/gallium/include/pipe/p_state.h
src/gallium/state_trackers/python/gallium.i
src/gallium/state_trackers/python/p_context.i
src/gallium/state_trackers/python/retrace/interpreter.py
src/gallium/state_trackers/xorg/xorg_renderer.c
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_draw_feedback.c

index 3fa8b975d3932b0f9a9e227dfac1ad7936ab1439,2016b21a40984e893fe63985010efe9bd6067f1c..0a4da8ecc8534174aee15b7fe3a0b046d30edcfd
@@@ -59,9 -59,9 +59,9 @@@ cell_map_constant_buffers(struct cell_c
        }
     }
  
 -   draw_set_mapped_constant_buffer(sp->draw,
 +   draw_set_mapped_constant_buffer(sp->draw, PIPE_SHADER_VERTEX,
                                     sp->mapped_constants[PIPE_SHADER_VERTEX],
-                                    sp->constants[PIPE_SHADER_VERTEX].buffer->size);
+                                    sp->constants[PIPE_SHADER_VERTEX]->size);
  }
  
  static void
Simple merge
index b73ca2d41ed2ebea5c064a9aa91e8d1dbbb413e9,d129918fe2dd2bcfde3e52422a5d4d5aae7d40ac..9f4bbef73fb7aba647bd696c30aa51448885ed84
@@@ -724,10 -722,11 +723,10 @@@ llvmpipe_set_constant_buffer(struct pip
     assert(shader < PIPE_SHADER_TYPES);
     assert(index == 0);
  
 -   if(shader == PIPE_SHADER_VERTEX)
 -      draw_flush(llvmpipe->draw);
 +   draw_flush(llvmpipe->draw);
  
     /* note: reference counting */
-    pipe_buffer_reference(&llvmpipe->constants[shader].buffer, buffer);
+    pipe_buffer_reference(&llvmpipe->constants[shader], constants);
  
     if(shader == PIPE_SHADER_FRAGMENT) {
        llvmpipe->jit_context.constants = data;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 2a27e5ce64d6b403c571cc9731ab377ea823877a,96e1c5d8159b0c41c7b592d96aafdf6547466e1f..03b58d2fb7245c41d64a782cf7fdd1e61ed71876
@@@ -49,30 -48,22 +49,30 @@@ static voi
  softpipe_map_constant_buffers(struct softpipe_context *sp)
  {
     struct pipe_winsys *ws = sp->pipe.winsys;
 -   uint i, size;
 +   uint i, vssize, gssize;
  
     for (i = 0; i < PIPE_SHADER_TYPES; i++) {
-       if (sp->constants[i].buffer && sp->constants[i].buffer->size)
-          sp->mapped_constants[i] = ws->buffer_map(ws, sp->constants[i].buffer,
+       if (sp->constants[i] && sp->constants[i]->size)
+          sp->mapped_constants[i] = ws->buffer_map(ws, sp->constants[i],
                                                    PIPE_BUFFER_USAGE_CPU_READ);
     }
  
-    if (sp->constants[PIPE_SHADER_VERTEX].buffer)
-       vssize = sp->constants[PIPE_SHADER_VERTEX].buffer->size;
+    if (sp->constants[PIPE_SHADER_VERTEX])
 -      size = sp->constants[PIPE_SHADER_VERTEX]->size;
++      vssize = sp->constants[PIPE_SHADER_VERTEX]->size;
     else
 -      size = 0;
 +      vssize = 0;
  
-    if (sp->constants[PIPE_SHADER_GEOMETRY].buffer)
-       gssize = sp->constants[PIPE_SHADER_GEOMETRY].buffer->size;
 -   draw_set_mapped_constant_buffer(sp->draw,
++   if (sp->constants[PIPE_SHADER_GEOMETRY])
++      gssize = sp->constants[PIPE_SHADER_GEOMETRY]->size;
 +   else
 +      gssize = 0;
 +
 +   draw_set_mapped_constant_buffer(sp->draw, PIPE_SHADER_VERTEX,
                                     sp->mapped_constants[PIPE_SHADER_VERTEX],
 -                                   size);
 +                                   vssize);
 +   draw_set_mapped_constant_buffer(sp->draw, PIPE_SHADER_GEOMETRY,
 +                                   sp->mapped_constants[PIPE_SHADER_GEOMETRY],
 +                                   gssize);
  }
  
  
@@@ -87,12 -78,11 +87,12 @@@ softpipe_unmap_constant_buffers(struct 
      */
     draw_flush(sp->draw);
  
 -   draw_set_mapped_constant_buffer(sp->draw, NULL, 0);
 +   draw_set_mapped_constant_buffer(sp->draw, PIPE_SHADER_VERTEX, NULL, 0);
 +   draw_set_mapped_constant_buffer(sp->draw, PIPE_SHADER_GEOMETRY, NULL, 0);
  
 -   for (i = 0; i < 2; i++) {
 +   for (i = 0; i < PIPE_SHADER_TYPES; i++) {
-       if (sp->constants[i].buffer && sp->constants[i].buffer->size)
-          ws->buffer_unmap(ws, sp->constants[i].buffer);
+       if (sp->constants[i] && sp->constants[i]->size)
+          ws->buffer_unmap(ws, sp->constants[i]);
        sp->mapped_constants[i] = NULL;
     }
  }
index aa12bb215a8e4db13f842fe73099a83824ebb134,eba0563c62c2dac2ae3056268c5d3df7ba4bf5f6..b7ed4441b4363ab0c5f665b36f354f5f267dfe8c
@@@ -166,11 -159,8 +166,10 @@@ softpipe_set_constant_buffer(struct pip
     assert(shader < PIPE_SHADER_TYPES);
     assert(index == 0);
  
 +   draw_flush(softpipe->draw);
 +
     /* note: reference counting */
-    pipe_buffer_reference(&softpipe->constants[shader].buffer,
-                        buf ? buf->buffer : NULL);
+    pipe_buffer_reference(&softpipe->constants[shader], buf);
  
     softpipe->dirty |= SP_NEW_CONSTANTS;
  }
Simple merge
Simple merge
Simple merge
index 0599acc8b6fefdcea95dc8322d12d451e69a4e57,187e836c38624d556a65c7fe929e4b9e2373b40d..a05d6dd06bd6a3c98cde8ff5578577aaa64c19e4
@@@ -240,11 -239,10 +240,11 @@@ st_feedback_draw_vbo(GLcontext *ctx
  
     /* map constant buffers */
     mapped_constants = pipe_buffer_map(pipe->screen,
-                                       st->state.constants[PIPE_SHADER_VERTEX].buffer,
+                                       st->state.constants[PIPE_SHADER_VERTEX],
                                        PIPE_BUFFER_USAGE_CPU_READ);
 -   draw_set_mapped_constant_buffer(st->draw, mapped_constants,
 +   draw_set_mapped_constant_buffer(st->draw, PIPE_SHADER_VERTEX,
 +                                   mapped_constants,
-                                    st->state.constants[PIPE_SHADER_VERTEX].buffer->size);
+                                    st->state.constants[PIPE_SHADER_VERTEX]->size);
  
  
     /* draw here */