summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2009-02-01 18:48:16 -0500
committerZack Rusin <zackr@vmware.com>2009-02-01 18:48:16 -0500
commit1c90cdd878e9d10e1f6ac619d5d0c3f5151fcb2b (patch)
treef7463e67788d7b096668e2627118f39aec81ba81 /src/gallium/drivers
parent9aa73cfae84c7710df97ce182d32bea8d3423ab7 (diff)
parent64e525eab9e7c60ee18bc75e6f269783533d5edd (diff)
Merge branch 'gallium-winsys-private' into gallium-0.2
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_context.c2
-rw-r--r--src/gallium/drivers/cell/ppu/cell_draw_arrays.c4
-rw-r--r--src/gallium/drivers/cell/ppu/cell_screen.c4
-rw-r--r--src/gallium/drivers/cell/ppu/cell_state_shader.c8
-rw-r--r--src/gallium/drivers/cell/ppu/cell_texture.c14
-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/i915simple/i915_context.c2
-rw-r--r--src/gallium/drivers/i915simple/i915_debug.c2
-rw-r--r--src/gallium/drivers/i915simple/i915_debug.h2
-rw-r--r--src/gallium/drivers/i915simple/i915_debug_fp.c2
-rw-r--r--src/gallium/drivers/i915simple/i915_prim_vbuf.c2
-rw-r--r--src/gallium/drivers/i915simple/i915_screen.c4
-rw-r--r--src/gallium/drivers/i915simple/i915_state.c4
-rw-r--r--src/gallium/drivers/i915simple/i915_surface.c2
-rw-r--r--src/gallium/drivers/i915simple/i915_texture.c6
-rw-r--r--src/gallium/drivers/i965simple/brw_blit.c2
-rw-r--r--src/gallium/drivers/i965simple/brw_context.c2
-rw-r--r--src/gallium/drivers/i965simple/brw_curbe.c2
-rw-r--r--src/gallium/drivers/i965simple/brw_draw.c2
-rw-r--r--src/gallium/drivers/i965simple/brw_screen.c4
-rw-r--r--src/gallium/drivers/i965simple/brw_state.c2
-rw-r--r--src/gallium/drivers/i965simple/brw_state_pool.c2
-rw-r--r--src/gallium/drivers/i965simple/brw_surface.c2
-rw-r--r--src/gallium/drivers/i965simple/brw_tex_layout.c14
-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_screen.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_prim_vbuf.c2
-rw-r--r--src/gallium/drivers/nv10/nv10_screen.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_screen.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_miptree.c2
-rw-r--r--src/gallium/drivers/nv30/nv30_screen.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/nv40/nv40_draw.c2
-rw-r--r--src/gallium/drivers/nv40/nv40_screen.c2
-rw-r--r--src/gallium/drivers/nv40/nv40_surface.c2
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c2
-rw-r--r--src/gallium/drivers/nv50/nv50_query.c2
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.c3
-rw-r--r--src/gallium/drivers/nv50/nv50_surface.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c4
-rw-r--r--src/gallium/drivers/softpipe/sp_draw_arrays.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c4
-rw-r--r--src/gallium/drivers/softpipe/sp_state_fs.c6
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c12
-rw-r--r--src/gallium/drivers/trace/tr_winsys.h2
56 files changed, 97 insertions, 78 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index 8f502823f9..ae82ded334 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/p_winsys.h"
+#include "pipe/internal/p_winsys_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 880d535320..67949b73dd 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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_inlines.h"
#include "cell_context.h"
@@ -53,7 +53,7 @@ cell_map_constant_buffers(struct cell_context *sp)
for (i = 0; i < 2; i++) {
if (sp->constants[i].size) {
sp->mapped_constants[i] = ws->buffer_map(ws, sp->constants[i].buffer,
- PIPE_BUFFER_USAGE_CPU_READ);
+ PIPE_BUFFER_USAGE_CPU_READ);
cell_flush_buffer_range(sp, sp->mapped_constants[i],
sp->constants[i].buffer->size);
}
diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c
index 6fc2257e2a..512d85d352 100644
--- a/src/gallium/drivers/cell/ppu/cell_screen.c
+++ b/src/gallium/drivers/cell/ppu/cell_screen.c
@@ -27,7 +27,8 @@
#include "util/u_memory.h"
-#include "pipe/p_winsys.h"
+#include "util/u_simple_screen.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
@@ -169,6 +170,7 @@ cell_create_screen(struct pipe_winsys *winsys)
screen->is_format_supported = cell_is_format_supported;
cell_init_screen_texture_funcs(screen);
+ u_simple_screen_init(screen);
return screen;
}
diff --git a/src/gallium/drivers/cell/ppu/cell_state_shader.c b/src/gallium/drivers/cell/ppu/cell_state_shader.c
index cda39f8d59..990f23e170 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 "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"
@@ -194,9 +194,9 @@ cell_set_constant_buffer(struct pipe_context *pipe,
draw_flush(cell->draw);
/* note: reference counting */
- winsys_buffer_reference(ws,
- &cell->constants[shader].buffer,
- buf->buffer);
+ pipe_buffer_reference(pipe->screen,
+ &cell->constants[shader].buffer,
+ buf->buffer);
cell->constants[shader].size = buf->size;
if (shader == PIPE_SHADER_VERTEX)
diff --git a/src/gallium/drivers/cell/ppu/cell_texture.c b/src/gallium/drivers/cell/ppu/cell_texture.c
index 9f83ab8fa4..4f16e2c6af 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 "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"
@@ -113,7 +113,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_size);
+ ct->buffer_size);
if (!ct->buffer) {
FREE(ct);
@@ -154,7 +154,7 @@ cell_texture_release(struct pipe_screen *screen,
*/
if (ct->tiled_buffer[i]) {
ct->tiled_mapped[i] = NULL;
- winsys_buffer_reference(screen->winsys, &ct->tiled_buffer[i], NULL);
+ pipe_buffer_reference(screen, &ct->tiled_buffer[i], NULL);
}
}
@@ -325,11 +325,11 @@ cell_twiddle_texture(struct pipe_screen *screen,
struct pipe_winsys *ws = screen->winsys;
uint bytes = bufWidth * bufHeight * 4 * numFaces;
ct->tiled_buffer[level] = ws->buffer_create(ws, 16,
- PIPE_BUFFER_USAGE_PIXEL,
- bytes);
+ PIPE_BUFFER_USAGE_PIXEL,
+ bytes);
/* and map it */
ct->tiled_mapped[level] = ws->buffer_map(ws, ct->tiled_buffer[level],
- PIPE_BUFFER_USAGE_GPU_READ);
+ PIPE_BUFFER_USAGE_GPU_READ);
}
dst = (uint *) ((ubyte *) ct->tiled_mapped[level] + offset);
@@ -406,7 +406,7 @@ cell_get_tex_surface(struct pipe_screen *screen,
if (ps) {
assert(ps->refcount);
assert(ps->winsys);
- winsys_buffer_reference(ws, &ps->buffer, ct->buffer);
+ pipe_buffer_reference(screen, &ps->buffer, ct->buffer);
ps->format = pt->format;
ps->block = pt->block;
ps->width = pt->width[level];
diff --git a/src/gallium/drivers/cell/ppu/cell_vertex_shader.c b/src/gallium/drivers/cell/ppu/cell_vertex_shader.c
index 2b10c116fa..403cf6d50f 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/p_winsys.h"
+#include "pipe/internal/p_winsys_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 10c4ffc209..0742b27b8f 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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "util/u_memory.h"
#include "pipe/p_context.h"
diff --git a/src/gallium/drivers/i915simple/i915_context.c b/src/gallium/drivers/i915simple/i915_context.c
index 6dd3eda85d..3e3a596884 100644
--- a/src/gallium/drivers/i915simple/i915_context.c
+++ b/src/gallium/drivers/i915simple/i915_context.c
@@ -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"
diff --git a/src/gallium/drivers/i915simple/i915_debug.c b/src/gallium/drivers/i915simple/i915_debug.c
index 4adf9decae..a300b61c3b 100644
--- a/src/gallium/drivers/i915simple/i915_debug.c
+++ b/src/gallium/drivers/i915simple/i915_debug.c
@@ -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"
diff --git a/src/gallium/drivers/i915simple/i915_debug.h b/src/gallium/drivers/i915simple/i915_debug.h
index c33ee36110..16ca7277c7 100644
--- a/src/gallium/drivers/i915simple/i915_debug.h
+++ b/src/gallium/drivers/i915simple/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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
static INLINE void
I915_DBG(
diff --git a/src/gallium/drivers/i915simple/i915_debug_fp.c b/src/gallium/drivers/i915simple/i915_debug_fp.c
index 48be3e1472..9c5b117b6d 100644
--- a/src/gallium/drivers/i915simple/i915_debug_fp.c
+++ b/src/gallium/drivers/i915simple/i915_debug_fp.c
@@ -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"
diff --git a/src/gallium/drivers/i915simple/i915_prim_vbuf.c b/src/gallium/drivers/i915simple/i915_prim_vbuf.c
index a8e97e7c30..f49f6d6ed1 100644
--- a/src/gallium/drivers/i915simple/i915_prim_vbuf.c
+++ b/src/gallium/drivers/i915simple/i915_prim_vbuf.c
@@ -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"
diff --git a/src/gallium/drivers/i915simple/i915_screen.c b/src/gallium/drivers/i915simple/i915_screen.c
index 1c976082df..5bb127f3d5 100644
--- a/src/gallium/drivers/i915simple/i915_screen.c
+++ b/src/gallium/drivers/i915simple/i915_screen.c
@@ -27,7 +27,8 @@
#include "util/u_memory.h"
-#include "pipe/p_winsys.h"
+#include "util/u_simple_screen.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_inlines.h"
#include "util/u_string.h"
@@ -279,6 +280,7 @@ i915_create_screen(struct pipe_winsys *winsys, uint pci_id)
i915screen->screen.surface_unmap = i915_surface_unmap;
i915_init_screen_texture_functions(&i915screen->screen);
+ u_simple_screen_init(&i915screen->screen);
return &i915screen->screen;
}
diff --git a/src/gallium/drivers/i915simple/i915_state.c b/src/gallium/drivers/i915simple/i915_state.c
index 19f194c027..273e74002a 100644
--- a/src/gallium/drivers/i915simple/i915_state.c
+++ b/src/gallium/drivers/i915simple/i915_state.c
@@ -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"
@@ -537,7 +537,7 @@ static void i915_set_constant_buffer(struct pipe_context *pipe,
void *mapped;
if (buf->buffer && buf->buffer->size &&
(mapped = ws->buffer_map(ws, buf->buffer,
- PIPE_BUFFER_USAGE_CPU_READ))) {
+ PIPE_BUFFER_USAGE_CPU_READ))) {
memcpy(i915->current.constants[shader], mapped, buf->buffer->size);
ws->buffer_unmap(ws, buf->buffer);
i915->current.num_user_constants[shader]
diff --git a/src/gallium/drivers/i915simple/i915_surface.c b/src/gallium/drivers/i915simple/i915_surface.c
index 3b3d9217a0..5ffdb76682 100644
--- a/src/gallium/drivers/i915simple/i915_surface.c
+++ b/src/gallium/drivers/i915simple/i915_surface.c
@@ -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"
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index 4acc4b0214..803ef3a187 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -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"
@@ -606,8 +606,8 @@ i915_texture_create(struct pipe_screen *screen,
tex_size = tex->stride * tex->total_nblocksy;
tex->buffer = ws->buffer_create(ws, 64,
- PIPE_BUFFER_USAGE_PIXEL,
- tex_size);
+ PIPE_BUFFER_USAGE_PIXEL,
+ tex_size);
if (!tex->buffer)
goto fail;
diff --git a/src/gallium/drivers/i965simple/brw_blit.c b/src/gallium/drivers/i965simple/brw_blit.c
index 8494f70493..4d11f8d2ab 100644
--- a/src/gallium/drivers/i965simple/brw_blit.c
+++ b/src/gallium/drivers/i965simple/brw_blit.c
@@ -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
diff --git a/src/gallium/drivers/i965simple/brw_context.c b/src/gallium/drivers/i965simple/brw_context.c
index 96920df008..c74cbf8d73 100644
--- a/src/gallium/drivers/i965simple/brw_context.c
+++ b/src/gallium/drivers/i965simple/brw_context.c
@@ -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"
diff --git a/src/gallium/drivers/i965simple/brw_curbe.c b/src/gallium/drivers/i965simple/brw_curbe.c
index 5e1cce7530..904cde8e30 100644
--- a/src/gallium/drivers/i965simple/brw_curbe.c
+++ b/src/gallium/drivers/i965simple/brw_curbe.c
@@ -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"
diff --git a/src/gallium/drivers/i965simple/brw_draw.c b/src/gallium/drivers/i965simple/brw_draw.c
index 7598e3dc8a..648aaa0da5 100644
--- a/src/gallium/drivers/i965simple/brw_draw.c
+++ b/src/gallium/drivers/i965simple/brw_draw.c
@@ -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,
diff --git a/src/gallium/drivers/i965simple/brw_screen.c b/src/gallium/drivers/i965simple/brw_screen.c
index ab7cd624b2..b22e105f10 100644
--- a/src/gallium/drivers/i965simple/brw_screen.c
+++ b/src/gallium/drivers/i965simple/brw_screen.c
@@ -27,8 +27,9 @@
#include "util/u_memory.h"
-#include "pipe/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "util/u_string.h"
+#include "util/u_simple_screen.h"
#include "brw_context.h"
#include "brw_screen.h"
@@ -239,6 +240,7 @@ brw_create_screen(struct pipe_winsys *winsys, uint pci_id)
brwscreen->screen.is_format_supported = brw_is_format_supported;
brw_init_screen_texture_funcs(&brwscreen->screen);
+ u_simple_screen_init(&brwscreen->screen);
return &brwscreen->screen;
}
diff --git a/src/gallium/drivers/i965simple/brw_state.c b/src/gallium/drivers/i965simple/brw_state.c
index af46cb546f..b47f5373f3 100644
--- a/src/gallium/drivers/i965simple/brw_state.c
+++ b/src/gallium/drivers/i965simple/brw_state.c
@@ -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"
diff --git a/src/gallium/drivers/i965simple/brw_state_pool.c b/src/gallium/drivers/i965simple/brw_state_pool.c
index 007dc8f9de..e91263cb1f 100644
--- a/src/gallium/drivers/i965simple/brw_state_pool.c
+++ b/src/gallium/drivers/i965simple/brw_state_pool.c
@@ -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"
diff --git a/src/gallium/drivers/i965simple/brw_surface.c b/src/gallium/drivers/i965simple/brw_surface.c
index b89756c47b..3159eba2fd 100644
--- a/src/gallium/drivers/i965simple/brw_surface.c
+++ b/src/gallium/drivers/i965simple/brw_surface.c
@@ -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"
diff --git a/src/gallium/drivers/i965simple/brw_tex_layout.c b/src/gallium/drivers/i965simple/brw_tex_layout.c
index 12e2e02cfd..6af0d5cf4b 100644
--- a/src/gallium/drivers/i965simple/brw_tex_layout.c
+++ b/src/gallium/drivers/i965simple/brw_tex_layout.c
@@ -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"
@@ -296,9 +296,9 @@ brw_texture_create_screen(struct pipe_screen *screen,
if (brw_miptree_layout(tex))
tex->buffer = ws->buffer_create(ws, 64,
- PIPE_BUFFER_USAGE_PIXEL,
- tex->stride *
- tex->total_nblocksy);
+ PIPE_BUFFER_USAGE_PIXEL,
+ tex->stride *
+ tex->total_nblocksy);
if (!tex->buffer) {
FREE(tex);
@@ -322,7 +322,6 @@ brw_texture_release_screen(struct pipe_screen *screen,
__FUNCTION__, (void *) *pt, (*pt)->refcount - 1);
*/
if (--(*pt)->refcount <= 0) {
- struct pipe_winsys *ws = screen->winsys;
struct brw_texture *tex = (struct brw_texture *)*pt;
uint i;
@@ -330,7 +329,7 @@ brw_texture_release_screen(struct pipe_screen *screen,
DBG("%s deleting %p\n", __FUNCTION__, (void *) tex);
*/
- winsys_buffer_reference(ws, &tex->buffer, NULL);
+ pipe_buffer_reference(screen, &tex->buffer, NULL);
for (i = 0; i < PIPE_MAX_TEXTURE_LEVELS; i++)
if (tex->image_offset[i])
@@ -347,7 +346,6 @@ brw_get_tex_surface_screen(struct pipe_screen *screen,
struct pipe_texture *pt,
unsigned face, unsigned level, unsigned zslice)
{
- struct pipe_winsys *ws = screen->winsys;
struct brw_texture *tex = (struct brw_texture *)pt;
struct pipe_surface *ps;
unsigned offset; /* in bytes */
@@ -369,7 +367,7 @@ brw_get_tex_surface_screen(struct pipe_screen *screen,
if (ps) {
ps->refcount = 1;
pipe_texture_reference(&ps->texture, pt);
- winsys_buffer_reference(ws, &ps->buffer, tex->buffer);
+ pipe_buffer_reference(screen, &ps->buffer, tex->buffer);
ps->format = pt->format;
ps->width = pt->width[level];
ps->height = pt->height[level];
diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index 5535ebb6a9..25e0b05be1 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/p_winsys.h"
+#include "pipe/internal/p_winsys_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 9f75253363..a14273e288 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/p_winsys.h"
+#include "pipe/internal/p_winsys_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 19979fff79..18a8872ae3 100644
--- a/src/gallium/drivers/nv04/nv04_prim_vbuf.c
+++ b/src/gallium/drivers/nv04/nv04_prim_vbuf.c
@@ -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"
diff --git a/src/gallium/drivers/nv04/nv04_screen.c b/src/gallium/drivers/nv04/nv04_screen.c
index 65eacde6b2..9ce3176aa1 100644
--- a/src/gallium/drivers/nv04/nv04_screen.c
+++ b/src/gallium/drivers/nv04/nv04_screen.c
@@ -1,4 +1,5 @@
#include "pipe/p_screen.h"
+#include "util/u_simple_screen.h"
#include "nv04_context.h"
#include "nv04_screen.h"
@@ -208,6 +209,7 @@ nv04_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
screen->pipe.surface_unmap = nv04_surface_unmap;
nv04_screen_init_miptree_functions(&screen->pipe);
+ u_simple_screen_init(&screen->pipe);
return &screen->pipe;
}
diff --git a/src/gallium/drivers/nv04/nv04_surface.c b/src/gallium/drivers/nv04/nv04_surface.c
index 9d9943ed4e..0d0983f9d4 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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_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 4eb4ed9185..ef2c0c5d9f 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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "nv10_context.h"
#include "nv10_screen.h"
diff --git a/src/gallium/drivers/nv10/nv10_prim_vbuf.c b/src/gallium/drivers/nv10/nv10_prim_vbuf.c
index e7e81d3dff..7435d87315 100644
--- a/src/gallium/drivers/nv10/nv10_prim_vbuf.c
+++ b/src/gallium/drivers/nv10/nv10_prim_vbuf.c
@@ -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"
diff --git a/src/gallium/drivers/nv10/nv10_screen.c b/src/gallium/drivers/nv10/nv10_screen.c
index 4d9fbd4b5f..12516fd71e 100644
--- a/src/gallium/drivers/nv10/nv10_screen.c
+++ b/src/gallium/drivers/nv10/nv10_screen.c
@@ -1,4 +1,5 @@
#include "pipe/p_screen.h"
+#include "util/u_simple_screen.h"
#include "nv10_context.h"
#include "nv10_screen.h"
@@ -204,6 +205,7 @@ nv10_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
screen->pipe.surface_unmap = nv10_surface_unmap;
nv10_screen_init_miptree_functions(&screen->pipe);
+ u_simple_screen_init(&screen->pipe);
return &screen->pipe;
}
diff --git a/src/gallium/drivers/nv10/nv10_surface.c b/src/gallium/drivers/nv10/nv10_surface.c
index be44c7bed5..78fd7b42da 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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_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 e620166ff5..1659aec8fa 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/p_winsys.h"
+#include "pipe/internal/p_winsys_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 74540845a8..4dd7052814 100644
--- a/src/gallium/drivers/nv20/nv20_prim_vbuf.c
+++ b/src/gallium/drivers/nv20/nv20_prim_vbuf.c
@@ -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"
diff --git a/src/gallium/drivers/nv20/nv20_screen.c b/src/gallium/drivers/nv20/nv20_screen.c
index 2ca6e6b149..f09b364b8d 100644
--- a/src/gallium/drivers/nv20/nv20_screen.c
+++ b/src/gallium/drivers/nv20/nv20_screen.c
@@ -1,4 +1,5 @@
#include "pipe/p_screen.h"
+#include "util/u_simple_screen.h"
#include "nv20_context.h"
#include "nv20_screen.h"
@@ -200,6 +201,7 @@ nv20_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
screen->pipe.surface_unmap = nv20_surface_unmap;
nv20_screen_init_miptree_functions(&screen->pipe);
+ u_simple_screen_init(&screen->pipe);
return &screen->pipe;
}
diff --git a/src/gallium/drivers/nv20/nv20_surface.c b/src/gallium/drivers/nv20/nv20_surface.c
index 7bc68d0ca2..9b4c028eae 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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_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 2bff28aca9..61654f8756 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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "nv30_context.h"
#include "nv30_screen.h"
diff --git a/src/gallium/drivers/nv30/nv30_miptree.c b/src/gallium/drivers/nv30/nv30_miptree.c
index 54fb3585f8..79baac714c 100644
--- a/src/gallium/drivers/nv30/nv30_miptree.c
+++ b/src/gallium/drivers/nv30/nv30_miptree.c
@@ -181,7 +181,7 @@ nv30_miptree_surface_del(struct pipe_screen *pscreen,
return;
pipe_texture_reference(&ps->texture, NULL);
- pipe_buffer_reference(pscreen->winsys, &ps->buffer, NULL);
+ pipe_buffer_reference(pscreen, &ps->buffer, NULL);
FREE(ps);
}
diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c
index 1fac6d3df8..0f10d914ad 100644
--- a/src/gallium/drivers/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nv30/nv30_screen.c
@@ -1,4 +1,5 @@
#include "pipe/p_screen.h"
+#include "util/u_simple_screen.h"
#include "nv30_context.h"
#include "nv30_screen.h"
@@ -381,6 +382,7 @@ nv30_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
screen->pipe.surface_unmap = nv30_surface_unmap;
nv30_screen_init_miptree_functions(&screen->pipe);
+ u_simple_screen_init(&screen->pipe);
return &screen->pipe;
}
diff --git a/src/gallium/drivers/nv30/nv30_surface.c b/src/gallium/drivers/nv30/nv30_surface.c
index d3376a73bf..806131dcc9 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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_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 cc63dd734b..5d325f5067 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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "nv40_context.h"
#include "nv40_screen.h"
diff --git a/src/gallium/drivers/nv40/nv40_draw.c b/src/gallium/drivers/nv40/nv40_draw.c
index 8e56cdc2fe..c83ff91d7e 100644
--- a/src/gallium/drivers/nv40/nv40_draw.c
+++ b/src/gallium/drivers/nv40/nv40_draw.c
@@ -242,7 +242,7 @@ nv40_draw_elements_swtnl(struct pipe_context *pipe,
for (i = 0; i < nv40->vtxbuf_nr; i++) {
map = ws->buffer_map(ws, nv40->vtxbuf[i].buffer,
- PIPE_BUFFER_USAGE_CPU_READ);
+ PIPE_BUFFER_USAGE_CPU_READ);
draw_set_mapped_vertex_buffer(nv40->draw, i, map);
}
diff --git a/src/gallium/drivers/nv40/nv40_screen.c b/src/gallium/drivers/nv40/nv40_screen.c
index ab128fecda..46fe133d71 100644
--- a/src/gallium/drivers/nv40/nv40_screen.c
+++ b/src/gallium/drivers/nv40/nv40_screen.c
@@ -1,4 +1,5 @@
#include "pipe/p_screen.h"
+#include "util/u_simple_screen.h"
#include "nv40_context.h"
#include "nv40_screen.h"
@@ -363,6 +364,7 @@ nv40_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
screen->pipe.surface_unmap = nv40_surface_unmap;
nv40_screen_init_miptree_functions(&screen->pipe);
+ u_simple_screen_init(&screen->pipe);
return &screen->pipe;
}
diff --git a/src/gallium/drivers/nv40/nv40_surface.c b/src/gallium/drivers/nv40/nv40_surface.c
index 576af7c59e..aa51d04051 100644
--- a/src/gallium/drivers/nv40/nv40_surface.c
+++ b/src/gallium/drivers/nv40/nv40_surface.c
@@ -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"
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index b02c53f209..99776239d2 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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "nv50_context.h"
#include "nv50_screen.h"
diff --git a/src/gallium/drivers/nv50/nv50_query.c b/src/gallium/drivers/nv50/nv50_query.c
index b923c820eb..1b3a41340a 100644
--- a/src/gallium/drivers/nv50/nv50_query.c
+++ b/src/gallium/drivers/nv50/nv50_query.c
@@ -62,7 +62,7 @@ nv50_query_destroy(struct pipe_context *pipe, struct pipe_query *pq)
struct nv50_query *q = nv50_query(pq);
if (q) {
- pipe_buffer_reference(pipe, &q->buffer, NULL);
+ pipe_buffer_reference(pipe->screen, &q->buffer, NULL);
FREE(q);
}
}
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index ef46233f83..6cddddacd5 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -22,6 +22,8 @@
#include "pipe/p_screen.h"
+#include "util/u_simple_screen.h"
+
#include "nv50_context.h"
#include "nv50_screen.h"
@@ -323,6 +325,7 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
nv50_screen_init_miptree_functions(&screen->pipe);
nv50_surface_init_screen_functions(&screen->pipe);
+ u_simple_screen_init(&screen->pipe);
return &screen->pipe;
}
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
index 3f45a2fe18..ed6602ba36 100644
--- a/src/gallium/drivers/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nv50/nv50_surface.c
@@ -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"
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index d8a5631488..c2d882a819 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -87,7 +87,7 @@ softpipe_unmap_surfaces(struct softpipe_context *sp)
static void softpipe_destroy( struct pipe_context *pipe )
{
struct softpipe_context *softpipe = softpipe_context( pipe );
- struct pipe_winsys *ws = pipe->winsys;
+ struct pipe_screen *screen = pipe->screen;
uint i;
if (softpipe->draw)
@@ -116,7 +116,7 @@ static void softpipe_destroy( struct pipe_context *pipe )
for (i = 0; i < Elements(softpipe->constants); i++) {
if (softpipe->constants[i].buffer) {
- winsys_buffer_reference(ws, &softpipe->constants[i].buffer, NULL);
+ pipe_buffer_reference(screen, &softpipe->constants[i].buffer, NULL);
}
}
diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c
index ed3e8f95ae..ecc9d00319 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/p_winsys.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_inlines.h"
#include "sp_context.h"
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 11b08b3a82..7380a6ae2b 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -27,7 +27,8 @@
#include "util/u_memory.h"
-#include "pipe/p_winsys.h"
+#include "util/u_simple_screen.h"
+#include "pipe/internal/p_winsys_screen.h"
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
@@ -174,6 +175,7 @@ softpipe_create_screen(struct pipe_winsys *winsys)
screen->base.is_format_supported = softpipe_is_format_supported;
softpipe_init_screen_texture_funcs(&screen->base);
+ u_simple_screen_init(&screen->base);
return &screen->base;
}
diff --git a/src/gallium/drivers/softpipe/sp_state_fs.c b/src/gallium/drivers/softpipe/sp_state_fs.c
index 15815160ed..4d01a9dbe1 100644
--- a/src/gallium/drivers/softpipe/sp_state_fs.c
+++ b/src/gallium/drivers/softpipe/sp_state_fs.c
@@ -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"
@@ -146,13 +146,13 @@ softpipe_set_constant_buffer(struct pipe_context *pipe,
const struct pipe_constant_buffer *buf)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
- struct pipe_winsys *ws = pipe->winsys;
+ struct pipe_screen *screen = pipe->screen;
assert(shader < PIPE_SHADER_TYPES);
assert(index == 0);
/* note: reference counting */
- winsys_buffer_reference(ws,
+ pipe_buffer_reference(screen,
&softpipe->constants[shader].buffer,
buf ? buf->buffer : NULL);
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index faf9e871f9..5952378152 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -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"
@@ -106,11 +106,11 @@ softpipe_displaytarget_layout(struct pipe_screen *screen,
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->base.width[0],
+ spt->base.height[0],
+ spt->base.format,
+ usage,
+ &spt->stride[0]);
return spt->buffer != NULL;
}
diff --git a/src/gallium/drivers/trace/tr_winsys.h b/src/gallium/drivers/trace/tr_winsys.h
index 062ddf66a0..0fd2a40556 100644
--- a/src/gallium/drivers/trace/tr_winsys.h
+++ b/src/gallium/drivers/trace/tr_winsys.h
@@ -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"
/**