-
Notifications
You must be signed in to change notification settings - Fork 45
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
Defining undefined on WGPULimits #111
Comments
Can't python just use |
Yes it can, and that's what we will do. My point is that the value that I'll have to replace the |
You could |
I think this would be more convenient for all webgpu-native users if you just leave 0 where you don't care. Isn't this how we are building the rest of the C-facing API? @austinEng has this been considered in #104 ? |
Also see #77 |
Yes, I considered 0, but the rest of the C API is using values like: WGPU_MIP_LEVEL_COUNT_UNDEFINED, WGPU_ARRAY_LAYER_COUNT_UNDEFINED, WGPU_WHOLE_SIZE |
webgpu.h meeting (nov 2): We decided we should keep this as-is. We've already decided we're not going to be able to have zero-init as the default for structs and we'll instead have init macros (#158) Zero in particular is used in wgpu for certain cases of limits not being supported (e.g. no compute -> compute limits are 0) and it's likely we'll use that in the standard in the future too.
|
In #104 the WGPULimits struct was added. To specify "undefined" (i.e. the default), the value to use depends on the type:
webgpu-headers/webgpu.h
Lines 57 to 58 in 4b4dbc3
I suppose this is fine if your brain is wired for Rust, but my Python-brain finds this rather scary. In other words: not all code that consumes wgpu-native has a type-checker that is going to prevent setting a massive limit where the default was intended. I fear this can cause very annoying issues.
Is there still room for discussion here? Some options:
<0
as undefined.The text was updated successfully, but these errors were encountered: