spirv: mark variables decorated with XfbBuffer as always active
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 5 Oct 2018 12:39:01 +0000 (14:39 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 5 Oct 2018 16:13:25 +0000 (18:13 +0200)
Otherwise, they are removed during NIR linking or in some
lowering passes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/vtn_variables.c

index 358ff4bef7aea6c18466446a0fce97f9aa07304a..636fdb8689ae4326e9af76b895737f9ed2ceadc4 100644 (file)
@@ -1326,6 +1326,7 @@ apply_var_decoration(struct vtn_builder *b,
    case SpvDecorationXfbBuffer:
       var_data->explicit_xfb_buffer = true;
       var_data->xfb_buffer = dec->literals[0];
+      var_data->always_active_io = true;
       break;
    case SpvDecorationXfbStride:
       var_data->explicit_xfb_stride = true;