spirv: Don't accept CPacked decoration on struct members
[mesa.git] / src / compiler / spirv / spirv_to_nir.c
index 12699ce5d6da1b09c19635051fb82577e16e3421..6f29ab624841950396d56d0ba9772f442a10d1e3 100644 (file)
@@ -1041,6 +1041,7 @@ struct_member_decoration_cb(struct vtn_builder *b,
    case SpvDecorationLinkageAttributes:
    case SpvDecorationNoContraction:
    case SpvDecorationInputAttachmentIndex:
+   case SpvDecorationCPacked:
       vtn_warn("Decoration not allowed on struct members: %s",
                spirv_decoration_to_string(dec->decoration));
       break;
@@ -1050,14 +1051,6 @@ struct_member_decoration_cb(struct vtn_builder *b,
       /* This is handled later by var_decoration_cb in vtn_variables.c */
       break;
 
-   case SpvDecorationCPacked:
-      if (b->shader->info.stage != MESA_SHADER_KERNEL)
-         vtn_warn("Decoration only allowed for CL-style kernels: %s",
-                  spirv_decoration_to_string(dec->decoration));
-      else
-         ctx->type->packed = true;
-      break;
-
    case SpvDecorationSaturatedConversion:
    case SpvDecorationFuncParamAttr:
    case SpvDecorationFPRoundingMode: