Mesa (gallium-embedded): gallium: Move deprecated pipe/internal/ p_winsys_screen.h inside util/u_simple_screen.h

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Feb 2 16:11:39 UTC 2010


Module: Mesa
Branch: gallium-embedded
Commit: 25357696c3f253d44e83798e2a7e7f1f60c5adc5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=25357696c3f253d44e83798e2a7e7f1f60c5adc5

Author: José Fonseca <jfonseca at vmware.com>
Date:   Tue Feb  2 16:09:56 2010 +0000

gallium: Move deprecated pipe/internal/p_winsys_screen.h inside util/u_simple_screen.h

---

 src/gallium/auxiliary/util/u_simple_screen.c       |    2 +-
 src/gallium/auxiliary/util/u_simple_screen.h       |  139 ++++++++++++++-
 src/gallium/auxiliary/util/u_timed_winsys.c        |    2 +-
 src/gallium/drivers/cell/ppu/cell_context.c        |    2 +-
 src/gallium/drivers/cell/ppu/cell_draw_arrays.c    |    2 +-
 src/gallium/drivers/cell/ppu/cell_screen.c         |    2 +-
 src/gallium/drivers/cell/ppu/cell_state_shader.c   |    2 +-
 src/gallium/drivers/cell/ppu/cell_texture.c        |    2 +-
 src/gallium/drivers/cell/ppu/cell_vertex_shader.c  |    2 +-
 src/gallium/drivers/failover/fo_context.c          |    2 +-
 src/gallium/drivers/i915/i915_debug.h              |    2 +-
 src/gallium/drivers/i915/i915_debug_fp.c           |    2 +-
 src/gallium/drivers/nouveau/nouveau_winsys.h       |    2 +-
 src/gallium/drivers/nv04/nv04_context.c            |    2 +-
 src/gallium/drivers/nv04/nv04_prim_vbuf.c          |    2 +-
 src/gallium/drivers/nv04/nv04_surface.c            |    2 +-
 src/gallium/drivers/nv10/nv10_context.c            |    2 +-
 src/gallium/drivers/nv10/nv10_surface.c            |    2 +-
 src/gallium/drivers/nv20/nv20_context.c            |    2 +-
 src/gallium/drivers/nv20/nv20_prim_vbuf.c          |    2 +-
 src/gallium/drivers/nv20/nv20_surface.c            |    2 +-
 src/gallium/drivers/nv30/nv30_context.c            |    2 +-
 src/gallium/drivers/nv30/nv30_surface.c            |    2 +-
 src/gallium/drivers/nv40/nv40_context.c            |    2 +-
 src/gallium/drivers/nv50/nv50_context.c            |    2 +-
 src/gallium/drivers/nv50/nv50_surface.c            |    2 +-
 src/gallium/drivers/r300/r300_winsys.h             |    2 +-
 src/gallium/drivers/softpipe/sp_draw_arrays.c      |    2 +-
 src/gallium/drivers/softpipe/sp_screen.c           |    2 +-
 src/gallium/drivers/softpipe/sp_winsys.c           |    2 +-
 .../include/pipe/internal/p_winsys_screen.h        |  190 --------------------
 src/gallium/state_trackers/egl/x11/native_ximage.c |    2 +-
 src/gallium/state_trackers/egl/x11/sw_winsys.c     |    2 +-
 .../winsys/drm/nouveau/drm/nouveau_drm_api.h       |    2 +-
 src/gallium/winsys/drm/radeon/core/radeon_buffer.h |    2 +-
 src/gallium/winsys/drm/radeon/core/radeon_winsys.h |    2 +-
 src/gallium/winsys/g3dvl/xlib/xsp_winsys.c         |    2 +-
 src/gallium/winsys/gdi/gdi_softpipe_winsys.c       |    2 +-
 src/gallium/winsys/xlib/xlib_brw_context.c         |    2 +-
 src/gallium/winsys/xlib/xlib_cell.c                |    2 +-
 src/gallium/winsys/xlib/xlib_llvmpipe.c            |    2 +-
 src/gallium/winsys/xlib/xlib_softpipe.c            |    2 +-
 42 files changed, 178 insertions(+), 231 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_simple_screen.c b/src/gallium/auxiliary/util/u_simple_screen.c
index 5238299..53f3c16 100644
--- a/src/gallium/auxiliary/util/u_simple_screen.c
+++ b/src/gallium/auxiliary/util/u_simple_screen.c
@@ -29,7 +29,7 @@
 
 #include "pipe/p_screen.h"
 #include "pipe/p_state.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 
 static struct pipe_buffer *
diff --git a/src/gallium/auxiliary/util/u_simple_screen.h b/src/gallium/auxiliary/util/u_simple_screen.h
index 6612a8a..bb3f5ba 100644
--- a/src/gallium/auxiliary/util/u_simple_screen.h
+++ b/src/gallium/auxiliary/util/u_simple_screen.h
@@ -28,8 +28,145 @@
 #ifndef U_SIMPLE_SCREEN_H
 #define U_SIMPLE_SCREEN_H
 
+#include "pipe/p_format.h"
+
 struct pipe_screen;
-struct pipe_winsys;
+struct pipe_fence_handle;
+struct pipe_surface;
+struct pipe_buffer;
+
+/**
+ * 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 buffer size is correct
+    */
+   void (*update_buffer)( struct pipe_winsys *ws,
+                          void *context_private );
+   /**
+    * 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 tex_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_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 );
+
+};
 
 /**
  * The following function initializes a simple passthrough screen.
diff --git a/src/gallium/auxiliary/util/u_timed_winsys.c b/src/gallium/auxiliary/util/u_timed_winsys.c
index 178acdc..59bdcd2 100644
--- a/src/gallium/auxiliary/util/u_timed_winsys.c
+++ b/src/gallium/auxiliary/util/u_timed_winsys.c
@@ -30,7 +30,7 @@
  */
 
 #include "pipe/p_state.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "u_timed_winsys.h"
 #include "util/u_memory.h"
 #include "util/u_time.h"
diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index ebb7a7a..30aa044 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -36,7 +36,7 @@
 #include "pipe/p_defines.h"
 #include "pipe/p_format.h"
 #include "util/u_memory.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "pipe/p_screen.h"
 
 #include "draw/draw_context.h"
diff --git a/src/gallium/drivers/cell/ppu/cell_draw_arrays.c b/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
index 8b93945..bffd0fa 100644
--- a/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
+++ b/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
@@ -33,7 +33,7 @@
 
 #include "pipe/p_defines.h"
 #include "pipe/p_context.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "util/u_inlines.h"
 
 #include "cell_context.h"
diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c
index 37b0439..c329c66 100644
--- a/src/gallium/drivers/cell/ppu/cell_screen.c
+++ b/src/gallium/drivers/cell/ppu/cell_screen.c
@@ -28,7 +28,7 @@
 
 #include "util/u_memory.h"
 #include "util/u_simple_screen.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_screen.h"
 
diff --git a/src/gallium/drivers/cell/ppu/cell_state_shader.c b/src/gallium/drivers/cell/ppu/cell_state_shader.c
index c5adc6a..9b2f86f 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_shader.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_shader.c
@@ -28,7 +28,7 @@
 #include "pipe/p_defines.h"
 #include "util/u_memory.h"
 #include "util/u_inlines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "draw/draw_context.h"
 #include "tgsi/tgsi_parse.h"
 
diff --git a/src/gallium/drivers/cell/ppu/cell_texture.c b/src/gallium/drivers/cell/ppu/cell_texture.c
index 15bc1ee..fad290d 100644
--- a/src/gallium/drivers/cell/ppu/cell_texture.c
+++ b/src/gallium/drivers/cell/ppu/cell_texture.c
@@ -34,7 +34,7 @@
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 #include "util/u_inlines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 #include "util/u_format.h"
 #include "util/u_math.h"
diff --git a/src/gallium/drivers/cell/ppu/cell_vertex_shader.c b/src/gallium/drivers/cell/ppu/cell_vertex_shader.c
index 403cf6d..cf8cd41 100644
--- a/src/gallium/drivers/cell/ppu/cell_vertex_shader.c
+++ b/src/gallium/drivers/cell/ppu/cell_vertex_shader.c
@@ -31,7 +31,7 @@
 
 #include "pipe/p_defines.h"
 #include "pipe/p_context.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "util/u_math.h"
 
 #include "cell_context.h"
diff --git a/src/gallium/drivers/failover/fo_context.c b/src/gallium/drivers/failover/fo_context.c
index 46e4338..2ccc5d3 100644
--- a/src/gallium/drivers/failover/fo_context.c
+++ b/src/gallium/drivers/failover/fo_context.c
@@ -27,7 +27,7 @@
 
 
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "util/u_memory.h"
 #include "pipe/p_context.h"
 
diff --git a/src/gallium/drivers/i915/i915_debug.h b/src/gallium/drivers/i915/i915_debug.h
index dd9b86e..8f74847 100644
--- a/src/gallium/drivers/i915/i915_debug.h
+++ b/src/gallium/drivers/i915/i915_debug.h
@@ -72,7 +72,7 @@ void i915_print_ureg(const char *msg, unsigned ureg);
 
 #if defined(DEBUG) && defined(FILE_DEBUG_FLAG)
 
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 static INLINE void
 I915_DBG(
diff --git a/src/gallium/drivers/i915/i915_debug_fp.c b/src/gallium/drivers/i915/i915_debug_fp.c
index f1ffd27..066e739 100644
--- a/src/gallium/drivers/i915/i915_debug_fp.c
+++ b/src/gallium/drivers/i915/i915_debug_fp.c
@@ -28,7 +28,7 @@
 
 #include "i915_reg.h"
 #include "i915_debug.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "util/u_debug.h"
 
 
diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index 4c3e08a..d81c5be 100644
--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
@@ -2,7 +2,7 @@
 #define NOUVEAU_WINSYS_H
 
 #include <stdint.h>
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "pipe/p_defines.h"
 
 #include "nouveau/nouveau_bo.h"
diff --git a/src/gallium/drivers/nv04/nv04_context.c b/src/gallium/drivers/nv04/nv04_context.c
index edd9685..e91ffe0 100644
--- a/src/gallium/drivers/nv04/nv04_context.c
+++ b/src/gallium/drivers/nv04/nv04_context.c
@@ -1,6 +1,6 @@
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 #include "nv04_context.h"
 #include "nv04_screen.h"
diff --git a/src/gallium/drivers/nv04/nv04_prim_vbuf.c b/src/gallium/drivers/nv04/nv04_prim_vbuf.c
index dc0c1d0..03438c7 100644
--- a/src/gallium/drivers/nv04/nv04_prim_vbuf.c
+++ b/src/gallium/drivers/nv04/nv04_prim_vbuf.c
@@ -1,7 +1,7 @@
 
 #include "util/u_debug.h"
 #include "util/u_inlines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "pipe/p_compiler.h"
 
 #include "draw/draw_vbuf.h"
diff --git a/src/gallium/drivers/nv04/nv04_surface.c b/src/gallium/drivers/nv04/nv04_surface.c
index 9284091..c5f8927 100644
--- a/src/gallium/drivers/nv04/nv04_surface.c
+++ b/src/gallium/drivers/nv04/nv04_surface.c
@@ -28,7 +28,7 @@
 
 #include "nv04_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "util/u_inlines.h"
 #include "util/u_tile.h"
 
diff --git a/src/gallium/drivers/nv10/nv10_context.c b/src/gallium/drivers/nv10/nv10_context.c
index 900a640..a3ceb1d 100644
--- a/src/gallium/drivers/nv10/nv10_context.c
+++ b/src/gallium/drivers/nv10/nv10_context.c
@@ -1,6 +1,6 @@
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 #include "nv10_context.h"
 #include "nv10_screen.h"
diff --git a/src/gallium/drivers/nv10/nv10_surface.c b/src/gallium/drivers/nv10/nv10_surface.c
index acf8989..6db0164 100644
--- a/src/gallium/drivers/nv10/nv10_surface.c
+++ b/src/gallium/drivers/nv10/nv10_surface.c
@@ -28,7 +28,7 @@
 
 #include "nv10_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "util/u_inlines.h"
 #include "util/u_tile.h"
 
diff --git a/src/gallium/drivers/nv20/nv20_context.c b/src/gallium/drivers/nv20/nv20_context.c
index 22185a2..f0c0d8a 100644
--- a/src/gallium/drivers/nv20/nv20_context.c
+++ b/src/gallium/drivers/nv20/nv20_context.c
@@ -1,6 +1,6 @@
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 #include "nv20_context.h"
 #include "nv20_screen.h"
diff --git a/src/gallium/drivers/nv20/nv20_prim_vbuf.c b/src/gallium/drivers/nv20/nv20_prim_vbuf.c
index 84faa87..581276b 100644
--- a/src/gallium/drivers/nv20/nv20_prim_vbuf.c
+++ b/src/gallium/drivers/nv20/nv20_prim_vbuf.c
@@ -40,7 +40,7 @@
 
 #include "util/u_debug.h"
 #include "util/u_inlines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 #include "nv20_context.h"
 #include "nv20_state.h"
diff --git a/src/gallium/drivers/nv20/nv20_surface.c b/src/gallium/drivers/nv20/nv20_surface.c
index 7beb0f0..5deb8cc 100644
--- a/src/gallium/drivers/nv20/nv20_surface.c
+++ b/src/gallium/drivers/nv20/nv20_surface.c
@@ -28,7 +28,7 @@
 
 #include "nv20_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "util/u_inlines.h"
 #include "util/u_tile.h"
 
diff --git a/src/gallium/drivers/nv30/nv30_context.c b/src/gallium/drivers/nv30/nv30_context.c
index 54572e9..8a40cea 100644
--- a/src/gallium/drivers/nv30/nv30_context.c
+++ b/src/gallium/drivers/nv30/nv30_context.c
@@ -1,6 +1,6 @@
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 #include "nv30_context.h"
 #include "nv30_screen.h"
diff --git a/src/gallium/drivers/nv30/nv30_surface.c b/src/gallium/drivers/nv30/nv30_surface.c
index b72a63e..b48c5ab 100644
--- a/src/gallium/drivers/nv30/nv30_surface.c
+++ b/src/gallium/drivers/nv30/nv30_surface.c
@@ -28,7 +28,7 @@
 
 #include "nv30_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "util/u_inlines.h"
 #include "util/u_tile.h"
 
diff --git a/src/gallium/drivers/nv40/nv40_context.c b/src/gallium/drivers/nv40/nv40_context.c
index f79ae4d..ffe25ff 100644
--- a/src/gallium/drivers/nv40/nv40_context.c
+++ b/src/gallium/drivers/nv40/nv40_context.c
@@ -1,6 +1,6 @@
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 #include "nv40_context.h"
 #include "nv40_screen.h"
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index 5c705cc..ac1abc1 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -22,7 +22,7 @@
 
 #include "draw/draw_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 #include "nv50_context.h"
 #include "nv50_screen.h"
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
index 38a9dfd..ac0c1d0 100644
--- a/src/gallium/drivers/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nv50/nv50_surface.c
@@ -25,7 +25,7 @@
 #include "nouveau/nouveau_pushbuf.h"
 #include "nv50_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "util/u_inlines.h"
 
 #include "util/u_tile.h"
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h
index bdb8b54..d4842e9 100644
--- a/src/gallium/drivers/r300/r300_winsys.h
+++ b/src/gallium/drivers/r300/r300_winsys.h
@@ -33,7 +33,7 @@ extern "C" {
 
 #include "pipe/p_defines.h"
 #include "pipe/p_state.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 #include "radeon_winsys.h"
 
diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c
index f7e736d..b2acc36 100644
--- a/src/gallium/drivers/softpipe/sp_draw_arrays.c
+++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c
@@ -33,7 +33,7 @@
 
 #include "pipe/p_defines.h"
 #include "pipe/p_context.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "util/u_inlines.h"
 #include "util/u_prim.h"
 
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 714a1cf..ee6969e 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -28,7 +28,7 @@
 
 #include "util/u_memory.h"
 #include "util/u_simple_screen.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_screen.h"
 
diff --git a/src/gallium/drivers/softpipe/sp_winsys.c b/src/gallium/drivers/softpipe/sp_winsys.c
index e515d1d..f659892 100644
--- a/src/gallium/drivers/softpipe/sp_winsys.c
+++ b/src/gallium/drivers/softpipe/sp_winsys.c
@@ -36,7 +36,7 @@
  */
 
 
-#include "pipe/internal/p_winsys_screen.h"/* port to just p_screen */
+#include "util/u_simple_screen.h"/* port to just p_screen */
 #include "pipe/p_format.h"
 #include "pipe/p_context.h"
 #include "util/u_format.h"
diff --git a/src/gallium/include/pipe/internal/p_winsys_screen.h b/src/gallium/include/pipe/internal/p_winsys_screen.h
deleted file mode 100644
index a1542da..0000000
--- a/src/gallium/include/pipe/internal/p_winsys_screen.h
+++ /dev/null
@@ -1,190 +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 "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 buffer size is correct
-    */
-   void (*update_buffer)( struct pipe_winsys *ws,
-                          void *context_private );
-   /**
-    * 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 tex_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_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 */
diff --git a/src/gallium/state_trackers/egl/x11/native_ximage.c b/src/gallium/state_trackers/egl/x11/native_ximage.c
index dfa8df2..697fd7c 100644
--- a/src/gallium/state_trackers/egl/x11/native_ximage.c
+++ b/src/gallium/state_trackers/egl/x11/native_ximage.c
@@ -33,7 +33,7 @@
 #include "util/u_math.h"
 #include "util/u_format.h"
 #include "pipe/p_compiler.h"
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "softpipe/sp_winsys.h"
 #include "egllog.h"
 
diff --git a/src/gallium/state_trackers/egl/x11/sw_winsys.c b/src/gallium/state_trackers/egl/x11/sw_winsys.c
index 6cf8e5c..33328aa 100644
--- a/src/gallium/state_trackers/egl/x11/sw_winsys.c
+++ b/src/gallium/state_trackers/egl/x11/sw_winsys.c
@@ -35,7 +35,7 @@
  */
 
 
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "pipe/p_state.h"
 #include "util/u_inlines.h"
 #include "util/u_format.h"
diff --git a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.h b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.h
index e61e0e0..a32f290 100644
--- a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.h
+++ b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.h
@@ -4,7 +4,7 @@
 #include "state_tracker/drm_api.h"
 #include "state_tracker/dri1_api.h"
 
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 #include "nouveau_dri.h"
 
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.h b/src/gallium/winsys/drm/radeon/core/radeon_buffer.h
index 9379021..f1c8fc2 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.h
+++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.h
@@ -32,7 +32,7 @@
 
 #include <stdio.h>
 
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "pipe/p_defines.h"
 #include "util/u_inlines.h"
 
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_winsys.h b/src/gallium/winsys/drm/radeon/core/radeon_winsys.h
index 864082b..4901080 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_winsys.h
+++ b/src/gallium/winsys/drm/radeon/core/radeon_winsys.h
@@ -30,7 +30,7 @@
 #ifndef RADEON_WINSYS_H
 #define RADEON_WINSYS_H
 
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 
 struct radeon_winsys_priv;
 
diff --git a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
index 6a7e8c9..048af62 100644
--- a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
+++ b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
@@ -27,7 +27,7 @@
 
 #include <vl_winsys.h>
 #include <X11/Xutil.h>
-#include <pipe/internal/p_winsys_screen.h>
+#include <util/u_simple_screen.h>
 #include <pipe/p_state.h>
 #include <util/u_inlines.h>
 #include <util/u_format.h>
diff --git a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c
index 4db9776..36bf867 100644
--- a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c
+++ b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c
@@ -38,7 +38,7 @@
 
 #include <windows.h>
 
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "pipe/p_format.h"
 #include "pipe/p_context.h"
 #include "util/u_inlines.h"
diff --git a/src/gallium/winsys/xlib/xlib_brw_context.c b/src/gallium/winsys/xlib/xlib_brw_context.c
index 5558654..22bf41a 100644
--- a/src/gallium/winsys/xlib/xlib_brw_context.c
+++ b/src/gallium/winsys/xlib/xlib_brw_context.c
@@ -36,7 +36,7 @@
 /* #include "glxheader.h" */
 /* #include "xmesaP.h" */
 
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "util/u_inlines.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
diff --git a/src/gallium/winsys/xlib/xlib_cell.c b/src/gallium/winsys/xlib/xlib_cell.c
index 8dc18ef..9520bac 100644
--- a/src/gallium/winsys/xlib/xlib_cell.c
+++ b/src/gallium/winsys/xlib/xlib_cell.c
@@ -41,7 +41,7 @@
 #undef ASSERT
 #undef Elements
 
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "pipe/p_format.h"
 #include "pipe/p_context.h"
 #include "util/u_inlines.h"
diff --git a/src/gallium/winsys/xlib/xlib_llvmpipe.c b/src/gallium/winsys/xlib/xlib_llvmpipe.c
index cdf92d8..503addb 100644
--- a/src/gallium/winsys/xlib/xlib_llvmpipe.c
+++ b/src/gallium/winsys/xlib/xlib_llvmpipe.c
@@ -40,7 +40,7 @@
 #undef ASSERT
 #undef Elements
 
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "pipe/p_format.h"
 #include "pipe/p_context.h"
 #include "util/u_inlines.h"
diff --git a/src/gallium/winsys/xlib/xlib_softpipe.c b/src/gallium/winsys/xlib/xlib_softpipe.c
index 87a1325..8ce1ea7 100644
--- a/src/gallium/winsys/xlib/xlib_softpipe.c
+++ b/src/gallium/winsys/xlib/xlib_softpipe.c
@@ -38,7 +38,7 @@
 #undef ASSERT
 #undef Elements
 
-#include "pipe/internal/p_winsys_screen.h"
+#include "util/u_simple_screen.h"
 #include "pipe/p_format.h"
 #include "pipe/p_context.h"
 #include "util/u_inlines.h"




More information about the mesa-commit mailing list