Home | History | Annotate | Download | only in wgl

Lines Matching refs:stw_dev

45 struct stw_device *stw_dev = NULL;
74 assert(!stw_dev);
78 stw_dev = &stw_dev_storage;
79 memset(stw_dev, 0, sizeof(*stw_dev));
82 stw_dev->memdbg_no = debug_memory_begin();
85 stw_dev->stw_winsys = stw_winsys;
87 stw_dev->stapi = stw_st_create_api();
88 stw_dev->smapi = CALLOC_STRUCT(st_manager);
89 if (!stw_dev->stapi || !stw_dev->smapi)
97 stw_winsys->get_adapter_luid(screen, &stw_dev->AdapterLuid);
99 stw_dev->smapi->screen = screen;
100 stw_dev->smapi->get_param = stw_get_param;
101 stw_dev->screen = screen;
103 stw_dev->max_2d_levels =
105 stw_dev->max_2d_length = 1 << (stw_dev->max_2d_levels - 1);
107 pipe_mutex_init( stw_dev->ctx_mutex );
108 pipe_mutex_init( stw_dev->fb_mutex );
110 stw_dev->ctx_table = handle_table_create();
111 if (!stw_dev->ctx_table) {
120 if (stw_dev->smapi)
121 FREE(stw_dev->smapi);
122 if (stw_dev->stapi)
123 stw_dev->stapi->destroy(stw_dev->stapi);
125 stw_dev = NULL;
151 if (!stw_dev)
158 pipe_mutex_lock( stw_dev->ctx_mutex );
159 dhglrc = handle_table_get_first_handle(stw_dev->ctx_table);
160 pipe_mutex_unlock( stw_dev->ctx_mutex );
163 stw_dev = NULL;
167 handle_table_destroy(stw_dev->ctx_table);
171 pipe_mutex_destroy( stw_dev->fb_mutex );
172 pipe_mutex_destroy( stw_dev->ctx_mutex );
174 FREE(stw_dev->smapi);
175 stw_dev->stapi->destroy(stw_dev->stapi);
177 stw_dev->screen->destroy(stw_dev->screen);
185 debug_memory_end(stw_dev->memdbg_no);
190 stw_dev = NULL;
200 if (stw_dev == NULL)
203 return (struct stw_context *) handle_table_get(stw_dev->ctx_table, dhglrc);
214 if (stw_dev == NULL)
217 size = MIN2(nProcs * sizeof *pProcs, sizeof stw_dev->callbacks);
218 memcpy(&stw_dev->callbacks, pProcs, size);