diff options
author | James Zhu <[email protected]> | 2019-03-06 12:01:07 -0500 |
---|---|---|
committer | Leo Liu <[email protected]> | 2019-03-15 11:53:15 -0400 |
commit | 998dca4dbb2b2866c2bc7e42e757af48717ed854 (patch) | |
tree | cab24ab83acf2fc28470791bbaf1c2bcc0487e33 | |
parent | b276e8358a726aaf010d277d361d5936450cd090 (diff) |
gallium/auxiliary/vl: Increase shader_params size
Increase shader_params size to pass sampler data to
compute shader during weave de-interlace.
Signed-off-by: James Zhu <[email protected]>
Acked-by: Leo Liu <[email protected]>
Tested-by: Bruno Milreu <[email protected]>
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor_cs.c | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index a8f3620103b..12c58ff7436 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -802,7 +802,7 @@ vl_compositor_init_state(struct vl_compositor_state *s, struct pipe_context *pip pipe->screen, PIPE_BIND_CONSTANT_BUFFER, PIPE_USAGE_DEFAULT, - sizeof(csc_matrix) + 4*sizeof(float) + 6*sizeof(int) + sizeof(csc_matrix) + 6*sizeof(float) + 6*sizeof(int) ); if (!s->shader_params) diff --git a/src/gallium/auxiliary/vl/vl_compositor_cs.c b/src/gallium/auxiliary/vl/vl_compositor_cs.c index 0e49c11c8bf..70898be4bd6 100644 --- a/src/gallium/auxiliary/vl/vl_compositor_cs.c +++ b/src/gallium/auxiliary/vl/vl_compositor_cs.c @@ -38,6 +38,8 @@ struct cs_viewport { struct u_rect area; int translate_x; int translate_y; + float sampler0_w; + float sampler0_h; }; const char *compute_shader_video_buffer = @@ -298,8 +300,11 @@ set_viewport(struct vl_compositor_state *s, *ptr_int++ = drawn->area.x1; *ptr_int++ = drawn->area.y1; *ptr_int++ = drawn->translate_x; - *ptr_int = drawn->translate_y; + *ptr_int++ = drawn->translate_y; + ptr_float = (float *)ptr_int; + *ptr_float++ = drawn->sampler0_w; + *ptr_float = drawn->sampler0_h; pipe_buffer_unmap(s->pipe, buf_transfer); return true; @@ -328,6 +333,8 @@ draw_layers(struct vl_compositor *c, drawn.scale_y = drawn.scale_x; drawn.translate_x = (int)layer->viewport.translate[0]; drawn.translate_y = (int)layer->viewport.translate[1]; + drawn.sampler0_w = (float)layer->sampler_views[0]->texture->width0; + drawn.sampler0_h = (float)layer->sampler_views[0]->texture->height0; if (memcmp(&drawn, &old_drawn, sizeof(struct cs_viewport))) { set_viewport(s, &drawn); |