summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-06-09 17:59:45 +0200
committerNicolai Hähnle <[email protected]>2017-07-05 12:27:10 +0200
commit10e1d2d9aa4b8fb240923c7b9b3d0bb3ce3b731a (patch)
tree7f800ec2dd087023000d63f645d3979f8dd02fd6
parent9a81d032c12d734ca483e2b822c201527a320213 (diff)
glsl_to_nir: zero-initialize var->data.descriptor_set
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 <[email protected]>
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index 6513484fa01..21530040a96 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -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;