1 // Copyright 2019 The Dawn Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef DAWN_DAWN_PROC_H_ 16 #define DAWN_DAWN_PROC_H_ 17 18 #include "dawn/dawn_proc_table.h" 19 #include "dawn/webgpu.h" 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 // Sets the static proctable used by libdawn_proc to implement the Dawn entrypoints. Passing NULL 26 // for `procs` sets up the null proctable that contains only null function pointers. It is the 27 // default value of the proctable. Setting the proctable back to null is good practice when you 28 // are done using libdawn_proc since further usage will cause a segfault instead of calling an 29 // unexpected function. 30 WGPU_EXPORT void dawnProcSetProcs(const DawnProcTable* procs); 31 32 #ifdef __cplusplus 33 } // extern "C" 34 #endif 35 36 #endif // DAWN_DAWN_PROC_H_ 37