[Mesa-dev] [PATCH 08/21] glsl: Initialize lod_info in the ir_texture constructor.

Kenneth Graunke kenneth at whitecape.org
Wed Sep 4 15:22:31 PDT 2013


This isn't strictly necessary, since creators of ir_texture objects
should set LOD when relevant.  However, it's nice to have a NULL pointer
in case they forget.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/glsl/ir.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index c673aac..de41858 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1568,6 +1568,7 @@ public:
         shadow_comparitor(NULL), offset(NULL)
    {
       this->ir_type = ir_type_texture;
+      memset(&lod_info, 0, sizeof(lod_info));
    }
 
    virtual ir_texture *clone(void *mem_ctx, struct hash_table *) const;
-- 
1.8.3.4



More information about the mesa-dev mailing list