Correctness:
- ClearDepth() left the texture in the Cleared state after drawing the
clear, so depth was wiped again whenever the render pass restarted.
- ClearDepth() drew with the current pipeline's primitive type, and
dereferenced the current pipeline before checking it for null.
- Only one encoder is ever left active on the command buffer. Resolves,
dispatches, inline blits and submission now end render/compute/inline
upload encoders, instead of only render passes.
- Unbind pipelines on destruction, m_current_pipeline was left dangling.
- Protect the depth state cache, pipelines are created on worker threads.
- Render targets are always updated inline, and inline copies, resolves,
clears and image binds now mark the texture as used, so that uploads
are not reordered ahead of them via the upload command buffer.
- Apply the pipeline's blend constant, it was never set.
- ResolveTextureRegion() commits a pending clear on the source and marks
the destination as dirty.
- Depth resolves are drawn instead of using a compute kernel, since depth
textures cannot be written from compute. The colour resolve kernel now
bounds checks, as the dispatch grid is rounded up.
- Don't clamp the viewport to the framebuffer, it rescaled the geometry.
- Handle a nil drawable in RenderBlankFrame().
- Report D24S8 as unsupported when the device does not have it.
- Large texture uploads over-read the source for compressed formats and
partial last rows.
- Use the vertex attribute's index instead of its position in the layout.
- Fix off-by-one in the layer/level check in MetalTexture::Map().
- Log command buffer errors.
Compute:
- Enable the compute_shaders feature, and bind the uniform buffer and
texture buffer in compute passes.
- Report gpu_timing as supported.
Leaks:
- Texture buffers were over-retained by the stream buffer, and are now
kept alive until the command buffers using them have completed.
- Resolve pipelines were released after the deferred release queue was
drained on shutdown. Open encoders and the drawable are cleaned up too.
- Use autorelease pools when creating clear pipelines/compute encoders.
- Reject zip filenames that overflow the name buffer.
- Never return nil from StringViewToNSString().
- Format NSError codes as signed.
- Release the launch semaphore, and the updater's views.
- Avoid a zero contents scale for unparented Metal layers.
- Fix the fchmod() error message printing the wrong value.
The core thread now only copies raw samples into the buffer. The callback runs
all input through SoundTouch, and controls the tempo on its output buffer.
Reallocation locks out the callback, since WASAPI and XAudio2 don't wait for it.
SoundTouch holds about tempo * sequence length of input, so the tempo is limited
to what the buffer can hold, and input beyond that is dropped. On a reset the
held input is processed at the new speed and trimmed, instead of becoming a
backlog. Stale input after a long output stall is dropped.
Compute the tempo relative to the nominal rate, so it no longer has to integrate
its way there and can go inactive at speeds other than 100%. Smooth it with an
exponential moving average instead of a 256-entry history, which also reduces
overshoot after a reset. Resample mode nudges the tempo by up to 0.5% to
compensate for clock drift, instead of running open loop.
The writer moved the read position on overrun, and the reset counter was
modified from the audio thread. Each side also loaded the other's ring position
relaxed, so the reader could see stale samples on weakly ordered CPUs.
The fill threshold was ~3ms, so recovery immediately squashed a partial buffer
into the callback and flagged another underrun. The target also has to cover two
callbacks, otherwise the stretcher keeps the buffer below what a callback needs.
Mirror latch writes, add chip erase, return DATA polling status when a read
ends a page load, erase pages at load start so bytes may load in any order,
show ID/status for code reads without side effects, and pad images with FFh.