Lines Matching refs:osbuffer
364 struct osmesa_buffer *osbuffer = stfbi_to_osbuffer(stfbi); in osmesa_st_framebuffer_flush_front() local
365 struct pipe_resource *res = osbuffer->textures[statt]; in osmesa_st_framebuffer_flush_front()
377 for (i = 0; i < ARRAY_SIZE(osbuffer->textures); i++) { in osmesa_st_framebuffer_flush_front()
378 struct pipe_resource *res = osbuffer->textures[i]; in osmesa_st_framebuffer_flush_front()
395 bpp = util_format_get_blocksize(osbuffer->visual.color_format); in osmesa_st_framebuffer_flush_front()
399 dst_stride = bpp * osbuffer->width; in osmesa_st_framebuffer_flush_front()
401 osmesa_read_buffer(osmesa, res, osbuffer->map, dst_stride, osmesa->y_up); in osmesa_st_framebuffer_flush_front()
405 osmesa_read_buffer(osmesa, osbuffer->textures[ST_ATTACHMENT_DEPTH_STENCIL], in osmesa_st_framebuffer_flush_front()
426 struct osmesa_buffer *osbuffer = stfbi_to_osbuffer(stfbi); in osmesa_st_framebuffer_validate() local
433 templat.width0 = osbuffer->width; in osmesa_st_framebuffer_validate()
434 templat.height0 = osbuffer->height; in osmesa_st_framebuffer_validate()
451 format = osbuffer->visual.color_format; in osmesa_st_framebuffer_validate()
455 format = osbuffer->visual.depth_stencil_format; in osmesa_st_framebuffer_validate()
459 format = osbuffer->visual.accum_format; in osmesa_st_framebuffer_validate()
470 out[i] = osbuffer->textures[statts[i]] = in osmesa_st_framebuffer_validate()
502 struct osmesa_buffer *osbuffer = CALLOC_STRUCT(osmesa_buffer); in osmesa_create_buffer() local
503 if (osbuffer) { in osmesa_create_buffer()
504 osbuffer->stfb = osmesa_create_st_framebuffer(); in osmesa_create_buffer()
506 osbuffer->stfb->st_manager_private = osbuffer; in osmesa_create_buffer()
507 osbuffer->stfb->visual = &osbuffer->visual; in osmesa_create_buffer()
509 osmesa_init_st_visual(&osbuffer->visual, color_format, in osmesa_create_buffer()
513 return osbuffer; in osmesa_create_buffer()
518 osmesa_destroy_buffer(struct osmesa_buffer *osbuffer) in osmesa_destroy_buffer() argument
524 stapi->destroy_drawable(stapi, osbuffer->stfb); in osmesa_destroy_buffer()
526 FREE(osbuffer->stfb); in osmesa_destroy_buffer()
527 FREE(osbuffer); in osmesa_destroy_buffer()
797 struct osmesa_buffer *osbuffer = osmesa->current_buffer; in OSMesaMakeCurrent() local
799 osbuffer->width = width; in OSMesaMakeCurrent()
800 osbuffer->height = height; in OSMesaMakeCurrent()
801 osbuffer->map = buffer; in OSMesaMakeCurrent()
805 stapi->make_current(stapi, osmesa->stctx, osbuffer->stfb, osbuffer->stfb); in OSMesaMakeCurrent()
874 struct osmesa_buffer *osbuffer = osmesa ? osmesa->current_buffer : NULL; in OSMesaGetIntegerv() local
878 *value = osbuffer ? osbuffer->width : 0; in OSMesaGetIntegerv()
881 *value = osbuffer ? osbuffer->height : 0; in OSMesaGetIntegerv()
923 struct osmesa_buffer *osbuffer = c->current_buffer; in OSMesaGetDepthBuffer() local
924 struct pipe_resource *res = osbuffer->textures[ST_ATTACHMENT_DEPTH_STENCIL]; in OSMesaGetDepthBuffer()
965 struct osmesa_buffer *osbuffer = osmesa->current_buffer; in OSMesaGetColorBuffer() local
967 if (osbuffer) { in OSMesaGetColorBuffer()
968 *width = osbuffer->width; in OSMesaGetColorBuffer()
969 *height = osbuffer->height; in OSMesaGetColorBuffer()
971 *buffer = osbuffer->map; in OSMesaGetColorBuffer()