[Mesa-dev] [PATCH 02/92] glsl_to_nir: zero-initialize var->data.descriptor_set
Timothy Arceri
tarceri at itsqueeze.com
Mon Jul 3 00:04:37 UTC 2017
I wonder if we should just change to using:
nir_variable *var = rzalloc(shader, nir_variable)
Either way:
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
On 27/06/17 00:09, Nicolai Hähnle wrote:
> 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;
>
>
More information about the mesa-dev
mailing list