1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00
Commit graph

4117 commits

Author SHA1 Message Date
bjorn 51e3da75e1 Make utf8 module optional; 2023-05-11 08:16:18 +01:00
bjorn 4028b233a1 Model:clone;
Creates a lightweight copy of a Model, for situations where a single
model needs to be rendered with multiple poses in a single frame, which
is currently not possible.
2023-05-10 18:14:09 +01:00
bjorn 0bb16d24ef lovr.system.wasKeyPressed/Released; 2023-05-10 18:14:09 +01:00
bjorn be2502b3f2 Details; 2023-05-10 18:14:09 +01:00
bjorn da107f4387 Rename lovr.event.pump to lovr.system.pollEvents; 2023-05-10 18:14:09 +01:00
bjorn 98e648871e lovr.graphics.is/setTimingEnabled;
Enables automatic CPU/GPU timing for all passes.  Defaults to true
when graphics debugging is active, but can be enabled/disabled manually.

When active, Pass:getStats will return submitTime and gpuTime table
keys, respectively indicating CPU time the Pass took to record and the
time the Pass took to run on the GPU.  These have a delay of a few
frames.

This doesn't include a way to get "global" timing info for a submit.
This information would be useful because it doesn't require lovrrs to
sum all the timing info for all the passes and it would include other
work like transfers, synchronization, and CPU waits.  However, this is
more challenging to implement under the current architecture and will be
deferred to later.  Even if this were added, these per-pass timings will
remain useful.
2023-05-06 23:36:33 -07:00
bjorn 2e29ff1ecf Handle multiple compute writes to a resource properly; 2023-05-06 20:36:11 -07:00
bjorn 68808d991e Fix some bugs in lovr.graphics.submit;
- Make sure to reset barriers for compute/canvas resources too
- Delay stream ending so OpenXR layout transitions actually go in an
  active command buffer.
2023-05-06 20:32:16 -07:00
bjorn 5d342f3712 Fix readbacks never finishing; 2023-05-06 20:00:43 -07:00
bjorn b65fa7910d Merge branch 'master' into dev 2023-05-04 19:09:20 -07:00
bjorn d18109b6ce Use XR_BD_controller_interaction for Pico Neo 3 input;
Replaces nonstandard interaction profile.  Removed thumbrest paths and
applied menu to both hands, to align with the published extension.
2023-05-04 19:06:51 -07:00
bjorn a75086d0e4 Fix lovr.graphics.getWindowPass when there's no window; 2023-05-04 18:27:02 -07:00
bjorn f90cd237ca Add new occlusion query API; 2023-05-03 23:08:45 -07:00
Bjorn fd8bcdfaeb
Merge pull request #665 from bjornbytes/matrix-decompose
Mat4:getTranslation; Mat4:getRotation; Mat4:getScale;
2023-05-03 21:04:02 -07:00
bjorn 28553dda9f core/gpu: skip texture allocator init for unsupported formats;
Should avoid erroneous errors during init for devices that don't support
all the depth formats.
2023-05-03 21:00:41 -07:00
bjorn c717670a80 Add --graphics-debug command line argument; 2023-05-03 20:54:19 -07:00
bjorn 6fb0b5efd5 getPosition/getOrientation -> getTranslation/getRotation; 2023-05-03 20:42:44 -07:00
bjorn 04a96f828b Clear bindings when switching shader types;
If you switch to/from a compute shader and the other shader is either
nil or a graphics shader, clear bindings.

Maybe if you switch to/from nil the bindings shouldn't be cleared, but
this is a bit more complicated to implement and it's not clear that
there's any reason not to treat nil shaders as graphics shaders.
2023-05-03 20:16:30 -07:00
bjorn 0c99572f61 Fix/simplify push constant tracking; 2023-05-03 20:15:48 -07:00
bjorn 5131544221 Don't track temporary buffers;
This was accidentally removed.
2023-05-03 19:35:03 -07:00
bjorn e2ac329475 Add backwards compat variant for Pass:setCanvas; 2023-05-03 19:30:40 -07:00
bjorn 6fe9e0151f Add Pass:barrier function;
Previously, if you wanted to run compute operations that depend on the
results of prior compute operations, you had to put these in 2 different
passes, because logically all of the compute calls in a pass run "at the
same time" (or we're at least giving the GPU the freedom to do that).

Having to set up an entirely new pass just to synchronize 2 :compute
calls is pretty cumbersome, and incurs extra overhead.  It would be
possible to change things so *every* :compute call waits for previous
computes to finish, but this would destroy GPU parallelism.

The Pass:barrier method lets compute calls within a pass synchronize
with each other, without requiring multiple passes.  Adding a barrier
basically means "hey, wait for all the :compute calls before the barrier
to finish before running future :computes".

This lets things remain highly parallel but allows them to be easily
synchronized when needed.
2023-05-03 16:45:01 -07:00
bjorn 07276f9351 Fix Pass:setClear color space and headset background; 2023-05-03 16:35:09 -07:00
bjorn 452ee5c7c6 Pass rework;
Pass stores draw commands rather than sending them to Vulkan
immediately.

The main motivation is to allow more flexibility in the Lua API.  Passes
are now regular objects, aren't invalidated whenever submit is called,
and can cache their draws across multiple frames.  Draws can also be
internally culled, sorted, and batched.

Some API methods (tallies) are missing, and there are still some bugs to
fix, notably with background color.
2023-05-02 00:06:01 -07:00
bjorn 24a68ba648 OpenXR: Add an epoch so headset time starts at zero;
32-bit float precision can't handle huge XrTimes.
2023-05-01 19:09:35 -07:00
bjorn f96b915767 OpenXR: lastDisplayTime should be an XrTime; 2023-05-01 19:09:33 -07:00
bjorn f370da90d5 OpenXR: Always return a valid view count;
View count is well-defined to be 2 with the current view configuration,
and people should be able to rely on getViewCount even before the views
are tracked.  It returns the number of views in the view configuration,
not the number of views with valid data.
2023-05-01 18:59:15 -07:00
bjorn 6976a61464 Rename fill2d back to fill;
This rename was a mistake -- at the time I was thinking the fill shaders
were internal, but they definitely aren't.
2023-05-01 18:54:56 -07:00
bjorn 784440f5cb OpenXR: Handle zero timestamps; Handle tracking loss better;
- If timestamp is zero (before .update is called), return empty data
  instead of erroring.
- Check for valid position/orientation separately, and return empty data
  for anything that's invalid.  Previously both position/orientation
  were used if either was valid, which returns undefined results.
2023-05-01 18:49:59 -07:00
bjorn c115fd9c3a Simplify shader resource tracking; 2023-04-29 19:06:08 -07:00
bjorn f898a6f6b8 Linear allocator is no longer global to the graphics module;
Each Pass is gonna have its own allocator soon!
2023-04-29 18:35:01 -07:00
bjorn f98306e786 rm transfer passes; rm Tally for now;
- Add Buffer:newReadback
- Add Buffer:getData
- Buffer:getPointer works with permanent buffers
- Buffer:setData works with permanent buffers
- Buffer:clear works with permanent buffers
- Add Texture:newReadback
- Add Texture:getPixels
- Add Texture:setPixels
- Add Texture:clear
- Add Texture:generateMipmaps
- Buffer readbacks can now return tables in addition to Blobs using Readback:getData

Tally is coming back soon with an improved API, it's temporarily removed
since it made the transfer rework a bit easier.

Note that synchronous readbacks (Buffer:getData, Texture:getPixels)
internally call lovr.graphics.submit, so they invalidate existing Pass
objects.  This will be improved soon.
2023-04-29 18:31:03 -07:00
bjorn 775b6e4ff7 Rename some buffer helper functions; 2023-04-29 18:31:03 -07:00
bjorn c5cea29428 Mat4:getPosition; Mat4:getOrientation; Mat4:getScale; 2023-04-28 21:37:42 -07:00
bjorn dbc59b6749 Trailing comma nit; 2023-04-28 20:36:43 -07:00
bjorn 6c45c4df3c isDown/isTouched return nil instead of nothing; 2023-04-28 20:34:47 -07:00
bjorn 6862b8c970 Change cofactor/normal matrix to mat3;
This means per-draw uniform data is 128 bytes now!
2023-04-27 20:22:31 -07:00
bjorn e9d61bd254 Fix error typo; 2023-04-27 20:17:30 -07:00
bjorn b402745f6c Update comment; 2023-04-27 19:52:24 -07:00
bjorn b64fdc937f Move mapped buffers from core/gpu into graphics module; 2023-04-27 19:48:12 -07:00
bjorn 4563959ed1 Rename scratch buffers to temp buffers internally; 2023-04-27 19:15:56 -07:00
bjorn 8f654ed408 Simplify fill shaders;
Now there's 2 instead of 3!  Behavior is the same, fill goes
layer-by-layer onto each view until either the texture or canvas run out
of layers.
2023-04-26 22:18:06 -07:00
bjorn ad20289595 Make default compute shaders regular default shaders;
Minor cleanup;
2023-04-26 21:36:30 -07:00
bjorn f174755fc4 Fix accidental vec3->vec4 change;
Oops!  Too many ctrl-a's!
2023-04-26 17:31:02 -07:00
bjorn 4b8ada2690 Fix Pass:plane z scale / normal matrix;
Pass:plane was leaving its z scale uninitialized, which resulted in
a garbage normal matrix and other issues when using the transform in a
shader.  Planes were the only shape affected by this.
2023-04-26 17:27:00 -07:00
bjorn cb44549205 Fix more prototypes; 2023-04-25 21:45:30 -07:00
bjorn ad4978f692 Fix prototypes; 2023-04-25 21:37:14 -07:00
bjorn 6a030ef4f2 Add shader debug info when t.graphics.debug is set; 2023-04-19 20:49:34 -07:00
bjorn 56851fd0f2 Make builtin layouts constant instead of variable; 2023-04-14 21:27:47 -07:00
bjorn 70e5a69576 Cleanup; 2023-04-14 21:25:48 -07:00
bjorn 4bfab067ae Make shader input/output locations optional; 2023-04-14 21:21:14 -07:00
bjorn ba0412182b gpu: nickname shaders; 2023-04-05 21:53:39 -07:00
bjorn 024ea094a4 Fix Pass:roundrect bug;
It would draw a plane when radius was zero, even if it was supposed to
be thick.
2023-04-04 17:40:24 -07:00
bjorn 34c3e2c309 Fix Mesh validation and issues with untyped buffers; 2023-04-02 15:09:37 -07:00
bjorn f3448d3167 Improve error when buffer fields are missing; 2023-04-02 13:00:32 -07:00
bjorn 4f1e3a17e1 Improve error message for invalid first buffer arg; 2023-04-02 12:58:39 -07:00
bjorn 36e8ded0d8 Add helper function for getBuffer/newBuffer; 2023-04-02 12:54:19 -07:00
bjorn 01ba9927c1 Fix flipped condition when writing buffer data; 2023-04-02 10:09:06 -07:00
bjorn 9c054c0515 Add mouse input to lovr.system; 2023-04-01 13:08:47 -07:00
bjorn 94879c1529 Rebase fixes; 2023-03-31 18:45:40 -07:00
bjorn 26b52f83eb ModelData:getAnimationKeyframe works with blend weight animations; 2023-03-31 18:45:16 -07:00
bjorn 07a6d11c46 Split vertex animation into multiple dispatches as needed;
If the number of skinned vertices in a Model doesn't fit in a single
dispatch (~2M vertices on 32-sized subgroups or ~500K vertices on
8-sized subgroups), split it into multiple dispatches.
2023-03-31 18:45:16 -07:00
bjorn ff10461e69 Reduce blend shape chunk size from 128 to 64; 2023-03-31 18:45:16 -07:00
bjorn f56b48b3a7 Blend shapes and skinning work at the same time; 2023-03-31 18:45:16 -07:00
bjorn 4a6de6caf5 Write blend shape compute shader; Bugfixes; 2023-03-31 18:45:16 -07:00
bjorn 530db8c7f8 WIP blend shape compute dispatch; 2023-03-31 18:45:16 -07:00
bjorn 086aef1a79 Convert pipeline type bool into enum;
It's a little more readable.
Also batch compute passes for models with multiple skins, since they can
all run at the same time.
2023-03-31 18:44:31 -07:00
bjorn ce645c0285 Shader stores compute pipeline as pointer; 2023-03-31 18:44:31 -07:00
bjorn 764a88d70b Model(Data):getBlendShapeCount/Name; 2023-03-31 18:44:31 -07:00
bjorn 3b1414deac Ok redesign blend shapes but they're good now; 2023-03-31 18:44:29 -07:00
bjorn b118ac1938 Terrible blend shape Lua API; 2023-03-31 18:43:16 -07:00
bjorn e1908f4a49 Blend shape weight accessors; 2023-03-31 18:42:48 -07:00
bjorn f8f3a78d11 Model:animate can animate blend shape weights; 2023-03-31 18:42:48 -07:00
bjorn b1b78319b5 Model loads blend shape data and weights; 2023-03-31 18:42:45 -07:00
bjorn 21bb3eb096 ModelData parses blend shapes; 2023-03-31 18:39:39 -07:00
bjorn 9722800d67 Fix blend mode merge; 2023-03-30 19:51:59 -07:00
bjorn 6bca4663ee Merge branch 'master' into dev 2023-03-30 19:51:38 -07:00
bjorn 7b6618310a Fix blend mode merge; 2023-03-30 19:51:17 -07:00
bjorn e9c79417c7 Merge branch 'master' into dev 2023-03-30 19:40:39 -07:00
bjorn 7f5ab081f5 Use runtime preferred environment blend mode; 2023-03-30 19:39:50 -07:00
Josip Miskovic e7be0f900e Fix acos domain error in angle between two Vec3 2023-03-23 23:37:11 +01:00
Bjorn 2d8db03faa
Merge pull request #642 from bjornbytes/buffer-improvements
Buffer Format Improvements
2023-03-21 23:07:20 -07:00
bjorn bfbd17fc9f Zero-initialize spv_field memory;
Not all fields are guaranteed to get filled in.
2023-03-21 22:26:14 -07:00
bjorn aecfe544b6 core/spv: Support runtime arrays in struct fields;
These have their array length set to ~0u.
2023-03-21 22:25:48 -07:00
bjorn f32800c044 Clean up Model lookeruppers; Model:getMaterial takes string; 2023-03-21 21:30:11 -07:00
bjorn 4d5e3f03b9 Change the way a single stencil action is used;
When a single stencil action is provided in Pass:setStencilWrite, it now
maps to just passOp instead of all the ops.  This matches expectations
and previous versions.
2023-03-21 21:13:38 -07:00
bjorn aa2f620c89 Fix issue where changing shaders doesn't reset vertex format; 2023-03-20 13:54:38 -07:00
bjorn fa0576e42c Fix some magic numbers; 2023-03-20 13:54:38 -07:00
bjorn 8b30dc73d3 Fix backwards compatibility behavior;
Fixes (data, format) order when fields are given using integer keys
instead of string keys.
2023-03-20 13:54:38 -07:00
bjorn 8fa46fe236 Reading arrays of vectors works with temp vectors; 2023-03-20 13:54:38 -07:00
bjorn 92e9efd882 More flexible Buffer formats; Deprecate temp buffers;
- Pass:mesh accepts tables for vertices/indices
- Add Pass:setVertexFormat to set format used for table-based meshes
- Pass:send accepts tables for buffers
- Pass:send supports arbitrarily nested structs/arrays for push constants
- Buffer formats support arbitrarily nested structs/arrays
  - Zero-length buffers are valid and represent structs
  - Fields can have names using 'name'
  - Field types can be tables of other fields (structs)
  - Fields can have 'length' key
- newBuffer syntax has been changed to put format first (old version
  still works)
- Buffers can be created from shader variables, avoiding need to declare
  matching format.
- Pass:clear/Pass:read use byte offsets instead of indices
- Pass:copy uses byte offsets when copying a Buffer to a Buffer
- Deprecate lovr.graphics.getBuffer (tables can be used instead)
2023-03-20 13:54:37 -07:00
bjorn d2b2523306 Improve sampler2D error message;
- core/spv just returns the type of image variables instead of trying to
  validate them.
- When Shader is loading resources, it will reject combined image
  samplers, uniform/texel buffers, and input attachments, with better
  error messages that include the binding number of the invalid resource.
2023-03-20 13:15:47 -07:00
bjorn ffd6396aae Error when model uses absolute path; Ignore ./ in model paths;
Fixes #652
2023-03-13 21:14:47 -07:00
bjorn a2da95031b Merge branch 'master' into dev 2023-03-13 20:49:33 -07:00
bjorn 1d1470f042 Fix directory archive path normalization;
Fixes non-normalized paths not behaving as expected.
2023-03-09 21:27:04 -08:00
bjorn fe524452f3 Merge branch 'master' into dev 2023-03-09 18:37:25 -08:00
bjorn b33cc99374 Fix potential crash when creating textures;
beginFrame needs to be called a little bit earlier (before getting the
buffer to write the texture contents).
2023-03-09 18:36:23 -08:00
bjorn 2ad2fd6d90 OpenXR: Improve error messages;
- Error messages say what went wrong instead of file/line
- Instead of silently failing during startup, log a warning
2023-03-07 20:16:59 -08:00
mcc c3b63e60ba Create LOVR_NORETURN abstracting the contradictory noreturn implementations in C11 and C++11 2023-03-05 19:16:59 -05:00
Bjorn d8e856e6e0
Merge pull request #645 from mcclure/size-t-narrow
Address various MSVC warnings (casts, comparisons, function pointers)
2023-03-03 17:25:48 -08:00
Bjorn 5fa53b3812
Update error message; 2023-03-03 17:17:49 -08:00
mcc e4e8c5476b Warning fixes (fix style) 2023-03-03 15:48:41 -05:00
bjorn aba5f328fe Throttle when OpenXR session is idle; 2023-03-02 19:33:35 -08:00
bjorn ccffd3c1b2 Merge branch 'master' into dev 2023-03-02 18:31:20 -08:00
bjorn 6d382c2f0c Ensure blank images are cleared to zero;
This was an unintended change in v0.16.0.
2023-03-02 18:31:06 -08:00
mcc 52a7a51b8e Silence spurious function-pointer mismatch warning 2023-03-01 19:14:22 -05:00
mcc d00d908520 Silence signed/unsigned warning on rounded rectangle loop 2023-03-01 19:13:15 -05:00
mcc a5216347a0 Address size_t narrowing warnings in MSVC by adding casts. Add some asserts to make sure the casts are safe. 2023-03-01 18:15:04 -05:00
bjorn 4afb0ae2bf Fix Pass:clear(buffer); 2023-02-25 00:01:31 -08:00
bjorn 886db5f91d Stop using isdigit in obj importer; 2023-02-25 00:00:04 -08:00
bjorn abbc6a6dc6 Merge branch 'master' into dev 2023-02-21 21:12:33 -08:00
bjorn af4f1c1dea Fix compilation with glslang disabled; 2023-02-07 22:48:50 -08:00
bjorn 41dd24edc4 Organize math module files; 2023-02-07 21:44:43 -08:00
Bjorn d1eaa43997
Merge pull request #641 from brainrom/pkgrename
Android package rename via CMake
2023-02-05 21:57:25 -08:00
Bjorn 49489dc0e8
Apply suggestions from code review 2023-02-05 21:47:52 -08:00
bjorn 89edccbf4c Add lovr.headset.isPassthroughEnabled and lovr.headset.setPassthroughEnabled; 2023-02-05 19:51:12 -08:00
bjorn e4eb336bd6 Prevent creation of unrenderable texture views;
There were certain cases where an unrenderable texture view could be
created from a renderable parent texture (e.g. it has multiple mipmap
levels).  This would leave renderView as NULL, which would cause a
crash.
2023-02-05 17:34:24 -08:00
bjorn e076a582ce 3D depth textures can not have the 'render' flag;
Vulkan said so!!
2023-02-05 17:18:45 -08:00
bjorn a160def4e3 rm unreachable mipmap assert;
It's clamped earlier.
2023-02-05 17:15:15 -08:00
bjorn b76d9bbfe5 Ensure mipmap count is consistently 1 for render targets;
Currently if you create a texture from dimensions (assumed to be a
render target), its mipmap count differs depending on whether you
provide an options table.  Now it will consistently be 1.
2023-02-05 16:02:58 -08:00
bjorn 495fca5f23 Add a variant of Texture:newView for single slices/mipmaps;
This is a more convenient syntax for the common case of creating a 2D
view of a single slice/level of an array/cubemap/3D texture.
2023-02-05 15:15:11 -08:00
bjorn 06c150ce4e Pass:setBlendMode/Pass:setColorWrite take optional target index;
If the target index is missing, the state will apply to all targets.
Fixes undefined behavior when setting color state in a pass with
multiple color attachments.
2023-02-05 15:07:33 -08:00
bjorn b0c3bd6e4c Lightuserdata can be pushed to channels; 2023-02-04 14:08:22 -08:00
bjorn 8337dd9caf Vectors work with channels;
They are copied by value.  Upon popping, they are pushed as temporary
vectors.  Matrices are allocated on the heap, everything else is stored
in the Variant itself.
2023-02-04 14:03:12 -08:00
bjorn 2144b5f81d Backport Lua utf8 library; 2023-02-03 23:17:43 -08:00
bjorn fbc591802a Details; 2023-02-01 19:26:18 -08:00
bjorn 66cb43a665 Support elbow poses from hand tracking;
Via XR_ULTRALEAP_hand_tracking_forearm
2023-02-01 18:36:05 -08:00
bjorn bf98c066b4 t.math.globals also adds capitalized constructors; 2023-02-01 17:57:37 -08:00
bjorn b8b40bac40 Update stb_image to 2.28; 2023-01-31 18:20:26 -08:00
bjorn bf31072d0d Cleanup; 2023-01-30 19:44:23 -08:00
Ilya Chelyadin d84d358de7 Minor fixes 2023-01-31 06:03:53 +03:00
kokokoshka 85b6e36020 Android package rename via CMake 2023-01-30 20:35:49 +03:00
Ilya Chelyadin f0265a6f48 Disable headless OpenXR extension for Android 2023-01-29 23:45:23 +03:00
Ilya 933ae3a9ba
Merge branch 'bjornbytes:master' into picofix 2023-01-29 23:33:48 +03:00
bjorn d973020ce4 Add UVs to roundrect; 2023-01-27 00:32:21 -08:00
bjorn 2bccc4bf08 Increase max size of vector pool;
16k vec3s -> 4 million vec3s
2023-01-26 21:44:01 -08:00
bjorn 132b8d6003 Pass:roundrect; 2023-01-26 21:24:37 -08:00
bjorn d08cc539e8 Add vector constants;
They are implemented in the __index metamethod and return temporaries.
2023-01-24 18:37:04 -08:00
bjorn 017c2136fd Merge branch 'master' into dev 2023-01-24 18:36:27 -08:00
bjorn 4b0931a814 Change temp vector constructors to metatable __calls;
This enables a few things:

- Custom vector methods can be added/replaced.
- Vector methods can be called as non-methods e.g. vec3.normalize(v)
- Possibility for vector constants in an __index metamethod.

This was measured as increasing overhead by 3.5% when creating temporary
vectors (2ns), which is arbitrarily deemed acceptable.
2023-01-24 18:01:31 -08:00
bjorn 4e01f84070 Depth resolves;
- Allow multisampled render pass to have a single-sample depth attachment
- Add a new depthResolve feature, indicating whether it's supported
- Fix stencil load/save
- Minor changes to render pass caching
- Currently the depth resolve is done using the first sample.  A future
  improvement would be to expose/use the min/max/average resolve modes.
2023-01-22 23:30:57 -08:00
bjorn b24350fb31 gpu: macOS also tries linking to MoltenVK; 2023-01-21 15:27:14 -08:00
bjorn bee8d16427 Add error when render pass/texture sample counts don't match; 2023-01-21 12:16:35 -08:00
bjorn 5bb3f50d77 gpu: enable VK_EXT_swapchain_colorspace when available; 2023-01-20 22:02:32 -08:00
bjorn ffa4beb21c Fix thread refcounting;
Minor race condition between thread starting and thread getting released.
2023-01-19 15:05:04 -08:00
bjorn 4675dfb3e9 Fix build; 2023-01-18 18:21:53 -08:00
bjorn 14610333ab gpu: reduce tick count to 2;
4 is likely excessive, especially for VR, and increases memory usage and
cache misses.
2023-01-18 17:58:28 -08:00
bjorn 32cc6d52e7 gpu: cleanup;
- Surface stuff in struct;
- Struct for extensions;
2023-01-18 17:57:03 -08:00
bjorn ad76d2c0c6 gpu: Require and use VK_KHR_create_renderpass2;
It's pretty much ubiquitous and is needed for depth resolves.
2023-01-16 16:25:39 -08:00
bjorn 3e0d2a1ecf core/os: window size is always in framebuffer units;
pixel density is exposed as a separate accessor.
2023-01-10 19:54:48 -08:00