From 3c40be126fcd82ad29fa39ac3a4df6dd67da27e0 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 22 Feb 2018 10:25:37 +0100 Subject: [PATCH] spirv: apply memory qualifiers to images Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/compiler/spirv/vtn_variables.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index ead68b47848..9eb85c24e95 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1332,6 +1332,15 @@ apply_var_decoration(struct vtn_builder *b, nir_variable *nir_var, nir_var->data.read_only = true; nir_var->data.image.read_only = true; break; + case SpvDecorationRestrict: + nir_var->data.image.restrict_flag = true; + break; + case SpvDecorationVolatile: + nir_var->data.image._volatile = true; + break; + case SpvDecorationCoherent: + nir_var->data.image.coherent = true; + break; case SpvDecorationComponent: nir_var->data.location_frac = dec->literals[0]; break; @@ -1378,10 +1387,7 @@ apply_var_decoration(struct vtn_builder *b, nir_variable *nir_var, case SpvDecorationRowMajor: case SpvDecorationColMajor: case SpvDecorationMatrixStride: - case SpvDecorationRestrict: case SpvDecorationAliased: - case SpvDecorationVolatile: - case SpvDecorationCoherent: case SpvDecorationUniform: case SpvDecorationStream: case SpvDecorationOffset: -- 2.30.2