Revert "radeonsi: remove 8 bytes from si_shader_key with uint32_t ff_tcs_inputs_to_copy"
authorMarek Olšák <marek.olsak@amd.com>
Mon, 19 Jun 2017 23:12:38 +0000 (01:12 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 27 Jun 2017 16:45:07 +0000 (18:45 +0200)
This reverts commit 6b6fed3a3c81c2b0d319ef121df20a0dc914705f.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_state_shaders.c

index 9848ea13f11b6db80d447f1ad6798d24c07cbadd..47e8389e197d8a2897f4356d6de2f729a0ff3650 100644 (file)
@@ -2493,8 +2493,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.u.ff_tcs_inputs_to_copy[0] |
-                ((uint64_t)ctx->shader->key.mono.u.ff_tcs_inputs_to_copy[1] << 32);
+       inputs = ctx->shader->key.mono.u.ff_tcs_inputs_to_copy;
        while (inputs) {
                unsigned i = u_bit_scan64(&inputs);
 
@@ -5320,10 +5319,7 @@ 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.u.ff_tcs_inputs_to_copy[0] = 0x%x\n",
-                       key->mono.u.ff_tcs_inputs_to_copy[0]);
-               fprintf(f, "  mono.u.ff_tcs_inputs_to_copy[1] = 0x%x\n",
-                       key->mono.u.ff_tcs_inputs_to_copy[1]);
+               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:
index 60fe86609b54e37215cb3ee54d3f8ee2e95f0e72..018bae70066b34d63494809a75b233da659d9915 100644 (file)
@@ -492,8 +492,7 @@ struct si_shader_key {
                uint8_t         vs_fix_fetch[SI_MAX_ATTRIBS];
 
                union {
-                       /* Don't use "uint64_t" in order to get 32-bit alignment. */
-                       uint32_t        ff_tcs_inputs_to_copy[2]; /* for fixed-func TCS */
+                       uint64_t        ff_tcs_inputs_to_copy; /* for fixed-func TCS */
                        /* When PS needs PrimID and GS is disabled. */
                        unsigned        vs_export_prim_id:1;
                } u;
index 12eae4cda94c78ddd7a540c0c75a15fdc14b635a..39961e5719ea3c5140ab2a35cf3b0e77c0533354 100644 (file)
@@ -1280,12 +1280,8 @@ static inline void si_shader_selector_key(struct pipe_context *ctx,
                key->part.tcs.epilog.tes_reads_tess_factors =
                        sctx->tes_shader.cso->info.reads_tess_factors;
 
-               if (sel == sctx->fixed_func_tcs_shader.cso) {
-                       uint64_t outputs_written = sctx->vs_shader.cso->outputs_written;
-
-                       key->mono.u.ff_tcs_inputs_to_copy[0] = outputs_written;
-                       key->mono.u.ff_tcs_inputs_to_copy[1] = outputs_written >> 32;
-               }
+               if (sel == sctx->fixed_func_tcs_shader.cso)
+                       key->mono.u.ff_tcs_inputs_to_copy = sctx->vs_shader.cso->outputs_written;
                break;
        case PIPE_SHADER_TESS_EVAL:
                if (sctx->gs_shader.cso)