Commit Graph

1121 Commits

Author SHA1 Message Date
bjorn de44f88b5f rm XR_KHR_android_create_instance;
It's not needed anymore.
2022-08-26 23:21:01 -07:00
bjorn 54a5ca1c36 Initialize stencil mask state slightly better;
Not sure this has an effect but it seems better.
2022-08-26 22:23:28 -07:00
bjorn cf474fe392 Shader flags can start with flag_;
It will be ignored for matching purposes.
2022-08-26 10:22:53 -07:00
bjorn 8e44a271df Fix default mipmap count for texture views; 2022-08-26 09:58:01 -07:00
bjorn 5a2fe54c04 Improve Pass:fill;
It can now fill an array texture to a multiview pass, copying to
the corresponding layers.
2022-08-26 09:57:51 -07:00
bjorn f4f95a64d7 Pass blends by default; 2022-08-25 22:01:12 -07:00
bjorn 78214988a4 Model only reskins when needed;
Saves a barriers when not animating models.
2022-08-25 21:59:10 -07:00
bjorn ede1036694 Temporary Passes;
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.
2022-08-25 21:57:15 -07:00
bjorn d3c93634ad Fix KTX1 cube/array loading; 2022-08-23 20:17:19 -07:00
bjorn 0496b81f23 Improve KTX1 error messages; 2022-08-23 20:16:58 -07:00
bjorn b8df6f9651 Fix rg11b10f KTX1 loading, I think; 2022-08-23 20:15:36 -07:00
bjorn 1a809666ec Fix loading KTX files with mipmaps;
Forgot to allocate memory for mipmaps.
2022-08-23 20:15:16 -07:00
bjorn 1c48578e95 Fix automipmap synchronization; 2022-08-23 18:49:11 -07:00
bjorn e4024d82c4 Improve error messages for invalid view index; 2022-08-23 18:18:44 -07:00
bjorn 8dfc67d59c Add missing checks for automipmap transfer usage; 2022-08-23 18:17:38 -07:00
bjorn 79cd7c10a1 Improve temporary buffers;
- They no longer live in temporary memory, but in a dedicated pool.
- There are error checks for using a temporary buffer after it's invalid
  - However, these are imperfect, and could be improved.  One idea is to
    avoid recycling a temporary buffer until its refcount decays (i.e.
    Lua finally decides to garbage collect it).  This would explode
    memory usage sometimes, so it could only be enabled when
    t.graphics.debug is true.
2022-08-22 20:30:09 -07:00
bjorn 10252686aa Fix typo; 2022-08-22 20:18:47 -07:00
bjorn 8b83626051 Increase size of swapchain format array; 2022-08-20 11:03:14 -07:00
bjorn dd5e89523d Fix BC1/BC4 sizes; 2022-08-19 23:15:18 -07:00
Josip Miskovic fcc684ac28 Handle fullscreen fill without texture 2022-08-18 09:04:42 -07:00
bjorn f515346e20 Rename CoordinateSpace;
It's now OriginType, and global -> root and local -> parent.
2022-08-17 22:33:43 -07:00
bjorn 3e8b1681df Pass:mesh supports baseVertex; 2022-08-17 18:09:04 -07:00
bjorn 8bbff5dd77 lovr.graphics.present idempotence; 2022-08-14 12:02:51 -07:00
bjorn 6fa8b570da Fix OpenXR usage of setBackground; 2022-08-13 21:21:17 -07:00
bjorn 5799b0effb Rename setBackground back to setBackgroundColor;
The "fancy background" idea won't go here.
2022-08-13 21:10:58 -07:00
bjorn 6052ed7a95 Rename ModelData enums;
To better match graphics.
2022-08-13 21:10:03 -07:00
bjorn f679d602bd Fix cone winding; 2022-08-12 23:30:33 -07:00
bjorn d69ec7bff0 Default friction is infinity;
Re-apply bug behavior
2022-08-12 23:30:13 -07:00
bjorn 3cbf85c98a Adjust error screen font size and default perspective; 2022-08-12 21:08:25 -07:00
bjorn ad6360d2fd Clean up boot.lua;
A lot of clean up can happen now that C doesn't push delayed errors to
Lua.  This was happening for Pico and WebVR, neither of which are used
anymore.

Also default vsync to true but force it off if VR is active.
2022-08-12 20:18:55 -07:00
bjorn 0be94e0f1a Set default material normalScale to 1; 2022-08-12 17:44:29 -07:00
bjorn 3b33f4917e Fix vertex format binding; 2022-08-12 17:43:41 -07:00
bjorn 7e5221492d rm pointSize from Material;
It's weird, and about as inconvenient as just putting it in the shader.
2022-08-09 19:54:54 -07:00
bjorn 63a327c0b2 Add getLighting builtin function to shaders; 2022-08-09 19:49:47 -07:00
bjorn 31d49fe8c6 When graphics module is destroyed, stop XR session;
Terrible, but better.
2022-08-08 23:27:35 -07:00
bjorn 0436a5deae Rework automipmapping;
The sync was totally wrong here.  It's a bit better now.  However there
are some general sync issues that need to be fixed.  Basically a Pass
that does reads and writes or multiple writes doesn't work properly, for
various reasons.  I think sync needs to be split into 2 phases -- first
process all the reads and merge barrier bits into the barrier of the
last writer, then process all the writes and set 'final' resource state
for stuff in the pass.  Due to branch prediction it may be better to
have 2 separate lists -- one for reads and one for writes.  And I'm not
100% sure on how to reconcile a Pass that is doing reads and writes to
the same resource yet, still thinking about it.
2022-08-08 21:26:07 -07:00
bjorn bf2f5a398c Fix defaultMaterial; 2022-08-08 20:40:57 -07:00
bjorn f310a7ad04 gpu_bind_bundles;
Now you can bind multiple bundles at once.
2022-08-08 20:36:22 -07:00
bjorn d88a7bdc8b Forbid Pass appearing twice in same submit; 2022-08-07 22:29:26 -07:00
bjorn 2ebb4bb415 Improve OpenXR layout transitions a bit; 2022-08-06 23:25:49 -07:00
bjorn 8aa1cf91b2 Submit depth buffer to OpenXR; 2022-08-06 22:52:18 -07:00
bjorn eba71d5921 Fix more warnings; 2022-08-06 19:23:41 -07:00
bjorn a2ee485d41 Fix most windows warnings in graphics code;
Co-authored-by: mcc <andi.m.mcclure@gmail.com>
2022-08-06 18:05:30 -07:00
bjorn 7efd19c45c Add uniform buffer for global constants;
So far it has resolution and timestamp.

Broke the nogame shader, need to recompile.
2022-08-06 13:37:27 -07:00
bjorn 642388709b Shader helper improvements; 2022-08-06 13:06:42 -07:00
bjorn c41188c4b4 Merge branch 'master' into dev 2022-08-06 11:08:02 -07:00
bjorn dd4fa5c382 Synchronize Material textures; 2022-08-06 00:50:25 -07:00
bjorn 6011e61d52 Fix lovr.headset.newModel and lovr.headset.animate; 2022-08-06 00:29:46 -07:00
bjorn 73f61b35b3 Fix background color space; 2022-08-05 22:14:09 -07:00
bjorn 2a3215fa05 Make indirect draws a :mesh variant; 2022-08-05 22:11:43 -07:00