if (type->contains_opaque() && !var->data.bindless)
return;
- int index = _mesa_lookup_parameter_index(params, name);
- if (index < 0) {
- unsigned size = type_size(type) * 4;
+ assert(_mesa_lookup_parameter_index(params, name) < 0);
- index = _mesa_add_parameter(params, PROGRAM_UNIFORM, name, size,
- type->gl_type, NULL, NULL);
- }
+ unsigned size = type_size(type) * 4;
+
+ int index = _mesa_add_parameter(params, PROGRAM_UNIFORM, name, size,
+ type->gl_type, NULL, NULL);
/* The first part of the uniform that's processed determines the base
* location of the whole uniform (for structures).