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 <hoegsberg@google.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6359>
This commit is contained in:
@@ -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"
|
||||
|
Reference in New Issue
Block a user