mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
gallium/auxiliary/vl: Map range when updating constants
Use WRITE | DISCARD_RANGE to avoid having to read back the csc matrix and luma min/max values. Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Thong Thai <thong.thai@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24869>
This commit is contained in:
parent
7c8e1596d6
commit
a90b9f1d1e
1 changed files with 5 additions and 4 deletions
|
|
@ -782,15 +782,16 @@ set_viewport(struct vl_compositor_state *s,
|
|||
|
||||
assert(s && drawn);
|
||||
|
||||
void *ptr = pipe_buffer_map(s->pipe, s->shader_params,
|
||||
PIPE_MAP_READ | PIPE_MAP_WRITE,
|
||||
&buf_transfer);
|
||||
void *ptr = pipe_buffer_map_range(s->pipe, s->shader_params,
|
||||
sizeof(vl_csc_matrix) + sizeof(float) * 2,
|
||||
sizeof(float) * 6 + sizeof(int) * 8,
|
||||
PIPE_MAP_WRITE | PIPE_MAP_DISCARD_RANGE,
|
||||
&buf_transfer);
|
||||
|
||||
if (!ptr)
|
||||
return false;
|
||||
|
||||
float *ptr_float = (float *)ptr;
|
||||
ptr_float += sizeof(vl_csc_matrix)/sizeof(float) + 2;
|
||||
*ptr_float++ = drawn->scale_x;
|
||||
*ptr_float++ = drawn->scale_y;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue