1 #ifndef NOUVEAU_CONTEXT 2 #define NOUVEAU_CONTEXT 1 3 4 #include "nouveau_private.h" 5 6 #ifdef __cplusplus 7 extern "C" { 8 #endif 9 10 struct nouveau_ws_device; 11 12 struct nouveau_ws_object { 13 uint16_t cls; 14 }; 15 16 enum nouveau_ws_engines { 17 NOUVEAU_WS_ENGINE_COPY = (1 << 0), 18 NOUVEAU_WS_ENGINE_2D = (1 << 1), 19 NOUVEAU_WS_ENGINE_3D = (1 << 2), 20 NOUVEAU_WS_ENGINE_M2MF = (1 << 3), 21 NOUVEAU_WS_ENGINE_COMPUTE = (1 << 4), 22 }; 23 24 struct nouveau_ws_context { 25 struct nouveau_ws_device *dev; 26 27 int channel; 28 29 struct nouveau_ws_object copy; 30 struct nouveau_ws_object eng2d; 31 struct nouveau_ws_object eng3d; 32 struct nouveau_ws_object m2mf; 33 struct nouveau_ws_object compute; 34 }; 35 36 int nouveau_ws_context_create(struct nouveau_ws_device *, 37 enum nouveau_ws_engines engines, 38 struct nouveau_ws_context **out); 39 bool nouveau_ws_context_killed(struct nouveau_ws_context *); 40 void nouveau_ws_context_destroy(struct nouveau_ws_context *); 41 42 #ifdef __cplusplus 43 } 44 #endif 45 46 #endif 47