Module: Mesa Branch: master Commit: 3a9356831a962997e37589c7a04e12aaa85a99e3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3a9356831a962997e37589c7a04e12aaa85a99e3
Author: Eric Anholt <[email protected]> Date: Fri Aug 14 13:22:27 2020 -0700 nir: Update the comment about nir_lower_uniforms_to_ubo()'s multiplier. I remembered doing this analysis and was arguing in another MR that this pass didn't have any driver dependency, but it actually does based on PIPE_CAP_PACKED_UNIFORMS. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6359> --- src/compiler/nir/nir_lower_uniforms_to_ubo.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/compiler/nir/nir_lower_uniforms_to_ubo.c b/src/compiler/nir/nir_lower_uniforms_to_ubo.c index bdee9e927cb..78afc7f6232 100644 --- a/src/compiler/nir/nir_lower_uniforms_to_ubo.c +++ b/src/compiler/nir/nir_lower_uniforms_to_ubo.c @@ -26,13 +26,16 @@ * Simultaneously, remap existing UBO accesses by increasing their binding * point by 1. * - * Both the base and the offset are interpreted as 16-byte units. + * Note that nir_intrinsic_load_uniform base/ranges can be set in different + * units, and the multiplier argument caters to supporting these different + * units. * - * Note that locations can be set in different units, and the multiplier - * argument caters to supporting these different units. * For example: - * - st_glsl_to_nir uses dwords (4 bytes) so the multiplier should be 4 - * - tgsi_to_nir uses bytes, so the multiplier should be 16 + * - st_glsl_to_nir for PIPE_CAP_PACKED_UNIFORMS uses dwords (4 bytes) so the + * multiplier should be 4 + * - st_glsl_to_nir for !PIPE_CAP_PACKED_UNIFORMS uses vec4s so the + * multiplier should be 16 + * - tgsi_to_nir uses vec4s, so the multiplier should be 16 */ #include "nir.h" _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
