Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autodesk: usdImagingGL: support for Hgi specific variants of tests #3479

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

erikaharrison-adsk
Copy link
Contributor

@erikaharrison-adsk erikaharrison-adsk commented Jan 7, 2025

Description of Change(s)

Support Hgi specific variants of tests to work around missing Hgi features without needing to entirely disable tests. More specifically in this PR, use separate Metal baselines for tests that have wide line primitives, since Metal only supports one pixel wide lines.

Mechanism:

register_test_with_hgi_variants(testUsdImagingGLExample
    COMMAND "... -write testUsdImagingGLExample@[email protected]"
    IMAGE_DIFF_COMPARE
        testUsdImagingGLExample@hgi_suffix@_1.1.png
    ...
    HGI_VARIANT
        Metal
        WebGPU # For the example, but might be relevant soon
)

The placeholder string @hgi_suffix@ is replaced by an Hgi suffix when necessary.

For all listed Hgi variants supported, register a suffixed test with a suffixed baseline.

  • testUsdImagingGLExample_Metal => testUsdImagingGLExample_Metal_1.1.png
  • testUsdImagingGLExample_WebGPU => testUsdImagingGLExample_WebGPU_1.1.png

Other supported Hgis are also register with a suffix, but use a non-suffixed baseline:

  • testUsdImagingGLExample_GL => testUsdImagingGLExample_1.1.png
  • testUsdImagingGLExample_Vulkan => testUsdImagingGLExample_1.1.png

Unsupported Hgis are ignored:

  • testUsdImagingGLExample_GL would not be registered on Apple platforms

If none of the Hgi variants are supported, then register a single test like normal:

  • testUsdImagingGLExample => testUsdImagingGLExample_1.1.png

The proper Hgi enable settings are appended to the ENV argument for all suffixed tests:

  • _Metal: HGI_ENABLE_VULKAN=0;HGI_ENABLE_WEBGPU=0
  • _GL: HGI_ENABLE_VULKAN=0;HGI_ENABLE_WEBGPU=0
  • _Vulkan: HGI_ENABLE_VULKAN=1
  • _WebGPU: HGI_ENABLE_WEBGPU=1

Link to proposal (if applicable)

  • N/A

Fixes Issue(s)

  • N/A

Checklist

@erikaharrison-adsk erikaharrison-adsk changed the title usdImagingGL: support for Hgi specific variants of tests Autodesk: usdImagingGL: support for Hgi specific variants of tests Jan 7, 2025
@DDoS
Copy link
Contributor

DDoS commented Jan 7, 2025

HgiWebGPU support was stripped for this PR, but can be re-added later when the WebGPU branch gets merged.

@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-10555

(This is an automated message. See here for more information.)

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants