gallium: make p_winsys internal
authorZack Rusin <zackr@vmware.com>
Fri, 30 Jan 2009 20:56:00 +0000 (15:56 -0500)
committerZack Rusin <zackr@vmware.com>
Fri, 30 Jan 2009 20:57:33 +0000 (15:57 -0500)
move it to pipe/internal/p_winsys_screen.h and start converting
the state trackers to the screen usage

114 files changed:
src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c
src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
src/gallium/auxiliary/pipebuffer/pb_winsys.c
src/gallium/auxiliary/util/u_blit.c
src/gallium/auxiliary/util/u_draw_quad.c
src/gallium/auxiliary/util/u_gen_mipmap.c
src/gallium/auxiliary/util/u_simple_shaders.c
src/gallium/auxiliary/util/u_timed_winsys.c
src/gallium/drivers/cell/ppu/cell_context.c
src/gallium/drivers/cell/ppu/cell_draw_arrays.c
src/gallium/drivers/cell/ppu/cell_screen.c
src/gallium/drivers/cell/ppu/cell_state_shader.c
src/gallium/drivers/cell/ppu/cell_texture.c
src/gallium/drivers/cell/ppu/cell_vertex_shader.c
src/gallium/drivers/failover/fo_context.c
src/gallium/drivers/i915simple/i915_context.c
src/gallium/drivers/i915simple/i915_debug.c
src/gallium/drivers/i915simple/i915_debug.h
src/gallium/drivers/i915simple/i915_debug_fp.c
src/gallium/drivers/i915simple/i915_prim_vbuf.c
src/gallium/drivers/i915simple/i915_screen.c
src/gallium/drivers/i915simple/i915_state.c
src/gallium/drivers/i915simple/i915_surface.c
src/gallium/drivers/i915simple/i915_texture.c
src/gallium/drivers/i965simple/brw_blit.c
src/gallium/drivers/i965simple/brw_context.c
src/gallium/drivers/i965simple/brw_curbe.c
src/gallium/drivers/i965simple/brw_draw.c
src/gallium/drivers/i965simple/brw_screen.c
src/gallium/drivers/i965simple/brw_state.c
src/gallium/drivers/i965simple/brw_state_pool.c
src/gallium/drivers/i965simple/brw_surface.c
src/gallium/drivers/i965simple/brw_tex_layout.c
src/gallium/drivers/nouveau/nouveau_winsys.h
src/gallium/drivers/nv04/nv04_context.c
src/gallium/drivers/nv04/nv04_miptree.c
src/gallium/drivers/nv04/nv04_prim_vbuf.c
src/gallium/drivers/nv04/nv04_screen.c
src/gallium/drivers/nv04/nv04_surface.c
src/gallium/drivers/nv04/nv04_vbo.c
src/gallium/drivers/nv10/nv10_context.c
src/gallium/drivers/nv10/nv10_miptree.c
src/gallium/drivers/nv10/nv10_prim_vbuf.c
src/gallium/drivers/nv10/nv10_screen.c
src/gallium/drivers/nv10/nv10_state.c
src/gallium/drivers/nv10/nv10_surface.c
src/gallium/drivers/nv10/nv10_vbo.c
src/gallium/drivers/nv20/nv20_context.c
src/gallium/drivers/nv20/nv20_miptree.c
src/gallium/drivers/nv20/nv20_prim_vbuf.c
src/gallium/drivers/nv20/nv20_screen.c
src/gallium/drivers/nv20/nv20_state.c
src/gallium/drivers/nv20/nv20_surface.c
src/gallium/drivers/nv20/nv20_vbo.c
src/gallium/drivers/nv20/nv20_vertprog.c
src/gallium/drivers/nv30/nv30_context.c
src/gallium/drivers/nv30/nv30_fragprog.c
src/gallium/drivers/nv30/nv30_miptree.c
src/gallium/drivers/nv30/nv30_screen.c
src/gallium/drivers/nv30/nv30_surface.c
src/gallium/drivers/nv30/nv30_vbo.c
src/gallium/drivers/nv30/nv30_vertprog.c
src/gallium/drivers/nv40/nv40_context.c
src/gallium/drivers/nv40/nv40_draw.c
src/gallium/drivers/nv40/nv40_fragprog.c
src/gallium/drivers/nv40/nv40_miptree.c
src/gallium/drivers/nv40/nv40_screen.c
src/gallium/drivers/nv40/nv40_surface.c
src/gallium/drivers/nv40/nv40_vbo.c
src/gallium/drivers/nv40/nv40_vertprog.c
src/gallium/drivers/nv50/nv50_context.c
src/gallium/drivers/nv50/nv50_miptree.c
src/gallium/drivers/nv50/nv50_program.c
src/gallium/drivers/nv50/nv50_query.c
src/gallium/drivers/nv50/nv50_screen.c
src/gallium/drivers/nv50/nv50_surface.c
src/gallium/drivers/nv50/nv50_vbo.c
src/gallium/drivers/softpipe/sp_draw_arrays.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/softpipe/sp_state_fs.c
src/gallium/drivers/softpipe/sp_texture.c
src/gallium/drivers/trace/tr_winsys.c
src/gallium/drivers/trace/tr_winsys.h
src/gallium/include/pipe/internal/p_winsys_screen.h [new file with mode: 0644]
src/gallium/include/pipe/p_inlines.h
src/gallium/include/pipe/p_screen.h
src/gallium/include/pipe/p_winsys.h [deleted file]
src/gallium/state_trackers/egl/egl_context.c
src/gallium/state_trackers/egl/egl_tracker.c
src/gallium/state_trackers/g3dvl/vl_basic_csc.c
src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c
src/gallium/state_trackers/python/st_device.c
src/gallium/state_trackers/python/st_softpipe_winsys.c
src/gallium/winsys/drm/intel/common/intel_be_device.c
src/gallium/winsys/drm/intel/common/intel_be_device.h
src/gallium/winsys/drm/intel/gem/intel_be_device.c
src/gallium/winsys/drm/intel/gem/intel_be_device.h
src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.c
src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.h
src/gallium/winsys/drm/nouveau/common/nouveau_winsys_softpipe.c
src/gallium/winsys/egl_xlib/egl_xlib.c
src/gallium/winsys/egl_xlib/sw_winsys.c
src/gallium/winsys/gdi/gdi_softpipe_winsys.c
src/gallium/winsys/xlib/xlib_brw_context.c
src/gallium/winsys/xlib/xlib_brw_screen.c
src/gallium/winsys/xlib/xlib_cell.c
src/gallium/winsys/xlib/xlib_softpipe.c
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_cb_feedback.c
src/mesa/state_tracker/st_cb_flush.c
src/mesa/state_tracker/st_cb_strings.c
src/mesa/state_tracker/wgl/stw_device.c
src/mesa/state_tracker/wgl/stw_wgl_swapbuffers.c

index aa4b0962740e4dd78c50f7a3c22377416193bdab..61afdfe82adffcfffced59b7ab014818e686468d 100644 (file)
@@ -44,7 +44,7 @@
 #include "pipe/p_compiler.h"
 #include "pipe/p_error.h"
 #include "pipe/p_debug.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_thread.h"
 #include "util/u_memory.h"
 #include "util/u_double_list.h"
index f57a7bffd787b8f0693fe9a91e30b5783848406c..19baa82282bfd776adbd4711b4d1fbe77de1f1cb 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "pipe/p_compiler.h"
 #include "pipe/p_debug.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_thread.h"
 #include "util/u_memory.h"
 #include "util/u_double_list.h"
index 62639fe1c876fa95dea31de32a361bda06c5fc0e..a741bae794f9fb65ab8bd28e7ec77e3a0d20bf50 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "pipe/p_compiler.h"
 #include "pipe/p_debug.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_thread.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
index 2b0c4606cf22ff15359e96530563630acea77187..d26800be488c1d08898c358412e3f2e6514737cf 100644 (file)
@@ -34,7 +34,7 @@
  */
 
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_memory.h"
 
 #include "pb_buffer.h"
@@ -184,8 +184,8 @@ pb_winsys_buffer_destroy(struct pipe_winsys *winsys,
 void 
 pb_init_winsys(struct pipe_winsys *winsys)
 {
-   winsys->_user_buffer_create = pb_winsys_user_buffer_create;
-   winsys->_buffer_map = pb_winsys_buffer_map;
-   winsys->_buffer_unmap = pb_winsys_buffer_unmap;
-   winsys->_buffer_destroy = pb_winsys_buffer_destroy;
+   winsys->user_buffer_create = pb_winsys_user_buffer_create;
+   winsys->buffer_map = pb_winsys_buffer_map;
+   winsys->buffer_unmap = pb_winsys_buffer_unmap;
+   winsys->buffer_destroy = pb_winsys_buffer_destroy;
 }
index bc88086b5e0152b0b090e441c661ea513bcf2d52..841e9c01e7ee3b8d83ee45d8d2ad3f08282a5604 100644 (file)
@@ -37,7 +37,6 @@
 #include "pipe/p_debug.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
 #include "pipe/p_shader_tokens.h"
 
 #include "util/u_blit.h"
index 1af575530f5e4158a344fe616f75b797e6b166e9..f282f3d289154e0ca00168c4c4805259c739a057 100644 (file)
@@ -29,7 +29,6 @@
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
 #include "util/u_draw_quad.h"
 
 
index cb9776ed95b11d1cc1aedce4caf7c7dcc98a10e6..301a58ed7b956bd44db010a284b61cf65be57bdf 100644 (file)
@@ -38,7 +38,6 @@
 #include "pipe/p_debug.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
 #include "pipe/p_shader_tokens.h"
 
 #include "util/u_memory.h"
index f06d13c2c4ae00c231a0d78869cb3e9f5326ad86..706155e99a7905ba605f2a6e8fdb10771385d9a5 100644 (file)
@@ -37,7 +37,7 @@
 #include "pipe/p_debug.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/p_screen.h"
 #include "pipe/p_shader_tokens.h"
 
 #include "util/u_memory.h"
index c5797f5d63402d863f91e6f438ef5e15c1344e2b..f237e12d73502894c26a6c8b4fe8fa7ff9736ce6 100644 (file)
@@ -29,7 +29,7 @@
  * Authors: Keith Whitwell <keithw-at-tungstengraphics-dot-com>
  */
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "u_timed_winsys.h"
 #include "util/u_memory.h"
 #include "util/u_time.h"
@@ -122,7 +122,7 @@ timed_buffer_create(struct pipe_winsys *winsys,
    uint64_t start = time_start();
 
    struct pipe_buffer *buf =
-      backend->_buffer_create( backend, alignment, usage, size );
+      backend->buffer_create( backend, alignment, usage, size );
 
    time_finish(winsys, start, 0, __FUNCTION__);
    
@@ -140,7 +140,7 @@ timed_user_buffer_create(struct pipe_winsys *winsys,
    struct pipe_winsys *backend = timed_winsys(winsys)->backend;
    uint64_t start = time_start();
 
-   struct pipe_buffer *buf = backend->_user_buffer_create( backend, data, bytes );
+   struct pipe_buffer *buf = backend->user_buffer_create( backend, data, bytes );
 
    time_finish(winsys, start, 1, __FUNCTION__);
    
@@ -156,7 +156,7 @@ timed_buffer_map(struct pipe_winsys *winsys,
    struct pipe_winsys *backend = timed_winsys(winsys)->backend;
    uint64_t start = time_start();
 
-   void *map = backend->_buffer_map( backend, buf, flags );
+   void *map = backend->buffer_map( backend, buf, flags );
 
    time_finish(winsys, start, 2, __FUNCTION__);
    
@@ -171,7 +171,7 @@ timed_buffer_unmap(struct pipe_winsys *winsys,
    struct pipe_winsys *backend = timed_winsys(winsys)->backend;
    uint64_t start = time_start();
 
-   backend->_buffer_unmap( backend, buf );
+   backend->buffer_unmap( backend, buf );
 
    time_finish(winsys, start, 3, __FUNCTION__);
 }
@@ -184,7 +184,7 @@ timed_buffer_destroy(struct pipe_winsys *winsys,
    struct pipe_winsys *backend = timed_winsys(winsys)->backend;
    uint64_t start = time_start();
 
-   backend->_buffer_destroy( backend, buf );
+   backend->buffer_destroy( backend, buf );
 
    time_finish(winsys, start, 4, __FUNCTION__);
 }
@@ -216,7 +216,7 @@ timed_surface_buffer_create(struct pipe_winsys *winsys,
    struct pipe_winsys *backend = timed_winsys(winsys)->backend;
    uint64_t start = time_start();
 
-   struct pipe_buffer *ret = backend->_surface_buffer_create( backend, width, height, 
+   struct pipe_buffer *ret = backend->surface_buffer_create( backend, width, height, 
                                                              format, usage, stride );
 
    time_finish(winsys, start, 7, __FUNCTION__);
@@ -296,12 +296,12 @@ struct pipe_winsys *u_timed_winsys_create( struct pipe_winsys *backend )
 {
    struct timed_winsys *ws = CALLOC_STRUCT(timed_winsys);
    
-   ws->base._user_buffer_create = timed_user_buffer_create;
-   ws->base._buffer_map = timed_buffer_map;
-   ws->base._buffer_unmap = timed_buffer_unmap;
-   ws->base._buffer_destroy = timed_buffer_destroy;
-   ws->base._buffer_create = timed_buffer_create;
-   ws->base._surface_buffer_create = timed_surface_buffer_create;
+   ws->base.user_buffer_create = timed_user_buffer_create;
+   ws->base.buffer_map = timed_buffer_map;
+   ws->base.buffer_unmap = timed_buffer_unmap;
+   ws->base.buffer_destroy = timed_buffer_destroy;
+   ws->base.buffer_create = timed_buffer_create;
+   ws->base.surface_buffer_create = timed_surface_buffer_create;
    ws->base.flush_frontbuffer = timed_flush_frontbuffer;
    ws->base.get_name = timed_get_name;
    ws->base.fence_reference = timed_fence_reference;
index 8f502823f99201139153e79627e7fe0e983eb67e..ae82ded334a56e3f415c1c8720dd41af340d23c6 100644 (file)
@@ -36,7 +36,7 @@
 #include "pipe/p_defines.h"
 #include "pipe/p_format.h"
 #include "util/u_memory.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_screen.h"
 
 #include "draw/draw_context.h"
index ff3871d933232c8f34765f6300bf307b4e0a0478..67949b73dd60f4fba2e25a526d32ab8d1adec6a0 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "pipe/p_defines.h"
 #include "pipe/p_context.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 
 #include "cell_context.h"
@@ -52,7 +52,7 @@ cell_map_constant_buffers(struct cell_context *sp)
    uint i;
    for (i = 0; i < 2; i++) {
       if (sp->constants[i].size) {
-         sp->mapped_constants[i] = ws->_buffer_map(ws, sp->constants[i].buffer,
+         sp->mapped_constants[i] = ws->buffer_map(ws, sp->constants[i].buffer,
                                                    PIPE_BUFFER_USAGE_CPU_READ);
          cell_flush_buffer_range(sp, sp->mapped_constants[i], 
                                  sp->constants[i].buffer->size);
@@ -71,7 +71,7 @@ cell_unmap_constant_buffers(struct cell_context *sp)
    uint i;
    for (i = 0; i < 2; i++) {
       if (sp->constants[i].size)
-         ws->_buffer_unmap(ws, sp->constants[i].buffer);
+         ws->buffer_unmap(ws, sp->constants[i].buffer);
       sp->mapped_constants[i] = NULL;
    }
 }
index 6fc2257e2a3794ce5e331a441613410ad52c85eb..bbe80793ca9a4ffad5bddf44a83ae92378512c3a 100644 (file)
@@ -27,7 +27,7 @@
 
 
 #include "util/u_memory.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_screen.h"
 
index bcbd81922cf436f5b82c07b2cf0afb59e575a331..990f23e170e95491132051569ad1bcf5dd6adb0f 100644 (file)
@@ -28,7 +28,7 @@
 #include "pipe/p_defines.h"
 #include "util/u_memory.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "draw/draw_context.h"
 #include "tgsi/tgsi_parse.h"
 
index f1b1a38efcfb33d2bece2181617a93f5f6ecde97..4f16e2c6afcadb14de69ab7f2e9e19b56c1339ce 100644 (file)
@@ -34,7 +34,7 @@
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 
@@ -112,7 +112,7 @@ cell_texture_create(struct pipe_screen *screen,
 
    cell_texture_layout(ct);
 
-   ct->buffer = ws->_buffer_create(ws, 32, PIPE_BUFFER_USAGE_PIXEL,
+   ct->buffer = ws->buffer_create(ws, 32, PIPE_BUFFER_USAGE_PIXEL,
                                    ct->buffer_size);
 
    if (!ct->buffer) {
@@ -324,11 +324,11 @@ cell_twiddle_texture(struct pipe_screen *screen,
             /* allocate buffer for tiled data now */
             struct pipe_winsys *ws = screen->winsys;
             uint bytes = bufWidth * bufHeight * 4 * numFaces;
-            ct->tiled_buffer[level] = ws->_buffer_create(ws, 16,
+            ct->tiled_buffer[level] = ws->buffer_create(ws, 16,
                                                          PIPE_BUFFER_USAGE_PIXEL,
                                                          bytes);
             /* and map it */
-            ct->tiled_mapped[level] = ws->_buffer_map(ws, ct->tiled_buffer[level],
+            ct->tiled_mapped[level] = ws->buffer_map(ws, ct->tiled_buffer[level],
                                                       PIPE_BUFFER_USAGE_GPU_READ);
          }
          dst = (uint *) ((ubyte *) ct->tiled_mapped[level] + offset);
index 2b10c116fa38b7c874adbb342febcc8828938549..403cf6d50fce5189b881c6afd3c1a026d3371950 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "pipe/p_defines.h"
 #include "pipe/p_context.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_math.h"
 
 #include "cell_context.h"
index 10c4ffc2096cba653868ef9ca5af238efa4fd97b..0742b27b8fd829b60c3c5a8a7a50381a30ac3d6d 100644 (file)
@@ -27,7 +27,7 @@
 
 
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_memory.h"
 #include "pipe/p_context.h"
 
index 6dd3eda85dc07f141eaf073006c84fe21a4307e0..3e3a59688494dbded287cde1edce82b4c2eba865 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 #include "util/u_memory.h"
 #include "pipe/p_screen.h"
index 4adf9decae1e78aca37705fe363823432472fcda..a300b61c3b9abbeec20b2bd9b4a73a3c9453a0a4 100644 (file)
@@ -30,7 +30,7 @@
 #include "i915_winsys.h"
 #include "i915_debug.h"
 #include "i915_batch.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_debug.h"
 
 
index c33ee3611012c6cdb302e935eebb7b9e10c7a4c9..16ca7277c7a1e4bea7b1d2deb5bc29db123596b7 100644 (file)
@@ -72,7 +72,7 @@ void i915_print_ureg(const char *msg, unsigned ureg);
 
 #if defined(DEBUG) && defined(FILE_DEBUG_FLAG)
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 static INLINE void
 I915_DBG(
index 48be3e14727a1ea12e9d9a42e27d56fcf739205c..9c5b117b6dd47ae12157edc26f6db8c56bcbb42c 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "i915_reg.h"
 #include "i915_debug.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_memory.h"
 
 
index a8e97e7c306ed5d69c001c89c566d2ae0e71dc2f..f49f6d6ed16954a2f9f6a47c245b9aafd0bf1606 100644 (file)
@@ -42,7 +42,7 @@
 #include "draw/draw_vbuf.h"
 #include "pipe/p_debug.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 
index 1c976082df7f38e32578d21793c88bd696f4ddd0..069cc331bb25e3f3ee90b9d455974fec878c7a70 100644 (file)
@@ -27,7 +27,7 @@
 
 
 #include "util/u_memory.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 #include "util/u_string.h"
 
index b931556b7e16a63102cff6aaf57ef8f2f21ec155..273e74002aa230e7420dedacf7a1b7be236fa83f 100644 (file)
@@ -30,7 +30,7 @@
 
 
 #include "draw/draw_context.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
@@ -536,10 +536,10 @@ static void i915_set_constant_buffer(struct pipe_context *pipe,
    if (buf) {
       void *mapped;
       if (buf->buffer && buf->buffer->size &&
-          (mapped = ws->_buffer_map(ws, buf->buffer,
+          (mapped = ws->buffer_map(ws, buf->buffer,
                                     PIPE_BUFFER_USAGE_CPU_READ))) {
          memcpy(i915->current.constants[shader], mapped, buf->buffer->size);
-         ws->_buffer_unmap(ws, buf->buffer);
+         ws->buffer_unmap(ws, buf->buffer);
          i915->current.num_user_constants[shader]
             = buf->buffer->size / (4 * sizeof(float));
       }
index 3b3d9217a0c0faf2db7f88c603ba8f39b965dc98..5ffdb76682c56aeb3ced0596587d8a1a5e5077eb 100644 (file)
@@ -31,7 +31,7 @@
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_tile.h"
 #include "util/u_rect.h"
 
index 7847f2ef86fe390e4b1e29f09ea2d568a8b6d4ef..803ef3a18712796c8601f6199018e341a7ea0cb0 100644 (file)
@@ -34,7 +34,7 @@
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 
@@ -605,7 +605,7 @@ i915_texture_create(struct pipe_screen *screen,
 
    tex_size = tex->stride * tex->total_nblocksy;
 
-   tex->buffer = ws->_buffer_create(ws, 64,
+   tex->buffer = ws->buffer_create(ws, 64,
                                     PIPE_BUFFER_USAGE_PIXEL,
                                     tex_size);
 
@@ -613,10 +613,10 @@ i915_texture_create(struct pipe_screen *screen,
       goto fail;
 
 #if 0
-   void *ptr = ws->_buffer_map(ws, tex->buffer,
+   void *ptr = ws->buffer_map(ws, tex->buffer,
       PIPE_BUFFER_USAGE_CPU_WRITE);
    memset(ptr, 0x80, tex_size);
-   ws->_buffer_unmap(ws, tex->buffer);
+   ws->buffer_unmap(ws, tex->buffer);
 #endif
 
    return &tex->base;
index 8494f70493c3c17e9abb7378d77efc75c9de13ec..4d11f8d2ab85c3e8a591924fbb10d9dc5691b8ec 100644 (file)
@@ -35,7 +35,7 @@
 #include "brw_reg.h"
 
 #include "pipe/p_context.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 #define FILE_DEBUG_FLAG DEBUG_BLIT
 
index 96920df00872f82be55ca238ea4a9d06ab77fc10..c74cbf8d73edd99e7f43e04a3cc15478f916af8b 100644 (file)
@@ -37,7 +37,7 @@
 #include "brw_tex_layout.h"
 #include "brw_winsys.h"
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_context.h"
 #include "util/u_memory.h"
 #include "pipe/p_screen.h"
index 4b1f4d3121315a6646bab266085db8953462c2fb..904cde8e301dfbed8adcab1dd4f9a65f0ec26568 100644 (file)
@@ -38,7 +38,7 @@
 #include "brw_util.h"
 #include "brw_wm.h"
 #include "pipe/p_state.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 
@@ -256,13 +256,13 @@ static void upload_constant_buffer(struct brw_context *brw)
       /* FIXME: buffer size is num_consts + num_immediates */
       if (brw->vs.prog_data->num_consts) {
          /* map the vertex constant buffer and copy to curbe: */
-         void *data = ws->_buffer_map(ws, cbuffer->buffer, 0);
+         void *data = ws->buffer_map(ws, cbuffer->buffer, 0);
          /* FIXME: this is wrong. the cbuffer->buffer->size currently
           * represents size of consts + immediates. so if we'll
           * have both we'll copy over the end of the buffer
           * with the subsequent memcpy */
          memcpy(&buf[offset], data, cbuffer->buffer->size);
-         ws->_buffer_unmap(ws, cbuffer->buffer);
+         ws->buffer_unmap(ws, cbuffer->buffer);
          offset += cbuffer->buffer->size;
       }
       /*immediates*/
index 7598e3dc8af4d0d85efa89fe10f6c9425c2fec2e..648aaa0da529b85585b384296c97b60e70959b4f 100644 (file)
@@ -34,7 +34,7 @@
 #include "brw_state.h"
 
 #include "pipe/p_context.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 static unsigned hw_prim[PIPE_PRIM_POLYGON+1] = {
    _3DPRIM_POINTLIST,
index ab7cd624b27a54c93f43751878f38dda1e15858d..036ddd8c90dad65145a291bf945bf5152d29651a 100644 (file)
@@ -27,7 +27,7 @@
 
 
 #include "util/u_memory.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_string.h"
 
 #include "brw_context.h"
index af46cb546fac689ff4842a9a36d42239fac336ca..b47f5373f3cd8ecb1911e95e4b85917a6b36cd56 100644 (file)
@@ -30,7 +30,7 @@
  */
 
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_memory.h"
 #include "pipe/p_inlines.h"
 #include "pipe/p_shader_tokens.h"
index 007dc8f9debddc14afe0cab58f7b39567ce49e3b..e91263cb1fffe974169db8cba13645faae786a7e 100644 (file)
@@ -42,7 +42,7 @@
  * the pool.
  */
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 #include "pipe/p_inlines.h"
index b89756c47b0245f4b7857943ec3afcfa7355bdb3..3159eba2fd185b8928ac920d9ee2a8c1e46e7bab 100644 (file)
@@ -30,7 +30,7 @@
 #include "brw_state.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_tile.h"
 #include "util/u_rect.h"
 
index c99eb8e75af4760d5e0458e07ee4d5e9a45b4d11..6af0d5cf4b26341846efeee1aa4646892f192971 100644 (file)
@@ -37,7 +37,7 @@
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 #include "brw_context.h"
@@ -295,7 +295,7 @@ brw_texture_create_screen(struct pipe_screen *screen,
       tex->base.nblocksy[0] = pf_get_nblocksy(&tex->base.block, tex->base.height[0]);
    
       if (brw_miptree_layout(tex))
-        tex->buffer = ws->_buffer_create(ws, 64,
+        tex->buffer = ws->buffer_create(ws, 64,
                                           PIPE_BUFFER_USAGE_PIXEL,
                                           tex->stride *
                                           tex->total_nblocksy);
index 5535ebb6a99587299b71633849d688896dd130fe..25e0b05be121800efd42b2231530a783b8af2002 100644 (file)
@@ -2,7 +2,7 @@
 #define NOUVEAU_WINSYS_H
 
 #include <stdint.h>
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_defines.h"
 
 #include "nouveau/nouveau_bo.h"
index 9f75253363f64425b1d60dc7c9e5996c36010196..a14273e28834e6101b36f66076186b0a1f8f4bb1 100644 (file)
@@ -1,6 +1,6 @@
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 #include "nv04_context.h"
 #include "nv04_screen.h"
index 32800f97411e8c4af11cb4520e256087977de717..094c38256b417dd676b85ab5ba24cdeb33a57280 100644 (file)
@@ -58,7 +58,7 @@ nv04_miptree_create(struct pipe_screen *screen, const struct pipe_texture *pt)
 
        nv04_miptree_layout(mt);
 
-       mt->buffer = ws->_buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
+       mt->buffer = ws->buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
                                           mt->total_size);
        if (!mt->buffer) {
                FREE(mt);
index 19979fff7958d9384608abe1b0a84dc4046cf81b..18a8872ae380d7f9b24eddc8f90071d808967456 100644 (file)
@@ -1,7 +1,7 @@
 
 #include "pipe/p_debug.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_compiler.h"
 
 #include "draw/draw_vbuf.h"
index 2fa7d35294946210cb68dbace9f1fb98b84239b7..65eacde6b2ee4708e552fbf3320628be2e388f5c 100644 (file)
@@ -117,7 +117,7 @@ nv04_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
        struct pipe_winsys *ws = screen->winsys;
        void *map;
 
-       map = ws->_buffer_map(ws, surface->buffer, flags);
+       map = ws->buffer_map(ws, surface->buffer, flags);
        if (!map)
                return NULL;
 
@@ -129,7 +129,7 @@ nv04_surface_unmap(struct pipe_screen *screen, struct pipe_surface *surface)
 {
        struct pipe_winsys *ws = screen->winsys;
 
-       ws->_buffer_unmap(ws, surface->buffer);
+       ws->buffer_unmap(ws, surface->buffer);
 }
 
 static void
index 9d9943ed4e414841826a5f2a58c2fbee5d730587..0d0983f9d4c0236d7ab3500d75dcd4734c0e64ab 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "nv04_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 #include "util/u_tile.h"
 
index 117a73a1e47061d512549f29d0c289cdd5b0064d..91f919d48ec96f2b782942bbef5c27c0ab309ad5 100644 (file)
@@ -23,7 +23,7 @@ boolean nv04_draw_elements( struct pipe_context *pipe,
        for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
                if (nv04->vertex_buffer[i].buffer) {
                        void *buf
-                               = pipe->winsys->_buffer_map(pipe->winsys,
+                               = pipe->winsys->buffer_map(pipe->winsys,
                                                nv04->vertex_buffer[i].buffer,
                                                PIPE_BUFFER_USAGE_CPU_READ);
                        draw_set_mapped_vertex_buffer(draw, i, buf);
@@ -32,7 +32,7 @@ boolean nv04_draw_elements( struct pipe_context *pipe,
        /* Map index buffer, if present */
        if (indexBuffer) {
                void *mapped_indexes
-                       = pipe->winsys->_buffer_map(pipe->winsys, indexBuffer,
+                       = pipe->winsys->buffer_map(pipe->winsys, indexBuffer,
                                        PIPE_BUFFER_USAGE_CPU_READ);
                draw_set_mapped_element_buffer(draw, indexSize, mapped_indexes);
        }
@@ -49,12 +49,12 @@ boolean nv04_draw_elements( struct pipe_context *pipe,
         */
        for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
                if (nv04->vertex_buffer[i].buffer) {
-                       pipe->winsys->_buffer_unmap(pipe->winsys, nv04->vertex_buffer[i].buffer);
+                       pipe->winsys->buffer_unmap(pipe->winsys, nv04->vertex_buffer[i].buffer);
                        draw_set_mapped_vertex_buffer(draw, i, NULL);
                }
        }
        if (indexBuffer) {
-               pipe->winsys->_buffer_unmap(pipe->winsys, indexBuffer);
+               pipe->winsys->buffer_unmap(pipe->winsys, indexBuffer);
                draw_set_mapped_element_buffer(draw, 0, NULL);
        }
 
index 4eb4ed9185ea6b6b53536b910cee8561090b3345..ef2c0c5d9fd2974ce98c64d470a63c683ff8f64c 100644 (file)
@@ -1,6 +1,6 @@
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 #include "nv10_context.h"
 #include "nv10_screen.h"
index 384f89c39184515e645a98610aef09d4ce6b1915..f8c021261bc9995a0b2aac47bf15c407997a3007 100644 (file)
@@ -65,7 +65,7 @@ nv10_miptree_create(struct pipe_screen *screen, const struct pipe_texture *pt)
 
        nv10_miptree_layout(mt);
 
-       mt->buffer = ws->_buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
+       mt->buffer = ws->buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
                                           mt->total_size);
        if (!mt->buffer) {
                FREE(mt);
index bdffaacf78cd96104b08f78c1bcd8fc9f181b37c..7435d873154d311b7b18d6add6c010255cfe7582 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "pipe/p_debug.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 #include "nv10_context.h"
 #include "nv10_state.h"
@@ -111,11 +111,11 @@ nv10_vbuf_render_allocate_vertices( struct vbuf_render *render,
        size_t size = (size_t)vertex_size * (size_t)nr_vertices;
 
        assert(!nv10_render->buffer);
-       nv10_render->buffer = winsys->_buffer_create(winsys, 64, PIPE_BUFFER_USAGE_VERTEX, size);
+       nv10_render->buffer = winsys->buffer_create(winsys, 64, PIPE_BUFFER_USAGE_VERTEX, size);
 
        nv10->dirty |= NV10_NEW_VTXARRAYS;
 
-       return winsys->_buffer_map(winsys, 
+       return winsys->buffer_map(winsys, 
                        nv10_render->buffer, 
                        PIPE_BUFFER_USAGE_CPU_WRITE);
 }
@@ -187,7 +187,7 @@ nv10_vbuf_render_release_vertices( struct vbuf_render *render,
        struct pipe_screen *pscreen = &nv10->screen->pipe;
 
        assert(nv10_render->buffer);
-       winsys->_buffer_unmap(winsys, nv10_render->buffer);
+       winsys->buffer_unmap(winsys, nv10_render->buffer);
        pipe_buffer_reference(pscreen, &nv10_render->buffer, NULL);
 }
 
index 333e0b3252fd6156b86400328b046a18d2c7c646..4d9fbd4b5f613d8b58b1812df313d24bbbd16841 100644 (file)
@@ -122,7 +122,7 @@ nv10_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
        struct pipe_winsys *ws = screen->winsys;
        void *map;
 
-       map = ws->_buffer_map(ws, surface->buffer, flags);
+       map = ws->buffer_map(ws, surface->buffer, flags);
        if (!map)
                return NULL;
 
@@ -134,7 +134,7 @@ nv10_surface_unmap(struct pipe_screen *screen, struct pipe_surface *surface)
 {
        struct pipe_winsys *ws = screen->winsys;
 
-       ws->_buffer_unmap(ws, surface->buffer);
+       ws->buffer_unmap(ws, surface->buffer);
 }
 
 static void
index f84d45a730941675eaa050fab4c9263885178775..119af66dfd054e357184c34602964e1c7f7b9e56 100644 (file)
@@ -468,12 +468,12 @@ nv10_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
        if (buf) {
                void *mapped;
                if (buf->buffer && buf->buffer->size &&
-                    (mapped = ws->_buffer_map(ws, buf->buffer, PIPE_BUFFER_USAGE_CPU_READ)))
+                    (mapped = ws->buffer_map(ws, buf->buffer, PIPE_BUFFER_USAGE_CPU_READ)))
                {
                        memcpy(nv10->constbuf[shader], mapped, buf->buffer->size);
                        nv10->constbuf_nr[shader] =
                                buf->buffer->size / (4 * sizeof(float));
-                       ws->_buffer_unmap(ws, buf->buffer);
+                       ws->buffer_unmap(ws, buf->buffer);
                }
        }
 }
index be44c7bed509ed80d298ac3277dfbfe1073655f1..78fd7b42dacd1c53598128aea65737e936ab439c 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "nv10_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 #include "util/u_tile.h"
 
index a6b80e4050763eff1a28c30d72b5bf497d503f02..d0e788ac0368262e48ad907b76bf8ac38ea8e13a 100644 (file)
@@ -25,7 +25,7 @@ boolean nv10_draw_elements( struct pipe_context *pipe,
        for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
                if (nv10->vtxbuf[i].buffer) {
                        void *buf
-                               = pipe->winsys->_buffer_map(pipe->winsys,
+                               = pipe->winsys->buffer_map(pipe->winsys,
                                                nv10->vtxbuf[i].buffer,
                                                PIPE_BUFFER_USAGE_CPU_READ);
                        draw_set_mapped_vertex_buffer(draw, i, buf);
@@ -34,7 +34,7 @@ boolean nv10_draw_elements( struct pipe_context *pipe,
        /* Map index buffer, if present */
        if (indexBuffer) {
                void *mapped_indexes
-                       = pipe->winsys->_buffer_map(pipe->winsys, indexBuffer,
+                       = pipe->winsys->buffer_map(pipe->winsys, indexBuffer,
                                        PIPE_BUFFER_USAGE_CPU_READ);
                draw_set_mapped_element_buffer(draw, indexSize, mapped_indexes);
        }
@@ -55,12 +55,12 @@ boolean nv10_draw_elements( struct pipe_context *pipe,
         */
        for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
                if (nv10->vtxbuf[i].buffer) {
-                       pipe->winsys->_buffer_unmap(pipe->winsys, nv10->vtxbuf[i].buffer);
+                       pipe->winsys->buffer_unmap(pipe->winsys, nv10->vtxbuf[i].buffer);
                        draw_set_mapped_vertex_buffer(draw, i, NULL);
                }
        }
        if (indexBuffer) {
-               pipe->winsys->_buffer_unmap(pipe->winsys, indexBuffer);
+               pipe->winsys->buffer_unmap(pipe->winsys, indexBuffer);
                draw_set_mapped_element_buffer(draw, 0, NULL);
        }
 
index c8fb690ee9cabea41b17a6a6569fbd3c461783f0..d3aca8d937a80b83c072ad3de7beb84972a552e1 100644 (file)
@@ -1,6 +1,6 @@
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 #include "nv20_context.h"
 #include "nv20_screen.h"
index 759f29c95158a6db314e351f167c53b600b0d8e5..d2038c391d69e35cb8f6b6294244932f6b456db7 100644 (file)
@@ -65,7 +65,7 @@ nv20_miptree_create(struct pipe_screen *screen, const struct pipe_texture *pt)
 
        nv20_miptree_layout(mt);
 
-       mt->buffer = ws->_buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
+       mt->buffer = ws->buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
                                           mt->total_size);
        if (!mt->buffer) {
                FREE(mt);
index c4841026b3d2759ce0a2bde33d28bc098cdcfec3..4dd7052814ef6a144f4f7822d03c7e265adf3b28 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "pipe/p_debug.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 #include "nv20_context.h"
 #include "nv20_state.h"
@@ -113,9 +113,9 @@ static void *
 nv20__allocate_pbuffer(struct nv20_vbuf_render *nv20_render, size_t size)
 {
        struct pipe_winsys *winsys = nv20_render->nv20->pipe.winsys;
-       nv20_render->pbuffer = winsys->_buffer_create(winsys, 64,
+       nv20_render->pbuffer = winsys->buffer_create(winsys, 64,
                                        PIPE_BUFFER_USAGE_VERTEX, size);
-       return winsys->_buffer_map(winsys,
+       return winsys->buffer_map(winsys,
                        nv20_render->pbuffer,
                        PIPE_BUFFER_USAGE_CPU_WRITE);
 }
@@ -334,7 +334,7 @@ nv20_vbuf_render_release_vertices( struct vbuf_render *render,
        struct pipe_screen *pscreen = &nv20->screen->pipe;
 
        if (nv20_render->pbuffer) {
-               winsys->_buffer_unmap(winsys, nv20_render->pbuffer);
+               winsys->buffer_unmap(winsys, nv20_render->pbuffer);
                pipe_buffer_reference(pscreen, &nv20_render->pbuffer, NULL);
        } else if (nv20_render->mbuffer) {
                FREE(nv20_render->mbuffer);
index e9adf05a7d22a070595f1871f57166429a65a6ef..2ca6e6b14980e70702170fe2ca18e6b21c154a55 100644 (file)
@@ -122,7 +122,7 @@ nv20_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
        struct pipe_winsys *ws = screen->winsys;
        void *map;
 
-       map = ws->_buffer_map(ws, surface->buffer, flags);
+       map = ws->buffer_map(ws, surface->buffer, flags);
        if (!map)
                return NULL;
 
@@ -134,7 +134,7 @@ nv20_surface_unmap(struct pipe_screen *screen, struct pipe_surface *surface)
 {
        struct pipe_winsys *ws = screen->winsys;
 
-       ws->_buffer_unmap(ws, surface->buffer);
+       ws->buffer_unmap(ws, surface->buffer);
 }
 
 static void
index 65060006dac48d602a0680744f6dcea47ae1789e..ecec4f49a0c56c85a5ee50ce3aede23f5b4121e7 100644 (file)
@@ -461,12 +461,12 @@ nv20_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
        if (buf) {
                void *mapped;
                if (buf->buffer && buf->buffer->size &&
-                    (mapped = ws->_buffer_map(ws, buf->buffer, PIPE_BUFFER_USAGE_CPU_READ)))
+                    (mapped = ws->buffer_map(ws, buf->buffer, PIPE_BUFFER_USAGE_CPU_READ)))
                {
                        memcpy(nv20->constbuf[shader], mapped, buf->buffer->size);
                        nv20->constbuf_nr[shader] =
                                buf->buffer->size / (4 * sizeof(float));
-                       ws->_buffer_unmap(ws, buf->buffer);
+                       ws->buffer_unmap(ws, buf->buffer);
                }
        }
 }
index 7bc68d0ca26fd6e0c5a696467391bfcd136fe25e..9b4c028eae6c9f63a4b4816cc2215e17839ce230 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "nv20_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 #include "util/u_tile.h"
 
index d6b731790cc62331a31c07fbd6c3b96aad2a58bd..4edc4efebd841f95a5242c0f3078a3eed42aadd4 100644 (file)
@@ -25,7 +25,7 @@ boolean nv20_draw_elements( struct pipe_context *pipe,
        for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
                if (nv20->vtxbuf[i].buffer) {
                        void *buf
-                               = pipe->winsys->_buffer_map(pipe->winsys,
+                               = pipe->winsys->buffer_map(pipe->winsys,
                                                nv20->vtxbuf[i].buffer,
                                                PIPE_BUFFER_USAGE_CPU_READ);
                        draw_set_mapped_vertex_buffer(draw, i, buf);
@@ -34,7 +34,7 @@ boolean nv20_draw_elements( struct pipe_context *pipe,
        /* Map index buffer, if present */
        if (indexBuffer) {
                void *mapped_indexes
-                       = pipe->winsys->_buffer_map(pipe->winsys, indexBuffer,
+                       = pipe->winsys->buffer_map(pipe->winsys, indexBuffer,
                                        PIPE_BUFFER_USAGE_CPU_READ);
                draw_set_mapped_element_buffer(draw, indexSize, mapped_indexes);
        }
@@ -55,12 +55,12 @@ boolean nv20_draw_elements( struct pipe_context *pipe,
         */
        for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
                if (nv20->vtxbuf[i].buffer) {
-                       pipe->winsys->_buffer_unmap(pipe->winsys, nv20->vtxbuf[i].buffer);
+                       pipe->winsys->buffer_unmap(pipe->winsys, nv20->vtxbuf[i].buffer);
                        draw_set_mapped_vertex_buffer(draw, i, NULL);
                }
        }
        if (indexBuffer) {
-               pipe->winsys->_buffer_unmap(pipe->winsys, indexBuffer);
+               pipe->winsys->buffer_unmap(pipe->winsys, indexBuffer);
                draw_set_mapped_element_buffer(draw, 0, NULL);
        }
 
index c4f3d0f14fb8f0a38c0f3f93b1ece836e1703c64..a885fcd7a567702595c890fda5e68d1652902c8b 100644 (file)
@@ -749,7 +749,7 @@ nv20_vertprog_validate(struct nv20_context *nv20)
                float *map = NULL;
 
                if (constbuf) {
-                       map = ws->_buffer_map(ws, constbuf,
+                       map = ws->buffer_map(ws, constbuf,
                                             PIPE_BUFFER_USAGE_CPU_READ);
                }
 
@@ -771,7 +771,7 @@ nv20_vertprog_validate(struct nv20_context *nv20)
                }
 
                if (constbuf) {
-                       ws->_buffer_unmap(ws, constbuf);
+                       ws->buffer_unmap(ws, constbuf);
                }
        }
 
index 2bff28aca9c273f40d9b25dddae9c3a12bb740f2..61654f8756a8fc2c084b746d156ae11b1d324e6a 100644 (file)
@@ -1,6 +1,6 @@
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 #include "nv30_context.h"
 #include "nv30_screen.h"
index f22a06c1a3c31fc2c169686111696ba77e93d551..320ba3f4bf42c0ba20b1f5538fbfa6cdd6aadcf9 100644 (file)
@@ -803,7 +803,7 @@ nv30_fragprog_upload(struct nv30_context *nv30,
        uint32_t *map;
        int i;
 
-       map = ws->_buffer_map(ws, fp->buffer, PIPE_BUFFER_USAGE_CPU_WRITE);
+       map = ws->buffer_map(ws, fp->buffer, PIPE_BUFFER_USAGE_CPU_WRITE);
 
 #if 0
        for (i = 0; i < fp->insn_len; i++) {
@@ -825,7 +825,7 @@ nv30_fragprog_upload(struct nv30_context *nv30,
                }
        }
 
-       ws->_buffer_unmap(ws, fp->buffer);
+       ws->buffer_unmap(ws, fp->buffer);
 }
 
 static boolean
@@ -849,7 +849,7 @@ nv30_fragprog_validate(struct nv30_context *nv30)
                return FALSE;
        }
 
-       fp->buffer = ws->_buffer_create(ws, 0x100, 0, fp->insn_len * 4);
+       fp->buffer = ws->buffer_create(ws, 0x100, 0, fp->insn_len * 4);
        nv30_fragprog_upload(nv30, fp);
 
        so = so_new(8, 1);
@@ -869,7 +869,7 @@ update_constants:
        if (fp->nr_consts) {
                float *map;
                
-               map = ws->_buffer_map(ws, constbuf, PIPE_BUFFER_USAGE_CPU_READ);
+               map = ws->buffer_map(ws, constbuf, PIPE_BUFFER_USAGE_CPU_READ);
                for (i = 0; i < fp->nr_consts; i++) {
                        struct nv30_fragment_program_data *fpd = &fp->consts[i];
                        uint32_t *p = &fp->insn[fpd->offset];
@@ -880,7 +880,7 @@ update_constants:
                        memcpy(p, cb, 4 * sizeof(float));
                        new_consts = TRUE;
                }
-               ws->_buffer_unmap(ws, constbuf);
+               ws->buffer_unmap(ws, constbuf);
 
                if (new_consts)
                        nv30_fragprog_upload(nv30, fp);
index bf6c4a1c74950940d4a8c45b47d4146aa69b97bd..79baac714ce1786b3d19ba2c3dab984f1010925f 100644 (file)
@@ -93,7 +93,7 @@ nv30_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
 
        nv30_miptree_layout(mt);
 
-       mt->buffer = ws->_buffer_create(ws, 256,
+       mt->buffer = ws->buffer_create(ws, 256,
                                       PIPE_BUFFER_USAGE_PIXEL |
                                       NOUVEAU_BUFFER_USAGE_TEXTURE,
                                       mt->total_size);
index 56b20ae2fd37e416e9cde906b53970f9a3e1225b..1fac6d3df831b77379a3a2ce9eec764219ebea53 100644 (file)
@@ -161,7 +161,7 @@ nv30_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
 
        assert(surface_to_map);
 
-       map = ws->_buffer_map(ws, surface_to_map->buffer, flags);
+       map = ws->buffer_map(ws, surface_to_map->buffer, flags);
        if (!map)
                return NULL;
 
@@ -189,7 +189,7 @@ nv30_surface_unmap(struct pipe_screen *screen, struct pipe_surface *surface)
 
        assert(surface_to_unmap);
 
-       ws->_buffer_unmap(ws, surface_to_unmap->buffer);
+       ws->buffer_unmap(ws, surface_to_unmap->buffer);
 
        if (surface_to_unmap != surface) {
                struct nv30_screen *nvscreen = nv30_screen(screen);
index d3376a73bf55a55508a5161291d198d3a4b5371f..806131dcc95e2477bfd9a8c73689195c12586841 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "nv30_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 
 #include "util/u_tile.h"
index cf0468f87904a1d3360a58f6f5ac76e7b978081b..2d6d48ac161f3034601e7abb20210e9c33fdf876 100644 (file)
@@ -116,7 +116,7 @@ nv30_vbo_static_attrib(struct nv30_context *nv30, struct nouveau_stateobj *so,
        if (nv30_vbo_format_to_hw(ve->src_format, &type, &ncomp))
                return FALSE;
 
-       map  = ws->_buffer_map(ws, vb->buffer, PIPE_BUFFER_USAGE_CPU_READ);
+       map  = ws->buffer_map(ws, vb->buffer, PIPE_BUFFER_USAGE_CPU_READ);
        map += vb->buffer_offset + ve->src_offset;
 
        switch (type) {
@@ -148,17 +148,17 @@ nv30_vbo_static_attrib(struct nv30_context *nv30, struct nouveau_stateobj *so,
                        so_data  (so, fui(v[0]));
                        break;
                default:
-                       ws->_buffer_unmap(ws, vb->buffer);
+                       ws->buffer_unmap(ws, vb->buffer);
                        return FALSE;
                }
        }
                break;
        default:
-               ws->_buffer_unmap(ws, vb->buffer);
+               ws->buffer_unmap(ws, vb->buffer);
                return FALSE;
        }
 
-       ws->_buffer_unmap(ws, vb->buffer);
+       ws->buffer_unmap(ws, vb->buffer);
 
        return TRUE;
 }
@@ -371,7 +371,7 @@ nv30_draw_elements_inline(struct pipe_context *pipe,
        struct pipe_winsys *ws = pipe->winsys;
        void *map;
 
-       map = ws->_buffer_map(ws, ib, PIPE_BUFFER_USAGE_CPU_READ);
+       map = ws->buffer_map(ws, ib, PIPE_BUFFER_USAGE_CPU_READ);
        if (!ib) {
                NOUVEAU_ERR("failed mapping ib\n");
                return FALSE;
@@ -392,7 +392,7 @@ nv30_draw_elements_inline(struct pipe_context *pipe,
                break;
        }
 
-       ws->_buffer_unmap(ws, ib);
+       ws->buffer_unmap(ws, ib);
        return TRUE;
 }
 
index b67dde0808be4a26fd3814275769eefaa07e4d38..72824559e8befd5c9af6f5869281afd1d3780477 100644 (file)
@@ -749,7 +749,7 @@ nv30_vertprog_validate(struct nv30_context *nv30)
                float *map = NULL;
 
                if (constbuf) {
-                       map = ws->_buffer_map(ws, constbuf,
+                       map = ws->buffer_map(ws, constbuf,
                                             PIPE_BUFFER_USAGE_CPU_READ);
                }
 
@@ -771,7 +771,7 @@ nv30_vertprog_validate(struct nv30_context *nv30)
                }
 
                if (constbuf) {
-                       ws->_buffer_unmap(ws, constbuf);
+                       ws->buffer_unmap(ws, constbuf);
                }
        }
 
index cc63dd734bc5865e75fb5b924449c666fd4c8776..5d325f5067fb805b78fbbb73f2b7cd5e799eed25 100644 (file)
@@ -1,6 +1,6 @@
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 #include "nv40_context.h"
 #include "nv40_screen.h"
index 3d5332a80b5e3e336fc5d26b8348f30f805a0bc4..c83ff91d7e35c968756e3417478b821cf9050de1 100644 (file)
@@ -241,13 +241,13 @@ nv40_draw_elements_swtnl(struct pipe_context *pipe,
        nv40_state_emit(nv40);
 
        for (i = 0; i < nv40->vtxbuf_nr; i++) {
-               map = ws->_buffer_map(ws, nv40->vtxbuf[i].buffer,
+               map = ws->buffer_map(ws, nv40->vtxbuf[i].buffer,
                                       PIPE_BUFFER_USAGE_CPU_READ);
                draw_set_mapped_vertex_buffer(nv40->draw, i, map);
        }
 
        if (idxbuf) {
-               map = ws->_buffer_map(ws, idxbuf, PIPE_BUFFER_USAGE_CPU_READ);
+               map = ws->buffer_map(ws, idxbuf, PIPE_BUFFER_USAGE_CPU_READ);
                draw_set_mapped_element_buffer(nv40->draw, idxbuf_size, map);
        } else {
                draw_set_mapped_element_buffer(nv40->draw, 0, NULL);
@@ -256,7 +256,7 @@ nv40_draw_elements_swtnl(struct pipe_context *pipe,
        if (nv40->constbuf[PIPE_SHADER_VERTEX]) {
                const unsigned nr = nv40->constbuf_nr[PIPE_SHADER_VERTEX];
 
-               map = ws->_buffer_map(ws, nv40->constbuf[PIPE_SHADER_VERTEX],
+               map = ws->buffer_map(ws, nv40->constbuf[PIPE_SHADER_VERTEX],
                                     PIPE_BUFFER_USAGE_CPU_READ);
                draw_set_mapped_constant_buffer(nv40->draw, map, nr);
        }
@@ -264,13 +264,13 @@ nv40_draw_elements_swtnl(struct pipe_context *pipe,
        draw_arrays(nv40->draw, mode, start, count);
 
        for (i = 0; i < nv40->vtxbuf_nr; i++)
-               ws->_buffer_unmap(ws, nv40->vtxbuf[i].buffer);
+               ws->buffer_unmap(ws, nv40->vtxbuf[i].buffer);
 
        if (idxbuf)
-               ws->_buffer_unmap(ws, idxbuf);
+               ws->buffer_unmap(ws, idxbuf);
 
        if (nv40->constbuf[PIPE_SHADER_VERTEX])
-               ws->_buffer_unmap(ws, nv40->constbuf[PIPE_SHADER_VERTEX]);
+               ws->buffer_unmap(ws, nv40->constbuf[PIPE_SHADER_VERTEX]);
 
        draw_flush(nv40->draw);
        pipe->flush(pipe, 0, NULL);
index 5a127d9c7b6015e1c8822676565b881978491ab6..91dcbebda0d03723efbb6a4167b91e9a75452cf1 100644 (file)
@@ -886,7 +886,7 @@ nv40_fragprog_upload(struct nv40_context *nv40,
        uint32_t *map;
        int i;
 
-       map = ws->_buffer_map(ws, fp->buffer, PIPE_BUFFER_USAGE_CPU_WRITE);
+       map = ws->buffer_map(ws, fp->buffer, PIPE_BUFFER_USAGE_CPU_WRITE);
 
 #if 0
        for (i = 0; i < fp->insn_len; i++) {
@@ -908,7 +908,7 @@ nv40_fragprog_upload(struct nv40_context *nv40,
                }
        }
 
-       ws->_buffer_unmap(ws, fp->buffer);
+       ws->buffer_unmap(ws, fp->buffer);
 }
 
 static boolean
@@ -932,7 +932,7 @@ nv40_fragprog_validate(struct nv40_context *nv40)
                return FALSE;
        }
 
-       fp->buffer = ws->_buffer_create(ws, 0x100, 0, fp->insn_len * 4);
+       fp->buffer = ws->buffer_create(ws, 0x100, 0, fp->insn_len * 4);
        nv40_fragprog_upload(nv40, fp);
 
        so = so_new(4, 1);
@@ -948,7 +948,7 @@ update_constants:
        if (fp->nr_consts) {
                float *map;
                
-               map = ws->_buffer_map(ws, constbuf, PIPE_BUFFER_USAGE_CPU_READ);
+               map = ws->buffer_map(ws, constbuf, PIPE_BUFFER_USAGE_CPU_READ);
                for (i = 0; i < fp->nr_consts; i++) {
                        struct nv40_fragment_program_data *fpd = &fp->consts[i];
                        uint32_t *p = &fp->insn[fpd->offset];
@@ -959,7 +959,7 @@ update_constants:
                        memcpy(p, cb, 4 * sizeof(float));
                        new_consts = TRUE;
                }
-               ws->_buffer_unmap(ws, constbuf);
+               ws->buffer_unmap(ws, constbuf);
 
                if (new_consts)
                        nv40_fragprog_upload(nv40, fp);
index 6ed0d39edff6f6c7c3847452bdf3c69fbdef1532..ba912ddcbbf9f4728bf0398d5c5e2bee141e3ee9 100644 (file)
@@ -97,7 +97,7 @@ nv40_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
 
        nv40_miptree_layout(mt);
 
-       mt->buffer = ws->_buffer_create(ws, 256, buf_usage, mt->total_size);
+       mt->buffer = ws->buffer_create(ws, 256, buf_usage, mt->total_size);
        if (!mt->buffer) {
                FREE(mt);
                return NULL;
index 20662fd3ffbdd5def587e497369f38413ba856f3..ab128fecda7bedda6ff919508b6c8055febf2a97 100644 (file)
@@ -170,7 +170,7 @@ nv40_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
 
        assert(surface_to_map);
 
-       map = ws->_buffer_map(ws, surface_to_map->buffer, flags);
+       map = ws->buffer_map(ws, surface_to_map->buffer, flags);
        if (!map)
                return NULL;
 
@@ -198,7 +198,7 @@ nv40_surface_unmap(struct pipe_screen *screen, struct pipe_surface *surface)
 
        assert(surface_to_unmap);
 
-       ws->_buffer_unmap(ws, surface_to_unmap->buffer);
+       ws->buffer_unmap(ws, surface_to_unmap->buffer);
 
        if (surface_to_unmap != surface) {
                struct nv40_screen *nvscreen = nv40_screen(screen);
index 576af7c59eec7f78f34e5dd65f56a4c12ed1a3e5..aa51d0405195dd7d5cbed7c66bd2dff9037394d9 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "nv40_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 
 #include "util/u_tile.h"
index f20183ddd4dfd3f3c4154a6b29b9d246c3ec6f04..8f1834628f7a010dfc234283b1355a97ce5efef2 100644 (file)
@@ -116,7 +116,7 @@ nv40_vbo_static_attrib(struct nv40_context *nv40, struct nouveau_stateobj *so,
        if (nv40_vbo_format_to_hw(ve->src_format, &type, &ncomp))
                return FALSE;
 
-       map  = ws->_buffer_map(ws, vb->buffer, PIPE_BUFFER_USAGE_CPU_READ);
+       map  = ws->buffer_map(ws, vb->buffer, PIPE_BUFFER_USAGE_CPU_READ);
        map += vb->buffer_offset + ve->src_offset;
 
        switch (type) {
@@ -148,17 +148,17 @@ nv40_vbo_static_attrib(struct nv40_context *nv40, struct nouveau_stateobj *so,
                        so_data  (so, fui(v[0]));
                        break;
                default:
-                       ws->_buffer_unmap(ws, vb->buffer);
+                       ws->buffer_unmap(ws, vb->buffer);
                        return FALSE;
                }
        }
                break;
        default:
-               ws->_buffer_unmap(ws, vb->buffer);
+               ws->buffer_unmap(ws, vb->buffer);
                return FALSE;
        }
 
-       ws->_buffer_unmap(ws, vb->buffer);
+       ws->buffer_unmap(ws, vb->buffer);
 
        return TRUE;
 }
@@ -370,7 +370,7 @@ nv40_draw_elements_inline(struct pipe_context *pipe,
        struct pipe_winsys *ws = pipe->winsys;
        void *map;
 
-       map = ws->_buffer_map(ws, ib, PIPE_BUFFER_USAGE_CPU_READ);
+       map = ws->buffer_map(ws, ib, PIPE_BUFFER_USAGE_CPU_READ);
        if (!ib) {
                NOUVEAU_ERR("failed mapping ib\n");
                return FALSE;
@@ -391,7 +391,7 @@ nv40_draw_elements_inline(struct pipe_context *pipe,
                break;
        }
 
-       ws->_buffer_unmap(ws, ib);
+       ws->buffer_unmap(ws, ib);
        return TRUE;
 }
 
index 7a82bb0f5e005ceb806484ff8e6759d192048ae4..1392fe956f7f6453ca726b5406ee27daa8e4d30d 100644 (file)
@@ -980,7 +980,7 @@ check_gpu_resources:
                float *map = NULL;
 
                if (constbuf) {
-                       map = ws->_buffer_map(ws, constbuf,
+                       map = ws->buffer_map(ws, constbuf,
                                             PIPE_BUFFER_USAGE_CPU_READ);
                }
 
@@ -1002,7 +1002,7 @@ check_gpu_resources:
                }
 
                if (constbuf)
-                       ws->_buffer_unmap(ws, constbuf);
+                       ws->buffer_unmap(ws, constbuf);
        }
 
        /* Upload vtxprog */
index b02c53f2095dd6a374d5bac415a4f76ef9c956d3..99776239d2bc7814eaf3f5e5a8ae6194e930d26c 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 #include "nv50_context.h"
 #include "nv50_screen.h"
index 3965dad5adebe3436bdc8ef3704d283dca4b3f05..7770fcc3f2aaa904f6feb129544317ecd71650a9 100644 (file)
@@ -88,14 +88,14 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *tmp)
                        size  = align(size, 64);
                        size *= align(pt->height[l], 8) * pt->block.size;
 
-                       lvl->image[i] = ws->_buffer_create(ws, 256, 0, size);
+                       lvl->image[i] = ws->buffer_create(ws, 256, 0, size);
                        lvl->image_offset[i] = mt->total_size;
 
                        mt->total_size += size;
                }
        }
 
-       mt->buffer = ws->_buffer_create(ws, 256, usage, mt->total_size);
+       mt->buffer = ws->buffer_create(ws, 256, usage, mt->total_size);
        if (!mt->buffer) {
                FREE(mt);
                return NULL;
index 73867cf67578b9f5b20fa1f367052137230fa4f8..7686f746eb243f6786a626fbd259c56398b88c77 100644 (file)
@@ -1581,11 +1581,11 @@ nv50_program_validate_data(struct nv50_context *nv50, struct nv50_program *p)
        }
 
        if (p->param_nr) {
-               float *map = ws->_buffer_map(ws, nv50->constbuf[p->type],
+               float *map = ws->buffer_map(ws, nv50->constbuf[p->type],
                                            PIPE_BUFFER_USAGE_CPU_READ);
                nv50_program_upload_data(nv50, map, p->data->start,
                                         p->param_nr);
-               ws->_buffer_unmap(ws, nv50->constbuf[p->type]);
+               ws->buffer_unmap(ws, nv50->constbuf[p->type]);
        }
 
        if (p->immd_nr) {
@@ -1606,7 +1606,7 @@ nv50_program_validate_code(struct nv50_context *nv50, struct nv50_program *p)
        boolean upload = FALSE;
 
        if (!p->buffer) {
-               p->buffer = ws->_buffer_create(ws, 0x100, 0, p->exec_size * 4);
+               p->buffer = ws->buffer_create(ws, 0x100, 0, p->exec_size * 4);
                upload = TRUE;
        }
 
index b0fb346ba1a21de878d0ae36e0492143bed41a14..1b3a41340a95b1c3407b015c7739d75d372fff36 100644 (file)
@@ -47,7 +47,7 @@ nv50_query_create(struct pipe_context *pipe, unsigned type)
        assert (q->type == PIPE_QUERY_OCCLUSION_COUNTER);
        q->type = type;
 
-       q->buffer = ws->_buffer_create(ws, 256, 0, 16);
+       q->buffer = ws->buffer_create(ws, 256, 0, 16);
        if (!q->buffer) {
                FREE(q);
                return NULL;
@@ -107,11 +107,11 @@ nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq,
         */
 
        if (!q->ready) {
-               uint32_t *map = ws->_buffer_map(ws, q->buffer,
+               uint32_t *map = ws->buffer_map(ws, q->buffer,
                                               PIPE_BUFFER_USAGE_CPU_READ);
                q->result = map[1];
                q->ready = TRUE;
-               ws->_buffer_unmap(ws, q->buffer);
+               ws->buffer_unmap(ws, q->buffer);
        }
 
        *result = q->result;
index 3abacfc8d544b4de6fc01c106ef84e2a7aeed5b5..ef46233f83985301ef359a5357e0d8e0d0161f27 100644 (file)
@@ -242,7 +242,7 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
        so_data  (so, 8);
 
        /* Shared constant buffer */
-       screen->constbuf = ws->_buffer_create(ws, 0, 0, 128 * 4 * 4);
+       screen->constbuf = ws->buffer_create(ws, 0, 0, 128 * 4 * 4);
        if (nvws->res_init(&screen->vp_data_heap, 0, 128)) {
                NOUVEAU_ERR("Error initialising constant buffer\n");
                nv50_screen_destroy(&screen->pipe);
@@ -261,7 +261,7 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
         * blocks.  At some point we *may* want to go the NVIDIA way of doing
         * things?
         */
-       screen->tic = ws->_buffer_create(ws, 0, 0, 32 * 8 * 4);
+       screen->tic = ws->buffer_create(ws, 0, 0, 32 * 8 * 4);
        so_method(so, screen->tesla, 0x1280, 3);
        so_reloc (so, screen->tic, 0, NOUVEAU_BO_VRAM |
                  NOUVEAU_BO_RD | NOUVEAU_BO_HIGH, 0, 0);
@@ -275,7 +275,7 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
                  NOUVEAU_BO_RD | NOUVEAU_BO_LOW, 0, 0);
        so_data  (so, 0x00000800);
 
-       screen->tsc = ws->_buffer_create(ws, 0, 0, 32 * 8 * 4);
+       screen->tsc = ws->buffer_create(ws, 0, 0, 32 * 8 * 4);
        so_method(so, screen->tesla, 0x1280, 3);
        so_reloc (so, screen->tsc, 0, NOUVEAU_BO_VRAM |
                  NOUVEAU_BO_RD | NOUVEAU_BO_HIGH, 0, 0);
index 743eb6e257834207fc481b799be66caf306d0df6..ed6602ba36454a0ffec6fb8e9c1736d77a0de393 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "nv50_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 
 #include "util/u_tile.h"
@@ -65,7 +65,7 @@ nv50_surface_map(struct pipe_screen *screen, struct pipe_surface *ps,
 {
        struct pipe_winsys *ws = screen->winsys;
 
-       return ws->_buffer_map(ws, ps->buffer, flags);
+       return ws->buffer_map(ws, ps->buffer, flags);
 }
 
 static void
@@ -73,7 +73,7 @@ nv50_surface_unmap(struct pipe_screen *pscreen, struct pipe_surface *ps)
 {
        struct pipe_winsys *ws = pscreen->winsys;
 
-       ws->_buffer_unmap(ws, ps->buffer);
+       ws->buffer_unmap(ws, ps->buffer);
 }
 
 void
index 86471c00e03da2616d3f54498563ff48cae9aad1..c482a4c241ee0dabfec09ccca66162e3ddbad913 100644 (file)
@@ -153,7 +153,7 @@ nv50_draw_elements(struct pipe_context *pipe,
 {
        struct nv50_context *nv50 = nv50_context(pipe);
        struct pipe_winsys *ws = pipe->winsys;
-       void *map = ws->_buffer_map(ws, indexBuffer, PIPE_BUFFER_USAGE_CPU_READ);
+       void *map = ws->buffer_map(ws, indexBuffer, PIPE_BUFFER_USAGE_CPU_READ);
 
        nv50_state_validate(nv50);
 
index 8d58b1ed163aa7f7424c31138c67d6fffd839148..ecc9d0031928a6371e0add8a7453ce6b0d864f9c 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "pipe/p_defines.h"
 #include "pipe/p_context.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 
 #include "sp_context.h"
@@ -50,7 +50,7 @@ softpipe_map_constant_buffers(struct softpipe_context *sp)
    uint i;
    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,
+         sp->mapped_constants[i] = ws->buffer_map(ws, sp->constants[i].buffer,
                                                   PIPE_BUFFER_USAGE_CPU_READ);
    }
 
@@ -74,7 +74,7 @@ softpipe_unmap_constant_buffers(struct softpipe_context *sp)
 
    for (i = 0; i < 2; i++) {
       if (sp->constants[i].buffer && sp->constants[i].buffer->size)
-         ws->_buffer_unmap(ws, sp->constants[i].buffer);
+         ws->buffer_unmap(ws, sp->constants[i].buffer);
       sp->mapped_constants[i] = NULL;
    }
 }
index 11b08b3a82d389c4f39b77e42747331803ae8be2..4bd95a61e6a7d0965cd323ed5f75b50f4cd9bee6 100644 (file)
@@ -27,7 +27,7 @@
 
 
 #include "util/u_memory.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_screen.h"
 
index 43b134354f32a10b2649952ed2559152e852777c..4d01a9dbe15fa7ff66a4cb88c74ac9c8d06e1708 100644 (file)
@@ -32,7 +32,7 @@
 #include "pipe/p_defines.h"
 #include "util/u_memory.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_shader_tokens.h"
 #include "draw/draw_context.h"
 #include "tgsi/tgsi_dump.h"
index 078925ca45afb1e0239780ffd885dbbce2ddd3f9..5952378152d284ab331dd601371189a018af5fb1 100644 (file)
@@ -33,7 +33,7 @@
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 
@@ -87,9 +87,9 @@ softpipe_texture_layout(struct pipe_screen *screen,
       depth = minify(depth);
    }
 
-   spt->buffer = ws->_buffer_create(ws, 32,
-                                    PIPE_BUFFER_USAGE_PIXEL,
-                                    buffer_size);
+   spt->buffer = ws->buffer_create(ws, 32,
+                                   PIPE_BUFFER_USAGE_PIXEL,
+                                   buffer_size);
 
    return spt->buffer != NULL;
 }
@@ -105,12 +105,12 @@ softpipe_displaytarget_layout(struct pipe_screen *screen,
    spt->base.nblocksx[0] = pf_get_nblocksx(&spt->base.block, spt->base.width[0]);  
    spt->base.nblocksy[0] = pf_get_nblocksy(&spt->base.block, spt->base.height[0]);  
 
-   spt->buffer = ws->_surface_buffer_create( ws, 
-                                             spt->base.width[0], 
-                                             spt->base.height[0],
-                                             spt->base.format,
-                                             usage,
-                                             &spt->stride[0]);
+   spt->buffer = ws->surface_buffer_create( ws, 
+                                            spt->base.width[0], 
+                                            spt->base.height[0],
+                                            spt->base.format,
+                                            usage,
+                                            &spt->stride[0]);
 
    return spt->buffer != NULL;
 }
index 9a19d4d077afc17db6927bb0527386052b1a4aa1..c4148fe81041d9d793511d60ce081a6e94eec7e3 100644 (file)
@@ -118,7 +118,7 @@ trace_winsys_surface_buffer_create(struct pipe_winsys *_winsys,
    trace_dump_arg(format, format);
    trace_dump_arg(uint, usage);
 
-   result = winsys->_surface_buffer_create(winsys,
+   result = winsys->surface_buffer_create(winsys,
                                           width, height,
                                           format,
                                           usage,
@@ -153,7 +153,7 @@ trace_winsys_buffer_create(struct pipe_winsys *_winsys,
    trace_dump_arg(uint, usage);
    trace_dump_arg(uint, size);
 
-   buffer = winsys->_buffer_create(winsys, alignment, usage, size);
+   buffer = winsys->buffer_create(winsys, alignment, usage, size);
    
    trace_dump_ret(ptr, buffer);
    
@@ -162,10 +162,10 @@ trace_winsys_buffer_create(struct pipe_winsys *_winsys,
    /* Zero the buffer to avoid dumping uninitialized memory */
    if(buffer->usage & PIPE_BUFFER_USAGE_CPU_WRITE) {
       void *map;
-      map = winsys->_buffer_map(winsys, buffer, PIPE_BUFFER_USAGE_CPU_WRITE);
+      map = winsys->buffer_map(winsys, buffer, PIPE_BUFFER_USAGE_CPU_WRITE);
       if(map) {
          memset(map, 0, buffer->size);
-         winsys->_buffer_unmap(winsys, buffer);
+         winsys->buffer_unmap(winsys, buffer);
       }
    }
    
@@ -190,7 +190,7 @@ trace_winsys_user_buffer_create(struct pipe_winsys *_winsys,
    trace_dump_arg_end();
    trace_dump_arg(uint, size);
 
-   result = winsys->_user_buffer_create(winsys, data, size);
+   result = winsys->user_buffer_create(winsys, data, size);
    
    trace_dump_ret(ptr, result);
    
@@ -216,7 +216,7 @@ trace_winsys_user_buffer_update(struct pipe_winsys *_winsys,
    const void *map;
    
    if(buffer && buffer->usage & TRACE_BUFFER_USAGE_USER) {
-      map = winsys->_buffer_map(winsys, buffer, PIPE_BUFFER_USAGE_CPU_READ);
+      map = winsys->buffer_map(winsys, buffer, PIPE_BUFFER_USAGE_CPU_READ);
       if(map) {
          trace_dump_call_begin("pipe_winsys", "buffer_write");
          
@@ -234,7 +234,7 @@ trace_winsys_user_buffer_update(struct pipe_winsys *_winsys,
       
          trace_dump_call_end();
          
-         winsys->_buffer_unmap(winsys, buffer);
+         winsys->buffer_unmap(winsys, buffer);
       }
    }
 }
@@ -249,7 +249,7 @@ trace_winsys_buffer_map(struct pipe_winsys *_winsys,
    struct pipe_winsys *winsys = tr_ws->winsys;
    void *map;
    
-   map = winsys->_buffer_map(winsys, buffer, usage);
+   map = winsys->buffer_map(winsys, buffer, usage);
    if(map) {
       if(usage & PIPE_BUFFER_USAGE_CPU_WRITE) {
          assert(!hash_table_get(tr_ws->buffer_maps, buffer));
@@ -290,7 +290,7 @@ trace_winsys_buffer_unmap(struct pipe_winsys *_winsys,
       hash_table_remove(tr_ws->buffer_maps, buffer);
    }
    
-   winsys->_buffer_unmap(winsys, buffer);
+   winsys->buffer_unmap(winsys, buffer);
 }
 
 
@@ -306,7 +306,7 @@ trace_winsys_buffer_destroy(struct pipe_winsys *_winsys,
    trace_dump_arg(ptr, winsys);
    trace_dump_arg(ptr, buffer);
 
-   winsys->_buffer_destroy(winsys, buffer);
+   winsys->buffer_destroy(winsys, buffer);
    
    trace_dump_call_end();
 }
@@ -420,12 +420,12 @@ trace_winsys_create(struct pipe_winsys *winsys)
    tr_ws->base.destroy = trace_winsys_destroy;
    tr_ws->base.get_name = trace_winsys_get_name;
    tr_ws->base.flush_frontbuffer = trace_winsys_flush_frontbuffer;
-   tr_ws->base._surface_buffer_create = trace_winsys_surface_buffer_create;
-   tr_ws->base._buffer_create = trace_winsys_buffer_create;
-   tr_ws->base._user_buffer_create = trace_winsys_user_buffer_create;
-   tr_ws->base._buffer_map = trace_winsys_buffer_map;
-   tr_ws->base._buffer_unmap = trace_winsys_buffer_unmap;
-   tr_ws->base._buffer_destroy = trace_winsys_buffer_destroy;
+   tr_ws->base.surface_buffer_create = trace_winsys_surface_buffer_create;
+   tr_ws->base.buffer_create = trace_winsys_buffer_create;
+   tr_ws->base.user_buffer_create = trace_winsys_user_buffer_create;
+   tr_ws->base.buffer_map = trace_winsys_buffer_map;
+   tr_ws->base.buffer_unmap = trace_winsys_buffer_unmap;
+   tr_ws->base.buffer_destroy = trace_winsys_buffer_destroy;
    tr_ws->base.fence_reference = trace_winsys_fence_reference;
    tr_ws->base.fence_signalled = trace_winsys_fence_signalled;
    tr_ws->base.fence_finish = trace_winsys_fence_finish;
index 062ddf66a00b453662f7bfb1229dd750fc16d718..0fd2a405569d27ba1b5371396bae9e951ed83d0b 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "pipe/p_compiler.h"
 #include "pipe/p_debug.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 
 /**
diff --git a/src/gallium/include/pipe/internal/p_winsys_screen.h b/src/gallium/include/pipe/internal/p_winsys_screen.h
new file mode 100644 (file)
index 0000000..ee83557
--- /dev/null
@@ -0,0 +1,185 @@
+ /**************************************************************************
+ * 
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ **************************************************************************/
+
+/**
+ * \file
+ * This is the interface that Gallium3D requires any window system
+ * hosting it to implement.  This is the only include file in Gallium3D
+ * which is public.
+ */
+
+#ifndef P_WINSYS_H
+#define P_WINSYS_H
+
+
+#include "pipe/p_format.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** Opaque type */
+struct pipe_fence_handle;
+
+struct pipe_surface;
+
+
+/**
+ * Gallium3D drivers are (meant to be!) independent of both GL and the
+ * window system.  The window system provides a buffer manager and a
+ * set of additional hooks for things like command buffer submission,
+ * etc.
+ *
+ * There clearly has to be some agreement between the window system
+ * driver and the hardware driver about the format of command buffers,
+ * etc.
+ */
+struct pipe_winsys
+{
+   void (*destroy)( struct pipe_winsys *ws );
+
+   /** Returns name of this winsys interface */
+   const char *(*get_name)( struct pipe_winsys *ws );
+
+   /**
+    * Do any special operations to ensure frontbuffer contents are
+    * displayed, eg copy fake frontbuffer.
+    */
+   void (*flush_frontbuffer)( struct pipe_winsys *ws,
+                              struct pipe_surface *surf,
+                              void *context_private );
+
+
+   /**
+    * Buffer management. Buffer attributes are mostly fixed over its lifetime.
+    *
+    * Remember that gallium gets to choose the interface it needs, and the
+    * window systems must then implement that interface (rather than the
+    * other way around...).
+    *
+    * usage is a bitmask of PIPE_BUFFER_USAGE_PIXEL/VERTEX/INDEX/CONSTANT. This
+    * usage argument is only an optimization hint, not a guarantee, therefore 
+    * proper behavior must be observed in all circumstances.
+    *
+    * alignment indicates the client's alignment requirements, eg for
+    * SSE instructions.
+    */
+   struct pipe_buffer *(*buffer_create)( struct pipe_winsys *ws, 
+                                         unsigned alignment, 
+                                         unsigned usage,
+                                         unsigned size );
+
+   /** 
+    * Create a buffer that wraps user-space data.
+    *
+    * Effectively this schedules a delayed call to buffer_create
+    * followed by an upload of the data at *some point in the future*,
+    * or perhaps never.  Basically the allocate/upload is delayed
+    * until the buffer is actually passed to hardware.
+    *
+    * The intention is to provide a quick way to turn regular data
+    * into a buffer, and secondly to avoid a copy operation if that
+    * data subsequently turns out to be only accessed by the CPU.  
+    *
+    * Common example is OpenGL vertex buffers that are subsequently
+    * processed either by software TNL in the driver or by passing to
+    * hardware.
+    *
+    * XXX: What happens if the delayed call to buffer_create() fails?
+    *
+    * Note that ptr may be accessed at any time upto the time when the
+    * buffer is destroyed, so the data must not be freed before then.
+    */
+   struct pipe_buffer *(*user_buffer_create)(struct pipe_winsys *ws, 
+                                                    void *ptr,
+                                                    unsigned bytes);
+
+   /**
+    * Allocate storage for a display target surface.
+    * 
+    * Often surfaces which are meant to be blitted to the front screen (i.e.,
+    * display targets) must be allocated with special characteristics, memory 
+    * pools, or obtained directly from the windowing system.
+    *  
+    * This callback is invoked by the pipe_screenwhen creating a texture marked
+    * with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET flag  to get the underlying 
+    * buffer storage.
+    */
+   struct pipe_buffer *(*surface_buffer_create)(struct pipe_winsys *ws,
+                                               unsigned width, unsigned height,
+                                               enum pipe_format format,
+                                               unsigned usage,
+                                               unsigned *stride);
+
+
+   /** 
+    * Map the entire data store of a buffer object into the client's address.
+    * flags is bitmask of PIPE_BUFFER_USAGE_CPU_READ/WRITE flags. 
+    */
+   void *(*buffer_map)( struct pipe_winsys *ws, 
+                       struct pipe_buffer *buf,
+                       unsigned usage );
+   
+   void (*buffer_unmap)( struct pipe_winsys *ws, 
+                        struct pipe_buffer *buf );
+
+   void (*buffer_destroy)( struct pipe_winsys *ws,
+                          struct pipe_buffer *buf );
+
+
+   /** Set ptr = fence, with reference counting */
+   void (*fence_reference)( struct pipe_winsys *ws,
+                            struct pipe_fence_handle **ptr,
+                            struct pipe_fence_handle *fence );
+
+   /**
+    * Checks whether the fence has been signalled.
+    * \param flags  driver-specific meaning
+    * \return zero on success.
+    */
+   int (*fence_signalled)( struct pipe_winsys *ws,
+                           struct pipe_fence_handle *fence,
+                           unsigned flag );
+
+   /**
+    * Wait for the fence to finish.
+    * \param flags  driver-specific meaning
+    * \return zero on success.
+    */
+   int (*fence_finish)( struct pipe_winsys *ws,
+                        struct pipe_fence_handle *fence,
+                        unsigned flag );
+
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* P_WINSYS_H */
index da7334bb67a0d84eba1d94f82c377c84f2481bfb..1219c817b4c172468d061ed23f747c032a48ba77 100644 (file)
@@ -31,7 +31,6 @@
 #include "p_context.h"
 #include "p_defines.h"
 #include "p_screen.h"
-#include "p_winsys.h"
 
 
 #ifdef __cplusplus
@@ -129,26 +128,20 @@ pipe_texture_release(struct pipe_texture **ptr)
 
 
 /**
- * Convenience wrappers for winsys buffer functions.
+ * Convenience wrappers for screen buffer functions.
  */
 
 static INLINE struct pipe_buffer *
 pipe_buffer_create( struct pipe_screen *screen,
                     unsigned alignment, unsigned usage, unsigned size )
 {
-   if (screen->buffer_create)
-      return screen->buffer_create(screen, alignment, usage, size);
-   else
-      return screen->winsys->_buffer_create(screen->winsys, alignment, usage, size);
+   return screen->buffer_create(screen, alignment, usage, size);
 }
 
 static INLINE struct pipe_buffer *
 pipe_user_buffer_create( struct pipe_screen *screen, void *ptr, unsigned size )
 {
-   if (screen->user_buffer_create)
-      return screen->user_buffer_create(screen, ptr, size);
-   else
-      return screen->winsys->_user_buffer_create(screen->winsys, ptr, size);
+   return screen->user_buffer_create(screen, ptr, size);
 }
 
 static INLINE void *
@@ -156,20 +149,14 @@ pipe_buffer_map(struct pipe_screen *screen,
                 struct pipe_buffer *buf,
                 unsigned usage)
 {
-   if (screen->buffer_map)
-      return screen->buffer_map(screen, buf, usage);
-   else
-      return screen->winsys->_buffer_map(screen->winsys, buf, usage);
+   return screen->buffer_map(screen, buf, usage);
 }
 
 static INLINE void
 pipe_buffer_unmap(struct pipe_screen *screen,
                   struct pipe_buffer *buf)
 {
-   if (screen->buffer_unmap)
-      screen->buffer_unmap(screen, buf);
-   else
-      screen->winsys->_buffer_unmap(screen->winsys, buf);
+   screen->buffer_unmap(screen, buf);
 }
 
 /* XXX: thread safety issues!
@@ -187,10 +174,7 @@ pipe_buffer_reference(struct pipe_screen *screen,
    if (*ptr) {
       assert((*ptr)->refcount);
       if(--(*ptr)->refcount == 0) {
-         if (screen->buffer_destroy)
-            screen->buffer_destroy( screen, *ptr );
-         else
-            screen->winsys->_buffer_destroy( screen->winsys, *ptr );
+         screen->buffer_destroy( screen, *ptr );
       }
    }
 
index b072484a84cea5a7d9d3c7a04605bc176595dc45..715fa39cbec387c0a07ac875e155018f720ea236 100644 (file)
@@ -48,6 +48,8 @@ extern "C" {
 #endif
 
 
+/** Opaque type */
+struct pipe_fence_handle;
 
 /**
  * Gallium screen/adapter context.  Basically everything
@@ -196,6 +198,41 @@ struct pipe_screen {
 
    void (*buffer_destroy)( struct pipe_screen *screen,
                           struct pipe_buffer *buf );
+
+
+   /**
+    * Do any special operations to ensure frontbuffer contents are
+    * displayed, eg copy fake frontbuffer.
+    */
+   void (*flush_frontbuffer)( struct pipe_screen *screen,
+                              struct pipe_surface *surf,
+                              void *context_private );
+
+
+
+   /** Set ptr = fence, with reference counting */
+   void (*fence_reference)( struct pipe_screen *screen,
+                            struct pipe_fence_handle **ptr,
+                            struct pipe_fence_handle *fence );
+
+   /**
+    * Checks whether the fence has been signalled.
+    * \param flags  driver-specific meaning
+    * \return zero on success.
+    */
+   int (*fence_signalled)( struct pipe_screen *screen,
+                           struct pipe_fence_handle *fence,
+                           unsigned flag );
+
+   /**
+    * Wait for the fence to finish.
+    * \param flags  driver-specific meaning
+    * \return zero on success.
+    */
+   int (*fence_finish)( struct pipe_screen *screen,
+                        struct pipe_fence_handle *fence,
+                        unsigned flag );
+
 };
 
 
diff --git a/src/gallium/include/pipe/p_winsys.h b/src/gallium/include/pipe/p_winsys.h
deleted file mode 100644 (file)
index bda1907..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
- /**************************************************************************
- * 
- * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
- * All Rights Reserved.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- * 
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * 
- **************************************************************************/
-
-/**
- * \file
- * This is the interface that Gallium3D requires any window system
- * hosting it to implement.  This is the only include file in Gallium3D
- * which is public.
- */
-
-#ifndef P_WINSYS_H
-#define P_WINSYS_H
-
-
-#include "p_format.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/** Opaque type */
-struct pipe_fence_handle;
-
-struct pipe_surface;
-
-
-/**
- * Gallium3D drivers are (meant to be!) independent of both GL and the
- * window system.  The window system provides a buffer manager and a
- * set of additional hooks for things like command buffer submission,
- * etc.
- *
- * There clearly has to be some agreement between the window system
- * driver and the hardware driver about the format of command buffers,
- * etc.
- */
-struct pipe_winsys
-{
-   void (*destroy)( struct pipe_winsys *ws );
-
-   /** Returns name of this winsys interface */
-   const char *(*get_name)( struct pipe_winsys *ws );
-
-   /**
-    * Do any special operations to ensure frontbuffer contents are
-    * displayed, eg copy fake frontbuffer.
-    */
-   void (*flush_frontbuffer)( struct pipe_winsys *ws,
-                              struct pipe_surface *surf,
-                              void *context_private );
-
-
-   /**
-    * Buffer management. Buffer attributes are mostly fixed over its lifetime.
-    *
-    * Remember that gallium gets to choose the interface it needs, and the
-    * window systems must then implement that interface (rather than the
-    * other way around...).
-    *
-    * usage is a bitmask of PIPE_BUFFER_USAGE_PIXEL/VERTEX/INDEX/CONSTANT. This
-    * usage argument is only an optimization hint, not a guarantee, therefore 
-    * proper behavior must be observed in all circumstances.
-    *
-    * alignment indicates the client's alignment requirements, eg for
-    * SSE instructions.
-    */
-   struct pipe_buffer *(*_buffer_create)( struct pipe_winsys *ws, 
-                                         unsigned alignment, 
-                                         unsigned usage,
-                                         unsigned size );
-
-   /** 
-    * Create a buffer that wraps user-space data.
-    *
-    * Effectively this schedules a delayed call to buffer_create
-    * followed by an upload of the data at *some point in the future*,
-    * or perhaps never.  Basically the allocate/upload is delayed
-    * until the buffer is actually passed to hardware.
-    *
-    * The intention is to provide a quick way to turn regular data
-    * into a buffer, and secondly to avoid a copy operation if that
-    * data subsequently turns out to be only accessed by the CPU.  
-    *
-    * Common example is OpenGL vertex buffers that are subsequently
-    * processed either by software TNL in the driver or by passing to
-    * hardware.
-    *
-    * XXX: What happens if the delayed call to buffer_create() fails?
-    *
-    * Note that ptr may be accessed at any time upto the time when the
-    * buffer is destroyed, so the data must not be freed before then.
-    */
-   struct pipe_buffer *(*_user_buffer_create)(struct pipe_winsys *ws, 
-                                                    void *ptr,
-                                                    unsigned bytes);
-
-   /**
-    * Allocate storage for a display target surface.
-    * 
-    * Often surfaces which are meant to be blitted to the front screen (i.e.,
-    * display targets) must be allocated with special characteristics, memory 
-    * pools, or obtained directly from the windowing system.
-    *  
-    * This callback is invoked by the pipe_screenwhen creating a texture marked
-    * with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET flag  to get the underlying 
-    * buffer storage.
-    */
-   struct pipe_buffer *(*_surface_buffer_create)(struct pipe_winsys *ws,
-                                               unsigned width, unsigned height,
-                                               enum pipe_format format,
-                                               unsigned usage,
-                                               unsigned *stride);
-
-
-   /** 
-    * Map the entire data store of a buffer object into the client's address.
-    * flags is bitmask of PIPE_BUFFER_USAGE_CPU_READ/WRITE flags. 
-    */
-   void *(*_buffer_map)( struct pipe_winsys *ws, 
-                       struct pipe_buffer *buf,
-                       unsigned usage );
-   
-   void (*_buffer_unmap)( struct pipe_winsys *ws, 
-                        struct pipe_buffer *buf );
-
-   void (*_buffer_destroy)( struct pipe_winsys *ws,
-                          struct pipe_buffer *buf );
-
-
-   /** Set ptr = fence, with reference counting */
-   void (*fence_reference)( struct pipe_winsys *ws,
-                            struct pipe_fence_handle **ptr,
-                            struct pipe_fence_handle *fence );
-
-   /**
-    * Checks whether the fence has been signalled.
-    * \param flags  driver-specific meaning
-    * \return zero on success.
-    */
-   int (*fence_signalled)( struct pipe_winsys *ws,
-                           struct pipe_fence_handle *fence,
-                           unsigned flag );
-
-   /**
-    * Wait for the fence to finish.
-    * \param flags  driver-specific meaning
-    * \return zero on success.
-    */
-   int (*fence_finish)( struct pipe_winsys *ws,
-                        struct pipe_fence_handle *fence,
-                        unsigned flag );
-
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* P_WINSYS_H */
index 217fe00338eae36a8ce582b800fd9bab7d3531de..8564972b91e2c0e015e4db5258ed79437bcaf6c0 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "pipe/p_context.h"
 #include "pipe/p_screen.h"
-#include "pipe/p_winsys.h"
 
 #include "state_tracker/st_public.h"
 #include "state_tracker/drm_api.h"
index 3ca5acb68bfab0622043614eb60fb96e5d6fcea1..dec82c3a002ad579d392f73973f29825e78b39b9 100644 (file)
@@ -10,7 +10,7 @@
 #include "state_tracker/drm_api.h"
 
 #include "pipe/p_screen.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 
 /** HACK */
 void* driDriverAPI;
index 53ef275349698ea53e6903639506213fd967cff3..122c42ed0e6f3fd26717d1485adc7eec7637a159 100644 (file)
@@ -2,7 +2,6 @@
 #include "vl_basic_csc.h"
 #include <assert.h>
 #include <pipe/p_context.h>
-#include <pipe/p_winsys.h>
 #include <pipe/p_state.h>
 #include <pipe/p_inlines.h>
 #include <tgsi/tgsi_parse.h>
index 789042f6f21a7c40a00eff13f45d7af528abe3c1..d53482f579412cd32377cfd45d60f65b038f9d2b 100644 (file)
@@ -2,7 +2,6 @@
 #include "vl_r16snorm_mc_buf.h"
 #include <assert.h>
 #include <pipe/p_context.h>
-#include <pipe/p_winsys.h>
 #include <pipe/p_screen.h>
 #include <pipe/p_state.h>
 #include <pipe/p_inlines.h>
@@ -649,9 +648,9 @@ static int vlFlush
 
        pipe->set_framebuffer_state(pipe, &mc->render_target);
        pipe->set_viewport_state(pipe, &mc->viewport);
-       vs_consts = pipe->winsys->buffer_map
+       vs_consts = pipe_buffer_map
        (
-               pipe->winsys,
+               pipe->screen,
                mc->vs_const_buf.buffer,
                PIPE_BUFFER_USAGE_CPU_WRITE | PIPE_BUFFER_USAGE_DISCARD
        );
index 95c1378a032ceb676c02b306267ba97d68d49e18..20dd8d269d906d731871195b8ae261d4f0156eab 100644 (file)
@@ -26,7 +26,7 @@
  **************************************************************************/
 
 
-#include "pipe/p_winsys.h"
+#include "pipe/p_screen.h"
 #include "pipe/p_context.h"
 #include "pipe/p_shader_tokens.h"
 #include "pipe/p_inlines.h"
index 01d88ee499d39556592279b1e8468661d352c436..4d798df99bf2221e6bd111edb76bff9afc2c174d 100644 (file)
@@ -36,7 +36,7 @@
  */
 
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"/* port to just p_screen */
 #include "pipe/p_format.h"
 #include "pipe/p_context.h"
 #include "pipe/p_inlines.h"
index 14aeaf61dbfa2670679e25e0efe121e1f2a9f11b..85ab1a26846e7a6145e03028430540d33d667e69 100644 (file)
@@ -10,7 +10,7 @@
 #include "ws_dri_bufpool.h"
 #include "ws_dri_fencemgr.h"
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_state.h"
 #include "pipe/p_inlines.h"
index 3f8b3f585c7a2b7d0417fc33f07424a44f9bf94b..534d638b6a88a931c9096b34f5c9c8f1e3d4c6b6 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef INTEL_DRM_DEVICE_H
 #define INTEL_DRM_DEVICE_H
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_context.h"
 
 /*
index 5406636bcb78a62759c4db0d3635e141b4df9e32..82c1cb2f32ac532f06c3f57b5cbfb80ede30303d 100644 (file)
@@ -1,7 +1,7 @@
 
 #include "intel_be_device.h"
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_state.h"
 #include "pipe/p_inlines.h"
index 96e94c47e712e4bfa875a121c03e1544bd7a6f75..f06890163cc55f4985ca99a038daa8384520471d 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef INTEL_DRM_DEVICE_H
 #define INTEL_DRM_DEVICE_H
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_context.h"
 
 #include "drm.h"
index 5b3101fbba90d764a027cfb5748c345072d88e8a..8e889b9f369026bbbdefeb6e10ed4d8020030a2a 100644 (file)
@@ -1,4 +1,4 @@
-#include <pipe/p_winsys.h>
+#include "pipe/internal/p_winsys_screen.h"
 #include <pipe/p_defines.h>
 #include <pipe/p_inlines.h>
 #include <util/u_memory.h>
index 14c728690d4159513d1886e856fbe06fcfdef549..d97ffdf337386ac42aa4bce03d781f207009974b 100644 (file)
@@ -2,7 +2,7 @@
 #define NOUVEAU_PIPE_WINSYS_H
 
 #include "pipe/p_context.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "nouveau_context.h"
 
 struct nouveau_pipe_buffer {
index 04def600f455ad3a32f31a3a0e8f6cf62acbf657..396e4f2a2e62159a06831b5e2d92fb8e01dace80 100644 (file)
@@ -29,7 +29,7 @@
  * Authors: Keith Whitwell <keithw-at-tungstengraphics-dot-com>
  */
 
-#include <pipe/p_winsys.h>
+#include "pipe/internal/p_winsys_screen.h"
 #include <pipe/p_screen.h>
 #include <pipe/p_defines.h>
 #include <pipe/p_format.h>
index 82aa60ae58f14e1022734bb82c63b58d93732099..4876339107a40b033bc12530a8ab343fc3e64cc6 100644 (file)
@@ -38,7 +38,7 @@
 #include "pipe/p_compiler.h"
 #include "pipe/p_format.h"
 #include "pipe/p_state.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "util/u_memory.h"
 #include "softpipe/sp_winsys.h"
 
index a09ad5e8e90c93e0fc7094ad3d61735871144004..739bfa1c1a67b05a8c4c313aadb7252e728eb3f4 100644 (file)
@@ -35,7 +35,7 @@
  */
 
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_state.h"
 #include "pipe/p_inlines.h"
 #include "util/u_math.h"
index 91e3c62d7f67d2e772490451fce41094dac01aaa..738bca3eac5ae3d270c0a6a8ddcd4e1107bd0540 100644 (file)
@@ -38,7 +38,7 @@
 
 #include <windows.h>
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_format.h"
 #include "pipe/p_context.h"
 #include "pipe/p_inlines.h"
index 528473925ada908b47f30638f24ce13c87f93043..09599507f440cda1ca5c8db8b9c751e2198268d3 100644 (file)
@@ -36,7 +36,7 @@
 //#include "glxheader.h"
 //#include "xmesaP.h"
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
index 1fd7da8a2f57270ad9e7fc8479638e2bac6a80f5..5344c502ef7476fc04c1f94997dc89af77be4a6e 100644 (file)
@@ -36,7 +36,7 @@
 //#include "state_trackers/xlib/glxheader.h"
 //#include "state_trackers/xlib/xmesaP.h"
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_inlines.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
index 5af9ee3bb50b739749e64b9edab700901f3d4bd2..bf69593c5ca29eb7711a2f93dd5f786515c4101d 100644 (file)
@@ -41,7 +41,7 @@
 #undef ASSERT
 #undef Elements
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_format.h"
 #include "pipe/p_context.h"
 #include "pipe/p_inlines.h"
index c0bf37050a4450d4f8bf19f869dc9f1bdb13fccf..01d24584e2b2845bcb06a272f926a1f8315847b3 100644 (file)
@@ -38,7 +38,7 @@
 #undef ASSERT
 #undef Elements
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_format.h"
 #include "pipe/p_context.h"
 #include "pipe/p_inlines.h"
index 0c69e16623385bdd8fe61a0c2c2984747dcd1a8f..d18946de7dcebfa205ed09219f59cc78634f47db 100644 (file)
@@ -42,7 +42,7 @@
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/p_screen.h"
 #include "st_context.h"
 #include "st_cb_fbo.h"
 #include "st_cb_texture.h"
index 19021411cfc9ec9fc6581d6c4cd2400ad3768d84..c7e8aa7cc565a9c8f99c0cc466ed75627db11639 100644 (file)
@@ -52,7 +52,6 @@
 
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
 #include "cso_cache/cso_cache.h"
 
 #include "draw/draw_context.h"
index 072f2e92ad7501645e71768a9fdd838a6e2123f3..f8621ab125fbd37df70a1bb10ac28ba3073d0bef 100644 (file)
@@ -42,7 +42,7 @@
 #include "st_public.h"
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/p_winsys.h"
+#include "pipe/p_screen.h"
 #include "util/u_gen_mipmap.h"
 #include "util/u_blit.h"
 
@@ -55,7 +55,7 @@ is_front_buffer_dirty(struct st_context *st)
 
 
 /**
- * Tell the winsys to display the front color buffer on-screen.
+ * Tell the screen to display the front color buffer on-screen.
  */
 static void
 display_front_buffer(struct st_context *st)
@@ -67,7 +67,7 @@ display_front_buffer(struct st_context *st)
 
    /* Hook for copying "fake" frontbuffer if necessary:
     */
-   st->pipe->winsys->flush_frontbuffer( st->pipe->winsys, front_surf,
+   st->pipe->screen->flush_frontbuffer( st->pipe->screen, front_surf,
                                         st->pipe->priv );
 
    /*
@@ -103,8 +103,8 @@ void st_finish( struct st_context *st )
    st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
 
    if(fence) {
-      st->pipe->winsys->fence_finish(st->pipe->winsys, fence, 0);
-      st->pipe->winsys->fence_reference(st->pipe->winsys, &fence, NULL);
+      st->pipe->screen->fence_finish(st->pipe->screen, fence, 0);
+      st->pipe->screen->fence_reference(st->pipe->screen, &fence, NULL);
    }
 }
 
index 09545aa8fb870c53170a2e9b9106ab076eee76de..27e396ab467f7989acc63073525943f246ed8216 100644 (file)
@@ -36,7 +36,8 @@
 #include "main/version.h"
 #include "pipe/p_context.h"
 #include "pipe/p_screen.h"
-#include "pipe/p_winsys.h"
+/* We want the name of the winsys we're running on*/
+#include "pipe/internal/p_winsys_screen.h"
 #include "st_context.h"
 #include "st_cb_strings.h"
 
index 129b24ce777a1847e7cb000b90a3f10b60672d83..0073fdbc233ace5fc3333bac73700ccef9481e5b 100644 (file)
@@ -28,7 +28,7 @@
 #include <windows.h>
 
 #include "pipe/p_debug.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_screen.h"
 
 #include "stw_device.h"
index 002bcc64e72f48dfed2c41c0edc95d61b719774c..ddc482752b14c82bf38bd2b5cc7e96afd816a15b 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <windows.h>
 
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_screen.h"
 #include "pipe/p_context.h"
 #include "state_tracker/st_context.h"