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.
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.
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!
Sigh, back to getPass. I don't even know at this point. Basically now
that we came up with a half-solution for temp buffers, it makes sense to
apply this to passes as well, since we aren't going with the workstream
idea and temp passes are more convenient than retained passes.
It uses newPass instead of getPass. Temporary objects had lifetime
issues that were nearly impossible to solve. And normal objects are
easier to understand because they behave like all other LÖVR objects.
However, Pass commands are not retained from frame to frame. Pass
objects must be re-recorded before every submit, and must be reset
before being recorded again.
Pass objects now provide a natural place for render-pass-related info
like clears and texture handles. They also allow more information to be
precomputed which should reduce overhead a bit.
It is now possible to request a stencil buffer and antialiasing on the
window and headset textures, via conf.lua.
lovr.graphics.setBackground should instead set the clear color on the
window pass. Though we're still going to try to do spherical harmonics
in some capacity.
There are still major issues with OpenXR that are going to be ironed
out, and the desktop driver hasn't been converted over to the new
headset Pass system yet. So lovr.headset integration is a bit WIP.
OpenXR provides APIs to enumerate the supported refresh-rates, and
selecting a new refresh-rate. This patch adds two new APIs to the
lovr.headset module:
- lovr.headset.getDisplayFrequencies():
Returns a table containing the supported refresh-rates on
success; nil otherwise.
- lovr.headset.setDisplayFrequency(refreshRate:number):
Returns true on success, false otherwise.
Only the OpenXR backend has support for this feature and it is
gated by the "refreshRate" feature flag, similarly to what the
"getDisplayFrequency()" API does.