Re: libdrm_amdgpu being forked and merged into Mesa

2024-10-24 Thread Christian König
Yeah that would really not work. We at least need the code to unify the render node file descriptor stay inside libdrm and be used by Mesa. Otherwise Mesa would start using a separate render node file descriptor. Regards, Christian. Am 24.10.24 um 16:19 schrieb Felix Kuehling: I'm not sure w

Re: Helping Wine use 64 bit Mesa OGL drivers for 32-bit Windows applications

2024-10-24 Thread Derek Lesho
Oh interesting, thanks for looking into this guys. As far as I understand it though, this is still not duplicating the mapping, but setting up a fault handler at the original address to manage access. I don't think we'd want this since when wine remaps the page/s hosting a given buffer it also

Re: Helping Wine use 64 bit Mesa OGL drivers for 32-bit Windows applications

2024-10-24 Thread Christian König
I haven't tested it but as far as I know that isn't correct. As far as I know you can map the same VMA at a different location even without MREMAP_DONTUNMAP. And yes MREMAP_DONTUNMAP only work with private mappings, but that isn't needed here. Give me a moment to test this. Regards, Christia

Re: libdrm_amdgpu being forked and merged into Mesa

2024-10-24 Thread Marek Olšák
I don't think we need to share VA space. APIs usually share one or two buffers. That's almost nothing compared to the size of the occupied VA space. They also likely map them again for themselves - APIs don't share any virtual addresses as far as I know. Marek On Thu, Oct 24, 2024, 08:12 Christia

Re: Helping Wine use 64 bit Mesa OGL drivers for 32-bit Windows applications

2024-10-24 Thread Marek Olšák
Is there a way for drivers to change the semantics of memory mappings to make mremap work? Marek On Thu, Oct 24, 2024, 07:08 Derek Lesho wrote: > In my last mail I responded to this approach all the way at the bottom, > so it probably got lost: mremap on Linux as it exists now won't work as > i

Re: libdrm_amdgpu being forked and merged into Mesa

2024-10-24 Thread Christian König
Am 22.10.24 um 06:06 schrieb Marek Olšák: Hi, The MR is up: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31756 It's good to go as long as there is no functional issue. Finally getting rid of all the mid-layering? What about shared VA-space? Regards, Christian. libdrm_amdgpu w

Re: libdrm_amdgpu being forked and merged into Mesa

2024-10-24 Thread Christian König
Completely agree, but that's a platform decision which Alex needs to make. Christian. Am 24.10.24 um 14:16 schrieb Marek Olšák: I don't think we need to share VA space. APIs usually share one or two buffers. That's almost nothing compared to the size of the occupied VA space. They also likely

Re: Helping Wine use 64 bit Mesa OGL drivers for 32-bit Windows applications

2024-10-24 Thread Christian König
Darek we are unfortunately both partially right. Linux supports cloning VMAs using mremap() from userspace by using a zero old size, but unfortunately only for SHM areas. See the code in mm/mremap.c:     /* * We allow a zero old-len as a special case * for DOS-emu "duplic

Re: Helping Wine use 64 bit Mesa OGL drivers for 32-bit Windows applications

2024-10-24 Thread Derek Lesho
In my last mail I responded to this approach all the way at the bottom, so it probably got lost: mremap on Linux as it exists now won't work as it only supports private anonymous mappings (in conjunction with MREMAP_DONTUNMAP), which GPU mappings are not. Am 10/24/24 um 01:06 schrieb James Jon