diff options
Diffstat (limited to 'src/compiler/glsl/glsl_to_nir.cpp')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 9b9da7f8187..2e6570e5d6c 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -600,14 +600,17 @@ nir_visitor::visit(ir_variable *ir) var->data.bindless = ir->data.bindless; var->data.offset = ir->data.offset; - var->data.image.access = (gl_access_qualifier)image_access; - var->data.image.format = ir->data.image_format; + if (var->type->is_image()) { + var->data.image.access = (gl_access_qualifier)image_access; + var->data.image.format = ir->data.image_format; + } else { + var->data.xfb.buffer = ir->data.xfb_buffer; + var->data.xfb.stride = ir->data.xfb_stride; + } var->data.fb_fetch_output = ir->data.fb_fetch_output; var->data.explicit_xfb_buffer = ir->data.explicit_xfb_buffer; var->data.explicit_xfb_stride = ir->data.explicit_xfb_stride; - var->data.xfb_buffer = ir->data.xfb_buffer; - var->data.xfb_stride = ir->data.xfb_stride; var->num_state_slots = ir->get_num_state_slots(); if (var->num_state_slots > 0) { |