[Merge] (P8): merge dev f973008c - the Espryt partial-flush fix for a queued ring copy on Adreno 830 (wave 2 MD), and dev's empty-binding uniform block fix deduplicated against P11's 7784d6bb (one code path), UnboundUniformBlockScenario registered on the split arms

This commit is contained in:
2026-09-30 04:34:15 -04:00
6 changed files with 341 additions and 6 deletions
@@ -2786,11 +2786,11 @@ namespace MobileGL::MG_Backend::DirectVulkan {
const auto& bufferObject = bindingPoint.GetBoundObject();
static thread_local Vector<Uint8> paddedUbo;
if (bufferObject == nullptr) {
// A block the program declares at a point with nothing bound - e.g. its buffer was
// deleted while bound, which unbinds it (DeletedBoundBufferScenario). GL leaves what
// the shader READS undefined and raises no error; this used to dereference the null
// object. The wire arm already answers it with a zeroed block
// (ResolveWireUniformBufferPayload), so this one does too.
// A block the program declares at a point with nothing bound - never bound, or its
// buffer was deleted while bound, which unbinds it (UnboundUniformBlockScenario,
// DeletedBoundBufferScenario). GL leaves what the shader READS undefined and raises no
// error; this used to dereference the null object. Answer it with a zeroed block of the
// reflected size, as the wire arm does (ResolveWireUniformBufferPayload).
const VkDeviceSize blockSize =
static_cast<VkDeviceSize>(program.GetUBOSizeAt(static_cast<Uint32>(blockIndex)));
paddedUbo.assign(static_cast<SizeT>(blockSize > 0 ? blockSize : 16), 0);