vk/compiler: Zero out the vs_prog_data struct when VS is disabled
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 25 May 2015 23:59:24 +0000 (16:59 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 26 May 2015 00:14:49 +0000 (17:14 -0700)
Prevents uninitialized value errors

src/vulkan/compiler.cpp

index 1907bd52cc801c677df62e7fda8b1f8a12a1192e..2bd197e352ba25e4dad25e6ab5a0b580e674c9b5 100644 (file)
@@ -937,6 +937,7 @@ anv_compiler_run(struct anv_compiler *compiler, struct anv_pipeline *pipeline)
       pipeline->prog_data[VK_SHADER_STAGE_VERTEX] = &pipeline->vs_prog_data.base.base;
       pipeline->active_stages |= VK_SHADER_STAGE_VERTEX_BIT;;
    } else {
+      memset(&pipeline->vs_prog_data, 0, sizeof(pipeline->vs_prog_data));
       pipeline->vs_simd8 = NO_KERNEL;
    }