From: Dave Airlie Date: Thu, 19 Jan 2017 03:43:26 +0000 (+1000) Subject: radv: pass some necessary gs info back to state handling. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1e9301b2ad358a65a77b9f1cabae721ae571da4;p=mesa.git radv: pass some necessary gs info back to state handling. We need this info to program some registers. Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Dave Airlie --- diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 844938af462..19952b3a310 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -4620,6 +4620,11 @@ LLVMModuleRef ac_translate_nir_to_llvm(LLVMTargetMachineRef tm, ralloc_free(ctx.defs); ralloc_free(ctx.phis); + if (nir->stage == MESA_SHADER_GEOMETRY) { + shader_info->gs.gsvs_vertex_size = util_bitcount64(ctx.output_mask) * 16; + shader_info->gs.max_gsvs_emit_size = shader_info->gs.gsvs_vertex_size * + nir->info->gs.vertices_out; + } return ctx.module; } diff --git a/src/amd/common/ac_nir_to_llvm.h b/src/amd/common/ac_nir_to_llvm.h index 783331160e5..589a9a9e08e 100644 --- a/src/amd/common/ac_nir_to_llvm.h +++ b/src/amd/common/ac_nir_to_llvm.h @@ -127,6 +127,8 @@ struct ac_shader_variant_info { unsigned vertices_out; unsigned output_prim; unsigned invocations; + unsigned gsvs_vertex_size; + unsigned max_gsvs_emit_size; } gs; }; };