Skip to content

[3.0] Add multi-platform generation and finish initial OpenXR bindings - #2628

Draft
Exanite wants to merge 100 commits into
feature/silktouch-config-overhaulfrom
feature/openxr-multiplatform-generation
Draft

Exanite wants to merge 100 commits into
feature/silktouch-config-overhaulfrom
feature/openxr-multiplatform-generation

Conversation

@Exanite

@Exanite Exanite commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary of the PR

This PR adds support for multi-platform scraping to ClangScraper and updates the Khronos bindings to include platform-specific APIs. Notably, this means finishing the initial OpenXR bindings and making it so that the OpenXR bindings are functional.

Related issues, Discord discussions, or proposals

Discord thread for this PR: https://discord.com/channels/521092042781229087/1560213833249726474

Further Comments

Original comments from my OpenCL/XR PR (#2590):

Most Khronos APIs have additional headers that interop with platform-specific/other Khronos/other graphics APIs.
OpenXR notably will not work without these additional headers, but generating bindings for these headers requires additional work. See this to understand the planned solution: https://discord.com/channels/521092042781229087/587346162802229298/1529139068288503900

Tasks from tracker

Original set of tasks for this PR (some may have been moved down):

  • Investigate OpenCL empty enums
    • Most of these should be populated once the other headers are included
    • cl_command_buffer_info_khr
    • cl_command_buffer_properties_khr
    • cl_command_buffer_state_khr
    • cl_command_buffer_update_type_khr
    • cl_command_properties_khr
    • cl_compiler_mode_altera
    • cl_d3d10_device_set_khr
    • cl_d3d10_device_source_khr
    • cl_d3d11_device_set_khr
    • cl_d3d11_device_source_khr
    • cl_dx9_device_set_intel
    • cl_dx9_device_source_intel
    • cl_gl_context_info
    • cl_gl_object_type
    • cl_gl_texture_info
    • cl_layer_properties
    • cl_media_adapter_set_khr
    • cl_media_adapter_type_khr
    • cl_mutable_command_info_khr
    • cl_mutable_dispatch_asserts_khr (Flags so by default 1 None member)
    • cl_mutable_dispatch_fields_khr (Flags)
    • cl_platform_command_buffer_capabilities_khr (flags)
    • cl_queue_properties_khr
    • cl_semaphore_reimport_properties_khr
    • cl_svm_alloc_properties_khr
    • cl_svm_capabilities_khr (Flags)
    • cl_svm_free_flags_khr (Flags)
    • cl_svm_free_properties_khr
    • cl_svm_pointer_info_khr
    • cl_va_api_device_set_intel
    • cl_va_api_device_source_intel
  • Also investigate any other empty enums, if there are any. Make sure to check for [Flags] enums as well, since these will not be empty and instead have a single None member.

Tasks

  • Add support for multi-platform scraping to ClangScrape
    • This might be easier than it sounds since we can now run the same mod multiple times with different configs
  • Fix scrape vs cache inconsistencies
    • Investigate members being generated in different orders (probably due to file ordering)
    • Investigate SupportedApiProfile differences
  • Investigate why this diff has additions not equal to deletions. I only did a rename here so they should be equal. 3a10ed2
    • AddApiProfiles adds profiles based on source directory. I renamed the directory, but not the AddApiProfiles config. Fixed.
  • Add bindings regeneration workflow
    • Cache population
    • Bindings regeneration
    • Add ability for ClangScraper to abort the job if a certain command line arg is provided
      • This is intended for cache regeneration.
      • Note, this should abort the job, not the entire process since other jobs might need to finish populating their caches.
    • Add option to run ClangScraper with cache only.
      • This is to remove the need to download submodules and dependencies during the final bindings regeneration step since the cache should have been populated already.
    • Auto commit and push
    • Figure out how we want to handle cache updates for multiple jobs. One Github Actions runner per bindings job?
  • Make sure to handle field merging in BakeSourceSets
  • Add multi-platform generation for each API
    • Not exhaustive, but I'll start with these
    • OpenXR
    • OpenCL
    • Vulkan

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

File Coverage
All files 22% ✅

Minimum allowed coverage is 0%

Generated by 🐒 cobertura-action against 5238b8d

@Exanite
Exanite force-pushed the feature/openxr-multiplatform-generation branch from 2b08755 to ccaa202 Compare October 15, 2026 08:28
Reason was because GL_ACTIVE_PROGRAM_EXT differs and that becomes a constant field defined in GL.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant