Commit Graph
864 Commits
Author SHA1 Message Date
Philip Rideout d0df2e1336 Replace glGenMipmap with our own implementation. 2019-01-30 11:03:54 -08:00
Philip Rideout f690d5e69c Suzanne now tests generateMipmaps. 2019-01-30 11:03:54 -08:00
Philip Rideout 4ffd790fd6 GL blit now updates baseLevel / maxLevel of target texture.
This not only paves the way for our own mipmap generator routine, but
also better aligns the semantics of blit with setTextureData.

Motivated by #749.
2019-01-30 11:03:54 -08:00
Ben Doherty c29fcc7668 Fix typo in iOS readme 2019-01-29 18:13:38 -08:00
Mathias Agopian ae6ab66af4 fix #755: a race condition cousing a deadlock
This reverts a JobSystem optimization that attempted to avoid signaling
a condition when there was no waiters. Unfortunately, there was a
race that caused the the signaling thread to miss that the waiter flag
was set, thus not signaling.
sceneform-1.7pr4
2019-01-29 15:40:25 -08:00
Ben Doherty 7be3994c96 Add Metal shading language compilation to matc (#752) 2019-01-29 12:44:58 -07:00
Ben Doherty 836b641bff Add filamat-jni to CMake and build.sh (#740) 2019-01-29 12:34:04 -07:00
Tim van Scherpenzeel 44bfac85e9 added quiet flag 2019-01-29 11:04:58 -08:00
Romain Guy a141abd212 Fix Kotlin compilation error 2019-01-29 09:39:00 -08:00
Romain Guy 12aba0f1b7 Code cleanup 2019-01-29 09:36:18 -08:00
Philip Rideout 40666bdd23 HwTexture now remembers the format.
We were stashing the GL format but not the Filament format.

This simplifies VulkanTexture and will allow us to implement a very
simple mipmap generator in DriverBase.

Motivated by #749.
2019-01-29 08:59:36 -08:00
Romain Guy 66d71be300 Fix HDR ImageDecoder for width < 8 or > 32767 2019-01-28 15:16:53 -08:00
Romain Guy 614a832be0 Code cleanup in ImageDecoder.cpp 2019-01-28 15:16:53 -08:00
Ben Doherty 92de93bfb8 Add Metal skeleton code (#714) 2019-01-28 15:29:37 -07:00
Romain Guy c1b7f2ac27 Property write small .hdr files (#750)
* Cleanup ImageEncoder code

* Properly write HDR files when width < 8 or > 32767

A little oddity in the original Radiance file format encoding.
2019-01-28 14:02:28 -08:00
Philip Rideout 6110809d23 JNI fix for badly-sized PixelBufferDescriptors. (!)
Amazingly, the size field in PixelBufferDescriptor was often totally
incorrect for Java-based clients. The reason we did not notice: OpenGL
often consumes a pointer to image data without consuming a byte count
(e.g. glTexImage2D).

OpenGL infers size from dimensions + format, but Vulkan does not. This
caused texture corruption with Vulkan on Android.

This fix follows a pattern used in other places such as
FRenderer::readPixels.
2019-01-26 09:59:06 -08:00
Romain Guy 81a52411ed Clarify Fresnel term for IBL implementation of clear coat 2019-01-25 13:49:44 -08:00
cubeleo 6956154d62 mipgen: Disambiguated string with std:: prefix. (#741) 2019-01-25 09:02:11 -08:00
prideout 9940a68165 Stipulate clang 7 in README to align with Kokoro. 2019-01-24 12:06:00 -08:00
Philip Rideout c3d957671d Work around FXAA issue with Vulkan Adreno drivers.
Fixes #732.
2019-01-24 11:48:02 -08:00
Mathias Agopian fbb7e1f2ef Use a linear allocator for all our std::vector<> 2019-01-23 19:14:28 -08:00
Mathias Agopian 6e90d73e24 fix PassNode move ctor 2019-01-23 19:14:28 -08:00
Mathias Agopian 07c1dbb5f4 fix typo causing a memory corruption in STLAllocator<>
We were allocating n*sizeof(n) instead of n*sizeof(T). Thankfully, 
we were not using STLAllocator anywhere.
2019-01-23 19:14:28 -08:00
Philip Rideout 4e0749f0ae Add another folder to the build's "clean" task.
Gradle creates a hidden .externalNativeBuild folder when issuing CMake
for the first time. This folder contains cached command line parameters
that get passed to CMake, and these can become stale when switching
between "normal" Android builds and Vulkan-enabled Android builds, which
leads to frustrating build errors.
2019-01-23 17:12:56 -08:00
Ben Doherty f5bd28b7df Update linux README with CXXFLAGS (#736) 2019-01-23 16:39:34 -08:00
Ben Doherty ad4c4148f4 Add filamat-jni Gradle project (#733) sceneform-1.7pr3 2019-01-23 13:58:43 -08:00
Mathias Agopian a35762bdf2 compute discard flags for all attachments 2019-01-22 10:49:22 -08:00
Mathias Agopian 1ca2b1b642 calculate rendertarget's discard flags properly 2019-01-22 10:49:22 -08:00
Mathias Agopian 373e519292 slog.* << io::hex now prefixes values with 0x 2019-01-22 10:49:22 -08:00
Mathias Agopian acea32aae8 more validation in the framegraph
- validate that a pass actually uses a resource when requesting the
  concrete (Driver) handle.

- introduce a "blit" usage for a resource, which indicates that a 
  resource will be used as the source of a blit operation. This is
  unfortunatelly needed because blit operations work on rendertargets,
  not textures for the source.
2019-01-22 10:49:22 -08:00
Mathias Agopian 150fd321bc FrameGraph API improvements
- de-dup read/writes to the same resource from the same pass

- also, when reading & writing into the same resource from the same pass,
  always order the read before the write, i.e.:
     out = builder.write(r);
     in  = builder.read(out);
  is equivalent to:
     in  = builder.read(r);
     out = builder.write(in);

  note that the following is still not allowed:
     out = builder.write(r);
     in  = builder.read(r);
  
  this is never valid, since it's reading from a resource that has
  been written to. 


- Make FrameGraphResource class attributes private and add
  comparison operators (so they could be sorted and compared).
2019-01-22 10:49:22 -08:00
prideout 1bbe203a15 Add RGB support to VulkanDriver. 2019-01-22 09:56:27 -08:00
prideout 37201e742f Add missing locks to VulkanDriver. 2019-01-18 16:50:52 -08:00
prideout ba8adc2d49 Fix test filter syntax. 2019-01-18 16:21:26 -08:00
Ben Doherty d3efbd810e Add Android build instructions on Windows (#726) 2019-01-18 14:47:23 -08:00
prideout 91c946cfbd Add workaround for depth invariance on NVIDIA.
Fixes #645.
2019-01-18 13:59:22 -08:00
prideout 98d39b7e7e Revert "Fix depth prepass (#722)"
This reverts commit 896c85c324.
2019-01-18 13:59:22 -08:00
Mathias Agopian e7169cb889 fix CI build 2019-01-18 13:55:19 -08:00
Mathias Agopian 8f70f8f879 fix a few typos 2019-01-18 13:07:54 -08:00
Mathias Agopian 8c6ac11c2d Optionally use the framegraph for post-processing
There is still a lot of work to do on the frame-graph, which is why
this is off by default for now.
2019-01-18 13:07:54 -08:00
Mathias Agopian d9bebaa8e7 framegraph now supports imported resources 2019-01-18 13:07:54 -08:00
Mathias Agopian 5baa699c7c Add support for creating concrete resources
- Tweak the API a bit.
- We can now create concrete textures and render-targets
2019-01-18 13:07:54 -08:00
Mathias Agopian 8c8cfb6528 Frame graph API
This is only the guts of the frame graph implementation. It supports
culling of passes, but doesn't create real resources yet.

API still in flux.
2019-01-18 13:07:54 -08:00
Mathias Agopian f1c6acafff Tweak to PostProcessManager::setSource()
setSource() is a bit more generic now.
2019-01-18 13:07:54 -08:00
Philip Rideout 03161226f2 Update MoltenVK and tweak queue selection strategy.
These changes are sufficient to resurrect Vulkan-on-macOS, at least for
the vk_hellopbr sample.
2019-01-18 12:21:50 -08:00
Ben Doherty 4d0859b266 Update Android toolchains for building on Windows (#723) 2019-01-18 09:31:03 -08:00
Romain Guy 896c85c324 Fix depth prepass (#722)
The engine tries to be smart by using a single vertex shader when
rendering unskinned, non-alpha masked, non-customized materials.
This leads to a lot of issues when laying down the depth prepass.
This change simply gets rid of this optimization (which wasn't
properly profiled anyway). Correctness is more important.

Fixes #645
2019-01-17 17:57:43 -08:00
Philip Rideout 49f1464016 Fix diabolical VAO state management bug.
When clients deleted renderables that referred to index buffers that
were still active, it was possible for our shadow ELEMENT_ARRAY_BUFFER
binding to get out of sync with the actual binding.

It is somewhat amazing that this has never caused issues before. Perhaps
it is rare for clients to "recycle" index buffers across multiple
renderable lifetimes.

This fixes #718.
2019-01-17 14:44:34 -08:00
Romain Guy c8b3544a36 Update README 2019-01-17 12:13:43 -08:00
Romain Guy 321845d04a Update README 2019-01-17 12:11:20 -08:00