diff options
author | Marek Olšák <[email protected]> | 2017-04-19 03:37:14 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-04-28 21:47:35 +0200 |
commit | 7df682c291307c730a56b064b8df2cd5c8b1be82 (patch) | |
tree | 67f872b7b43833d81fa8cd71e13cf991bdac8160 /src/gallium/drivers/radeonsi | |
parent | cd99c442c4b5edf6f13506474725dd662d9bb5a2 (diff) |
radeonsi/gfx9: select shader parts for non-monolithic ES-GS
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 21287ae3ed4..18a3cf15251 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -8636,20 +8636,31 @@ static bool si_shader_select_gs_parts(struct si_screen *sscreen, struct si_shader *shader, struct pipe_debug_callback *debug) { - union si_shader_part_key prolog_key; + if (sscreen->b.chip_class >= GFX9) { + struct si_shader *es_main_part = + shader->key.part.gs.es->main_shader_part_es; + + if (shader->key.part.gs.es->type == PIPE_SHADER_VERTEX && + !si_get_vs_prolog(sscreen, tm, shader, debug, es_main_part, + &shader->key.part.gs.vs_prolog)) + return false; + + shader->previous_stage = es_main_part; + } if (!shader->key.part.gs.prolog.tri_strip_adj_fix) return true; + union si_shader_part_key prolog_key; memset(&prolog_key, 0, sizeof(prolog_key)); prolog_key.gs_prolog.states = shader->key.part.gs.prolog; - shader->prolog = si_get_shader_part(sscreen, &sscreen->gs_prologs, + shader->prolog2 = si_get_shader_part(sscreen, &sscreen->gs_prologs, PIPE_SHADER_GEOMETRY, true, &prolog_key, tm, debug, si_build_gs_prolog_function, "Geometry Shader Prolog"); - return shader->prolog != NULL; + return shader->prolog2 != NULL; } /** |