diff --git a/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp b/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp index 593db114c1c5..7f2b2509ca83 100644 --- a/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp @@ -2078,7 +2078,7 @@ class DepthSurface { std::exception_ptr publicationFailure; void capturePublication() { - if ((target.format != VK_FORMAT_D32_SFLOAT_S8_UINT && !bareDepthTarget(target)) || context.detiler == nullptr) return; + if ((target.format != VK_FORMAT_D32_SFLOAT && target.format != VK_FORMAT_D32_SFLOAT_S8_UINT) || context.detiler == nullptr) return; try { const auto lease = GuestAllocations::GuestAllocationsAcquireAll_nid_postfix(); CheckCurrent(); @@ -3162,6 +3162,7 @@ std::uint32_t expandedHtileWord(std::uint32_t word, bool stencilInHtile, VkImage } bool DepthSurface::PublishToGuest(DepthReadCause cause) { + const bool stencil = target.format == VK_FORMAT_D32_SFLOAT_S8_UINT; Require(!Recorder::InCompletion(), "native multisample depth publication inside a GPU completion is not implemented"); Require(!publicationInProgress, "recursive native multisample depth publication is not implemented"); Require(!publicationFailed, "a previous native multisample depth publication store did not complete"); @@ -3173,10 +3174,17 @@ bool DepthSurface::PublishToGuest(DepthReadCause cause) { if (publicationFailure) std::rethrow_exception(publicationFailure); const bool bare = bareDepthTarget(target); const bool htile = !uniformPlaneTarget(target) && !bare; - const bool publishable = bare ? publication.size() == 1u : target.format == VK_FORMAT_D32_SFLOAT_S8_UINT && publication.size() == (htile ? 3u : 2u); + if (!stencil && !bare) { + Require(target.format != VK_FORMAT_D16_UNORM, "guest publication of a written native multisample D16 depth is not implemented"); + Require(target.format == VK_FORMAT_D32_SFLOAT && hostFormat == target.format, "sample-preserving guest publication of a written native multisample depth that the device stores in another format is not implemented"); + Require(sampleable, "guest publication of a written native multisample depth the device cannot sample is not implemented"); + Require(context.detiler != nullptr, "guest publication of a written native multisample depth needs the texture detiler"); + ApplyFastClear(); + } + const bool publishable = bare ? publication.size() == 1u : publication.size() == (stencil && htile ? 3u : 2u); Require(publishable && hostFormat == target.format, "sample-preserving guest publication of native multisample depth is not implemented for this owner"); Require(sampling.refusal.empty(), sampling.refusal); - RequireStencilProven(); + if (stencil) RequireStencilProven(); Require(!clearPending && clearGeneration == 0u && stencilClearGeneration == 0u && pendingClear == 0u, "native multisample depth publication with an unapplied clear is not implemented"); Require(sampleable && context.detiler != nullptr, "sample-preserving guest publication of native multisample depth requires sampled readback support"); const auto lease = GuestAllocations::GuestAllocationsAcquireAll_nid_postfix(); @@ -3228,7 +3236,7 @@ bool DepthSurface::PublishToGuest(DepthReadCause cause) { for (std::size_t offset = 0u; offset < result[1].size(); offset += 4u) { std::uint32_t word; std::memcpy(&word, result[1].data() + offset, 4u); - word = expandedHtileWord(word, !target.htileDepthOnly, VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT); + word = expandedHtileWord(word, !target.htileDepthOnly, VK_IMAGE_ASPECT_DEPTH_BIT | (stencil ? VK_IMAGE_ASPECT_STENCIL_BIT : 0u)); std::memcpy(result[1].data() + offset, &word, 4u); } } @@ -3296,6 +3304,9 @@ bool DepthSurface::PublishToGuest(DepthReadCause cause) { publication.clear(); if (superseded[0]) RetireMultisampleColorTarget(sampling.depthAlias->active); if (superseded[2]) RetireMultisampleColorTarget(sampling.stencilAlias->active); + if (!stencil && !bare) { + active->store(false, std::memory_order_release); + } return std::ranges::find(tookGuest, true) != tookGuest.end(); } diff --git a/core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp b/core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp index 37df113b45f1..1e3e14d606e3 100644 --- a/core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp +++ b/core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp @@ -404,6 +404,10 @@ void TargetRefuses(Action action, std::string_view expected) { Require(message.find(expected) != std::string::npos, "multisample target refusal did not match " + std::string(expected) + ": " + message); } +std::string_view PublicationRefusal(VkFormat format) { + return format == VK_FORMAT_D16_UNORM ? "guest publication of a written native multisample D16 depth is not implemented" : "guest publication of a written native multisample depth needs the texture detiler"; +} + void QueueTargetByteWrite(const Context& context, Recorder& recorder, std::uint64_t address, std::byte value) { auto buffer = std::make_shared(context, 4u, VK_BUFFER_USAGE_TRANSFER_DST_BIT); const auto commands = recorder.Commands(); @@ -705,7 +709,7 @@ std::vector DepthFragmentShader() { return module.Finalize(); } -std::vector DepthFeedbackFragmentShader(std::uint32_t binding, bool sampling) { +std::vector DepthFeedbackFragmentShader(std::uint32_t binding, bool sampling, float constantDepth = 0.0f) { ShaderRecompiler::SpirvModule module; module.EmitCapability(spv::CapabilityShader); module.AddMemoryModel(spv::AddressingModelLogical, spv::MemoryModelGLSL450); @@ -728,7 +732,7 @@ std::vector DepthFeedbackFragmentShader(std::uint32_t binding, bo const auto main = module.AllocateId(); module.AddFunction(spv::OpFunction, voidType, main, spv::FunctionControlMaskNone, module.Type(spv::OpTypeFunction, voidType)); module.AddFunction(spv::OpLabel, module.AllocateId()); - auto value = module.Constant(spv::OpConstant, f32, 0u); + auto value = module.Constant(spv::OpConstant, f32, std::bit_cast(constantDepth)); if (sampling) { const auto element = module.AllocateId(), object = module.AllocateId(), fetched = module.AllocateId(); value = module.AllocateId(); @@ -1541,8 +1545,7 @@ void CheckDrawFeedback() { device->Draw(state, draw, initial); device->WaitIdle(); std::array probe{}; - TargetRefuses([&] { AgcDriver::GuestMemory::Read(depth.address, probe); }, "sample-preserving guest publication"); - Require(DepthSurfaceAt(depth.address), "a refused guest read retired a native depth surface a draw wrote"); + Require(DepthSurfaceAt(depth.address), "a draw left no resident native depth surface"); reader.spirv = DepthFeedbackFragmentShader(binding, true); reader.variantId = 3u; const auto words = DepthSampleWords(depth); @@ -1574,7 +1577,104 @@ void CheckDrawFeedback() { AgcDriver::GuestMemory::Read(tested.address + depthBytes - 1u, probe); Require(probe[0] == guestByte(depthBytes - 1u), "a guest read after a depth-test-only draw did not return its guest bytes"); Require(!DepthSurfaceAt(tested.address), "a guest read left a native depth surface only depth-tested resident"); - std::puts("Native depth feedback refused through the draw resource path; a written surface refused and a depth-tested one retired on guest read"); + std::puts("Native depth feedback refused through the draw resource path; a depth-tested surface retired on guest read"); +} + +void CheckWrittenPublication(std::uint32_t samples, VkExtent2D extent, bool depthOnly, std::uint32_t pipeBankXor) { + const auto device = OpenVulkanTestDevice(); + Require(device != nullptr, "native depth publication requires Vulkan"); + const auto depthBytes = static_cast(MultisampledDepthBytes_nid_no_patch(extent, 4u, samples)); + const auto metadataBytes = static_cast(HtileMetadataBytes(extent)); + TargetMemory memory(depthBytes), metadata(65536u), nextMemory(depthBytes), nextMetadata(65536u), lastMemory(depthBytes), lastMetadata(65536u); + std::memset(metadata.Data(), 0, 65536u); + const auto guestByte = [](std::size_t offset) { return static_cast(offset * 7u + 3u); }; + for (std::size_t offset = 0u; offset < depthBytes; ++offset) memory.Data()[offset] = guestByte(offset); + DepthTarget depth{memory.Address(), 0u, extent, VK_FORMAT_D32_SFLOAT, 0.0f, 0u, metadata.Address(), false, samples}; + depth.depthSwizzle = 24u; + depth.pipeBankXor = pipeBankXor; + depth.htileDepthOnly = depthOnly; + depth.iterate256 = depth.htilePipeAligned = true; + struct Cleanup { + AgcDriver::VulkanDevice& device; + ~Cleanup() { device.WaitIdle(); ClearCachedTextures(device.Device()); ClearDepthSurfaces(device.Device()); } + } cleanup{*device}; + State state{}; + state.stages = {ShaderPath::Vertex, 0u, 32u, 32u, std::nullopt, std::nullopt}; + state.depth = depth; + state.depthTest = state.depthWrite = true; + state.depthCompare = VK_COMPARE_OP_ALWAYS; + state.renderExtent = extent; + state.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; + state.viewport = {0.0f, 0.0f, static_cast(extent.width), static_cast(extent.height), 0.0f, 1.0f}; + state.negativeOneToOne = false; + state.scissor = {{0, 0}, extent}; + state.cullMode = VK_CULL_MODE_NONE; + state.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE; + state.samples = samples; + ShaderRecompiler::RecompileResult vertex, producer; + vertex.spirv = DepthVertexShader(); + vertex.variantId = 1u; + constexpr float written = 0.375f; + producer.spirv = DepthFeedbackFragmentShader(ShaderRecompiler::RuntimeAbi::FirstImageBinding, false, written); + producer.variantId = 2u; + const AgcDriver::Pm4::DrawParameters draw{0u, 3u, 0u, 1u, 0u, false}; + const std::array shaders{{{ShaderRecompiler::ShaderStage::Vertex, &vertex, 0u}, {ShaderRecompiler::ShaderStage::Fragment, &producer, PixelPushOffset(0u, device->Target())}}}; + device->Draw(state, draw, shaders); + device->WaitIdle(); + Require(DepthSurfaceAt(depth.address), "a draw left no resident native depth surface"); + const auto words = DepthSampleWords(depth); + auto held = DepthSurfaceTexture(device->graphicsContext(), words, DecodeTextureResource(words), VkComponentMapping{}); + Require(held != nullptr, "published owner fixture has no held native view"); + std::array probe{}; + AgcDriver::GuestMemory::Read(depth.address, probe); + Require(!DepthSurfaceAt(depth.address), "publishing a written native depth surface left it resident"); + const MultisampleTextureLayout layout(TextureTileMode::kZ64KBX, 4u, samples, extent.width, extent.height, 1u, pipeBankXor); + Require(layout.Bytes() == depthBytes, "published native depth layout differs from its guarded range"); + std::vector covered(depthBytes); + const auto expected = std::bit_cast(written); + for (std::uint32_t y = 0u; y < extent.height; ++y) { + for (std::uint32_t x = 0u; x < extent.width; ++x) { + for (std::uint32_t sample = 0u; sample < samples; ++sample) { + const auto offset = static_cast(layout.Offset(x, y, 0u, sample)); + std::uint32_t value = 0u; + std::memcpy(&value, memory.Data() + offset, sizeof(value)); + Require(value == expected, "a published native depth sample lost its drawn value"); + for (std::size_t byte = 0u; byte < sizeof(value); ++byte) covered[offset + byte] = true; + } + } + } + for (std::size_t offset = 0u; offset < depthBytes; ++offset) Require(covered[offset] || memory.Data()[offset] == guestByte(offset), "publishing native depth changed guest bytes outside its samples"); + const std::uint32_t htile = depthOnly ? 0xfffc000fu : 0xfffff00fu; + for (std::size_t offset = 0u; offset < metadataBytes; offset += 4u) { + std::uint32_t word = 0u; + std::memcpy(&word, metadata.Data() + offset, sizeof(word)); + Require(word == htile, "publishing native depth did not expand its HTILE"); + } + std::printf("Native depth publication samples=%u extent=%ux%u depthOnly=%u xor=0x%x: samples, HTILE and padding checked\n", samples, extent.width, extent.height, depthOnly, pipeBankXor); + const auto released = DepthSurfacesReleased(); + std::memset(nextMetadata.Data(), 0, 65536u); + auto next = depth; + next.address = nextMemory.Address(); + next.htileAddress = nextMetadata.Address(); + auto nextState = state; + nextState.depth = next; + device->Draw(nextState, draw, shaders); + device->WaitIdle(); + Require(DepthSurfacesReleased() == released, "a published native owner was released while its view was held"); + held.reset(); + std::memset(lastMetadata.Data(), 0, 65536u); + next.address = lastMemory.Address(); + next.htileAddress = lastMetadata.Address(); + nextState.depth = next; + device->Draw(nextState, draw, shaders); + device->WaitIdle(); + Require(DepthSurfacesReleased() == released + 1u, "a published inactive native owner remained cached without held views"); + std::memset(metadata.Data(), 0, 65536u); + AgcDriver::GuestMemory::MarkWritten(metadata.Address(), metadataBytes); + device->Draw(state, draw, shaders); + device->WaitIdle(); + Require(DepthSurfaceAt(depth.address), "a released native owner prevented rebinding its old address"); + std::puts("Published native depth owner retained its held view, released its maps and rebound its old address"); } void CheckDepthAttachmentAlias() { @@ -1735,8 +1835,8 @@ void CheckDepthTarget(Context context, VkFormat format, std::uint32_t fragments, Require(DepthSurfaceView(context, target) == view, "native depth attachment did not reuse its image"); NoteDepthSurfaceWrite(context, target); std::array beforeSampling{}; - TargetRefuses([&] { AgcDriver::GuestMemory::Read(target.address + bytes - 1u, beforeSampling); }, "sample-preserving guest publication"); - TargetRefuses([&] { RequireNoMultisampleTarget(target.htileAddress + metadataBytes - 1u, 1u, "a DMA copy"); }, "sample-preserving guest publication"); + TargetRefuses([&] { AgcDriver::GuestMemory::Read(target.address + bytes - 1u, beforeSampling); }, PublicationRefusal(format)); + TargetRefuses([&] { RequireNoMultisampleTarget(target.htileAddress + metadataBytes - 1u, 1u, "a DMA copy"); }, PublicationRefusal(format)); const auto words = DepthSampleWords(target); auto texture = CachedSampledTexture(context, words); auto arrayTexture = CachedSampledTexture(context, words, VK_IMAGE_VIEW_TYPE_2D_ARRAY); @@ -1883,22 +1983,22 @@ void CheckDepthTarget(Context context, VkFormat format, std::uint32_t fragments, Require(AgcDriver::GuestMemory::CollectWritesUncached(target.htileAddress, static_cast(metadataBytes)) > beforeImport, "HTILE import window did not stamp its changed page"); } if (completionCandidate && fault == ClearFault::None) { - TargetRefuses([&] { + if (format == VK_FORMAT_D32_SFLOAT) TargetRefuses([&] { auto uploadContext = context; uploadContext.hostImportAlignment = 0; GuestBufferMemory buffer(uploadContext); buffer.AddWritable(target.htileAddress, metadataBytes); buffer.Upload(false); - }, "sample-preserving guest publication"); + }, PublicationRefusal(format)); const auto accepted = std::pair{target.htileAddress, static_cast(metadataBytes)}; RequireNoResidentDepthRead_nid_no_patch(target.htileAddress, metadataBytes, accepted); - TargetRefuses([&] { RequireNoResidentDepthRead_nid_no_patch(target.address, bytes, accepted); }, "sample-preserving guest publication"); - TargetRefuses([&] { RequireNoResidentDepthRead_nid_no_patch(target.htileAddress, metadataBytes + 1u, accepted); }, "sample-preserving guest publication"); + if (format == VK_FORMAT_D32_SFLOAT) TargetRefuses([&] { RequireNoResidentDepthRead_nid_no_patch(target.address, bytes, accepted); }, PublicationRefusal(format)); + if (format == VK_FORMAT_D32_SFLOAT) TargetRefuses([&] { RequireNoResidentDepthRead_nid_no_patch(target.htileAddress, metadataBytes + 1u, accepted); }, PublicationRefusal(format)); Require(DepthSurfaceAt(target.address), "an accepted HTILE buffer access retired its native depth owner"); } if (completionCandidate) ArmHtileDepthClear(target.htileAddress, static_cast(metadataBytes)); - if (completionCandidate && fault == ClearFault::None) { - TargetRefuses([&] { RequireNoResidentDepthRead_nid_no_patch(target.htileAddress, metadataBytes, std::pair{target.htileAddress, static_cast(metadataBytes)}); }, "sample-preserving guest publication"); + if (completionCandidate && fault == ClearFault::None && format == VK_FORMAT_D32_SFLOAT) { + TargetRefuses([&] { RequireNoResidentDepthRead_nid_no_patch(target.htileAddress, metadataBytes, std::pair{target.htileAddress, static_cast(metadataBytes)}); }, PublicationRefusal(format)); } if (fault == ClearFault::Overlap) NoteHtileDepthClear(target.htileAddress, static_cast(metadataBytes), nativeBytes); if (fault == ClearFault::SupersededClear) { @@ -1970,19 +2070,19 @@ void CheckDepthTarget(Context context, VkFormat format, std::uint32_t fragments, Require(std::all_of(memory.Data(), memory.Data() + bytes, [](auto value) { return value == std::byte{0xa5}; }), "native depth sampling silently published guest memory"); std::array probe{}; for (const auto address : {target.address, target.address + bytes - 1u, target.htileAddress, target.htileAddress + metadataBytes - 1u}) { - TargetRefuses([&] { RequireNoResidentDepthRead_nid_no_patch(address, 1u); }, "sample-preserving guest publication"); - TargetRefuses([&] { AgcDriver::GuestMemory::Read(address, probe); }, "sample-preserving guest publication"); - TargetRefuses([&] { RequireNoMultisampleTarget(address, 1u, "a DMA copy"); }, "sample-preserving guest publication"); + TargetRefuses([&] { RequireNoResidentDepthRead_nid_no_patch(address, 1u); }, PublicationRefusal(format)); + TargetRefuses([&] { AgcDriver::GuestMemory::Read(address, probe); }, PublicationRefusal(format)); + TargetRefuses([&] { RequireNoMultisampleTarget(address, 1u, "a DMA copy"); }, PublicationRefusal(format)); } TargetMemory unrelated(65536u); AgcDriver::GuestMemory::Read(unrelated.Address(), probe); Require(probe[0] == std::byte{0xa5}, "resident depth guard blocked an unrelated read"); auto alias = target; alias.htileAddress += 65536u; - TargetRefuses([&] { DepthSurfaceView(context, alias); }, "sample-preserving guest publication"); + TargetRefuses([&] { DepthSurfaceView(context, alias); }, PublicationRefusal(format)); alias = target; alias.htileDepthOnly = !target.htileDepthOnly; - TargetRefuses([&] { DepthSurfaceView(context, alias); }, "sample-preserving guest publication"); + TargetRefuses([&] { DepthSurfaceView(context, alias); }, PublicationRefusal(format)); auto resource = DecodeTextureResource(words); for (std::uint32_t field = 0u; field < 18u; ++field) { auto changed = resource; @@ -2062,8 +2162,8 @@ void CheckUnwrittenGuestAccess(Context context, VkFormat format, std::uint32_t f view = rebound; } NoteDepthSurfaceWrite(context, target); - TargetRefuses([&] { AgcDriver::GuestMemory::Read(target.address, probe); }, "sample-preserving guest publication"); - TargetRefuses([&] { RequireNoMultisampleTarget(target.htileAddress, 1u, "a DMA copy"); }, "sample-preserving guest publication"); + TargetRefuses([&] { AgcDriver::GuestMemory::Read(target.address, probe); }, PublicationRefusal(format)); + TargetRefuses([&] { RequireNoMultisampleTarget(target.htileAddress, 1u, "a DMA copy"); }, PublicationRefusal(format)); Require(resident(), "a refused guest access retired a written native depth surface"); for (std::size_t offset = 0u; offset < bytes; ++offset) Require(memory.Data()[offset] == guestByte(offset), "retiring an unwritten native depth surface changed its guest bytes"); Require(std::all_of(metadata.Data(), metadata.Data() + metadataBytes, [](std::byte value) { return value == std::byte{0}; }), "retiring an unwritten native depth surface changed its HTILE"); @@ -3178,7 +3278,7 @@ void CheckRetirement(Context context, VkFormat format, std::uint32_t samples, st Require(MultisampleTargetView(context, color) != VK_NULL_HANDLE, "retirement fixture has no color attachment"); recorder.Sync(); const auto guarded = [&] { - TargetRefuses([&] { RequireNoResidentDepthRead_nid_no_patch(target.address, 1u); }, "sample-preserving"); + TargetRefuses([&] { RequireNoResidentDepthRead_nid_no_patch(target.address, 1u); }, PublicationRefusal(format)); }; { GuestAllocations::Mutation mutation; @@ -4807,6 +4907,13 @@ int main(int argc, char** argv) { return 0; } CheckDrawFeedback(); + if (argc == 1) { + for (const auto samples : {2u, 4u, 8u}) { + if (!DepthSupported(context, VK_FORMAT_D32_SFLOAT, samples)) continue; + CheckWrittenPublication(samples, {5u, 3u}, false, 0u); + CheckWrittenPublication(samples, {70u, 67u}, true, 0x8c00u); + } + } if (argc == 1) CheckDepthAttachmentAlias(); if (argc == 1) CheckStorageAliasRetirement(); std::unique_lock lock(AgcDriver::GuestMemory::GpuMutex()); diff --git a/docs/dev/debt/changes/fix-published-native-depth-retirement.md b/docs/dev/debt/changes/fix-published-native-depth-retirement.md new file mode 100644 index 000000000000..ac990b213a0b --- /dev/null +++ b/docs/dev/debt/changes/fix-published-native-depth-retirement.md @@ -0,0 +1,13 @@ +# libSceAgcDriver + +## add Functional + +- [Native depth owner reclamation](../../../core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp): written HTILE D32 multisampled owners without completed guest publication remain cached unless their guest allocations are released; bounded eviction and reconstruction from arbitrary guest bytes are not implemented. Publication makes HTILE D32 owners inactive only after both planes commit; reclamation follows the inactive, unwritten and released-view checks. Console decompression bytes remain unmeasured. Bare D32 and D32S8 owner retention follows the publication rules below. + +## change [Native D32S8 guest publication] + +- [Native depth guest publication](../../../core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp) overwrites a late CPU store only when it matches the snapshot and the host changes that byte; other late stores are kept and the read throws. When a written page holds the snapshot byte, the host result differs and no driver store covers it, reuse by a draw input, storage image, colour or depth target takes the guest's byte (inferred); CPU, DMA, texture and buffer reads throw. HTILE is published expanded; stencil is retiled with the depth XOR. HTILE D32 retires after both planes commit. Bare D32 and D32S8 retire on reuse that takes a guest byte. A new depth target over a retained owner throws; retained host bytes are rebased and a plane with a guest byte or hole throws at next use. D16, unproven clears, resident colour aliases, colour acquisition mid-read, pending storage-image units and in-completion publication throw. + +## change [Native multisampled D32S8 depth without HTILE] + +- [Native multisampled D32S8 depth without HTILE](../../../core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp) is imported when its depth plane repeats one float in [0, 1], its separate stencil plane repeats one byte and no multisampled colour target covers either plane; the host image starts at those values and the sampled descriptor must name no metadata, whose pipe-aligned and ITERATE_256 bits are then not compared. The depth plane is sampled as a 32-bit float, the stencil plane through the R8_UINT descriptor of the stencil plane sampling entry below. That every sample then holds them is inferred from the uncompressed layout, not measured on the console. A written owner is published on a guest read as the native depth guest publication entry above describes, with no HTILE to expand. Other planes import once a stencil readback shows the first draw (depth ALWAYS with writes, stencil ALWAYS/REPLACE, mask 0xff) reached every sample; else they throw, as D16 without HTILE does.