Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8336624

Improve Decora Shader loading for modern APIs

XMLWordPrintable

    • b04
    • generic
    • generic

      This is an enhancement to track following TODO in JFX Sandbox - Metal branch: https://github.com/openjdk/jfx-sandbox/blob/metal/modules/javafx.graphics/src/main/java/com/sun/scenario/effect/impl/prism/ps/PPSRenderer.java#L270

      Modern graphics APIs like Metal require additional information on which resources are bound to Shaders. This can be resolved by providing the rendering backend with the name of a Shader to load and letting the backend load the Shader on its own - a solution that is currently done temporarily on Metal branch. Having knowledge of Shader's name allows the backend to, for example, fetch additional information about Shader's resources generated by JSLC.

      Other modern APIs which might potentially find their way into JavaFX also follow a similar principle and would use this enhancement - D3D12 could use this to build Root Signatures, while Vulkan could use these for Descriptor Set Layouts. However, it is possible that existing backends (D3D9, ES2) need the Shader source to be loaded in current way. This should be investigated and we should find some unified solution to Decora Shader loading which would both satisfy existing backends and allow new backends like Metal to function properly.

            lkostyra Lukasz Kostyra
            lkostyra Lukasz Kostyra
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: