Closed kainino0x closed 1 week ago
For ergonomics it seems that typing Descriptor
all the time is annoying. So I'd favor a rule like:
Descriptor
, State
or other common wordsDawn
, Wgpu
, ...So the list would become:
WGPUPrimitiveState
extensions:
WGPUPrimitiveDepthClipControl
WGPURenderPassDescriptor
extensions:
WGPURenderPassMaxDrawCount
WGPUShaderModuleDescriptor
extensions:
WGPUShaderModuleSPIRV
WGPUShaderModuleWGSL
WGPUSurfaceDescriptor
extensions:
WGPUSurfaceFromAndroidNativeWindow
WGPUSurfaceFromCanvasHTMLSelector
WGPUSurfaceFromMetalLayer
WGPUSurfaceFromWaylandSurface
WGPUSurfaceFromWindowsHWND
WGPUSurfaceFromXcbWindow
WGPUSurfaceFromXlibWindow
WDYT?
webgpu.h meeting resolution (OUTDATED):
Wgpu
or Dawn
at the end for implementation-specific extensionsSee also #214 about enum range reservations.
Feedback that eliding "Descriptor" from the extension struct names is confusing: https://chromium-review.googlesource.com/c/chromium/src/+/5691772/comment/25f7fc96_8d6b6f12/
Jul 18 meeting:
(I'll expand out that proposal in a followup comment)
Rough proposal:
WGPURenderPassDescriptor
extensions:
WGPURenderPassMaxDrawCount
or ~WGPUMaxDrawCount
~
WGPUShaderModuleDescriptor
extensions:
WGPUShaderSourceSPIRV
WGPUShaderSourceWGSL
WGPUSurfaceDescriptor
extensions:
WGPUSurfaceSourceAndroidNativeWindow
WGPUSurfaceSourceCanvasHTMLSelector_Emscripten
(see https://github.com/webgpu-native/webgpu-headers/issues/214#issuecomment-2195624598)
WGPUSurfaceSourceMetalLayer
WGPUSurfaceSourceWaylandSurface
WGPUSurfaceSourceWindowsHWND
~WGPUSurfaceSourceXcbWindow
~ or WGPUSurfaceSourceXCBWindow
WGPUSurfaceSourceXlibWindow
Other examples of how extensions could be named:
WGPUPrimitiveState
extensions:
WGPUPrimitiveDepthClipControl
or WGPUDepthClipControl
(we are getting rid of this but this is what it would look like)
WGPUShaderModuleDescriptor
extensions:
WGPUShaderSourceGLSL_WGPU
WGPUShaderSourceGLSL_Dawn
WGPUPrimitiveState
extensions:WGPUPrimitiveDepthClipControl
orWGPUDepthClipControl
My understanding was that we'd fold DepthClipControl into PrimitiveState with https://github.com/webgpu-native/webgpu-headers/pull/311 @kainino0x Did I misunderstand?
Yes we're folding it, but that's just for the explanation of the new naming rules.
Oh yes, I intended to note that but forgot. Edited above.
I believe we can close this issue after https://github.com/webgpu-native/webgpu-headers/pull/320 gets merged.
You're right, thanks! Dawn bug is https://crbug.com/42241174
We should define some naming conventions for both standardized extension structs and implementation-specific extensions. Right now we have the following (inconsistent) names:
WGPUPrimitiveState
extensions:WGPUPrimitiveDepthClipControl
WGPURenderPassDescriptor
extensions:WGPURenderPassDescriptorMaxDrawCount
WGPUShaderModuleDescriptor
extensions:WGPUShaderModuleSPIRVDescriptor
WGPUShaderModuleWGSLDescriptor
WGPUSurfaceDescriptor
extensions:WGPUSurfaceDescriptorFromAndroidNativeWindow
WGPUSurfaceDescriptorFromCanvasHTMLSelector
WGPUSurfaceDescriptorFromMetalLayer
WGPUSurfaceDescriptorFromWaylandSurface
WGPUSurfaceDescriptorFromWindowsHWND
WGPUSurfaceDescriptorFromXcbWindow
WGPUSurfaceDescriptorFromXlibWindow
Additionally for Dawn we might want things like
WGPUSomeDescriptorNewFeatureDAWN
? (though idk what the naming would be for wgpu-native)