diff options
author | Dave Airlie <[email protected]> | 2017-01-19 13:43:26 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-01-31 09:29:30 +1000 |
commit | e1e9301b2ad358a65a77b9f1cabae721ae571da4 (patch) | |
tree | 0138a6f82268e8c3e65601c54fa1c11372f7a228 /src/amd | |
parent | 68a77411e1ba81e72b8c174158fa7b162ecf9d69 (diff) |
radv: pass some necessary gs info back to state handling.
We need this info to program some registers.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 5 | ||||
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.h | 2 |
2 files changed, 7 insertions, 0 deletions
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; }; }; |