Commit Graph

93 Commits

Author SHA1 Message Date
Sasha Szpakowski 111bbde32d vulkan: fix shaders with int vertex attributes when nothing using that attribute is drawn. 2024-04-11 22:35:43 -03:00
Sasha Szpakowski d40b78be76 vulkan: fix shader cross-stage io (varying) location mapping. 2024-04-08 17:59:06 -03:00
Sasha Szpakowski 92a03719e2 vulkan: fix validation errors when a resource is declared in multiple stages. 2024-04-06 21:38:12 -03:00
Sasha Szpakowski aded2621a3 vulkan: use uniform shader stage masks when setting up descriptor set layouts. 2024-04-06 20:24:10 -03:00
Sasha Szpakowski 455d02c695 vulkan/metal: fix a typo preventing non-array struct field uniforms from working. 2024-04-06 09:46:40 -03:00
Sasha Szpakowski e08004d338 vulkan: fix uniform vec3 array alignment 2024-04-01 23:06:19 -03:00
Sasha Szpakowski a0ca3c148e vulkan: improve handling of vertex attribute bindings. 2024-03-31 12:55:40 -03:00
Sasha Szpakowski c764626a6a vulkan: fix shader:send with fields in an array-of-structs. 2024-03-30 12:20:52 -03:00
Sasha Szpakowski f3887361e5 Merge pull request #2037 from nikeinikei/main
vk: unify local uniform buffer
2024-03-13 18:33:56 -03:00
Sasha Szpakowski 63aba28d18 metal: fix shader compilation when using void effect() with MRTs. 2024-03-11 19:14:25 -03:00
niki 295fb214d5 vulkan: remove unused constant and use correct sizes for mapping
the local uniform stream buffer
2024-03-11 13:47:43 +01:00
niki 54f27a8277 vulkan: unify local uniform buffer 2024-03-10 14:41:37 +01:00
Sasha Szpakowski b6c47cd3ec vulkan: fix typo preventing storage textures in shaders from working. 2024-03-09 16:09:26 -04:00
Sasha Szpakowski 10565e9967 vulkan: improve draw performance via Shader::cmdPushDescriptorSets. 2024-03-09 13:22:15 -04:00
Sasha Szpakowski be377601f7 vulkan: shader binding mapper works with arrays of resources 2024-03-09 13:07:23 -04:00
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