From: Jason Ekstrand Date: Thu, 14 May 2015 05:16:04 +0000 (-0700) Subject: vk/pipeline: Add an extra flag for force-disabling the vertex shader X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d3d4776202e34e0c6651aa7d701492fb9c6f4254;p=mesa.git vk/pipeline: Add an extra flag for force-disabling the vertex shader This way we can pass in a vertex shader and yet have the pipeline emit an empty 3DSTATE_VS packet. We need this for meta because we need to trick the compiler into not deleting our inputs but at the same time disable the VS so that we can use a rectlist. This should go away once we actually get SPIR-V. --- diff --git a/src/vulkan/pipeline.c b/src/vulkan/pipeline.c index a260c3cd24a..1c4eec5a776 100644 --- a/src/vulkan/pipeline.c +++ b/src/vulkan/pipeline.c @@ -388,7 +388,7 @@ anv_pipeline_create( offset = 1; length = (vue_prog_data->vue_map.num_slots + 1) / 2 - offset; - if (pipeline->vs_simd8 == NO_KERNEL) + if (pipeline->vs_simd8 == NO_KERNEL || (extra && extra->disable_vs)) anv_batch_emit(&pipeline->batch, GEN8_3DSTATE_VS, .FunctionEnable = false, .VertexURBEntryOutputReadOffset = 1, diff --git a/src/vulkan/private.h b/src/vulkan/private.h index fec29306064..b6aac741cdd 100644 --- a/src/vulkan/private.h +++ b/src/vulkan/private.h @@ -583,6 +583,7 @@ struct anv_pipeline_create_info { bool use_repclear; bool disable_viewport; bool disable_scissor; + bool disable_vs; bool use_rectlist; };