JDK-8315320 : Maintain separate MSAA pipeline state for non-3D shaders
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: internal
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic
  • Submitted: 2023-08-30
  • Updated: 2023-08-30
  • Resolved: 2023-08-30
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
Run fx83dfeatures.SubSceneAndAntiAliasingTest from apps/toys/FX8-3DFeatures with MTL validation and it crashes with below log:

-[MTLDebugRenderCommandEncoder setRenderPipelineState:]:1604: failed assertion `Set Render Pipeline State Validation
For color attachment 0, the texture sample count (4) does not match the renderPipelineState colorSampleCount (1).
The color sample count (4) does not match the renderPipelineState's color sample count (1)
The raster sample count (4) does not match the renderPipelineState's raster sample count (1)

Looks like this is happening after https://bugs.openjdk.org/browse/JDK-8314401, because after this change we have 2 different sample counts. One for MSAA and another for non-MSAA.
Comments
Changeset: 146b0700 Author: Jayathirth Rao D V <jayathirth.d.v@oracle.com> Committer: Ambarish Rapte <arapte@openjdk.org> Date: 2023-08-30 13:55:56 +0000 URL: https://git.openjdk.org/jfx-sandbox/commit/146b0700a56a4cc9154ff7a78bbd9a9e790e48f5
30-08-2023

This is happening because we are re-using non-MSAA RenderPipelineState even when target is MSAA texture. We store pipeline state for each shader when they are initialized. When we start using MSAA target we should create MSAA RenderPipelineState with sample count 4 and re-use it. We are getting validation error for below shader: 2023-08-30 11:16:52.876 java[33974:799600] >>>> MetalShader.getArgumentBuffer()----> fragFuncName: Texture_Color_AlphaTest -[MTLDebugRenderCommandEncoder setRenderPipelineState:]:1604: failed assertion `Set Render Pipeline State Validation For color attachment 0, the texture sample count (4) does not match the renderPipelineState colorSampleCount (1). The color sample count (4) does not match the renderPipelineState's color sample count (1) The raster sample count (4) does not match the renderPipelineState's raster sample count (1)
30-08-2023