diff options
author | Timothy Arceri <[email protected]> | 2017-06-10 14:52:46 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-06-13 11:24:32 +1000 |
commit | 2e28e8b199abab76fa9509d3247b44a2cb31921d (patch) | |
tree | 9d02da76e15599aad2a7df24de1736909813b63c /src/mesa/state_tracker/st_texture.h | |
parent | 95c0591087ae9ecfb7be49fb73694c7222d42599 (diff) |
st/mesa: skip texture validation logic when nothing has changed
Based on the same logic in the i965 driver 2f225f61451abd51 and
16060c5adcd4.
perf reports st_finalize_texture() going from 0.60% -> 0.16% with
this change when running the Xonotic benchmark from PTS.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_texture.h')
-rw-r--r-- | src/mesa/state_tracker/st_texture.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h index 1b4d1a3ea23..c02d13598ba 100644 --- a/src/mesa/state_tracker/st_texture.h +++ b/src/mesa/state_tracker/st_texture.h @@ -84,6 +84,9 @@ struct st_texture_object */ GLuint lastLevel; + unsigned int validated_first_level; + unsigned int validated_last_level; + /* On validation any active images held in main memory or in other * textures will be copied to this texture and the old storage freed. */ @@ -121,6 +124,12 @@ struct st_texture_object unsigned prev_glsl_version; /** The value of the sampler's sRGBDecode state at the previous validation */ GLenum prev_sRGBDecode; + + /** + * Set when the texture images of this texture object might not all be in + * the pipe_resource *pt above. + */ + bool needs_validation; }; |