diff options
author | Christian Gmeiner <[email protected]> | 2019-08-12 15:18:20 +0200 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2019-08-14 15:10:07 +0200 |
commit | f90b23b8c4f5987ab061c3a30bfe4fe030ec08c9 (patch) | |
tree | 14bee8833190b03fdfbbc470cf15e8ae16975ce9 /src/gallium/drivers | |
parent | 0765a1dd0ec59646b6cca80b424be3ce094176d7 (diff) |
etnaviv: split link_shader
Signed-off-by: Christian Gmeiner <[email protected]>
Reviewed-by: Jonathan Marek <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_compiler_tgsi.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_shader.c | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler_tgsi.c b/src/gallium/drivers/etnaviv/etnaviv_compiler_tgsi.c index 72fab578a1e..3b8f43c5c2b 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_compiler_tgsi.c +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler_tgsi.c @@ -2561,9 +2561,6 @@ bool etna_link_shader(struct etna_shader_link_info *info, const struct etna_shader_variant *vs, const struct etna_shader_variant *fs) { - if (DBG_ENABLED(ETNA_DBG_NIR)) - return etna_link_shader_nir(info, vs, fs); - int comp_ofs = 0; /* For each fragment input we need to find the associated vertex shader * output, which can be found by matching on semantic name and index. A diff --git a/src/gallium/drivers/etnaviv/etnaviv_shader.c b/src/gallium/drivers/etnaviv/etnaviv_shader.c index a87e94b2b01..1f0d117eac1 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_shader.c +++ b/src/gallium/drivers/etnaviv/etnaviv_shader.c @@ -67,6 +67,7 @@ etna_link_shaders(struct etna_context *ctx, struct compiled_shader_state *cs, struct etna_shader_variant *vs, struct etna_shader_variant *fs) { struct etna_shader_link_info link = { }; + bool failed; assert(vs->stage == MESA_SHADER_VERTEX); assert(fs->stage == MESA_SHADER_FRAGMENT); @@ -83,7 +84,12 @@ etna_link_shaders(struct etna_context *ctx, struct compiled_shader_state *cs, } #endif - if (etna_link_shader(&link, vs, fs)) { + if (DBG_ENABLED(ETNA_DBG_NIR)) + failed = etna_link_shader_nir(&link, vs, fs); + else + failed = etna_link_shader(&link, vs, fs); + + if (failed) { /* linking failed: some fs inputs do not have corresponding * vs outputs */ assert(0); |