From e9409c86e7b076801626474dfa5a9151da078a73 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 1 Jun 2017 22:37:25 +0200 Subject: radeonsi: remove 8 bytes from si_shader_key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can use a union in si_shader_key::mono. Reviewed-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gallium/drivers/radeonsi/si_shader.c') diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 5c7deeb250e..2c92269a575 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2492,7 +2492,7 @@ static void si_copy_tcs_inputs(struct lp_build_tgsi_context *bld_base) lds_base = get_tcs_in_current_patch_offset(ctx); lds_base = LLVMBuildAdd(gallivm->builder, lds_base, lds_vertex_offset, ""); - inputs = ctx->shader->key.mono.ff_tcs_inputs_to_copy; + inputs = ctx->shader->key.mono.u.ff_tcs_inputs_to_copy; while (inputs) { unsigned i = u_bit_scan64(&inputs); @@ -3019,7 +3019,7 @@ static void si_llvm_emit_vs_epilogue(struct lp_build_tgsi_context *bld_base) si_llvm_emit_streamout(ctx, outputs, i, 0); /* Export PrimitiveID. */ - if (ctx->shader->key.mono.vs_export_prim_id) { + if (ctx->shader->key.mono.u.vs_export_prim_id) { outputs[i].semantic_name = TGSI_SEMANTIC_PRIMID; outputs[i].semantic_index = 0; outputs[i].values[0] = bitcast(bld_base, TGSI_TYPE_FLOAT, @@ -5273,8 +5273,8 @@ static void si_dump_shader_key(unsigned processor, const struct si_shader *shade "part.vs.prolog", f); fprintf(f, " as_es = %u\n", key->as_es); fprintf(f, " as_ls = %u\n", key->as_ls); - fprintf(f, " mono.vs_export_prim_id = %u\n", - key->mono.vs_export_prim_id); + fprintf(f, " mono.u.vs_export_prim_id = %u\n", + key->mono.u.vs_export_prim_id); break; case PIPE_SHADER_TESS_CTRL: @@ -5283,13 +5283,13 @@ static void si_dump_shader_key(unsigned processor, const struct si_shader *shade "part.tcs.ls_prolog", f); } fprintf(f, " part.tcs.epilog.prim_mode = %u\n", key->part.tcs.epilog.prim_mode); - fprintf(f, " mono.ff_tcs_inputs_to_copy = 0x%"PRIx64"\n", key->mono.ff_tcs_inputs_to_copy); + fprintf(f, " mono.u.ff_tcs_inputs_to_copy = 0x%"PRIx64"\n", key->mono.u.ff_tcs_inputs_to_copy); break; case PIPE_SHADER_TESS_EVAL: fprintf(f, " as_es = %u\n", key->as_es); - fprintf(f, " mono.vs_export_prim_id = %u\n", - key->mono.vs_export_prim_id); + fprintf(f, " mono.u.vs_export_prim_id = %u\n", + key->mono.u.vs_export_prim_id); break; case PIPE_SHADER_GEOMETRY: -- cgit v1.2.3