From: Dave Airlie Date: Wed, 18 Jan 2017 05:11:52 +0000 (+1000) Subject: radv/ac: add some geom shader info from nir->ac shader. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=583cf8efd4e09565ef2b93d1fa4dc5528aa430e6;p=mesa.git radv/ac: add some geom shader info from nir->ac shader. 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 f0ac3d364ac..ca5d8ca32e4 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -4664,6 +4664,12 @@ void ac_compile_nir_shader(LLVMTargetMachineRef tm, case MESA_SHADER_FRAGMENT: shader_info->fs.early_fragment_test = nir->info->fs.early_fragment_tests; break; + case MESA_SHADER_GEOMETRY: + shader_info->gs.vertices_in = nir->info->gs.vertices_in; + shader_info->gs.vertices_out = nir->info->gs.vertices_out; + shader_info->gs.output_prim = nir->info->gs.output_primitive; + shader_info->gs.invocations = nir->info->gs.invocations; + break; default: break; } diff --git a/src/amd/common/ac_nir_to_llvm.h b/src/amd/common/ac_nir_to_llvm.h index 9d66f940b52..e71189ad3fe 100644 --- a/src/amd/common/ac_nir_to_llvm.h +++ b/src/amd/common/ac_nir_to_llvm.h @@ -118,6 +118,12 @@ struct ac_shader_variant_info { struct { unsigned block_size[3]; } cs; + struct { + unsigned vertices_in; + unsigned vertices_out; + unsigned output_prim; + unsigned invocations; + } gs; }; };