Commit Graph

5211 Commits

Author SHA1 Message Date
bjorn cdecc1bae7 Add defer system; Rework exceptions; util cleanup;
Defer can be used to clean up resources when an error occurs.
2024-03-29 18:10:22 -07:00
bjorn 67e228125b Add d24 TextureFormat;
LÖVR uses d32f by default, but that's not guaranteed to be supported.

However, GPUs must support either d32f or d24, so we can fall back to
d24 reliably.
2024-03-29 18:07:25 -07:00
bjorn c37cd3852f tup: add -Wno-strict-prototypes for now;
glslang and ODE are the troublemakers.  I updated glslang but I'm too
lazy to update ODE, so I'm just gonna wait until we switch to jolt.
2024-03-29 18:04:42 -07:00
bjorn b7e1b5111e jolt: fix some shape memory leaks; 2024-03-29 15:26:10 -07:00
bjorn c5d6bb6b48 jolt: rm matrix copies;
JoltC now uses floats for its RVec/RMatrix structs in single precision
mode, so we can operate on them as mat4's directly, copy/cast them, etc.
2024-03-29 15:26:03 -07:00
bjorn 87cd13d95c jolt: adjust includes; 2024-03-29 15:25:41 -07:00
bjorn 822eb94993 CMake: rm physics library log messages; 2024-03-29 14:54:35 -07:00
bjorn cfd2374449 Update Jolt; 2024-03-29 14:50:00 -07:00
bjorn 55f0da97ce Update glslang; 2024-03-28 21:00:24 -07:00
bjorn e7d0764e49 Update Jolt;
Also disable the HelloWorldNative sample...
2024-03-28 15:28:40 -07:00
bjorn f4553075cb Upgrade Jolt;
Seems we can add the root CMake project directly now.
2024-03-28 12:58:33 -07:00
bjorn fd7fe08055 Upgrade lovr-http; 2024-03-28 12:47:35 -07:00
bjorn 8ec7a18c28 Update lua-enet; 2024-03-28 12:46:20 -07:00
bjorn 7373bb6b83 Bump minimum CMake version;
Newer versions of CMake show a deprecation warning that < 3.5 will be
unsupported soon.
2024-03-28 12:42:22 -07:00
bjorn abd2eddf0d Fix some strict prototype warnings; 2024-03-23 13:12:26 -07:00
bjorn 70e4b9fd7b actions: Adjust MoltenVK paths for newer SDK version;
The MoltenVK folder was removed from the SDK in favor of the macOS folder.
2024-03-17 21:37:48 -07:00
bjorn 8fc5d4fd24 actions: Update macOS Vulkan SDK version;
This version includes VK_KHR_synchronization2, which LÖVR uses now.
2024-03-17 20:42:25 -07:00
bjorn ef8d1abf87 Update changelog; 2024-03-17 14:02:56 -07:00
bjorn cc4567652e Merge branch 'stable' into dev 2024-03-17 13:59:31 -07:00
bjorn d50f661ce6 Fix possible negative dt when restarting simulator; 2024-03-17 13:59:13 -07:00
bjorn 26d17fc402 boot.lua: exit successfully when printing help; 2024-03-12 13:32:26 -07:00
Bjorn 27c59de5dc
Merge pull request #759 from brainrom/patch-2
Fix boot.lua merge
2024-03-12 13:21:39 -07:00
Ilya 994f623c5d
Fix boot.lua merge
boot.lua was broken during merging with stable branch.
2024-03-12 23:12:29 +03:00
bjorn 9c2c4f6906 Update changelog; 2024-03-12 12:02:17 -07:00
bjorn 2b218d09d0 Merge branch 'stable' into dev 2024-03-12 11:58:34 -07:00
bjorn 66f6ee9bb9 v0.17.1; 2024-03-12 11:56:30 -07:00
bjorn 38f05b9f01 Update OpenXR to 1.0.34;
(cherry picked from commit 48e484ed8a)
2024-03-12 11:06:20 -07:00
Josip Miskovic a84385a030 Fix Model:getMesh()
(cherry picked from commit 37fdb39e73)
2024-03-12 11:05:22 -07:00
bjorn c17abe4f24 CMake: disable BUILD_WITH_WAYLAND_HEADERS for OpenXR;
(cherry picked from commit 78586c3770)
2024-03-12 11:04:42 -07:00
bjorn 053893f3f6 Bump OpenXR to 1.0.33;
(cherry picked from commit da5a6cec10)
2024-03-12 11:04:38 -07:00
bjorn b09d612e6b Validate that intra-buffer copy has non-overlapping ranges;
(cherry picked from commit 06bfbbaa6b)
2024-03-12 11:04:14 -07:00
bjorn 561b20699a Fix error when loading a Model without any vertices;
(cherry picked from commit 3712bc3fba)
2024-03-12 11:03:33 -07:00
bjorn aff97b7a30 glTF: support glb models without BIN chunk;
(cherry picked from commit 35f97f08f3)
2024-03-12 11:02:21 -07:00
bjorn 1f6904c04b Fix errhand loop when debug library is unavailable;
(cherry picked from commit dacc17e1b7)
2024-03-12 11:02:00 -07:00
Josip Miskovic 8c3c0f8136 Bound check the number of sphere segments
(cherry picked from commit 3db04db05a)
2024-03-12 11:00:42 -07:00
bjorn 1e02de6cda Fix depth write not working when depth test is disabled;
A classic

(cherry picked from commit 5c46d6169a)
2024-03-12 10:55:21 -07:00
bjorn 24c13e88d3 Fix render pass cache when compiling pipelines;
Comparing the lower 32 bits to the full hash was producing false
negatives and causing unnecessary render pass creation when creating
pipelines.

(cherry picked from commit 83f106b89f)
2024-03-12 10:55:16 -07:00
bjorn 5611a6130b Fix cubemap orientation;
+Z is the front face in a cubemap, not -Z.  Currently cubemap faces are
flipped in both the X and Z directions.

Some kind of flip is required because cubemaps use a left-handed
coordinate space instead of lovr's/vulkan's right-handed coordinate
space.

Equirect does not need any changes.

(cherry picked from commit 1b1bc182bf)
2024-03-12 10:53:28 -07:00
bjorn 35228f1838 Create files/directories with more permissions;
Files are created with 664 (though usually modified by umask).

Directories are created with 755 permissions.

Main motivation is to allow adb to access files on Android 12+

(cherry picked from commit 9445331df8)
2024-03-12 10:46:14 -07:00
Josip Miskovic 0e9171e2dd Use virtual memory in vector pools
(cherry picked from commit a1d7bf5fbc)
2024-03-12 10:44:43 -07:00
bjorn ae1edd95e7 Skip creating texture views for transfer-only textures;
Vulkan forbids it!

(cherry picked from commit eac68d2fe4)
2024-03-12 10:41:20 -07:00
bjorn d097d9819d Add wrappers for malloc functions; 2024-03-11 14:38:00 -07:00
bjorn 2d7b636a90 Change more asserts to checks; 2024-03-11 00:58:21 -07:00
bjorn 0d8d6f579b rm unused lovrImageClear prototype; 2024-03-11 00:57:59 -07:00
bjorn aa79822edb Fix VertexIndex;
Adding an offset to VertexIndex/BaseVertex breaks those builtins for
shader code.  Instead, go back to binding the vertex buffer at an
appropriate offset.

This means we rebind the vertex buffer and makes it harder to batch
draws.  In the future we'd like to go back to binding all vertex buffers
at zero and incorporating per-draw vertex offsets, but we'll need to
adjust the VertexIndex macro to subtract that offset.
2024-03-10 10:36:13 -07:00
bjorn 1cda2d59a7 gpu: increase max number of memory blocks to 1024;
We are allocating buffers in smaller chunks now (4MB), and only 256 of
those would limit GPU memory usage to 1GB (in reality the cap is much
higher since static buffers and textures are still suballocated, and any
allocation bigger than 4MB will use its own block).  Still, in some
degenerate cases with huge amounts of temporary buffer memory, we are
hitting this limit earlier than we'd like.
2024-03-08 12:03:55 -08:00
bjorn f93fb0c0c7 Set buffer tick properly when destroying pass;
This was causing one of the pass's buffers to be unrecyclable.
2024-03-08 11:56:23 -08:00
bjorn 4719dbdd10 Fix crash with timestamp readback; 2024-03-07 10:26:35 -08:00
bjorn 9068c8daee rm map_remove;
It's no longer used.
2024-03-07 10:13:00 -08:00
bjorn f9cfc4e76e Update changelog; 2024-03-05 09:14:16 -08:00