@@ -665,257 +665,337 @@ typedef struct {
665
665
uint32_t array_layer_count ;
666
666
} WGPUTextureViewDescriptor ;
667
667
668
- #if ! defined(WGPU_REMOTE )
668
+ #if defined(WGPU_LOCAL )
669
669
WGPUDeviceId wgpu_adapter_request_device (WGPUAdapterId adapter_id ,
670
670
const WGPUDeviceDescriptor * desc );
671
671
#endif
672
672
673
+ #if defined(WGPU_LOCAL )
673
674
void wgpu_bind_group_destroy (WGPUBindGroupId bind_group_id );
675
+ #endif
674
676
677
+ #if defined(WGPU_LOCAL )
675
678
void wgpu_buffer_destroy (WGPUBufferId buffer_id );
679
+ #endif
676
680
681
+ #if defined(WGPU_LOCAL )
677
682
void wgpu_buffer_map_read_async (WGPUBufferId buffer_id ,
678
683
WGPUBufferAddress start ,
679
684
WGPUBufferAddress size ,
680
685
WGPUBufferMapReadCallback callback ,
681
686
uint8_t * userdata );
687
+ #endif
682
688
689
+ #if defined(WGPU_LOCAL )
683
690
void wgpu_buffer_map_write_async (WGPUBufferId buffer_id ,
684
691
WGPUBufferAddress start ,
685
692
WGPUBufferAddress size ,
686
693
WGPUBufferMapWriteCallback callback ,
687
694
uint8_t * userdata );
695
+ #endif
688
696
697
+ #if defined(WGPU_LOCAL )
689
698
void wgpu_buffer_unmap (WGPUBufferId buffer_id );
699
+ #endif
690
700
691
- #if ! defined(WGPU_REMOTE )
701
+ #if defined(WGPU_LOCAL )
692
702
WGPUComputePassId wgpu_command_encoder_begin_compute_pass (WGPUCommandEncoderId encoder_id ,
693
703
const WGPUComputePassDescriptor * desc );
694
704
#endif
695
705
696
- #if ! defined(WGPU_REMOTE )
706
+ #if defined(WGPU_LOCAL )
697
707
WGPURenderPassId wgpu_command_encoder_begin_render_pass (WGPUCommandEncoderId encoder_id ,
698
708
const WGPURenderPassDescriptor * desc );
699
709
#endif
700
710
711
+ #if defined(WGPU_LOCAL )
701
712
void wgpu_command_encoder_copy_buffer_to_buffer (WGPUCommandEncoderId command_encoder_id ,
702
713
WGPUBufferId source ,
703
714
WGPUBufferAddress source_offset ,
704
715
WGPUBufferId destination ,
705
716
WGPUBufferAddress destination_offset ,
706
717
WGPUBufferAddress size );
718
+ #endif
707
719
720
+ #if defined(WGPU_LOCAL )
708
721
void wgpu_command_encoder_copy_buffer_to_texture (WGPUCommandEncoderId command_encoder_id ,
709
722
const WGPUBufferCopyView * source ,
710
723
const WGPUTextureCopyView * destination ,
711
724
WGPUExtent3d copy_size );
725
+ #endif
712
726
727
+ #if defined(WGPU_LOCAL )
713
728
void wgpu_command_encoder_copy_texture_to_buffer (WGPUCommandEncoderId command_encoder_id ,
714
729
const WGPUTextureCopyView * source ,
715
730
const WGPUBufferCopyView * destination ,
716
731
WGPUExtent3d copy_size );
732
+ #endif
717
733
734
+ #if defined(WGPU_LOCAL )
718
735
void wgpu_command_encoder_copy_texture_to_texture (WGPUCommandEncoderId command_encoder_id ,
719
736
const WGPUTextureCopyView * source ,
720
737
const WGPUTextureCopyView * destination ,
721
738
WGPUExtent3d copy_size );
739
+ #endif
722
740
741
+ #if defined(WGPU_LOCAL )
723
742
WGPUCommandBufferId wgpu_command_encoder_finish (WGPUCommandEncoderId encoder_id ,
724
743
const WGPUCommandBufferDescriptor * desc );
744
+ #endif
725
745
746
+ #if defined(WGPU_LOCAL )
726
747
void wgpu_compute_pass_dispatch (WGPUComputePassId pass_id , uint32_t x , uint32_t y , uint32_t z );
748
+ #endif
727
749
750
+ #if defined(WGPU_LOCAL )
728
751
void wgpu_compute_pass_dispatch_indirect (WGPUComputePassId pass_id ,
729
752
WGPUBufferId indirect_buffer_id ,
730
753
WGPUBufferAddress indirect_offset );
754
+ #endif
731
755
756
+ #if defined(WGPU_LOCAL )
732
757
void wgpu_compute_pass_end_pass (WGPUComputePassId pass_id );
758
+ #endif
733
759
734
760
void wgpu_compute_pass_insert_debug_marker (WGPUComputePassId _pass_id , WGPURawString _label );
735
761
736
762
void wgpu_compute_pass_pop_debug_group (WGPUComputePassId _pass_id );
737
763
738
764
void wgpu_compute_pass_push_debug_group (WGPUComputePassId _pass_id , WGPURawString _label );
739
765
766
+ #if defined(WGPU_LOCAL )
740
767
void wgpu_compute_pass_set_bind_group (WGPUComputePassId pass_id ,
741
768
uint32_t index ,
742
769
WGPUBindGroupId bind_group_id ,
743
770
const WGPUBufferAddress * offsets ,
744
771
uintptr_t offsets_length );
772
+ #endif
745
773
774
+ #if defined(WGPU_LOCAL )
746
775
void wgpu_compute_pass_set_pipeline (WGPUComputePassId pass_id , WGPUComputePipelineId pipeline_id );
776
+ #endif
747
777
748
- #if ! defined(WGPU_REMOTE )
778
+ #if defined(WGPU_LOCAL )
749
779
WGPUSurfaceId wgpu_create_surface_from_metal_layer (void * layer );
750
780
#endif
751
781
752
- #if ! defined(WGPU_REMOTE )
782
+ #if defined(WGPU_LOCAL )
753
783
WGPUSurfaceId wgpu_create_surface_from_windows_hwnd (void * _hinstance , void * hwnd );
754
784
#endif
755
785
756
- #if ! defined(WGPU_REMOTE )
786
+ #if defined(WGPU_LOCAL )
757
787
WGPUSurfaceId wgpu_create_surface_from_xlib (const void * * display , uint64_t window );
758
788
#endif
759
789
760
- #if ! defined(WGPU_REMOTE )
790
+ #if defined(WGPU_LOCAL )
761
791
WGPUBindGroupId wgpu_device_create_bind_group (WGPUDeviceId device_id ,
762
792
const WGPUBindGroupDescriptor * desc );
763
793
#endif
764
794
765
- #if ! defined(WGPU_REMOTE )
795
+ #if defined(WGPU_LOCAL )
766
796
WGPUBindGroupLayoutId wgpu_device_create_bind_group_layout (WGPUDeviceId device_id ,
767
797
const WGPUBindGroupLayoutDescriptor * desc );
768
798
#endif
769
799
770
- #if ! defined(WGPU_REMOTE )
800
+ #if defined(WGPU_LOCAL )
771
801
WGPUBufferId wgpu_device_create_buffer (WGPUDeviceId device_id , const WGPUBufferDescriptor * desc );
772
802
#endif
773
803
774
- #if ! defined(WGPU_REMOTE )
804
+ #if defined(WGPU_LOCAL )
775
805
WGPUBufferId wgpu_device_create_buffer_mapped (WGPUDeviceId device_id ,
776
806
const WGPUBufferDescriptor * desc ,
777
807
uint8_t * * mapped_ptr_out );
778
808
#endif
779
809
780
- #if ! defined(WGPU_REMOTE )
810
+ #if defined(WGPU_LOCAL )
781
811
WGPUCommandEncoderId wgpu_device_create_command_encoder (WGPUDeviceId device_id ,
782
812
const WGPUCommandEncoderDescriptor * desc );
783
813
#endif
784
814
785
- #if ! defined(WGPU_REMOTE )
815
+ #if defined(WGPU_LOCAL )
786
816
WGPUComputePipelineId wgpu_device_create_compute_pipeline (WGPUDeviceId device_id ,
787
817
const WGPUComputePipelineDescriptor * desc );
788
818
#endif
789
819
790
- #if ! defined(WGPU_REMOTE )
820
+ #if defined(WGPU_LOCAL )
791
821
WGPUPipelineLayoutId wgpu_device_create_pipeline_layout (WGPUDeviceId device_id ,
792
822
const WGPUPipelineLayoutDescriptor * desc );
793
823
#endif
794
824
795
- #if ! defined(WGPU_REMOTE )
825
+ #if defined(WGPU_LOCAL )
796
826
WGPURenderPipelineId wgpu_device_create_render_pipeline (WGPUDeviceId device_id ,
797
827
const WGPURenderPipelineDescriptor * desc );
798
828
#endif
799
829
800
- #if ! defined(WGPU_REMOTE )
830
+ #if defined(WGPU_LOCAL )
801
831
WGPUSamplerId wgpu_device_create_sampler (WGPUDeviceId device_id , const WGPUSamplerDescriptor * desc );
802
832
#endif
803
833
804
- #if ! defined(WGPU_REMOTE )
834
+ #if defined(WGPU_LOCAL )
805
835
WGPUShaderModuleId wgpu_device_create_shader_module (WGPUDeviceId device_id ,
806
836
const WGPUShaderModuleDescriptor * desc );
807
837
#endif
808
838
809
- #if ! defined(WGPU_REMOTE )
839
+ #if defined(WGPU_LOCAL )
810
840
WGPUSwapChainId wgpu_device_create_swap_chain (WGPUDeviceId device_id ,
811
841
WGPUSurfaceId surface_id ,
812
842
const WGPUSwapChainDescriptor * desc );
813
843
#endif
814
844
815
- #if ! defined(WGPU_REMOTE )
845
+ #if defined(WGPU_LOCAL )
816
846
WGPUTextureId wgpu_device_create_texture (WGPUDeviceId device_id , const WGPUTextureDescriptor * desc );
817
847
#endif
818
848
849
+ #if defined(WGPU_LOCAL )
819
850
void wgpu_device_destroy (WGPUDeviceId device_id );
851
+ #endif
820
852
821
- #if ! defined(WGPU_REMOTE )
853
+ #if defined(WGPU_LOCAL )
822
854
void wgpu_device_get_limits (WGPUDeviceId _device_id , WGPULimits * limits );
823
855
#endif
824
856
857
+ #if defined(WGPU_LOCAL )
825
858
WGPUQueueId wgpu_device_get_queue (WGPUDeviceId device_id );
859
+ #endif
826
860
861
+ #if defined(WGPU_LOCAL )
827
862
void wgpu_device_poll (WGPUDeviceId device_id , bool force_wait );
863
+ #endif
828
864
865
+ #if defined(WGPU_LOCAL )
829
866
void wgpu_queue_submit (WGPUQueueId queue_id ,
830
867
const WGPUCommandBufferId * command_buffers ,
831
868
uintptr_t command_buffers_length );
869
+ #endif
832
870
871
+ #if defined(WGPU_LOCAL )
833
872
void wgpu_render_pass_draw (WGPURenderPassId pass_id ,
834
873
uint32_t vertex_count ,
835
874
uint32_t instance_count ,
836
875
uint32_t first_vertex ,
837
876
uint32_t first_instance );
877
+ #endif
838
878
879
+ #if defined(WGPU_LOCAL )
839
880
void wgpu_render_pass_draw_indexed (WGPURenderPassId pass_id ,
840
881
uint32_t index_count ,
841
882
uint32_t instance_count ,
842
883
uint32_t first_index ,
843
884
int32_t base_vertex ,
844
885
uint32_t first_instance );
886
+ #endif
845
887
888
+ #if defined(WGPU_LOCAL )
846
889
void wgpu_render_pass_draw_indexed_indirect (WGPURenderPassId pass_id ,
847
890
WGPUBufferId indirect_buffer_id ,
848
891
WGPUBufferAddress indirect_offset );
892
+ #endif
849
893
894
+ #if defined(WGPU_LOCAL )
850
895
void wgpu_render_pass_draw_indirect (WGPURenderPassId pass_id ,
851
896
WGPUBufferId indirect_buffer_id ,
852
897
WGPUBufferAddress indirect_offset );
898
+ #endif
853
899
900
+ #if defined(WGPU_LOCAL )
854
901
void wgpu_render_pass_end_pass (WGPURenderPassId pass_id );
902
+ #endif
855
903
904
+ #if defined(WGPU_LOCAL )
856
905
void wgpu_render_pass_execute_bundles (WGPURenderPassId _pass_id ,
857
906
const WGPURenderBundleId * _bundles ,
858
907
uintptr_t _bundles_length );
908
+ #endif
859
909
910
+ #if defined(WGPU_LOCAL )
860
911
void wgpu_render_pass_insert_debug_marker (WGPURenderPassId _pass_id , WGPURawString _label );
912
+ #endif
861
913
914
+ #if defined(WGPU_LOCAL )
862
915
void wgpu_render_pass_pop_debug_group (WGPURenderPassId _pass_id );
916
+ #endif
863
917
918
+ #if defined(WGPU_LOCAL )
864
919
void wgpu_render_pass_push_debug_group (WGPURenderPassId _pass_id , WGPURawString _label );
920
+ #endif
865
921
922
+ #if defined(WGPU_LOCAL )
866
923
void wgpu_render_pass_set_bind_group (WGPURenderPassId pass_id ,
867
924
uint32_t index ,
868
925
WGPUBindGroupId bind_group_id ,
869
926
const WGPUBufferAddress * offsets ,
870
927
uintptr_t offsets_length );
928
+ #endif
871
929
930
+ #if defined(WGPU_LOCAL )
872
931
void wgpu_render_pass_set_blend_color (WGPURenderPassId pass_id , const WGPUColor * color );
932
+ #endif
873
933
934
+ #if defined(WGPU_LOCAL )
874
935
void wgpu_render_pass_set_index_buffer (WGPURenderPassId pass_id ,
875
936
WGPUBufferId buffer_id ,
876
937
WGPUBufferAddress offset );
938
+ #endif
877
939
940
+ #if defined(WGPU_LOCAL )
878
941
void wgpu_render_pass_set_pipeline (WGPURenderPassId pass_id , WGPURenderPipelineId pipeline_id );
942
+ #endif
879
943
944
+ #if defined(WGPU_LOCAL )
880
945
void wgpu_render_pass_set_scissor_rect (WGPURenderPassId pass_id ,
881
946
uint32_t x ,
882
947
uint32_t y ,
883
948
uint32_t w ,
884
949
uint32_t h );
950
+ #endif
885
951
952
+ #if defined(WGPU_LOCAL )
886
953
void wgpu_render_pass_set_stencil_reference (WGPURenderPassId pass_id , uint32_t value );
954
+ #endif
887
955
956
+ #if defined(WGPU_LOCAL )
888
957
void wgpu_render_pass_set_vertex_buffers (WGPURenderPassId pass_id ,
889
958
uint32_t start_slot ,
890
959
const WGPUBufferId * buffers ,
891
960
const WGPUBufferAddress * offsets ,
892
961
uintptr_t length );
962
+ #endif
893
963
964
+ #if defined(WGPU_LOCAL )
894
965
void wgpu_render_pass_set_viewport (WGPURenderPassId pass_id ,
895
966
float x ,
896
967
float y ,
897
968
float w ,
898
969
float h ,
899
970
float min_depth ,
900
971
float max_depth );
972
+ #endif
901
973
902
- #if ! defined(WGPU_REMOTE )
974
+ #if defined(WGPU_LOCAL )
903
975
WGPUAdapterId wgpu_request_adapter (const WGPURequestAdapterOptions * desc );
904
976
#endif
905
977
978
+ #if defined(WGPU_LOCAL )
906
979
void wgpu_sampler_destroy (WGPUSamplerId sampler_id );
980
+ #endif
907
981
908
- #if ! defined(WGPU_REMOTE )
982
+ #if defined(WGPU_LOCAL )
909
983
WGPUSwapChainOutput wgpu_swap_chain_get_next_texture (WGPUSwapChainId swap_chain_id );
910
984
#endif
911
985
986
+ #if defined(WGPU_LOCAL )
912
987
void wgpu_swap_chain_present (WGPUSwapChainId swap_chain_id );
988
+ #endif
913
989
914
- #if ! defined(WGPU_REMOTE )
990
+ #if defined(WGPU_LOCAL )
915
991
WGPUTextureViewId wgpu_texture_create_view (WGPUTextureId texture_id ,
916
992
const WGPUTextureViewDescriptor * desc );
917
993
#endif
918
994
995
+ #if defined(WGPU_LOCAL )
919
996
void wgpu_texture_destroy (WGPUTextureId texture_id );
997
+ #endif
920
998
999
+ #if defined(WGPU_LOCAL )
921
1000
void wgpu_texture_view_destroy (WGPUTextureViewId texture_view_id );
1001
+ #endif
0 commit comments