Commit Graph

4389 Commits

Author SHA1 Message Date
bjorn b81f86b5ad rm Android flavors for now;
There used to be oculus and pico but pico doesn't work anymore.

Eventually things will converge on the standard loader and we won't
need different loaders, but manifests may require flavors.
2022-11-09 00:21:49 -08:00
bjorn 8dc1d3192b Update README screenshot URLs; 2022-11-08 19:08:47 -08:00
Josip Miskovic 34611f2069 Add physics heightfield shape 2022-11-08 18:46:49 -08:00
bjorn 36e1471cf0 lovr.graphics.isInitialized;
Returns whether the graphics module is initialized.  Used by the default
error handler to know if it's safe to try to render the error screen.
2022-11-07 19:12:11 -08:00
bjorn 5e2b44ad08 Fix stereo mirror window;
For some reason this was rendering both layers of a multi-layer
texture all squished.  I think it was supposed to just render the
first layer.
2022-11-07 17:14:27 -08:00
bjorn c021fc40ef gpu: fix memory type selection;
When a fallback memory type is found, don't skip the check for a perfect
match.
2022-11-06 11:19:33 -08:00
bjorn d36a6a22d9 Don't skip GPU submits if there's nothing to do;
- It can still be useful to do an empty submit
- It's good to still do validation of the passes
2022-11-03 13:53:06 -07:00
Josip Miskovic 92975d34fc Cannot use Android-built glslang on desktop 2022-10-31 17:59:42 -07:00
bjorn 67627f4aab Fix shader slot type assignment; 2022-10-31 17:55:26 -07:00
bjorn 64591c02ed gpu: Also try to load libvulkan.so.1;
Some systems don't have libvulkan.so
2022-10-24 22:12:54 -07:00
bjorn 56b091227d tup: rm cc override; 2022-10-20 21:28:54 -07:00
bjorn 1a12904800 Fix gpu_release; rm morgue flush; increase morgue size;
- When a memory block was freed, any allocators that were using it need
  to null out their memory blocks.  Otherwise it would just keep using
  the freed block.
- The emergency morgue expunge doesn't work.  It would be nice if it
  did, but if the emergency expunge deletes an object that exists in a
  command buffer that's still being recorded, it causes all kinds of
  problems and corrupts the command buffer.  You'd either need to submit
  these command buffers early before deleting the object (this is super
  tricky) or just prevent this entirely, maybe by growing the morgue
  infinitely or throwing an error if it fills up.  Either way, creating
  and releasing textures in a loop without submitting work will
  eventually throw an 'out of memory' error.  None of this is
  satisfactory and I'm not sure how to solve this well yet.
- To compromise, increase the size of the morgue a bit so emergency
  flushes happen slightly less often.
2022-10-20 20:21:55 -07:00
bjorn 3958c006fa Don't generate mipmaps for textures without initial contents; 2022-10-20 19:37:00 -07:00
bjorn 0b6fe9c81a Fix off-by-one error in gpu allocator;
Refcount wasn't being initialized to 1.
2022-10-18 22:28:14 -07:00
Josip Miskovic 9b6e884f7f Remove problematic bindings from Index controller
The "system" button on Valve Index controller may not be exposed to
applications through OpenXR. Oculus runtime throws error when binding
for that button is attempted.
2022-10-18 21:50:48 -07:00
bjorn 3b3d2d4e77 Fix newBoxShape dimensions; 2022-10-16 19:53:44 -07:00
bjorn 904fb282c2 v0.16.0; 2022-10-15 21:49:25 -07:00
bjorn 20cb0d1c0a Tiny tup fix; 2022-10-15 21:48:55 -07:00
bjorn 93b465bd1f gpu: Use portability extensions when needed;
This makes newer versions of macOS load Vulkan properly.
2022-10-15 00:45:46 -07:00
bjorn df8f52a71b Fix gcc warnings; 2022-10-12 10:57:43 -07:00
bjorn 82dc3cc920 Fix multiview limit;
When multiview is not supported (although technically lovr requires it),
the renderSize limit for array layers was zero, which meant no render
passes would work.  Instead, make sure it's at least 1, which is more
correct.
2022-10-12 10:37:58 -07:00
bjorn f8ad6e58ba tup: Allow overriding cc/cxx; 2022-10-12 00:46:48 -07:00
bjorn 1c3be230c0 Desktop driver implements hand/left/point device; 2022-10-12 00:46:48 -07:00
bjorn c59c242b7b Fix newTexture; 2022-10-12 00:46:48 -07:00
Ryan Pavlik 7d0ac1520a Use the internal glslang submodule for compiling shaders
Fixes #579
2022-10-06 12:11:01 -07:00
bjorn ee3cc30851 Animator renormalizes quantized weights;
It would be nice to do this in the importer, but it was 50+ lines and
was really tricky to write without reading from uncached GPU-mapped
memory.  Instead, it's 1 line here.

I hope zero-weight vertices aren't a thing?
2022-10-03 01:29:01 -07:00
bjorn ef87ec8cba CMake: Build OpenXR as dll on windows; 2022-10-02 15:07:12 -07:00
bjorn 0d7ed04789 Fix Quest pinch axis; 2022-10-02 14:00:52 -07:00
Josip Miskovic 5ab6eaadda Include openxr loader dll when enabled 2022-09-30 08:26:29 -07:00
bjorn 272893fe66 Use correct array length for depth range; 2022-09-28 19:16:55 -07:00
bjorn b5620fb185 Revert "Fix Quest hand model orientation;"
This reverts commit a766bf4a35.
2022-09-26 14:58:34 -07:00
bjorn cd04060467 Use correct roughness for indirect specular lighting; 2022-09-23 23:58:47 -07:00
bjorn d905b649a4 Lighting helper fixes; 2022-09-23 23:44:31 -07:00
bjorn a766bf4a35 Fix Quest hand model orientation; 2022-09-23 17:52:21 -07:00
bjorn d2ceb6b81a Fix skeletal animation on some GPUs;
The animation compute shader was not specializing the workgroup size
properly, so it was only working on GPUs with a subgroup size of 32.

The Quest 1 has a subgroup size of 32 and the Quest 2 has a subgroup
size of 64, so this resulted in hand models breaking on Quest 2 only!
2022-09-23 14:36:20 -07:00
bjorn 4316c39c5d Update Oculus OpenXR loader to v42; 2022-09-23 14:36:07 -07:00
bjorn 74218da271 Fix luax_checkendpoints when direction is not normalized; 2022-09-23 11:58:26 -07:00
bjorn ef407fd564 Add var shader helper;
Now you can write var(0) instead of layout(set = 2, binding = 0).
The advantage is less typing and resilience in the event that the
default set changes.
The disadvantage is that now you can't use var.
2022-09-22 20:44:06 -07:00
bjorn 2e0b5a4efa Flip msdf glyphs;
They don't look right when using a negative y scale for some reason,
even though the rendering was still working.
2022-09-22 20:30:04 -07:00
bjorn dd336b7473 Render target textures don't have mipmaps by default; 2022-09-21 21:18:32 -07:00
bjorn 952bff414a Add more oculus manifest permissions;
- Keyboard tracking
- Render model
- Passthrough
2022-09-21 14:58:30 -07:00
bjorn 311d1511bc Fix quest keyboard tracking; 2022-09-21 14:58:30 -07:00
Josip Miskovic da9328e72c Fix sending strings with \0 through channels
A null-char is valid part of Lua string. When such a string is sent
through the channel, its length should be stored as well to be able to
correctly reconstruct it on the other thread.

The bug was triggered with this code:

    s1 = 'a \0 b'
    print(#s1) -- 5
    ch:push(s1)
    s2 = ch:pop()
    print(#s2) -- 2
2022-09-21 09:15:20 -07:00
bjorn 72334cc1f2 Fix cubemaps being horizontally flipped; 2022-09-20 22:17:58 -07:00
bjorn ece73be868 lovr.headset.getPose works with keyboard device on Quest; 2022-09-20 20:16:58 -07:00
bjorn d1b6bd3d15 OpenXR: fall back to d24s8 when d32fs8 isn't supported;
Window was already doing this.

Quest currently doesn't work with stencil = true because of this.
2022-09-20 19:09:04 -07:00
bjorn 28869431fb Fix stereo mirror window; 2022-09-15 20:45:26 -07:00
bjorn 6444aba832 OpenXR: Map Index system buttons to menu;
SteamVR doesn't expose these, but monado does, so might as well bind them.
2022-09-14 21:35:43 -07:00
bjorn 4f4477b6c8 CMake: Fix plugins that use static libraries; 2022-09-14 21:33:24 -07:00
bjorn adaef45e2f tup: use -Os when invoking glslangValidator;
Saves a bit of space.
2022-09-14 20:53:42 -07:00