radv: reorder init function calls
authorTimothy Arceri <tarceri@itsqueeze.com>
Sat, 14 Oct 2017 02:14:32 +0000 (13:14 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 17 Oct 2017 22:19:35 +0000 (09:19 +1100)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_pipeline.c

index 5e409ce76703ca0774579b88efefe9b8d2a3b60b..415a6cd62b223f30ece5bf9d8ca32812993206cf 100644 (file)
@@ -1766,6 +1766,8 @@ radv_pipeline_init(struct radv_pipeline *pipeline,
        pipeline->layout = radv_pipeline_layout_from_handle(pCreateInfo->layout);
 
        radv_pipeline_init_dynamic_state(pipeline, pCreateInfo);
+       radv_pipeline_init_blend_state(pipeline, pCreateInfo, extra);
+
        const VkPipelineShaderStageCreateInfo *pStages[MESA_SHADER_STAGES] = { 0, };
        struct radv_shader_module *modules[MESA_SHADER_STAGES] = { 0, };
        for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) {
@@ -1774,8 +1776,6 @@ radv_pipeline_init(struct radv_pipeline *pipeline,
                modules[stage] = radv_shader_module_from_handle(pStages[stage]->module);
        }
 
-       radv_pipeline_init_blend_state(pipeline, pCreateInfo, extra);
-
        if (!modules[MESA_SHADER_FRAGMENT]) {
                nir_builder fs_b;
                nir_builder_init_simple_shader(&fs_b, NULL, MESA_SHADER_FRAGMENT, NULL);