Commit Graph

78 Commits

Author SHA1 Message Date
niki ca0264e906 vulkan: fix #2032
when using the low level vertexmain and pixelmain entry points
it can happen that there are no local uniforms used.
2024-03-08 13:42:05 +01:00
Sasha Szpakowski 8dae72b88e vulkan: fix shader:send(texture|buffer) not calling love.graphics.flushBatch. 2024-03-07 23:04:22 -04:00
Sasha Szpakowski c35b9cba4a vulkan: fix a potential error during draws. 2024-03-07 22:31:05 -04:00
Sasha Szpakowski ad42570cef Fix compile errors on Linux/Android 2024-03-07 21:37:21 -04:00
Sasha Szpakowski 2079f657e7 graphics: most uniform reflection is handled at a higher level instead of backend code.
Fixes boolean uniforms when Metal is used.
2024-03-07 21:24:11 -04:00
Sasha Szpakowski 01fbedb225 vulkan: improve some error messages when shader compilation fails. 2024-03-03 12:40:23 -04:00
Sasha Szpakowski 64a30f177f Merge branch 'main' into 12.0-development 2024-02-10 12:24:48 -04:00
Sasha Szpakowski ecd9b007aa Fix building vulkan Shader.cpp 2024-01-07 22:00:50 -04:00
Sasha Szpakowski a99d5afc57 update glslang 2024-01-07 21:14:01 -04:00
Sasha Szpakowski dbcdbc47d5 Add debugname field to shader options table. 2023-12-29 16:51:24 +01:00
niki 88f6bb880e remove debug code 2023-10-09 20:16:01 +02:00
niki 2749209fc7 vulkan: fix crash when using wrong uniform name 2023-10-09 20:12:13 +02:00
niki 88272c6855 vulkan: correctly identify boolean uniforms 2023-10-09 20:07:32 +02:00
niki 61cafd7dd4 adjust code styling 2023-08-01 14:23:10 +02:00
niki 8096cab5bc vulkan: use vkResetDescriptorPool 2023-07-30 15:35:20 +02:00
niki 9d9e2da763 vulkan: optimize vkUpdateDescriptorSets calls 2023-07-25 21:39:28 +02:00
niki af717c8cab vulkan: fix incorrect return type 2023-07-25 16:50:39 +02:00
niki f30bf9bee0 vulkan: better api use of descriptor pools
Some implementations allow for bottomless pools,
which never run out of pool memory.
This new implementation allows for this case to happen.
2023-07-25 16:37:53 +02:00
niki e08ade86b5 vulkan: simplify shader code slightly 2023-07-25 16:26:26 +02:00
niki 04de1ade9e vulkan: correctly deal with custom input attribs 2023-07-18 13:54:48 +02:00
niki 332b456131 vulkan: remove getDefaultTexture 2023-07-18 13:54:06 +02:00
niki 8b419522d7 vulkan: simplify code slightly 2023-07-18 13:53:25 +02:00
niki 9f452474c7 vulkan: remove unnecessary getDevice() calls 2023-01-31 01:07:02 +01:00
niki 0e1f645538 vulkan: clean up glslang objects properly
By using smart pointers we don't want to worry about
explicitely deleting.
2023-01-29 01:14:06 +01:00
niki f01457a610 vulkan: remove internal Shader::attach call
Shader::attach() should not be called internally
by a graphics backend.
2023-01-27 14:10:19 +01:00
niki 377d269f4a vulkan: remap bindings to prevent clash
Vulkan does not differentiate between between bindings for textures
and buffers, as opposed to opengl. This can lead to situations, where
different uniforms get assigned the same binding leading to a crash,
when trying to update a descriptor set with the wrong type.
This patch solves this problem, by remapping the bindings when needed.
2023-01-27 02:36:10 +01:00
niki 7e7d2884c8 vulkan: fix shader crash 2023-01-09 16:37:12 +01:00
Sasha Szpakowski f6cdbdc868 Merge branch 'main' into 12.0-development 2022-12-31 22:46:34 -04:00
niki 74027ad780 vulkan: remove unneeded Module::getInstance call 2022-12-27 13:55:35 +01:00
niki 00c65d63fe vulkan: fix incorrect descriptor sets 2022-12-25 23:09:57 +01:00
niki 8694c44207 vulkan: fix incorrect textures in shader uniforms 2022-12-24 22:37:58 +01:00
niki 30bdb03f3b vulkan: code styling 2022-12-21 17:20:13 +01:00
niki de1a4c3149 vulkan: fix crash when creating compute shaders
If the size of the default uniform block ends up being 0,
there will be a crash since creating a buffer of size 0
is invalid. A simple if-statement fixes this issue
2022-11-12 03:22:23 +01:00
niki 3b3bd63c93 vulkan: improve loop in createVulkanVertexFormat 2022-10-27 14:22:43 +02:00
slime 99ad576668 metal: implement storage texture support for shaders.
Fixes #1783
2022-10-10 13:47:17 -03:00
niki 1ab0d819ff vulkan: fix incorrect uniform values 2022-10-05 12:59:37 -03:00
slime 95bfd948ca vulkan: move StreamBuffer frame management to StreamBuffer implementation
Fixes crashes with lots of auto-batched draws in a frame.
2022-09-25 17:40:53 -03:00
niki 50cc954d6a vulkan: determine correct supported api version 2022-09-19 15:38:33 +02:00
niki 40ff636d6c vulkan: fix c++11 compatibility 2022-09-18 16:50:12 +02:00
niki 6e944f9db8 vulkan: fix memory leak in Shader 2022-09-18 05:55:37 +02:00
niki cf099946a1 vulkan: fix depth stencil textures 2022-09-18 00:18:32 +02:00
niki ccf8cb45c9 vulkan: implement storage and texel buffers 2022-09-16 00:30:26 +02:00
niki f4c38eb00a Revert "vulkan: use push constants for builtin uniforms"
This reverts commit 47e3fc85d2.
2022-09-15 15:55:47 +02:00
niki 47e3fc85d2 vulkan: use push constants for builtin uniforms
when available
2022-09-15 15:17:06 +02:00
niki 7866dde319 vulkan: use sdl to dynamically load vulkan 2022-09-14 13:31:09 +02:00
niki fd951909c0 vulkan: add more optional extensions
VK_KHR_dedicated_allocation, VK_KHR_buffer_device_address,
and VK_EXT_memory_budget can get used by VMA.
VK_KHR_spirv_1_4 can get used by the Shader.

VK_KHR_spirv_1_4 depends on VK_KHR_shader_float_controls.
VK_KHR_dedicated_allocation depends on VK_KHR_get_memory_requirements2
2022-09-11 15:03:40 +02:00
niki ef80e11b4d vulkan: add support for uniform texture arrays 2022-09-11 13:02:38 +02:00
niki 294761713f vulkan: fix bug: incorrect uniform values 2022-09-11 04:20:45 +02:00
niki 1658c89f3d vulkan: add support for custom depth/stencil tex 2022-09-11 01:57:23 +02:00
niki a93d153792 vulkan: adjust code styling 2022-09-10 17:40:46 +02:00