summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-12-15 15:08:17 -0700
committerBrian Paul <[email protected]>2017-12-20 11:23:16 -0700
commit06588a065fdfd642917af5710fbedcbc941bb97d (patch)
treeaf8496a46d4e4043a35d163de759605f03031145 /src/compiler/glsl
parent544f41ff19426ad0fa07eed7e7cc3748aaa16dfa (diff)
glsl: document varying_matches::assign_locations() params and return value
And change *components to components[] as a reminder that it's an array. Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/link_varyings.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index a1c2d424d40..7f42f8a2150 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -1468,7 +1468,7 @@ public:
~varying_matches();
void record(ir_variable *producer_var, ir_variable *consumer_var);
unsigned assign_locations(struct gl_shader_program *prog,
- uint8_t *components,
+ uint8_t components[],
uint64_t reserved_slots);
void store_locations() const;
@@ -1742,10 +1742,15 @@ varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var)
/**
* Choose locations for all of the variable matches that were previously
* passed to varying_matches::record().
+ * \param components returns array[slot] of number of components used
+ * per slot (1, 2, 3 or 4)
+ * \param reserved_slots bitmask indicating which varying slots are already
+ * allocated
+ * \return number of slots (4-element vectors) allocated
*/
unsigned
varying_matches::assign_locations(struct gl_shader_program *prog,
- uint8_t *components,
+ uint8_t components[],
uint64_t reserved_slots)
{
/* If packing has been disabled then we cannot safely sort the varyings by