diff options
author | Samuel Pitoiset <[email protected]> | 2018-02-22 10:25:37 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-02-22 20:39:53 +0100 |
commit | 3c40be126fcd82ad29fa39ac3a4df6dd67da27e0 (patch) | |
tree | 98698e9cc6cc5c5d11adf4038b8049d86cd8cbdd /src | |
parent | 540e49e1054d60f5f3809b6efc828ac4cac8c708 (diff) |
spirv: apply memory qualifiers to images
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 12 |
1 files 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: |