Commit fa7c3237 authored by Jesse Natalie's avatar Jesse Natalie Committed by Erik Faye-Lund
Browse files

Revert "spirv: Don't accept CPacked decoration on struct members"

This reverts commit f7dd66dd.
parent 7724f854
......@@ -939,7 +939,6 @@ 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;
......@@ -949,6 +948,14 @@ 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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment