Commit Graph

4436 Commits

Author SHA1 Message Date
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 c7b4ebbc55 newShader validates overlapping vertex input locations. 2024-09-07 17:36:34 -03:00
Sasha Szpakowski cbadb06182 lower max vertex attributes from 32 to 30, some platforms don't support that many 2024-09-07 17:35:56 -03:00
Sasha Szpakowski 6c67835b6a vulkan: fix typo in error message 2024-09-07 17:35:15 -03:00
Sasha Szpakowski 26a7389a4d add internal function to pack blend state into 32 bits. 2024-09-07 17:34:10 -03:00
Sasha Szpakowski e6e5ec0ab5 glslang: add support for validating overlapping vertex input locations in OpenGL GLSL. 2024-09-07 17:32:50 -03:00
thfrwn 7672a4f06b avoid accessing array at index -1 2024-08-30 08:10:16 -04:00
Sasha Szpakowski d1e58ab38b Texture:replacePixels supports CompressedImageData. 2024-08-28 21:14:15 -03:00
Sasha Szpakowski 2d606b1f0c Small performance optimization for mesh drawing. 2024-08-23 21:32:03 -03:00
Sasha Szpakowski 746aefef15 Fix readbackTexture when using a preexisting sRGB ImageData. 2024-08-21 17:19:19 -03:00
Sasha Szpakowski ccdd7897f2 fix love.window.setMode failing to set an exclusive fullscreen mode. 2024-08-18 13:08:27 -03:00
Sasha Szpakowski 654585ccc2 vulkan: don't try to enable blending with integer canvases. 2024-08-14 21:00:24 -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 8e2fc44a65 vulkan: fix texture<->buffer copying when there's an offset into the texture 2024-08-13 18:02:30 -03:00
Sasha Szpakowski ff2f57bdd4 fix msaa in love.window.getMode not updating after setMode. 2024-08-10 21:05:49 -03:00
Sasha Szpakowski a48639d112 update https library to love2d/lua-https@76d92e7 2024-08-10 17:54:23 -03:00
Sasha Szpakowski 36fa78f392 workaround for nvidia shader compiler bug on very old windows drivers. 2024-08-10 11:12:27 -03:00
Sasha Szpakowski 1b8a5013a3 drawing a points mesh with the default shader doesn't cause an error. 2024-08-08 21:15:58 -03:00
Sasha Szpakowski 0ca8cb4b41 vulkan: fix negative scissors not being clamped. 2024-08-05 10:21:10 -03:00
Sasha Szpakowski ee91a87873 vulkan: fix descriptor pool sizes with arrays of samplers. 2024-08-04 15:07:23 -03:00
Sasha Szpakowski 15dfc8db0b Canonicalize getFullCommonPath paths.
Fixes getRealDirectory test.
2024-08-03 19:53:46 -03:00
Sasha Szpakowski e94b8c3d04 love.filesystem canonicalizes internal full paths where possible.
resolves #1693.
resolves #1100.
2024-08-03 19:33:55 -03:00
Sasha Szpakowski 29ae5e6273 Fix channel order when encoding EXR files.
Fixes #2070.
2024-08-03 18:04:27 -03:00
Sasha Szpakowski 31f27693bc shaders: enable validation for pixel shader inputs that are missing from the vertex shader. 2024-07-31 19:42:43 -03:00
Sasha Szpakowski 42f85b8a5c update glslang 2024-07-31 19:42:06 -03:00
Engineer Smith f8d86a78fc Made newDataView size optional 2024-07-29 20:28:14 +01:00
Sasha Szpakowski 9b362dbef9 vulkan: narrow layout transitions to used mips/layers in a couple situations. 2024-07-21 17:12:38 -03:00
Sasha Szpakowski 304bf8bb83 metal: fix texture memory tracking 2024-07-16 17:44:58 -03:00
Sasha Szpakowski 679f3bdaa9 error if a volume texture is created with a depth/stencil pixel format. 2024-07-16 16:46:59 -03:00
Sasha Szpakowski 0d95aeaa68 update stb_image 2024-07-15 21:09:03 -03:00
Sasha Szpakowski be4a47d04f macOS: remove some compiler warnings 2024-07-15 20:56:48 -03:00
Sasha Szpakowski d5b9606b20 Fix range limits for queueable source buffer counts. 2024-07-15 18:50:54 -03:00
Sasha Szpakowski 906f615a9e disallow texture:replacePixels and non-canvas textures for depth/stencil pixel formats. 2024-07-15 17:55:31 -03:00
Sasha Szpakowski bb5cea6d7d clean up setCanvas error checking code 2024-07-15 17:44:03 -03:00
Sasha Szpakowski 35e443545e Fix some compile warnings 2024-07-15 17:33:49 -03:00
Sasha Szpakowski 72af731320 Fix wording of some error checks in setCanvas. 2024-07-15 17:24:21 -03:00
Sasha Szpakowski b99fce2425 metal: fix depth texture compare mode setting. 2024-07-11 21:42:52 -03:00
Sasha Szpakowski 6acdd5f01f vulkan: fix depth texture compare mode setting. 2024-07-11 21:29:58 -03:00
Sasha Szpakowski af35953fc1 improve text rendering consistency when using fractional DPI scales. 2024-07-08 22:55:48 -03:00
Sasha Szpakowski 7a4380514e Improve letter spacing and line heights of high dpi text.
resolves #1918
2024-07-07 16:54:18 -03:00
Sasha Szpakowski 05288b3e70 fix build 2024-07-06 15:39:26 -03:00
Sasha Szpakowski 248fbb9eb1 Fix the left side of quads in text with non-1.0 dpi scales.
issue #1918
2024-07-06 15:32:58 -03:00
Sasha Szpakowski c1fddfe3bc Fix initial texture atlas size of fonts with high dpi scales 2024-07-06 15:31:11 -03:00
Sasha Szpakowski 9f18595559 vulkan: reduce memory use in some situations 2024-06-28 21:53:03 -03:00
Sasha Szpakowski b16e1d6e27 vulkan: don't periodically clean up render pass objects.
It's not needed.
2024-06-24 18:41:52 -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
Miku AuahDark 5ee6c5befd Android: Fix love.window.getSafeArea() not working.
Fixes #2081.
2024-06-23 19:32:28 +08:00
Sasha Szpakowski 3a31b60ca6 vulkan: fix shader stage IO location mapping. 2024-06-22 22:10:42 -03:00
Sasha Szpakowski 2e1e48bc9d Merge pull request #1966 from Labrium/sdf-font-hintingmode
Add SDF HintingMode
2024-06-22 22:06:23 -03:00
Labrium 85cd98ffe5 Fix mono and sdf rendermode conflicts 2024-06-22 18:13:47 -06:00