summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gallium/auxiliary/util/u_simple_screen.c2
-rw-r--r--src/gallium/auxiliary/util/u_simple_screen.h139
-rw-r--r--src/gallium/auxiliary/util/u_timed_winsys.c2
-rw-r--r--src/gallium/drivers/cell/ppu/cell_context.c2
-rw-r--r--src/gallium/drivers/cell/ppu/cell_draw_arrays.c2
-rw-r--r--src/gallium/drivers/cell/ppu/cell_screen.c2
-rw-r--r--src/gallium/drivers/cell/ppu/cell_state_shader.c2
-rw-r--r--src/gallium/drivers/cell/ppu/cell_texture.c2
-rw-r--r--src/gallium/drivers/cell/ppu/cell_vertex_shader.c2
-rw-r--r--src/gallium/drivers/failover/fo_context.c2
-rw-r--r--src/gallium/drivers/i915/i915_debug.h2
-rw-r--r--src/gallium/drivers/i915/i915_debug_fp.c2
-rw-r--r--src/gallium/drivers/nouveau/nouveau_winsys.h2
-rw-r--r--src/gallium/drivers/nv04/nv04_context.c2
-rw-r--r--src/gallium/drivers/nv04/nv04_prim_vbuf.c2
-rw-r--r--src/gallium/drivers/nv04/nv04_surface.c2
-rw-r--r--src/gallium/drivers/nv10/nv10_context.c2
-rw-r--r--src/gallium/drivers/nv10/nv10_surface.c2
-rw-r--r--src/gallium/drivers/nv20/nv20_context.c2
-rw-r--r--src/gallium/drivers/nv20/nv20_prim_vbuf.c2
-rw-r--r--src/gallium/drivers/nv20/nv20_surface.c2
-rw-r--r--src/gallium/drivers/nv30/nv30_context.c2
-rw-r--r--src/gallium/drivers/nv30/nv30_surface.c2
-rw-r--r--src/gallium/drivers/nv40/nv40_context.c2
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c2
-rw-r--r--src/gallium/drivers/nv50/nv50_surface.c2
-rw-r--r--src/gallium/drivers/r300/r300_winsys.h2
-rw-r--r--src/gallium/drivers/softpipe/sp_draw_arrays.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_winsys.c2
-rw-r--r--src/gallium/include/pipe/internal/p_winsys_screen.h190
-rw-r--r--src/gallium/state_trackers/egl/x11/native_ximage.c2
-rw-r--r--src/gallium/state_trackers/egl/x11/sw_winsys.c2
-rw-r--r--src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.h2
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_buffer.h2
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_winsys.h2
-rw-r--r--src/gallium/winsys/g3dvl/xlib/xsp_winsys.c2
-rw-r--r--src/gallium/winsys/gdi/gdi_softpipe_winsys.c2
-rw-r--r--src/gallium/winsys/xlib/xlib_brw_context.c2
-rw-r--r--src/gallium/winsys/xlib/xlib_cell.c2
-rw-r--r--src/gallium/winsys/xlib/xlib_llvmpipe.c2
-rw-r--r--src/gallium/winsys/xlib/xlib_softpipe.c2
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 5238299015..53f3c16dbc 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 6612a8a7c0..bb3f5ba102 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 178acdca4d..59bdcd2c45 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 ebb7a7acc4..30aa04482e 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 8b939454eb..bffd0fac6f 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 37b04396b3..c329c6682d 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 c5adc6a897..9b2f86fdfb 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 15bc1eec32..fad290dfa0 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 403cf6d50f..cf8cd41159 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 46e4338d98..2ccc5d3e60 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 dd9b86e17b..8f7484797d 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 f1ffd27908..066e7392d1 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 4c3e08a43f..d81c5be51f 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 edd96859cf..e91ffe0f5d 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 dc0c1d04b7..03438c7fcb 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 92840910e6..c5f8927c05 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 900a640ab7..a3ceb1da94 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 acf898917c..6db0164dbe 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 22185a2f6e..f0c0d8a4b3 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 84faa87095..581276ba22 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 7beb0f0c83..5deb8cc6f1 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 54572e9ab3..8a40cea2e5 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 b72a63ee76..b48c5ab51a 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 f79ae4db84..ffe25ffebd 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 5c705ccc8f..ac1abc1d5c 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 38a9dfdde7..ac0c1d0270 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 bdb8b54bab..d4842e94ae 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 f7e736df84..b2acc36bf7 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 714a1cf534..ee6969e60f 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 e515d1d838..f6598927d3 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 a1542dada7..0000000000
--- 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 dfa8df2223..697fd7c413 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 6cf8e5c6c9..33328aadf2 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 e61e0e0957..a32f2907b3 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 9379021911..f1c8fc2a3b 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 864082b99b..4901080ca7 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 6a7e8c9b59..048af62ed3 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 4db9776280..36bf867f19 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 5558654d7b..22bf41a46f 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 8dc18efbf3..9520bac69d 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 cdf92d8b5e..503addb55c 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 87a1325ca4..8ce1ea7936 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"