Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
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;
+ shader_info->is_ngg = options->key.gs.as_ngg;
break;
case MESA_SHADER_TESS_EVAL:
shader_info->tes.primitive_mode = nir->info.tess.primitive_mode;
}
if (device->physical_device->rad_info.chip_class >= GFX10) {
- if (nir[MESA_SHADER_TESS_CTRL]) {
+ if (nir[MESA_SHADER_GEOMETRY]) {
+ keys[MESA_SHADER_GEOMETRY].gs.as_ngg = true;
+ } else if (nir[MESA_SHADER_TESS_CTRL]) {
keys[MESA_SHADER_TESS_EVAL].tes.out.as_ngg = true;
} else {
keys[MESA_SHADER_VERTEX].vs.out.as_ngg = true;
uint32_t is_int10;
};
+
+struct radv_gs_variant_key {
+ uint32_t as_ngg:1;
+};
+
struct radv_shader_variant_key {
union {
struct radv_vs_variant_key vs;
struct radv_fs_variant_key fs;
struct radv_tes_variant_key tes;
struct radv_tcs_variant_key tcs;
+ struct radv_gs_variant_key gs;
};
bool has_multiview_view_index;
};