Module: Mesa Branch: master Commit: 8e428e24a833175c108e4151676a85a31bd99efd URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8e428e24a833175c108e4151676a85a31bd99efd
Author: Samuel Pitoiset <[email protected]> Date: Thu Sep 13 15:39:43 2018 +0200 radv: gather which GS stream is used for every outputs To only emit outputs for the given stream. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]> --- src/amd/vulkan/radv_shader.h | 1 + src/amd/vulkan/radv_shader_info.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index c199b3c27a..6511538dac 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -160,6 +160,7 @@ struct radv_shader_info { struct { uint8_t output_usage_mask[VARYING_SLOT_VAR31 + 1]; uint8_t num_stream_output_components[4]; + uint8_t output_streams[VARYING_SLOT_VAR31 + 1]; 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 126785120d..29f5f68a32 100644 --- a/src/amd/vulkan/radv_shader_info.c +++ b/src/amd/vulkan/radv_shader_info.c @@ -440,11 +440,13 @@ gather_info_output_decl_gs(const nir_shader *nir, const nir_variable *var, { unsigned num_components = glsl_get_component_slots(var->type); unsigned stream = var->data.stream; + unsigned idx = var->data.location; assert(stream < 4); info->gs.max_stream = MAX2(info->gs.max_stream, stream); info->gs.num_stream_output_components[stream] += num_components; + info->gs.output_streams[idx] = stream; } static void _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
