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

upgrade to wgpu v24 #38

Merged
merged 5 commits into from
Feb 9, 2025
Merged

upgrade to wgpu v24 #38

merged 5 commits into from
Feb 9, 2025

Conversation

ygdrasil-io
Copy link
Contributor

No description provided.

* Refactor and extend WebGPU native header.

Updated enums, type definitions, and structs for consistency and added new features, including `WGPUShaderModuleDescriptorSpirV` and timestamp queries. Deprecated unused structures and switched from `typedef` enums to `static const` values for backends and flags. Introduced `WGPUStringView` for string handling and expanded documentation with sentinel values for clarity.

* Update WGPU bindings and types for improved consistency

Revised function signatures to replace `CString` with `WGPUStringView` and updated callback structures to use `...CallbackInfo` types. Adjusted return types for specific functions to align with WGPU API changes. Incremented mapping version to v23 to reflect these updates.

* Refactor WGPU API: Update surface handling and callback structures

Replaced deprecated WGPU surface and callback structures with updated types for consistency and compatibility with new APIs. Introduced proper package declarations and reorganized imports. Adjusted entry points and improved Android surface handling with reusable functionality.

* Refactor Linux surface creation to simplify logic

Removed redundant `getSurfaceFromX11Window` method and inlined its logic into `getSurface`. This simplifies the code by eliminating unnecessary abstractions and improves maintainability.

* Update getSurfaceFromX11Window to use ULong for window param

Previously, the window parameter was of type Long and converted to ULong internally. This change updates the parameter type directly to ULong, simplifying the code and improving type safety.

* Fix Linux surface retrieval by casting X11 window to ULong

The X11 window handle is now explicitly cast to ULong to ensure compatibility with the Vulkan surface creation. This resolves potential type mismatches and prevents errors during runtime on Linux systems.
* Refactor surface initialization and update dependencies

Simplify callback definitions for device and adapter retrieval. Refactor surface configuration by consolidating surface capabilities logic. Update dependencies, including a correction in the `wgpu` version and adjustment to `jniBasePath`.

* Update dependencies installation step in CI workflow

Add `sudo apt update` before installing `libglfw3-dev` to ensure the package list is up to date. This avoids potential issues with outdated package information during the CI workflow.
Simplified enum entry data structures, replacing YamlList with a nullable list and removing unnecessary base value logic. Updated several WGPU constants to align with 0-based numbering for consistency.
* Add support for enum documentation and improve type handling

Enhanced the `EnumGenerator` to include documentation comments for enumerations, using the newly introduced `appendDoc` function. Updated models to handle enum entries as triples with documentation, and added utilities to extract and process documentation strings from YAML definitions. Expanded enumerations with detailed inline comments for better context.

* Refactor documentation references and enhance string parsing.

Replaced function and method references in documentation with Markdown-style links for better readability. Added a helper function to convert formatted string references into compatible Markdown links in the YamlModel domain logic.

* Fix comment formatting in multiple files

Updated comment formatting across several files to ensure proper spacing before closing comment tags. This improves code clarity and maintains consistent documentation style.

* Remove redundant debug download tasks from build script

The debug download tasks for Android architectures were removed as they are no longer needed. This simplifies the build script and reduces unnecessary complexity, improving maintainability.

* Refactor string handling and improve documentation format.

Standardize string extension usage for clarity and reusability in `YamlModel`. Update documentation to replace inline code references with proper Dokka-style links for enhanced readability.

* Refactor string handling and improve documentation format.

Standardize string extension usage for clarity and reusability in `YamlModel`. Update documentation to replace inline code references with proper Dokka-style links for enhanced readability.

* Improve function documentation and enhance type handling

Added detailed documentation to various functions for better clarity and usability. Introduced a new `FunctionArgument` type alias to streamline function argument handling, including optional documentation. Enhanced internal processing to support and propagate argument and function-level documentation effectively.

* Refactor function return type handling across modules

Replaced `Type` with `FunctionReturnType` for better structure and added support for detailed return type documentation. Updated templates and function generation logic to handle the new structure consistently. Minor adjustments to build configurations and library dependencies.

* Add support for documenting NativeModel.Pointer and related types

Extended NativeModel.Pointer to include optional documentation and updated relevant conversion and generation logic to handle documentation consistently. Adjusted type generation to embed documentation comments for better understanding of generated classes.

* Refactor structure generation logic and add documentation support

Centralize member handling by extracting `getMembers` function, reducing duplication in structure generation. Introduce the `doc` property to NativeModel structures and improve interface definition readability using `templateBuilder`. Additionally, include detailed documentation for various WGPU-related structures.

* Add padding to WGPU struct layouts to ensure alignment

This update introduces padding fields to various WGPU struct layouts to maintain proper memory alignment. It ensures compatibility and correctness when interfacing with native libraries requiring strict data alignment.

* Add support for callback documentation handling

Enhanced the callback model to include an optional `doc` field. Updated relevant functions and templates to utilize and process callback documentation where applicable. This improves clarity and maintainability of generated code.

* add html and markdown documentation
@ygdrasil-io ygdrasil-io merged commit e1bfc21 into main Feb 9, 2025
7 checks passed
@ygdrasil-io ygdrasil-io deleted the release/v24 branch February 9, 2025 16:23
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.

1 participant