Commit Graph
1956 Commits
Author SHA1 Message Date
Mathias Agopian c780804fd6 Merge branch 'main' into ma/descriptor-sets 2024-08-21 10:27:31 -07:00
Mathias Agopian 1c2ffc9ed4 new screenshot debug option in gltf_viewer
screenshots are saved in the current directory as 
"screenshotXX.ppm" with XX increasing after each
screenshot.
2024-08-20 22:41:49 -07:00
Mathias Agopian f098d08c48 Merge branch 'main' into ma/descriptor-sets 2024-08-19 17:13:44 -07:00
Mathias Agopian 063affb612 more improvement of csm display 2024-08-19 17:13:03 -07:00
Mathias Agopian 9c857f64ae improve split-view mode
- side panel doesn't overlap with content anymore
2024-08-19 17:13:03 -07:00
Mathias Agopian 8fe7c1ff30 Merge branch 'main' into ma/descriptor-sets 2024-08-14 22:47:16 -07:00
Sungun Park 9de29a475e Add warning for the incompatibility of stereo type (#8031)
Print a warning in case the sterescopic type in a compiled package is
different than what's in the engine's setting. The application may
proceed, but it could end up visual glitches when enabling stereoscopic
rendering.

This requires the stereoscopic type to be written into the package,
which needs a material version bump.
2024-08-13 01:31:10 +00:00
Mathias Agopian a1f146ebea Merge branch 'main' into ma/descriptor-sets 2024-08-12 15:05:43 -07:00
Mathias Agopian 06bffaa650 fix a couple precondition checks logs 2024-08-12 14:49:44 -07:00
Mathias Agopian 9401d6be9e fix warning about missing case
this is to allow -Werror to work.
2024-08-11 23:53:16 -07:00
Mathias Agopian 8797f45bd0 Merge branch 'main' into ma/descriptor-sets 2024-08-08 13:27:20 -07:00
Benjamin Doherty 9750ddb9db Add type_traits header 2024-08-05 10:59:46 -07:00
Mathias Agopian f04a25028e Merge branch 'main' into ma/descriptor-sets 2024-08-01 22:19:16 -07:00
Mathias Agopian a2f5b635d1 don't mix seq_cst with other memory orders
this change shouldn't have any impact on ARM, however, according
to cppreference it's not safe to mix seq_cst with other memory
orders:

"as soon as atomic operations that are not tagged memory_order_seq_cst 
enter the picture, the sequential consistency guarantee for the program 
is lost"
2024-07-31 10:11:01 -07:00
Balaji M 2d21fcbe55 [gltfio] Initialize mCgltfBuffersLoaded to fix crash (#7999)
Value of mCgltfBuffersLoaded is sometimes retained across creation of FAssetLoader which skips loading the buffer in AssetLoaderExtended#createPrimitive leading to null pointer crash
2024-07-31 02:12:04 +00:00
Powei Feng 189e36d539 Merge branch 'main' into ma/descriptor-sets 2024-07-31 10:11:51 +08:00
Mathias Agopian 8add6ae1ac fix a potential crash is AssetLoader
if it can't find a name for a node, it will revert to the config's
defaultNodeName, however, if that is nullptr also, a crash will occur.
so we provide a last-resort hardcoded name in that case.
2024-07-25 22:44:34 -07:00
Mathias Agopian cba819be8f Merge branch 'main' into ma/descriptor-sets 2024-07-25 17:25:08 -07:00
Powei Feng 7441e878bb gltfio: enable escaped unicode for node name (#7989)
Fixes #7846
2024-07-25 09:06:56 +00:00
Mathias Agopian 41e1e7e54b Merge branch 'main' into ma/descriptor-sets 2024-07-24 15:38:12 -07:00
Mathias Agopian be4f287b07 More improvements to the JobSystem (#7988)
* improve parallel_for a bit

We get about 40% performance increase. The gain comes from not having
to copy the JobData structure each time we create a job, by using a
new emplaceJob() method, we can create the structure directly into
its destination.

* avoid calling wakeAll() when possible

wakeAll() is very expensive and not always needed when a job finishes
because there may not be anyone waiting on that job.

We now maintain a waiter count per job, and use that to determine if
we need to notify or not.

And now that the JobSystem overhead is lower, we can decrease the size
of the jobs, which improves the load balancing.

* mActiveJobs fixes

some comments claimed mActiveJobs needed to be modified before or after
accessing the WorkQueue; this couldn't be correct because there were no
guaranteed global ordering with the workQueue.
2024-07-24 15:34:36 -07:00
Mathias Agopian a60fe41681 performance improvements to JobSystem
- reduce the number of calls to notify_one() and notify_all().
  notify_one() is not only called when running a new job, and
  notify_all() only when a job finishes.

- don't hold the condition lock while calling notify_*(), as it is not
  strictly needed, and because notify_*() can be very slow, there can
  be a lot of contention on this lock as a result; blocking the whole
  jobsystem thread pool.

- add a new version of run() that takes an opaque thread id that can
  be retrieved from a job's execute function; this is especially
  intended to be used by parallel_for(); it's just a more efficient
  version of run() that avoids a hashmap lookup.


Overall these change yield a significant performance boost:
- running + waiting a job: +200%
- running many jobs: +150%
- running many jobs in parallel: +50%
2024-07-22 11:12:51 -07:00
Mathias Agopian fef40a8c5d Merge branch 'main' into ma/descriptor-sets 2024-07-19 10:09:28 -07:00
Ben Doherty 8eda62c957 Update imgui to v1.90.9 (#7977) 2024-07-18 16:38:25 -07:00
Balaji M 3728f06603 utility::loadCgltfBuffers is done once instead of doing for each primitive (#7969) 2024-07-12 23:22:25 +00:00
Mathias Agopian d299b1f00e Merge branch 'main' into ma/descriptor-sets 2024-06-28 13:20:28 -07:00
Ben Doherty ca4c7ac739 Update cgltf to 1.14 (#7945) 2024-06-28 13:10:41 -07:00
Mathias Agopian daa2790c4e Merge branch 'main' into ma/descriptor-sets 2024-06-28 12:54:46 -07:00
Mathias Agopian f7a5111106 switch to new morphing API
- remove deprecated morphing APIs
- repair gltfio, samples and tests

The new API doesn't allow a MorphTargetBuffer per RenderPrimitive,
instead the MorphTargetBuffer is specified per Renderable.

gltfio separates RenderPrimitives from Renderables, in particular all
RenderPrimitives are created before their Renderable; this was
problematic for this change because all primitives must share
a single MorphTargetBuffer living in the Renderable.

To fix this, we're no longer initializing the morphing paramters
at RenderPrimitive creation, instead we store a reference to the
BufferSlot in the Primtive structure, so that later, when the Renderable
is created we can finally retrieve the BufferSlot and initialize its
morphing paramters, which are not available. The "morphing parameters"
are now expanded to contain the MorphTargetBuffer as before (except now
it's always the same for all the primitives of a Rendrable), as well
as the offset within the buffer and the vertex count.
2024-06-28 12:14:57 -07:00
Ben Doherty c19785b72f Merge branch 'main' into ma/descriptor-sets 2024-06-27 17:48:34 -07:00
Benjamin Doherty 38b3074835 Fix validation error, bind descriptor sets at bind time 2024-06-27 17:42:24 -07:00
Sungun Park 56ac7ab902 IBL drag & drop support for desktop gltf_viewer (#7947)
Users now can drag and drop IBL files for desktop gltf_viewer.

It attempts to load gltf files first then tries to load IBL files.
2024-06-27 23:14:13 +00:00
Ben Doherty 44b4de904e Add saveRawVariants flag to matc (#7949) 2024-06-27 14:36:03 -07:00
Benjamin Doherty 07f07e0700 Remove log spew 2024-06-27 14:35:20 -07:00
Tibor Hencz a2fe9f745c Add ability to disable panning in the OrbitManipulator (#7928) 2024-06-27 00:05:14 +00:00
Mathias Agopian b4162eb313 fix windows build 2024-06-24 22:57:09 -07:00
Mathias Agopian 80f151ccf7 Merge branch 'main' into ma/descriptor-sets 2024-06-24 16:32:18 -07:00
Benjamin Doherty 26bb99c64e Pass descriptor set info to spirvToMsl more concicely 2024-06-24 15:19:09 -07:00
Benjamin Doherty 1612cdb353 WIP: Implement Metal descriptor sets 2024-06-21 17:00:47 -07:00
Benjamin Doherty e75882e4d4 Update MetalArgumentBuffer to support buffers 2024-06-21 16:42:20 -07:00
Benjamin Doherty 2e763149e7 MetalArgumentBuffer support buffers 2024-06-21 16:42:19 -07:00
e4a0bb8fa0 Add support for KHR_materials_Specular (#7564)
Co-authored-by: Todd Zhang <toddzx@amazon.com>
Co-authored-by: Romain Guy <romain.guy@gmail.com>
Co-authored-by: Mathias Agopian <mathias@google.com>
2024-06-21 17:06:17 +00:00
Mathias Agopian e40a4c69a3 Merge branch 'main' into ma/descriptor-sets 2024-06-21 09:50:29 -07:00
Mathias Agopian 213eb6af9e Lit Materials can now specify the quality of SH computations
The number of SH bands used for the indirect light irradiance
computations can be set to 1, 2 or 3 (default) in Material::Builder.

For e.g. in lower-end devices w/ non HDR content, it might be
beneficial to set this value to 2.

BUGS=[341971013]
2024-06-20 10:25:04 -07:00
Mathias Agopian 29ecfd5fda generate the proper per-view descriptor-set layout in the shader
the per-view descriptor-set layout depends on both the material
and the variant.
2024-06-17 23:19:24 -07:00
Mathias Agopian f11a04722b new descriptor set api 2024-06-17 23:19:24 -07:00
Powei Feng 43331d04e5 gltfio: [extended] Fix generated color default (#7917)
Fixes #7905
2024-06-11 12:21:14 -07:00
Mathias Agopian d1022527ac export PanicStream since it's a public API 2024-06-05 11:00:06 -07:00
Mathias Agopian bea02427ed keep the normal transforms in float during skinning
FIXES=[342459864]
2024-06-04 13:37:47 -07:00
Mathias Agopian 749b063af3 PerformanceHintManager needs a valid Java thread
FIXES=[343965368, 343550453]
2024-06-04 10:22:21 -07:00