From: Kristian Høgsberg Date: Tue, 12 May 2015 05:12:56 +0000 (-0700) Subject: vk: Allow NULL as a valid pipeline layout X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20ad071190b02c9fd904a0c969ce08318f015af9;p=mesa.git vk: Allow NULL as a valid pipeline layout Vertex buffers and render targets aren't part of the layout so having an empty layout is pretty common. --- diff --git a/src/vulkan/compiler.cpp b/src/vulkan/compiler.cpp index d7428d8a877..39858426cf4 100644 --- a/src/vulkan/compiler.cpp +++ b/src/vulkan/compiler.cpp @@ -61,6 +61,10 @@ set_binding_table_layout(struct brw_stage_prog_data *prog_data, struct anv_pipeline_layout_entry *entries; + /* No layout is valid for shaders that don't bind any resources. */ + if (pipeline->layout == NULL) + return VK_SUCCESS; + if (stage == VK_SHADER_STAGE_FRAGMENT) bias = MAX_RTS; else