feat(render): Campaign V slice V6j commit 2 - Dereth draws on Vulkan
The three world renderers' submission arms, both pass executors, and the
composition that reaches them. This is the unit three predecessors stopped at.
What it produces. ACDREAM_RENDER_BACKEND=vulkan on the offline scene renders
terrain with blended textures and road overlays, the water edge, static world
meshes, procedural scenery, and the complete retained UI - the same frame the GL
pixel gate captures, from the same camera, minus the sky. artifacts/v6j-vk2.
The shape, and why it is not V4c's. Section 5.5.6 chose option (B) after NVIDIA
rendered the V4c binary 10/10 where AMD's GL stack did not: GL keeps its raw
world path through to V10 as a documented fork confined to the submission seam,
and the RHI world path ships on Vulkan. So V4c's and V4d-2's content returns as a
SECOND arm rather than a replacement. The GL arm issues the same GL statements in
the same order against the same objects; the encoder arm lives in three .Rhi.cs
partials and is entered by one branch per submission site.
Three differences from V4c, each because the tree moved under it. There is no
binding-9 texture table - V4t put the slot on the device and Vulkan binds set 2,
so the arm that used to intern bindless handles simply has nothing to do. The
pipelines carry the device's sample count rather than 1, because Vulkan requires
rasterizationSamples to match the pass and alpha-to-coverage is a no-op at one
sample. And no renderer opens a pass.
That last one is structural, not tidiness. Under MSAA the frame's one backbuffer
pass resolves into the swapchain image and stores DONT_CARE into the multisampled
scratch, so a second pass declaring Load would load undefined contents; the
backend also permits one open pass per frame. VulkanWorldScenePhase therefore
opens the pass, publishes the encoder on VulkanWorldPassScope for exactly the
span of the inner WorldSceneRenderer, and every renderer borrows it.
Three sections are frame-global on GL and cannot be on Vulkan: the SceneLighting
UBO, the per-cell clip regions, and the terrain clip block. GL binds each to a
global binding point and every consumer inherits it. Vulkan binds a descriptor
set per draw, and a renderer's own binds are what select the scope those sections
must land in - so their writers PUBLISH into WorldFrameSections and each renderer
binds them inside the pass, after its own binds. SceneLightingUboBinding's
per-flight-slot buffer pool disappears with it: a ring allocation is already
distinct memory that lives until the frame retires, which is the property the
pool existed to provide.
Both pass executors became backend-neutral rather than gaining twins. Everything
they do is delegation to a renderer except four concerns - the clip-frame
publication, the doorway scissor, gl_ClipDistance enablement, and retail's
interior depth clear - so those four move behind IWorldPassSurface and retail's
ordering, which is what these classes are actually for, is written once. The GL
implementation issues the statements the executors used to issue inline.
Clip distances are no-ops on the Vulkan arm, and that is safe rather than a
divergence: Vulkan activates every element the shader declares, and all three
world vertex shaders already write 1.0 into every slot past the active count.
The interior depth clear becomes vkCmdClearAttachments, reached through the scope
so the pinned contract stays frozen and the backend-only verb stays in the
backend. The hook for it was already committed at V6i-3 with a cref to a type
that did not exist yet; it exists now.
The collision-wireframe DebugLineRenderer is composed as null on the Vulkan arm.
DrawAndPublish flushes it INSIDE the world phase and it opens its own pass, which
the one-pass rule forbids. The toggle is DevTools-only and DevTools is not
composed there, so nothing is lost - composing it would throw on the first
wireframe frame rather than silently misdraw.
Two seams widened rather than invented. GameWindowGraphics answers whether the
backend has a world-pass seam, because the three composition phases that need it
already borrow that handle and "does this backend work that way" is what the type
exists to answer. And MeshSourceReady replaces the anyVao != 0 gate with the same
question in backend-neutral form - V6i-3 published HasStores for exactly this -
so the predicate evaluates identically on GL.
What is NOT here, and is expected. Sky and weather are still raw GL (V4f), so the
Vulkan frame's sky is the atmosphere fog clear. Particles (V4e), the paperdoll and
appraisal viewports and the portal depth mask (V4g) likewise. The executors
already accepted all of them as absent.
Gates. Release build green. App tests 4,112 passed / 3 skipped, the unchanged
baseline; complete Release suite 9,175 / 5. Strict GL offline pixel gate against
847f14ae: 5.50e-05, 31 differing pixels of 563,200, inside the documented 9-31
band and 18x under the threshold. Characterised rather than accepted, because 31
is the band's top: cross-commit pairs measured 21, 29 and 31 while same-commit
controls measured 12 and 20, and maximumChannelDelta is 46-52 in every comparison
INCLUDING the pure controls - so the few large-delta pixels are a property of the
capture, and a cross-commit pair at 21 against a same-commit pair at 20 is not
what a systematic shift looks like. GL connected repeat gate at 3 runs: 3/3
RENDERED on the desktop witness and 3/3 on the client capture. One offline Vulkan
run with VK_LAYER_KHRONOS_validation proven inserted by the loader: zero
validation errors, zero warnings, a captured world frame, and a graceful close.
Coverage gap, stated rather than assumed. The offline scene is a fixed outdoor
view, so EnvCellRenderer's Vulkan arm draws nothing in it - dungeon interiors are
half of this slice and are unproven by anything automated, exactly as they were
for V4c. The deferred-alpha path and the doorway scissor are likewise untouched
by this scene. They join the accumulated user-gate debt in plan section 5.1.
No divergence-register row: no retail-facing behaviour changes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
81fe5e1b63
commit
f84eef3256
22 changed files with 2566 additions and 264 deletions
|
|
@ -86,8 +86,8 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
All,
|
||||
}
|
||||
|
||||
private readonly GL _gl;
|
||||
private readonly Shader _shader;
|
||||
private readonly GL? _gl;
|
||||
private readonly Shader? _shader;
|
||||
private readonly TextureCache _textures;
|
||||
private readonly WbMeshAdapter _meshAdapter;
|
||||
private readonly EntitySpawnAdapter _entitySpawnAdapter;
|
||||
|
|
@ -98,7 +98,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
private readonly RetainedScratchCapacityPolicy _alphaScratchPolicy;
|
||||
private int _scratchPeakUnits;
|
||||
|
||||
private readonly BindlessSupport _bindless;
|
||||
private readonly BindlessSupport? _bindless;
|
||||
private ICurrentRenderDispatcherObserver? _currentRenderSceneObserver;
|
||||
|
||||
public readonly record struct DrawStats(
|
||||
|
|
@ -2056,18 +2056,33 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
observeCurrentPath: true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether there is a mesh source to draw from.
|
||||
///
|
||||
/// <para>Campaign V slice V6j: on GL that question is "did we find a vertex
|
||||
/// array", which <paramref name="anyVao"/> answers. The encoder arm has no
|
||||
/// vertex array — the pipeline owns one shaped by
|
||||
/// <c>GpuVertexLayout.WorldMesh</c> — so it asks the arena the
|
||||
/// backend-neutral form of the same question, which V6i-3 published as
|
||||
/// <c>HasStores</c>.</para>
|
||||
/// </summary>
|
||||
private bool MeshSourceReady(uint anyVao) =>
|
||||
_gl is not null
|
||||
? anyVao != 0
|
||||
: _meshAdapter.MeshManager?.GlobalBuffer is { HasStores: true };
|
||||
|
||||
private bool BeginEntityDispatch(
|
||||
ICamera camera,
|
||||
out Matrix4x4 viewProjection,
|
||||
out Vector3 cameraWorldPosition)
|
||||
{
|
||||
_shader.Use();
|
||||
_shader?.Use();
|
||||
_selectionLighting?.TickLighting();
|
||||
_indoorProbeFrameCounter++;
|
||||
viewProjection = camera.View * camera.Projection;
|
||||
_shader.SetMatrix4("uViewProjection", viewProjection);
|
||||
_shader.SetInt("uLightingMode", 0);
|
||||
_shader.SetInt(
|
||||
_shader?.SetMatrix4("uViewProjection", viewProjection);
|
||||
_shader?.SetInt("uLightingMode", 0);
|
||||
_shader?.SetInt(
|
||||
"uLightDebug",
|
||||
RenderingDiagnostics.LightDebugMode);
|
||||
_missRequested.Clear();
|
||||
|
|
@ -2076,7 +2091,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
Environment.GetEnvironmentVariable("ACDREAM_WB_DIAG"),
|
||||
"1",
|
||||
StringComparison.Ordinal);
|
||||
if (diagnosticsEnabled && !_gpuQueriesInitialized)
|
||||
if (diagnosticsEnabled && _gl is not null && !_gpuQueriesInitialized)
|
||||
{
|
||||
for (int index = 0; index < GpuQueryRingDepth; index++)
|
||||
{
|
||||
|
|
@ -2104,8 +2119,8 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
bool diag,
|
||||
bool observeCurrentPath)
|
||||
{
|
||||
// Nothing visible — skip the GL pass entirely.
|
||||
if (anyVao == 0)
|
||||
// Nothing visible — skip the pass entirely.
|
||||
if (!MeshSourceReady(anyVao))
|
||||
{
|
||||
LastDrawStats = new DrawStats(set, entitiesWalked, tupleCount, 0, 0, 0, 0, 0, 0);
|
||||
ObserveClassifiedDispatcherSubmission(observeCurrentPath,
|
||||
|
|
@ -2262,6 +2277,26 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
deferTransparent,
|
||||
camPos);
|
||||
|
||||
// Campaign V slice V6j: on the encoder arm every per-frame upload below
|
||||
// is a frame ring slice bound through the borrowed world pass, which
|
||||
// retires the buffer-set pool structurally. See WbDrawDispatcher.Rhi.cs.
|
||||
if (_gl is null)
|
||||
{
|
||||
SubmitRhi(vp, immediateInstances, totalDraws, diag);
|
||||
_cpuStopwatch.Stop();
|
||||
if (diag)
|
||||
{
|
||||
long rhiCpuUs = _cpuStopwatch.ElapsedTicks * 1_000_000L
|
||||
/ System.Diagnostics.Stopwatch.Frequency;
|
||||
_cpuSamples[_cpuSampleCursor] = rhiCpuUs;
|
||||
_cpuSampleCursor = (_cpuSampleCursor + 1) % _cpuSamples.Length;
|
||||
_drawsIssued += _opaqueDrawCount + _transparentDrawCount;
|
||||
_instancesIssued += totalInstances;
|
||||
MaybeFlushDiag();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// ── Phase 5: upload four buffers ────────────────────────────────────
|
||||
ActivateNextDynamicBufferSet();
|
||||
fixed (float* ip = _instanceData)
|
||||
|
|
@ -2404,7 +2439,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
// A.5 T22.5: gated by AlphaToCoverage property so Low/Medium presets
|
||||
// (no MSAA) skip the unnecessary GL state change.
|
||||
if (AlphaToCoverage) _gl.Enable(EnableCap.SampleAlphaToCoverage);
|
||||
_shader.SetInt("uRenderPass", 0);
|
||||
_shader!.SetInt("uRenderPass", 0);
|
||||
// Phase Post-A.5 (ISSUE #52, 2026-05-10): opaque section of
|
||||
// Batches[] starts at index 0. See uDrawIDOffset comment in
|
||||
// mesh_modern.vert for why this is needed.
|
||||
|
|
@ -2432,7 +2467,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
// OPAQUE section — and the lifestone crystal's apparent texture
|
||||
// flickers to whatever opaque batch sorted first that frame. See
|
||||
// uDrawIDOffset comment in mesh_modern.vert.
|
||||
_shader.SetInt("uDrawIDOffset", _opaqueDrawCount);
|
||||
_shader!.SetInt("uDrawIDOffset", _opaqueDrawCount);
|
||||
// Closed-shell translucent meshes still need culling, but the
|
||||
// cull side must come from each dat batch just like the opaque
|
||||
// section. BuildIndirectArrays preserves CullMode in _drawCullModes.
|
||||
|
|
@ -2965,7 +3000,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
return;
|
||||
|
||||
GlobalMeshBuffer? global = _meshAdapter.MeshManager?.GlobalBuffer;
|
||||
if (global is null || global.VAO == 0)
|
||||
if (global is null || !MeshSourceReady(global.VAO))
|
||||
return;
|
||||
|
||||
int count = tokens.Length;
|
||||
|
|
@ -3004,6 +3039,15 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
// One upload per source per sorted alpha scope. RetailAlphaQueue later
|
||||
// draws contiguous ranges from this immutable prepared payload; it must
|
||||
// never overwrite these buffers for every short mesh/particle run.
|
||||
if (_gl is null)
|
||||
{
|
||||
// A ring allocation cannot outlive its frame as a ref struct, but its
|
||||
// buffer, offset and size can be stored — so the payload is written
|
||||
// once here and bound many times below without recopying.
|
||||
PrepareRhiAlphaSections(count);
|
||||
return;
|
||||
}
|
||||
|
||||
ActivateNextDynamicBufferSet();
|
||||
UploadDeferredAlphaBuffers(count);
|
||||
PersistActiveDynamicBufferCapacities();
|
||||
|
|
@ -3018,10 +3062,16 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
throw new ArgumentOutOfRangeException(nameof(firstPreparedDraw));
|
||||
|
||||
GlobalMeshBuffer? global = _meshAdapter.MeshManager?.GlobalBuffer;
|
||||
if (global is null || global.VAO == 0)
|
||||
if (global is null || !MeshSourceReady(global.VAO))
|
||||
return;
|
||||
|
||||
_shader.Use();
|
||||
if (_gl is null)
|
||||
{
|
||||
DrawPreparedAlphaBatchRhi(global, firstPreparedDraw, drawCount);
|
||||
return;
|
||||
}
|
||||
|
||||
_shader!.Use();
|
||||
_shader.SetMatrix4("uViewProjection", _deferredAlphaViewProjection);
|
||||
_shader.SetInt("uLightingMode", 0);
|
||||
_shader.SetInt("uLightDebug", AcDream.Core.Rendering.RenderingDiagnostics.LightDebugMode);
|
||||
|
|
@ -3193,7 +3243,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
|
||||
private void ApplyRetailBlend(TranslucencyKind blend)
|
||||
{
|
||||
_gl.BlendFunc(
|
||||
_gl!.BlendFunc(
|
||||
blend == TranslucencyKind.InvAlpha
|
||||
? BlendingFactor.OneMinusSrcAlpha
|
||||
: BlendingFactor.SrcAlpha,
|
||||
|
|
@ -3252,8 +3302,8 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
// into CullMode runs, the shader must receive the absolute command
|
||||
// index for this run or it will read BatchData[0] again and bind
|
||||
// the wrong texture for later runs.
|
||||
_shader.SetInt("uDrawIDOffset", command);
|
||||
_gl.MultiDrawElementsIndirect(
|
||||
_shader!.SetInt("uDrawIDOffset", command);
|
||||
_gl!.MultiDrawElementsIndirect(
|
||||
PrimitiveType.Triangles,
|
||||
DrawElementsType.UnsignedShort,
|
||||
(void*)(command * DrawCommandStride),
|
||||
|
|
@ -3270,7 +3320,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
// WB GameScene.cs:843 sets FrontFace(CW) globally; SetCullMode then
|
||||
// only chooses front/back culling. Keep the same convention here so
|
||||
// splitting MDI commands by CullMode cannot resurrect stale CCW state.
|
||||
_gl.FrontFace(FrontFaceDirection.CW);
|
||||
_gl!.FrontFace(FrontFaceDirection.CW);
|
||||
switch (mode)
|
||||
{
|
||||
case CullMode.None:
|
||||
|
|
@ -3324,16 +3374,16 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
var set = new DynamicBufferSet();
|
||||
try
|
||||
{
|
||||
set.InstanceSsbo = TrackedGlResource.CreateBuffer(_gl, "creating entity instance SSBO");
|
||||
set.BatchSsbo = TrackedGlResource.CreateBuffer(_gl, "creating entity batch SSBO");
|
||||
set.IndirectBuffer = TrackedGlResource.CreateBuffer(_gl, "creating entity indirect buffer");
|
||||
set.ClipSlotSsbo = TrackedGlResource.CreateBuffer(_gl, "creating entity clip-slot SSBO");
|
||||
set.GlobalLightsSsbo = TrackedGlResource.CreateBuffer(_gl, "creating entity global-light SSBO");
|
||||
set.InstanceLightSetSsbo = TrackedGlResource.CreateBuffer(_gl, "creating entity light-set SSBO");
|
||||
set.InstanceIndoorSsbo = TrackedGlResource.CreateBuffer(_gl, "creating entity indoor SSBO");
|
||||
set.InstanceAlphaSsbo = TrackedGlResource.CreateBuffer(_gl, "creating entity alpha SSBO");
|
||||
set.InstanceSsbo = TrackedGlResource.CreateBuffer(_gl!, "creating entity instance SSBO");
|
||||
set.BatchSsbo = TrackedGlResource.CreateBuffer(_gl!, "creating entity batch SSBO");
|
||||
set.IndirectBuffer = TrackedGlResource.CreateBuffer(_gl!, "creating entity indirect buffer");
|
||||
set.ClipSlotSsbo = TrackedGlResource.CreateBuffer(_gl!, "creating entity clip-slot SSBO");
|
||||
set.GlobalLightsSsbo = TrackedGlResource.CreateBuffer(_gl!, "creating entity global-light SSBO");
|
||||
set.InstanceLightSetSsbo = TrackedGlResource.CreateBuffer(_gl!, "creating entity light-set SSBO");
|
||||
set.InstanceIndoorSsbo = TrackedGlResource.CreateBuffer(_gl!, "creating entity indoor SSBO");
|
||||
set.InstanceAlphaSsbo = TrackedGlResource.CreateBuffer(_gl!, "creating entity alpha SSBO");
|
||||
set.InstanceSelectionLightingSsbo = TrackedGlResource.CreateBuffer(
|
||||
_gl,
|
||||
_gl!,
|
||||
"creating entity selection-lighting SSBO");
|
||||
return set;
|
||||
}
|
||||
|
|
@ -3356,7 +3406,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
List<Exception>? failures = null;
|
||||
void Attempt(uint buffer, int bytes, string name)
|
||||
{
|
||||
try { TrackedGlResource.DeleteBuffer(_gl, buffer, bytes, $"deleting {name}"); }
|
||||
try { TrackedGlResource.DeleteBuffer(_gl!, buffer, bytes, $"deleting {name}"); }
|
||||
catch (Exception ex) { (failures ??= []).Add(ex); }
|
||||
}
|
||||
|
||||
|
|
@ -3405,7 +3455,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
ref capacityBytes,
|
||||
data,
|
||||
byteCount);
|
||||
_gl.BindBufferBase(BufferTargetARB.ShaderStorageBuffer, binding, ssbo);
|
||||
_gl!.BindBufferBase(BufferTargetARB.ShaderStorageBuffer, binding, ssbo);
|
||||
}
|
||||
|
||||
private unsafe void UploadDynamicBuffer(
|
||||
|
|
@ -3418,7 +3468,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
if (byteCount < 0)
|
||||
throw new ArgumentOutOfRangeException(nameof(byteCount));
|
||||
|
||||
_gl.BindBuffer(target, buffer);
|
||||
_gl!.BindBuffer(target, buffer);
|
||||
// A render bucket can legitimately contain zero batches (for example the outdoor dynamic
|
||||
// bucket immediately after auto-entry). Keep the buffer bound for the corresponding SSBO
|
||||
// binding, but there is no active prefix to allocate or upload and no draw can read it.
|
||||
|
|
@ -3474,7 +3524,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
{
|
||||
AcDream.App.Rendering.Gpu.Gl.GlGpuDevice device = WorldTextureTable;
|
||||
device.FlushTextureTable();
|
||||
_gl.BindBufferBase(
|
||||
_gl!.BindBufferBase(
|
||||
BufferTargetARB.ShaderStorageBuffer,
|
||||
AcDream.App.Rendering.Gpu.GpuBindingModel.StorageTextureTable,
|
||||
device.TextureTableGlName);
|
||||
|
|
@ -3491,14 +3541,14 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
{
|
||||
if (_sharedClipRegionSsbo != 0)
|
||||
{
|
||||
_gl.BindBufferBase(BufferTargetARB.ShaderStorageBuffer,
|
||||
_gl!.BindBufferBase(BufferTargetARB.ShaderStorageBuffer,
|
||||
ClipFrame.MeshClipSsboBinding, _sharedClipRegionSsbo);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_fallbackClipRegionSsbo == 0)
|
||||
{
|
||||
_fallbackClipRegionSsbo = _gl.GenBuffer();
|
||||
_fallbackClipRegionSsbo = _gl!.GenBuffer();
|
||||
// One CellClip slot, all zeros: count 0 ⇒ shader passes every plane.
|
||||
var zero = stackalloc byte[ClipFrame.CellClipStrideBytes];
|
||||
for (int i = 0; i < ClipFrame.CellClipStrideBytes; i++) zero[i] = 0;
|
||||
|
|
@ -3506,7 +3556,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
_gl.BufferData(BufferTargetARB.ShaderStorageBuffer,
|
||||
(nuint)ClipFrame.CellClipStrideBytes, zero, BufferUsageARB.DynamicDraw);
|
||||
}
|
||||
_gl.BindBufferBase(BufferTargetARB.ShaderStorageBuffer,
|
||||
_gl!.BindBufferBase(BufferTargetARB.ShaderStorageBuffer,
|
||||
ClipFrame.MeshClipSsboBinding, _fallbackClipRegionSsbo);
|
||||
}
|
||||
|
||||
|
|
@ -4105,7 +4155,13 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
if (_disposeResources is null)
|
||||
{
|
||||
var releases = new List<(string Name, Action Release)>();
|
||||
BuildDisposeReleases(releases);
|
||||
// Campaign V slice V6j: the encoder arm owns no GL names. Its
|
||||
// pipelines route their physical free through the device's
|
||||
// retirement queue, so the ledger below is empty there.
|
||||
if (_gl is null)
|
||||
DisposeRhiResources();
|
||||
else
|
||||
BuildDisposeReleases(releases);
|
||||
_disposeResources = new RetryableResourceReleaseLedger(releases);
|
||||
}
|
||||
|
||||
|
|
@ -4146,7 +4202,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
_fallbackClipRegionSsbo,
|
||||
"fallback-clip-region",
|
||||
"deleting entity fallback clip SSBO",
|
||||
_gl.DeleteBuffer);
|
||||
_gl!.DeleteBuffer);
|
||||
|
||||
if (!_gpuQueriesInitialized)
|
||||
return;
|
||||
|
|
@ -4208,7 +4264,7 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
return;
|
||||
RetryableGpuResourceRelease release =
|
||||
TrackedGlResource.CreateRetryableBufferDeletion(
|
||||
_gl,
|
||||
_gl!,
|
||||
buffer,
|
||||
capacityBytes,
|
||||
context);
|
||||
|
|
@ -4225,11 +4281,11 @@ public sealed unsafe partial class WbDrawDispatcher : IDisposable
|
|||
if (resource == 0)
|
||||
return;
|
||||
var release = new RetryableGpuResourceRelease(
|
||||
() => GLHelpers.ThrowOnResourceError(_gl, $"{context} (precondition)"),
|
||||
() => GLHelpers.ThrowOnResourceError(_gl!, $"{context} (precondition)"),
|
||||
() =>
|
||||
{
|
||||
delete(resource);
|
||||
GLHelpers.ThrowOnResourceError(_gl, context);
|
||||
GLHelpers.ThrowOnResourceError(_gl!, context);
|
||||
});
|
||||
releases.Add((name, release.Run));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue