glsl_to_nir: zero-initialize var->data.descriptor_set
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 9 Jun 2017 15:59:45 +0000 (17:59 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 5 Jul 2017 10:27:10 +0000 (12:27 +0200)
This is convenient for backends that support both Vulkan and OpenGL while
lowering samplers to derefs with nir_lower_samplers_as_deref.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/glsl_to_nir.cpp

index 6513484fa015ee81fe728dd4c24cd779d809695b..21530040a9691e88b187fdfa743e6b676bca29ba 100644 (file)
@@ -424,6 +424,7 @@ nir_visitor::visit(ir_variable *ir)
    }
 
    var->data.index = ir->data.index;
+   var->data.descriptor_set = 0;
    var->data.binding = ir->data.binding;
    var->data.offset = ir->data.offset;
    var->data.image.read_only = ir->data.memory_read_only;