vk/pipeline: Add an extra flag for force-disabling the vertex shader
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 14 May 2015 05:16:04 +0000 (22:16 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 14 May 2015 05:23:30 +0000 (22:23 -0700)
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
src/vulkan/private.h

index a260c3cd24a0803075de7ee6ada22dcbf1007cf5..1c4eec5a7768de2af5cd2cd136e38526b4ed37e4 100644 (file)
@@ -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,
index fec29306064b17d0c525be7c276b581db146576e..b6aac741cdd3f1a3e08ed46044390b80d2bcced0 100644 (file)
@@ -583,6 +583,7 @@ struct anv_pipeline_create_info {
    bool                                         use_repclear;
    bool                                         disable_viewport;
    bool                                         disable_scissor;
+   bool                                         disable_vs;
    bool                                         use_rectlist;
 };