| 286 | } |
| 287 | |
| 288 | bool Parser::ParseDispatch(Parser::Context &context) { |
| 289 | ProgramInvocation& invocation = program.invocations.emplace_back(); |
| 290 | |
| 291 | if (!ParseInt(context, &invocation.groupCountX)) { |
| 292 | return false; |
| 293 | } |
| 294 | |
| 295 | if (!context.TryNext(",")) { |
| 296 | context.Error("Expected ,"); |
| 297 | return false; |
| 298 | } |
| 299 | |
| 300 | if (!ParseInt(context, &invocation.groupCountY)) { |
| 301 | return false; |
| 302 | } |
| 303 | |
| 304 | if (!context.TryNext(",")) { |
| 305 | context.Error("Expected ,"); |
| 306 | return false; |
| 307 | } |
| 308 | |
| 309 | if (!ParseInt(context, &invocation.groupCountZ)) { |
| 310 | return false; |
| 311 | } |
| 312 | |
| 313 | return true; |
| 314 | } |
| 315 | |
| 316 | bool Parser::ParseResource(Parser::Context &context) { |
| 317 | Resource& resource = program.resources.emplace_back(); |