Skip to content

CI : Support rendering using Metal for Mac #2608

@kwokcb

Description

@kwokcb

Requirements

  • Update Github actions workflow to allow for headless rendering using Metal on Mac
  • The current entry points used for rendering are MaterialXView and MaterialXGraphEditor. Each can be incrementally added to CI.
  • Note: MaterialXTest render unit tests have never been added to CI so is not part of the scope of this issues.
  • There are a few tests which work on runners without GPUs (software) which run for Linux only.

Proposed changes

  • Add test_render option to appropriate runners.
  • Add setup to allow software rendering.
  - name: Initialize Headless Rendering (macOS)
      if: matrix.test_render == 'ON' && runner.os == 'macOS'
      run: |
        # Force software rendering for Metal backend 
        echo "MTL_HARDWARE_RENDERING=0" >> $GITHUB_ENV
        # Enable Metal debug layer for better debugging in CI
        echo "MTL_DEBUG_LAYER=1" >> $GITHUB_ENV
        # Force software rendering for OpenGL backend compatibility
        echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV

MaterialXView

This appears to work for MaterialXView with these results:

Image Image

MaterialXGraphEditor

Does not run with this error:

MaterialXGraphEditor[18931:75242] Metal API Validation Enabled
Glfw Error 65545: NSGL: Failed to find a suitable pixel format

Root cause analysys is required to determine the cuase. It appears to be ImGUI setup related?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions