nir/nir_lower_uniforms_to_ubo: Set the explicit stride of the UBO 0 uniform.

Normal UBOs have explicit strides on them, make our lowered one behave the
same.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12175>
This commit is contained in:
Emma Anholt 2021-08-02 10:47:54 -07:00 committed by Marge Bot
parent 01759d3fb2
commit 33182c555f

View file

@ -147,7 +147,7 @@ nir_lower_uniforms_to_ubo(nir_shader *shader, bool dword_packed, bool load_vec4)
if (shader->num_uniforms > 0) {
const struct glsl_type *type = glsl_array_type(glsl_vec4_type(),
shader->num_uniforms, 0);
shader->num_uniforms, 16);
nir_variable *ubo = nir_variable_create(shader, nir_var_mem_ubo, type,
"uniform_0");
ubo->data.binding = 0;