summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Zhu <[email protected]>2019-03-06 12:29:09 -0500
committerLeo Liu <[email protected]>2019-03-15 11:53:15 -0400
commita8ee07d83e7e0e6e8ae2b45bdeefd5c38a328c25 (patch)
tree85252c2814e7009f7807531995eb96fa44992607 /src
parent998dca4dbb2b2866c2bc7e42e757af48717ed854 (diff)
gallium/auxiliary/vl: Change grid setting
Using draw area for grid setting instead of destination buffer size. Signed-off-by: James Zhu <[email protected]> Acked-by: Leo Liu <[email protected]> Tested-by: Bruno Milreu <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor_cs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor_cs.c b/src/gallium/auxiliary/vl/vl_compositor_cs.c
index 70898be4bd6..de0a3c7177a 100644
--- a/src/gallium/auxiliary/vl/vl_compositor_cs.c
+++ b/src/gallium/auxiliary/vl/vl_compositor_cs.c
@@ -221,7 +221,8 @@ const char *compute_shader_rgba =
static void
cs_launch(struct vl_compositor *c,
- void *cs)
+ void *cs,
+ const struct u_rect *draw_area)
{
struct pipe_context *ctx = c->pipe;
@@ -241,8 +242,8 @@ cs_launch(struct vl_compositor *c,
info.block[0] = 8;
info.block[1] = 8;
info.block[2] = 1;
- info.grid[0] = DIV_ROUND_UP(c->fb_state.width, info.block[0]);
- info.grid[1] = DIV_ROUND_UP(c->fb_state.height, info.block[1]);
+ info.grid[0] = DIV_ROUND_UP(draw_area->x1, info.block[0]);
+ info.grid[1] = DIV_ROUND_UP(draw_area->y1, info.block[1]);
info.grid[2] = 1;
ctx->launch_grid(ctx, &info);
@@ -346,7 +347,7 @@ draw_layers(struct vl_compositor *c,
c->pipe->set_sampler_views(c->pipe, PIPE_SHADER_COMPUTE, 0,
num_sampler_views, samplers);
- cs_launch(c, layer->cs);
+ cs_launch(c, layer->cs, &(drawn.area));
if (dirty) {
struct u_rect drawn = calc_drawn_area(s, layer);