From: Alejandro PiƱeiro Date: Mon, 4 Dec 2017 15:29:34 +0000 (+0100) Subject: spirv/nir: fill up nir variable info for ubos and ssbo X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=15f134412f690e3c23f5f3a14de2e4cd38dde852;p=mesa.git spirv/nir: fill up nir variable info for ubos and ssbo The data for some nir variables is only filled up for some specific modes. We need now too for UBO/SSBO, as such info would be used when linking for OpenGL (ARB_gl_spirv). There is an existing comment just before that code (starts with XXX) that points that binding still needs to be filled up for uniform variables at that point, and that should be fixed, although it doesn't specify why that's a problem or what would be the alternative. For now doing the same for UBO/SSBO, and will hope that the future fixing is done for all of them. Reviewed-by: Timothy Arceri --- diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index c640e3aa670..b7ec2edd06c 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -2292,7 +2292,9 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val, assign_missing_member_locations(var); } - if (var->mode == vtn_variable_mode_uniform) { + if (var->mode == vtn_variable_mode_uniform || + var->mode == vtn_variable_mode_ubo || + var->mode == vtn_variable_mode_ssbo) { /* XXX: We still need the binding information in the nir_variable * for these. We should fix that. */