JDK-8312493 : Assertion while running fx83dfeatures.Snapshot3D demo
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: internal
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86_64
  • Submitted: 2023-07-21
  • Updated: 2023-07-21
  • Resolved: 2023-07-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
internalFixed
Related Reports
Blocks :  
Description
This is seen on x64 based macBook with a discrete graphics card.

Run  fx83dfeatures.Snapshot3D demo from toys directory with metal rendering pipeline.

It results in an assertion-
-[MTLTextureDescriptorInternal validateWithDevice:]:1344: failed assertion `Texture Descriptor Validation
MTLTextureDescriptor: Depth, Stencil, DepthStencil textures cannot be allocated with MTLStorageModeShared or MTLStorageModeManaged on this device.
'
zsh: abort
Comments
This issue doesnt happen in M1, looks like this is happening because of differences in how we treat Private resource between Unified and Discrete memory model : https://developer.apple.com/documentation/metal/resource_fundamentals/choosing_a_resource_storage_mode_for_intel_and_amd_gpus?language=objc I had kept Managed mode for depth non-msaa texture to match non-msaa color attachment. We dont need any depth data at CPU side, so we can store depth texture in private mode.
21-07-2023

Changeset: da59bf6f Author: Jayathirth Rao D V <jayathirth.d.v@oracle.com> Committer: aghaisas <ajitgh@gmail.com> Date: 2023-07-21 13:41:24 +0000 URL: https://git.openjdk.org/jfx-sandbox/commit/da59bf6f4f7c767af365017ea22f906ca4965be0
21-07-2023