summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorAndres Gomez <[email protected]>2019-01-02 15:21:17 +0200
committerAndres Gomez <[email protected]>2019-01-04 09:04:31 +0200
commitf0312cfa93344a0fdaf008c808d9efc21ced9d9c (patch)
treedfa0286a5ff962cc33805ce21749dd8b853822f6 /src/compiler
parent6b7aea9d8571a326c234c06de8986b60e3417ff1 (diff)
glsl/linker: complete documentation for assign_attribute_or_color_locations
Commit 27f1298b9d9 ("glsl/linker: validate attribute aliasing before optimizations") forgot to complete the documentation. Cc: Tapani Pälli <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/linker.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 17fe0a58448..08e9fb721f8 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -2693,18 +2693,22 @@ find_available_slots(unsigned used_mask, unsigned needed_count)
#define SAFE_MASK_FROM_INDEX(i) (((i) >= 32) ? ~0 : ((1 << (i)) - 1))
/**
- * Assign locations for either VS inputs or FS outputs
+ * Assign locations for either VS inputs or FS outputs.
*
- * \param mem_ctx Temporary ralloc context used for linking
- * \param prog Shader program whose variables need locations assigned
- * \param constants Driver specific constant values for the program.
- * \param target_index Selector for the program target to receive location
- * assignmnets. Must be either \c MESA_SHADER_VERTEX or
- * \c MESA_SHADER_FRAGMENT.
+ * \param mem_ctx Temporary ralloc context used for linking.
+ * \param prog Shader program whose variables need locations
+ * assigned.
+ * \param constants Driver specific constant values for the program.
+ * \param target_index Selector for the program target to receive location
+ * assignmnets. Must be either \c MESA_SHADER_VERTEX or
+ * \c MESA_SHADER_FRAGMENT.
+ * \param do_assignment Whether we are actually marking the assignment or we
+ * are just doing a dry-run checking.
*
* \return
- * If locations are successfully assigned, true is returned. Otherwise an
- * error is emitted to the shader link log and false is returned.
+ * If locations are (or can be, in case of dry-running) successfully assigned,
+ * true is returned. Otherwise an error is emitted to the shader link log and
+ * false is returned.
*/
static bool
assign_attribute_or_color_locations(void *mem_ctx,