Commit Graph

4618 Commits

Author SHA1 Message Date
niki 18221beb25 vulkan: fix canvas rendering on android 2022-08-27 20:58:17 +02:00
Klonan 7595bc7edb whitespace micro 2022-08-27 17:37:30 +02:00
niki 7a67983b3d vulkan: fix some crashes relating to memory mngmt 2022-08-27 17:37:02 +02:00
Klonan 4e81a31cd1 Code style (tabs) 2022-08-27 17:35:41 +02:00
Klonan 03939299db Added World:getFixturesInArea() 2022-08-27 17:16:51 +02:00
Miku AuahDark 822d363dfa Remove test #undef from previous commit. 2022-08-26 11:48:46 +08:00
Miku AuahDark 3c2b1b888e Properly pause all audio processing in Android when minimized.
This uses ALC_SOFT_pause_device extension which is available since
OpenAL-soft 1.16. We guarantee almost 100% availability of this extension
since we've been using OpenAL-soft in Android since beginning.

Fixes #1828
2022-08-26 11:45:25 +08:00
slime bded15ff2a Decoders failing to allocate their buffer will cause a Lua error instead of crashing. 2022-08-25 19:44:10 -03:00
slime db1bf4707c Workaround for built-in shaders on some ES2 devices which don't support highp in pixel shaders. 2022-08-25 19:25:01 -03:00
slime 96820749ad Potential optimization for built-in uniform access in shader code.
Assigning to and accessing extra shader variables can increase VGPR / wave-variant register usage in shaders, which is often a limiting factor for performance in non-trivial shaders. Accessing the uniforms directly should bypass that.
2022-08-25 18:17:31 -03:00
niki 77f75648e8 vulkan: default renderpass and framebuffers
Since these objects basically get used every frame
we shouldn't store them in a hashmap with potentially
worse performance.
Instead storing them in member variables should be better.
2022-08-25 18:15:18 +02:00
niki a577be8a6d vulkan: fix a few bugs in Shader 2022-08-23 01:38:47 +02:00
niki a08395e12d vulkan: implement msaa 2022-08-22 23:09:21 +02:00
niki 62148790a8 vulkan: fix scissor on android 2022-08-22 17:40:27 +02:00
niki 7cc6ed40be vulkan: implement depth and stencil 2022-08-21 17:42:39 +02:00
nikeinikei dfa9b7da34 vulkan: fix build on machines without vulkan 1.3 2022-08-21 02:08:01 +02:00
nikeinikei deb2ea9435 Update config.h 2022-08-20 22:04:23 +02:00
niki 665614b9b9 vulkan: fix crash when recreating swapchain 2022-08-20 21:33:09 +02:00
niki 5f2fdc0dd0 vulkan: android: fix display orientation 2022-08-20 21:03:49 +02:00
niki 23666b1fde vulkan: fix android build
It compiles now, but it's not working correctly yet
2022-08-20 19:38:59 +02:00
slime73 48b791eb3e Merge pull request #1831 from Er2ch/sdl-2.24.0
SDL 2.24.0 support
2022-08-20 13:55:48 -03:00
Er2 53b20b1341 some fixes
Fixed duration and love naming conventions.
2022-08-20 19:05:56 +03:00
niki 3e762c9772 vulkan: remove dynamic rendering (part 2) 2022-08-20 16:38:13 +02:00
niki 4660466887 vulkan: don't use dynamic rendering 2022-08-20 15:49:09 +02:00
Er2 7c9d6d5694 add Lua string for new controllers 2022-08-20 10:51:39 +03:00
Er2 0b4b1db9fe SDL 2.24.0 support 2022-08-20 10:44:34 +03:00
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