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

Update library to latest webgpu-native headers #427

Open
wants to merge 9 commits into
base: trunk
Choose a base branch
from

Commits on Sep 19, 2024

  1. Update library to latest webgpu-native headers

    This goes up to webgpu-native/webgpu-headers@2b59747
    
    Things I *didn't* do:
    
    * I didn't update the library to make sure "instance dropped" callback
      error codes are guaranteed to happen, like they seem to be in Dawn.
    
    List of changes (roughly in order of header commits):
    
    Various enum and struct renames
    
    Updated callbacks to use the new *CallbackInfo structs and 2-userdata system. Also updated functions to return WGPUFuture, though the WGPUFuture thing is just stubbed out at the moment as I don't think wgpu-core has the necessary functionality for it. wgpuInstanceWaitAny is unimplemented!()
    
    DepthClipControl merged into PrimitiveState, related code simplified.
    
    Updated depthWriteEnabled to use an optional bool, mostly matters due to added validation.
    
    Add TODOs for missing features (sliced 3D compressed textures)
    
    *Reference() became *AddRef()
    
    Added unorm10-10-10-2 vertex format
    
    Usage field in TextureViewDescriptor, just used for validation as wgpu-core doesn't allow specifying it anyways.
    
    Removed maxInterStageShaderComponents
    
    Added clang_macro_fallback to bindgen config, since the headers switched to using UINT32_MAX etc. UINT64_MAX still doesn't work so I had to manually define those.
    
    Renamed flags enums. Added a conversion helper function to convert them from u64 -> u32 for mapping. (means added direct dependency on bitflags crate)
    
    Removed device argument from (unimplemented) wgpuGetProcAddress
    
    Suboptimal surface texture acquisition moved to enum return value, was easy since wgpu-core already returns it like that.
    
    "Undefined" present mode added, it just selects FIFO.
    PJB3005 committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    2baea09 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c60733 View commit details
    Browse the repository at this point in the history
  3. Fix WGPUBufferMapAsyncStatus tomfoolery

    This enum was replaced with WGPUMapAsyncStatus, but I didn't quite notice. The error codes map different.
    PJB3005 committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    980c2ff View commit details
    Browse the repository at this point in the history
  4. Fix macOS typos in examples

    PJB3005 committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    8f34e48 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. Update headers again

    Replaces *EnumerateFeatures with *GetFeatures.
    
    Also fixes CI due to fix in headers.
    PJB3005 committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    b36e558 View commit details
    Browse the repository at this point in the history
  2. Update wgpu.h to match new flag scheme

    Upstream removed the "Flags" suffix from flags types and moved them to no longer be C enums. This matches that change. WGPUInstanceFlag still has "Flag" in the name because, well, there'd be nothing left to distinguish it from WGPUInstance, and it makes sense for it.
    PJB3005 committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    a4626db View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. Update headers again, WGPUStringView

    Also updates wgpu.h to use WGPUStringView everywhere.
    PJB3005 committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    a256544 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8947cf2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fe965c8 View commit details
    Browse the repository at this point in the history