Commit Graph

5257 Commits

Author SHA1 Message Date
Sasha Szpakowski 75fd2fa06e metal: add debug labels for internal buffers. 2024-03-10 13:08:04 -03:00
niki 54f27a8277 vulkan: unify local uniform buffer 2024-03-10 14:41:37 +01:00
Bart van Strien 89cffddb15 Build each module as its own static library
Which means everything still mostly behaves the same, except we now have
cmake targets which we can manipulate, rather than a bunch of global
variables.

For ease of use I've matched the existing variables, so love.event is
split into love_event_root and love_event_sdl, and there is a separate
(pseudo) target love_event which combines them both.

I have also simplified the windows-specific additions to liblove.
Instead of altering the variables, they now just add to the liblove
target.

Unfortunately, it does mean we lose the global include directory list,
so we need to add dependencies on a per-module basis. The upside is that
this more accurately models the dependencies. If you remove a module,
its dependencies should now automatically go unused.
2024-03-10 14:41:28 +01:00
Bart van Strien 032e30b8ef Use custom targets for dependencies
Not the most beautiful system, but provides us with a simple way to
unify megasource and non-megasource builds.

Also replaces LOVE_LUA_LIBRARY, since we now have a target to name.
2024-03-10 14:41:28 +01:00
Bart van Strien e21fd60677 Fix and simplify love_disable_warnings
It just re-implemented target_compile_options.

While I was editing it anyway, call it closer to the target definition,
so it's easier to find.
And as it turns out, after diffing, love_disable_warnings only disabled
warnings on the first target anyway, so I guess this fixes a "bug".
2024-03-10 14:41:28 +01:00
Bart van Strien 7e0cdfc5ed Simplify definition of 3rd-party libraries
They (mostly) called add_library anyway, the extra indirection of all
those variables had no real value.

For header-only libraries I've left the definitions in there, in
comments. That may not do anything, but the previous definition of
unused variables had no effect either.
2024-03-10 14:41:28 +01:00
Bart van Strien daff7ef11f Adjust OpenAL include paths to proper include paths
We add the subdirectory AL to the include paths, so our includes should be relative to that. Presumably it would previously work with the wrong paths because some other library would be there.
2024-03-10 14:41:28 +01:00
Bart van Strien 12f57109e1 Build separate love target on android too
Instead of smushing love.cpp into liblove and having an extra "codepath" for that, just build the love target as a shared library.
2024-03-10 14:41:28 +01:00
Bart van Strien fa5566e7d4 Use fixed cmake target names and set OUTPUT_NAME instead
That means we can still change the target name, while having consistent names throughout the file.
And while I'm at it, deal with the version number in the library name for linux in the same code path.
Also upgrade the variables to cache variables, so you can easily change the names. This was previously impossible because they were target names.
2024-03-10 14:41:28 +01:00
Bart van Strien 5ebb6f1c70 Determine version string earlier
So I can use it in the upcoming commits.
2024-03-10 14:41:28 +01:00
Bart van Strien cd5fc414a1 Update minimum cmake version
Not necessarily needed yet, but given our target platforms, this seems
like a sane minimum version. Also means we don't need the separate
policy settings, since the new minimum version already enables the new
behaviour.
2024-03-10 14:41:28 +01:00
Bart van Strien 718475aef6 Fix indentation in CMakeLists
Was mostly using tabs, so replace the few lines that used spaces.
2024-03-10 14:41:28 +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 b08f35d341 vulkan: only set cubemap compatibility for array textures with >= 6 layers. 2024-03-09 16:01:26 -04:00
Sasha Szpakowski 892411a737 don't error during newShader if a buffer is unused. 2024-03-09 13:22:39 -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
Sasha Szpakowski 51d5773b93 vulkan: optimize vertex buffer binding code 2024-03-09 00:15:13 -04:00
Sasha Szpakowski 52f33041a5 Fix Shader:send with storage buffers. 2024-03-08 17:52:48 -04:00
Sasha Szpakowski 5f3b9574b8 Merge pull request #2034 from nikeinikei/main
Fix #2032
2024-03-08 10:50:37 -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 321143755f metal: clean up some shader resource binding code 2024-03-07 21:53:40 -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 99af5765fc tests: don't skip love.graphics.isActive test on vulkan 2024-03-07 21:00:45 -04:00
Sasha Szpakowski 3509e651fd Fix Texture:getWidth for texture views. 2024-03-06 14:23:18 -04:00
Sasha Szpakowski 3f25183d03 Merge pull request #2030 from ellraiser/main
small test update
2024-03-06 08:11:15 -04:00
ell c4fd14c4fd handle missing expected img for compareImg() 2024-03-06 09:41:57 +00:00
ellraiser ea215ad31c Merge branch 'love2d:main' into main 2024-03-06 09:19:02 +00:00
ell 81599fed93 small update
- removed assertPixels()
- added exportImg() to help graphics test writing (sets the "expected" image for the test)
- added "deflate" variants to love.data.compress()
2024-03-06 09:18:44 +00:00
Sasha Szpakowski 32e777c156 vulkan: fix a crash. 2024-03-05 23:03:55 -04:00
Sasha Szpakowski 026e9f164a tests: add a few more shader uniform tests 2024-03-05 21:01:05 -04:00
Sasha Szpakowski 01fbedb225 vulkan: improve some error messages when shader compilation fails. 2024-03-03 12:40:23 -04:00
Sasha Szpakowski 7798a5eed3 Merge pull request #2028 from ellraiser/main
more test coverage
2024-02-29 14:09:02 -04:00
ell c7e7565a3c indentation 2024-02-29 17:49:24 +00:00
ellraiser 5e9de41986 Merge branch 'love2d:main' into main 2024-02-29 10:38:30 +00:00
ell ced6448011 attempt to fix opengl ES not running as ES on windows runner 2024-02-29 10:17:14 +00:00
ell 23bd9110dd add callback variant for love.graphics.captureScreenshot 2024-02-29 09:54:49 +00:00
ell 3dfa13e60c requested changes 2024-02-29 09:20:18 +00:00
Sasha Szpakowski fe56f88f8e opengl es: expand support for rendering to floating point formats. 2024-02-28 17:55:37 -04:00
ell 7cc3816bec finish physics module coverage
- love.physics.World:rayCastAny()
- love.physics.World:rayCastClosest()
- love.physics.World:getShapesInArea()
- love.physics.Body:getShapes()
- love.physics.Body:getShape()
- love.physics.Body:hasCustomMassData()
2024-02-28 18:38:43 +00:00
ellraiser 3723e35caa Merge branch 'love2d:main' into main 2024-02-28 17:51:06 +00:00
ell 990259edf9 more tests
- added custom error handler so that love is closed if a crash occurs rather than hang on the graphic screen (for runner crashes mainly)

- updated missing functions left todo in todo.md and removed list from readme.md to make it easier to keep track of

- added love.audio.getPlaybackDevice(), love.audio.getPlaybackDevices(), love.audio.setPlaybackDevice()

- added love.data.ByteData:setString()

- added love.filesystem.getFullCommonPath(), love.filesystem.mountFullPath(), love.filesystem.unmountFullPath(), love.filesystem.moundCommonPath(), plus optional b/t/bt params to love.filesystem.load()

- added love.keyboard.isModifierActive()

- added love.sound.SoundData:copy() and love.sound.SoundData:slice()

- added love.graphics.Texture:isCanvas() and love.graphics.Texture:isComputeWritable()

- added love.image.ImageData:isLinear(), love.image.ImageData:setLinear(), and love.image.ImageData:encode("*.exr")

- added love.image.CompressedImageData:isLinear() and love.image.CompressedImageData:setLinear()

- added love.system.getPreferredLocales()

- added love.window.focus() and removed love.window.close() (now deprecated)
2024-02-28 17:49:51 +00:00
Sasha Szpakowski 8ba72d8cf1 opengl: the computewrite flag isn't supported for sRGB textures. 2024-02-28 13:20:11 -04:00
Sasha Szpakowski ff06718f8a opengl: only populate Shader:getWarnings string when there are warnings. 2024-02-27 23:17:24 -04:00
Sasha Szpakowski 57fab45c2c tests: draw points at the center instead of corner of pixels. 2024-02-27 22:54:37 -04:00
Miku AuahDark 6d15098ce2 Android: Workaround Java out of memory, attempt 2. 2024-02-27 11:18:42 +08:00
Miku AuahDark 60d4de1a6c CI: Add Android build steps. 2024-02-26 21:19:11 +08:00