From d3d4776202e34e0c6651aa7d701492fb9c6f4254 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 13 May 2015 22:16:04 -0700 Subject: [PATCH] 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. --- src/vulkan/pipeline.c | 2 +- src/vulkan/private.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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; }; -- 2.30.2