summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
diff options
context:
space:
mode:
authorJames Zhu <[email protected]>2019-02-01 09:56:13 -0500
committerLeo Liu <[email protected]>2019-02-15 10:07:03 -0500
commit299e2bc046bdc809115bfa9182f9619a098668c9 (patch)
treea7e5539862336d79cba4aad7d5995913a6d65510 /src/gallium/auxiliary/vl
parent7b7b5f2029534e3ae9d3fa05eff2b5ab7d9a9129 (diff)
gallium/auxiliary/vl: Rename csc_matrix and increase its size.
Rename csc_matrix to shader_params, and increase shader_params size to store more constants for compute shader, Signed-off-by: James Zhu <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor.c10
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor.h2
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor_gfx.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
index de6cf1783c0..45099138d4f 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
@@ -439,7 +439,7 @@ vl_compositor_set_csc_matrix(struct vl_compositor_state *s,
assert(s);
- float *ptr = pipe_buffer_map(s->pipe, s->csc_matrix,
+ float *ptr = pipe_buffer_map(s->pipe, s->shader_params,
PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE,
&buf_transfer);
@@ -750,15 +750,15 @@ vl_compositor_init_state(struct vl_compositor_state *s, struct pipe_context *pip
* Const buffer contains the color conversion matrix and bias vectors
*/
/* XXX: Create with IMMUTABLE/STATIC... although it does change every once in a long while... */
- s->csc_matrix = pipe_buffer_create_const0
+ s->shader_params = pipe_buffer_create_const0
(
pipe->screen,
PIPE_BIND_CONSTANT_BUFFER,
PIPE_USAGE_DEFAULT,
- sizeof(csc_matrix) + 2*sizeof(float)
+ sizeof(csc_matrix) + 4*sizeof(float) + 6*sizeof(int)
);
- if (!s->csc_matrix)
+ if (!s->shader_params)
return false;
vl_compositor_clear_layers(s);
@@ -776,5 +776,5 @@ vl_compositor_cleanup_state(struct vl_compositor_state *s)
assert(s);
vl_compositor_clear_layers(s);
- pipe_resource_reference(&s->csc_matrix, NULL);
+ pipe_resource_reference(&s->shader_params, NULL);
}
diff --git a/src/gallium/auxiliary/vl/vl_compositor.h b/src/gallium/auxiliary/vl/vl_compositor.h
index aa843c3d287..c34bad045b4 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.h
+++ b/src/gallium/auxiliary/vl/vl_compositor.h
@@ -90,7 +90,7 @@ struct vl_compositor_state
bool scissor_valid;
struct pipe_scissor_state scissor;
- struct pipe_resource *csc_matrix;
+ struct pipe_resource *shader_params;
union pipe_color_union clear_color;
diff --git a/src/gallium/auxiliary/vl/vl_compositor_gfx.c b/src/gallium/auxiliary/vl/vl_compositor_gfx.c
index 93e418a4c06..62db005432e 100644
--- a/src/gallium/auxiliary/vl/vl_compositor_gfx.c
+++ b/src/gallium/auxiliary/vl/vl_compositor_gfx.c
@@ -719,7 +719,7 @@ vl_compositor_gfx_render(struct vl_compositor_state *s,
c->pipe->bind_vs_state(c->pipe, c->vs);
c->pipe->set_vertex_buffers(c->pipe, 0, 1, &c->vertex_buf);
c->pipe->bind_vertex_elements_state(c->pipe, c->vertex_elems_state);
- pipe_set_constant_buffer(c->pipe, PIPE_SHADER_FRAGMENT, 0, s->csc_matrix);
+ pipe_set_constant_buffer(c->pipe, PIPE_SHADER_FRAGMENT, 0, s->shader_params);
c->pipe->bind_rasterizer_state(c->pipe, c->rast);
draw_layers(c, s, dirty_area);