Sasha Szpakowski
5c63a945b8
Fix typo
2025-01-26 16:54:03 -04:00
Sasha Szpakowski
92e79ab609
vulkan: reduce memory usage when many shaders are being used with many draw calls.
...
Descriptor pools are now shared among shaders that have the same descriptor counts, instead of being unique per shader.
2025-01-26 14:45:51 -04:00
Sasha Szpakowski
324b0f831b
vulkan: improve error messages
2025-01-25 12:11:58 -04:00
Sasha Szpakowski
fe4fc84659
vulkan: implement MSAA textures.
2024-12-01 14:23:13 -04:00
Sasha Szpakowski
1ee89154c0
vulkan: memory barrier after compute dispatches.
2024-09-30 19:58:45 -03:00
Sasha Szpakowski
876625d7e3
move common shader:send texture/buffer code to platform-agnostic layer.
...
Fixes issues in the Metal backend when a shader using a readonly buffer is created.
2024-09-19 22:41:31 -03:00
Sasha Szpakowski
50ff1e4d2b
use location numbers for vertex input attributes, instead of name-based binding.
...
- add 'location' named field to buffer and mesh vertex format tables, replaces 'name' field.
- location numbers are expected to match 'layout (location = #)' qualifiers in vertex inputs in shader code.
- deprecate vertex inputs in shader code that don't have layout location qualifiers.
- love's default vertex attributes use location 0 for position, 1 for texcoord, and 2 for color.
- add new variants of Mesh:attachAttribute, setAttributeEnabled, and isAttributeEnabled which take location numbers instead of names.
Improves draw performance in vulkan and metal backends.
2024-09-07 18:06:03 -03:00
Sasha Szpakowski
ee91a87873
vulkan: fix descriptor pool sizes with arrays of samplers.
2024-08-04 15:07:23 -03:00
Sasha Szpakowski
35f20eb053
vulkan: move cached PSO ownership to shaders.
...
Fixes issues with state corruption when a shader is created with the same memory address as a recently deleted shader.
2024-06-24 18:31:34 -03:00
Sasha Szpakowski
3a31b60ca6
vulkan: fix shader stage IO location mapping.
2024-06-22 22:10:42 -03:00
Sasha Szpakowski
46402d4ff7
vulkan: fix missing resource validation in Shader:send
2024-06-22 16:32:10 -03:00
Sasha Szpakowski
ca9aa81744
vulkan: improve performance and memory usage when there are many draws without many texture/buffer changes.
...
Descriptor set updates only happen if a resource binding changed since the last draw. Uniform data uses a dynamic uniform buffer descriptor so it doesn't need to update the descriptor set if only the offset changes between draws.
2024-06-21 22:44:30 -03:00
Sasha Szpakowski
2eb8198dba
metal/vulkan: fix uniform numbers and vectors in arrays of structs.
2024-06-15 14:46:27 -03:00
Sasha Szpakowski
e92df0a231
vulkan: fix shader creation when using a varying matrix.
2024-04-12 17:52:37 -03:00
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