OSDN Git Service

vc4: Don't bother zero-initializing the shader reloc indices.
authorEric Anholt <eric@anholt.net>
Thu, 25 Dec 2014 22:14:54 +0000 (12:14 -1000)
committerEric Anholt <eric@anholt.net>
Thu, 25 Dec 2014 22:25:41 +0000 (12:25 -1000)
They should all be set to real values by the time they're read, and
ideally if you used valgrind you'd see uninitialized value uses.

src/gallium/drivers/vc4/vc4_cl.h

index 36df11b..5c67f22 100644 (file)
@@ -107,8 +107,8 @@ cl_start_shader_reloc(struct vc4_cl *cl, uint32_t n)
         cl->reloc_count = n;
         cl->reloc_next = cl->next - cl->base;
 
-        for (int i = 0; i < n; i++)
-                cl_u32(cl, 0); /* Space where hindex will be written. */
+        /* Space where hindex will be written. */
+        cl->next += n * 4;
 }
 
 static inline void