diff options
author | Chia-I Wu <[email protected]> | 2010-01-12 18:08:02 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-01-14 17:25:19 +0800 |
commit | 6cb89b23eeac50cfb0c5fb8d77e19f869b524eac (patch) | |
tree | 1ce2fd6938d95521cc64e35cfb629d98da4b9260 /src/gallium/state_trackers/egl_g3d/common/native.h | |
parent | 6a2936b87683d39beb81ccba831ae7de47063bc6 (diff) |
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.
Diffstat (limited to 'src/gallium/state_trackers/egl_g3d/common/native.h')
-rw-r--r-- | src/gallium/state_trackers/egl_g3d/common/native.h | 7 |
1 files changed, 4 insertions, 3 deletions
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); /** |