radv/ac: add some geom shader info from nir->ac shader.
authorDave Airlie <airlied@redhat.com>
Wed, 18 Jan 2017 05:11:52 +0000 (15:11 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 30 Jan 2017 23:28:50 +0000 (09:28 +1000)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_nir_to_llvm.c
src/amd/common/ac_nir_to_llvm.h

index f0ac3d364acd7c3d164f8bc16d202cf16a02dc0a..ca5d8ca32e404c8b6033d2afe34a9df442755e89 100644 (file)
@@ -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;
        }
index 9d66f940b52550b42ab51636137ed555d3d7284e..e71189ad3febe2f14fccc85d74781e3b916ad807 100644 (file)
@@ -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;
        };
 };