Module: Mesa Branch: master Commit: 041bae28c674cee32dd24be817598a73c0dba950 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=041bae28c674cee32dd24be817598a73c0dba950
Author: Eric Anholt <[email protected]> Date: Tue Jul 7 12:25:13 2020 -0700 nir: Add a little more docs about NIR's constant_data. I think everyone trips over "how does this relate to nir_const", and I was curious if I could redefine the units of the constant_data_size / indirect offsets. Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6179> --- src/compiler/nir/nir.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index edae673bfa6..0f3578e7f8a 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -3246,10 +3246,14 @@ typedef struct nir_shader { /** Constant data associated with this shader. * - * Constant data is loaded through load_constant intrinsics. See also - * nir_opt_large_constants. + * Constant data is loaded through load_constant intrinsics (as compared to + * the NIR load_const instructions which have the constant value inlined + * into them). This is usually generated by nir_opt_large_constants (so + * shaders don't have to load_const into a temporary array when they want + * to indirect on a const array). */ void *constant_data; + /** Size of the constant data associated with the shader, in bytes */ unsigned constant_data_size; } nir_shader; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
