Commit graph

31 commits

Author SHA1 Message Date
Joshua Ashton
f537a40483 Use SOA instead of AOS for layers
Produces better code as the shader compiler can load
multiple layers with a single buffer_load at a time
due to the positioning and alignment.
2021-05-01 16:50:51 -07:00
Simon Ser
a99c5f7a1c Don't set R600_DEBUG=nodcc if Vulkan supports modifiers
This can cause issues with Xwayland. Setting R600_DEBUG=nodcc
prevents Xwayland from being able to import DCC buffers coming
from Vulkan clients.

Closes: https://github.com/Plagman/gamescope/issues/185
2021-04-22 19:36:37 +02:00
Sefa Eyeoglu
ed44909813 Update wlroots to 0.13.0
Update usage of wlr_headless_backend_create,
wlr_renderer_get_shm_texture_formats,
wlr_texture_from_pixels and add missing include for render/egl.h.
2021-04-08 09:15:05 +02:00
Simon Ser
df18c40815 Only advertise scanout capable modifiers 2021-04-01 17:41:06 +02:00
Simon Ser
83900acb11 Create a linear buffer for cursor
The cursor plane needs to be linear on amdgpu.
2020-12-11 12:39:00 +01:00
Joshua Ashton
b247f9f164 Move layer info to CompositeData_t struct
Have a nice struct for us to copy into the constant buffer
once we eliminate nLayerCount and nSwapChannels.
2020-09-02 20:43:40 -07:00
Pierre-Loup A. Griffais
6dd7f60540 Switch commit waiting over to polling the DMA-BUF fd.
Remove the implicit sync Vulkan fence hack, it took us 0.2ms of GPU time
to prepare the 1x1 copy to wait on.
2020-08-30 13:26:46 -07:00
Pierre-Loup A. Griffais
df38bea747 Implement screenshot support.
Mostly in rendervulkan. Super+S or SIGUSR2.
2020-08-29 21:33:14 -07:00
Simon Ser
d7132a2397
Remove unused CVulkanTexture::m_DMA 2020-07-30 13:38:05 +02:00
Simon Ser
bae255ee1a
Get rid of C_SIDE
wlroots headers can mostly be included with extern "C" blocks. Two
exceptions are the use of `static` for array args and `class` as a
struct field. These can be #define'ed to avoid C++ build errors.

This allows the whole project to be built as a single C++ codebase,
without having to maintain hybrid header files.
2020-06-11 12:44:36 +02:00
Pierre-Loup A. Griffais
dfba164987 Vulkan: Remove one TODO by implementing deferred free for textures. 2020-01-25 20:31:19 -08:00
Pierre-Loup A. Griffais
9a177050e5 Vulkan: fix everything using the same command buffer.
We can't quite get away with it now that we want to kick off several
waits at the same time.
2020-01-25 19:51:11 -08:00
Pierre-Loup A. Griffais
4079d0c785 steamcompmgr: rework a couple of things to plan for decoupling paints
- Add a commit wait thread that just waits for the work associated with
   an in-bound dma-buff is done. We'd like to be getting a fence directly
   from Wayland, but in the absence of that we'll make our own by tapping
   into implicit-sync, DX11-style. gpuvis logging of the outcome of the
   waits in the thread are consistent with the end of GPU work.

 - Rework wayland commit handoff between wlserver and steamcompmgr to let
   steamcompmgr have full access to the commit queue, letting it remove
   elements in the middle and still keep going, compared to the previous
   interface. This lets steamcompmgr get one commit per window per loop,
   for now. We should be able to kick off waits and ref/unref resources
   for all pending commits soon, with some work on the accounting first.

This should also fix an issue introduced recently where the overlay
could get really starved in embedded mode, as we were just getting
the first commit in the queue for a single frame.
2020-01-23 00:52:17 -08:00
Pierre-Loup A. Griffais
188ea49e51 nested: let the output surface be resizeable
And let the SDL window be resizeable too.
2020-01-20 01:32:54 -08:00
Pierre-Loup A. Griffais
303c702547 rendervulkan: it's 2020, surely GPUs understand integers by now?! 2020-01-18 17:24:56 -08:00
Pierre-Loup A. Griffais
c77df96523 rendervulkan: always write all layers in the descriptor.
Use an empty dummy texture for unbound slots, as the driver can't know
what the shader will sample from.

Also remove any sort of implicit attempts at compaction of slots.
2020-01-09 02:34:54 +00:00
Pierre-Loup A. Griffais
4d6602ba4b DRM: Make liftoff layers conditional for now.
Can't get them to be useful, might need library and amdgpu DC fixes.
2020-01-06 19:36:20 -08:00
Pierre-Loup A. Griffais
6b3e2ddf68 DRM: multi-plane support via libliftoff.
Import libliftoff as subproject and plumb our planes through it.

Wait for a flip to complete immediately after queuing it for now.

Also immediately wait for cursor image uploads, as we don't have to
do Vulkan rendering anymore after queuing an upload.

Cursor shows up with format hack, but is badly corrupt. We might need
to use a DRM dumb_fb rather than going through the same Vulkan image.

Alpha bits of surfaces are ignored again, need to make Steam select
an ARGB visual for overlay windows, probably.

Setting up the "alpha" plane property somehow makes overlays not
show up at all despite liftoff happily letting us go with scanout.
2020-01-05 22:19:04 -08:00
Pierre-Loup A. Griffais
81e5e1b2f8 steamcompmgr: re-add cursor painting.
We're in sole control of the cursor now, there's no "fake" cursor anymore.

Don't attempt to hide it in X, it doesn't matter.

Also Vulkan rendering of a texture populated from arbitrary bits.

Also add the third layer to the shader... Badly needs clean-up.
2020-01-01 23:36:58 +09:00
Pierre-Loup A. Griffais
7f4d791c20 Vulkan: free imported textures, removing the small last leak of GTT.
Some more leading whitespace for good measure.
2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
ed52f586af Add more float comparisons. Every project should have at least 4. 2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
8db29e4c24 Make direct DRM flipping match composite description.
Also overload VulkanPipeline_t some more. :/
2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
46427fd810 Vulkan: just cache various samplers for now, use a single descriptor.
Caching descriptors is useless when we're importing different images
every draw.
2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
9d49e1a682 Vulkan: descriptor cache.
Doesn't help running out right now, as the DMA-BUFs from a new app
frame get imported as different Vulkan textures. Not sure how to
ensure continuity across several sightings of the original swapchain
images yet.
2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
9d359e3213 I guess HLSL does weird padding with float2s?
With this and some more fixes, output pipeline looks pretty much perfect.
2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
ec34dad8a9 Plumb steamcompmgr window painting to Vulkan compute. 2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
bfd02982ab Kill EGL with fire, rest of GL will follow shortly.
Working nested Vulkan path now using surface from SDL2 window.

For some definition of working, tile corruption there too.
2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
d7dc7b435d Vulkan: start of actual rendering code.
Getting corruption on screen at 7FPS!
2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
586bc69f5f Vulkan: some surgery on image code to make it import textures as well. 2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
e61b20710e Enough Vulkan stuff to render to an image and flip it on screen.
No texturing yet, that's next after some surgery on the lump of code.
2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
2be0bdbcbb Start of Vulkan compute rendering code. Getting FBIDs (glxgears still OK). 2020-01-01 15:30:37 +09:00