Merge branch 'gallium-msaa'
authorRoland Scheidegger <sroland@vmware.com>
Fri, 21 May 2010 18:02:22 +0000 (20:02 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 21 May 2010 18:02:22 +0000 (20:02 +0200)
Conflicts:
src/mesa/state_tracker/st_gen_mipmap.c
src/mesa/state_tracker/st_texture.c

51 files changed:
1  2 
src/gallium/auxiliary/util/u_blit.c
src/gallium/auxiliary/util/u_blitter.c
src/gallium/auxiliary/util/u_gen_mipmap.c
src/gallium/auxiliary/util/u_surface.c
src/gallium/docs/source/context.rst
src/gallium/docs/source/screen.rst
src/gallium/drivers/cell/ppu/cell_pipe_state.c
src/gallium/drivers/cell/ppu/cell_screen.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/i915/i915_state.c
src/gallium/drivers/i965/brw_resource.c
src/gallium/drivers/i965/brw_resource_texture.c
src/gallium/drivers/i965/brw_screen.c
src/gallium/drivers/identity/id_screen.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/nouveau/nouveau_screen.c
src/gallium/drivers/nv50/nv50_screen.c
src/gallium/drivers/nv50/nv50_state.c
src/gallium/drivers/nvfx/nvfx_screen.c
src/gallium/drivers/nvfx/nvfx_state.c
src/gallium/drivers/r300/r300_context.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r300/r300_state.c
src/gallium/drivers/r300/r300_transfer.c
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/drivers/trace/tr_context.c
src/gallium/drivers/trace/tr_screen.c
src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_screen.h
src/gallium/include/pipe/p_state.h
src/gallium/state_trackers/egl/common/egl_g3d.c
src/gallium/state_trackers/vega/vg_context.c
src/gallium/state_trackers/vega/vg_manager.c
src/gallium/state_trackers/xorg/xorg_dri2.c
src/gallium/state_trackers/xorg/xorg_exa.c
src/gallium/state_trackers/xorg/xorg_renderer.c
src/mesa/SConscript
src/mesa/sources.mak
src/mesa/state_tracker/st_atom_pixeltransfer.c
src/mesa/state_tracker/st_cb_bitmap.c
src/mesa/state_tracker/st_cb_blit.c
src/mesa/state_tracker/st_cb_bufferobjects.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_eglimage.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_extensions.c
src/mesa/state_tracker/st_gen_mipmap.c
src/mesa/state_tracker/st_texture.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 11c10e2f2a85e360835334c7f46827e3910a3785,4f41530c16a648464a3014dd2c420431645dd685..67e09362d8e38fbef6ef8ce270c42f8d40d289b6
@@@ -402,8 -400,17 +402,15 @@@ static void r300_set_clip_state(struct 
          draw_set_clip_state(r300->draw, state);
          r300->clip_state.size = 2;
      }
 -
 -    r300->clip_state.dirty = TRUE;
  }
  
+ static void
+ r300_set_sample_mask(struct pipe_context *pipe,
+                      unsigned sample_mask)
+ {
+ }
  /* Create a new depth, stencil, and alpha state based on the CSO dsa state.
   *
   * This contains the depth buffer, stencil buffer, alpha test, and such.
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 932e8edb2504a855ebfe47e97e84b247ee453468,ad20004d369b91307139d1599925bf0c8a662527..f74d8cd42d046cb98e832efae13208171f4b5e00
@@@ -969,8 -968,11 +969,9 @@@ st_CopyPixels(GLcontext *ctx, GLint src
     enum pipe_format srcFormat, texFormat;
     GLboolean invertTex = GL_FALSE;
     GLint readX, readY, readW, readH;
+    GLuint sample_count;
     struct gl_pixelstore_attrib pack = ctx->DefaultPacking;
  
 -   pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
 -
     st_validate_state(st);
  
     if (type == GL_STENCIL) {
Simple merge
index e656908bedec0cb6a2cd47cdf29d974cc88339b0,5cf8b4a881bed4bfed505c641bd2d4351444fe4f..2d587df6055a1c37414567b187551e8f41f43d43
@@@ -324,7 -300,11 +324,11 @@@ st_generate_mipmap(GLcontext *ctx, GLen
     if (!pt)
        return;
  
-    /* find expected last mipmap level to generate */
+    /* not sure if this ultimately actually should work,
+       but we're not supporting multisampled textures yet. */
+    assert(pt->nr_samples < 2);
 -   /* find expected last mipmap level */
++   /* find expected last mipmap level to generate*/
     lastLevel = compute_num_levels(ctx, texObj, target) - 1;
  
     if (lastLevel == 0)
index 2d364737cb0eace58369ac1803266a365a5407d1,d0d1c5c3156117157631a2a6d40fee2b1535edb3..dbdf1ea1ad0420037b4e48bfeede0f4fceaabef0
@@@ -279,43 -242,61 +279,38 @@@ print_center_pixel(struct pipe_context 
  void
  st_texture_image_copy(struct pipe_context *pipe,
                        struct pipe_resource *dst, GLuint dstLevel,
 -                      struct pipe_resource *src,
 +                      struct pipe_resource *src, GLuint srcLevel,
                        GLuint face)
  {
-    struct pipe_screen *screen = pipe->screen;
     GLuint width = u_minify(dst->width0, dstLevel); 
     GLuint height = u_minify(dst->height0, dstLevel); 
     GLuint depth = u_minify(dst->depth0, dstLevel); 
-    struct pipe_surface *src_surface;
-    struct pipe_surface *dst_surface;
+    struct pipe_subresource dstsub, srcsub;
     GLuint i;
  
 -   assert(src->width0 == dst->width0);
 -   assert(src->height0 == dst->height0);
 +   assert(u_minify(src->width0, srcLevel) == width);
 +   assert(u_minify(src->height0, srcLevel) == height);
 +   assert(u_minify(src->depth0, srcLevel) == depth);
  
 -
+    dstsub.face = face;
+    dstsub.level = dstLevel;
+    srcsub.face = face;
++   srcsub.level = srcLevel;
 +   /* Loop over 3D image slices */
     for (i = 0; i < depth; i++) {
 -      GLuint srcLevel;
 -
 -      /* find src texture level of needed size */
 -      for (srcLevel = 0; srcLevel <= src->last_level; srcLevel++) {
 -         if (u_minify(src->width0, srcLevel) == width &&
 -             u_minify(src->height0, srcLevel) == height) {
 -            break;
 -         }
 -      }
 -      assert(u_minify(src->width0, srcLevel) == width);
 -      assert(u_minify(src->height0, srcLevel) == height);
 -
 -#if 0
 -      {
 -         struct pipe_screen *screen = pipe->screen;
 -         src_surface = screen->get_tex_surface(screen, src, face, srcLevel, i,
 -                                               PIPE_BUFFER_USAGE_CPU_READ);
 -         ubyte *map = screen->surface_map(screen, src_surface, PIPE_BUFFER_USAGE_CPU_READ);
 -         map += src_surface->width * src_surface->height * 4 / 2;
 -         printf("%s center pixel: %d %d %d %d (pt %p[%d] -> %p[%d])\n",
 -                __FUNCTION__,
 -                map[0], map[1], map[2], map[3],
 -                src, srcLevel, dst, dstLevel);
 -
 -         screen->surface_unmap(screen, src_surface);
 -         pipe_surface_reference(&src_surface, NULL);
 +
 +      if (0)  {
 +         print_center_pixel(pipe, src);
        }
 -#endif
 -      srcsub.level = srcLevel;
  
-       dst_surface = screen->get_tex_surface(screen, dst, face, dstLevel, i,
-                                             PIPE_BIND_BLIT_DESTINATION);
-       src_surface = screen->get_tex_surface(screen, src, face, srcLevel, i,
-                                             PIPE_BIND_BLIT_SOURCE);
-       pipe->surface_copy(pipe,
-                          dst_surface,
-                          0, 0, /* destX, Y */
-                          src_surface,
-                          0, 0, /* srcX, Y */
-                          width, height);
-       pipe_surface_reference(&src_surface, NULL);
-       pipe_surface_reference(&dst_surface, NULL);
+       pipe->resource_copy_region(pipe,
+                                  dst,
+                                  dstsub,
+                                  0, 0, i,/* destX, Y, Z */
+                                  src,
+                                  srcsub,
+                                  0, 0, i,/* srcX, Y, Z */
+                                  width, height);
     }
  }