anv/pipeline: Rework the 3DSTATE_VF_TOPOLOGY helper
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 12 Nov 2016 19:26:05 +0000 (11:26 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 16 Nov 2016 18:09:08 +0000 (10:09 -0800)
It gets a new name and moved to genX_pipeline_util.h.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/intel/vulkan/gen8_pipeline.c
src/intel/vulkan/genX_pipeline_util.h

index 1059c9c65999cb0c7bff4a7c2c3b38b1e92579da..186d0401f3546fc1d15fd2e5a833545141b96d07 100644 (file)
 
 #include "genX_pipeline_util.h"
 
-static void
-emit_ia_state(struct anv_pipeline *pipeline,
-              const VkPipelineInputAssemblyStateCreateInfo *info)
-{
-   anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VF_TOPOLOGY), vft) {
-      vft.PrimitiveTopologyType = pipeline->topology;
-   }
-}
-
 VkResult
 genX(graphics_pipeline_create)(
     VkDevice                                    _device,
@@ -73,8 +64,7 @@ genX(graphics_pipeline_create)(
 
    assert(pCreateInfo->pVertexInputState);
    emit_vertex_input(pipeline, pCreateInfo->pVertexInputState);
-   assert(pCreateInfo->pInputAssemblyState);
-   emit_ia_state(pipeline, pCreateInfo->pInputAssemblyState);
+   emit_3dstate_vf_topology(pipeline);
    assert(pCreateInfo->pRasterizationState);
    emit_rs_state(pipeline, pCreateInfo->pRasterizationState,
                  pCreateInfo->pMultisampleState, pass, subpass);
index ec98a78f097194e52cfaa5357e4d603b9c47cfc0..efdb7d392c73c0ca93d6c40ec98eff998cf924b0 100644 (file)
@@ -1281,6 +1281,14 @@ emit_3dstate_ps_extra(struct anv_pipeline *pipeline)
 #endif
    }
 }
+
+static void
+emit_3dstate_vf_topology(struct anv_pipeline *pipeline)
+{
+   anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VF_TOPOLOGY), vft) {
+      vft.PrimitiveTopologyType = pipeline->topology;
+   }
+}
 #endif
 
 #endif /* GENX_PIPELINE_UTIL_H */