[Mesa-dev] [PATCH V2 06/22] i965: Skip texture validation for immutable-format textures.
Chris Forbes
chrisf at ijw.co.nz
Fri Feb 21 12:48:07 PST 2014
We're about to start sharing miptrees in texture views, and I'd rather
not teach this validation code about nonzero MinLevel or MinLayer when
views are guaranteed complete [and all levels resident in the base
miptree].
The only thing we have to do is set up our _MaxLevel derived state.
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
src/mesa/drivers/dri/i965/intel_tex_validate.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_tex_validate.c b/src/mesa/drivers/dri/i965/intel_tex_validate.c
index d8497a6..c8e1afb 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_validate.c
@@ -77,6 +77,14 @@ intel_finalize_mipmap_tree(struct brw_context *brw, GLuint unit)
if (tObj->Target == GL_TEXTURE_BUFFER)
return true;
+ /* Immutable textures require no validation either -- we set up a correct
+ * miptree for them at creation time.
+ */
+ if (tObj->Immutable) {
+ intel_update_max_level(intelObj, sampler);
+ return true;
+ }
+
/* We know that this is true by now, and if it wasn't, we might have
* mismatched level sizes and the copies would fail.
*/
--
1.9.0
More information about the mesa-dev
mailing list