anv/pipeline: Rework the 3DSTATE_VF_TOPOLOGY helper

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>
This commit is contained in:
Jason Ekstrand
2016-11-12 11:26:05 -08:00
parent 3f480d5dd3
commit 5706d2590f
2 changed files with 9 additions and 11 deletions

View File

@@ -34,15 +34,6 @@
#include "genX_pipeline_util.h" #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 VkResult
genX(graphics_pipeline_create)( genX(graphics_pipeline_create)(
VkDevice _device, VkDevice _device,
@@ -73,8 +64,7 @@ genX(graphics_pipeline_create)(
assert(pCreateInfo->pVertexInputState); assert(pCreateInfo->pVertexInputState);
emit_vertex_input(pipeline, pCreateInfo->pVertexInputState); emit_vertex_input(pipeline, pCreateInfo->pVertexInputState);
assert(pCreateInfo->pInputAssemblyState); emit_3dstate_vf_topology(pipeline);
emit_ia_state(pipeline, pCreateInfo->pInputAssemblyState);
assert(pCreateInfo->pRasterizationState); assert(pCreateInfo->pRasterizationState);
emit_rs_state(pipeline, pCreateInfo->pRasterizationState, emit_rs_state(pipeline, pCreateInfo->pRasterizationState,
pCreateInfo->pMultisampleState, pass, subpass); pCreateInfo->pMultisampleState, pass, subpass);

View File

@@ -1281,6 +1281,14 @@ emit_3dstate_ps_extra(struct anv_pipeline *pipeline)
#endif #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
#endif /* GENX_PIPELINE_UTIL_H */ #endif /* GENX_PIPELINE_UTIL_H */