Commit Graph

2567 Commits

Author SHA1 Message Date
Jesse Natalie
5879684a46 wgl: Add HDR pixel formats
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:44 +00:00
Jesse Natalie
f97060bc14 wgl: Enable WGL_ARB_pixel_format_float
We already implement all of the relevant bits of this extension, which
is just handling WGL_TYPE_RGBA_FLOAT_ARB for WGL_PIXEL_TYPE_ARB in
wglGetPixelFormatAttrib[i/f]vARB and wglChoosePixelFormatARB. We just
didn't have any float formats enumerated so it was never seen in
practice.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:44 +00:00
Jesse Natalie
c432fbe534 wgl: Add no-gdi-single-buffered and gdi-double-buffered PFDs
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:44 +00:00
Jesse Natalie
610dcc178a wgl: Flush frontbuffer when calling swapbuffers on single-buffered fb
Some apps don't look at what kind of PFDthey get, and if they
get a single-buffered one, they only ever call swap and never flush,
so nothing shows up on-screen.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:44 +00:00
Jesse Natalie
b6a2972455 wgl: Support a single-buffered winsys framebuffer
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:44 +00:00
Karol Herbst
53df391d27 rusticl/kernel: recalculate scratch and shared memory after opts
Turns out we have to do it regardless as opts after explicit_types could
get rid of even more scratch and shared memory.

Fixes: ea023ff5cd ("rusticl/kernel: no need to reset the scratch size anymore")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27634>
2024-02-15 15:09:23 +00:00
Karol Herbst
90eae30bcb rusticl/mem: move pipe_image_host_access into Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
9ce9ddc5e8 rusticl/mem: reorganize MemBase::from_gl a little
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
b834d41d4b rusticl/mem: move Buffer and Image specific fields into the subtypes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
cf73ac8096 rusticl/mem: move tx_raw_async methods into Buffer and Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
f9b05dfd77 rusticl/mem: move MemBase::map into the users
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
d3c3892088 rusticl/mem: reorganize Image::map
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
97680ca861 rusticl/mem: move comment describing how mapping works
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
a9a928cbf9 rusticl/mem: remove get_res
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
687dea4fde rusticl/mem: move tx into Buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
d18333889e rusticl/mem: move is_parent_buffer into Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
bfa342e16e rusticl/image: call tx on the parent buffer directly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
6a15d5baee rusticl/mem: fold tx_raw into tx
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
790d00d3e1 rusticl/mem: move tx_image into Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
e39b6288f6 rusticl/mem: get rid of pixel_size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
2db23aa207 rusticl/mem: split Image::copy_to into Buffer and Image versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
c0c6eca095 rusticl/mem: split Buffer::copy_to into Buffer and Image versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
28bff68d98 rusticl/mem: split copy_to into Buffer and Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
dd4096e7fd rusticl/mem: move copy_to_rect into Buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
e048d8c796 rusticl/mem: split write_from_user_rect into buffer and image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
efc803175a rusticl/mem: split read_to_user_rect into Buffer and Image versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
fdfde8a189 rusticl/mem: move copy and write buffer impls into Buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
aaa05ffc1d rusticl/mem: split unmap into Buffer and Image versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
a840a75d17 rusticl/mem: move shadow sync methods into concrete types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
553a9e38bd rusticl/mem: move map methods into concrete types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
219d8e0dae core/memory: drop Arc for &Arc<Queue> function parameters
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
5a1089b811 rusticl/mem: move fill methods into concrete types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
58c042f439 rusticl/mem: use pattern matching in is_parent_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
d705307a72 rusticl/mem: split into Buffer and Image
No implementation is moved yet, but doing this first makes it easier to
move things.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
0125e865a1 rusticl/icd: actually allow dispatching CL types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
aa5b0e7883 rusticl/device: get rid of pointless Arc overhead
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
7f77f91929 rusticl/icd: split Arc part out of CLObject into new trait
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
4807573ba7 rusticl/icd: move get_arc() and rename it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
3be4f60f97 rusticl/event: drop from_cl_arr and use arcs_from_arr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
57e5d377da rusticl/icd: move from_arc() and rename it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
51afd7a00c rusticl/device: deduplicate devices with sorting
a HashSet was kinda overkill here to begin with.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
e63e21ac74 rusticl/icd: move get_ref()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
13241264f1 rusticl/icd: fold leak_ref into its only consumer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
4ca11d5f06 rusticl/icd: move get_arc_vec_from_arr and rename it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
9b5bcbb60f rusticl/icd: move retain() and release()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
45b9fdb4e5 rusticl/icd: move refcnt() and get rid of needless atomic ops
The old impl used `get_arc` which internally calls into
`Arc::increment_strong_count` in order to protect against Arc::drop
deallocating our objects. We could also just not do that :)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
7564b81749 rusticl/icd: move get_ref_vec_from_arr into the Rusticl type
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
46227bf44c rusticl/api: allow CLObjectBase to be placed anywhere
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
6d8b0a53c6 rusticl/util: support nested structs in offset_of!
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
0287aa4b34 rust/api: add RustTypes enum
We want to move away from a 1:1 mapping between CL and Rusticl types, so
that we can differentiate better between different memory types.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00