rusticl/memory: complete rework on how mapping is implemented

Previously we tried to map GPU resources directly wherever we could,
however this was always causing random issues and was overall not very
robust.

Now we just allocate a staging buffer on the host to copy into, with some
short-cut for host_ptr allocations.

Fixes the following tests across various drivers:

1Dbuffer tests (radeonsi, zink)
buffers map_read_* (zink)
multiple_device_context context_* (zink)
thread_dimensions quick_* (zink)
math_brute_force (zink)

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30082>
This commit is contained in:
Karol Herbst
2024-07-09 10:27:07 +02:00
committed by Marge Bot
parent 00180933ad
commit 7b22bc617b
3 changed files with 213 additions and 315 deletions

View File

@@ -867,7 +867,7 @@ Rusticl OpenCL 1.2 -- all DONE:
Separate compilation and linking of programs DONE
Extend cl_mem_flags DONE
clEnqueueFillBuffer, clEnqueueFillImage DONE
Add CL_MAP_WRITE_INVALIDATE_REGION to cl_map_flags in progress (flag is ignored)
Add CL_MAP_WRITE_INVALIDATE_REGION to cl_map_flags DONE
New image types DONE
clCreateImage DONE
clEnqueueMigrateMemObjects DONE