• Home
  • Raw
  • Download

Lines Matching +full:shared +full:- +full:glapi

20 #include "glapi/glapi.h"
32 #include "target-helpers/inline_sw_helper.h"
33 #include "target-helpers/inline_debug_helper.h"
101 winsys->destroy(winsys); in CreateDisplay()
107 const char* driverName = screen->get_name(screen); in CreateDisplay()
114 screen->destroy(screen); // will also destroy winsys in CreateDisplay()
125 if (atomic_add(&fDisplayRefCount, -1) > 1) in DestroyDisplay()
129 struct pipe_screen* screen = fDisplay->manager->screen; in DestroyDisplay()
131 screen->destroy(screen); // destroy will deallocate object in DestroyDisplay()
149 context->display = fDisplay; in CreateContext()
152 context->stVisual = hgl_create_st_visual(fOptions); in CreateContext()
155 context->buffer = hgl_create_st_framebuffer(context, wsContext); in CreateContext()
157 if (!context->buffer) { in CreateContext()
159 FREE(context->stVisual); in CreateContext()
160 return -1; in CreateContext()
168 attribs.visual = *context->stVisual; in CreateContext()
173 struct st_context_iface* shared = NULL; in CreateContext() local
176 shared = fDisplay->api->get_current(fDisplay->api); in CreateContext()
177 TRACE("shared context: %p\n", shared); in CreateContext()
182 context->st = fDisplay->api->create_context(fDisplay->api, fDisplay->manager, in CreateContext()
183 &attribs, &result, shared); in CreateContext()
185 if (!context->st) { in CreateContext()
212 hgl_destroy_st_visual(context->stVisual); in CreateContext()
214 return -1; in CreateContext()
217 assert(!context->st->st_manager_private); in CreateContext()
218 context->st->st_manager_private = (void*)context; in CreateContext()
220 struct st_context *stContext = (struct st_context*)context->st; in CreateContext()
224 context->postProcess = pp_init(stContext->pipe, context->postProcessEnable, in CreateContext()
225 stContext->cso_context, &stContext->iface); in CreateContext()
227 context_id contextNext = -1; in CreateContext()
241 //st_destroy_context(context->st); in CreateContext()
242 FREE(context->stVisual); in CreateContext()
244 return -1; in CreateContext()
263 if (fContext[contextID]->st) { in DestroyContext()
264 fContext[contextID]->st->flush(fContext[contextID]->st, 0, NULL, NULL, NULL); in DestroyContext()
265 fContext[contextID]->st->destroy(fContext[contextID]->st); in DestroyContext()
268 if (fContext[contextID]->postProcess) in DestroyContext()
269 pp_free(fContext[contextID]->postProcess); in DestroyContext()
272 if (fContext[contextID]->buffer) in DestroyContext()
273 hgl_destroy_st_framebuffer(fContext[contextID]->buffer); in DestroyContext()
275 if (fContext[contextID]->stVisual) in DestroyContext()
276 hgl_destroy_st_visual(fContext[contextID]->stVisual); in DestroyContext()
304 fDisplay->api->make_current(fDisplay->api, NULL, NULL, NULL); in SetCurrentContext()
313 fContext[oldContextID]->st->flush(fContext[oldContextID]->st, in SetCurrentContext()
318 fDisplay->api->make_current(fDisplay->api, context->st, context->buffer->stfbi, in SetCurrentContext()
319 context->buffer->stfbi); in SetCurrentContext()
341 context->st->flush(context->st, ST_FLUSH_FRONT, NULL, NULL, NULL); in SwapBuffers()
343 struct hgl_buffer* buffer = context->buffer; in SwapBuffers()
346 if (buffer->textures[ST_ATTACHMENT_BACK_LEFT] != NULL) { in SwapBuffers()
347 buffer->screen->flush_frontbuffer(buffer->screen, NULL, buffer->textures[ST_ATTACHMENT_BACK_LEFT], in SwapBuffers()
348 0, 0, buffer->winsysContext, NULL); in SwapBuffers()
349 std::swap(buffer->textures[ST_ATTACHMENT_FRONT_LEFT], buffer->textures[ST_ATTACHMENT_BACK_LEFT]); in SwapBuffers()
350 p_atomic_inc(&buffer->stfbi->stamp); in SwapBuffers()
368 struct hgl_buffer* buffer = context->buffer; in Draw()
370 if (buffer->textures[ST_ATTACHMENT_FRONT_LEFT] == NULL) in Draw()
373 buffer->screen->flush_frontbuffer(buffer->screen, NULL, buffer->textures[ST_ATTACHMENT_FRONT_LEFT], in Draw()
374 0, 0, buffer->winsysContext, NULL); in Draw()
386 if (fContext[fCurrentContext]->width != width + 1 in Validate()
387 || fContext[fCurrentContext]->height != height + 1) { in Validate()
403 fContext[fCurrentContext]->width = width + 1; in Invalidate()
404 fContext[fCurrentContext]->height = height + 1; in Invalidate()
407 p_atomic_inc(&fContext[fCurrentContext]->buffer->stfbi->stamp); in Invalidate()