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.
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.
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.
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.
- 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.
- 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).
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
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.