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 <tarceri@itsqueeze.com>
This commit is contained in:
Alejandro Piñeiro 2017-12-04 16:29:34 +01:00 committed by Arcady Goldmints-Orlov
parent 7d7ab34d5f
commit 15f134412f
1 changed files with 3 additions and 1 deletions

View File

@ -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.
*/