[Mesa-dev] [PATCH 14/31] radv: pass some necessary gs info back to state handling.
Dave Airlie
airlied at gmail.com
Fri Jan 20 03:03:10 UTC 2017
From: Dave Airlie <airlied at redhat.com>
We need this info to program some registers.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/amd/common/ac_nir_to_llvm.c | 5 +++++
src/amd/common/ac_nir_to_llvm.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 54bce97..86f9277 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -4600,6 +4600,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 dda27be..e586355 100644
--- a/src/amd/common/ac_nir_to_llvm.h
+++ b/src/amd/common/ac_nir_to_llvm.h
@@ -126,6 +126,8 @@ struct ac_shader_variant_info {
unsigned vertices_out;
unsigned output_prim;
unsigned invocations;
+ unsigned gsvs_vertex_size;
+ unsigned max_gsvs_emit_size;
} gs;
};
};
--
2.9.3
More information about the mesa-dev
mailing list