Lines Matching defs:st
151 st_context_validate(struct st_context *st,
155 if (stdraw && stdraw->stamp != st->draw_stamp) {
156 st->dirty |= ST_NEW_FRAMEBUFFER;
157 _mesa_resize_framebuffer(st->ctx, &stdraw->Base,
160 st->draw_stamp = stdraw->stamp;
163 if (stread && stread->stamp != st->read_stamp) {
165 st->dirty |= ST_NEW_FRAMEBUFFER;
166 _mesa_resize_framebuffer(st->ctx, &stread->Base,
170 st->read_stamp = stread->stamp;
184 struct st_context *st)
202 if (!stfb->iface->validate(&st->iface, stfb->iface, stfb->statts,
235 ps = st->pipe->create_surface(st->pipe, textures[i], &surf_tmpl);
256 _mesa_resize_framebuffer(st->ctx, &stfb->Base, width, height);
415 st_framebuffer_create(struct st_context *st,
438 * the attribute is GLX_TRUE, it tells the st manager to pick a color
449 if (_mesa_is_desktop_gl(st->ctx)) {
450 struct pipe_screen *screen = st->pipe->screen;
499 struct st_context *st = (struct st_context *) stctxi;
506 st_flush(st, fence, pipe_flags);
508 st_manager_flush_frontbuffer(st);
517 struct st_context *st = (struct st_context *) stctxi;
518 struct gl_context *ctx = st->ctx;
602 struct st_context *st = (struct st_context *) stctxi;
605 _mesa_copy_context(src->ctx, st->ctx, mask);
612 struct st_context *st = (struct st_context *) stctxi;
615 return _mesa_share_state(st->ctx, src->ctx);
621 struct st_context *st = (struct st_context *) stctxi;
622 st_destroy_context(st);
632 struct st_context *st;
669 st = st_create_context(api, pipe, &mode, shared_ctx, &attribs->options);
670 if (!st) {
677 if (!_mesa_set_debug_state_int(st->ctx, GL_DEBUG_OUTPUT, GL_TRUE)) {
682 st->ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT;
685 if (st->ctx->Const.ContextFlags & GL_CONTEXT_FLAG_DEBUG_BIT) {
686 st_update_debug_callback(st);
690 st->ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT;
692 st->ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB;
693 st->ctx->Const.RobustAccess = GL_TRUE;
696 st->ctx->Const.ResetStrategy = GL_LOSE_CONTEXT_ON_RESET_ARB;
697 st_install_device_reset_callback(st);
704 if (st->ctx->Version < attribs->major * 10U + attribs->minor) {
706 st_destroy_context(st);
711 st->invalidate_on_gl_viewport =
714 st->iface.destroy = st_context_destroy;
715 st->iface.flush = st_context_flush;
716 st->iface.teximage = st_context_teximage;
717 st->iface.copy = st_context_copy;
718 st->iface.share = st_context_share;
719 st->iface.st_context_private = (void *) smapi;
720 st->iface.cso_context = st->cso_context;
721 st->iface.pipe = st->pipe;
724 return &st->iface;
731 struct st_context *st = (ctx) ? ctx->st : NULL;
733 return (st) ? &st->iface : NULL;
737 st_framebuffer_reuse_or_create(struct st_context *st,
751 stfb = st_framebuffer_create(st, stfbi);
762 struct st_context *st = (struct st_context *) stctxi;
768 if (st) {
770 stdraw = st_framebuffer_reuse_or_create(st,
771 st->ctx->WinSysDrawBuffer, stdrawi);
774 stread = st_framebuffer_reuse_or_create(st,
775 st->ctx->WinSysReadBuffer, streadi);
785 st_framebuffer_validate(stdraw, st);
787 st_framebuffer_validate(stread, st);
789 ret = _mesa_make_current(st->ctx, &stdraw->Base, &stread->Base);
791 st->draw_stamp = stdraw->stamp - 1;
792 st->read_stamp = stread->stamp - 1;
793 st_context_validate(st, stdraw, stread);
797 ret = _mesa_make_current(st->ctx, incomplete, incomplete);
819 st_manager_flush_frontbuffer(struct st_context *st)
821 struct st_framebuffer *stfb = st_ws_framebuffer(st->ctx->DrawBuffer);
831 stfb->iface->flush_front(&st->iface, stfb->iface, ST_ATTACHMENT_FRONT_LEFT);
839 st_manager_get_egl_image_surface(struct st_context *st, void *eglimg)
842 (struct st_manager *) st->iface.st_context_private;
858 ps = st->pipe->create_surface(st->pipe, stimg.texture, &surf_tmpl);
868 st_manager_validate_framebuffers(struct st_context *st)
870 struct st_framebuffer *stdraw = st_ws_framebuffer(st->ctx->DrawBuffer);
871 struct st_framebuffer *stread = st_ws_framebuffer(st->ctx->ReadBuffer);
874 st_framebuffer_validate(stdraw, st);
876 st_framebuffer_validate(stread, st);
878 st_context_validate(st, stdraw, stread);
885 st_manager_add_color_renderbuffer(struct st_context *st,
921 st_invalidate_state(st->ctx, _NEW_BUFFERS);