Fix alpha-tested blend depth writes
Add paired depth-write variants for all five blended SetSurface families in ordinary and atmospheric Wb pipeline sets at both sample counts and in EnvCell. Select them only from the carried AlphaTestEnabled state, retain pure-Clip and Translucent override behavior, and cover disposal plus partial-construction rollback. Correct the three stale depth oracles and the AP register count/temporary AP-232 overclaim. Required restored mutations and first discriminating failures: 1. Wb StraightAlpha+Clip collapsed to depth-off: WalkStaticStreamPopulatorTests.ImmediateBuildingDetail_UsesExactResolvedSetSurfaceState failed at line 1278; expected wb-mesh-alpha-depth-write-1x, binds were wb-mesh-alpha-1x. 2. EnvCell raw Additive+Clip collapsed to depth-off: EnvCellAlphaDrawSourceTests.DetailOn_EveryEnvCellFamilyDrawsOnceInPlaceWithAuthoredOpacity failed at line 132; expected envcell-raw-additive-depth-write, actual envcell-raw-additive. 3. EnvCell non-Clip raw Additive forced depth-on: the same production transcript failed at line 132; first row expected envcell-raw-additive, actual envcell-raw-additive-depth-write. 4. Late Translucent|Clip override forced alpha-test/depth-on: the same production transcript failed at line 132; expected envcell-alpha, actual envcell-alpha-depth-write.
This commit is contained in:
parent
15ed57a1e7
commit
d5cfd1c916
8 changed files with 285 additions and 82 deletions
|
|
@ -252,11 +252,51 @@ public class EnvCellRendererTests
|
|||
meshManager,
|
||||
new WbFrustum());
|
||||
|
||||
Assert.Equal(7, device.CreatedPipelines.Count);
|
||||
Assert.Equal(12, device.CreatedPipelines.Count);
|
||||
Assert.DoesNotContain(device.CreatedPipelines,
|
||||
pipeline => pipeline.Description.Name.Contains("detail", StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SetSurfacePipelineConstructionFailureDisposesEveryCompletedVariant()
|
||||
{
|
||||
using var device = new RecordingGpuDevice();
|
||||
using var meshManager = CreateMeshManager(device);
|
||||
device.PipelineFailure = description =>
|
||||
description.Name == "envcell-inverse-depth-write"
|
||||
? new InvalidOperationException("injected pipeline failure")
|
||||
: null;
|
||||
|
||||
Assert.Throws<InvalidOperationException>(() => new EnvCellRenderer(
|
||||
device,
|
||||
new GpuDeviceFrameLifetime(device),
|
||||
new VulkanWorldPassScope(sampleCount: 1),
|
||||
meshManager,
|
||||
new WbFrustum()));
|
||||
|
||||
Assert.Equal(9, device.CreatedPipelines.Count);
|
||||
Assert.All(device.CreatedPipelines, static pipeline => Assert.True(pipeline.IsDisposed));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DisposeReleasesEverySetSurfacePipelineVariant()
|
||||
{
|
||||
using var device = new RecordingGpuDevice();
|
||||
using var meshManager = CreateMeshManager(device);
|
||||
var renderer = new EnvCellRenderer(
|
||||
device,
|
||||
new GpuDeviceFrameLifetime(device),
|
||||
new VulkanWorldPassScope(sampleCount: 1),
|
||||
meshManager,
|
||||
new WbFrustum());
|
||||
RecordingGpuPipeline[] pipelines = device.CreatedPipelines.ToArray();
|
||||
|
||||
renderer.Dispose();
|
||||
|
||||
Assert.Equal(12, pipelines.Length);
|
||||
Assert.All(pipelines, static pipeline => Assert.True(pipeline.IsDisposed));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OrderedMdiRanges_CoalesceAdjacentCellsWithIdenticalState()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue