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

WGPUInstanceFeatures -> WGPUInstanceCapabilities #375

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ struct WGPUComputePassTimestampWrites;
struct WGPUConstantEntry;
struct WGPUExtent3D;
struct WGPUFuture;
struct WGPUInstanceFeatures;
struct WGPUInstanceCapabilities;
struct WGPULimits;
struct WGPUMultisampleState;
struct WGPUOrigin3D;
Expand Down Expand Up @@ -1447,7 +1447,7 @@ typedef struct WGPUFuture {
/**
* Features enabled on the WGPUInstance
*/
typedef struct WGPUInstanceFeatures {
typedef struct WGPUInstanceCapabilities {
/** This struct chain is used as mutable in some places and immutable in others. */
WGPUChainedStructOut * nextInChain;
/**
Expand All @@ -1458,7 +1458,7 @@ typedef struct WGPUInstanceFeatures {
* The maximum number @ref WGPUFutureWaitInfo supported in a call to ::wgpuInstanceWaitAny with `timeoutNS > 0`.
*/
size_t timedWaitAnyMaxCount;
} WGPUInstanceFeatures WGPU_STRUCTURE_ATTRIBUTE;
} WGPUInstanceCapabilities WGPU_STRUCTURE_ATTRIBUTE;

typedef struct WGPULimits {
/** This struct chain is used as mutable in some places and immutable in others. */
Expand Down Expand Up @@ -1981,9 +1981,9 @@ typedef struct WGPUImageCopyTexture {
typedef struct WGPUInstanceDescriptor {
WGPUChainedStruct const * nextInChain;
/**
* Instance features to enable
* Instance capabilities to enable
*/
WGPUInstanceFeatures features;
WGPUInstanceCapabilities capabilities;
} WGPUInstanceDescriptor WGPU_STRUCTURE_ATTRIBUTE;

typedef struct WGPUProgrammableStageDescriptor {
Expand Down Expand Up @@ -2134,10 +2134,10 @@ extern "C" {
*/
typedef WGPUInstance (*WGPUProcCreateInstance)(WGPU_NULLABLE WGPUInstanceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
/**
* Proc pointer type for @ref wgpuGetInstanceFeatures:
* > @copydoc wgpuGetInstanceFeatures
* Proc pointer type for @ref wgpuGetInstanceCapabilities:
* > @copydoc wgpuGetInstanceCapabilities
*/
typedef void (*WGPUProcGetInstanceFeatures)(WGPUInstanceFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
typedef void (*WGPUProcGetInstanceCapabilities)(WGPUInstanceCapabilities * capabilities) WGPU_FUNCTION_ATTRIBUTE;
/**
* Proc pointer type for @ref wgpuGetProcAddress:
* > @copydoc wgpuGetProcAddress
Expand Down Expand Up @@ -3123,12 +3123,12 @@ typedef void (*WGPUProcTextureViewRelease)(WGPUTextureView textureView) WGPU_FUN
*/
WGPU_EXPORT WGPUInstance wgpuCreateInstance(WGPU_NULLABLE WGPUInstanceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
/**
* Query the supported instance features
* Query the supported instance capabilities
*
* @param features
* The supported instance features
* @param capabilities
* The supported instance capabilities
*/
WGPU_EXPORT void wgpuGetInstanceFeatures(WGPUInstanceFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
WGPU_EXPORT void wgpuGetInstanceCapabilities(WGPUInstanceCapabilities * capabilities) WGPU_FUNCTION_ATTRIBUTE;
/**
* Returns the "procedure address" (function pointer) of the named function.
* The result must be cast to the appropriate proc pointer type.
Expand Down
28 changes: 14 additions & 14 deletions webgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2014,15 +2014,7 @@ structs:
doc: |
TODO
type: enum.texture_aspect
- name: instance_descriptor
doc: |
TODO
type: base_in
members:
- name: features
doc: Instance features to enable
type: struct.instance_features
- name: instance_features
- name: instance_capabilities
doc: |
Features enabled on the WGPUInstance
type: base_in_or_out
Expand All @@ -2033,6 +2025,14 @@ structs:
- name: timed_wait_any_max_count
doc: The maximum number @ref WGPUFutureWaitInfo supported in a call to ::wgpuInstanceWaitAny with `timeoutNS > 0`.
type: usize
- name: instance_descriptor
doc: |
TODO
type: base_in
members:
- name: capabilities
doc: Instance capabilities to enable
type: struct.instance_capabilities
- name: limits
doc: |
TODO
Expand Down Expand Up @@ -3167,12 +3167,12 @@ functions:
type: struct.instance_descriptor
pointer: immutable
optional: true
- name: get_instance_features
doc: Query the supported instance features
- name: get_instance_capabilities
doc: Query the supported instance capabilities
args:
- name: features
doc: The supported instance features
type: struct.instance_features
- name: capabilities
doc: The supported instance capabilities
type: struct.instance_capabilities
pointer: mutable
objects:
- name: adapter
Expand Down
Loading