Lines Matching defs:context

141 	struct hgl_context* context = CALLOC_STRUCT(hgl_context);
143 if (!context) {
144 ERROR("%s: Couldn't create pipe context!\n", __FUNCTION__);
148 // Set up the initial things our context needs
149 context->display = fDisplay;
152 context->stVisual = hgl_create_st_visual(fOptions);
155 context->buffer = hgl_create_st_framebuffer(context, wsContext);
157 if (!context->buffer) {
159 FREE(context->stVisual);
168 attribs.visual = *context->stVisual;
177 TRACE("shared context: %p\n", shared);
180 // Create context using state tracker api call
182 context->st = fDisplay->api->create_context(fDisplay->api, fDisplay->manager,
185 if (!context->st) {
186 ERROR("%s: Couldn't create mesa state tracker context!\n",
212 hgl_destroy_st_visual(context->stVisual);
213 FREE(context);
217 assert(!context->st->st_manager_private);
218 context->st->st_manager_private = (void*)context;
220 struct st_context *stContext = (struct st_context*)context->st;
224 context->postProcess = pp_init(stContext->pipe, context->postProcessEnable,
231 fContext[i] = context;
239 ERROR("%s: The next context is invalid... something went wrong!\n",
241 //st_destroy_context(context->st);
242 FREE(context->stVisual);
243 FREE(context);
247 TRACE("%s: context #%" B_PRIu64 " is the next available context\n",
259 // See if context is used
288 ERROR("%s: Invalid context ID range!\n", __func__);
294 struct hgl_context* context = fContext[contextID];
296 if (!context) {
297 ERROR("%s: Invalid context provided (#%" B_PRIu64 ")!\n",
309 // Everything seems valid, lets set the new context.
318 fDisplay->api->make_current(fDisplay->api, context->st, context->buffer->stfbi,
319 context->buffer->stfbi);
332 struct hgl_context* context = fContext[contextID];
334 if (!context) {
335 ERROR("%s: context not found\n", __func__);
341 context->st->flush(context->st, ST_FLUSH_FRONT, NULL, NULL, NULL);
343 struct hgl_buffer* buffer = context->buffer;
361 struct hgl_context *context = fContext[contextID];
363 if (!context) {
364 ERROR("%s: context not found\n", __func__);
368 struct hgl_buffer* buffer = context->buffer;