diff options
author | Keith Packard <keithp@keithp.com> | 2014-10-29 23:08:57 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2015-03-24 12:34:50 -0700 |
commit | 020fcc582837b80b20843a09c1e28fa96096fe6b (patch) | |
tree | f2c9b5c6eb9bd431b36720b798446c56d1ce649f /glamor | |
parent | 9ef5cbf8ab8a51941d469bfcaca6cbfb7838d1ef (diff) |
glamor: Eliminate separate 'large' pixmap private structure
Just embed the large elements in the regular pixmap private and
collapse the union to a single struct.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'glamor')
-rw-r--r-- | glamor/glamor.c | 38 | ||||
-rw-r--r-- | glamor/glamor_core.c | 4 | ||||
-rw-r--r-- | glamor/glamor_dash.c | 2 | ||||
-rw-r--r-- | glamor/glamor_egl.c | 24 | ||||
-rw-r--r-- | glamor/glamor_fbo.c | 42 | ||||
-rw-r--r-- | glamor/glamor_largepixmap.c | 24 | ||||
-rw-r--r-- | glamor/glamor_picture.c | 10 | ||||
-rw-r--r-- | glamor/glamor_pixmap.c | 38 | ||||
-rw-r--r-- | glamor/glamor_prepare.c | 40 | ||||
-rw-r--r-- | glamor/glamor_priv.h | 78 | ||||
-rw-r--r-- | glamor/glamor_render.c | 6 | ||||
-rw-r--r-- | glamor/glamor_transform.c | 2 | ||||
-rw-r--r-- | glamor/glamor_utils.h | 46 | ||||
-rw-r--r-- | glamor/glamor_window.c | 12 | ||||
-rw-r--r-- | glamor/glamor_xv.c | 6 |
15 files changed, 176 insertions, 196 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c index 555f65058..f9ea8e0fa 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -72,10 +72,10 @@ glamor_set_pixmap_type(PixmapPtr pixmap, glamor_pixmap_type_t type) glamor_set_pixmap_private(pixmap, pixmap_priv); } pixmap_priv->type = type; - pixmap_priv->base.box.x1 = 0; - pixmap_priv->base.box.x2 = pixmap->drawable.width; - pixmap_priv->base.box.y1 = 0; - pixmap_priv->base.box.y2 = pixmap->drawable.height; + pixmap_priv->box.x1 = 0; + pixmap_priv->box.x2 = pixmap->drawable.width; + pixmap_priv->box.y1 = 0; + pixmap_priv->box.y2 = pixmap->drawable.height; } _X_EXPORT void @@ -90,7 +90,7 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex) glamor_priv = glamor_get_screen_private(screen); pixmap_priv = glamor_get_pixmap_private(pixmap); - if (pixmap_priv->base.fbo) { + if (pixmap_priv->fbo) { fbo = glamor_pixmap_detach_fbo(pixmap_priv); glamor_destroy_fbo(glamor_priv, fbo); } @@ -116,10 +116,10 @@ glamor_set_screen_pixmap(PixmapPtr screen_pixmap, PixmapPtr *back_pixmap) glamor_priv = glamor_get_screen_private(screen_pixmap->drawable.pScreen); pixmap_priv = glamor_get_pixmap_private(screen_pixmap); - glamor_priv->screen_fbo = pixmap_priv->base.fbo->fb; + glamor_priv->screen_fbo = pixmap_priv->fbo->fb; - pixmap_priv->base.fbo->width = screen_pixmap->drawable.width; - pixmap_priv->base.fbo->height = screen_pixmap->drawable.height; + pixmap_priv->fbo->width = screen_pixmap->drawable.width; + pixmap_priv->fbo->height = screen_pixmap->drawable.height; } uint32_t @@ -130,7 +130,7 @@ glamor_get_pixmap_texture(PixmapPtr pixmap) if (pixmap_priv->type != GLAMOR_TEXTURE_ONLY) return 0; - return pixmap_priv->base.fbo->tex; + return pixmap_priv->fbo->tex; } PixmapPtr @@ -173,20 +173,20 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth, if (usage == GLAMOR_CREATE_PIXMAP_NO_TEXTURE) { pixmap_priv->type = GLAMOR_TEXTURE_ONLY; - pixmap_priv->base.box.x1 = 0; - pixmap_priv->base.box.y1 = 0; - pixmap_priv->base.box.x2 = w; - pixmap_priv->base.box.y2 = h; + pixmap_priv->box.x1 = 0; + pixmap_priv->box.y1 = 0; + pixmap_priv->box.x2 = w; + pixmap_priv->box.y2 = h; return pixmap; } else if (usage == GLAMOR_CREATE_NO_LARGE || glamor_check_fbo_size(glamor_priv, w, h)) { pixmap_priv->type = type; - pixmap_priv->base.box.x1 = 0; - pixmap_priv->base.box.y1 = 0; - pixmap_priv->base.box.x2 = w; - pixmap_priv->base.box.y2 = h; + pixmap_priv->box.x1 = 0; + pixmap_priv->box.y1 = 0; + pixmap_priv->box.x2 = w; + pixmap_priv->box.y2 = h; fbo = glamor_create_fbo(glamor_priv, w, h, format, usage); } else { int tile_size = glamor_priv->max_fbo_size; @@ -639,7 +639,7 @@ glamor_fd_from_pixmap(ScreenPtr screen, return -1; return glamor_egl_dri3_fd_name_from_tex(screen, pixmap, - pixmap_priv->base.fbo->tex, + pixmap_priv->fbo->tex, FALSE, stride, size); default: break; @@ -664,7 +664,7 @@ glamor_name_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size) return -1; return glamor_egl_dri3_fd_name_from_tex(pixmap->drawable.pScreen, pixmap, - pixmap_priv->base.fbo->tex, + pixmap_priv->fbo->tex, TRUE, stride, size); default: break; diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c index 737b2744b..cbbe7593b 100644 --- a/glamor/glamor_core.c +++ b/glamor/glamor_core.c @@ -43,9 +43,9 @@ glamor_get_drawable_location(const DrawablePtr drawable) glamor_screen_private *glamor_priv = glamor_get_screen_private(drawable->pScreen); if (pixmap_priv == NULL || - pixmap_priv->base.gl_fbo == GLAMOR_FBO_UNATTACHED) + pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) return 'm'; - if (pixmap_priv->base.fbo->fb == glamor_priv->screen_fbo) + if (pixmap_priv->fbo->fb == glamor_priv->screen_fbo) return 's'; else return 'f'; diff --git a/glamor/glamor_dash.c b/glamor/glamor_dash.c index e8f60fa10..49ad3b623 100644 --- a/glamor/glamor_dash.c +++ b/glamor/glamor_dash.c @@ -189,7 +189,7 @@ glamor_dash_setup(DrawablePtr drawable, GCPtr gc) /* Set the dash pattern as texture 1 */ glActiveTexture(GL_TEXTURE1); - glBindTexture(GL_TEXTURE_2D, dash_priv->base.fbo->tex); + glBindTexture(GL_TEXTURE_2D, dash_priv->fbo->tex); glUniform1i(prog->dash_uniform, 1); glUniform1f(prog->dash_length_uniform, dash_pixmap->drawable.width); diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index 113450c8d..6033780f8 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -239,7 +239,6 @@ glamor_egl_create_textured_screen(ScreenPtr screen, int handle, int stride) "Failed to create textured screen."); return FALSE; } - glamor_set_screen_pixmap(screen_pixmap, NULL); return TRUE; } @@ -272,7 +271,7 @@ glamor_egl_set_pixmap_image(PixmapPtr pixmap, EGLImageKHR image) glamor_get_pixmap_private(pixmap); EGLImageKHR old; - old = pixmap_priv->base.image; + old = pixmap_priv->image; if (old) { ScreenPtr screen = pixmap->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); @@ -280,7 +279,7 @@ glamor_egl_set_pixmap_image(PixmapPtr pixmap, EGLImageKHR image) eglDestroyImageKHR(glamor_egl->display, old); } - pixmap_priv->base.image = image; + pixmap_priv->image = image; } Bool @@ -420,7 +419,7 @@ glamor_egl_dri3_fd_name_from_tex(ScreenPtr screen, glamor_make_current(glamor_priv); - image = pixmap_priv->base.image; + image = pixmap_priv->image; if (!image) { image = eglCreateImageKHR(glamor_egl->display, glamor_egl->context, @@ -536,7 +535,7 @@ glamor_egl_destroy_pixmap_image(PixmapPtr pixmap) struct glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); - if (pixmap_priv && pixmap_priv->base.image) { + if (pixmap_priv && pixmap_priv->image) { ScrnInfoPtr scrn = xf86ScreenToScrn(pixmap->drawable.pScreen); struct glamor_egl_screen_private *glamor_egl = glamor_egl_get_screen_private(scrn); @@ -545,8 +544,8 @@ glamor_egl_destroy_pixmap_image(PixmapPtr pixmap) * a texture. we must call glFlush to make sure the * operation on that texture has been done.*/ glamor_block_handler(pixmap->drawable.pScreen); - eglDestroyImageKHR(glamor_egl->display, pixmap_priv->base.image); - pixmap_priv->base.image = NULL; + eglDestroyImageKHR(glamor_egl->display, pixmap_priv->image); + pixmap_priv->image = NULL; } } @@ -561,13 +560,12 @@ glamor_egl_exchange_buffers(PixmapPtr front, PixmapPtr back) glamor_pixmap_exchange_fbos(front, back); - temp = back_priv->base.image; - back_priv->base.image = front_priv->base.image; - front_priv->base.image = temp; + temp = back_priv->image; + back_priv->image = front_priv->image; + front_priv->image = temp; glamor_set_pixmap_type(front, GLAMOR_TEXTURE_DRM); glamor_set_pixmap_type(back, GLAMOR_TEXTURE_DRM); - } void @@ -589,8 +587,8 @@ glamor_egl_close_screen(ScreenPtr screen) screen_pixmap = screen->GetScreenPixmap(screen); pixmap_priv = glamor_get_pixmap_private(screen_pixmap); - eglDestroyImageKHR(glamor_egl->display, pixmap_priv->base.image); - pixmap_priv->base.image = NULL; + eglDestroyImageKHR(glamor_egl->display, pixmap_priv->image); + pixmap_priv->image = NULL; screen->CloseScreen = glamor_egl->saved_close_screen; diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c index cf5216dda..63c66cd54 100644 --- a/glamor/glamor_fbo.c +++ b/glamor/glamor_fbo.c @@ -368,9 +368,9 @@ _glamor_create_fbo_array(glamor_screen_private *glamor_priv, glamor_pixmap_fbo **fbo_array; BoxPtr box_array; int i, j; - glamor_pixmap_private_large_t *priv; + glamor_pixmap_private *priv; - priv = &pixmap_priv->large; + priv = pixmap_priv; block_wcnt = (w + block_w - 1) / block_w; block_hcnt = (h + block_h - 1) / block_h; @@ -407,7 +407,7 @@ _glamor_create_fbo_array(glamor_screen_private *glamor_priv, format, GLAMOR_CREATE_PIXMAP_FIXUP); else - fbo_array[i * block_wcnt + j] = priv->base.fbo; + fbo_array[i * block_wcnt + j] = priv->fbo; if (fbo_array[i * block_wcnt + j] == NULL) goto cleanup; } @@ -437,8 +437,8 @@ glamor_create_fbo_array(glamor_screen_private *glamor_priv, int block_w, int block_h, glamor_pixmap_private *pixmap_priv) { - pixmap_priv->large.block_w = block_w; - pixmap_priv->large.block_h = block_h; + pixmap_priv->block_w = block_w; + pixmap_priv->block_h = block_h; return _glamor_create_fbo_array(glamor_priv, w, h, format, flag, block_w, block_h, pixmap_priv, 0); } @@ -451,11 +451,11 @@ glamor_pixmap_detach_fbo(glamor_pixmap_private *pixmap_priv) if (pixmap_priv == NULL) return NULL; - fbo = pixmap_priv->base.fbo; + fbo = pixmap_priv->fbo; if (fbo == NULL) return NULL; - pixmap_priv->base.fbo = NULL; + pixmap_priv->fbo = NULL; return fbo; } @@ -467,21 +467,21 @@ glamor_pixmap_attach_fbo(PixmapPtr pixmap, glamor_pixmap_fbo *fbo) pixmap_priv = glamor_get_pixmap_private(pixmap); - if (pixmap_priv->base.fbo) + if (pixmap_priv->fbo) return; - pixmap_priv->base.fbo = fbo; + pixmap_priv->fbo = fbo; switch (pixmap_priv->type) { case GLAMOR_TEXTURE_LARGE: case GLAMOR_TEXTURE_ONLY: case GLAMOR_TEXTURE_DRM: - pixmap_priv->base.gl_fbo = GLAMOR_FBO_NORMAL; + pixmap_priv->gl_fbo = GLAMOR_FBO_NORMAL; if (fbo->tex != 0) - pixmap_priv->base.gl_tex = 1; + pixmap_priv->gl_tex = 1; else { /* XXX For the Xephyr only, may be broken now. */ - pixmap_priv->base.gl_tex = 0; + pixmap_priv->gl_tex = 0; } pixmap->devPrivate.ptr = NULL; break; @@ -498,7 +498,7 @@ glamor_pixmap_destroy_fbo(glamor_screen_private *glamor_priv, if (priv->type == GLAMOR_TEXTURE_LARGE) { int i; - glamor_pixmap_private_large_t *large = &priv->large; + glamor_pixmap_private *large = priv; for (i = 0; i < large->block_wcnt * large->block_hcnt; i++) glamor_destroy_fbo(glamor_priv, large->fbo_array[i]); @@ -520,7 +520,7 @@ glamor_pixmap_ensure_fbo(PixmapPtr pixmap, GLenum format, int flag) glamor_priv = glamor_get_screen_private(pixmap->drawable.pScreen); pixmap_priv = glamor_get_pixmap_private(pixmap); - if (pixmap_priv->base.fbo == NULL) { + if (pixmap_priv->fbo == NULL) { fbo = glamor_create_fbo(glamor_priv, pixmap->drawable.width, pixmap->drawable.height, format, flag); @@ -531,13 +531,13 @@ glamor_pixmap_ensure_fbo(PixmapPtr pixmap, GLenum format, int flag) } else { /* We do have a fbo, but it may lack of fb or tex. */ - if (!pixmap_priv->base.fbo->tex) - pixmap_priv->base.fbo->tex = + if (!pixmap_priv->fbo->tex) + pixmap_priv->fbo->tex = _glamor_create_tex(glamor_priv, pixmap->drawable.width, pixmap->drawable.height, format); - if (flag != GLAMOR_CREATE_FBO_NO_FBO && pixmap_priv->base.fbo->fb == 0) - if (glamor_pixmap_ensure_fb(glamor_priv, pixmap_priv->base.fbo) != 0) + if (flag != GLAMOR_CREATE_FBO_NO_FBO && pixmap_priv->fbo->fb == 0) + if (glamor_pixmap_ensure_fb(glamor_priv, pixmap_priv->fbo) != 0) return FALSE; } @@ -552,7 +552,7 @@ glamor_pixmap_exchange_fbos(PixmapPtr front, PixmapPtr back) front_priv = glamor_get_pixmap_private(front); back_priv = glamor_get_pixmap_private(back); - temp_fbo = front_priv->base.fbo; - front_priv->base.fbo = back_priv->base.fbo; - back_priv->base.fbo = temp_fbo; + temp_fbo = front_priv->fbo; + front_priv->fbo = back_priv->fbo; + back_priv->fbo = temp_fbo; } diff --git a/glamor/glamor_largepixmap.c b/glamor/glamor_largepixmap.c index 2c91c27de..6eda4e901 100644 --- a/glamor/glamor_largepixmap.c +++ b/glamor/glamor_largepixmap.c @@ -2,10 +2,10 @@ #include "glamor_priv.h" -static inline glamor_pixmap_private_large_t * +static inline glamor_pixmap_private * __glamor_large(glamor_pixmap_private *pixmap_priv) { assert(pixmap_priv->type == GLAMOR_TEXTURE_LARGE); - return &pixmap_priv->large; + return pixmap_priv; } /** @@ -185,7 +185,7 @@ glamor_compute_clipped_regions_ext(PixmapPtr pixmap, small_box.y2 = block_h; } else { - glamor_pixmap_private_large_t *priv = __glamor_large(pixmap_priv); + glamor_pixmap_private *priv = __glamor_large(pixmap_priv); clipped_regions = __glamor_compute_clipped_regions(priv->block_w, priv->block_h, @@ -352,7 +352,7 @@ _glamor_compute_clipped_regions(PixmapPtr pixmap, int right_shift = 0; int down_shift = 0; int x_center_shift = 0, y_center_shift = 0; - glamor_pixmap_private_large_t *priv; + glamor_pixmap_private *priv; DEBUGRegionPrint(region); if (pixmap_priv->type != GLAMOR_TEXTURE_LARGE) { @@ -763,7 +763,7 @@ glamor_merge_clipped_regions(PixmapPtr pixmap, int overlap; int i; int pixmap_width, pixmap_height; - glamor_pixmap_private_large_t *priv; + glamor_pixmap_private *priv; priv = __glamor_large(pixmap_priv); pixmap_width = pixmap->drawable.width; @@ -858,7 +858,7 @@ glamor_merge_clipped_regions(PixmapPtr pixmap, RegionDestroy(clipped_regions[i].region); RegionDestroy(temp_region); priv->box = temp_box; - priv->base.fbo = glamor_pixmap_detach_fbo(temp_priv); + priv->fbo = glamor_pixmap_detach_fbo(temp_priv); DEBUGF("priv box x1 %d y1 %d x2 %d y2 %d \n", priv->box.x1, priv->box.y1, priv->box.x2, priv->box.y2); glamor_destroy_pixmap(temp_pixmap); @@ -1335,8 +1335,8 @@ glamor_composite_largepixmap_region(CARD8 op, null_mask = 0; if (need_clean_mask_fbo) { assert(is_normal_mask_fbo == 0); - glamor_destroy_fbo(glamor_priv, mask_pixmap_priv->base.fbo); - mask_pixmap_priv->base.fbo = NULL; + glamor_destroy_fbo(glamor_priv, mask_pixmap_priv->fbo); + mask_pixmap_priv->fbo = NULL; need_clean_mask_fbo = 0; } } @@ -1364,8 +1364,8 @@ glamor_composite_largepixmap_region(CARD8 op, null_source = 0; if (need_clean_source_fbo) { assert(is_normal_source_fbo == 0); - glamor_destroy_fbo(glamor_priv, source_pixmap_priv->base.fbo); - source_pixmap_priv->base.fbo = NULL; + glamor_destroy_fbo(glamor_priv, source_pixmap_priv->fbo); + source_pixmap_priv->fbo = NULL; need_clean_source_fbo = 0; } } @@ -1426,8 +1426,8 @@ glamor_composite_largepixmap_region(CARD8 op, if (null_mask) null_mask = 0; if (need_clean_mask_fbo) { - glamor_destroy_fbo(glamor_priv, mask_pixmap_priv->base.fbo); - mask_pixmap_priv->base.fbo = NULL; + glamor_destroy_fbo(glamor_priv, mask_pixmap_priv->fbo); + mask_pixmap_priv->fbo = NULL; need_clean_mask_fbo = 0; } } diff --git a/glamor/glamor_picture.c b/glamor/glamor_picture.c index 008d1834b..53b032c89 100644 --- a/glamor/glamor_picture.c +++ b/glamor/glamor_picture.c @@ -70,8 +70,8 @@ glamor_create_picture(PicturePtr picture) pixmap_priv = glamor_get_pixmap_private(pixmap); } - pixmap_priv->base.is_picture = 1; - pixmap_priv->base.picture = picture; + pixmap_priv->is_picture = 1; + pixmap_priv->picture = picture; return miCreatePicture(picture); } @@ -89,8 +89,8 @@ glamor_destroy_picture(PicturePtr picture) pixmap_priv = glamor_get_pixmap_private(pixmap); if (pixmap_priv) { - pixmap_priv->base.is_picture = 0; - pixmap_priv->base.picture = NULL; + pixmap_priv->is_picture = 0; + pixmap_priv->picture = NULL; } miDestroyPicture(picture); } @@ -99,5 +99,5 @@ void glamor_picture_format_fixup(PicturePtr picture, glamor_pixmap_private *pixmap_priv) { - pixmap_priv->base.picture = picture; + pixmap_priv->picture = picture; } diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c index 7935bf25f..d1551a4df 100644 --- a/glamor/glamor_pixmap.c +++ b/glamor/glamor_pixmap.c @@ -81,7 +81,7 @@ glamor_set_destination_pixmap_priv_nc(glamor_screen_private *glamor_priv, int w, h; PIXMAP_PRIV_GET_ACTUAL_SIZE(pixmap, pixmap_priv, w, h); - glamor_set_destination_pixmap_fbo(glamor_priv, pixmap_priv->base.fbo, 0, 0, w, h); + glamor_set_destination_pixmap_fbo(glamor_priv, pixmap_priv->fbo, 0, 0, w, h); } int @@ -478,7 +478,7 @@ glamor_get_tex_format_type_from_pixmap(PixmapPtr pixmap, pixmap_priv = glamor_get_pixmap_private(pixmap); if (GLAMOR_PIXMAP_PRIV_IS_PICTURE(pixmap_priv)) - pict_format = pixmap_priv->base.picture->format; + pict_format = pixmap_priv->picture->format; else pict_format = format_for_depth(pixmap->drawable.depth); @@ -804,13 +804,13 @@ _glamor_upload_bits_to_pixmap_texture(PixmapPtr pixmap, GLenum format, ) { int fbo_x_off, fbo_y_off; - assert(pixmap_priv->base.fbo->tex); + assert(pixmap_priv->fbo->tex); pixmap_priv_get_fbo_off(pixmap_priv, &fbo_x_off, &fbo_y_off); assert(x + fbo_x_off >= 0 && y + fbo_y_off >= 0); - assert(x + fbo_x_off + w <= pixmap_priv->base.fbo->width); - assert(y + fbo_y_off + h <= pixmap_priv->base.fbo->height); - __glamor_upload_pixmap_to_texture(pixmap, &pixmap_priv->base.fbo->tex, + assert(x + fbo_x_off + w <= pixmap_priv->fbo->width); + assert(y + fbo_y_off + h <= pixmap_priv->fbo->height); + __glamor_upload_pixmap_to_texture(pixmap, &pixmap_priv->fbo->tex, format, type, x + fbo_x_off, y + fbo_y_off, w, h, bits, pbo); @@ -874,17 +874,17 @@ glamor_pixmap_upload_prepare(PixmapPtr pixmap, GLenum format, int no_alpha, pixmap_priv = glamor_get_pixmap_private(pixmap); glamor_priv = glamor_get_screen_private(pixmap->drawable.pScreen); - if (pixmap_priv->base.gl_fbo != GLAMOR_FBO_UNATTACHED) + if (pixmap_priv->gl_fbo != GLAMOR_FBO_UNATTACHED) return 0; - if (pixmap_priv->base.fbo - && (pixmap_priv->base.fbo->width < pixmap->drawable.width - || pixmap_priv->base.fbo->height < pixmap->drawable.height)) { + if (pixmap_priv->fbo + && (pixmap_priv->fbo->width < pixmap->drawable.width + || pixmap_priv->fbo->height < pixmap->drawable.height)) { fbo = glamor_pixmap_detach_fbo(pixmap_priv); glamor_destroy_fbo(glamor_priv, fbo); } - if (pixmap_priv->base.fbo && pixmap_priv->base.fbo->fb) + if (pixmap_priv->fbo && pixmap_priv->fbo->fb) return 0; if (!(no_alpha || (revert == REVERT_NORMAL) @@ -895,8 +895,8 @@ glamor_pixmap_upload_prepare(PixmapPtr pixmap, GLenum format, int no_alpha, } if ((flag == GLAMOR_CREATE_FBO_NO_FBO - && pixmap_priv->base.fbo && pixmap_priv->base.fbo->tex) - || (flag == 0 && pixmap_priv->base.fbo && pixmap_priv->base.fbo->fb)) + && pixmap_priv->fbo && pixmap_priv->fbo->tex) + || (flag == 0 && pixmap_priv->fbo && pixmap_priv->fbo->fb)) return 0; if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) @@ -980,8 +980,8 @@ glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, clipped_regions = glamor_compute_clipped_regions_ext(pixmap, ®ion, &n_region, - pixmap_priv->large.block_w, - pixmap_priv->large.block_h, + pixmap_priv->block_w, + pixmap_priv->block_h, 0, 0); DEBUGF("prepare upload %dx%d to a large pixmap %p\n", w, h, pixmap); @@ -1052,10 +1052,10 @@ glamor_upload_pixmap_to_texture(PixmapPtr pixmap) pixmap_priv = glamor_get_pixmap_private(pixmap); - if ((pixmap_priv->base.fbo) - && (pixmap_priv->base.fbo->pbo_valid)) { + if ((pixmap_priv->fbo) + && (pixmap_priv->fbo->pbo_valid)) { data = NULL; - pbo = pixmap_priv->base.fbo->pbo; + pbo = pixmap_priv->fbo->pbo; } else { data = pixmap->devPrivate.ptr; @@ -1126,7 +1126,7 @@ glamor_es2_pixmap_read_prepare(PixmapPtr source, int x, int y, int w, int h, glEnableVertexAttribArray(GLAMOR_VERTEX_SOURCE); glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, source_priv->base.fbo->tex); + glBindTexture(GL_TEXTURE_2D, source_priv->fbo->tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); diff --git a/glamor/glamor_prepare.c b/glamor/glamor_prepare.c index fb85d9082..83ba7f16f 100644 --- a/glamor/glamor_prepare.c +++ b/glamor/glamor_prepare.c @@ -54,7 +54,7 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box) * we'll assume that it's directly mapped * by a lower level driver */ - if (!priv->base.prepared) + if (!priv->prepared) return TRUE; /* In X, multiple Drawables can be stored in the same Pixmap (such as @@ -65,28 +65,28 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box) * As a result, when doing a series of mappings for a fallback, we may * need to add more boxes to the set of data we've downloaded, as we go. */ - RegionSubtract(®ion, ®ion, &priv->base.prepare_region); + RegionSubtract(®ion, ®ion, &priv->prepare_region); if (!RegionNotEmpty(®ion)) return TRUE; if (access == GLAMOR_ACCESS_RW) FatalError("attempt to remap buffer as writable"); - if (priv->base.pbo) { - glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->base.pbo); + if (priv->pbo) { + glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->pbo); glUnmapBuffer(GL_PIXEL_PACK_BUFFER); pixmap->devPrivate.ptr = NULL; } } else { - RegionInit(&priv->base.prepare_region, box, 1); + RegionInit(&priv->prepare_region, box, 1); if (glamor_priv->has_rw_pbo) { - if (priv->base.pbo == 0) - glGenBuffers(1, &priv->base.pbo); + if (priv->pbo == 0) + glGenBuffers(1, &priv->pbo); gl_usage = GL_STREAM_READ; - glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->base.pbo); + glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->pbo); glBufferData(GL_PIXEL_PACK_BUFFER, pixmap->devKind * pixmap->drawable.height, NULL, gl_usage); @@ -96,7 +96,7 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box) if (!pixmap->devPrivate.ptr) return FALSE; } - priv->base.map_access = access; + priv->map_access = access; } glamor_download_boxes(pixmap, RegionRects(®ion), RegionNumRects(®ion), @@ -105,7 +105,7 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box) RegionUninit(®ion); if (glamor_priv->has_rw_pbo) { - if (priv->base.map_access == GLAMOR_ACCESS_RW) + if (priv->map_access == GLAMOR_ACCESS_RW) gl_access = GL_READ_WRITE; else gl_access = GL_READ_ONLY; @@ -114,7 +114,7 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box) glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); } - priv->base.prepared = TRUE; + priv->prepared = TRUE; return TRUE; } @@ -133,34 +133,34 @@ glamor_fini_pixmap(PixmapPtr pixmap) if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv)) return; - if (!priv->base.prepared) + if (!priv->prepared) return; if (glamor_priv->has_rw_pbo) { - glBindBuffer(GL_PIXEL_UNPACK_BUFFER, priv->base.pbo); + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, priv->pbo); glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER); pixmap->devPrivate.ptr = NULL; } - if (priv->base.map_access == GLAMOR_ACCESS_RW) { + if (priv->map_access == GLAMOR_ACCESS_RW) { glamor_upload_boxes(pixmap, - RegionRects(&priv->base.prepare_region), - RegionNumRects(&priv->base.prepare_region), + RegionRects(&priv->prepare_region), + RegionNumRects(&priv->prepare_region), 0, 0, 0, 0, pixmap->devPrivate.ptr, pixmap->devKind); } - RegionUninit(&priv->base.prepare_region); + RegionUninit(&priv->prepare_region); if (glamor_priv->has_rw_pbo) { glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); - glDeleteBuffers(1, &priv->base.pbo); - priv->base.pbo = 0; + glDeleteBuffers(1, &priv->pbo); + priv->pbo = 0; } else { free(pixmap->devPrivate.ptr); pixmap->devPrivate.ptr = NULL; } - priv->base.prepared = FALSE; + priv->prepared = FALSE; } Bool diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index e9b05bbfa..6cbebd2c5 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -377,6 +377,14 @@ typedef struct glamor_pixmap_fbo { * @is_picture: The drawable is attached to a picture. * @pict_format: the corresponding picture's format. * @pixmap: The corresponding pixmap's pointer. + * @box: current fbo's coords in the whole pixmap. + * @block_w: block width of this large pixmap. + * @block_h: block height of this large pixmap. + * @block_wcnt: block count in one block row. + * @block_hcnt: block count in one block column. + * @nbox: total block count. + * @box_array: contains each block's corresponding box. + * @fbo_array: contains each block's fbo pointer. * * For GLAMOR_TEXTURE_LARGE, nbox should larger than 1. * And the box and fbo will both have nbox elements. @@ -426,9 +434,6 @@ typedef struct glamor_pixmap_fbo { * to the box and fbo elements. Thus the inner routines * can handle it as normal, only the coords calculation need * to aware of it's large pixmap. - * - * Currently, we haven't implemented the atlas pixmap. - * **/ typedef struct glamor_pixmap_clipped_regions { @@ -436,7 +441,7 @@ typedef struct glamor_pixmap_clipped_regions { RegionPtr region; } glamor_pixmap_clipped_regions; -typedef struct glamor_pixmap_private_base { +typedef struct glamor_pixmap_private { glamor_pixmap_type_t type; enum glamor_fbo_state gl_fbo; /** @@ -457,26 +462,6 @@ typedef struct glamor_pixmap_private_base { #if GLAMOR_HAS_GBM EGLImageKHR image; #endif -} glamor_pixmap_private_base_t; - -/* - * @base.fbo: current fbo. - * @box: current fbo's coords in the whole pixmap. - * @block_w: block width of this large pixmap. - * @block_h: block height of this large pixmap. - * @block_wcnt: block count in one block row. - * @block_hcnt: block count in one block column. - * @nbox: total block count. - * @box_array: contains each block's corresponding box. - * @fbo_array: contains each block's fbo pointer. - * - **/ -typedef struct glamor_pixmap_private_large { - union { - glamor_pixmap_type_t type; - glamor_pixmap_private_base_t base; - }; - BoxRec box; int block_w; int block_h; int block_wcnt; @@ -484,22 +469,19 @@ typedef struct glamor_pixmap_private_large { int nbox; BoxPtr box_array; glamor_pixmap_fbo **fbo_array; -} glamor_pixmap_private_large_t; - -typedef struct glamor_pixmap_private { - union { - glamor_pixmap_type_t type; - glamor_pixmap_private_base_t base; - glamor_pixmap_private_large_t large; - }; } glamor_pixmap_private; +/* + * @base.fbo: current fbo. + * + **/ + static inline void glamor_set_pixmap_fbo_current(glamor_pixmap_private *priv, int idx) { if (priv->type == GLAMOR_TEXTURE_LARGE) { - priv->large.base.fbo = priv->large.fbo_array[idx]; - priv->large.box = priv->large.box_array[idx]; + priv->fbo = priv->fbo_array[idx]; + priv->box = priv->box_array[idx]; } } @@ -507,33 +489,33 @@ static inline glamor_pixmap_fbo * glamor_pixmap_fbo_at(glamor_pixmap_private *priv, int x, int y) { if (priv->type == GLAMOR_TEXTURE_LARGE) { - assert(x < priv->large.block_wcnt); - assert(y < priv->large.block_hcnt); - return priv->large.fbo_array[y * priv->large.block_wcnt + x]; + assert(x < priv->block_wcnt); + assert(y < priv->block_hcnt); + return priv->fbo_array[y * priv->block_wcnt + x]; } assert (x == 0); assert (y == 0); - return priv->base.fbo; + return priv->fbo; } static inline BoxPtr glamor_pixmap_box_at(glamor_pixmap_private *priv, int x, int y) { if (priv->type == GLAMOR_TEXTURE_LARGE) { - assert(x < priv->large.block_wcnt); - assert(y < priv->large.block_hcnt); - return &priv->large.box_array[y * priv->large.block_wcnt + x]; + assert(x < priv->block_wcnt); + assert(y < priv->block_hcnt); + return &priv->box_array[y * priv->block_wcnt + x]; } assert (x == 0); assert (y == 0); - return &priv->base.box; + return &priv->box; } static inline int glamor_pixmap_wcnt(glamor_pixmap_private *priv) { if (priv->type == GLAMOR_TEXTURE_LARGE) - return priv->large.block_wcnt; + return priv->block_wcnt; return 1; } @@ -541,7 +523,7 @@ static inline int glamor_pixmap_hcnt(glamor_pixmap_private *priv) { if (priv->type == GLAMOR_TEXTURE_LARGE) - return priv->large.block_hcnt; + return priv->block_hcnt; return 1; } @@ -615,7 +597,7 @@ glamor_pixmap_drm_only(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); - return priv && priv->base.type == GLAMOR_DRM_ONLY; + return priv && priv->type == GLAMOR_DRM_ONLY; } /* @@ -626,7 +608,7 @@ glamor_pixmap_is_memory(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); - return !priv || priv->base.type == GLAMOR_TEXTURE_LARGE; + return !priv || priv->type == GLAMOR_TEXTURE_LARGE; } /* @@ -637,7 +619,7 @@ glamor_pixmap_is_large(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); - return priv && priv->base.type == GLAMOR_TEXTURE_LARGE; + return priv && priv->type == GLAMOR_TEXTURE_LARGE; } /* @@ -648,7 +630,7 @@ glamor_pixmap_has_fbo(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); - return priv && priv->base.gl_fbo == GLAMOR_FBO_NORMAL; + return priv && priv->gl_fbo == GLAMOR_FBO_NORMAL; } void glamor_set_pixmap_private(PixmapPtr pixmap, glamor_pixmap_private *priv); diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 3ef9a151b..b961f45d8 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -491,7 +491,7 @@ glamor_set_composite_texture(glamor_screen_private *glamor_priv, int unit, glamor_make_current(glamor_priv); glActiveTexture(GL_TEXTURE0 + unit); - glBindTexture(GL_TEXTURE_2D, pixmap_priv->base.fbo->tex); + glBindTexture(GL_TEXTURE_2D, pixmap_priv->fbo->tex); repeat_type = picture->repeatType; switch (picture->repeatType) { case RepeatNone: @@ -933,7 +933,7 @@ glamor_composite_choose_shader(CARD8 op, * Does it need special handle? */ glamor_fallback("source == dest\n"); } - if (source_pixmap_priv->base.gl_fbo == GLAMOR_FBO_UNATTACHED) { + if (source_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) { #ifdef GLAMOR_PIXMAP_DYNAMIC_UPLOAD source_status = GLAMOR_UPLOAD_PENDING; #else @@ -949,7 +949,7 @@ glamor_composite_choose_shader(CARD8 op, glamor_fallback("mask == dest\n"); goto fail; } - if (mask_pixmap_priv->base.gl_fbo == GLAMOR_FBO_UNATTACHED) { + if (mask_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) { #ifdef GLAMOR_PIXMAP_DYNAMIC_UPLOAD mask_status = GLAMOR_UPLOAD_PENDING; #else diff --git a/glamor/glamor_transform.c b/glamor/glamor_transform.c index eddc46875..7d1e685d2 100644 --- a/glamor/glamor_transform.c +++ b/glamor/glamor_transform.c @@ -173,7 +173,7 @@ glamor_set_texture(PixmapPtr pixmap, return FALSE; glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, texture_priv->base.fbo->tex); + glBindTexture(GL_TEXTURE_2D, texture_priv->fbo->tex); glUniform2f(offset_uniform, off_x, off_y); glUniform2f(size_uniform, texture->drawable.width, texture->drawable.height); diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index 688350dfc..b922771cc 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -51,15 +51,15 @@ #define pixmap_priv_get_scale(_pixmap_priv_, _pxscale_, _pyscale_) \ do { \ - *(_pxscale_) = 1.0 / (_pixmap_priv_)->base.fbo->width; \ - *(_pyscale_) = 1.0 / (_pixmap_priv_)->base.fbo->height; \ + *(_pxscale_) = 1.0 / (_pixmap_priv_)->fbo->width; \ + *(_pyscale_) = 1.0 / (_pixmap_priv_)->fbo->height; \ } while(0) #define PIXMAP_PRIV_GET_ACTUAL_SIZE(pixmap, priv, w, h) \ do { \ if (_X_UNLIKELY(priv->type == GLAMOR_TEXTURE_LARGE)) { \ - w = priv->large.box.x2 - priv->large.box.x1; \ - h = priv->large.box.y2 - priv->large.box.y1; \ + w = priv->box.x2 - priv->box.x1; \ + h = priv->box.y2 - priv->box.y1; \ } else { \ w = (pixmap)->drawable.width; \ h = (pixmap)->drawable.height; \ @@ -70,17 +70,17 @@ do { \ int actual_w, actual_h; \ PIXMAP_PRIV_GET_ACTUAL_SIZE(pixmap, priv, actual_w, actual_h); \ - wh[0] = (float)priv->base.fbo->width / actual_w; \ - wh[1] = (float)priv->base.fbo->height / actual_h; \ - wh[2] = 1.0 / priv->base.fbo->width; \ - wh[3] = 1.0 / priv->base.fbo->height; \ + wh[0] = (float)priv->fbo->width / actual_w; \ + wh[1] = (float)priv->fbo->height / actual_h; \ + wh[2] = 1.0 / priv->fbo->width; \ + wh[3] = 1.0 / priv->fbo->height; \ } while(0) #define pixmap_priv_get_fbo_off(_priv_, _xoff_, _yoff_) \ do { \ if (_X_UNLIKELY(_priv_ && (_priv_)->type == GLAMOR_TEXTURE_LARGE)) { \ - *(_xoff_) = - (_priv_)->large.box.x1; \ - *(_yoff_) = - (_priv_)->large.box.y1; \ + *(_xoff_) = - (_priv_)->box.x1; \ + *(_yoff_) = - (_priv_)->box.y1; \ } else { \ *(_xoff_) = 0; \ *(_yoff_) = 0; \ @@ -204,9 +204,9 @@ DEBUGF("c %f d %f oddx %d oddy %d \n", \ c, d, odd_x, odd_y); \ DEBUGF("x2 %d x1 %d fbo->width %d \n", priv->box.x2, \ - priv->box.x1, priv->base.fbo->width); \ + priv->box.x1, priv->fbo->width); \ DEBUGF("y2 %d y1 %d fbo->height %d \n", priv->box.y2, \ - priv->box.y1, priv->base.fbo->height); \ + priv->box.y1, priv->fbo->height); \ _glamor_repeat_reflect_fixup(tx1, _x1_, c, odd_x, \ (pixmap)->drawable.width, \ priv->box.x1, priv->box.x2); \ @@ -425,16 +425,16 @@ glamor_transform_point(matrix, tx4, ty4, _x1_, _y2_); \ DEBUGF("transformed %f %f %f %f %f %f %f %f\n", \ tx1, ty1, tx2, ty2, tx3, ty3, tx4, ty4); \ - glamor_get_repeat_transform_coords(pixmap, (&priv->large), repeat_type, \ + glamor_get_repeat_transform_coords(pixmap, priv, repeat_type, \ ttx1, tty1, \ tx1, ty1); \ - glamor_get_repeat_transform_coords(pixmap, (&priv->large), repeat_type, \ + glamor_get_repeat_transform_coords(pixmap, priv, repeat_type, \ ttx2, tty2, \ tx2, ty2); \ - glamor_get_repeat_transform_coords(pixmap, (&priv->large), repeat_type, \ + glamor_get_repeat_transform_coords(pixmap, priv, repeat_type, \ ttx3, tty3, \ tx3, ty3); \ - glamor_get_repeat_transform_coords(pixmap, (&priv->large), repeat_type, \ + glamor_get_repeat_transform_coords(pixmap, priv, repeat_type, \ ttx4, tty4, \ tx4, ty4); \ DEBUGF("repeat transformed %f %f %f %f %f %f %f %f\n", ttx1, tty1, \ @@ -526,12 +526,12 @@ if (_X_UNLIKELY(priv->type == GLAMOR_TEXTURE_LARGE)) { \ float tx1, tx2, ty1, ty2; \ if (repeat_type == RepeatPad) { \ - tx1 = _x1_ - priv->large.box.x1; \ - ty1 = _y1_ - priv->large.box.y1; \ + tx1 = _x1_ - priv->box.x1; \ + ty1 = _y1_ - priv->box.y1; \ tx2 = tx1 + ((_x2_) - (_x1_)); \ ty2 = ty1 + ((_y2_) - (_y1_)); \ } else { \ - glamor_get_repeat_coords(pixmap, (&priv->large), repeat_type, \ + glamor_get_repeat_coords(pixmap, priv, repeat_type, \ tx1, ty1, tx2, ty2, \ _x1_, _y1_, _x2_, _y2_); \ } \ @@ -756,9 +756,9 @@ glamor_translate_boxes(BoxPtr boxes, int nbox, int dx, int dy) || _depth_ == 30 \ || _depth_ == 32) -#define GLAMOR_PIXMAP_PRIV_IS_PICTURE(pixmap_priv) (pixmap_priv && pixmap_priv->base.is_picture == 1) -#define GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv) (pixmap_priv && pixmap_priv->base.gl_fbo == GLAMOR_FBO_NORMAL) -#define GLAMOR_PIXMAP_PRIV_HAS_FBO_DOWNLOADED(pixmap_priv) (pixmap_priv && (pixmap_priv->base.gl_fbo == GLAMOR_FBO_DOWNLOADED)) +#define GLAMOR_PIXMAP_PRIV_IS_PICTURE(pixmap_priv) (pixmap_priv && pixmap_priv->is_picture == 1) +#define GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv) (pixmap_priv && pixmap_priv->gl_fbo == GLAMOR_FBO_NORMAL) +#define GLAMOR_PIXMAP_PRIV_HAS_FBO_DOWNLOADED(pixmap_priv) (pixmap_priv && (pixmap_priv->gl_fbo == GLAMOR_FBO_DOWNLOADED)) /** * Borrow from uxa. @@ -811,7 +811,7 @@ format_for_pixmap(PixmapPtr pixmap) pixmap_priv = glamor_get_pixmap_private(pixmap); if (GLAMOR_PIXMAP_PRIV_IS_PICTURE(pixmap_priv)) - pict_format = pixmap_priv->base.picture->format; + pict_format = pixmap_priv->picture->format; else pict_format = format_for_depth((pixmap)->drawable.depth); diff --git a/glamor/glamor_window.c b/glamor/glamor_window.c index 60647bf80..a39e723ef 100644 --- a/glamor/glamor_window.c +++ b/glamor/glamor_window.c @@ -79,16 +79,16 @@ glamor_set_window_pixmap(WindowPtr win, PixmapPtr pPixmap) pixmap_priv = glamor_get_pixmap_private(old); if (GLAMOR_PIXMAP_PRIV_IS_PICTURE(pixmap_priv) && - pixmap_priv->base.picture->pDrawable == (DrawablePtr) win) { - pic = pixmap_priv->base.picture; - pixmap_priv->base.is_picture = 0; - pixmap_priv->base.picture = NULL; + pixmap_priv->picture->pDrawable == (DrawablePtr) win) { + pic = pixmap_priv->picture; + pixmap_priv->is_picture = 0; + pixmap_priv->picture = NULL; } pixmap_priv = glamor_get_pixmap_private(pPixmap); if (pixmap_priv) { - pixmap_priv->base.is_picture = ! !pic; - pixmap_priv->base.picture = pic; + pixmap_priv->is_picture = ! !pic; + pixmap_priv->picture = pic; } } diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c index 74654f5e9..2d5b8e10f 100644 --- a/glamor/glamor_xv.c +++ b/glamor/glamor_xv.c @@ -306,21 +306,21 @@ glamor_xv_render(glamor_port_private *port_priv) glUniform4f(uloc, vco[0], vco[1], vco[2], 0); glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[0]->base.fbo->tex); + glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[0]->fbo->tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glActiveTexture(GL_TEXTURE1); - glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[1]->base.fbo->tex); + glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[1]->fbo->tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[2]->base.fbo->tex); + glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[2]->fbo->tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); |