diff options
author | Samuel Pitoiset <[email protected]> | 2018-09-11 11:08:49 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-10-29 17:09:08 +0100 |
commit | dd996d1885a092027153c992be7c9919ea9a3792 (patch) | |
tree | ad59325c803684e70f1c6b90db54c2fdba3ee751 /src | |
parent | 87e6866b043c6fcadc78f34929e48961b885003e (diff) |
radv: gather the number of output components per stream
This will be also used for splitting the GS->VS ring buffer.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_shader.h | 1 | ||||
-rw-r--r-- | src/amd/vulkan/radv_shader_info.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 465c8d160fe..c199b3c27af 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -159,6 +159,7 @@ struct radv_shader_info { } vs; struct { uint8_t output_usage_mask[VARYING_SLOT_VAR31 + 1]; + uint8_t num_stream_output_components[4]; uint8_t max_stream; } gs; struct { diff --git a/src/amd/vulkan/radv_shader_info.c b/src/amd/vulkan/radv_shader_info.c index 00bc2ca5db1..126785120d9 100644 --- a/src/amd/vulkan/radv_shader_info.c +++ b/src/amd/vulkan/radv_shader_info.c @@ -438,11 +438,13 @@ static void gather_info_output_decl_gs(const nir_shader *nir, const nir_variable *var, struct radv_shader_info *info) { + unsigned num_components = glsl_get_component_slots(var->type); unsigned stream = var->data.stream; assert(stream < 4); info->gs.max_stream = MAX2(info->gs.max_stream, stream); + info->gs.num_stream_output_components[stream] += num_components; } static void |