On Tue, 22 Sep 2026 12:06:22 GMT, Jayathirth D V <[email protected]> wrote:
>> Issue: When we run picktest.DragCube3D with Metal API validation enabled and >> resize the frame(or move the red cube) we get assertion error for >> depthAttachmentPixelFormat. >> >> Root cause: When are doing both 2D and 3D rendering on same RTT, we need to >> use render pipeline state with correct depthAttachmentPixelFormat on the >> render encoder, even when depth testing is no enabled. We are getting this >> assertion in drawIndexedQuads because in this code flow depth testing is >> disabled and RTT has depth attachment. Since we continue to use the encoder >> which is created with render pass descriptor having a depth texture, it >> expects us to set render pipeline state with MTLPixelFormatDepth32Float. >> Also we don't see any artifacts because depth testing is disabled and we are >> just not setting proper pixel format for this unused depth texture. >> >> Fix: Pick render pipeline state for encoder based on whether encoder is >> created with depth attachment or not instead of depth testing state. Changes >> are made to make sure we are updating depth texture related information and >> set proper pipeline state. Also setting depthStencilState should be >> unconditional so that we flip properly when depth testing state changes on >> the same encoder. I have also added extra check to end the encoder when we >> enable depth testing but we have an encoder without depth attachment. >> >> Functional testing is done using Ensemble8, FX83DFextures with Metal >> validation and multi monitor setup, i don't see any issues. >> Performance testing is done using RenderPerfTest and there are no >> regressions. >> >> We don't have regression test because this assertion error happens only when >> Metal API validation is enabled and also the issue doesn't result in any >> corruption. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Jayathirth D V has updated the pull request incrementally with one additional > commit since the last revision: > > Update works fine now on macOS 26.6.2 M1 with metal and `export METAL_DEVICE_WRAPPER_TYPE=1` ------------- Marked as reviewed by angorya (Reviewer). PR Review: https://git.openjdk.org/jfx/pull/2318#pullrequestreview-5281121593
