From: Marek Olšák <marek.ol...@amd.com> This reverts commit 6b6fed3a3c81c2b0d319ef121df20a0dc914705f. --- src/gallium/drivers/radeonsi/si_shader.c | 8 ++------ src/gallium/drivers/radeonsi/si_shader.h | 3 +-- src/gallium/drivers/radeonsi/si_state_shaders.c | 8 ++------ 3 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index e525a18..4ee4a64 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2486,22 +2486,21 @@ static void si_copy_tcs_inputs(struct lp_build_tgsi_context *bld_base) invocation_id = unpack_param(ctx, ctx->param_tcs_rel_ids, 8, 5); buffer = desc_from_addr_base64k(ctx, ctx->param_tcs_offchip_addr_base64k); buffer_offset = LLVMGetParam(ctx->main_fn, ctx->param_tcs_offchip_offset); lds_vertex_stride = unpack_param(ctx, ctx->param_vs_state_bits, 24, 8); lds_vertex_offset = LLVMBuildMul(gallivm->builder, invocation_id, lds_vertex_stride, ""); 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); LLVMValueRef lds_ptr = LLVMBuildAdd(gallivm->builder, lds_base, LLVMConstInt(ctx->i32, 4 * i, 0), ""); LLVMValueRef buffer_addr = get_tcs_tes_buffer_address(ctx, get_rel_patch_id(ctx), invocation_id, @@ -5278,24 +5277,21 @@ static void si_dump_shader_key(unsigned processor, const struct si_shader *shade fprintf(f, " mono.u.vs_export_prim_id = %u\n", key->mono.u.vs_export_prim_id); break; case PIPE_SHADER_TESS_CTRL: if (shader->selector->screen->b.chip_class >= GFX9) { si_dump_shader_key_vs(key, &key->part.tcs.ls_prolog, "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: fprintf(f, " as_es = %u\n", key->as_es); fprintf(f, " mono.u.vs_export_prim_id = %u\n", key->mono.u.vs_export_prim_id); break; case PIPE_SHADER_GEOMETRY: if (shader->is_gs_copy_shader) diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 60fe866..018bae7 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -485,22 +485,21 @@ struct si_shader_key { */ unsigned as_es:1; /* export shader, which precedes GS */ unsigned as_ls:1; /* local shader, which precedes TCS */ /* Flags for monolithic compilation only. */ struct { /* One byte for every input: SI_FIX_FETCH_* enums. */ 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; } mono; /* 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 */ diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 668c5d9..c29d9e6 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1273,26 +1273,22 @@ static inline void si_shader_selector_key(struct pipe_context *ctx, si_shader_selector_key_vs(sctx, sctx->vs_shader.cso, key, &key->part.tcs.ls_prolog); key->part.tcs.ls = sctx->vs_shader.cso; } key->part.tcs.epilog.prim_mode = sctx->tes_shader.cso->info.properties[TGSI_PROPERTY_TES_PRIM_MODE]; 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) key->as_es = 1; else { si_shader_selector_key_hw_vs(sctx, sel, key); if (sctx->ps_shader.cso && sctx->ps_shader.cso->info.uses_primid) key->mono.u.vs_export_prim_id = 1; } -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev