radv: gather the number of streams used by geometry shaders
This will be used for splitting the GS->VS ring buffer. The stream ID is always 0 for now. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
19064b8c3a
commit
87e6866b04
|
@ -159,6 +159,7 @@ struct radv_shader_info {
|
|||
} vs;
|
||||
struct {
|
||||
uint8_t output_usage_mask[VARYING_SLOT_VAR31 + 1];
|
||||
uint8_t max_stream;
|
||||
} gs;
|
||||
struct {
|
||||
uint8_t output_usage_mask[VARYING_SLOT_VAR31 + 1];
|
||||
|
|
|
@ -434,6 +434,17 @@ gather_info_output_decl_ps(const nir_shader *nir, const nir_variable *var,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gather_info_output_decl_gs(const nir_shader *nir, const nir_variable *var,
|
||||
struct radv_shader_info *info)
|
||||
{
|
||||
unsigned stream = var->data.stream;
|
||||
|
||||
assert(stream < 4);
|
||||
|
||||
info->gs.max_stream = MAX2(info->gs.max_stream, stream);
|
||||
}
|
||||
|
||||
static void
|
||||
gather_info_output_decl(const nir_shader *nir, const nir_variable *var,
|
||||
struct radv_shader_info *info,
|
||||
|
@ -447,6 +458,9 @@ gather_info_output_decl(const nir_shader *nir, const nir_variable *var,
|
|||
if (options->key.vs.as_ls)
|
||||
gather_info_output_decl_ls(nir, var, info);
|
||||
break;
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
gather_info_output_decl_gs(nir, var, info);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue