Commit Graph

4505 Commits

Author SHA1 Message Date
bjorn 58cc96414a Add flag to omit GLFW from build; 2022-12-10 20:29:36 -08:00
bjorn f013831b73 Reorganize thread code;
- Put channel into thread module file.
- Make thread internals private.
- Handle more thread bookkeeping in thread module instead of Lua API.
- Fix a few race conditions/leaks nobody was probably ever going to hit.
2022-12-10 20:13:39 -08:00
bjorn 06dad182db Fix mounted directories with non-empty mountpoints;
Mounting directories with mountpoints wasn't treating the components
in the mountpoint path as virtual directories.
2022-12-10 18:25:09 -08:00
bjorn 74a9b90e93 Fix zip archive enumeration;
Zip archives weren't enumerating in the root directory when they were
mounted with a non-empty mountpoint.  Additionally, zips mounted at the
root directory weren't listing files properly.  This fixes both by
normalizing the mountpoint prefix (it had a prepended slash when it was
empty, which messed up hashing), and ensuring there is a "root node" in
the tree with an empty string.
2022-12-10 18:25:09 -08:00
Bjorn 3fb9445149
Merge pull request #613 from brainrom/patch-1
Check for thread handle
2022-12-10 13:53:57 -08:00
bjorn 5edbfdbffb Pass:cone supports 2-endpoint variant; 2022-12-10 13:51:16 -08:00
Ilya 10675761e2
Check for thread handle 2022-12-11 00:47:20 +03:00
bjorn e63d142009 Fix refcounting when creating Font from Rasterizer; 2022-12-10 13:35:03 -08:00
bjorn 36070e828c Add missing validation for rendering to depth textures; 2022-12-10 11:20:56 -08:00
bjorn 71df5176ad Fix lovr.event.quit on Android; 2022-12-10 00:12:55 -08:00
Ilya Chelyadin 48aad15b1f Fix comma 2022-12-08 07:12:59 +03:00
Ilya Chelyadin f62c99e469 Fix typos, indentation, minor issues 2022-12-08 07:05:30 +03:00
Ilya bd767092f3
Merge branch 'bjornbytes:master' into picofix 2022-12-07 19:50:13 +03:00
bjorn b5c14da4a6 Pass:line errors if only 1 point is provided; 2022-12-04 18:01:20 -08:00
bjorn bb46fa5745 Pass:line copies tables of vectors to vertices better;
Using vec3_init writes 4 floats which can, extremely rarely, go past the
end of the vertex buffer.
2022-12-04 18:00:24 -08:00
bjorn 7bd3546aa9 Fix Pass:line ignoring temporary vectors in tables; 2022-12-04 17:58:49 -08:00
bjorn 98b5fcfd20 Improve Vulkan error messages;
Instead of printing the raw Vulkan error printed, a friendly error
message gets printed out with the Vulkan error in parentheses.
2022-12-04 01:58:53 -08:00
bjorn 6678af02a2 rm some unnecessary GLFW window hints; 2022-12-03 23:29:49 -08:00
bjorn efc81e4cec Fix some gcc warnings; 2022-12-03 01:20:02 -08:00
bjorn a615351f66 Actions; Sponsors; README; 2022-12-02 18:14:31 -08:00
Ilya 92c136bc73
Merge branch 'bjornbytes:master' into picofix 2022-12-01 21:20:33 +03:00
bjorn e2c73edabb Clear GPU memory pointer later; 2022-11-27 20:51:11 -08:00
bjorn 72ecd9cb04 Fix issue recycling GPU memory blocks;
When a memory block is used for host-visible memory, its mapped pointer
is tracked with the block.  If that memory is freed and later re-used
for some non-mappable memory, the pointer never gets cleared, and so
code thinks the memory is mappable and tries to use the pointer.
2022-11-27 19:55:27 -08:00
Josip Miskovic cbe3c45548 Trim whitespace in Texture:hasUsage name 2022-11-26 17:41:48 -08:00
bjorn cad98d8b2b Mat4:reflect;
Creates a matrix that reflects across a plane given as a position and
normal vector.
2022-11-26 15:34:58 -08:00
bjorn f9d7742dfd Add support for headless headset rendering;
Although the name is unfortunate, this allows access to lovr.headset
when no window is opened or when the graphics module is disabled.  This
requires the XR_MND_headless extension to be supported by the runtime.
2022-11-26 14:40:39 -08:00
bjorn b4b2b56c90 CMake: Don't recompile shaders on every build;
Recompile them only when needed.
2022-11-26 14:20:09 -08:00
Ilya Chelyadin 13d8c4a207 Interaction profiles suggestion improvement
At least one profile should be supported. Monado fails on Neo 3 profile.
2022-11-25 21:16:42 +03:00
bjorn 4422df2a47 Variant small string optimization; 2022-11-24 15:40:43 -08:00
bjorn 0c281bca50 Change default setProjection far plane to 0;
It was accidentally left at 100, which will cause problems.
2022-11-24 14:58:40 -08:00
bjorn e9776f98c6 Fix compatibility with Lua 5.2, 5.3, 5.4;
Part of this involved putting the Lua header back in api.h, since we
need to know the Lua version to define some macros properly.
2022-11-24 14:33:55 -08:00
bjorn 23f747d4c3 Fix CMake; 2022-11-23 14:12:58 -08:00
bjorn 8f74778c19 Error if require path is too long instead of truncating; 2022-11-23 14:08:32 -08:00
bjorn e426520144 Blob:getString takes an optional byte range; 2022-11-23 12:21:32 -08:00
bjorn 53da4dd1dc rm File again;
forks please yell if you still need it
2022-11-23 11:58:42 -08:00
Ilya Chelyadin 3f20364c3f Pico is back!
Tested on Pico Neo 3 with PUI v4.9.3
Also included generic (Monado-Android) Android flavor.
2022-11-22 22:01:13 +03:00
bjorn dbdd22ae95 Compute passes release their shaders properly;
Active shader was only getting released for render passes.
2022-11-21 19:52:41 -08:00
bjorn 7f2618227f Fix off-by-one tick number in readbacks;
Only when a readback is read back before a pass is created.

Should really change gpu to know if the frame has started yet and adjust
the tick index accordingly.
2022-11-21 19:42:41 -08:00
bjorn 0c966ba216 gpu: destroy readback scratchpads properly; 2022-11-21 19:42:13 -08:00
bjorn be3faf8822 Fixes for Vulkan initialization; 2022-11-17 20:32:24 -08:00
bjorn 3879ce926d Improve Vulkan initialization;
- Check for layers before enabling
- Check for instance/device extensions before enabling

Fixes unfriendly errors when running on a system without validation layers
installed.

Uses same table approach as OpenXR code.
2022-11-16 20:21:03 -08:00
bjorn 7b3e1a02eb Fix newShader when nil is used as a stage's code; 2022-11-16 18:12:06 -08:00
bjorn 6d1bbe9c5c Fix Android build on new NDKs;
Some Android header defines DEPTH, which clashes with a symbol in the
OpenXR driver.  This change just stops using Android headers in there
and declares more granular private functions.  It also removes a few
unused private os functions.
2022-11-15 20:35:39 -08:00
bjorn b9ef1772da LÖVR no longer depends on system-installed Vulkan;
Experimental.
2022-11-14 20:54:43 -08:00
bjorn 58dc7ee9dd Add missing check for sample usage in material textures; 2022-11-14 20:10:23 -08:00
bjorn b61dbab21b newTexture resets usage when table is provided; 2022-11-14 20:03:58 -08:00
bjorn c2f12f1fd4 Fix matrix rotation decomposition when matrix has scale;
Similar to mat4_getAngleAxis, quat_fromMat4 and mat4_getOrientation need
to divide by the scale.
2022-11-14 19:46:01 -08:00
bjorn 9277b38273 Use fancy syntax for model data map indices;
Matches nodes.
2022-11-14 19:20:29 -08:00
bjorn d5ebb796b3 Mat4:set uses TRS order when scale is present; 2022-11-14 19:19:23 -08:00
bjorn c61d6b059b Merge branch 'master' into dev 2022-11-14 19:19:17 -08:00