gpu: add SType enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
903a6d204c
commit
f3a8fbb0d3
2 changed files with 24 additions and 25 deletions
|
|
@ -1,30 +1,5 @@
|
||||||
typedef uint32_t WGPUFlags;
|
typedef uint32_t WGPUFlags;
|
||||||
|
|
||||||
typedef enum WGPUSType {
|
|
||||||
WGPUSType_Invalid = 0x00000000,
|
|
||||||
WGPUSType_SurfaceDescriptorFromMetalLayer = 0x00000001,
|
|
||||||
WGPUSType_SurfaceDescriptorFromWindowsHWND = 0x00000002,
|
|
||||||
WGPUSType_SurfaceDescriptorFromXlibWindow = 0x00000003,
|
|
||||||
WGPUSType_SurfaceDescriptorFromCanvasHTMLSelector = 0x00000004,
|
|
||||||
WGPUSType_ShaderModuleSPIRVDescriptor = 0x00000005,
|
|
||||||
WGPUSType_ShaderModuleWGSLDescriptor = 0x00000006,
|
|
||||||
WGPUSType_PrimitiveDepthClipControl = 0x00000007,
|
|
||||||
WGPUSType_SurfaceDescriptorFromWaylandSurface = 0x00000008,
|
|
||||||
WGPUSType_SurfaceDescriptorFromAndroidNativeWindow = 0x00000009,
|
|
||||||
WGPUSType_SurfaceDescriptorFromWindowsCoreWindow = 0x0000000B,
|
|
||||||
WGPUSType_ExternalTextureBindingEntry = 0x0000000C,
|
|
||||||
WGPUSType_ExternalTextureBindingLayout = 0x0000000D,
|
|
||||||
WGPUSType_SurfaceDescriptorFromWindowsSwapChainPanel = 0x0000000E,
|
|
||||||
WGPUSType_RenderPassDescriptorMaxDrawCount = 0x0000000F,
|
|
||||||
WGPUSType_DawnTextureInternalUsageDescriptor = 0x000003E8,
|
|
||||||
WGPUSType_PrimitiveDepthClampingState = 0x000003E9,
|
|
||||||
WGPUSType_DawnTogglesDeviceDescriptor = 0x000003EA,
|
|
||||||
WGPUSType_DawnEncoderInternalUsageDescriptor = 0x000003EB,
|
|
||||||
WGPUSType_DawnInstanceDescriptor = 0x000003EC,
|
|
||||||
WGPUSType_DawnCacheDeviceDescriptor = 0x000003ED,
|
|
||||||
WGPUSType_Force32 = 0x7FFFFFFF
|
|
||||||
} WGPUSType;
|
|
||||||
|
|
||||||
typedef enum WGPUSamplerBindingType {
|
typedef enum WGPUSamplerBindingType {
|
||||||
WGPUSamplerBindingType_Undefined = 0x00000000,
|
WGPUSamplerBindingType_Undefined = 0x00000000,
|
||||||
WGPUSamplerBindingType_Filtering = 0x00000001,
|
WGPUSamplerBindingType_Filtering = 0x00000001,
|
||||||
|
|
|
||||||
|
|
@ -209,6 +209,30 @@ pub const RequestDeviceStatus = enum(u32) {
|
||||||
unknown = 0x00000002,
|
unknown = 0x00000002,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const SType = enum(u32) {
|
||||||
|
invalid = 0x00000000,
|
||||||
|
surface_descriptor_from_metal_layer = 0x00000001,
|
||||||
|
surface_descriptor_from_windows_hwnd = 0x00000002,
|
||||||
|
surface_descriptor_from_xlib_window = 0x00000003,
|
||||||
|
surface_descriptor_from_canvas_html_selector = 0x00000004,
|
||||||
|
shader_module_spirv_descriptor = 0x00000005,
|
||||||
|
shader_module_wgsl_descriptor = 0x00000006,
|
||||||
|
primitive_depth_clip_control = 0x00000007,
|
||||||
|
surface_descriptor_from_wayland_surface = 0x00000008,
|
||||||
|
surface_descriptor_from_android_native_window = 0x00000009,
|
||||||
|
surface_descriptor_from_windows_core_window = 0x0000000B,
|
||||||
|
external_texture_binding_entry = 0x0000000C,
|
||||||
|
external_texture_binding_layout = 0x0000000D,
|
||||||
|
surface_descriptor_from_windows_swap_chain_panel = 0x0000000E,
|
||||||
|
render_pass_descriptor_max_draw_count = 0x0000000F,
|
||||||
|
dawn_texture_internal_usage_descriptor = 0x000003E8,
|
||||||
|
primitive_depth_clamping_state = 0x000003E9,
|
||||||
|
dawn_toggles_device_descriptor = 0x000003EA,
|
||||||
|
dawn_encoder_internal_usage_descriptor = 0x000003EB,
|
||||||
|
dawn_instance_descriptor = 0x000003EC,
|
||||||
|
dawn_cache_device_descriptor = 0x000003ED,
|
||||||
|
};
|
||||||
|
|
||||||
test "BackendType name" {
|
test "BackendType name" {
|
||||||
try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name());
|
try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue