[Mesa-dev] [PATCH 06/31] radv/ac: add some geom shader info from nir->ac shader.
Dave Airlie
airlied at gmail.com
Fri Jan 20 03:03:02 UTC 2017
From: Dave Airlie <airlied at redhat.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/amd/common/ac_nir_to_llvm.c | 6 ++++++
src/amd/common/ac_nir_to_llvm.h | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 26b87e8..51380ab 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -4646,6 +4646,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 a57558e..9b83dc0 100644
--- a/src/amd/common/ac_nir_to_llvm.h
+++ b/src/amd/common/ac_nir_to_llvm.h
@@ -116,6 +116,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;
};
};
--
2.9.3
More information about the mesa-dev
mailing list