diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2015-06-11 14:55:50 -0700 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2015-06-11 14:55:50 -0700 |
commit | 923e923bbceb76376edb9ddf138ee185105cb75b (patch) | |
tree | a65894d0fded6329cac902ecea5b5c08f32fbca8 /src/vulkan | |
parent | 1dd63fcbed5be028551e8a1d8cb8d3be6f7d544c (diff) |
vk: Compile fragment shader after VS and GS
Just moving code around to do shader stages in the natual order.
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/compiler.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/vulkan/compiler.cpp b/src/vulkan/compiler.cpp index 6adf92b3662..b5a287b622f 100644 --- a/src/vulkan/compiler.cpp +++ b/src/vulkan/compiler.cpp @@ -944,18 +944,7 @@ anv_compiler_run(struct anv_compiler *compiler, struct anv_pipeline *pipeline) } bool success; - struct brw_wm_prog_key wm_key; - struct gl_fragment_program *fp = (struct gl_fragment_program *) - program->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program; - struct brw_fragment_program *bfp = brw_fragment_program(fp); - - brw_wm_populate_key(brw, bfp, &wm_key); - - success = really_do_wm_prog(brw, program, bfp, &wm_key, pipeline); - fail_if(!success, "do_wm_prog failed\n"); - pipeline->prog_data[VK_SHADER_STAGE_FRAGMENT] = &pipeline->wm_prog_data.base; - pipeline->active_stages = VK_SHADER_STAGE_FRAGMENT_BIT; - + pipeline->active_stages = 0; if (pipeline->shaders[VK_SHADER_STAGE_VERTEX]) { struct brw_vs_prog_key vs_key; @@ -991,6 +980,20 @@ anv_compiler_run(struct anv_compiler *compiler, struct anv_pipeline *pipeline) pipeline->gs_vec4 = NO_KERNEL; } + if (pipeline->shaders[VK_SHADER_STAGE_FRAGMENT]) { + struct brw_wm_prog_key wm_key; + struct gl_fragment_program *fp = (struct gl_fragment_program *) + program->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program; + struct brw_fragment_program *bfp = brw_fragment_program(fp); + + brw_wm_populate_key(brw, bfp, &wm_key); + + success = really_do_wm_prog(brw, program, bfp, &wm_key, pipeline); + fail_if(!success, "do_wm_prog failed\n"); + pipeline->prog_data[VK_SHADER_STAGE_FRAGMENT] = &pipeline->wm_prog_data.base; + pipeline->active_stages |= VK_SHADER_STAGE_FRAGMENT_BIT; + } + brw->ctx.Driver.DeleteShaderProgram(&brw->ctx, program); gen7_compute_urb_partition(pipeline); |