Commit Graph

3735 Commits

Author SHA1 Message Date
niki 51e3cf2a9c vulkan: enable linux
Some basic testing reveals that it works
just like the windows build.
2022-08-19 23:41:04 +02:00
niki 7be9bb3ecc vulkan: implement vsync setting 2022-08-19 21:40:21 +02:00
niki be8778b4eb vulkan: remove dep on VK_KHR_push_descriptor
It's not sure if this extension is supported everywhere
This commit uses normal descriptor pools, sets and writes,
which are all availabel in base vulkan.
2022-08-19 16:44:59 +02:00
niki f4ece69307 Merge remote-tracking branch 'origin/12.0-development' into vulkan 2022-08-15 03:43:35 +02:00
niki b2771dd111 vulkan: fix cube textures 2022-08-15 00:06:50 +02:00
niki bc0b5f81f5 vulkan: uniforms in custom shaders
things like `uniform float time;` or `uniform sampler2D tex` now work
2022-08-14 22:15:24 +02:00
niki 84df8fee03 vulkan: fix video rendering
When rewriting the shader part rendering videos was broken.
This commit fixes that again.
2022-08-14 20:45:57 +02:00
niki f9ad1842b5 vulkan: first iteration for generic uniforms
Until now we only considered the builtin uniform variables.
This commit attempts to make the code in the vulkan Shader
implementation more general, as to allow for custom uniforms.
This is not possible yet, but should be easier to implement now.
2022-08-14 04:56:20 +02:00
niki 390ae40e83 vulkan: cut down on number of cmd buffers
Until now we've used a command buffer for every swap chain image,
however it makes more sense to just have a command buffer for every
frame in flight, since we won't be ever recording more than that.

This makes it more in line with the data transfer command buffers,
which are also just created per frame in flight.
This should make more sense.
2022-08-11 16:11:06 +02:00
slime 1afe5a56da Merge branch 'main' into 12.0-development 2022-08-09 20:42:34 -03:00
slime 8495cefd3b opengl: fix creating compressed array textures with > 1 layer.
Fixes #1817.
2022-08-09 20:37:48 -03:00
niki fbb64a07af vulkan: partially implement mipmaps
There is no real effect yet when rendering, however debugging the
application with renderdoc reveals that the mipmap generation is
already correct. There's probably something weird going on with the
sampling. I'll have to look into that next.
2022-08-09 00:57:07 +02:00
niki 0ebb34e037 vulkan: avoid usage of general image layout 2022-08-08 22:06:01 +02:00
niki c51b12a177 vulkan: make api design more senseful 2022-08-08 21:36:43 +02:00
niki 1647f6c9c2 vulkan: remove unnecessary quadindex code 2022-08-01 19:30:08 +02:00
niki dcea056fcb vulkan: properly implement samplers 2022-08-01 18:51:09 +02:00
niki 7bbc2888e2 vulkan: remove unnecessary recreation on resize 2022-08-01 17:38:23 +02:00
niki 98ebdd7871 vulkan: fix wireframe validation error 2022-08-01 16:07:37 +02:00
niki 224b9e84f0 vulkan: add support for 2d array textures 2022-08-01 15:53:31 +02:00
niki 8cf7a79657 vulkan: add missing layout transitions 2022-07-31 23:56:03 +02:00
niki 845fd16b4b vulkan: dynamically increase size of available memory for uniforms 2022-07-31 03:31:35 +02:00
niki 29dcf3e8c0 vulkan: use hashing to determine pipeline
Until now we did a linear search in a vector to find the cashed
pipeline given a certain configuration. This is of course not a very
efficient way. This commit now uses a hashmap which should still be
fast even when there are a lot of pipelines already created.
2022-07-31 01:42:48 +02:00
niki 4686de8ebd vulkan: implement copy Texture <-> buffer methods 2022-07-30 02:17:58 +02:00
niki ad8243f257 vulkan: implement Buffer::copyTo 2022-07-30 01:41:37 +02:00
niki 7bbc042fce vulkan: remove redundant tabs
this makes reading the source files easier
and is more in line with the rest of the löve codebase
2022-07-30 01:16:56 +02:00
niki 506cf8c210 vulkan: fix colors 2022-07-30 00:48:46 +02:00
niki 94c58e1599 vulkan: fix video rendering 2022-07-30 00:26:49 +02:00
niki 1096b76054 vulkan: fix clean up
We now don't do any more greedy waiting when destroying vulkan objects.
2022-07-29 22:59:15 +02:00
niki 524e011133 vulkan: make Texture::uploadByteData async
Before this commit we would greedily wait for the upload to be complete
before exiting the function. This is of course not correct, since
we might be changing data that is still being used in a render in
flight. Of course we also need to cleanup the resources asynchronously
after the frame has been rendered fully.
2022-07-29 22:35:35 +02:00
niki 7a3e9ed71e vulkan: fix uniform buffer descriptor
There was a bug where the count of used builtin uniform buffer objects
was not advanced. This caused another problem since vulkan requires
a certain alignment for the buffer. This commit fixes both of those
things.
2022-07-29 21:04:35 +02:00
slime ea3c9ee7e6 Merge branch 'main' into 12.0-development 2022-07-24 16:34:28 -03:00
slime 870021b8bd Potentially fix a crash when calling Text:add("").
#1824
2022-07-24 16:23:56 -03:00
niki 6d7bd645fc vulkan: use vkCmdClearColorImage to clear texture
using the vulkan functionality probably leads to less bugs.
Until now it was assumed that any image was in the rgba8 format,
which is of course not correct. Clearing a texture to white or black
should now work for any format.
2022-07-24 13:43:48 +02:00
slime a2eaed33eb Update lua-https to latest source. Adds new methods.
The newly supported methods are HEAD, PUT, DELETE, and PATCH.
2022-07-22 22:42:35 -03:00
niki fb6457f57d vulkan: move descriptor set logic into Shader
Using the extension VK_KHR_push_descriptor makes the code a lot easier.
Using it makes us able to set set descriptor sets dynamically.
2022-07-19 02:36:02 +02:00
niki 00974b5820 vulkan: move shader compilation into Shader 2022-07-18 22:28:41 +02:00
niki a544d51c22 vulkan: implement instanced draw 2022-07-17 00:28:41 +02:00
niki 6916182a79 vulkan: implement getAPIStats 2022-07-16 23:46:03 +02:00
niki 913aab0226 vulkan: implement setActive 2022-07-16 23:27:54 +02:00
niki 9b7cfef5ef vulkan: implement setScissor 2022-07-16 23:19:24 +02:00
niki 974c50c751 vulkan: partially implement clear
Only works for color attachments for now.
2022-07-16 21:45:27 +02:00
niki 4c33d0aa36 vulkan: fix Shader::attach() 2022-07-16 17:52:29 +02:00
niki ac9d8ec2a0 vulkan: fix canvas rendering
Sometimes canvas commands wouldn't get executed.
This was because when the window gets resized,
the command buffers would get recreated, and would thus
lose the recorded commands.
2022-07-16 15:55:48 +02:00
niki 95952c691d vulkan: implement setRenderTargetsInternal
basic usage of canvases now works.
Colors probably aren't correct yet.
2022-07-15 01:44:07 +02:00
niki 0ae81091d1 vulkan: use dynamic rendering
This vulkan 1.3 feature will make the code simpler when dealing
with off screen render targets (i.e. löve canvases)
2022-07-14 18:01:46 +02:00
niki 38f15ae97d vulkan: implement cull and winding 2022-07-13 17:27:11 +02:00
niki c6d79ae87e vulkan: implement setColorMask 2022-07-13 16:50:28 +02:00
niki a591b2b99e vulkan: implement setBlendState 2022-07-13 16:37:16 +02:00
niki 04fb789649 vulkan: implement setPointSize 2022-07-13 16:05:12 +02:00
niki 4190807a20 vulkan: implement setWireframe 2022-07-13 15:55:14 +02:00