freedreno/ir3: add missing track_ubo_use()
[mesa.git] / src / freedreno / ir3 / ir3_nir_analyze_ubo_ranges.c
index 5e631e31d59bd932d8bc18d626f6c166e5e6a102..900768edb036433a12d915f85e7367677b9374fb 100644 (file)
@@ -249,8 +249,10 @@ lower_ubo_load_to_uniform(nir_intrinsic_instr *instr, nir_builder *b,
        /* We don't have a good way of determining the range of the dynamic
         * access in general, so for now just fall back to pulling.
         */
-       if (!nir_src_is_const(instr->src[1]) && !ubo_is_gl_uniforms(&range->ubo))
+       if (!nir_src_is_const(instr->src[1]) && !ubo_is_gl_uniforms(&range->ubo)) {
+               track_ubo_use(instr, b, num_ubos);
                return false;
+       }
 
        /* After gathering the UBO access ranges, we limit the total
         * upload. Don't lower if this load is outside the range.