if(!have_output_vertex_count)
error(*global_err_node, "No vertex count qualifier found on output");
}
+ else if(s.type==Stage::COMPUTE)
+ {
+ if(!have_workgroup_size)
+ error(*global_err_node, "No workgroup size qualifier found");
+ }
}
const char *DeclarationValidator::describe_variable(ScopeType scope)
value = false;
}
else if(q.name=="local_size_x" || q.name=="local_size_y" || q.name=="local_size_z")
+ {
allowed = (stage->type==Stage::COMPUTE && iface_layout && iface_layout->interface=="in");
+ if(allowed)
+ have_workgroup_size = true;
+ }
else if(q.name=="rgba32f" || q.name=="rgba16f" || q.name=="rg32f" || q.name=="rg16f" || q.name=="r32f" || q.name=="r16f" ||
q.name=="rgba16" || q.name=="rgba8" || q.name=="rg16" || q.name=="rg8" || q.name=="r16" || q.name=="r8" ||
q.name=="rgba16_snorm" || q.name=="rgba8_snorm" || q.name=="rg16_snorm" || q.name=="rg8_snorm" || q.name=="r16_snorm" || q.name=="r8_snorm")
bool have_input_primitive = false;
bool have_output_primitive = false;
bool have_output_vertex_count = false;
+ bool have_workgroup_size = false;
public:
void apply(Stage &, const Features &);
--- /dev/null
+#pragma MSP stage(compute)
+layout(r32f) uniform image2D img;
+void main()
+{
+ imageStore(img, ivec2(gl_GlobalInvocationID.xy), vec4(1.0));
+}
+
+/* Expected error:
+<test>:3: No workgroup size qualifier found
+*/