• Home
  • Raw
  • Download

Lines Matching refs:xrb

258    struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb);  in xmesa_alloc_front_storage()  local
261 xrb->origin2 = NULL; in xmesa_alloc_front_storage()
262 xrb->origin3 = NULL; in xmesa_alloc_front_storage()
263 xrb->origin4 = NULL; in xmesa_alloc_front_storage()
266 xrb->bottom = height - 1; in xmesa_alloc_front_storage()
284 struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb); in xmesa_alloc_back_storage() local
287 assert(xrb->Parent); in xmesa_alloc_back_storage()
288 alloc_back_buffer(xrb->Parent, width, height); in xmesa_alloc_back_storage()
295 if (xrb->ximage) { in xmesa_alloc_back_storage()
297 xrb->width2 = xrb->ximage->bytes_per_line / 2; in xmesa_alloc_back_storage()
298 xrb->origin2 = (GLushort *) xrb->ximage->data + xrb->width2 * (height - 1); in xmesa_alloc_back_storage()
301 xrb->width3 = xrb->ximage->bytes_per_line; in xmesa_alloc_back_storage()
302 xrb->origin3 = (GLubyte *) xrb->ximage->data + xrb->width3 * (height - 1); in xmesa_alloc_back_storage()
305 xrb->width4 = xrb->ximage->width; in xmesa_alloc_back_storage()
306 xrb->origin4 = (GLuint *) xrb->ximage->data + xrb->width4 * (height - 1); in xmesa_alloc_back_storage()
310 xrb->width2 = xrb->width3 = xrb->width4 = 0; in xmesa_alloc_back_storage()
311 xrb->origin2 = NULL; in xmesa_alloc_back_storage()
312 xrb->origin3 = NULL; in xmesa_alloc_back_storage()
313 xrb->origin4 = NULL; in xmesa_alloc_back_storage()
328 struct xmesa_renderbuffer *xrb = CALLOC_STRUCT(xmesa_renderbuffer); in xmesa_new_renderbuffer() local
329 if (xrb) { in xmesa_new_renderbuffer()
331 _mesa_init_renderbuffer(&xrb->Base.Base, name); in xmesa_new_renderbuffer()
333 xrb->Base.Base.Delete = xmesa_delete_renderbuffer; in xmesa_new_renderbuffer()
335 xrb->Base.Base.AllocStorage = xmesa_alloc_back_storage; in xmesa_new_renderbuffer()
337 xrb->Base.Base.AllocStorage = xmesa_alloc_front_storage; in xmesa_new_renderbuffer()
339 xrb->Base.Base.InternalFormat = GL_RGBA; in xmesa_new_renderbuffer()
340 xrb->Base.Base._BaseFormat = GL_RGBA; in xmesa_new_renderbuffer()
341 xrb->Base.Base.ClassID = XMESA_RENDERBUFFER; in xmesa_new_renderbuffer()
348 xrb->Base.Base.Format = MESA_FORMAT_B8G8R8X8_UNORM; in xmesa_new_renderbuffer()
351 xrb->Base.Base.Format = MESA_FORMAT_B8G8R8A8_UNORM; in xmesa_new_renderbuffer()
354 xrb->Base.Base.Format = MESA_FORMAT_R8G8B8A8_UNORM; in xmesa_new_renderbuffer()
357 xrb->Base.Base.Format = MESA_FORMAT_B5G6R5_UNORM; in xmesa_new_renderbuffer()
361 xrb->Base.Base.Format = MESA_FORMAT_B8G8R8A8_UNORM; in xmesa_new_renderbuffer()
367 return xrb; in xmesa_new_renderbuffer()
430 struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb); in xmesa_MapRenderbuffer() local
432 if (xrb->Base.Base.ClassID == XMESA_RENDERBUFFER) { in xmesa_MapRenderbuffer()
433 XImage *ximage = xrb->ximage; in xmesa_MapRenderbuffer()
435 assert(!xrb->map_mode); /* only a single mapping allowed */ in xmesa_MapRenderbuffer()
437 xrb->map_mode = mode; in xmesa_MapRenderbuffer()
438 xrb->map_x = x; in xmesa_MapRenderbuffer()
439 xrb->map_y = y; in xmesa_MapRenderbuffer()
440 xrb->map_w = w; in xmesa_MapRenderbuffer()
441 xrb->map_h = h; in xmesa_MapRenderbuffer()
455 assert(xrb->pixmap); in xmesa_MapRenderbuffer()
464 ximage = XGetImage(xrb->Parent->display, in xmesa_MapRenderbuffer()
465 xrb->pixmap, x, y2, w, h, in xmesa_MapRenderbuffer()
473 _mesa_format_row_stride(xrb->Base.Base.Format, in xmesa_MapRenderbuffer()
474 xrb->Base.Base.Width); in xmesa_MapRenderbuffer()
476 xrb->Base.Base.Height); in xmesa_MapRenderbuffer()
477 ximage = XCreateImage(xrb->Parent->display, in xmesa_MapRenderbuffer()
478 xrb->Parent->xm_visual->visinfo->visual, in xmesa_MapRenderbuffer()
479 xrb->Parent->xm_visual->visinfo->depth, in xmesa_MapRenderbuffer()
483 xrb->Base.Base.Width, in xmesa_MapRenderbuffer()
484 xrb->Base.Base.Height, in xmesa_MapRenderbuffer()
495 xrb->map_ximage = ximage; in xmesa_MapRenderbuffer()
521 struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb); in xmesa_UnmapRenderbuffer() local
523 if (xrb->Base.Base.ClassID == XMESA_RENDERBUFFER) { in xmesa_UnmapRenderbuffer()
524 XImage *ximage = xrb->ximage; in xmesa_UnmapRenderbuffer()
528 assert(xrb->pixmap); in xmesa_UnmapRenderbuffer()
529 assert(xrb->map_ximage); in xmesa_UnmapRenderbuffer()
530 if (xrb->map_ximage) { in xmesa_UnmapRenderbuffer()
531 if (xrb->map_mode & GL_MAP_WRITE_BIT) { in xmesa_UnmapRenderbuffer()
533 int y2 = rb->Height - xrb->map_y - xrb->map_h; in xmesa_UnmapRenderbuffer()
534 GC gc = XCreateGC(xrb->Parent->display, xrb->pixmap, 0, NULL); in xmesa_UnmapRenderbuffer()
536 XPutImage(xrb->Parent->display, in xmesa_UnmapRenderbuffer()
537 xrb->pixmap, /* dest */ in xmesa_UnmapRenderbuffer()
539 xrb->map_ximage, /* source */ in xmesa_UnmapRenderbuffer()
541 xrb->map_x, y2, /* dest x, y */ in xmesa_UnmapRenderbuffer()
542 xrb->map_w, xrb->map_h); /* size */ in xmesa_UnmapRenderbuffer()
544 XFreeGC(xrb->Parent->display, gc); in xmesa_UnmapRenderbuffer()
546 XMesaDestroyImage(xrb->map_ximage); in xmesa_UnmapRenderbuffer()
547 xrb->map_ximage = NULL; in xmesa_UnmapRenderbuffer()
551 xrb->map_mode = 0x0; in xmesa_UnmapRenderbuffer()