gallium: Add pipe_buffer_write/read inlines.
Saves code, and will simplify future interface changes.
This commit is contained in:
@@ -85,12 +85,10 @@ void st_upload_constants( struct st_context *st,
|
||||
}
|
||||
|
||||
/* load Mesa constants into the constant buffer */
|
||||
if (cbuf->buffer) {
|
||||
void *map = pipe_buffer_map(pipe->screen, cbuf->buffer,
|
||||
PIPE_BUFFER_USAGE_CPU_WRITE);
|
||||
memcpy(map, params->ParameterValues, paramBytes);
|
||||
pipe_buffer_unmap(pipe->screen, cbuf->buffer);
|
||||
}
|
||||
if (cbuf->buffer)
|
||||
pipe_buffer_write(pipe->screen, cbuf->buffer,
|
||||
0, paramBytes,
|
||||
params->ParameterValues);
|
||||
|
||||
st->pipe->set_constant_buffer(st->pipe, id, 0, cbuf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user