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
9d5828a62f
metal: don't try to enable blending with integer canvases.
2024-08-14 19:15:23 -03:00
Sasha Szpakowski
8e67fd5861
metal: fix compile error
2024-06-15 15:02:44 -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
03f364e131
graphics: bind internal depth-compare textures to unbound sampler2DShadow vars.
2024-05-03 20:56:13 -03:00
Sasha Szpakowski
59e18df392
metal: fix varying matrices and arrays.
2024-04-13 16:48:44 -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
b5b6d07108
metal: fix shader:send with fields in an array-of-structs.
2024-03-30 12:03:20 -03:00
Sasha Szpakowski
63aba28d18
metal: fix shader compilation when using void effect() with MRTs.
2024-03-11 19:14:25 -03:00
Sasha Szpakowski
ec9fb6eb28
Improve Windows vulkan draw performance by reducing the size of a struct.
2024-03-10 14:33:29 -03:00
Sasha Szpakowski
321143755f
metal: clean up some shader resource binding code
2024-03-07 21:53:40 -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
64a30f177f
Merge branch 'main' into 12.0-development
2024-02-10 12:24:48 -04:00
Sasha Szpakowski
bf6a6f1237
metal: error when generated SPIR-V shader IR can't be parsed
2024-01-09 21:29:54 -04:00
Sasha Szpakowski
7ff6f74a92
metal: improve shader resource binding code.
2024-01-09 21:11:04 -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
Sasha Szpakowski
8872497561
graphics: handle default textures in high level code.
...
Previously each backend had to set up default textures with its own code, which needs some care for it to be robust.
2023-12-27 21:28:02 +01:00
Sasha Szpakowski
bd55100d56
metal: fix compile error
2023-10-14 15:02:28 -03:00
Sasha Szpakowski
f6cdbdc868
Merge branch 'main' into 12.0-development
2022-12-31 22:46:34 -04:00
slime
99ad576668
metal: implement storage texture support for shaders.
...
Fixes #1783
2022-10-10 13:47:17 -03:00
Alex Szpakowski
171533dbf8
Another shader fix for metal+iOS
2022-02-15 21:16:55 -04:00
Alex Szpakowski
caf89998cc
iOS: fix shader compilation with metal
2022-02-15 21:12:13 -04:00
Alex Szpakowski
7216a022f9
metal: remove unused internal code
2022-02-04 22:09:50 -04:00
Alex Szpakowski
6e49b1f901
metal: fix texture sampler changes not affecting draws using shaders.
2022-01-31 21:25:49 -04:00
Alex Szpakowski
1cf0073cf4
metal: use a fallback for fonts when luminance-alpha isn't supported.
2022-01-22 14:41:42 -04:00
Alex Szpakowski
cf57c3eedf
update copyright year for metal files
2022-01-05 21:13:53 -04:00
Alex Szpakowski
674143175f
metal: fix Shader:send with matrices and arrays.
2022-01-05 20:33:08 -04:00
Alex Szpakowski
9709f95194
metal: fix structs in uniforms.
2022-01-01 17:41:23 -04:00
Alex Szpakowski
e602f08c24
metal: support constant initializer values for local uniforms.
2022-01-01 15:28:42 -04:00
Alex Szpakowski
30fe00d767
metal: implement storage buffer bindings
2021-12-25 14:21:45 -04:00
Alex Szpakowski
c6e4cfdc64
metal: initial love.graphics.dispatchThreadgroups implementation
2021-12-24 23:04:44 -04:00
Alex Szpakowski
759937a458
metal: fix depth24stencil8 fallback on macOS
2021-12-24 22:20:25 -04:00
Alex Szpakowski
dab174b120
metal: fix a couple compiler warnings
2021-12-24 18:04:11 -04:00
Alex Szpakowski
7a910484c3
Fix compilation
2021-12-24 16:45:23 -04:00
Alex Szpakowski
7851124260
metal: work on storage buffers
2021-09-05 13:18:10 -03:00
Alex Szpakowski
b1692a4000
metal: implement internal Shader::setVideoTextures method
2021-04-07 20:12:15 -03:00
Alex Szpakowski
0bc574ef4e
metal: fix Shader:send not flushing the active auto-batch.
2021-04-04 23:49:23 -03:00
Alex Szpakowski
2ec9f88f7a
metal: more robust render pass handling.
...
Initial implementation of captureScreenshot.
Fix getStats().shaderswitches.
Fix getStats().drawcalls.
2021-04-04 23:47:58 -03:00
Alex Szpakowski
8c88d645a3
metal: avoid redundant resource binding calls.
2021-04-03 13:49:29 -03:00
Alex Szpakowski
a4d0761e84
metal: work on depth/stencil textures, MSAA
2021-04-02 22:10:01 -03:00
Alex Szpakowski
3accf51eb2
metal: explicitly compile to metalsl 2.1
2021-04-02 18:10:46 -03:00
Alex Szpakowski
1e90b4e8f7
metal: fix shader uniform names
2021-04-02 15:45:17 -03:00
Alex Szpakowski
5fa570b9a6
metal: initial texel buffer Shader:send implementation
2021-03-31 23:02:36 -03:00
Alex Szpakowski
1b9b32c7a7
metal: clean up some shader code
2021-03-31 20:38:37 -03:00
Alex Szpakowski
52d4a5c679
metal: initial shader texture binding implementation.
...
rework metal shader compilation/parsing.
2021-03-31 18:35:57 -03:00
Alex Szpakowski
aad0810e11
metal: initial (bad/slow) setShader tracking
2021-03-29 18:28:06 -03:00
Alex Szpakowski
1e85e1b414
metal: fix Buffers, fix shader cleanup
2021-03-27 22:21:00 -03:00
Alex Szpakowski
da6fd95a64
metal: more work on shader uniforms
2021-03-27 17:37:53 -03:00