[Mesa-dev] [PATCH 02/92] glsl_to_nir: zero-initialize var->data.descriptor_set
Nicolai Hähnle
nhaehnle at gmail.com
Mon Jun 26 14:09:41 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
This is convenient for backends that support both Vulkan and OpenGL while
lowering samplers to derefs with nir_lower_samplers_as_deref.
---
src/compiler/glsl/glsl_to_nir.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index 6513484..2153004 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -417,20 +417,21 @@ nir_visitor::visit(ir_variable *ir)
var->data.depth_layout = nir_depth_layout_less;
break;
case ir_depth_layout_unchanged:
var->data.depth_layout = nir_depth_layout_unchanged;
break;
default:
unreachable("not reached");
}
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;
var->data.image.write_only = ir->data.memory_write_only;
var->data.image.coherent = ir->data.memory_coherent;
var->data.image._volatile = ir->data.memory_volatile;
var->data.image.restrict_flag = ir->data.memory_restrict;
var->data.image.format = ir->data.image_format;
var->data.fb_fetch_output = ir->data.fb_fetch_output;
--
2.9.3
More information about the mesa-dev
mailing list