Commit graph

170 commits

Author SHA1 Message Date
Pierre-Loup A. Griffais
898e653c39 rendervulkan: Use FIFO present mode for now in the nested case.
That's a good enough proxy for a real vblank cadence and helps my Envy
not catch on fire.
2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
4209391fe1 Vulkan: Can have a normal-sized descriptor pool now. 2020-01-01 15:30:38 +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
85cab97737 Vulkan: try to collate output-specific things together.
Main motivation was to have a clean-ish spot to add a ping-pong
command-buffer instead of allocating one every frame. Leaking
significantly less GTT now.

Also add some more leading whitespace courtesy of Kate.
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
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
0915d864c0 Vulkan: compress layer slots into contiguous texture slots.
Otherwise we can crash if what we get passed has holes, like when the
main layer loses its texture abruptly but overlays are still on top of it.
2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
d3e0b3c963 Select a non-SRGB swapchain format to fix washed out colors. Thanks Bas! 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
622f198549 Fix swapped channels on glxgears rendering. Still super dark though. 2020-01-01 15:30:38 +09:00
Pierre-Loup A. Griffais
8e4a4101f5 Vulkan: set scanout bit on memory for imported images.
As Bas points out, their original WSI allocated them expecting them to
get scanned out, so this has a better chance of describing their memory
layout in the absence of full modifiers. This fixes corruption for me
on Vega at least, but glxgears colors are swapped still.
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
9517ace5c0 Taking about 0.5ms at 1080p on a HP Envy Raven laptop with this.
Sometimes we're running _before_ the app according to gpuvis, beware.
2020-01-01 15:30:37 +09:00
Pierre-Loup A. Griffais
15e6809031 It helps to actually import the DRM data!
Getting glxgears-shaped tile corruption, which is closer to expectations
without real DRM modifiers.
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