From 6cb89b23eeac50cfb0c5fb8d77e19f869b524eac Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 12 Jan 2010 18:08:02 +0800 Subject: st/egl_g3d: Use a sequence number to decide if validation is required. It is not safe to assume that the native surface has not changed since the last validation by checking the geometry alone. Add a sequence number to "validate" callback for that purpose. This is inspired by Luca Barbieri's work. --- src/gallium/state_trackers/egl_g3d/common/native.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gallium/state_trackers/egl_g3d/common/native.h') diff --git a/src/gallium/state_trackers/egl_g3d/common/native.h b/src/gallium/state_trackers/egl_g3d/common/native.h index 5ddcf673607..4714e24b5c6 100644 --- a/src/gallium/state_trackers/egl_g3d/common/native.h +++ b/src/gallium/state_trackers/egl_g3d/common/native.h @@ -65,8 +65,9 @@ struct native_surface { /** * Validate the buffers of the surface. The returned textures are owned by - * the caller. It is possible that this function is called with textures, - * width, or height being NULL. + * the caller. A sequence number is also returned. The caller can use it + * to check if anything has changed since the last call. Any of the pointers + * may be NULL and it indicates the caller has no interest in those values. * * If this function is called multiple times with different attachments, * those not listed in the latest call might be destroyed. This behavior @@ -75,7 +76,7 @@ struct native_surface { boolean (*validate)(struct native_surface *nsurf, const enum native_attachment *natts, unsigned num_natts, - struct pipe_texture **textures, + unsigned int *seq_num, struct pipe_texture **textures, int *width, int *height); /** -- cgit v1.2.3