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 1907bd5..2bd197e 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;
    }