radeon_winsys.h: add a winsys parameter to most winsys buffer functions
This will allow removing the winsys pointer from buffers. The amdgpu winsys adds dummy_ws to get radeon_winsys because there can be no radeon_winsys around (e.g. while amdgpu_winsys is being destroyed), but we still need some way to call buffer functions. Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809>
This commit is contained in:
@@ -107,7 +107,7 @@ static void si_dump_shader(struct si_screen *sscreen, struct si_shader *shader,
|
||||
unsigned size = shader->bo->b.b.width0;
|
||||
fprintf(f, "BO: VA=%" PRIx64 " Size=%u\n", shader->bo->gpu_address, size);
|
||||
|
||||
const char *mapped = sscreen->ws->buffer_map(
|
||||
const char *mapped = sscreen->ws->buffer_map(sscreen->ws,
|
||||
shader->bo->buf, NULL,
|
||||
PIPE_MAP_UNSYNCHRONIZED | PIPE_MAP_READ | RADEON_MAP_TEMPORARY);
|
||||
|
||||
@@ -115,7 +115,7 @@ static void si_dump_shader(struct si_screen *sscreen, struct si_shader *shader,
|
||||
fprintf(f, " %4x: %08x\n", i, *(uint32_t *)(mapped + i));
|
||||
}
|
||||
|
||||
sscreen->ws->buffer_unmap(shader->bo->buf);
|
||||
sscreen->ws->buffer_unmap(sscreen->ws, shader->bo->buf);
|
||||
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
@@ -402,7 +402,7 @@ static void si_log_chunk_type_cs_print(void *data, FILE *f)
|
||||
* waited for the context, so this buffer should be idle.
|
||||
* If the GPU is hung, there is no point in waiting for it.
|
||||
*/
|
||||
uint32_t *map = ctx->ws->buffer_map(scs->trace_buf->buf, NULL,
|
||||
uint32_t *map = ctx->ws->buffer_map(ctx->ws, scs->trace_buf->buf, NULL,
|
||||
PIPE_MAP_UNSYNCHRONIZED | PIPE_MAP_READ);
|
||||
if (map) {
|
||||
last_trace_id = map[0];
|
||||
|
Reference in New Issue
Block a user