Eric Anholt <[email protected]> writes: > The code to set it was deleted in keithp's big rewrite.
Looks like you can now remove the 'pbo' parameter to upload_sub_pixmap_to_texture as it's always 0 now?
From 8bc5fdda62c441bccccf009cdddf3ab66ecd4b6d Mon Sep 17 00:00:00 2001 From: Keith Packard <[email protected]> Date: Thu, 2 Jul 2015 17:19:31 -0600 Subject: [PATCH] glamor: Remove unused 'pbo' param to upload_sub_pixmap_to_texture This parameter is always passed as '0', so just get rid of it and all of the related code. Signed-off-by: Keith Packard <[email protected]> --- glamor/glamor_pixmap.c | 26 +++++++++----------------- glamor/glamor_priv.h | 3 +-- glamor/glamor_xv.c | 6 +++--- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c index f2bf223..bac96c0 100644 --- a/glamor/glamor_pixmap.c +++ b/glamor/glamor_pixmap.c @@ -705,7 +705,7 @@ __glamor_upload_pixmap_to_texture(PixmapPtr pixmap, unsigned int *tex, GLenum format, GLenum type, int x, int y, int w, int h, - void *bits, int pbo) + void *bits) { glamor_screen_private *glamor_priv = glamor_get_screen_private(pixmap->drawable.pScreen); @@ -728,11 +728,7 @@ __glamor_upload_pixmap_to_texture(PixmapPtr pixmap, unsigned int *tex, glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glPixelStorei(GL_UNPACK_ALIGNMENT, 4); - assert(pbo || bits != 0); - if (bits == NULL) { - glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pbo); - glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER); - } + assert(bits != NULL); if (non_sub) glTexImage2D(GL_TEXTURE_2D, 0, iformat, w, h, 0, format, type, bits); else @@ -746,7 +742,7 @@ static Bool _glamor_upload_bits_to_pixmap_texture(PixmapPtr pixmap, GLenum format, GLenum type, int no_alpha, int revert, int swap_rb, int x, int y, int w, int h, - int stride, void *bits, int pbo) + int stride, void *bits) { ScreenPtr screen = pixmap->drawable.pScreen; glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); @@ -814,7 +810,7 @@ _glamor_upload_bits_to_pixmap_texture(PixmapPtr pixmap, GLenum format, __glamor_upload_pixmap_to_texture(pixmap, &pixmap_priv->fbo->tex, format, type, x + fbo_x_off, y + fbo_y_off, w, h, - bits, pbo); + bits); } else { ptexcoords = texcoords_inv; @@ -836,7 +832,7 @@ _glamor_upload_bits_to_pixmap_texture(PixmapPtr pixmap, GLenum format, glamor_set_destination_pixmap_priv_nc(glamor_priv, pixmap, pixmap_priv); glamor_set_alu(screen, GXcopy); __glamor_upload_pixmap_to_texture(pixmap, &tex, - format, type, 0, 0, w, h, bits, pbo); + format, type, 0, 0, w, h, bits); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, tex); @@ -934,7 +930,7 @@ glamor_put_bits(char *dst_bits, int dst_stride, char *src_bits, Bool glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, - int h, int stride, void *bits, int pbo) + int h, int stride, void *bits) { ScreenPtr screen = pixmap->drawable.pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); @@ -993,8 +989,6 @@ glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, int temp_stride; void *temp_bits; - assert(pbo == 0); - glamor_set_pixmap_fbo_current(pixmap_priv, clipped_regions[i].block_idx); boxes = RegionRects(clipped_regions[i].region); @@ -1022,8 +1016,7 @@ glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, if (_glamor_upload_bits_to_pixmap_texture (pixmap, format, type, no_alpha, revert, swap_rb, boxes[j].x1, boxes[j].y1, boxes[j].x2 - boxes[j].x1, - boxes[j].y2 - boxes[j].y1, temp_stride, temp_bits, - pbo) == FALSE) { + boxes[j].y2 - boxes[j].y1, temp_stride, temp_bits) == FALSE) { RegionUninit(®ion); free(sub_bits); assert(0); @@ -1040,8 +1033,7 @@ glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, else return _glamor_upload_bits_to_pixmap_texture(pixmap, format, type, no_alpha, revert, swap_rb, - x, y, w, h, stride, bits, - pbo); + x, y, w, h, stride, bits); } enum glamor_pixmap_status @@ -1053,7 +1045,7 @@ glamor_upload_pixmap_to_texture(PixmapPtr pixmap) pixmap->drawable.width, pixmap->drawable.height, pixmap->devKind, - pixmap->devPrivate.ptr, 0)) + pixmap->devPrivate.ptr)) ret = GLAMOR_UPLOAD_DONE; else ret = GLAMOR_UPLOAD_FAILED; diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 90489a2..9e0277a 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -780,8 +780,7 @@ Bool glamor_pixmap_ensure_fbo(PixmapPtr pixmap, GLenum format, int flag); enum glamor_pixmap_status glamor_upload_pixmap_to_texture(PixmapPtr pixmap); Bool glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, - int h, int stride, void *bits, - int pbo); + int h, int stride, void *bits); glamor_pixmap_clipped_regions * glamor_compute_clipped_regions(PixmapPtr pixmap, diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c index 364104d..7a5d799 100644 --- a/glamor/glamor_xv.c +++ b/glamor/glamor_xv.c @@ -455,17 +455,17 @@ glamor_xv_put_image(glamor_port_private *port_priv, glamor_upload_sub_pixmap_to_texture(port_priv->src_pix[0], 0, 0, width, nlines, srcPitch, - buf + (top * srcPitch), 0); + buf + (top * srcPitch)); glamor_upload_sub_pixmap_to_texture(port_priv->src_pix[1], 0, 0, width >> 1, (nlines + 1) >> 1, srcPitch2, - buf + s2offset, 0); + buf + s2offset); glamor_upload_sub_pixmap_to_texture(port_priv->src_pix[2], 0, 0, width >> 1, (nlines + 1) >> 1, srcPitch2, - buf + s3offset, 0); + buf + s3offset); break; default: return BadMatch; -- 2.1.4
-- -keith
signature.asc
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
