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

Expose TextureViewArray, SamplerArray and associated extensions to the C API #268

Merged
merged 15 commits into from
Oct 4, 2023

Conversation

Linx145
Copy link
Contributor

@Linx145 Linx145 commented Jun 20, 2023

I've been using the wgpu-native bindings from C# and realised that one of the features I required was missing, namely texture view arrays/sampler arrays as specified here (https://wgpu.rs/doc/wgpu/enum.BindingResource.html), so I implemented the features and created this pull request. It also exposes TEXTURE_BINDING_ARRAY and SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING as features to the C API via wgpu.h

I'm not a rust developer and have never written anything in rust before. This is also my first pull request so any feedback is appreciated!

@Linx145
Copy link
Contributor Author

Linx145 commented Jun 20, 2023

my bad, left the define WGPU_TARGET_WINDOWS 1 in examples/triangle/main.c. Should be fixed now

Copy link
Collaborator

@rajveermalviya rajveermalviya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing!

I have added some comments that needs to be addressed in order to get this merged.

ffi/wgpu.h Outdated Show resolved Hide resolved
examples/triangle/main.c Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@rajveermalviya
Copy link
Collaborator

Ping from triage

@rajveermalviya
Copy link
Collaborator

I have rebased this branch & and added a new example texture_arrays to demonstrate the feature, it's good to merge now!

@rajveermalviya rajveermalviya merged commit 46e345b into gfx-rs:trunk Oct 4, 2023
15 checks passed
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