nir/lower_uniforms_to_ubo: Use nir_foreach_variable_with_modes
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966>
This commit is contained in:

committed by
Marge Bot

parent
d0d5ef6139
commit
90cf4709d9
@@ -105,10 +105,8 @@ nir_lower_uniforms_to_ubo(nir_shader *shader, int multiplier)
|
|||||||
|
|
||||||
if (progress) {
|
if (progress) {
|
||||||
if (!shader->info.first_ubo_is_default_ubo) {
|
if (!shader->info.first_ubo_is_default_ubo) {
|
||||||
nir_foreach_variable(var, &shader->uniforms) {
|
nir_foreach_variable_with_modes(var, shader, nir_var_mem_ubo)
|
||||||
if (var->data.mode == nir_var_mem_ubo)
|
var->data.binding++;
|
||||||
var->data.binding++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
shader->info.num_ubos++;
|
shader->info.num_ubos++;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user