summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2013-11-28 11:08:11 +1000
committerDave Airlie <[email protected]>2013-12-13 14:37:01 +1000
commitba00f2f6f54cbc5ffdb0f0b94bcd672d147cdc36 (patch)
tree93cec2b58156f3fb87cbc425a7680253bb1fe82f /src/gallium/drivers
parent40070e72d4f27797d03986a68b1540339eb2b496 (diff)
swrast* (gallium, classic): add MESA_copy_sub_buffer support (v3)
This patches add MESA_copy_sub_buffer support to the dri sw loader and then to gallium state tracker, llvmpipe, softpipe and other bits. It reuses the dri1 driver extension interface, and it updates the swrast loader interface for a new putimage which can take a stride. I've tested this with gnome-shell with a cogl hacked to reenable sub copies for llvmpipe and the one piglit test. I could probably split this patch up as well. v2: pass a pipe_box, to reduce the entrypoints, as per Jose's review, add to p_screen doc comments. v3: finish off winsys interfaces, add swrast classic support as well. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Dave Airlie <[email protected]> swrast: add support for copy_sub_buffer
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/galahad/glhd_screen.c5
-rw-r--r--src/gallium/drivers/i915/i915_screen.c4
-rw-r--r--src/gallium/drivers/identity/id_screen.c5
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c6
-rw-r--r--src/gallium/drivers/noop/noop_pipe.c2
-rw-r--r--src/gallium/drivers/rbug/rbug_screen.c4
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c5
-rw-r--r--src/gallium/drivers/trace/tr_screen.c5
8 files changed, 21 insertions, 15 deletions
diff --git a/src/gallium/drivers/galahad/glhd_screen.c b/src/gallium/drivers/galahad/glhd_screen.c
index 16a5ff1ceae..5a910779948 100644
--- a/src/gallium/drivers/galahad/glhd_screen.c
+++ b/src/gallium/drivers/galahad/glhd_screen.c
@@ -275,7 +275,8 @@ static void
galahad_screen_flush_frontbuffer(struct pipe_screen *_screen,
struct pipe_resource *_resource,
unsigned level, unsigned layer,
- void *context_private)
+ void *context_private,
+ struct pipe_box *sub_box)
{
struct galahad_screen *glhd_screen = galahad_screen(_screen);
struct galahad_resource *glhd_resource = galahad_resource(_resource);
@@ -285,7 +286,7 @@ galahad_screen_flush_frontbuffer(struct pipe_screen *_screen,
screen->flush_frontbuffer(screen,
resource,
level, layer,
- context_private);
+ context_private, sub_box);
}
static void
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index abb97966c66..8b29fc2e57d 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -423,7 +423,8 @@ static void
i915_flush_frontbuffer(struct pipe_screen *screen,
struct pipe_resource *resource,
unsigned level, unsigned layer,
- void *winsys_drawable_handle)
+ void *winsys_drawable_handle,
+ struct pipe_box *sub_box)
{
/* XXX: Dummy right now. */
(void)screen;
@@ -431,6 +432,7 @@ i915_flush_frontbuffer(struct pipe_screen *screen,
(void)level;
(void)layer;
(void)winsys_drawable_handle;
+ (void)sub_box;
}
static void
diff --git a/src/gallium/drivers/identity/id_screen.c b/src/gallium/drivers/identity/id_screen.c
index 26df7f6f7ce..28cfa1f62b1 100644
--- a/src/gallium/drivers/identity/id_screen.c
+++ b/src/gallium/drivers/identity/id_screen.c
@@ -192,7 +192,8 @@ static void
identity_screen_flush_frontbuffer(struct pipe_screen *_screen,
struct pipe_resource *_resource,
unsigned level, unsigned layer,
- void *context_private)
+ void *context_private,
+ struct pipe_box *sub_box)
{
struct identity_screen *id_screen = identity_screen(_screen);
struct identity_resource *id_resource = identity_resource(_resource);
@@ -202,7 +203,7 @@ identity_screen_flush_frontbuffer(struct pipe_screen *_screen,
screen->flush_frontbuffer(screen,
resource,
level, layer,
- context_private);
+ context_private, sub_box);
}
static void
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 742e7f296ce..c8eb3babde5 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -411,7 +411,8 @@ static void
llvmpipe_flush_frontbuffer(struct pipe_screen *_screen,
struct pipe_resource *resource,
unsigned level, unsigned layer,
- void *context_private)
+ void *context_private,
+ struct pipe_box *sub_box)
{
struct llvmpipe_screen *screen = llvmpipe_screen(_screen);
struct sw_winsys *winsys = screen->winsys;
@@ -419,10 +420,9 @@ llvmpipe_flush_frontbuffer(struct pipe_screen *_screen,
assert(texture->dt);
if (texture->dt)
- winsys->displaytarget_display(winsys, texture->dt, context_private);
+ winsys->displaytarget_display(winsys, texture->dt, context_private, sub_box);
}
-
static void
llvmpipe_destroy_screen( struct pipe_screen *_screen )
{
diff --git a/src/gallium/drivers/noop/noop_pipe.c b/src/gallium/drivers/noop/noop_pipe.c
index 889e95ee76f..27197a50454 100644
--- a/src/gallium/drivers/noop/noop_pipe.c
+++ b/src/gallium/drivers/noop/noop_pipe.c
@@ -296,7 +296,7 @@ static struct pipe_context *noop_create_context(struct pipe_screen *screen, void
static void noop_flush_frontbuffer(struct pipe_screen *_screen,
struct pipe_resource *resource,
unsigned level, unsigned layer,
- void *context_private)
+ void *context_private, struct pipe_box *box)
{
}
diff --git a/src/gallium/drivers/rbug/rbug_screen.c b/src/gallium/drivers/rbug/rbug_screen.c
index 2471fdb4661..8576e2f0897 100644
--- a/src/gallium/drivers/rbug/rbug_screen.c
+++ b/src/gallium/drivers/rbug/rbug_screen.c
@@ -190,7 +190,7 @@ static void
rbug_screen_flush_frontbuffer(struct pipe_screen *_screen,
struct pipe_resource *_resource,
unsigned level, unsigned layer,
- void *context_private)
+ void *context_private, struct pipe_box *sub_box)
{
struct rbug_screen *rb_screen = rbug_screen(_screen);
struct rbug_resource *rb_resource = rbug_resource(_resource);
@@ -200,7 +200,7 @@ rbug_screen_flush_frontbuffer(struct pipe_screen *_screen,
screen->flush_frontbuffer(screen,
resource,
level, layer,
- context_private);
+ context_private, sub_box);
}
static void
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 0c8c94d0e19..69cb09fd84d 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -369,7 +369,8 @@ static void
softpipe_flush_frontbuffer(struct pipe_screen *_screen,
struct pipe_resource *resource,
unsigned level, unsigned layer,
- void *context_private)
+ void *context_private,
+ struct pipe_box *sub_box)
{
struct softpipe_screen *screen = softpipe_screen(_screen);
struct sw_winsys *winsys = screen->winsys;
@@ -377,7 +378,7 @@ softpipe_flush_frontbuffer(struct pipe_screen *_screen,
assert(texture->dt);
if (texture->dt)
- winsys->displaytarget_display(winsys, texture->dt, context_private);
+ winsys->displaytarget_display(winsys, texture->dt, context_private, sub_box);
}
static uint64_t
diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c
index c6745af09f2..debd031084f 100644
--- a/src/gallium/drivers/trace/tr_screen.c
+++ b/src/gallium/drivers/trace/tr_screen.c
@@ -209,7 +209,8 @@ static void
trace_screen_flush_frontbuffer(struct pipe_screen *_screen,
struct pipe_resource *_resource,
unsigned level, unsigned layer,
- void *context_private)
+ void *context_private,
+ struct pipe_box *sub_box)
{
struct trace_screen *tr_scr = trace_screen(_screen);
struct trace_resource *tr_res = trace_resource(_resource);
@@ -226,7 +227,7 @@ trace_screen_flush_frontbuffer(struct pipe_screen *_screen,
trace_dump_arg(ptr, context_private);
*/
- screen->flush_frontbuffer(screen, resource, level, layer, context_private);
+ screen->flush_frontbuffer(screen, resource, level, layer, context_private, sub_box);
trace_dump_call_end();
}