radv: pass some necessary gs info back to state handling.

We need this info to program some registers.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2017-01-19 13:43:26 +10:00
parent 68a77411e1
commit e1e9301b2a
2 changed files with 7 additions and 0 deletions

View file

@ -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;
}

View file

@ -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;
};
};