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);
* 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);
assert(s);
vl_compositor_clear_layers(s);
- pipe_resource_reference(&s->csc_matrix, NULL);
+ pipe_resource_reference(&s->shader_params, NULL);
}
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);