diff options
author | Marek Olšák <marek.olsak@amd.com> | 2017-06-20 01:12:47 +0200 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2017-06-27 18:45:07 +0200 |
commit | 77d2a98353462241306452cc36229f891c4b5af6 (patch) | |
tree | 0c04e455016ab017da38f1278628dd9a3e929f63 /src/gallium | |
parent | dbe45e118027d11bc3fabddf7c64a262694b41af (diff) |
Revert "radeonsi: use uint32_t to declare si_shader_key.opt.kill_outputs"
This reverts commit 7b2240ac9ce3ba9bd86f4ae8aac53af8878c0b10.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 5 |
3 files changed, 6 insertions, 10 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 47e8389e197..42b08bfb845 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2276,7 +2276,6 @@ static void si_llvm_export_vs(struct lp_build_tgsi_context *bld_base, semantic_name = outputs[i].semantic_name; semantic_index = outputs[i].semantic_index; bool export_param = true; - unsigned id; switch (semantic_name) { case TGSI_SEMANTIC_POSITION: /* ignore these */ @@ -2290,8 +2289,8 @@ static void si_llvm_export_vs(struct lp_build_tgsi_context *bld_base, break; /* fall through */ default: - id = si_shader_io_get_unique_index(semantic_name, semantic_index); - if (shader->key.opt.kill_outputs[id / 32] & (1u << (id % 32))) + if (shader->key.opt.kill_outputs & + (1ull << si_shader_io_get_unique_index(semantic_name, semantic_index))) export_param = false; } @@ -5371,8 +5370,7 @@ static void si_dump_shader_key(unsigned processor, const struct si_shader *shade processor == PIPE_SHADER_TESS_EVAL || processor == PIPE_SHADER_VERTEX) && !key->as_es && !key->as_ls) { - fprintf(f, " opt.kill_outputs[0] = 0x%x\n", key->opt.kill_outputs[0]); - fprintf(f, " opt.kill_outputs[1] = 0x%x\n", key->opt.kill_outputs[1]); + fprintf(f, " opt.kill_outputs = 0x%"PRIx64"\n", key->opt.kill_outputs); fprintf(f, " opt.clip_disable = %u\n", key->opt.clip_disable); } } diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 018bae70066..185bb8d6251 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -501,8 +501,7 @@ struct si_shader_key { /* Optimization flags for asynchronous compilation only. */ struct { /* For HW VS (it can be VS, TES, GS) */ - /* Don't use "uint64_t" in order to get 32-bit alignment. */ - uint32_t kill_outputs[2]; /* "get_unique_index" bits */ + uint64_t kill_outputs; /* "get_unique_index" bits */ unsigned clip_disable:1; /* For shaders where monolithic variants have better code. diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 39961e5719e..4eb3b758b4e 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1238,10 +1238,9 @@ static void si_shader_selector_key_hw_vs(struct si_context *sctx, inputs_read = ps->inputs_read; } - uint64_t kill_outputs = ~(outputs_written & inputs_read) & outputs_written; + uint64_t linked = outputs_written & inputs_read; - key->opt.kill_outputs[0] = kill_outputs; - key->opt.kill_outputs[1] = kill_outputs >> 32; + key->opt.kill_outputs = ~linked & outputs_written; } /* Compute the key for the hw shader variant */ |