[Mesa-dev] [PATCH 05/15] radv: gather the number of output components per stream
Samuel Pitoiset
samuel.pitoiset at gmail.com
Sat Oct 13 12:57:29 UTC 2018
This will be also used for splitting the GS->VS ring buffer.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
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 f02ca1cf8d..cf7bb580b5 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 00bc2ca5db..126785120d 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
--
2.19.1
More information about the mesa-dev
mailing list