webgpu.yml (141775B)
1 copyright: | 2 Copyright 2019-2023 WebGPU-Native developers 3 4 SPDX-License-Identifier: BSD-3-Clause 5 name: webgpu 6 enum_prefix: 0x0000 7 doc: | 8 **Important:** *This documentation is a Work In Progress.* 9 10 This is the home of WebGPU C API specification. We define here the standard 11 `webgpu.h` header that all implementations should provide. 12 13 For all details where behavior is not otherwise specified, `webgpu.h` has 14 the same behavior as the WebGPU specification for JavaScript on the Web. 15 The WebIDL-based Web specification is mapped into C as faithfully (and 16 bidirectionally) as practical/possible. 17 The working draft of WebGPU can be found at <https://www.w3.org/TR/webgpu/>. 18 19 The standard include directive for this header is `#include <webgpu/webgpu.h>` 20 (if it is provided in a system-wide or toolchain-wide include directory). 21 constants: 22 - name: array_layer_count_undefined 23 value: uint32_max 24 doc: | 25 Indicates no array layer count is specified. For more info, 26 see @ref SentinelValues and the places that use this sentinel value. 27 - name: copy_stride_undefined 28 value: uint32_max 29 doc: | 30 Indicates no copy stride is specified. For more info, 31 see @ref SentinelValues and the places that use this sentinel value. 32 - name: depth_clear_value_undefined 33 value: nan 34 doc: | 35 Indicates no depth clear value is specified. For more info, 36 see @ref SentinelValues and the places that use this sentinel value. 37 - name: depth_slice_undefined 38 value: uint32_max 39 doc: | 40 Indicates no depth slice is specified. For more info, 41 see @ref SentinelValues and the places that use this sentinel value. 42 - name: limit_u32_undefined 43 value: uint32_max 44 doc: | 45 For `uint32_t` limits, indicates no limit value is specified. For more info, 46 see @ref SentinelValues and the places that use this sentinel value. 47 - name: limit_u64_undefined 48 value: uint64_max 49 doc: | 50 For `uint64_t` limits, indicates no limit value is specified. For more info, 51 see @ref SentinelValues and the places that use this sentinel value. 52 - name: mip_level_count_undefined 53 value: uint32_max 54 doc: | 55 Indicates no mip level count is specified. For more info, 56 see @ref SentinelValues and the places that use this sentinel value. 57 - name: query_set_index_undefined 58 value: uint32_max 59 doc: | 60 Indicates no query set index is specified. For more info, 61 see @ref SentinelValues and the places that use this sentinel value. 62 - name: strlen 63 value: usize_max 64 doc: | 65 Sentinel value used in @ref WGPUStringView to indicate that the pointer 66 is to a null-terminated string, rather than an explicitly-sized string. 67 - name: whole_map_size 68 value: usize_max 69 doc: | 70 Indicates a size extending to the end of the buffer. For more info, 71 see @ref SentinelValues and the places that use this sentinel value. 72 - name: whole_size 73 value: uint64_max 74 doc: | 75 Indicates a size extending to the end of the buffer. For more info, 76 see @ref SentinelValues and the places that use this sentinel value. 77 typedefs: [] 78 enums: 79 - name: adapter_type 80 doc: | 81 TODO 82 entries: 83 - null 84 - name: discrete_GPU 85 doc: | 86 TODO 87 - name: integrated_GPU 88 doc: | 89 TODO 90 - name: CPU 91 doc: | 92 TODO 93 - name: unknown 94 doc: | 95 TODO 96 - name: address_mode 97 doc: | 98 TODO 99 entries: 100 - name: undefined 101 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 102 - name: clamp_to_edge 103 doc: | 104 TODO 105 - name: repeat 106 doc: | 107 TODO 108 - name: mirror_repeat 109 doc: | 110 TODO 111 - name: backend_type 112 doc: | 113 TODO 114 entries: 115 - name: undefined 116 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 117 - name: "null" 118 doc: | 119 TODO 120 - name: WebGPU 121 doc: | 122 TODO 123 - name: D3D11 124 doc: | 125 TODO 126 - name: D3D12 127 doc: | 128 TODO 129 - name: metal 130 doc: | 131 TODO 132 - name: vulkan 133 doc: | 134 TODO 135 - name: openGL 136 doc: | 137 TODO 138 - name: openGLES 139 doc: | 140 TODO 141 - name: blend_factor 142 doc: | 143 TODO 144 entries: 145 - name: undefined 146 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 147 - name: zero 148 doc: | 149 TODO 150 - name: one 151 doc: | 152 TODO 153 - name: src 154 doc: | 155 TODO 156 - name: one_minus_src 157 doc: | 158 TODO 159 - name: src_alpha 160 doc: | 161 TODO 162 - name: one_minus_src_alpha 163 doc: | 164 TODO 165 - name: dst 166 doc: | 167 TODO 168 - name: one_minus_dst 169 doc: | 170 TODO 171 - name: dst_alpha 172 doc: | 173 TODO 174 - name: one_minus_dst_alpha 175 doc: | 176 TODO 177 - name: src_alpha_saturated 178 doc: | 179 TODO 180 - name: constant 181 doc: | 182 TODO 183 - name: one_minus_constant 184 doc: | 185 TODO 186 - name: src1 187 doc: | 188 TODO 189 - name: one_minus_src1 190 doc: | 191 TODO 192 - name: src1_alpha 193 doc: | 194 TODO 195 - name: one_minus_src1_alpha 196 doc: | 197 TODO 198 - name: blend_operation 199 doc: | 200 TODO 201 entries: 202 - name: undefined 203 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 204 - name: add 205 doc: | 206 TODO 207 - name: subtract 208 doc: | 209 TODO 210 - name: reverse_subtract 211 doc: | 212 TODO 213 - name: min 214 doc: | 215 TODO 216 - name: max 217 doc: | 218 TODO 219 - name: buffer_binding_type 220 doc: | 221 TODO 222 entries: 223 - name: binding_not_used 224 doc: | 225 Indicates that this @ref WGPUBufferBindingLayout member of 226 its parent @ref WGPUBindGroupLayoutEntry is not used. 227 (See also @ref SentinelValues.) 228 - name: undefined 229 doc: | 230 `1`. Indicates no value is passed for this argument. See @ref SentinelValues. 231 - name: uniform 232 doc: | 233 TODO 234 - name: storage 235 doc: | 236 TODO 237 - name: read_only_storage 238 doc: | 239 TODO 240 - name: buffer_map_state 241 doc: | 242 TODO 243 entries: 244 - null 245 - name: unmapped 246 doc: | 247 TODO 248 - name: pending 249 doc: | 250 TODO 251 - name: mapped 252 doc: | 253 TODO 254 - name: callback_mode 255 doc: The callback mode controls how a callback for an asynchronous operation may be fired. See @ref Asynchronous-Operations for how these are used. 256 entries: 257 - null 258 - name: wait_any_only 259 doc: | 260 Callbacks created with `WGPUCallbackMode_WaitAnyOnly`: 261 - fire when the asynchronous operation's future is passed to a call to @ref wgpuInstanceWaitAny 262 AND the operation has already completed or it completes inside the call to @ref wgpuInstanceWaitAny. 263 - name: allow_process_events 264 doc: | 265 Callbacks created with `WGPUCallbackMode_AllowProcessEvents`: 266 - fire for the same reasons as callbacks created with `WGPUCallbackMode_WaitAnyOnly` 267 - fire inside a call to @ref wgpuInstanceProcessEvents if the asynchronous operation is complete. 268 - name: allow_spontaneous 269 doc: | 270 Callbacks created with `WGPUCallbackMode_AllowSpontaneous`: 271 - fire for the same reasons as callbacks created with `WGPUCallbackMode_AllowProcessEvents` 272 - **may** fire spontaneously on an arbitrary or application thread, when the WebGPU implementations discovers that the asynchronous operation is complete. 273 274 Implementations _should_ fire spontaneous callbacks as soon as possible. 275 276 @note Because spontaneous callbacks may fire at an arbitrary time on an arbitrary thread, applications should take extra care when acquiring locks or mutating state inside the callback. It undefined behavior to re-entrantly call into the webgpu.h API if the callback fires while inside the callstack of another webgpu.h function that is not `wgpuInstanceWaitAny` or `wgpuInstanceProcessEvents`. 277 - name: compare_function 278 doc: | 279 TODO 280 entries: 281 - name: undefined 282 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 283 - name: never 284 doc: | 285 TODO 286 - name: less 287 doc: | 288 TODO 289 - name: equal 290 doc: | 291 TODO 292 - name: less_equal 293 doc: | 294 TODO 295 - name: greater 296 doc: | 297 TODO 298 - name: not_equal 299 doc: | 300 TODO 301 - name: greater_equal 302 doc: | 303 TODO 304 - name: always 305 doc: | 306 TODO 307 - name: compilation_info_request_status 308 doc: | 309 TODO 310 entries: 311 - null 312 - name: success 313 doc: | 314 TODO 315 - name: callback_cancelled 316 doc: | 317 See @ref CallbackStatuses. 318 - name: compilation_message_type 319 doc: | 320 TODO 321 entries: 322 - null 323 - name: error 324 doc: | 325 TODO 326 - name: warning 327 doc: | 328 TODO 329 - name: info 330 doc: | 331 TODO 332 - name: component_swizzle 333 doc: | 334 TODO 335 entries: 336 - name: undefined 337 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 338 - name: zero 339 doc: | 340 Force its value to 0. 341 - name: one 342 doc: | 343 Force its value to 1. 344 - name: r 345 doc: | 346 Take its value from the red channel of the texture. 347 - name: g 348 doc: | 349 Take its value from the green channel of the texture. 350 - name: b 351 doc: | 352 Take its value from the blue channel of the texture. 353 - name: a 354 doc: | 355 Take its value from the alpha channel of the texture. 356 - name: composite_alpha_mode 357 doc: Describes how frames are composited with other contents on the screen when @ref wgpuSurfacePresent is called. 358 entries: 359 - name: auto 360 doc: Lets the WebGPU implementation choose the best mode (supported, and with the best performance) between @ref WGPUCompositeAlphaMode_Opaque or @ref WGPUCompositeAlphaMode_Inherit. 361 - name: opaque 362 doc: The alpha component of the image is ignored and teated as if it is always 1.0. 363 - name: premultiplied 364 doc: The alpha component is respected and non-alpha components are assumed to be already multiplied with the alpha component. For example, (0.5, 0, 0, 0.5) is semi-transparent bright red. 365 - name: unpremultiplied 366 doc: The alpha component is respected and non-alpha components are assumed to NOT be already multiplied with the alpha component. For example, (1.0, 0, 0, 0.5) is semi-transparent bright red. 367 - name: inherit 368 doc: The handling of the alpha component is unknown to WebGPU and should be handled by the application using system-specific APIs. This mode may be unavailable (for example on Wasm). 369 - name: create_pipeline_async_status 370 doc: | 371 TODO 372 entries: 373 - null 374 - name: success 375 doc: | 376 TODO 377 - name: callback_cancelled 378 doc: | 379 See @ref CallbackStatuses. 380 - name: validation_error 381 doc: | 382 TODO 383 - name: internal_error 384 doc: | 385 TODO 386 - name: cull_mode 387 doc: | 388 TODO 389 entries: 390 - name: undefined 391 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 392 - name: none 393 doc: | 394 TODO 395 - name: front 396 doc: | 397 TODO 398 - name: back 399 doc: | 400 TODO 401 - name: device_lost_reason 402 doc: | 403 TODO 404 entries: 405 - null 406 - name: unknown 407 doc: | 408 TODO 409 - name: destroyed 410 doc: | 411 TODO 412 - name: callback_cancelled 413 doc: | 414 See @ref CallbackStatuses. 415 - name: failed_creation 416 doc: | 417 TODO 418 - name: error_filter 419 doc: | 420 TODO 421 entries: 422 - null 423 - name: validation 424 doc: | 425 TODO 426 - name: out_of_memory 427 doc: | 428 TODO 429 - name: internal 430 doc: | 431 TODO 432 - name: error_type 433 doc: | 434 TODO 435 entries: 436 - null 437 - name: no_error 438 doc: | 439 TODO 440 - name: validation 441 doc: | 442 TODO 443 - name: out_of_memory 444 doc: | 445 TODO 446 - name: internal 447 doc: | 448 TODO 449 - name: unknown 450 doc: | 451 TODO 452 - name: feature_level 453 doc: | 454 See @ref WGPURequestAdapterOptions::featureLevel. 455 entries: 456 - name: undefined 457 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 458 - name: compatibility 459 doc: | 460 "Compatibility" profile which can be supported on OpenGL ES 3.1 and D3D11. 461 - name: core 462 doc: | 463 "Core" profile which can be supported on Vulkan/Metal/D3D12 (at least). 464 - name: feature_name 465 doc: | 466 TODO 467 entries: 468 - null 469 - name: core_features_and_limits 470 doc: | 471 TODO 472 - name: depth_clip_control 473 doc: | 474 TODO 475 - name: depth32_float_stencil8 476 doc: | 477 TODO 478 - name: texture_compression_BC 479 doc: | 480 TODO 481 - name: texture_compression_BC_sliced_3D 482 doc: | 483 TODO 484 - name: texture_compression_ETC2 485 doc: | 486 TODO 487 - name: texture_compression_ASTC 488 doc: | 489 TODO 490 - name: texture_compression_ASTC_sliced_3D 491 doc: | 492 TODO 493 - name: timestamp_query 494 doc: | 495 TODO 496 - name: indirect_first_instance 497 doc: | 498 TODO 499 - name: shader_f16 500 doc: | 501 TODO 502 - name: RG11B10_ufloat_renderable 503 doc: | 504 TODO 505 - name: BGRA8_unorm_storage 506 doc: | 507 TODO 508 - name: float32_filterable 509 doc: | 510 TODO 511 - name: float32_blendable 512 doc: | 513 TODO 514 - name: clip_distances 515 doc: | 516 TODO 517 - name: dual_source_blending 518 doc: | 519 TODO 520 - name: subgroups 521 doc: | 522 TODO 523 - name: texture_formats_tier_1 524 doc: | 525 TODO 526 - name: texture_formats_tier_2 527 doc: | 528 TODO 529 - name: primitive_index 530 doc: | 531 TODO 532 - name: texture_component_swizzle 533 doc: | 534 TODO 535 - name: filter_mode 536 doc: | 537 TODO 538 entries: 539 - name: undefined 540 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 541 - name: nearest 542 doc: | 543 TODO 544 - name: linear 545 doc: | 546 TODO 547 - name: front_face 548 doc: | 549 TODO 550 entries: 551 - name: undefined 552 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 553 - name: CCW 554 doc: | 555 TODO 556 - name: CW 557 doc: | 558 TODO 559 - name: index_format 560 doc: | 561 TODO 562 entries: 563 - name: undefined 564 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 565 - name: uint16 566 doc: | 567 TODO 568 - name: uint32 569 doc: | 570 TODO 571 - name: instance_feature_name 572 doc: | 573 TODO 574 entries: 575 - null 576 - name: timed_wait_any 577 doc: | 578 Enable use of ::wgpuInstanceWaitAny with `timeoutNS > 0`. 579 - name: shader_source_SPIRV 580 doc: | 581 Enable passing SPIR-V shaders to @ref wgpuDeviceCreateShaderModule, 582 via @ref WGPUShaderSourceSPIRV. 583 - name: multiple_devices_per_adapter 584 doc: | 585 Normally, a @ref WGPUAdapter can only create a single device. If this is 586 available and enabled, then adapters won't immediately expire when they 587 create a device, so can be reused to make multiple devices. They may 588 still expire for other reasons. 589 - name: load_op 590 doc: | 591 TODO 592 entries: 593 - name: undefined 594 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 595 - name: load 596 doc: | 597 TODO 598 - name: clear 599 doc: | 600 TODO 601 - name: map_async_status 602 doc: | 603 TODO 604 entries: 605 - null 606 - name: success 607 doc: | 608 TODO 609 - name: callback_cancelled 610 doc: | 611 See @ref CallbackStatuses. 612 - name: error 613 doc: | 614 TODO 615 - name: aborted 616 doc: | 617 TODO 618 - name: mipmap_filter_mode 619 doc: | 620 TODO 621 entries: 622 - name: undefined 623 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 624 - name: nearest 625 doc: | 626 TODO 627 - name: linear 628 doc: | 629 TODO 630 - name: optional_bool 631 doc: | 632 TODO 633 entries: 634 - name: "false" 635 doc: | 636 TODO 637 - name: "true" 638 doc: | 639 TODO 640 - name: undefined 641 doc: | 642 TODO 643 - name: pop_error_scope_status 644 doc: | 645 TODO 646 entries: 647 - null 648 - name: success 649 doc: | 650 The error scope stack was successfully popped and a result was reported. 651 - name: callback_cancelled 652 doc: | 653 See @ref CallbackStatuses. 654 - name: error 655 doc: | 656 The error scope stack could not be popped, because it was empty. 657 - name: power_preference 658 doc: | 659 TODO 660 entries: 661 - name: undefined 662 doc: No preference. (See also @ref SentinelValues.) 663 - name: low_power 664 doc: | 665 TODO 666 - name: high_performance 667 doc: | 668 TODO 669 - name: predefined_color_space 670 doc: | 671 TODO 672 entries: 673 - null 674 - name: SRGB 675 doc: | 676 TODO 677 - name: display_p3 678 doc: | 679 TODO 680 - name: present_mode 681 doc: Describes when and in which order frames are presented on the screen when @ref wgpuSurfacePresent is called. 682 entries: 683 - name: undefined 684 doc: | 685 Present mode is not specified. Use the default. 686 - name: fifo 687 doc: | 688 The presentation of the image to the user waits for the next vertical blanking period to update in a first-in, first-out manner. 689 Tearing cannot be observed and frame-loop will be limited to the display's refresh rate. 690 This is the only mode that's always available. 691 - name: fifo_relaxed 692 doc: | 693 The presentation of the image to the user tries to wait for the next vertical blanking period but may decide to not wait if a frame is presented late. 694 Tearing can sometimes be observed but late-frame don't produce a full-frame stutter in the presentation. 695 This is still a first-in, first-out mechanism so a frame-loop will be limited to the display's refresh rate. 696 - name: immediate 697 doc: | 698 The presentation of the image to the user is updated immediately without waiting for a vertical blank. 699 Tearing can be observed but latency is minimized. 700 - name: mailbox 701 doc: | 702 The presentation of the image to the user waits for the next vertical blanking period to update to the latest provided image. 703 Tearing cannot be observed and a frame-loop is not limited to the display's refresh rate. 704 - name: primitive_topology 705 doc: | 706 TODO 707 entries: 708 - name: undefined 709 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 710 - name: point_list 711 doc: | 712 TODO 713 - name: line_list 714 doc: | 715 TODO 716 - name: line_strip 717 doc: | 718 TODO 719 - name: triangle_list 720 doc: | 721 TODO 722 - name: triangle_strip 723 doc: | 724 TODO 725 - name: query_type 726 doc: | 727 TODO 728 entries: 729 - null 730 - name: occlusion 731 doc: | 732 TODO 733 - name: timestamp 734 doc: | 735 TODO 736 - name: queue_work_done_status 737 doc: | 738 TODO 739 entries: 740 - null 741 - name: success 742 doc: | 743 TODO 744 - name: callback_cancelled 745 doc: | 746 See @ref CallbackStatuses. 747 - name: error 748 doc: | 749 There was some deterministic error. (Note this is currently never used, 750 but it will be relevant when it's possible to create a queue object.) 751 - name: request_adapter_status 752 doc: | 753 TODO 754 entries: 755 - null 756 - name: success 757 doc: | 758 TODO 759 - name: callback_cancelled 760 doc: | 761 See @ref CallbackStatuses. 762 - name: unavailable 763 doc: | 764 TODO 765 - name: error 766 doc: | 767 TODO 768 - name: request_device_status 769 doc: | 770 TODO 771 entries: 772 - null 773 - name: success 774 doc: | 775 TODO 776 - name: callback_cancelled 777 doc: | 778 See @ref CallbackStatuses. 779 - name: error 780 doc: | 781 TODO 782 - name: s_type 783 doc: | 784 TODO 785 entries: 786 - null 787 - name: shader_source_SPIRV 788 doc: | 789 TODO 790 - name: shader_source_WGSL 791 doc: | 792 TODO 793 - name: render_pass_max_draw_count 794 doc: | 795 TODO 796 - name: surface_source_metal_layer 797 doc: | 798 TODO 799 - name: surface_source_windows_HWND 800 doc: | 801 TODO 802 - name: surface_source_xlib_window 803 doc: | 804 TODO 805 - name: surface_source_wayland_surface 806 doc: | 807 TODO 808 - name: surface_source_android_native_window 809 doc: | 810 TODO 811 - name: surface_source_XCB_window 812 doc: | 813 TODO 814 - name: surface_color_management 815 doc: | 816 TODO 817 - name: request_adapter_WebXR_options 818 doc: | 819 TODO 820 - name: texture_component_swizzle_descriptor 821 doc: | 822 TODO 823 - name: external_texture_binding_layout 824 doc: | 825 TODO 826 - name: external_texture_binding_entry 827 doc: | 828 TODO 829 - name: sampler_binding_type 830 doc: | 831 TODO 832 entries: 833 - name: binding_not_used 834 doc: | 835 Indicates that this @ref WGPUSamplerBindingLayout member of 836 its parent @ref WGPUBindGroupLayoutEntry is not used. 837 (See also @ref SentinelValues.) 838 - name: undefined 839 doc: | 840 `1`. Indicates no value is passed for this argument. See @ref SentinelValues. 841 - name: filtering 842 doc: | 843 TODO 844 - name: non_filtering 845 doc: | 846 TODO 847 - name: comparison 848 doc: | 849 TODO 850 - name: status 851 doc: | 852 Status code returned (synchronously) from many operations. Generally 853 indicates an invalid input like an unknown enum value or @ref OutStructChainError. 854 Read the function's documentation for specific error conditions. 855 entries: 856 - null 857 - name: success 858 doc: "" 859 - name: error 860 doc: "" 861 - name: stencil_operation 862 doc: | 863 TODO 864 entries: 865 - name: undefined 866 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 867 - name: keep 868 doc: | 869 TODO 870 - name: zero 871 doc: | 872 TODO 873 - name: replace 874 doc: | 875 TODO 876 - name: invert 877 doc: | 878 TODO 879 - name: increment_clamp 880 doc: | 881 TODO 882 - name: decrement_clamp 883 doc: | 884 TODO 885 - name: increment_wrap 886 doc: | 887 TODO 888 - name: decrement_wrap 889 doc: | 890 TODO 891 - name: storage_texture_access 892 doc: | 893 TODO 894 entries: 895 - name: binding_not_used 896 doc: | 897 Indicates that this @ref WGPUStorageTextureBindingLayout member of 898 its parent @ref WGPUBindGroupLayoutEntry is not used. 899 (See also @ref SentinelValues.) 900 - name: undefined 901 doc: | 902 `1`. Indicates no value is passed for this argument. See @ref SentinelValues. 903 - name: write_only 904 doc: | 905 TODO 906 - name: read_only 907 doc: | 908 TODO 909 - name: read_write 910 doc: | 911 TODO 912 - name: store_op 913 doc: | 914 TODO 915 entries: 916 - name: undefined 917 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 918 - name: store 919 doc: | 920 TODO 921 - name: discard 922 doc: | 923 TODO 924 - name: surface_get_current_texture_status 925 doc: The status enum for @ref wgpuSurfaceGetCurrentTexture. 926 entries: 927 - null 928 - name: success_optimal 929 doc: Yay! Everything is good and we can render this frame. 930 - name: success_suboptimal 931 doc: Still OK - the surface can present the frame, but in a suboptimal way. The surface may need reconfiguration. 932 - name: timeout 933 doc: Some operation timed out while trying to acquire the frame. 934 - name: outdated 935 doc: The surface is too different to be used, compared to when it was originally created. 936 - name: lost 937 doc: The connection to whatever owns the surface was lost, or generally needs to be fully reinitialized. 938 - name: error 939 doc: There was some deterministic error (for example, the surface is not configured, or there was an @ref OutStructChainError). Should produce @ref ImplementationDefinedLogging containing details. 940 - name: texture_aspect 941 doc: | 942 TODO 943 entries: 944 - name: undefined 945 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 946 - name: all 947 doc: | 948 TODO 949 - name: stencil_only 950 doc: | 951 TODO 952 - name: depth_only 953 doc: | 954 TODO 955 - name: texture_dimension 956 doc: | 957 TODO 958 entries: 959 - name: undefined 960 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 961 - name: 1D 962 doc: | 963 TODO 964 - name: 2D 965 doc: | 966 TODO 967 - name: 3D 968 doc: | 969 TODO 970 - name: texture_format 971 doc: | 972 TODO 973 entries: 974 - name: undefined 975 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 976 - name: R8_unorm 977 doc: | 978 TODO 979 - name: R8_snorm 980 doc: | 981 TODO 982 - name: R8_uint 983 doc: | 984 TODO 985 - name: R8_sint 986 doc: | 987 TODO 988 - name: R16_unorm 989 doc: | 990 TODO 991 - name: R16_snorm 992 doc: | 993 TODO 994 - name: R16_uint 995 doc: | 996 TODO 997 - name: R16_sint 998 doc: | 999 TODO 1000 - name: R16_float 1001 doc: | 1002 TODO 1003 - name: RG8_unorm 1004 doc: | 1005 TODO 1006 - name: RG8_snorm 1007 doc: | 1008 TODO 1009 - name: RG8_uint 1010 doc: | 1011 TODO 1012 - name: RG8_sint 1013 doc: | 1014 TODO 1015 - name: R32_float 1016 doc: | 1017 TODO 1018 - name: R32_uint 1019 doc: | 1020 TODO 1021 - name: R32_sint 1022 doc: | 1023 TODO 1024 - name: RG16_unorm 1025 doc: | 1026 TODO 1027 - name: RG16_snorm 1028 doc: | 1029 TODO 1030 - name: RG16_uint 1031 doc: | 1032 TODO 1033 - name: RG16_sint 1034 doc: | 1035 TODO 1036 - name: RG16_float 1037 doc: | 1038 TODO 1039 - name: RGBA8_unorm 1040 doc: | 1041 TODO 1042 - name: RGBA8_unorm_srgb 1043 doc: | 1044 TODO 1045 - name: RGBA8_snorm 1046 doc: | 1047 TODO 1048 - name: RGBA8_uint 1049 doc: | 1050 TODO 1051 - name: RGBA8_sint 1052 doc: | 1053 TODO 1054 - name: BGRA8_unorm 1055 doc: | 1056 TODO 1057 - name: BGRA8_unorm_srgb 1058 doc: | 1059 TODO 1060 - name: RGB10_A2_uint 1061 doc: | 1062 TODO 1063 - name: RGB10_A2_unorm 1064 doc: | 1065 TODO 1066 - name: RG11_B10_ufloat 1067 doc: | 1068 TODO 1069 - name: RGB9_E5_ufloat 1070 doc: | 1071 TODO 1072 - name: RG32_float 1073 doc: | 1074 TODO 1075 - name: RG32_uint 1076 doc: | 1077 TODO 1078 - name: RG32_sint 1079 doc: | 1080 TODO 1081 - name: RGBA16_unorm 1082 doc: | 1083 TODO 1084 - name: RGBA16_snorm 1085 doc: | 1086 TODO 1087 - name: RGBA16_uint 1088 doc: | 1089 TODO 1090 - name: RGBA16_sint 1091 doc: | 1092 TODO 1093 - name: RGBA16_float 1094 doc: | 1095 TODO 1096 - name: RGBA32_float 1097 doc: | 1098 TODO 1099 - name: RGBA32_uint 1100 doc: | 1101 TODO 1102 - name: RGBA32_sint 1103 doc: | 1104 TODO 1105 - name: stencil8 1106 doc: | 1107 TODO 1108 - name: depth16_unorm 1109 doc: | 1110 TODO 1111 - name: depth24_plus 1112 doc: | 1113 TODO 1114 - name: depth24_plus_stencil8 1115 doc: | 1116 TODO 1117 - name: depth32_float 1118 doc: | 1119 TODO 1120 - name: depth32_float_stencil8 1121 doc: | 1122 TODO 1123 - name: BC1_RGBA_unorm 1124 doc: | 1125 TODO 1126 - name: BC1_RGBA_unorm_srgb 1127 doc: | 1128 TODO 1129 - name: BC2_RGBA_unorm 1130 doc: | 1131 TODO 1132 - name: BC2_RGBA_unorm_srgb 1133 doc: | 1134 TODO 1135 - name: BC3_RGBA_unorm 1136 doc: | 1137 TODO 1138 - name: BC3_RGBA_unorm_srgb 1139 doc: | 1140 TODO 1141 - name: BC4_R_unorm 1142 doc: | 1143 TODO 1144 - name: BC4_R_snorm 1145 doc: | 1146 TODO 1147 - name: BC5_RG_unorm 1148 doc: | 1149 TODO 1150 - name: BC5_RG_snorm 1151 doc: | 1152 TODO 1153 - name: BC6H_RGB_ufloat 1154 doc: | 1155 TODO 1156 - name: BC6H_RGB_float 1157 doc: | 1158 TODO 1159 - name: BC7_RGBA_unorm 1160 doc: | 1161 TODO 1162 - name: BC7_RGBA_unorm_srgb 1163 doc: | 1164 TODO 1165 - name: ETC2_RGB8_unorm 1166 doc: | 1167 TODO 1168 - name: ETC2_RGB8_unorm_srgb 1169 doc: | 1170 TODO 1171 - name: ETC2_RGB8A1_unorm 1172 doc: | 1173 TODO 1174 - name: ETC2_RGB8A1_unorm_srgb 1175 doc: | 1176 TODO 1177 - name: ETC2_RGBA8_unorm 1178 doc: | 1179 TODO 1180 - name: ETC2_RGBA8_unorm_srgb 1181 doc: | 1182 TODO 1183 - name: EAC_R11_unorm 1184 doc: | 1185 TODO 1186 - name: EAC_R11_snorm 1187 doc: | 1188 TODO 1189 - name: EAC_RG11_unorm 1190 doc: | 1191 TODO 1192 - name: EAC_RG11_snorm 1193 doc: | 1194 TODO 1195 - name: ASTC_4x4_unorm 1196 doc: | 1197 TODO 1198 - name: ASTC_4x4_unorm_srgb 1199 doc: | 1200 TODO 1201 - name: ASTC_5x4_unorm 1202 doc: | 1203 TODO 1204 - name: ASTC_5x4_unorm_srgb 1205 doc: | 1206 TODO 1207 - name: ASTC_5x5_unorm 1208 doc: | 1209 TODO 1210 - name: ASTC_5x5_unorm_srgb 1211 doc: | 1212 TODO 1213 - name: ASTC_6x5_unorm 1214 doc: | 1215 TODO 1216 - name: ASTC_6x5_unorm_srgb 1217 doc: | 1218 TODO 1219 - name: ASTC_6x6_unorm 1220 doc: | 1221 TODO 1222 - name: ASTC_6x6_unorm_srgb 1223 doc: | 1224 TODO 1225 - name: ASTC_8x5_unorm 1226 doc: | 1227 TODO 1228 - name: ASTC_8x5_unorm_srgb 1229 doc: | 1230 TODO 1231 - name: ASTC_8x6_unorm 1232 doc: | 1233 TODO 1234 - name: ASTC_8x6_unorm_srgb 1235 doc: | 1236 TODO 1237 - name: ASTC_8x8_unorm 1238 doc: | 1239 TODO 1240 - name: ASTC_8x8_unorm_srgb 1241 doc: | 1242 TODO 1243 - name: ASTC_10x5_unorm 1244 doc: | 1245 TODO 1246 - name: ASTC_10x5_unorm_srgb 1247 doc: | 1248 TODO 1249 - name: ASTC_10x6_unorm 1250 doc: | 1251 TODO 1252 - name: ASTC_10x6_unorm_srgb 1253 doc: | 1254 TODO 1255 - name: ASTC_10x8_unorm 1256 doc: | 1257 TODO 1258 - name: ASTC_10x8_unorm_srgb 1259 doc: | 1260 TODO 1261 - name: ASTC_10x10_unorm 1262 doc: | 1263 TODO 1264 - name: ASTC_10x10_unorm_srgb 1265 doc: | 1266 TODO 1267 - name: ASTC_12x10_unorm 1268 doc: | 1269 TODO 1270 - name: ASTC_12x10_unorm_srgb 1271 doc: | 1272 TODO 1273 - name: ASTC_12x12_unorm 1274 doc: | 1275 TODO 1276 - name: ASTC_12x12_unorm_srgb 1277 doc: | 1278 TODO 1279 - name: texture_sample_type 1280 doc: | 1281 TODO 1282 entries: 1283 - name: binding_not_used 1284 doc: | 1285 Indicates that this @ref WGPUTextureBindingLayout member of 1286 its parent @ref WGPUBindGroupLayoutEntry is not used. 1287 (See also @ref SentinelValues.) 1288 - name: undefined 1289 doc: | 1290 `1`. Indicates no value is passed for this argument. See @ref SentinelValues. 1291 - name: float 1292 doc: | 1293 TODO 1294 - name: unfilterable_float 1295 doc: | 1296 TODO 1297 - name: depth 1298 doc: | 1299 TODO 1300 - name: sint 1301 doc: | 1302 TODO 1303 - name: uint 1304 doc: | 1305 TODO 1306 - name: texture_view_dimension 1307 doc: | 1308 TODO 1309 entries: 1310 - name: undefined 1311 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 1312 - name: 1D 1313 doc: | 1314 TODO 1315 - name: 2D 1316 doc: | 1317 TODO 1318 - name: 2D_array 1319 doc: | 1320 TODO 1321 - name: cube 1322 doc: | 1323 TODO 1324 - name: cube_array 1325 doc: | 1326 TODO 1327 - name: 3D 1328 doc: | 1329 TODO 1330 - name: tone_mapping_mode 1331 doc: | 1332 TODO 1333 entries: 1334 - null 1335 - name: standard 1336 doc: | 1337 TODO 1338 - name: extended 1339 doc: | 1340 TODO 1341 - name: vertex_format 1342 doc: | 1343 TODO 1344 entries: 1345 - null 1346 - name: uint8 1347 doc: | 1348 TODO 1349 - name: uint8x2 1350 doc: | 1351 TODO 1352 - name: uint8x4 1353 doc: | 1354 TODO 1355 - name: sint8 1356 doc: | 1357 TODO 1358 - name: sint8x2 1359 doc: | 1360 TODO 1361 - name: sint8x4 1362 doc: | 1363 TODO 1364 - name: unorm8 1365 doc: | 1366 TODO 1367 - name: unorm8x2 1368 doc: | 1369 TODO 1370 - name: unorm8x4 1371 doc: | 1372 TODO 1373 - name: snorm8 1374 doc: | 1375 TODO 1376 - name: snorm8x2 1377 doc: | 1378 TODO 1379 - name: snorm8x4 1380 doc: | 1381 TODO 1382 - name: uint16 1383 doc: | 1384 TODO 1385 - name: uint16x2 1386 doc: | 1387 TODO 1388 - name: uint16x4 1389 doc: | 1390 TODO 1391 - name: sint16 1392 doc: | 1393 TODO 1394 - name: sint16x2 1395 doc: | 1396 TODO 1397 - name: sint16x4 1398 doc: | 1399 TODO 1400 - name: unorm16 1401 doc: | 1402 TODO 1403 - name: unorm16x2 1404 doc: | 1405 TODO 1406 - name: unorm16x4 1407 doc: | 1408 TODO 1409 - name: snorm16 1410 doc: | 1411 TODO 1412 - name: snorm16x2 1413 doc: | 1414 TODO 1415 - name: snorm16x4 1416 doc: | 1417 TODO 1418 - name: float16 1419 doc: | 1420 TODO 1421 - name: float16x2 1422 doc: | 1423 TODO 1424 - name: float16x4 1425 doc: | 1426 TODO 1427 - name: float32 1428 doc: | 1429 TODO 1430 - name: float32x2 1431 doc: | 1432 TODO 1433 - name: float32x3 1434 doc: | 1435 TODO 1436 - name: float32x4 1437 doc: | 1438 TODO 1439 - name: uint32 1440 doc: | 1441 TODO 1442 - name: uint32x2 1443 doc: | 1444 TODO 1445 - name: uint32x3 1446 doc: | 1447 TODO 1448 - name: uint32x4 1449 doc: | 1450 TODO 1451 - name: sint32 1452 doc: | 1453 TODO 1454 - name: sint32x2 1455 doc: | 1456 TODO 1457 - name: sint32x3 1458 doc: | 1459 TODO 1460 - name: sint32x4 1461 doc: | 1462 TODO 1463 - name: unorm10__10__10__2 1464 doc: | 1465 TODO 1466 - name: unorm8x4_B_G_R_A 1467 doc: | 1468 TODO 1469 - name: vertex_step_mode 1470 doc: | 1471 TODO 1472 entries: 1473 - name: undefined 1474 doc: Indicates no value is passed for this argument. See @ref SentinelValues. 1475 - name: vertex 1476 doc: | 1477 TODO 1478 - name: instance 1479 doc: | 1480 TODO 1481 - name: wait_status 1482 doc: Status returned from a call to ::wgpuInstanceWaitAny. 1483 entries: 1484 - null 1485 - name: success 1486 doc: At least one WGPUFuture completed successfully. 1487 - name: timed_out 1488 doc: The wait operation succeeded, but no WGPUFutures completed within the timeout. 1489 - name: error 1490 doc: | 1491 The call was invalid for some reason (see @ref Wait-Any). 1492 Should produce @ref ImplementationDefinedLogging containing details. 1493 - name: WGSL_language_feature_name 1494 doc: | 1495 TODO 1496 entries: 1497 - null 1498 - name: readonly_and_readwrite_storage_textures 1499 doc: | 1500 TODO 1501 - name: packed4x8_integer_dot_product 1502 doc: | 1503 TODO 1504 - name: unrestricted_pointer_parameters 1505 doc: | 1506 TODO 1507 - name: pointer_composite_access 1508 doc: | 1509 TODO 1510 - name: uniform_buffer_standard_layout 1511 doc: | 1512 TODO 1513 - name: subgroup_id 1514 doc: | 1515 TODO 1516 - name: texture_and_sampler_let 1517 doc: | 1518 TODO 1519 - name: subgroup_uniformity 1520 doc: | 1521 TODO 1522 bitflags: 1523 - name: buffer_usage 1524 doc: | 1525 TODO 1526 entries: 1527 - name: none 1528 doc: | 1529 TODO 1530 - name: map_read 1531 doc: | 1532 The buffer can be *mapped* on the CPU side in *read* mode (using @ref WGPUMapMode_Read). 1533 - name: map_write 1534 doc: | 1535 The buffer can be *mapped* on the CPU side in *write* mode (using @ref WGPUMapMode_Write). 1536 1537 @note This usage is **not** required to set `mappedAtCreation` to `true` in @ref WGPUBufferDescriptor. 1538 - name: copy_src 1539 doc: | 1540 The buffer can be used as the *source* of a GPU-side copy operation. 1541 - name: copy_dst 1542 doc: | 1543 The buffer can be used as the *destination* of a GPU-side copy operation. 1544 - name: index 1545 doc: | 1546 The buffer can be used as an Index buffer when doing indexed drawing in a render pipeline. 1547 - name: vertex 1548 doc: | 1549 The buffer can be used as a Vertex buffer when using a render pipeline. 1550 - name: uniform 1551 doc: | 1552 The buffer can be bound to a shader as a uniform buffer. 1553 - name: storage 1554 doc: | 1555 The buffer can be bound to a shader as a storage buffer. 1556 - name: indirect 1557 doc: | 1558 The buffer can store arguments for an indirect draw call. 1559 - name: query_resolve 1560 doc: | 1561 The buffer can store the result of a timestamp or occlusion query. 1562 - name: color_write_mask 1563 doc: | 1564 TODO 1565 entries: 1566 - name: none 1567 doc: | 1568 TODO 1569 - name: red 1570 doc: | 1571 TODO 1572 - name: green 1573 doc: | 1574 TODO 1575 - name: blue 1576 doc: | 1577 TODO 1578 - name: alpha 1579 doc: | 1580 TODO 1581 - name: all 1582 value_combination: 1583 - red 1584 - green 1585 - blue 1586 - alpha 1587 doc: | 1588 TODO 1589 - name: map_mode 1590 doc: | 1591 TODO 1592 entries: 1593 - name: none 1594 doc: | 1595 TODO 1596 - name: read 1597 doc: | 1598 TODO 1599 - name: write 1600 doc: | 1601 TODO 1602 - name: shader_stage 1603 doc: | 1604 TODO 1605 entries: 1606 - name: none 1607 doc: | 1608 TODO 1609 - name: vertex 1610 doc: | 1611 TODO 1612 - name: fragment 1613 doc: | 1614 TODO 1615 - name: compute 1616 doc: | 1617 TODO 1618 - name: texture_usage 1619 doc: | 1620 TODO 1621 entries: 1622 - name: none 1623 doc: | 1624 TODO 1625 - name: copy_src 1626 doc: | 1627 TODO 1628 - name: copy_dst 1629 doc: | 1630 TODO 1631 - name: texture_binding 1632 doc: | 1633 TODO 1634 - name: storage_binding 1635 doc: | 1636 TODO 1637 - name: render_attachment 1638 doc: | 1639 TODO 1640 - name: transient_attachment 1641 doc: | 1642 TODO 1643 structs: 1644 - name: adapter_info 1645 doc: | 1646 TODO 1647 type: extensible 1648 free_members: true 1649 members: 1650 - name: vendor 1651 doc: | 1652 TODO 1653 type: out_string 1654 - name: architecture 1655 doc: | 1656 TODO 1657 type: out_string 1658 - name: device 1659 doc: | 1660 TODO 1661 type: out_string 1662 - name: description 1663 doc: | 1664 TODO 1665 type: out_string 1666 - name: backend_type 1667 doc: | 1668 TODO 1669 type: enum.backend_type 1670 - name: adapter_type 1671 doc: | 1672 TODO 1673 type: enum.adapter_type 1674 - name: vendor_ID 1675 doc: | 1676 TODO 1677 type: uint32 1678 - name: device_ID 1679 doc: | 1680 TODO 1681 type: uint32 1682 - name: subgroup_min_size 1683 doc: | 1684 TODO 1685 type: uint32 1686 - name: subgroup_max_size 1687 doc: | 1688 TODO 1689 type: uint32 1690 - name: bind_group_descriptor 1691 doc: | 1692 TODO 1693 type: extensible 1694 members: 1695 - name: label 1696 doc: | 1697 TODO 1698 type: string_with_default_empty 1699 - name: layout 1700 doc: | 1701 TODO 1702 type: object.bind_group_layout 1703 - name: entries 1704 doc: | 1705 TODO 1706 type: array<struct.bind_group_entry> 1707 pointer: immutable 1708 - name: bind_group_entry 1709 doc: | 1710 TODO 1711 type: extensible 1712 members: 1713 - name: binding 1714 doc: | 1715 Binding index in the bind group. 1716 type: uint32 1717 - name: buffer 1718 doc: | 1719 Set this if the binding is a buffer object. 1720 Otherwise must be null. 1721 type: object.buffer 1722 optional: true 1723 - name: offset 1724 doc: | 1725 If the binding is a buffer, this is the byte offset of the binding range. 1726 Otherwise ignored. 1727 type: uint64 1728 - name: size 1729 doc: | 1730 If the binding is a buffer, this is the byte size of the binding range 1731 (@ref WGPU_WHOLE_SIZE means the binding ends at the end of the buffer). 1732 Otherwise ignored. 1733 type: uint64 1734 default: constant.whole_size 1735 - name: sampler 1736 doc: | 1737 Set this if the binding is a sampler object. 1738 Otherwise must be null. 1739 type: object.sampler 1740 optional: true 1741 - name: texture_view 1742 doc: | 1743 Set this if the binding is a texture view object. 1744 Otherwise must be null. 1745 type: object.texture_view 1746 optional: true 1747 - name: bind_group_layout_descriptor 1748 doc: | 1749 TODO 1750 type: extensible 1751 members: 1752 - name: label 1753 doc: | 1754 TODO 1755 type: string_with_default_empty 1756 - name: entries 1757 doc: | 1758 TODO 1759 type: array<struct.bind_group_layout_entry> 1760 pointer: immutable 1761 - name: bind_group_layout_entry 1762 doc: | 1763 TODO 1764 type: extensible 1765 members: 1766 - name: binding 1767 doc: | 1768 TODO 1769 type: uint32 1770 - name: visibility 1771 doc: | 1772 TODO 1773 type: bitflag.shader_stage 1774 default: none 1775 - name: binding_array_size 1776 doc: | 1777 If non-zero, this entry defines a binding array with this size. 1778 type: uint32 1779 - name: buffer 1780 doc: | 1781 TODO 1782 type: struct.buffer_binding_layout 1783 # Use struct-zero-init here to get .type=BindingNotUsed (0), instead of 1784 # Undefined which is the default in WGPU_BUFFER_BINDING_LAYOUT_INIT. 1785 # Zero-init is conveniently correct for the rest of the fields, too. 1786 default: zero 1787 - name: sampler 1788 doc: | 1789 TODO 1790 type: struct.sampler_binding_layout 1791 # Use struct-zero-init here to get .type=BindingNotUsed (0), instead of 1792 # Undefined which is the default in WGPU_SAMPLER_BINDING_LAYOUT_INIT. 1793 # Zero-init is conveniently correct for the rest of the fields, too. 1794 default: zero 1795 - name: texture 1796 doc: | 1797 TODO 1798 type: struct.texture_binding_layout 1799 # Use struct-zero-init here to get .sampleType=BindingNotUsed (0), instead of 1800 # Undefined which is the default in WGPU_TEXTURE_BINDING_LAYOUT_INIT. 1801 # Zero-init is conveniently correct for the rest of the fields, too. 1802 default: zero 1803 - name: storage_texture 1804 doc: | 1805 TODO 1806 type: struct.storage_texture_binding_layout 1807 # Use struct-zero-init here to get .access=BindingNotUsed (0), instead of 1808 # Undefined which is the default in WGPU_STORAGE_TEXTURE_BINDING_LAYOUT_INIT. 1809 # Zero-init is conveniently correct for the rest of the fields, too. 1810 default: zero 1811 - name: blend_component 1812 doc: | 1813 TODO 1814 type: standalone 1815 members: 1816 - name: operation 1817 doc: | 1818 If set to @ref WGPUBlendOperation_Undefined, 1819 [defaults](@ref SentinelValues) to @ref WGPUBlendOperation_Add. 1820 type: enum.blend_operation 1821 - name: src_factor 1822 doc: | 1823 If set to @ref WGPUBlendFactor_Undefined, 1824 [defaults](@ref SentinelValues) to @ref WGPUBlendFactor_One. 1825 type: enum.blend_factor 1826 - name: dst_factor 1827 doc: | 1828 If set to @ref WGPUBlendFactor_Undefined, 1829 [defaults](@ref SentinelValues) to @ref WGPUBlendFactor_Zero. 1830 type: enum.blend_factor 1831 - name: blend_state 1832 doc: | 1833 TODO 1834 type: standalone 1835 members: 1836 - name: color 1837 doc: | 1838 TODO 1839 type: struct.blend_component 1840 - name: alpha 1841 doc: | 1842 TODO 1843 type: struct.blend_component 1844 - name: buffer_binding_layout 1845 doc: | 1846 TODO 1847 type: extensible 1848 members: 1849 - name: type 1850 doc: | 1851 If set to @ref WGPUBufferBindingType_Undefined, 1852 [defaults](@ref SentinelValues) to @ref WGPUBufferBindingType_Uniform. 1853 type: enum.buffer_binding_type 1854 - name: has_dynamic_offset 1855 doc: | 1856 TODO 1857 type: bool 1858 default: false 1859 - name: min_binding_size 1860 doc: | 1861 TODO 1862 type: uint64 1863 default: 0 1864 - name: buffer_descriptor 1865 doc: | 1866 TODO 1867 type: extensible 1868 members: 1869 - name: label 1870 doc: | 1871 TODO 1872 type: string_with_default_empty 1873 - name: usage 1874 doc: | 1875 TODO 1876 type: bitflag.buffer_usage 1877 default: none 1878 - name: size 1879 doc: | 1880 TODO 1881 type: uint64 1882 - name: mapped_at_creation 1883 doc: | 1884 When true, the buffer is mapped in write mode at creation. It should thus be unmapped once its initial data has been written. 1885 1886 @note Mapping at creation does **not** require the usage @ref WGPUBufferUsage_MapWrite. 1887 type: bool 1888 default: false 1889 - name: color 1890 doc: | 1891 An RGBA color. Represents a `f32`, `i32`, or `u32` color using @ref DoubleAsSupertype. 1892 1893 If any channel is non-finite, produces a @ref NonFiniteFloatValueError. 1894 type: standalone 1895 members: 1896 - name: r 1897 doc: "" 1898 type: float64_supertype 1899 - name: g 1900 doc: "" 1901 type: float64_supertype 1902 - name: b 1903 doc: "" 1904 type: float64_supertype 1905 - name: a 1906 doc: "" 1907 type: float64_supertype 1908 - name: color_target_state 1909 doc: | 1910 TODO 1911 type: extensible 1912 members: 1913 - name: format 1914 doc: | 1915 The texture format of the target. If @ref WGPUTextureFormat_Undefined, 1916 indicates a "hole" in the parent @ref WGPUFragmentState `targets` array: 1917 the pipeline does not output a value at this `location`. 1918 type: enum.texture_format 1919 - name: blend 1920 doc: | 1921 TODO 1922 type: struct.blend_state 1923 pointer: immutable 1924 optional: true 1925 - name: write_mask 1926 doc: | 1927 TODO 1928 type: bitflag.color_write_mask 1929 default: all 1930 - name: command_buffer_descriptor 1931 doc: | 1932 TODO 1933 type: extensible 1934 members: 1935 - name: label 1936 doc: | 1937 TODO 1938 type: string_with_default_empty 1939 - name: command_encoder_descriptor 1940 doc: | 1941 TODO 1942 type: extensible 1943 members: 1944 - name: label 1945 doc: | 1946 TODO 1947 type: string_with_default_empty 1948 - name: compilation_info 1949 doc: | 1950 TODO 1951 type: extensible_callback_arg 1952 members: 1953 - name: messages 1954 doc: | 1955 TODO 1956 type: array<struct.compilation_message> 1957 pointer: immutable 1958 - name: compilation_message 1959 doc: | 1960 TODO 1961 type: extensible_callback_arg 1962 members: 1963 - name: message 1964 doc: | 1965 A @ref LocalizableHumanReadableMessageString. 1966 type: out_string 1967 - name: type 1968 doc: | 1969 Severity level of the message. 1970 type: enum.compilation_message_type 1971 - name: line_num 1972 doc: | 1973 Line number where the message is attached, starting at 1. 1974 type: uint64 1975 - name: line_pos 1976 doc: | 1977 Offset in UTF-8 code units (bytes) from the beginning of the line, starting at 1. 1978 type: uint64 1979 - name: offset 1980 doc: | 1981 Offset in UTF-8 code units (bytes) from the beginning of the shader code, starting at 0. 1982 type: uint64 1983 - name: length 1984 doc: | 1985 Length in UTF-8 code units (bytes) of the span the message corresponds to. 1986 type: uint64 1987 - name: compute_pass_descriptor 1988 doc: | 1989 TODO 1990 type: extensible 1991 members: 1992 - name: label 1993 doc: | 1994 TODO 1995 type: string_with_default_empty 1996 - name: timestamp_writes 1997 doc: | 1998 TODO 1999 type: struct.pass_timestamp_writes 2000 pointer: immutable 2001 optional: true 2002 - name: compute_pipeline_descriptor 2003 doc: | 2004 TODO 2005 type: extensible 2006 members: 2007 - name: label 2008 doc: | 2009 TODO 2010 type: string_with_default_empty 2011 - name: layout 2012 doc: | 2013 TODO 2014 type: object.pipeline_layout 2015 optional: true 2016 - name: compute 2017 doc: | 2018 TODO 2019 type: struct.compute_state 2020 - name: compute_state 2021 doc: | 2022 TODO 2023 type: extensible 2024 members: 2025 - name: module 2026 doc: | 2027 TODO 2028 type: object.shader_module 2029 - name: entry_point 2030 doc: | 2031 TODO 2032 type: nullable_string 2033 - name: constants 2034 doc: | 2035 TODO 2036 type: array<struct.constant_entry> 2037 pointer: immutable 2038 - name: constant_entry 2039 doc: | 2040 TODO 2041 type: extensible 2042 members: 2043 - name: key 2044 doc: | 2045 TODO 2046 type: string_with_default_empty 2047 - name: value 2048 doc: | 2049 Represents a WGSL numeric or boolean value using @ref DoubleAsSupertype. 2050 2051 If non-finite, produces a @ref NonFiniteFloatValueError. 2052 type: float64_supertype 2053 - name: depth_stencil_state 2054 doc: | 2055 TODO 2056 type: extensible 2057 members: 2058 - name: format 2059 doc: | 2060 TODO 2061 type: enum.texture_format 2062 - name: depth_write_enabled 2063 doc: | 2064 TODO 2065 type: enum.optional_bool 2066 - name: depth_compare 2067 doc: | 2068 TODO 2069 type: enum.compare_function 2070 - name: stencil_front 2071 doc: | 2072 TODO 2073 type: struct.stencil_face_state 2074 - name: stencil_back 2075 doc: | 2076 TODO 2077 type: struct.stencil_face_state 2078 - name: stencil_read_mask 2079 doc: | 2080 TODO 2081 type: uint32 2082 default: "0xFFFFFFFF" 2083 - name: stencil_write_mask 2084 doc: | 2085 TODO 2086 type: uint32 2087 default: "0xFFFFFFFF" 2088 - name: depth_bias 2089 doc: | 2090 TODO 2091 type: int32 2092 default: 0 2093 - name: depth_bias_slope_scale 2094 doc: | 2095 TODO 2096 2097 If non-finite, produces a @ref NonFiniteFloatValueError. 2098 type: float32 2099 default: 0.0 2100 - name: depth_bias_clamp 2101 doc: | 2102 TODO 2103 2104 If non-finite, produces a @ref NonFiniteFloatValueError. 2105 type: float32 2106 default: 0.0 2107 - name: device_descriptor 2108 doc: | 2109 TODO 2110 type: extensible 2111 members: 2112 - name: label 2113 doc: | 2114 TODO 2115 type: string_with_default_empty 2116 - name: required_features 2117 doc: | 2118 TODO 2119 type: array<enum.feature_name> 2120 pointer: immutable 2121 - name: required_limits 2122 doc: | 2123 TODO 2124 type: struct.limits 2125 pointer: immutable 2126 optional: true 2127 - name: default_queue 2128 doc: | 2129 TODO 2130 type: struct.queue_descriptor 2131 - name: device_lost_callback_info 2132 doc: | 2133 TODO 2134 type: callback.device_lost 2135 - name: uncaptured_error_callback_info 2136 doc: | 2137 Called when there is an uncaptured error on this device, from any thread. 2138 See @ref ErrorScopes. 2139 2140 **Important:** This callback does not have a configurable @ref WGPUCallbackMode; it may be called at any time (like @ref WGPUCallbackMode_AllowSpontaneous). As such, calls into the `webgpu.h` API from this callback are unsafe. See @ref CallbackReentrancy. 2141 type: callback.uncaptured_error 2142 - name: extent_3D 2143 doc: | 2144 TODO 2145 type: standalone 2146 members: 2147 - name: width 2148 doc: | 2149 TODO 2150 type: uint32 2151 - name: height 2152 doc: | 2153 TODO 2154 type: uint32 2155 default: 1 2156 - name: depth_or_array_layers 2157 doc: | 2158 TODO 2159 type: uint32 2160 default: 1 2161 - name: external_texture_binding_entry 2162 doc: Chained in an @ref WGPUBindGroupEntry to set it to an @ref WGPUExternalTexture. This must have a corresponding @ref WGPUExternalTextureBindingLayout in the @ref WGPUBindGroupLayout. 2163 type: extension 2164 extends: 2165 - bind_group_entry 2166 members: 2167 - name: external_texture 2168 type: object.external_texture 2169 doc: | 2170 TODO 2171 - name: external_texture_binding_layout 2172 doc: Chained in @ref WGPUBindGroupLayoutEntry to specify that the corresponding entries in an @ref WGPUBindGroup will contain an @ref WGPUExternalTexture. 2173 type: extension 2174 extends: 2175 - bind_group_layout_entry 2176 - name: fragment_state 2177 doc: | 2178 TODO 2179 type: extensible 2180 members: 2181 - name: module 2182 doc: | 2183 TODO 2184 type: object.shader_module 2185 - name: entry_point 2186 doc: | 2187 TODO 2188 type: nullable_string 2189 - name: constants 2190 doc: | 2191 TODO 2192 type: array<struct.constant_entry> 2193 pointer: immutable 2194 - name: targets 2195 doc: | 2196 TODO 2197 type: array<struct.color_target_state> 2198 pointer: immutable 2199 - name: future 2200 doc: Opaque handle to an asynchronous operation. See @ref Asynchronous-Operations for more information. 2201 type: standalone 2202 members: 2203 - name: id 2204 doc: Opaque id of the @ref WGPUFuture 2205 type: uint64 2206 - name: future_wait_info 2207 doc: Struct holding a future to wait on, and a `completed` boolean flag. 2208 type: standalone 2209 members: 2210 - name: future 2211 doc: The future to wait on. 2212 type: struct.future 2213 - name: completed 2214 doc: Whether or not the future completed. 2215 type: bool 2216 - name: instance_descriptor 2217 doc: | 2218 TODO 2219 type: extensible 2220 members: 2221 - name: required_features 2222 doc: | 2223 TODO 2224 type: array<enum.instance_feature_name> 2225 pointer: immutable 2226 - name: required_limits 2227 doc: | 2228 TODO 2229 type: struct.instance_limits 2230 pointer: immutable 2231 optional: true 2232 - name: instance_limits 2233 doc: | 2234 TODO 2235 type: extensible 2236 members: 2237 - name: timed_wait_any_max_count 2238 doc: The maximum number @ref WGPUFutureWaitInfo supported in a call to ::wgpuInstanceWaitAny with `timeoutNS > 0`. 2239 type: usize 2240 - name: limits 2241 doc: | 2242 TODO 2243 type: extensible 2244 members: 2245 - name: max_texture_dimension_1D 2246 doc: | 2247 TODO 2248 type: uint32 2249 default: constant.limit_u32_undefined 2250 - name: max_texture_dimension_2D 2251 doc: | 2252 TODO 2253 type: uint32 2254 default: constant.limit_u32_undefined 2255 - name: max_texture_dimension_3D 2256 doc: | 2257 TODO 2258 type: uint32 2259 default: constant.limit_u32_undefined 2260 - name: max_texture_array_layers 2261 doc: | 2262 TODO 2263 type: uint32 2264 default: constant.limit_u32_undefined 2265 - name: max_bind_groups 2266 doc: | 2267 TODO 2268 type: uint32 2269 default: constant.limit_u32_undefined 2270 - name: max_bind_groups_plus_vertex_buffers 2271 doc: | 2272 TODO 2273 type: uint32 2274 default: constant.limit_u32_undefined 2275 - name: max_bindings_per_bind_group 2276 doc: | 2277 TODO 2278 type: uint32 2279 default: constant.limit_u32_undefined 2280 - name: max_dynamic_uniform_buffers_per_pipeline_layout 2281 doc: | 2282 TODO 2283 type: uint32 2284 default: constant.limit_u32_undefined 2285 - name: max_dynamic_storage_buffers_per_pipeline_layout 2286 doc: | 2287 TODO 2288 type: uint32 2289 default: constant.limit_u32_undefined 2290 - name: max_sampled_textures_per_shader_stage 2291 doc: | 2292 TODO 2293 type: uint32 2294 default: constant.limit_u32_undefined 2295 - name: max_samplers_per_shader_stage 2296 doc: | 2297 TODO 2298 type: uint32 2299 default: constant.limit_u32_undefined 2300 - name: max_storage_buffers_per_shader_stage 2301 doc: | 2302 TODO 2303 type: uint32 2304 default: constant.limit_u32_undefined 2305 - name: max_storage_textures_per_shader_stage 2306 doc: | 2307 TODO 2308 type: uint32 2309 default: constant.limit_u32_undefined 2310 - name: max_uniform_buffers_per_shader_stage 2311 doc: | 2312 TODO 2313 type: uint32 2314 default: constant.limit_u32_undefined 2315 - name: max_uniform_buffer_binding_size 2316 doc: | 2317 TODO 2318 type: uint64 2319 default: constant.limit_u64_undefined 2320 - name: max_storage_buffer_binding_size 2321 doc: | 2322 TODO 2323 type: uint64 2324 default: constant.limit_u64_undefined 2325 - name: min_uniform_buffer_offset_alignment 2326 doc: | 2327 TODO 2328 type: uint32 2329 default: constant.limit_u32_undefined 2330 - name: min_storage_buffer_offset_alignment 2331 doc: | 2332 TODO 2333 type: uint32 2334 default: constant.limit_u32_undefined 2335 - name: max_vertex_buffers 2336 doc: | 2337 TODO 2338 type: uint32 2339 default: constant.limit_u32_undefined 2340 - name: max_buffer_size 2341 doc: | 2342 TODO 2343 type: uint64 2344 default: constant.limit_u64_undefined 2345 - name: max_vertex_attributes 2346 doc: | 2347 TODO 2348 type: uint32 2349 default: constant.limit_u32_undefined 2350 - name: max_vertex_buffer_array_stride 2351 doc: | 2352 TODO 2353 type: uint32 2354 default: constant.limit_u32_undefined 2355 - name: max_inter_stage_shader_variables 2356 doc: | 2357 TODO 2358 type: uint32 2359 default: constant.limit_u32_undefined 2360 - name: max_color_attachments 2361 doc: | 2362 TODO 2363 type: uint32 2364 default: constant.limit_u32_undefined 2365 - name: max_color_attachment_bytes_per_sample 2366 doc: | 2367 TODO 2368 type: uint32 2369 default: constant.limit_u32_undefined 2370 - name: max_compute_workgroup_storage_size 2371 doc: | 2372 TODO 2373 type: uint32 2374 default: constant.limit_u32_undefined 2375 - name: max_compute_invocations_per_workgroup 2376 doc: | 2377 TODO 2378 type: uint32 2379 default: constant.limit_u32_undefined 2380 - name: max_compute_workgroup_size_x 2381 doc: | 2382 TODO 2383 type: uint32 2384 default: constant.limit_u32_undefined 2385 - name: max_compute_workgroup_size_y 2386 doc: | 2387 TODO 2388 type: uint32 2389 default: constant.limit_u32_undefined 2390 - name: max_compute_workgroup_size_z 2391 doc: | 2392 TODO 2393 type: uint32 2394 default: constant.limit_u32_undefined 2395 - name: max_compute_workgroups_per_dimension 2396 doc: | 2397 TODO 2398 type: uint32 2399 default: constant.limit_u32_undefined 2400 - name: max_immediate_size 2401 doc: | 2402 TODO 2403 type: uint32 2404 default: constant.limit_u32_undefined 2405 - name: multisample_state 2406 doc: | 2407 TODO 2408 type: extensible 2409 members: 2410 - name: count 2411 doc: | 2412 TODO 2413 type: uint32 2414 default: 1 2415 - name: mask 2416 doc: | 2417 TODO 2418 type: uint32 2419 default: "0xFFFFFFFF" 2420 - name: alpha_to_coverage_enabled 2421 doc: | 2422 TODO 2423 type: bool 2424 default: false 2425 - name: origin_3D 2426 doc: | 2427 TODO 2428 type: standalone 2429 members: 2430 - name: x 2431 doc: | 2432 TODO 2433 type: uint32 2434 default: 0 2435 - name: y 2436 doc: | 2437 TODO 2438 type: uint32 2439 default: 0 2440 - name: z 2441 doc: | 2442 TODO 2443 type: uint32 2444 default: 0 2445 - name: pass_timestamp_writes 2446 doc: | 2447 TODO 2448 type: extensible 2449 members: 2450 - name: query_set 2451 doc: | 2452 Query set to write timestamps to. 2453 type: object.query_set 2454 - name: beginning_of_pass_write_index 2455 doc: | 2456 TODO 2457 type: uint32 2458 default: constant.query_set_index_undefined 2459 - name: end_of_pass_write_index 2460 doc: | 2461 TODO 2462 type: uint32 2463 default: constant.query_set_index_undefined 2464 - name: pipeline_layout_descriptor 2465 doc: | 2466 TODO 2467 type: extensible 2468 members: 2469 - name: label 2470 doc: | 2471 TODO 2472 type: string_with_default_empty 2473 - name: bind_group_layouts 2474 doc: | 2475 TODO 2476 type: array<object.bind_group_layout> 2477 pointer: immutable 2478 - name: immediate_size 2479 doc: | 2480 TODO 2481 type: uint32 2482 default: 0 2483 - name: primitive_state 2484 doc: | 2485 TODO 2486 type: extensible 2487 members: 2488 - name: topology 2489 doc: | 2490 If set to @ref WGPUPrimitiveTopology_Undefined, 2491 [defaults](@ref SentinelValues) to @ref WGPUPrimitiveTopology_TriangleList. 2492 type: enum.primitive_topology 2493 - name: strip_index_format 2494 doc: | 2495 TODO 2496 type: enum.index_format 2497 - name: front_face 2498 doc: | 2499 If set to @ref WGPUFrontFace_Undefined, 2500 [defaults](@ref SentinelValues) to @ref WGPUFrontFace_CCW. 2501 type: enum.front_face 2502 - name: cull_mode 2503 doc: | 2504 If set to @ref WGPUCullMode_Undefined, 2505 [defaults](@ref SentinelValues) to @ref WGPUCullMode_None. 2506 type: enum.cull_mode 2507 - name: unclipped_depth 2508 doc: | 2509 TODO 2510 type: bool 2511 default: false 2512 - name: query_set_descriptor 2513 doc: | 2514 TODO 2515 type: extensible 2516 members: 2517 - name: label 2518 doc: | 2519 TODO 2520 type: string_with_default_empty 2521 - name: type 2522 doc: | 2523 TODO 2524 type: enum.query_type 2525 - name: count 2526 doc: | 2527 TODO 2528 type: uint32 2529 - name: queue_descriptor 2530 doc: | 2531 TODO 2532 type: extensible 2533 members: 2534 - name: label 2535 doc: | 2536 TODO 2537 type: string_with_default_empty 2538 - name: render_bundle_descriptor 2539 doc: | 2540 TODO 2541 type: extensible 2542 members: 2543 - name: label 2544 doc: | 2545 TODO 2546 type: string_with_default_empty 2547 - name: render_bundle_encoder_descriptor 2548 doc: | 2549 TODO 2550 type: extensible 2551 members: 2552 - name: label 2553 doc: | 2554 TODO 2555 type: string_with_default_empty 2556 - name: color_formats 2557 doc: | 2558 TODO 2559 type: array<enum.texture_format> 2560 pointer: immutable 2561 - name: depth_stencil_format 2562 doc: | 2563 TODO 2564 type: enum.texture_format 2565 - name: sample_count 2566 doc: | 2567 TODO 2568 type: uint32 2569 default: 1 2570 - name: depth_read_only 2571 doc: | 2572 TODO 2573 type: bool 2574 default: false 2575 - name: stencil_read_only 2576 doc: | 2577 TODO 2578 type: bool 2579 default: false 2580 - name: render_pass_color_attachment 2581 doc: | 2582 TODO 2583 type: extensible 2584 members: 2585 - name: view 2586 doc: | 2587 If `NULL`, indicates a hole in the parent 2588 @ref WGPURenderPassDescriptor::colorAttachments array. 2589 type: object.texture_view 2590 optional: true 2591 - name: depth_slice 2592 doc: | 2593 TODO 2594 type: uint32 2595 default: constant.depth_slice_undefined 2596 - name: resolve_target 2597 doc: | 2598 TODO 2599 type: object.texture_view 2600 optional: true 2601 - name: load_op 2602 doc: | 2603 TODO 2604 type: enum.load_op 2605 - name: store_op 2606 doc: | 2607 TODO 2608 type: enum.store_op 2609 - name: clear_value 2610 doc: | 2611 TODO 2612 type: struct.color 2613 - name: render_pass_depth_stencil_attachment 2614 doc: | 2615 TODO 2616 type: extensible 2617 members: 2618 - name: view 2619 doc: | 2620 TODO 2621 type: object.texture_view 2622 - name: depth_load_op 2623 doc: | 2624 TODO 2625 type: enum.load_op 2626 - name: depth_store_op 2627 doc: | 2628 TODO 2629 type: enum.store_op 2630 - name: depth_clear_value 2631 doc: | 2632 This is a @ref NullableFloatingPointType. 2633 2634 If `NaN`, indicates an `undefined` value (as defined by the JS spec). 2635 Use @ref WGPU_DEPTH_CLEAR_VALUE_UNDEFINED to indicate this semantically. 2636 2637 If infinite, produces a @ref NonFiniteFloatValueError. 2638 type: nullable_float32 2639 default: constant.depth_clear_value_undefined 2640 - name: depth_read_only 2641 doc: | 2642 TODO 2643 type: bool 2644 default: false 2645 - name: stencil_load_op 2646 doc: | 2647 TODO 2648 type: enum.load_op 2649 - name: stencil_store_op 2650 doc: | 2651 TODO 2652 type: enum.store_op 2653 - name: stencil_clear_value 2654 doc: | 2655 TODO 2656 type: uint32 2657 - name: stencil_read_only 2658 doc: | 2659 TODO 2660 type: bool 2661 default: false 2662 - name: render_pass_descriptor 2663 doc: | 2664 TODO 2665 type: extensible 2666 members: 2667 - name: label 2668 doc: | 2669 TODO 2670 type: string_with_default_empty 2671 - name: color_attachments 2672 doc: | 2673 TODO 2674 type: array<struct.render_pass_color_attachment> 2675 pointer: immutable 2676 - name: depth_stencil_attachment 2677 doc: | 2678 TODO 2679 type: struct.render_pass_depth_stencil_attachment 2680 pointer: immutable 2681 optional: true 2682 - name: occlusion_query_set 2683 doc: | 2684 TODO 2685 type: object.query_set 2686 optional: true 2687 - name: timestamp_writes 2688 doc: | 2689 TODO 2690 type: struct.pass_timestamp_writes 2691 pointer: immutable 2692 optional: true 2693 - name: render_pass_max_draw_count 2694 doc: | 2695 TODO 2696 type: extension 2697 extends: 2698 - render_pass_descriptor 2699 members: 2700 - name: max_draw_count 2701 doc: | 2702 TODO 2703 type: uint64 2704 default: 50000000 2705 - name: render_pipeline_descriptor 2706 doc: | 2707 TODO 2708 type: extensible 2709 members: 2710 - name: label 2711 doc: | 2712 TODO 2713 type: string_with_default_empty 2714 - name: layout 2715 doc: | 2716 TODO 2717 type: object.pipeline_layout 2718 optional: true 2719 - name: vertex 2720 doc: | 2721 TODO 2722 type: struct.vertex_state 2723 - name: primitive 2724 doc: | 2725 TODO 2726 type: struct.primitive_state 2727 - name: depth_stencil 2728 doc: | 2729 TODO 2730 type: struct.depth_stencil_state 2731 pointer: immutable 2732 optional: true 2733 - name: multisample 2734 doc: | 2735 TODO 2736 type: struct.multisample_state 2737 - name: fragment 2738 doc: | 2739 TODO 2740 type: struct.fragment_state 2741 pointer: immutable 2742 optional: true 2743 - name: request_adapter_options 2744 doc: | 2745 TODO 2746 type: extensible 2747 members: 2748 - name: feature_level 2749 doc: | 2750 "Feature level" for the adapter request. If an adapter is returned, it must support the features and limits in the requested feature level. 2751 2752 If set to @ref WGPUFeatureLevel_Undefined, 2753 [defaults](@ref SentinelValues) to @ref WGPUFeatureLevel_Core. 2754 Additionally, implementations may ignore @ref WGPUFeatureLevel_Compatibility 2755 and provide @ref WGPUFeatureLevel_Core instead. 2756 type: enum.feature_level 2757 - name: power_preference 2758 doc: | 2759 TODO 2760 type: enum.power_preference 2761 - name: force_fallback_adapter 2762 doc: | 2763 If true, requires the adapter to be a "fallback" adapter as defined by the JS spec. 2764 If this is not possible, the request returns null. 2765 type: bool 2766 default: false 2767 - name: backend_type 2768 doc: | 2769 If set, requires the adapter to have a particular backend type. 2770 If this is not possible, the request returns null. 2771 type: enum.backend_type 2772 - name: compatible_surface 2773 doc: | 2774 If set, requires the adapter to be able to output to a particular surface. 2775 If this is not possible, the request returns null. 2776 type: object.surface 2777 optional: true 2778 - name: request_adapter_WebXR_options 2779 doc: | 2780 Extension providing requestAdapter options for implementations with WebXR interop (i.e. Wasm). 2781 type: extension 2782 extends: 2783 - request_adapter_options 2784 members: 2785 - name: xr_compatible 2786 doc: | 2787 Sets the `xrCompatible` option in the JS API. 2788 type: bool 2789 default: false 2790 - name: sampler_binding_layout 2791 doc: | 2792 TODO 2793 type: extensible 2794 members: 2795 - name: type 2796 doc: | 2797 If set to @ref WGPUSamplerBindingType_Undefined, 2798 [defaults](@ref SentinelValues) to @ref WGPUSamplerBindingType_Filtering. 2799 type: enum.sampler_binding_type 2800 - name: sampler_descriptor 2801 doc: | 2802 TODO 2803 type: extensible 2804 members: 2805 - name: label 2806 doc: | 2807 TODO 2808 type: string_with_default_empty 2809 - name: address_mode_u 2810 doc: | 2811 If set to @ref WGPUAddressMode_Undefined, 2812 [defaults](@ref SentinelValues) to @ref WGPUAddressMode_ClampToEdge. 2813 type: enum.address_mode 2814 - name: address_mode_v 2815 doc: | 2816 If set to @ref WGPUAddressMode_Undefined, 2817 [defaults](@ref SentinelValues) to @ref WGPUAddressMode_ClampToEdge. 2818 type: enum.address_mode 2819 - name: address_mode_w 2820 doc: | 2821 If set to @ref WGPUAddressMode_Undefined, 2822 [defaults](@ref SentinelValues) to @ref WGPUAddressMode_ClampToEdge. 2823 type: enum.address_mode 2824 - name: mag_filter 2825 doc: | 2826 If set to @ref WGPUFilterMode_Undefined, 2827 [defaults](@ref SentinelValues) to @ref WGPUFilterMode_Nearest. 2828 type: enum.filter_mode 2829 - name: min_filter 2830 doc: | 2831 If set to @ref WGPUFilterMode_Undefined, 2832 [defaults](@ref SentinelValues) to @ref WGPUFilterMode_Nearest. 2833 type: enum.filter_mode 2834 - name: mipmap_filter 2835 doc: | 2836 If set to @ref WGPUFilterMode_Undefined, 2837 [defaults](@ref SentinelValues) to @ref WGPUMipmapFilterMode_Nearest. 2838 type: enum.mipmap_filter_mode 2839 - name: lod_min_clamp 2840 doc: | 2841 TODO 2842 2843 If non-finite, produces a @ref NonFiniteFloatValueError. 2844 type: float32 2845 default: 0.0 2846 - name: lod_max_clamp 2847 doc: | 2848 TODO 2849 2850 If non-finite, produces a @ref NonFiniteFloatValueError. 2851 type: float32 2852 default: 32.0 2853 - name: compare 2854 doc: | 2855 TODO 2856 type: enum.compare_function 2857 - name: max_anisotropy 2858 doc: | 2859 TODO 2860 type: uint16 2861 default: 1 2862 - name: shader_module_descriptor 2863 doc: | 2864 TODO 2865 type: extensible 2866 members: 2867 - name: label 2868 doc: | 2869 TODO 2870 type: string_with_default_empty 2871 - name: shader_source_SPIRV 2872 doc: | 2873 TODO 2874 type: extension 2875 extends: 2876 - shader_module_descriptor 2877 members: 2878 - name: code_size 2879 doc: | 2880 TODO 2881 type: uint32 2882 default: 0 2883 - name: code 2884 doc: | 2885 TODO 2886 type: uint32 2887 pointer: immutable 2888 - name: shader_source_WGSL 2889 doc: | 2890 TODO 2891 type: extension 2892 extends: 2893 - shader_module_descriptor 2894 members: 2895 - name: code 2896 doc: | 2897 TODO 2898 type: string_with_default_empty 2899 - name: stencil_face_state 2900 doc: | 2901 TODO 2902 type: standalone 2903 members: 2904 - name: compare 2905 doc: | 2906 If set to @ref WGPUCompareFunction_Undefined, 2907 [defaults](@ref SentinelValues) to @ref WGPUCompareFunction_Always. 2908 type: enum.compare_function 2909 - name: fail_op 2910 doc: | 2911 If set to @ref WGPUStencilOperation_Undefined, 2912 [defaults](@ref SentinelValues) to @ref WGPUStencilOperation_Keep. 2913 type: enum.stencil_operation 2914 - name: depth_fail_op 2915 doc: | 2916 If set to @ref WGPUStencilOperation_Undefined, 2917 [defaults](@ref SentinelValues) to @ref WGPUStencilOperation_Keep. 2918 type: enum.stencil_operation 2919 - name: pass_op 2920 doc: | 2921 If set to @ref WGPUStencilOperation_Undefined, 2922 [defaults](@ref SentinelValues) to @ref WGPUStencilOperation_Keep. 2923 type: enum.stencil_operation 2924 - name: storage_texture_binding_layout 2925 doc: | 2926 TODO 2927 type: extensible 2928 members: 2929 - name: access 2930 doc: | 2931 If set to @ref WGPUStorageTextureAccess_Undefined, 2932 [defaults](@ref SentinelValues) to @ref WGPUStorageTextureAccess_WriteOnly. 2933 type: enum.storage_texture_access 2934 - name: format 2935 doc: | 2936 TODO 2937 type: enum.texture_format 2938 - name: view_dimension 2939 doc: | 2940 If set to @ref WGPUTextureViewDimension_Undefined, 2941 [defaults](@ref SentinelValues) to @ref WGPUTextureViewDimension_2D. 2942 type: enum.texture_view_dimension 2943 - name: supported_features 2944 doc: | 2945 TODO 2946 type: standalone 2947 free_members: true 2948 members: 2949 - name: features 2950 doc: | 2951 TODO 2952 type: array<enum.feature_name> 2953 pointer: immutable 2954 - name: supported_instance_features 2955 doc: | 2956 TODO 2957 type: standalone 2958 free_members: true 2959 members: 2960 - name: features 2961 doc: | 2962 TODO 2963 type: array<enum.instance_feature_name> 2964 pointer: immutable 2965 - name: supported_WGSL_language_features 2966 doc: | 2967 TODO 2968 type: standalone 2969 free_members: true 2970 members: 2971 - name: features 2972 doc: | 2973 TODO 2974 type: array<enum.WGSL_language_feature_name> 2975 pointer: immutable 2976 - name: surface_capabilities 2977 doc: Filled by @ref wgpuSurfaceGetCapabilities with what's supported for @ref wgpuSurfaceConfigure for a pair of @ref WGPUSurface and @ref WGPUAdapter. 2978 type: extensible 2979 free_members: true 2980 members: 2981 - name: usages 2982 doc: | 2983 The bit set of supported @ref WGPUTextureUsage bits. 2984 Guaranteed to contain @ref WGPUTextureUsage_RenderAttachment. 2985 type: bitflag.texture_usage 2986 - name: formats 2987 doc: A list of supported @ref WGPUTextureFormat values, in order of preference. 2988 type: array<enum.texture_format> 2989 pointer: immutable 2990 - name: present_modes 2991 doc: | 2992 A list of supported @ref WGPUPresentMode values. 2993 Guaranteed to contain @ref WGPUPresentMode_Fifo. 2994 type: array<enum.present_mode> 2995 pointer: immutable 2996 - name: alpha_modes 2997 doc: | 2998 A list of supported @ref WGPUCompositeAlphaMode values. 2999 @ref WGPUCompositeAlphaMode_Auto will be an alias for the first element and will never be present in this array. 3000 type: array<enum.composite_alpha_mode> 3001 pointer: immutable 3002 - name: surface_color_management 3003 doc: | 3004 Extension of @ref WGPUSurfaceConfiguration for color spaces and HDR. 3005 type: extension 3006 members: 3007 - name: color_space 3008 doc: TODO 3009 type: enum.predefined_color_space 3010 - name: tone_mapping_mode 3011 doc: TODO 3012 type: enum.tone_mapping_mode 3013 - name: surface_configuration 3014 doc: | 3015 Options to @ref wgpuSurfaceConfigure for defining how a @ref WGPUSurface will be rendered to and presented to the user. 3016 See @ref Surface-Configuration for more details. 3017 type: extensible 3018 members: 3019 - name: device 3020 doc: The @ref WGPUDevice to use to render to surface's textures. 3021 type: object.device 3022 - name: format 3023 doc: The @ref WGPUTextureFormat of the surface's textures. 3024 type: enum.texture_format 3025 - name: usage 3026 doc: The @ref WGPUTextureUsage of the surface's textures. 3027 type: bitflag.texture_usage 3028 default: render_attachment 3029 - name: width 3030 doc: The width of the surface's textures. 3031 type: uint32 3032 - name: height 3033 doc: The height of the surface's textures. 3034 type: uint32 3035 - name: view_formats 3036 doc: The additional @ref WGPUTextureFormat for @ref WGPUTextureView format reinterpretation of the surface's textures. 3037 type: array<enum.texture_format> 3038 pointer: immutable 3039 - name: alpha_mode 3040 doc: | 3041 How the surface's frames will be composited on the screen. 3042 3043 If set to @ref WGPUCompositeAlphaMode_Auto, 3044 [defaults] to @ref WGPUCompositeAlphaMode_Inherit in native (allowing the mode 3045 to be configured externally), and to @ref WGPUCompositeAlphaMode_Opaque in Wasm. 3046 type: enum.composite_alpha_mode 3047 default: auto 3048 - name: present_mode 3049 doc: | 3050 When and in which order the surface's frames will be shown on the screen. 3051 3052 If set to @ref WGPUPresentMode_Undefined, 3053 [defaults](@ref SentinelValues) to @ref WGPUPresentMode_Fifo. 3054 type: enum.present_mode 3055 - name: surface_descriptor 3056 doc: | 3057 The root descriptor for the creation of an @ref WGPUSurface with @ref wgpuInstanceCreateSurface. 3058 It isn't sufficient by itself and must have one of the `WGPUSurfaceSource*` in its chain. 3059 See @ref Surface-Creation for more details. 3060 type: extensible 3061 members: 3062 - name: label 3063 doc: Label used to refer to the object. 3064 type: string_with_default_empty 3065 - name: surface_source_android_native_window 3066 doc: Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping an Android [`ANativeWindow`](https://developer.android.com/ndk/reference/group/a-native-window). 3067 type: extension 3068 extends: 3069 - surface_descriptor 3070 members: 3071 - name: window 3072 doc: The pointer to the [`ANativeWindow`](https://developer.android.com/ndk/reference/group/a-native-window) that will be wrapped by the @ref WGPUSurface. 3073 type: c_void 3074 pointer: mutable 3075 - name: surface_source_metal_layer 3076 doc: Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping a [`CAMetalLayer`](https://developer.apple.com/documentation/quartzcore/cametallayer?language=objc). 3077 type: extension 3078 extends: 3079 - surface_descriptor 3080 members: 3081 - name: layer 3082 doc: The pointer to the [`CAMetalLayer`](https://developer.apple.com/documentation/quartzcore/cametallayer?language=objc) that will be wrapped by the @ref WGPUSurface. 3083 type: c_void 3084 pointer: mutable 3085 - name: surface_source_wayland_surface 3086 doc: Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping a [Wayland](https://wayland.freedesktop.org/) [`wl_surface`](https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface). 3087 type: extension 3088 extends: 3089 - surface_descriptor 3090 members: 3091 - name: display 3092 doc: A [`wl_display`](https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_display) for this Wayland instance. 3093 type: c_void 3094 pointer: mutable 3095 - name: surface 3096 doc: A [`wl_surface`](https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface) that will be wrapped by the @ref WGPUSurface 3097 type: c_void 3098 pointer: mutable 3099 - name: surface_source_windows_HWND 3100 doc: Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping a Windows [`HWND`](https://learn.microsoft.com/en-us/windows/apps/develop/ui-input/retrieve-hwnd). 3101 type: extension 3102 extends: 3103 - surface_descriptor 3104 members: 3105 - name: hinstance 3106 doc: | 3107 The [`HINSTANCE`](https://learn.microsoft.com/en-us/windows/win32/learnwin32/winmain--the-application-entry-point) for this application. 3108 Most commonly `GetModuleHandle(nullptr)`. 3109 type: c_void 3110 pointer: mutable 3111 - name: hwnd 3112 doc: The [`HWND`](https://learn.microsoft.com/en-us/windows/apps/develop/ui-input/retrieve-hwnd) that will be wrapped by the @ref WGPUSurface. 3113 type: c_void 3114 pointer: mutable 3115 - name: surface_source_XCB_window 3116 doc: Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping an [XCB](https://xcb.freedesktop.org/) `xcb_window_t`. 3117 type: extension 3118 extends: 3119 - surface_descriptor 3120 members: 3121 - name: connection 3122 doc: The `xcb_connection_t` for the connection to the X server. 3123 type: c_void 3124 pointer: mutable 3125 - name: window 3126 doc: The `xcb_window_t` for the window that will be wrapped by the @ref WGPUSurface. 3127 type: uint32 3128 - name: surface_source_xlib_window 3129 doc: Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping an [Xlib](https://www.x.org/releases/current/doc/libX11/libX11/libX11.html) `Window`. 3130 type: extension 3131 extends: 3132 - surface_descriptor 3133 members: 3134 - name: display 3135 doc: A pointer to the [`Display`](https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#Opening_the_Display) connected to the X server. 3136 type: c_void 3137 pointer: mutable 3138 - name: window 3139 doc: The [`Window`](https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#Creating_Windows) that will be wrapped by the @ref WGPUSurface. 3140 type: uint64 3141 - name: surface_texture 3142 doc: | 3143 Queried each frame from a @ref WGPUSurface to get a @ref WGPUTexture to render to along with some metadata. 3144 See @ref Surface-Presenting for more details. 3145 type: extensible 3146 members: 3147 - name: texture 3148 doc: | 3149 The @ref WGPUTexture representing the frame that will be shown on the surface. 3150 It is @ref ReturnedWithOwnership from @ref wgpuSurfaceGetCurrentTexture. 3151 type: object.texture 3152 - name: status 3153 doc: Whether the call to @ref wgpuSurfaceGetCurrentTexture succeeded and a hint as to why it might not have. 3154 type: enum.surface_get_current_texture_status 3155 - name: texel_copy_buffer_info 3156 doc: | 3157 TODO 3158 type: standalone 3159 members: 3160 - name: layout 3161 doc: | 3162 TODO 3163 type: struct.texel_copy_buffer_layout 3164 - name: buffer 3165 doc: | 3166 TODO 3167 type: object.buffer 3168 - name: texel_copy_buffer_layout 3169 doc: | 3170 TODO 3171 type: standalone 3172 members: 3173 - name: offset 3174 doc: | 3175 TODO 3176 type: uint64 3177 default: 0 3178 - name: bytes_per_row 3179 doc: | 3180 TODO 3181 type: uint32 3182 default: constant.copy_stride_undefined 3183 - name: rows_per_image 3184 doc: | 3185 TODO 3186 type: uint32 3187 default: constant.copy_stride_undefined 3188 - name: texel_copy_texture_info 3189 doc: | 3190 TODO 3191 type: standalone 3192 members: 3193 - name: texture 3194 doc: | 3195 TODO 3196 type: object.texture 3197 - name: mip_level 3198 doc: | 3199 TODO 3200 type: uint32 3201 default: 0 3202 - name: origin 3203 doc: | 3204 TODO 3205 type: struct.origin_3D 3206 - name: aspect 3207 doc: | 3208 If set to @ref WGPUTextureAspect_Undefined, 3209 [defaults](@ref SentinelValues) to @ref WGPUTextureAspect_All. 3210 type: enum.texture_aspect 3211 - name: texture_binding_layout 3212 doc: | 3213 TODO 3214 type: extensible 3215 members: 3216 - name: sample_type 3217 doc: | 3218 If set to @ref WGPUTextureSampleType_Undefined, 3219 [defaults](@ref SentinelValues) to @ref WGPUTextureSampleType_Float. 3220 type: enum.texture_sample_type 3221 - name: view_dimension 3222 doc: | 3223 If set to @ref WGPUTextureViewDimension_Undefined, 3224 [defaults](@ref SentinelValues) to @ref WGPUTextureViewDimension_2D. 3225 type: enum.texture_view_dimension 3226 - name: multisampled 3227 doc: | 3228 TODO 3229 type: bool 3230 default: false 3231 - name: texture_component_swizzle 3232 doc: | 3233 When accessed by a shader, the red/green/blue/alpha channels are replaced 3234 by the value corresponding to the component specified in r, g, b, and a, 3235 respectively unlike the JS API which uses a string of length four, with 3236 each character mapping to the texture view's red/green/blue/alpha channels. 3237 type: standalone 3238 members: 3239 - name: r 3240 doc: | 3241 The value that replaces the red channel in the shader. 3242 3243 If set to @ref WGPUComponentSwizzle_Undefined, 3244 [defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_R. 3245 type: enum.component_swizzle 3246 - name: g 3247 doc: | 3248 The value that replaces the green channel in the shader. 3249 3250 If set to @ref WGPUComponentSwizzle_Undefined, 3251 [defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_G. 3252 type: enum.component_swizzle 3253 - name: b 3254 doc: | 3255 The value that replaces the blue channel in the shader. 3256 3257 If set to @ref WGPUComponentSwizzle_Undefined, 3258 [defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_B. 3259 type: enum.component_swizzle 3260 - name: a 3261 doc: | 3262 The value that replaces the alpha channel in the shader. 3263 3264 If set to @ref WGPUComponentSwizzle_Undefined, 3265 [defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_A. 3266 type: enum.component_swizzle 3267 - name: texture_component_swizzle_descriptor 3268 doc: | 3269 TODO 3270 type: extension 3271 extends: 3272 - struct.texture_view_descriptor 3273 members: 3274 - name: swizzle 3275 doc: | 3276 TODO 3277 type: struct.texture_component_swizzle 3278 - name: texture_descriptor 3279 doc: | 3280 TODO 3281 type: extensible 3282 members: 3283 - name: label 3284 doc: | 3285 TODO 3286 type: string_with_default_empty 3287 - name: usage 3288 doc: | 3289 TODO 3290 type: bitflag.texture_usage 3291 default: none 3292 - name: dimension 3293 doc: | 3294 If set to @ref WGPUTextureDimension_Undefined, 3295 [defaults](@ref SentinelValues) to @ref WGPUTextureDimension_2D. 3296 type: enum.texture_dimension 3297 - name: size 3298 doc: | 3299 TODO 3300 type: struct.extent_3D 3301 - name: format 3302 doc: | 3303 TODO 3304 type: enum.texture_format 3305 - name: mip_level_count 3306 doc: | 3307 TODO 3308 type: uint32 3309 default: 1 3310 - name: sample_count 3311 doc: | 3312 TODO 3313 type: uint32 3314 default: 1 3315 - name: view_formats 3316 doc: | 3317 TODO 3318 type: array<enum.texture_format> 3319 pointer: immutable 3320 - name: texture_view_descriptor 3321 doc: | 3322 TODO 3323 type: extensible 3324 members: 3325 - name: label 3326 doc: | 3327 TODO 3328 type: string_with_default_empty 3329 - name: format 3330 doc: | 3331 TODO 3332 type: enum.texture_format 3333 - name: dimension 3334 doc: | 3335 TODO 3336 type: enum.texture_view_dimension 3337 - name: base_mip_level 3338 doc: | 3339 TODO 3340 type: uint32 3341 default: 0 3342 - name: mip_level_count 3343 doc: | 3344 TODO 3345 type: uint32 3346 default: constant.mip_level_count_undefined 3347 - name: base_array_layer 3348 doc: | 3349 TODO 3350 type: uint32 3351 default: 0 3352 - name: array_layer_count 3353 doc: | 3354 TODO 3355 type: uint32 3356 default: constant.array_layer_count_undefined 3357 - name: aspect 3358 doc: | 3359 If set to @ref WGPUTextureAspect_Undefined, 3360 [defaults](@ref SentinelValues) to @ref WGPUTextureAspect_All. 3361 type: enum.texture_aspect 3362 - name: usage 3363 doc: | 3364 TODO 3365 type: bitflag.texture_usage 3366 default: none 3367 - name: vertex_attribute 3368 doc: | 3369 TODO 3370 type: extensible 3371 members: 3372 - name: format 3373 doc: | 3374 TODO 3375 type: enum.vertex_format 3376 - name: offset 3377 doc: | 3378 TODO 3379 type: uint64 3380 - name: shader_location 3381 doc: | 3382 TODO 3383 type: uint32 3384 - name: vertex_buffer_layout 3385 doc: | 3386 If `attributes` is empty *and* `stepMode` is @ref WGPUVertexStepMode_Undefined, 3387 indicates a "hole" in the parent @ref WGPUVertexState `buffers` array, 3388 with behavior equivalent to `null` in the JS API. 3389 3390 If `attributes` is empty but `stepMode` is *not* @ref WGPUVertexStepMode_Undefined, 3391 indicates a vertex buffer with no attributes, with behavior equivalent to 3392 `{ attributes: [] }` in the JS API. (TODO: If the JS API changes not to 3393 distinguish these cases, then this distinction doesn't matter and we can 3394 remove this documentation.) 3395 3396 If `stepMode` is @ref WGPUVertexStepMode_Undefined but `attributes` is *not* empty, 3397 `stepMode` [defaults](@ref SentinelValues) to @ref WGPUVertexStepMode_Vertex. 3398 type: extensible 3399 members: 3400 - name: step_mode 3401 doc: | 3402 TODO 3403 type: enum.vertex_step_mode 3404 - name: array_stride 3405 doc: | 3406 TODO 3407 type: uint64 3408 - name: attributes 3409 doc: | 3410 TODO 3411 type: array<struct.vertex_attribute> 3412 pointer: immutable 3413 - name: vertex_state 3414 doc: | 3415 TODO 3416 type: extensible 3417 members: 3418 - name: module 3419 doc: | 3420 TODO 3421 type: object.shader_module 3422 - name: entry_point 3423 doc: | 3424 TODO 3425 type: nullable_string 3426 - name: constants 3427 doc: | 3428 TODO 3429 type: array<struct.constant_entry> 3430 pointer: immutable 3431 - name: buffers 3432 doc: | 3433 TODO 3434 type: array<struct.vertex_buffer_layout> 3435 pointer: immutable 3436 callbacks: 3437 - name: buffer_map 3438 doc: | 3439 TODO 3440 style: callback_mode 3441 args: 3442 - name: status 3443 doc: | 3444 TODO 3445 type: enum.map_async_status 3446 - name: message 3447 doc: | 3448 TODO 3449 type: out_string 3450 passed_with_ownership: false 3451 - name: compilation_info 3452 doc: | 3453 TODO 3454 style: callback_mode 3455 args: 3456 - name: status 3457 doc: | 3458 TODO 3459 type: enum.compilation_info_request_status 3460 - name: compilation_info 3461 doc: | 3462 This argument contains multiple @ref ImplementationAllocatedStructChain roots. 3463 Arbitrary chains must be handled gracefully by the application! 3464 type: struct.compilation_info 3465 pointer: immutable 3466 passed_with_ownership: false 3467 - name: create_compute_pipeline_async 3468 doc: | 3469 TODO 3470 style: callback_mode 3471 args: 3472 - name: status 3473 doc: | 3474 TODO 3475 type: enum.create_pipeline_async_status 3476 - name: pipeline 3477 doc: | 3478 TODO 3479 type: object.compute_pipeline 3480 passed_with_ownership: true 3481 - name: message 3482 doc: | 3483 TODO 3484 type: out_string 3485 - name: create_render_pipeline_async 3486 doc: | 3487 TODO 3488 style: callback_mode 3489 args: 3490 - name: status 3491 doc: | 3492 TODO 3493 type: enum.create_pipeline_async_status 3494 - name: pipeline 3495 doc: | 3496 TODO 3497 type: object.render_pipeline 3498 passed_with_ownership: true 3499 - name: message 3500 doc: | 3501 TODO 3502 type: out_string 3503 - name: device_lost 3504 doc: TODO 3505 style: callback_mode 3506 args: 3507 - name: device 3508 doc: | 3509 Pointer to the device which was lost. This is always a non-null pointer. 3510 The pointed-to @ref WGPUDevice will be null if, and only if, either: 3511 (1) The `reason` is @ref WGPUDeviceLostReason_FailedCreation. 3512 (2) The last ref of the device has been (or is being) released: see @ref DeviceRelease. 3513 type: object.device 3514 pointer: immutable 3515 passed_with_ownership: false 3516 - name: reason 3517 doc: | 3518 An error code explaining why the device was lost. 3519 type: enum.device_lost_reason 3520 - name: message 3521 doc: | 3522 A @ref LocalizableHumanReadableMessageString describing why the device was lost. 3523 type: out_string 3524 passed_with_ownership: false 3525 - name: pop_error_scope 3526 doc: | 3527 TODO 3528 style: callback_mode 3529 args: 3530 - name: status 3531 doc: | 3532 See @ref WGPUPopErrorScopeStatus. 3533 type: enum.pop_error_scope_status 3534 - name: type 3535 doc: | 3536 The type of the error caught by the scope, or @ref WGPUErrorType_NoError if there was none. 3537 If the `status` is not @ref WGPUPopErrorScopeStatus_Success, this is @ref WGPUErrorType_NoError. 3538 type: enum.error_type 3539 - name: message 3540 doc: | 3541 If the `status` is not @ref WGPUPopErrorScopeStatus_Success **or** 3542 the `type` is not @ref WGPUErrorType_NoError, this is a non-empty 3543 @ref LocalizableHumanReadableMessageString; 3544 otherwise, this is an empty string. 3545 type: out_string 3546 passed_with_ownership: false 3547 - name: queue_work_done 3548 doc: | 3549 TODO 3550 style: callback_mode 3551 args: 3552 - name: status 3553 doc: | 3554 See @ref WGPUQueueWorkDoneStatus. 3555 type: enum.queue_work_done_status 3556 - name: message 3557 doc: | 3558 If the `status` is not @ref WGPUQueueWorkDoneStatus_Success, 3559 this is a non-empty @ref LocalizableHumanReadableMessageString; 3560 otherwise, this is an empty string. 3561 type: out_string 3562 passed_with_ownership: false 3563 - name: request_adapter 3564 doc: | 3565 TODO 3566 style: callback_mode 3567 args: 3568 - name: status 3569 doc: | 3570 TODO 3571 type: enum.request_adapter_status 3572 - name: adapter 3573 doc: | 3574 TODO 3575 type: object.adapter 3576 passed_with_ownership: true 3577 - name: message 3578 doc: | 3579 TODO 3580 type: out_string 3581 passed_with_ownership: false 3582 - name: request_device 3583 doc: | 3584 TODO 3585 style: callback_mode 3586 args: 3587 - name: status 3588 doc: | 3589 TODO 3590 type: enum.request_device_status 3591 - name: device 3592 doc: | 3593 TODO 3594 type: object.device 3595 passed_with_ownership: true 3596 - name: message 3597 doc: | 3598 TODO 3599 type: out_string 3600 passed_with_ownership: false 3601 - name: uncaptured_error 3602 doc: | 3603 TODO 3604 style: immediate 3605 args: 3606 - name: device 3607 doc: | 3608 TODO 3609 type: object.device 3610 pointer: immutable 3611 passed_with_ownership: false 3612 - name: type 3613 doc: | 3614 TODO 3615 type: enum.error_type 3616 - name: message 3617 doc: | 3618 TODO 3619 type: out_string 3620 passed_with_ownership: false 3621 functions: 3622 - name: create_instance 3623 doc: Create a WGPUInstance 3624 returns: 3625 doc: | 3626 TODO 3627 type: object.instance 3628 passed_with_ownership: true 3629 args: 3630 - name: descriptor 3631 doc: | 3632 TODO 3633 type: struct.instance_descriptor 3634 pointer: immutable 3635 optional: true 3636 - name: get_instance_features 3637 doc: | 3638 Get the list of @ref WGPUInstanceFeatureName values supported by the instance. 3639 args: 3640 - name: features 3641 doc: | 3642 TODO 3643 type: struct.supported_instance_features 3644 pointer: mutable 3645 passed_with_ownership: true 3646 - name: get_instance_limits 3647 doc: | 3648 Get the limits supported by the instance. 3649 returns: 3650 doc: Indicates if there was an @ref OutStructChainError. 3651 type: enum.status 3652 args: 3653 - name: limits 3654 doc: | 3655 TODO 3656 type: struct.instance_limits 3657 pointer: mutable 3658 - name: has_instance_feature 3659 doc: | 3660 Check whether a particular @ref WGPUInstanceFeatureName is supported by the instance. 3661 returns: 3662 doc: | 3663 TODO 3664 type: bool 3665 args: 3666 - name: feature 3667 doc: | 3668 TODO 3669 type: enum.instance_feature_name 3670 objects: 3671 - name: adapter 3672 doc: | 3673 TODO 3674 methods: 3675 - name: get_limits 3676 doc: | 3677 TODO 3678 returns: 3679 doc: Indicates if there was an @ref OutStructChainError. 3680 type: enum.status 3681 args: 3682 - name: limits 3683 doc: | 3684 TODO 3685 type: struct.limits 3686 pointer: mutable 3687 - name: has_feature 3688 doc: | 3689 TODO 3690 returns: 3691 doc: | 3692 TODO 3693 type: bool 3694 args: 3695 - name: feature 3696 doc: | 3697 TODO 3698 type: enum.feature_name 3699 - name: get_features 3700 doc: | 3701 Get the list of @ref WGPUFeatureName values supported by the adapter. 3702 args: 3703 - name: features 3704 doc: | 3705 TODO 3706 type: struct.supported_features 3707 pointer: mutable 3708 passed_with_ownership: true 3709 - name: get_info 3710 doc: | 3711 TODO 3712 returns: 3713 doc: Indicates if there was an @ref OutStructChainError. 3714 type: enum.status 3715 args: 3716 - name: info 3717 doc: | 3718 TODO 3719 type: struct.adapter_info 3720 pointer: mutable 3721 passed_with_ownership: true 3722 - name: request_device 3723 doc: | 3724 TODO 3725 callback: callback.request_device 3726 args: 3727 - name: descriptor 3728 doc: | 3729 TODO 3730 type: struct.device_descriptor 3731 pointer: immutable 3732 optional: true 3733 - name: bind_group 3734 doc: | 3735 TODO 3736 methods: 3737 - name: set_label 3738 doc: | 3739 TODO 3740 args: 3741 - name: label 3742 doc: | 3743 TODO 3744 type: string_with_default_empty 3745 - name: bind_group_layout 3746 doc: | 3747 TODO 3748 methods: 3749 - name: set_label 3750 doc: | 3751 TODO 3752 args: 3753 - name: label 3754 doc: | 3755 TODO 3756 type: string_with_default_empty 3757 - name: buffer 3758 doc: | 3759 TODO 3760 methods: 3761 - name: map_async 3762 doc: | 3763 TODO 3764 callback: callback.buffer_map 3765 args: 3766 - name: mode 3767 doc: | 3768 The mapping mode (read or write). 3769 type: bitflag.map_mode 3770 - name: offset 3771 doc: | 3772 Byte offset relative to beginning of the buffer. 3773 type: usize 3774 - name: size 3775 doc: | 3776 Byte size of the region to map. 3777 If this is @ref WGPU_WHOLE_MAP_SIZE, it defaults to `buffer.size - offset`. 3778 type: usize 3779 - name: get_mapped_range 3780 doc: | 3781 Returns a mutable pointer to beginning of the mapped range. 3782 See @ref MappedRangeBehavior for error conditions and guarantees. 3783 This function is safe to call inside spontaneous callbacks (see @ref CallbackReentrancy). 3784 3785 In Wasm, if `memcpy`ing into this range, prefer using @ref wgpuBufferWriteMappedRange 3786 instead for better performance. 3787 returns: 3788 doc: "" 3789 type: c_void 3790 pointer: mutable 3791 args: 3792 - name: offset 3793 doc: | 3794 Byte offset relative to the beginning of the buffer. 3795 type: usize 3796 - name: size 3797 doc: | 3798 Byte size of the range to get. 3799 If this is @ref WGPU_WHOLE_MAP_SIZE, it defaults to `buffer.size - offset`. 3800 The returned pointer is valid for exactly this many bytes. 3801 type: usize 3802 - name: get_const_mapped_range 3803 doc: | 3804 Returns a const pointer to beginning of the mapped range. 3805 It must not be written; writing to this range causes undefined behavior. 3806 See @ref MappedRangeBehavior for error conditions and guarantees. 3807 This function is safe to call inside spontaneous callbacks (see @ref CallbackReentrancy). 3808 3809 In Wasm, if `memcpy`ing from this range, prefer using @ref wgpuBufferReadMappedRange 3810 instead for better performance. 3811 returns: 3812 doc: "" 3813 type: c_void 3814 pointer: immutable 3815 args: 3816 - name: offset 3817 doc: | 3818 Byte offset relative to the beginning of the buffer. 3819 type: usize 3820 - name: size 3821 doc: | 3822 Byte size of the range to get. 3823 If this is @ref WGPU_WHOLE_MAP_SIZE, it defaults to `buffer.size - offset`. 3824 The returned pointer is valid for exactly this many bytes. 3825 type: usize 3826 - name: read_mapped_range 3827 doc: | 3828 Copies a range of data from the buffer mapping into the provided destination pointer. 3829 See @ref MappedRangeBehavior for error conditions and guarantees. 3830 This function is safe to call inside spontaneous callbacks (see @ref CallbackReentrancy). 3831 3832 In Wasm, this is more efficient than copying from a mapped range into a `malloc`'d range. 3833 returns: 3834 doc: | 3835 @ref WGPUStatus_Error if the copy did not occur. 3836 type: enum.status 3837 args: 3838 - name: offset 3839 doc: | 3840 Byte offset relative to the beginning of the buffer. 3841 type: usize 3842 - name: data 3843 doc: | 3844 Destination, to read buffer data into. 3845 type: c_void 3846 pointer: mutable 3847 - name: size 3848 doc: | 3849 Number of bytes of data to read from the buffer. 3850 (Note @ref WGPU_WHOLE_MAP_SIZE is *not* accepted here.) 3851 type: usize 3852 - name: write_mapped_range 3853 doc: | 3854 Copies a range of data from the provided source pointer into the buffer mapping. 3855 See @ref MappedRangeBehavior for error conditions and guarantees. 3856 This function is safe to call inside spontaneous callbacks (see @ref CallbackReentrancy). 3857 3858 In Wasm, this is more efficient than copying from a `malloc`'d range into a mapped range. 3859 returns: 3860 doc: | 3861 @ref WGPUStatus_Error if the copy did not occur. 3862 type: enum.status 3863 args: 3864 - name: offset 3865 doc: | 3866 Byte offset relative to the beginning of the buffer. 3867 type: usize 3868 - name: data 3869 doc: | 3870 Source, to write buffer data from. 3871 type: c_void 3872 pointer: immutable 3873 - name: size 3874 doc: | 3875 Number of bytes of data to write to the buffer. 3876 (Note @ref WGPU_WHOLE_MAP_SIZE is *not* accepted here.) 3877 type: usize 3878 - name: set_label 3879 doc: | 3880 TODO 3881 args: 3882 - name: label 3883 doc: | 3884 TODO 3885 type: string_with_default_empty 3886 - name: get_usage 3887 doc: | 3888 TODO 3889 returns: 3890 doc: | 3891 TODO 3892 type: bitflag.buffer_usage 3893 - name: get_size 3894 doc: | 3895 TODO 3896 returns: 3897 doc: | 3898 TODO 3899 type: uint64 3900 - name: get_map_state 3901 doc: | 3902 TODO 3903 returns: 3904 doc: | 3905 TODO 3906 type: enum.buffer_map_state 3907 - name: unmap 3908 doc: | 3909 TODO 3910 - name: destroy 3911 doc: | 3912 TODO 3913 - name: command_buffer 3914 doc: | 3915 TODO 3916 methods: 3917 - name: set_label 3918 doc: | 3919 TODO 3920 args: 3921 - name: label 3922 doc: | 3923 TODO 3924 type: string_with_default_empty 3925 - name: command_encoder 3926 doc: | 3927 TODO 3928 methods: 3929 - name: finish 3930 doc: | 3931 TODO 3932 returns: 3933 doc: | 3934 TODO 3935 type: object.command_buffer 3936 passed_with_ownership: true 3937 args: 3938 - name: descriptor 3939 doc: | 3940 TODO 3941 type: struct.command_buffer_descriptor 3942 pointer: immutable 3943 optional: true 3944 - name: begin_compute_pass 3945 doc: | 3946 TODO 3947 returns: 3948 doc: | 3949 TODO 3950 type: object.compute_pass_encoder 3951 passed_with_ownership: true 3952 args: 3953 - name: descriptor 3954 doc: | 3955 TODO 3956 type: struct.compute_pass_descriptor 3957 pointer: immutable 3958 optional: true 3959 - name: begin_render_pass 3960 doc: | 3961 TODO 3962 returns: 3963 doc: | 3964 TODO 3965 type: object.render_pass_encoder 3966 passed_with_ownership: true 3967 args: 3968 - name: descriptor 3969 doc: | 3970 TODO 3971 type: struct.render_pass_descriptor 3972 pointer: immutable 3973 - name: copy_buffer_to_buffer 3974 doc: | 3975 TODO 3976 args: 3977 - name: source 3978 doc: | 3979 TODO 3980 type: object.buffer 3981 - name: source_offset 3982 doc: | 3983 TODO 3984 type: uint64 3985 - name: destination 3986 doc: | 3987 TODO 3988 type: object.buffer 3989 - name: destination_offset 3990 doc: | 3991 TODO 3992 type: uint64 3993 - name: size 3994 doc: | 3995 TODO 3996 type: uint64 3997 - name: copy_buffer_to_texture 3998 doc: | 3999 TODO 4000 args: 4001 - name: source 4002 doc: | 4003 TODO 4004 type: struct.texel_copy_buffer_info 4005 pointer: immutable 4006 - name: destination 4007 doc: | 4008 TODO 4009 type: struct.texel_copy_texture_info 4010 pointer: immutable 4011 - name: copy_size 4012 doc: | 4013 TODO 4014 type: struct.extent_3D 4015 pointer: immutable 4016 - name: copy_texture_to_buffer 4017 doc: | 4018 TODO 4019 args: 4020 - name: source 4021 doc: | 4022 TODO 4023 type: struct.texel_copy_texture_info 4024 pointer: immutable 4025 - name: destination 4026 doc: | 4027 TODO 4028 type: struct.texel_copy_buffer_info 4029 pointer: immutable 4030 - name: copy_size 4031 doc: | 4032 TODO 4033 type: struct.extent_3D 4034 pointer: immutable 4035 - name: copy_texture_to_texture 4036 doc: | 4037 TODO 4038 args: 4039 - name: source 4040 doc: | 4041 TODO 4042 type: struct.texel_copy_texture_info 4043 pointer: immutable 4044 - name: destination 4045 doc: | 4046 TODO 4047 type: struct.texel_copy_texture_info 4048 pointer: immutable 4049 - name: copy_size 4050 doc: | 4051 TODO 4052 type: struct.extent_3D 4053 pointer: immutable 4054 - name: clear_buffer 4055 doc: | 4056 TODO 4057 args: 4058 - name: buffer 4059 doc: | 4060 TODO 4061 type: object.buffer 4062 - name: offset 4063 doc: | 4064 TODO 4065 type: uint64 4066 - name: size 4067 doc: | 4068 TODO 4069 type: uint64 4070 - name: insert_debug_marker 4071 doc: | 4072 TODO 4073 args: 4074 - name: marker_label 4075 doc: | 4076 TODO 4077 type: string_with_default_empty 4078 - name: pop_debug_group 4079 doc: | 4080 TODO 4081 - name: push_debug_group 4082 doc: | 4083 TODO 4084 args: 4085 - name: group_label 4086 doc: | 4087 TODO 4088 type: string_with_default_empty 4089 - name: resolve_query_set 4090 doc: | 4091 TODO 4092 args: 4093 - name: query_set 4094 doc: | 4095 TODO 4096 type: object.query_set 4097 - name: first_query 4098 doc: | 4099 TODO 4100 type: uint32 4101 - name: query_count 4102 doc: | 4103 TODO 4104 type: uint32 4105 - name: destination 4106 doc: | 4107 TODO 4108 type: object.buffer 4109 - name: destination_offset 4110 doc: | 4111 TODO 4112 type: uint64 4113 - name: write_timestamp 4114 doc: | 4115 TODO 4116 args: 4117 - name: query_set 4118 doc: | 4119 TODO 4120 type: object.query_set 4121 - name: query_index 4122 doc: | 4123 TODO 4124 type: uint32 4125 - name: set_label 4126 doc: | 4127 TODO 4128 args: 4129 - name: label 4130 doc: | 4131 TODO 4132 type: string_with_default_empty 4133 - name: compute_pass_encoder 4134 doc: | 4135 TODO 4136 methods: 4137 - name: insert_debug_marker 4138 doc: | 4139 TODO 4140 args: 4141 - name: marker_label 4142 doc: | 4143 TODO 4144 type: string_with_default_empty 4145 - name: pop_debug_group 4146 doc: | 4147 TODO 4148 - name: push_debug_group 4149 doc: | 4150 TODO 4151 args: 4152 - name: group_label 4153 doc: | 4154 TODO 4155 type: string_with_default_empty 4156 - name: set_pipeline 4157 doc: | 4158 TODO 4159 args: 4160 - name: pipeline 4161 doc: | 4162 TODO 4163 type: object.compute_pipeline 4164 - name: set_bind_group 4165 doc: | 4166 TODO 4167 args: 4168 - name: group_index 4169 doc: | 4170 TODO 4171 type: uint32 4172 - name: group 4173 doc: | 4174 TODO 4175 type: object.bind_group 4176 optional: true 4177 - name: dynamic_offsets 4178 doc: | 4179 TODO 4180 type: array<uint32> 4181 pointer: immutable 4182 - name: dispatch_workgroups 4183 doc: | 4184 TODO 4185 args: 4186 - name: workgroupCountX 4187 doc: | 4188 TODO 4189 type: uint32 4190 - name: workgroupCountY 4191 doc: | 4192 TODO 4193 type: uint32 4194 - name: workgroupCountZ 4195 doc: | 4196 TODO 4197 type: uint32 4198 - name: dispatch_workgroups_indirect 4199 doc: | 4200 TODO 4201 args: 4202 - name: indirect_buffer 4203 doc: | 4204 TODO 4205 type: object.buffer 4206 - name: indirect_offset 4207 doc: | 4208 TODO 4209 type: uint64 4210 - name: end 4211 doc: | 4212 TODO 4213 - name: set_label 4214 doc: | 4215 TODO 4216 args: 4217 - name: label 4218 doc: | 4219 TODO 4220 type: string_with_default_empty 4221 - name: compute_pipeline 4222 doc: | 4223 TODO 4224 methods: 4225 - name: get_bind_group_layout 4226 doc: | 4227 TODO 4228 returns: 4229 doc: | 4230 TODO 4231 type: object.bind_group_layout 4232 passed_with_ownership: true 4233 args: 4234 - name: group_index 4235 doc: | 4236 TODO 4237 type: uint32 4238 - name: set_label 4239 doc: | 4240 TODO 4241 args: 4242 - name: label 4243 doc: | 4244 TODO 4245 type: string_with_default_empty 4246 - name: device 4247 doc: | 4248 TODO 4249 4250 Releasing the last ref to a `WGPUDevice` also calls @ref wgpuDeviceDestroy. 4251 For more info, see @ref DeviceRelease. 4252 methods: 4253 - name: create_bind_group 4254 doc: | 4255 TODO 4256 returns: 4257 doc: | 4258 TODO 4259 type: object.bind_group 4260 passed_with_ownership: true 4261 args: 4262 - name: descriptor 4263 doc: | 4264 TODO 4265 type: struct.bind_group_descriptor 4266 pointer: immutable 4267 - name: create_bind_group_layout 4268 doc: | 4269 TODO 4270 returns: 4271 doc: | 4272 TODO 4273 type: object.bind_group_layout 4274 passed_with_ownership: true 4275 args: 4276 - name: descriptor 4277 doc: | 4278 TODO 4279 type: struct.bind_group_layout_descriptor 4280 pointer: immutable 4281 - name: create_buffer 4282 doc: | 4283 TODO 4284 4285 If @ref WGPUBufferDescriptor::mappedAtCreation is `true` and the mapping allocation fails, 4286 returns `NULL`. 4287 returns: 4288 doc: | 4289 TODO 4290 type: object.buffer 4291 optional: true 4292 passed_with_ownership: true 4293 args: 4294 - name: descriptor 4295 doc: | 4296 TODO 4297 type: struct.buffer_descriptor 4298 pointer: immutable 4299 - name: create_command_encoder 4300 doc: | 4301 TODO 4302 returns: 4303 doc: | 4304 TODO 4305 type: object.command_encoder 4306 passed_with_ownership: true 4307 args: 4308 - name: descriptor 4309 doc: | 4310 TODO 4311 type: struct.command_encoder_descriptor 4312 pointer: immutable 4313 optional: true 4314 - name: create_compute_pipeline 4315 doc: | 4316 TODO 4317 returns: 4318 doc: | 4319 TODO 4320 type: object.compute_pipeline 4321 passed_with_ownership: true 4322 args: 4323 - name: descriptor 4324 doc: | 4325 TODO 4326 type: struct.compute_pipeline_descriptor 4327 pointer: immutable 4328 - name: create_compute_pipeline_async 4329 doc: | 4330 TODO 4331 callback: callback.create_compute_pipeline_async 4332 args: 4333 - name: descriptor 4334 doc: | 4335 TODO 4336 type: struct.compute_pipeline_descriptor 4337 pointer: immutable 4338 - name: create_pipeline_layout 4339 doc: | 4340 TODO 4341 returns: 4342 doc: | 4343 TODO 4344 type: object.pipeline_layout 4345 passed_with_ownership: true 4346 args: 4347 - name: descriptor 4348 doc: | 4349 TODO 4350 type: struct.pipeline_layout_descriptor 4351 pointer: immutable 4352 - name: create_query_set 4353 doc: | 4354 TODO 4355 returns: 4356 doc: | 4357 TODO 4358 type: object.query_set 4359 passed_with_ownership: true 4360 args: 4361 - name: descriptor 4362 doc: | 4363 TODO 4364 type: struct.query_set_descriptor 4365 pointer: immutable 4366 - name: create_render_pipeline_async 4367 doc: | 4368 TODO 4369 callback: callback.create_render_pipeline_async 4370 args: 4371 - name: descriptor 4372 doc: | 4373 TODO 4374 type: struct.render_pipeline_descriptor 4375 pointer: immutable 4376 - name: create_render_bundle_encoder 4377 doc: | 4378 TODO 4379 returns: 4380 doc: | 4381 TODO 4382 type: object.render_bundle_encoder 4383 passed_with_ownership: true 4384 args: 4385 - name: descriptor 4386 doc: | 4387 TODO 4388 type: struct.render_bundle_encoder_descriptor 4389 pointer: immutable 4390 - name: create_render_pipeline 4391 doc: | 4392 TODO 4393 returns: 4394 doc: | 4395 TODO 4396 type: object.render_pipeline 4397 passed_with_ownership: true 4398 args: 4399 - name: descriptor 4400 doc: | 4401 TODO 4402 type: struct.render_pipeline_descriptor 4403 pointer: immutable 4404 - name: create_sampler 4405 doc: | 4406 TODO 4407 returns: 4408 doc: | 4409 TODO 4410 type: object.sampler 4411 passed_with_ownership: true 4412 args: 4413 - name: descriptor 4414 doc: | 4415 TODO 4416 type: struct.sampler_descriptor 4417 pointer: immutable 4418 optional: true 4419 - name: create_shader_module 4420 doc: | 4421 TODO 4422 returns: 4423 doc: | 4424 TODO 4425 type: object.shader_module 4426 passed_with_ownership: true 4427 args: 4428 - name: descriptor 4429 doc: | 4430 TODO 4431 type: struct.shader_module_descriptor 4432 pointer: immutable 4433 - name: create_texture 4434 doc: | 4435 TODO 4436 returns: 4437 doc: | 4438 TODO 4439 type: object.texture 4440 passed_with_ownership: true 4441 args: 4442 - name: descriptor 4443 doc: | 4444 TODO 4445 type: struct.texture_descriptor 4446 pointer: immutable 4447 - name: destroy 4448 doc: | 4449 TODO 4450 - name: get_lost_future 4451 doc: "" 4452 returns: 4453 doc: | 4454 The @ref WGPUFuture for the device-lost event of the device. 4455 type: struct.future 4456 - name: get_limits 4457 doc: | 4458 TODO 4459 returns: 4460 doc: Indicates if there was an @ref OutStructChainError. 4461 type: enum.status 4462 args: 4463 - name: limits 4464 doc: | 4465 TODO 4466 type: struct.limits 4467 pointer: mutable 4468 - name: has_feature 4469 doc: | 4470 TODO 4471 returns: 4472 doc: | 4473 TODO 4474 type: bool 4475 args: 4476 - name: feature 4477 doc: | 4478 TODO 4479 type: enum.feature_name 4480 - name: get_features 4481 doc: | 4482 Get the list of @ref WGPUFeatureName values supported by the device. 4483 args: 4484 - name: features 4485 doc: | 4486 TODO 4487 type: struct.supported_features 4488 pointer: mutable 4489 passed_with_ownership: true 4490 - name: get_adapter_info 4491 doc: | 4492 TODO 4493 returns: 4494 doc: Indicates if there was an @ref OutStructChainError. 4495 type: enum.status 4496 args: 4497 - name: adapter_info 4498 doc: | 4499 TODO 4500 type: struct.adapter_info 4501 pointer: mutable 4502 passed_with_ownership: true 4503 - name: get_queue 4504 doc: | 4505 TODO 4506 returns: 4507 doc: | 4508 TODO 4509 type: object.queue 4510 passed_with_ownership: true 4511 - name: push_error_scope 4512 doc: | 4513 Pushes an error scope to the current thread's error scope stack. 4514 See @ref ErrorScopes. 4515 args: 4516 - name: filter 4517 doc: | 4518 TODO 4519 type: enum.error_filter 4520 - name: pop_error_scope 4521 doc: | 4522 Pops an error scope to the current thread's error scope stack, 4523 asynchronously returning the result. See @ref ErrorScopes. 4524 callback: callback.pop_error_scope 4525 - name: set_label 4526 doc: | 4527 TODO 4528 args: 4529 - name: label 4530 doc: | 4531 TODO 4532 type: string_with_default_empty 4533 - name: external_texture 4534 doc: A sampleable 2D texture that may perform 0-copy YUV sampling internally. Creation of @ref WGPUExternalTexture is extremely implementation-dependent and not defined in this header. 4535 methods: 4536 - name: set_label 4537 doc: | 4538 TODO 4539 args: 4540 - name: label 4541 doc: | 4542 TODO 4543 type: string_with_default_empty 4544 - name: instance 4545 doc: | 4546 TODO 4547 methods: 4548 - name: create_surface 4549 doc: Creates a @ref WGPUSurface, see @ref Surface-Creation for more details. 4550 returns: 4551 doc: A new @ref WGPUSurface for this descriptor (or an error @ref WGPUSurface). 4552 type: object.surface 4553 passed_with_ownership: true 4554 args: 4555 - name: descriptor 4556 doc: The description of the @ref WGPUSurface to create. 4557 type: struct.surface_descriptor 4558 pointer: immutable 4559 - name: get_WGSL_language_features 4560 doc: | 4561 Get the list of @ref WGPUWGSLLanguageFeatureName values supported by the instance. 4562 args: 4563 - name: features 4564 doc: | 4565 TODO 4566 type: struct.supported_WGSL_language_features 4567 pointer: mutable 4568 - name: has_WGSL_language_feature 4569 doc: | 4570 TODO 4571 returns: 4572 doc: | 4573 TODO 4574 type: bool 4575 args: 4576 - name: feature 4577 doc: | 4578 TODO 4579 type: enum.WGSL_language_feature_name 4580 - name: process_events 4581 doc: | 4582 Processes asynchronous events on this `WGPUInstance`, calling any callbacks for asynchronous operations created with @ref WGPUCallbackMode_AllowProcessEvents. 4583 4584 See @ref Process-Events for more information. 4585 - name: request_adapter 4586 doc: | 4587 TODO 4588 callback: callback.request_adapter 4589 args: 4590 - name: options 4591 doc: | 4592 TODO 4593 type: struct.request_adapter_options 4594 pointer: immutable 4595 optional: true 4596 - name: wait_any 4597 doc: | 4598 Wait for at least one WGPUFuture in `futures` to complete, and call callbacks of the respective completed asynchronous operations. 4599 4600 See @ref Wait-Any for more information. 4601 returns: 4602 doc: | 4603 TODO 4604 type: enum.wait_status 4605 args: 4606 - name: future_count 4607 doc: | 4608 TODO 4609 type: usize 4610 - name: futures 4611 doc: | 4612 TODO 4613 type: struct.future_wait_info 4614 pointer: mutable 4615 optional: true 4616 - name: timeout_NS 4617 doc: | 4618 TODO 4619 type: uint64 4620 - name: pipeline_layout 4621 doc: | 4622 TODO 4623 methods: 4624 - name: set_label 4625 doc: | 4626 TODO 4627 args: 4628 - name: label 4629 doc: | 4630 TODO 4631 type: string_with_default_empty 4632 - name: query_set 4633 doc: | 4634 TODO 4635 methods: 4636 - name: set_label 4637 doc: | 4638 TODO 4639 args: 4640 - name: label 4641 doc: | 4642 TODO 4643 type: string_with_default_empty 4644 - name: get_type 4645 doc: | 4646 TODO 4647 returns: 4648 doc: | 4649 TODO 4650 type: enum.query_type 4651 - name: get_count 4652 doc: | 4653 TODO 4654 returns: 4655 doc: | 4656 TODO 4657 type: uint32 4658 - name: destroy 4659 doc: | 4660 TODO 4661 - name: queue 4662 doc: | 4663 TODO 4664 methods: 4665 - name: submit 4666 doc: | 4667 TODO 4668 args: 4669 - name: commands 4670 doc: | 4671 TODO 4672 type: array<object.command_buffer> 4673 pointer: immutable 4674 - name: on_submitted_work_done 4675 doc: | 4676 TODO 4677 callback: callback.queue_work_done 4678 - name: write_buffer 4679 doc: | 4680 Produces a @ref DeviceError both content-timeline (`size` alignment) and device-timeline 4681 errors defined by the WebGPU specification. 4682 args: 4683 - name: buffer 4684 doc: | 4685 TODO 4686 type: object.buffer 4687 - name: buffer_offset 4688 doc: | 4689 TODO 4690 type: uint64 4691 - name: data 4692 doc: | 4693 TODO 4694 type: c_void 4695 pointer: immutable 4696 - name: size 4697 doc: | 4698 TODO 4699 type: usize 4700 - name: write_texture 4701 doc: | 4702 TODO 4703 args: 4704 - name: destination 4705 doc: | 4706 TODO 4707 type: struct.texel_copy_texture_info 4708 pointer: immutable 4709 - name: data 4710 doc: | 4711 TODO 4712 type: c_void 4713 pointer: immutable 4714 - name: data_size 4715 doc: | 4716 TODO 4717 type: usize 4718 - name: data_layout 4719 doc: | 4720 TODO 4721 type: struct.texel_copy_buffer_layout 4722 pointer: immutable 4723 - name: write_size 4724 doc: | 4725 TODO 4726 type: struct.extent_3D 4727 pointer: immutable 4728 - name: set_label 4729 doc: | 4730 TODO 4731 args: 4732 - name: label 4733 doc: | 4734 TODO 4735 type: string_with_default_empty 4736 - name: render_bundle 4737 doc: | 4738 TODO 4739 methods: 4740 - name: set_label 4741 doc: | 4742 TODO 4743 args: 4744 - name: label 4745 doc: | 4746 TODO 4747 type: string_with_default_empty 4748 - name: render_bundle_encoder 4749 doc: | 4750 TODO 4751 methods: 4752 - name: set_pipeline 4753 doc: | 4754 TODO 4755 args: 4756 - name: pipeline 4757 doc: | 4758 TODO 4759 type: object.render_pipeline 4760 - name: set_bind_group 4761 doc: | 4762 TODO 4763 args: 4764 - name: group_index 4765 doc: | 4766 TODO 4767 type: uint32 4768 - name: group 4769 doc: | 4770 TODO 4771 type: object.bind_group 4772 optional: true 4773 - name: dynamic_offsets 4774 doc: | 4775 TODO 4776 type: array<uint32> 4777 pointer: immutable 4778 - name: draw 4779 doc: | 4780 TODO 4781 args: 4782 - name: vertex_count 4783 doc: | 4784 TODO 4785 type: uint32 4786 - name: instance_count 4787 doc: | 4788 TODO 4789 type: uint32 4790 - name: first_vertex 4791 doc: | 4792 TODO 4793 type: uint32 4794 - name: first_instance 4795 doc: | 4796 TODO 4797 type: uint32 4798 - name: draw_indexed 4799 doc: | 4800 TODO 4801 args: 4802 - name: index_count 4803 doc: | 4804 TODO 4805 type: uint32 4806 - name: instance_count 4807 doc: | 4808 TODO 4809 type: uint32 4810 - name: first_index 4811 doc: | 4812 TODO 4813 type: uint32 4814 - name: base_vertex 4815 doc: | 4816 TODO 4817 type: int32 4818 - name: first_instance 4819 doc: | 4820 TODO 4821 type: uint32 4822 - name: draw_indirect 4823 doc: | 4824 TODO 4825 args: 4826 - name: indirect_buffer 4827 doc: | 4828 TODO 4829 type: object.buffer 4830 - name: indirect_offset 4831 doc: | 4832 TODO 4833 type: uint64 4834 - name: draw_indexed_indirect 4835 doc: | 4836 TODO 4837 args: 4838 - name: indirect_buffer 4839 doc: | 4840 TODO 4841 type: object.buffer 4842 - name: indirect_offset 4843 doc: | 4844 TODO 4845 type: uint64 4846 - name: insert_debug_marker 4847 doc: | 4848 TODO 4849 args: 4850 - name: marker_label 4851 doc: | 4852 TODO 4853 type: string_with_default_empty 4854 - name: pop_debug_group 4855 doc: | 4856 TODO 4857 - name: push_debug_group 4858 doc: | 4859 TODO 4860 args: 4861 - name: group_label 4862 doc: | 4863 TODO 4864 type: string_with_default_empty 4865 - name: set_vertex_buffer 4866 doc: | 4867 TODO 4868 args: 4869 - name: slot 4870 doc: | 4871 TODO 4872 type: uint32 4873 - name: buffer 4874 doc: | 4875 TODO 4876 type: object.buffer 4877 optional: true 4878 - name: offset 4879 doc: | 4880 TODO 4881 type: uint64 4882 - name: size 4883 doc: | 4884 TODO 4885 type: uint64 4886 - name: set_index_buffer 4887 doc: | 4888 TODO 4889 args: 4890 - name: buffer 4891 doc: | 4892 TODO 4893 type: object.buffer 4894 - name: format 4895 doc: | 4896 TODO 4897 type: enum.index_format 4898 - name: offset 4899 doc: | 4900 TODO 4901 type: uint64 4902 - name: size 4903 doc: | 4904 TODO 4905 type: uint64 4906 - name: finish 4907 doc: | 4908 TODO 4909 returns: 4910 doc: | 4911 TODO 4912 type: object.render_bundle 4913 passed_with_ownership: true 4914 args: 4915 - name: descriptor 4916 doc: | 4917 TODO 4918 type: struct.render_bundle_descriptor 4919 pointer: immutable 4920 optional: true 4921 - name: set_label 4922 doc: | 4923 TODO 4924 args: 4925 - name: label 4926 doc: | 4927 TODO 4928 type: string_with_default_empty 4929 - name: render_pass_encoder 4930 doc: | 4931 TODO 4932 methods: 4933 - name: set_pipeline 4934 doc: | 4935 TODO 4936 args: 4937 - name: pipeline 4938 doc: | 4939 TODO 4940 type: object.render_pipeline 4941 - name: set_bind_group 4942 doc: | 4943 TODO 4944 args: 4945 - name: group_index 4946 doc: | 4947 TODO 4948 type: uint32 4949 - name: group 4950 doc: | 4951 TODO 4952 type: object.bind_group 4953 optional: true 4954 - name: dynamic_offsets 4955 doc: | 4956 TODO 4957 type: array<uint32> 4958 pointer: immutable 4959 - name: draw 4960 doc: | 4961 TODO 4962 args: 4963 - name: vertex_count 4964 doc: | 4965 TODO 4966 type: uint32 4967 - name: instance_count 4968 doc: | 4969 TODO 4970 type: uint32 4971 - name: first_vertex 4972 doc: | 4973 TODO 4974 type: uint32 4975 - name: first_instance 4976 doc: | 4977 TODO 4978 type: uint32 4979 - name: draw_indexed 4980 doc: | 4981 TODO 4982 args: 4983 - name: index_count 4984 doc: | 4985 TODO 4986 type: uint32 4987 - name: instance_count 4988 doc: | 4989 TODO 4990 type: uint32 4991 - name: first_index 4992 doc: | 4993 TODO 4994 type: uint32 4995 - name: base_vertex 4996 doc: | 4997 TODO 4998 type: int32 4999 - name: first_instance 5000 doc: | 5001 TODO 5002 type: uint32 5003 - name: draw_indirect 5004 doc: | 5005 TODO 5006 args: 5007 - name: indirect_buffer 5008 doc: | 5009 TODO 5010 type: object.buffer 5011 - name: indirect_offset 5012 doc: | 5013 TODO 5014 type: uint64 5015 - name: draw_indexed_indirect 5016 doc: | 5017 TODO 5018 args: 5019 - name: indirect_buffer 5020 doc: | 5021 TODO 5022 type: object.buffer 5023 - name: indirect_offset 5024 doc: | 5025 TODO 5026 type: uint64 5027 - name: execute_bundles 5028 doc: | 5029 TODO 5030 args: 5031 - name: bundles 5032 doc: | 5033 TODO 5034 type: array<object.render_bundle> 5035 pointer: immutable 5036 - name: insert_debug_marker 5037 doc: | 5038 TODO 5039 args: 5040 - name: marker_label 5041 doc: | 5042 TODO 5043 type: string_with_default_empty 5044 - name: pop_debug_group 5045 doc: | 5046 TODO 5047 - name: push_debug_group 5048 doc: | 5049 TODO 5050 args: 5051 - name: group_label 5052 doc: | 5053 TODO 5054 type: string_with_default_empty 5055 - name: set_stencil_reference 5056 doc: | 5057 TODO 5058 args: 5059 - name: reference 5060 doc: | 5061 TODO 5062 type: uint32 5063 - name: set_blend_constant 5064 doc: | 5065 TODO 5066 args: 5067 - name: color 5068 doc: | 5069 The RGBA blend constant. Represents an `f32` color using @ref DoubleAsSupertype. 5070 type: struct.color 5071 pointer: immutable 5072 - name: set_viewport 5073 doc: | 5074 TODO 5075 5076 If any argument is non-finite, produces a @ref NonFiniteFloatValueError. 5077 args: 5078 - name: x 5079 doc: | 5080 TODO 5081 type: float32 5082 - name: y 5083 doc: | 5084 TODO 5085 type: float32 5086 - name: width 5087 doc: | 5088 TODO 5089 type: float32 5090 - name: height 5091 doc: | 5092 TODO 5093 type: float32 5094 - name: min_depth 5095 doc: | 5096 TODO 5097 type: float32 5098 - name: max_depth 5099 doc: | 5100 TODO 5101 type: float32 5102 - name: set_scissor_rect 5103 doc: | 5104 TODO 5105 args: 5106 - name: x 5107 doc: | 5108 TODO 5109 type: uint32 5110 - name: y 5111 doc: | 5112 TODO 5113 type: uint32 5114 - name: width 5115 doc: | 5116 TODO 5117 type: uint32 5118 - name: height 5119 doc: | 5120 TODO 5121 type: uint32 5122 - name: set_vertex_buffer 5123 doc: | 5124 TODO 5125 args: 5126 - name: slot 5127 doc: | 5128 TODO 5129 type: uint32 5130 - name: buffer 5131 doc: | 5132 TODO 5133 type: object.buffer 5134 optional: true 5135 - name: offset 5136 doc: | 5137 TODO 5138 type: uint64 5139 - name: size 5140 doc: | 5141 TODO 5142 type: uint64 5143 - name: set_index_buffer 5144 doc: | 5145 TODO 5146 args: 5147 - name: buffer 5148 doc: | 5149 TODO 5150 type: object.buffer 5151 - name: format 5152 doc: | 5153 TODO 5154 type: enum.index_format 5155 - name: offset 5156 doc: | 5157 TODO 5158 type: uint64 5159 - name: size 5160 doc: | 5161 TODO 5162 type: uint64 5163 - name: begin_occlusion_query 5164 doc: | 5165 TODO 5166 args: 5167 - name: query_index 5168 doc: | 5169 TODO 5170 type: uint32 5171 - name: end_occlusion_query 5172 doc: | 5173 TODO 5174 - name: end 5175 doc: | 5176 TODO 5177 - name: set_label 5178 doc: | 5179 TODO 5180 args: 5181 - name: label 5182 doc: | 5183 TODO 5184 type: string_with_default_empty 5185 - name: render_pipeline 5186 doc: | 5187 TODO 5188 methods: 5189 - name: get_bind_group_layout 5190 doc: | 5191 TODO 5192 returns: 5193 doc: | 5194 TODO 5195 type: object.bind_group_layout 5196 passed_with_ownership: true 5197 args: 5198 - name: group_index 5199 doc: | 5200 TODO 5201 type: uint32 5202 - name: set_label 5203 doc: | 5204 TODO 5205 args: 5206 - name: label 5207 doc: | 5208 TODO 5209 type: string_with_default_empty 5210 - name: sampler 5211 doc: | 5212 TODO 5213 methods: 5214 - name: set_label 5215 doc: | 5216 TODO 5217 args: 5218 - name: label 5219 doc: | 5220 TODO 5221 type: string_with_default_empty 5222 - name: shader_module 5223 doc: | 5224 TODO 5225 methods: 5226 - name: get_compilation_info 5227 doc: | 5228 TODO 5229 callback: callback.compilation_info 5230 - name: set_label 5231 doc: | 5232 TODO 5233 args: 5234 - name: label 5235 doc: | 5236 TODO 5237 type: string_with_default_empty 5238 - name: surface 5239 doc: An object used to continuously present image data to the user, see @ref Surfaces for more details. 5240 methods: 5241 - name: configure 5242 doc: | 5243 Configures parameters for rendering to `surface`. 5244 Produces a @ref DeviceError for all content-timeline errors defined by the WebGPU specification. 5245 5246 See @ref Surface-Configuration for more details. 5247 args: 5248 - name: config 5249 doc: The new configuration to use. 5250 type: struct.surface_configuration 5251 pointer: immutable 5252 - name: get_capabilities 5253 doc: | 5254 Provides information on how `adapter` is able to use `surface`. 5255 See @ref Surface-Capabilities for more details. 5256 returns: 5257 doc: Indicates if there was an @ref OutStructChainError. 5258 type: enum.status 5259 args: 5260 - name: adapter 5261 doc: The @ref WGPUAdapter to get capabilities for presenting to this @ref WGPUSurface. 5262 type: object.adapter 5263 - name: capabilities 5264 doc: | 5265 The structure to fill capabilities in. 5266 It may contain memory allocations so @ref wgpuSurfaceCapabilitiesFreeMembers must be called to avoid memory leaks. 5267 type: struct.surface_capabilities 5268 pointer: mutable 5269 passed_with_ownership: true 5270 - name: get_current_texture 5271 doc: | 5272 Returns the @ref WGPUTexture to render to `surface` this frame along with metadata on the frame. 5273 Returns `NULL` and @ref WGPUSurfaceGetCurrentTextureStatus_Error if the surface is not configured. 5274 5275 See @ref Surface-Presenting for more details. 5276 args: 5277 - name: surface_texture 5278 doc: The structure to fill the @ref WGPUTexture and metadata in. 5279 type: struct.surface_texture 5280 pointer: mutable 5281 - name: present 5282 doc: | 5283 Shows `surface`'s current texture to the user. 5284 See @ref Surface-Presenting for more details. 5285 returns: 5286 doc: | 5287 Returns @ref WGPUStatus_Error if the surface doesn't have a current texture. 5288 type: enum.status 5289 - name: unconfigure 5290 doc: | 5291 Removes the configuration for `surface`. 5292 See @ref Surface-Configuration for more details. 5293 - name: set_label 5294 doc: Modifies the label used to refer to `surface`. 5295 args: 5296 - name: label 5297 doc: The new label. 5298 type: string_with_default_empty 5299 - name: texture 5300 doc: | 5301 TODO 5302 methods: 5303 - name: create_view 5304 doc: | 5305 TODO 5306 returns: 5307 doc: | 5308 TODO 5309 type: object.texture_view 5310 passed_with_ownership: true 5311 args: 5312 - name: descriptor 5313 doc: | 5314 TODO 5315 type: struct.texture_view_descriptor 5316 pointer: immutable 5317 optional: true 5318 - name: set_label 5319 doc: | 5320 TODO 5321 args: 5322 - name: label 5323 doc: | 5324 TODO 5325 type: string_with_default_empty 5326 - name: get_width 5327 doc: | 5328 TODO 5329 returns: 5330 doc: | 5331 TODO 5332 type: uint32 5333 - name: get_height 5334 doc: | 5335 TODO 5336 returns: 5337 doc: | 5338 TODO 5339 type: uint32 5340 - name: get_depth_or_array_layers 5341 doc: | 5342 TODO 5343 returns: 5344 doc: | 5345 TODO 5346 type: uint32 5347 - name: get_mip_level_count 5348 doc: | 5349 TODO 5350 returns: 5351 doc: | 5352 TODO 5353 type: uint32 5354 - name: get_sample_count 5355 doc: | 5356 TODO 5357 returns: 5358 doc: | 5359 TODO 5360 type: uint32 5361 - name: get_dimension 5362 doc: | 5363 TODO 5364 returns: 5365 doc: | 5366 TODO 5367 type: enum.texture_dimension 5368 - name: get_texture_binding_view_dimension 5369 doc: | 5370 TODO 5371 returns: 5372 doc: | 5373 TODO 5374 type: enum.texture_view_dimension 5375 - name: get_format 5376 doc: | 5377 TODO 5378 returns: 5379 doc: | 5380 TODO 5381 type: enum.texture_format 5382 - name: get_usage 5383 doc: | 5384 TODO 5385 returns: 5386 doc: | 5387 TODO 5388 type: bitflag.texture_usage 5389 - name: destroy 5390 doc: | 5391 TODO 5392 - name: texture_view 5393 doc: | 5394 TODO 5395 methods: 5396 - name: set_label 5397 doc: | 5398 TODO 5399 args: 5400 - name: label 5401 doc: | 5402 TODO 5403 type: string_with_default_empty