From e061affa7fb1370a1a00111955e18a97c7a59b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 14 Nov 2022 21:10:16 -0500 Subject: [PATCH] frontend/dri: remove __DRIdrawableRec::dri2::stamp It's practically unused. It was only off by one at initialization, but that didn't have any effect. Reviewed-by: Adam Jackson Part-of: --- src/gallium/frontends/dri/dri2.c | 3 +-- src/gallium/frontends/dri/dri_drawable.c | 5 ----- src/gallium/frontends/dri/dri_util.c | 2 -- src/gallium/frontends/dri/dri_util.h | 14 +++----------- src/gallium/frontends/dri/kopper.c | 2 -- 5 files changed, 4 insertions(+), 22 deletions(-) diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index 9b24aa98d1e..15c83066344 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -103,8 +103,7 @@ dri2_invalidate_drawable(__DRIdrawable *dPriv) { struct dri_drawable *drawable = dri_drawable(dPriv); - dPriv->dri2.stamp++; - drawable->dPriv->lastStamp = drawable->dPriv->dri2.stamp; + drawable->dPriv->lastStamp++; drawable->texture_mask = 0; /* mark all attachments as invalid */ p_atomic_inc(&drawable->base.stamp); diff --git a/src/gallium/frontends/dri/dri_drawable.c b/src/gallium/frontends/dri/dri_drawable.c index 9f312220e97..33bae6bfd10 100644 --- a/src/gallium/frontends/dri/dri_drawable.c +++ b/src/gallium/frontends/dri/dri_drawable.c @@ -66,11 +66,6 @@ dri_st_framebuffer_validate(struct st_context_iface *stctx, /* record newly allocated textures */ new_mask = (statt_mask & ~drawable->texture_mask); - /* - * dPriv->dri2.stamp is the server stamp. dPriv->lastStamp is the - * client stamp. It has the value of the server stamp when last - * checked. - */ do { lastStamp = drawable->dPriv->lastStamp; new_stamp = (drawable->texture_stamp != lastStamp); diff --git a/src/gallium/frontends/dri/dri_util.c b/src/gallium/frontends/dri/dri_util.c index ed102450ecf..0355afb0c0d 100644 --- a/src/gallium/frontends/dri/dri_util.c +++ b/src/gallium/frontends/dri/dri_util.c @@ -850,8 +850,6 @@ driCreateNewDrawable(__DRIscreen *screen, return NULL; } - pdraw->dri2.stamp = pdraw->lastStamp + 1; - return pdraw; } diff --git a/src/gallium/frontends/dri/dri_util.h b/src/gallium/frontends/dri/dri_util.h index 412fda87ea0..d1abc695eb0 100644 --- a/src/gallium/frontends/dri/dri_util.h +++ b/src/gallium/frontends/dri/dri_util.h @@ -296,22 +296,14 @@ struct __DRIdrawableRec { int refcount; /** - * Last value of the stamp. + * Increased when the loader calls invalidate. * - * If this differs from the value stored at __DRIdrawable::dri2.stamp, - * then the drawable information has been modified by the X server, and the - * drawable information (below) should be retrieved from the X server. + * If this changes, the drawable information (below) should be retrieved + * from the loader. */ unsigned int lastStamp; int w, h; - - /** - * Drawable timestamp. Increased when the loader calls invalidate. - */ - struct { - unsigned int stamp; - } dri2; }; extern uint32_t diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index 42edf9f6657..e89ad438f57 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -993,8 +993,6 @@ kopperCreateNewDrawable(__DRIscreen *screen, return NULL; } - pdraw->dri2.stamp = pdraw->lastStamp + 1; - return pdraw; }