1 // GENERATED FILE - DO NOT EDIT. 2 // Generated by gen_spirv_builder_and_parser.py using data from spirv.core.grammar.json. 3 // 4 // Copyright 2021 The ANGLE Project Authors. All rights reserved. 5 // Use of this source code is governed by a BSD-style license that can be 6 // found in the LICENSE file. 7 // 8 // spirv_instruction_builder_autogen.h: 9 // Functions to generate SPIR-V binary for each instruction. 10 11 #ifndef COMMON_SPIRV_SPIRVINSTRUCTIONBUILDERAUTOGEN_H_ 12 #define COMMON_SPIRV_SPIRVINSTRUCTIONBUILDERAUTOGEN_H_ 13 14 #include <spirv/unified1/spirv.hpp> 15 16 #include "spirv_types.h" 17 18 namespace angle 19 { 20 namespace spirv 21 { 22 23 void WriteSpirvHeader(std::vector<uint32_t> *blob, uint32_t idCount); 24 void WriteNop(Blob *blob); 25 void WriteUndef(Blob *blob, IdResultType idResultType, IdResult idResult); 26 void WriteSourceContinued(Blob *blob, LiteralString continuedSource); 27 void WriteSource(Blob *blob, 28 spv::SourceLanguage sourceLanguage, 29 LiteralInteger version, 30 const IdRef *file, 31 const LiteralString *source); 32 void WriteSourceExtension(Blob *blob, LiteralString extension); 33 void WriteName(Blob *blob, IdRef target, LiteralString name); 34 void WriteMemberName(Blob *blob, IdRef type, LiteralInteger member, LiteralString name); 35 void WriteString(Blob *blob, IdResult idResult, LiteralString string); 36 void WriteLine(Blob *blob, IdRef file, LiteralInteger line, LiteralInteger column); 37 void WriteExtension(Blob *blob, LiteralString name); 38 void WriteExtInstImport(Blob *blob, IdResult idResult, LiteralString name); 39 void WriteExtInst(Blob *blob, 40 IdResultType idResultType, 41 IdResult idResult, 42 IdRef set, 43 LiteralExtInstInteger instruction, 44 const IdRefList &operandList); 45 void WriteMemoryModel(Blob *blob, 46 spv::AddressingModel addressingModel, 47 spv::MemoryModel memoryModel); 48 void WriteEntryPoint(Blob *blob, 49 spv::ExecutionModel executionModel, 50 IdRef entryPoint, 51 LiteralString name, 52 const IdRefList &interfaceList); 53 void WriteExecutionMode(Blob *blob, 54 IdRef entryPoint, 55 spv::ExecutionMode mode, 56 const LiteralIntegerList &operandsList); 57 void WriteCapability(Blob *blob, spv::Capability capability); 58 void WriteTypeVoid(Blob *blob, IdResult idResult); 59 void WriteTypeBool(Blob *blob, IdResult idResult); 60 void WriteTypeInt(Blob *blob, IdResult idResult, LiteralInteger width, LiteralInteger signedness); 61 void WriteTypeFloat(Blob *blob, IdResult idResult, LiteralInteger width); 62 void WriteTypeVector(Blob *blob, 63 IdResult idResult, 64 IdRef componentType, 65 LiteralInteger componentCount); 66 void WriteTypeMatrix(Blob *blob, IdResult idResult, IdRef columnType, LiteralInteger columnCount); 67 void WriteTypeImage(Blob *blob, 68 IdResult idResult, 69 IdRef sampledType, 70 spv::Dim dim, 71 LiteralInteger depth, 72 LiteralInteger arrayed, 73 LiteralInteger mS, 74 LiteralInteger sampled, 75 spv::ImageFormat imageFormat, 76 const spv::AccessQualifier *accessQualifier); 77 void WriteTypeSampler(Blob *blob, IdResult idResult); 78 void WriteTypeSampledImage(Blob *blob, IdResult idResult, IdRef imageType); 79 void WriteTypeArray(Blob *blob, IdResult idResult, IdRef elementType, IdRef length); 80 void WriteTypeRuntimeArray(Blob *blob, IdResult idResult, IdRef elementType); 81 void WriteTypeStruct(Blob *blob, IdResult idResult, const IdRefList &memberList); 82 void WriteTypePointer(Blob *blob, IdResult idResult, spv::StorageClass storageClass, IdRef type); 83 void WriteTypeFunction(Blob *blob, 84 IdResult idResult, 85 IdRef returnType, 86 const IdRefList ¶meterList); 87 void WriteConstantTrue(Blob *blob, IdResultType idResultType, IdResult idResult); 88 void WriteConstantFalse(Blob *blob, IdResultType idResultType, IdResult idResult); 89 void WriteConstant(Blob *blob, 90 IdResultType idResultType, 91 IdResult idResult, 92 LiteralContextDependentNumber value); 93 void WriteConstantComposite(Blob *blob, 94 IdResultType idResultType, 95 IdResult idResult, 96 const IdRefList &constituentsList); 97 void WriteConstantNull(Blob *blob, IdResultType idResultType, IdResult idResult); 98 void WriteSpecConstantTrue(Blob *blob, IdResultType idResultType, IdResult idResult); 99 void WriteSpecConstantFalse(Blob *blob, IdResultType idResultType, IdResult idResult); 100 void WriteSpecConstant(Blob *blob, 101 IdResultType idResultType, 102 IdResult idResult, 103 LiteralContextDependentNumber value); 104 void WriteSpecConstantComposite(Blob *blob, 105 IdResultType idResultType, 106 IdResult idResult, 107 const IdRefList &constituentsList); 108 void WriteFunction(Blob *blob, 109 IdResultType idResultType, 110 IdResult idResult, 111 spv::FunctionControlMask functionControl, 112 IdRef functionType); 113 void WriteFunctionParameter(Blob *blob, IdResultType idResultType, IdResult idResult); 114 void WriteFunctionEnd(Blob *blob); 115 void WriteFunctionCall(Blob *blob, 116 IdResultType idResultType, 117 IdResult idResult, 118 IdRef function, 119 const IdRefList &argumentList); 120 void WriteVariable(Blob *blob, 121 IdResultType idResultType, 122 IdResult idResult, 123 spv::StorageClass storageClass, 124 const IdRef *initializer); 125 void WriteImageTexelPointer(Blob *blob, 126 IdResultType idResultType, 127 IdResult idResult, 128 IdRef image, 129 IdRef coordinate, 130 IdRef sample); 131 void WriteLoad(Blob *blob, 132 IdResultType idResultType, 133 IdResult idResult, 134 IdRef pointer, 135 const spv::MemoryAccessMask *memoryAccess); 136 void WriteStore(Blob *blob, IdRef pointer, IdRef object, const spv::MemoryAccessMask *memoryAccess); 137 void WriteCopyMemory(Blob *blob, 138 IdRef target, 139 IdRef source, 140 const spv::MemoryAccessMask *memoryAccess); 141 void WriteAccessChain(Blob *blob, 142 IdResultType idResultType, 143 IdResult idResult, 144 IdRef base, 145 const IdRefList &indexesList); 146 void WriteInBoundsAccessChain(Blob *blob, 147 IdResultType idResultType, 148 IdResult idResult, 149 IdRef base, 150 const IdRefList &indexesList); 151 void WriteArrayLength(Blob *blob, 152 IdResultType idResultType, 153 IdResult idResult, 154 IdRef structure, 155 LiteralInteger arraymember); 156 void WriteDecorate(Blob *blob, 157 IdRef target, 158 spv::Decoration decoration, 159 const LiteralIntegerList &valuesList); 160 void WriteMemberDecorate(Blob *blob, 161 IdRef structureType, 162 LiteralInteger member, 163 spv::Decoration decoration, 164 const LiteralIntegerList &valuesList); 165 void WriteDecorationGroup(Blob *blob, IdResult idResult); 166 void WriteGroupDecorate(Blob *blob, IdRef decorationGroup, const IdRefList &targetsList); 167 void WriteGroupMemberDecorate(Blob *blob, 168 IdRef decorationGroup, 169 const PairIdRefLiteralIntegerList &targetsPairList); 170 void WriteVectorExtractDynamic(Blob *blob, 171 IdResultType idResultType, 172 IdResult idResult, 173 IdRef vector, 174 IdRef index); 175 void WriteVectorInsertDynamic(Blob *blob, 176 IdResultType idResultType, 177 IdResult idResult, 178 IdRef vector, 179 IdRef component, 180 IdRef index); 181 void WriteVectorShuffle(Blob *blob, 182 IdResultType idResultType, 183 IdResult idResult, 184 IdRef vector1, 185 IdRef vector2, 186 const LiteralIntegerList &componentsList); 187 void WriteCompositeConstruct(Blob *blob, 188 IdResultType idResultType, 189 IdResult idResult, 190 const IdRefList &constituentsList); 191 void WriteCompositeExtract(Blob *blob, 192 IdResultType idResultType, 193 IdResult idResult, 194 IdRef composite, 195 const LiteralIntegerList &indexesList); 196 void WriteCompositeInsert(Blob *blob, 197 IdResultType idResultType, 198 IdResult idResult, 199 IdRef object, 200 IdRef composite, 201 const LiteralIntegerList &indexesList); 202 void WriteCopyObject(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand); 203 void WriteTranspose(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef matrix); 204 void WriteSampledImage(Blob *blob, 205 IdResultType idResultType, 206 IdResult idResult, 207 IdRef image, 208 IdRef sampler); 209 void WriteImageSampleImplicitLod(Blob *blob, 210 IdResultType idResultType, 211 IdResult idResult, 212 IdRef sampledImage, 213 IdRef coordinate, 214 const spv::ImageOperandsMask *imageOperands, 215 const IdRefList &imageOperandIdsList); 216 void WriteImageSampleExplicitLod(Blob *blob, 217 IdResultType idResultType, 218 IdResult idResult, 219 IdRef sampledImage, 220 IdRef coordinate, 221 spv::ImageOperandsMask imageOperands, 222 const IdRefList &imageOperandIdsList); 223 void WriteImageSampleDrefImplicitLod(Blob *blob, 224 IdResultType idResultType, 225 IdResult idResult, 226 IdRef sampledImage, 227 IdRef coordinate, 228 IdRef dref, 229 const spv::ImageOperandsMask *imageOperands, 230 const IdRefList &imageOperandIdsList); 231 void WriteImageSampleDrefExplicitLod(Blob *blob, 232 IdResultType idResultType, 233 IdResult idResult, 234 IdRef sampledImage, 235 IdRef coordinate, 236 IdRef dref, 237 spv::ImageOperandsMask imageOperands, 238 const IdRefList &imageOperandIdsList); 239 void WriteImageSampleProjImplicitLod(Blob *blob, 240 IdResultType idResultType, 241 IdResult idResult, 242 IdRef sampledImage, 243 IdRef coordinate, 244 const spv::ImageOperandsMask *imageOperands, 245 const IdRefList &imageOperandIdsList); 246 void WriteImageSampleProjExplicitLod(Blob *blob, 247 IdResultType idResultType, 248 IdResult idResult, 249 IdRef sampledImage, 250 IdRef coordinate, 251 spv::ImageOperandsMask imageOperands, 252 const IdRefList &imageOperandIdsList); 253 void WriteImageSampleProjDrefImplicitLod(Blob *blob, 254 IdResultType idResultType, 255 IdResult idResult, 256 IdRef sampledImage, 257 IdRef coordinate, 258 IdRef dref, 259 const spv::ImageOperandsMask *imageOperands, 260 const IdRefList &imageOperandIdsList); 261 void WriteImageSampleProjDrefExplicitLod(Blob *blob, 262 IdResultType idResultType, 263 IdResult idResult, 264 IdRef sampledImage, 265 IdRef coordinate, 266 IdRef dref, 267 spv::ImageOperandsMask imageOperands, 268 const IdRefList &imageOperandIdsList); 269 void WriteImageFetch(Blob *blob, 270 IdResultType idResultType, 271 IdResult idResult, 272 IdRef image, 273 IdRef coordinate, 274 const spv::ImageOperandsMask *imageOperands, 275 const IdRefList &imageOperandIdsList); 276 void WriteImageGather(Blob *blob, 277 IdResultType idResultType, 278 IdResult idResult, 279 IdRef sampledImage, 280 IdRef coordinate, 281 IdRef component, 282 const spv::ImageOperandsMask *imageOperands, 283 const IdRefList &imageOperandIdsList); 284 void WriteImageDrefGather(Blob *blob, 285 IdResultType idResultType, 286 IdResult idResult, 287 IdRef sampledImage, 288 IdRef coordinate, 289 IdRef dref, 290 const spv::ImageOperandsMask *imageOperands, 291 const IdRefList &imageOperandIdsList); 292 void WriteImageRead(Blob *blob, 293 IdResultType idResultType, 294 IdResult idResult, 295 IdRef image, 296 IdRef coordinate, 297 const spv::ImageOperandsMask *imageOperands, 298 const IdRefList &imageOperandIdsList); 299 void WriteImageWrite(Blob *blob, 300 IdRef image, 301 IdRef coordinate, 302 IdRef texel, 303 const spv::ImageOperandsMask *imageOperands, 304 const IdRefList &imageOperandIdsList); 305 void WriteImage(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef sampledImage); 306 void WriteImageQuerySizeLod(Blob *blob, 307 IdResultType idResultType, 308 IdResult idResult, 309 IdRef image, 310 IdRef levelofDetail); 311 void WriteImageQuerySize(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef image); 312 void WriteImageQueryLod(Blob *blob, 313 IdResultType idResultType, 314 IdResult idResult, 315 IdRef sampledImage, 316 IdRef coordinate); 317 void WriteImageQueryLevels(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef image); 318 void WriteImageQuerySamples(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef image); 319 void WriteConvertFToU(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef floatValue); 320 void WriteConvertFToS(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef floatValue); 321 void WriteConvertSToF(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef signedValue); 322 void WriteConvertUToF(Blob *blob, 323 IdResultType idResultType, 324 IdResult idResult, 325 IdRef unsignedValue); 326 void WriteUConvert(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef unsignedValue); 327 void WriteSConvert(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef signedValue); 328 void WriteFConvert(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef floatValue); 329 void WriteQuantizeToF16(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef value); 330 void WriteBitcast(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand); 331 void WriteSNegate(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand); 332 void WriteFNegate(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand); 333 void WriteIAdd(Blob *blob, 334 IdResultType idResultType, 335 IdResult idResult, 336 IdRef operand1, 337 IdRef operand2); 338 void WriteFAdd(Blob *blob, 339 IdResultType idResultType, 340 IdResult idResult, 341 IdRef operand1, 342 IdRef operand2); 343 void WriteISub(Blob *blob, 344 IdResultType idResultType, 345 IdResult idResult, 346 IdRef operand1, 347 IdRef operand2); 348 void WriteFSub(Blob *blob, 349 IdResultType idResultType, 350 IdResult idResult, 351 IdRef operand1, 352 IdRef operand2); 353 void WriteIMul(Blob *blob, 354 IdResultType idResultType, 355 IdResult idResult, 356 IdRef operand1, 357 IdRef operand2); 358 void WriteFMul(Blob *blob, 359 IdResultType idResultType, 360 IdResult idResult, 361 IdRef operand1, 362 IdRef operand2); 363 void WriteUDiv(Blob *blob, 364 IdResultType idResultType, 365 IdResult idResult, 366 IdRef operand1, 367 IdRef operand2); 368 void WriteSDiv(Blob *blob, 369 IdResultType idResultType, 370 IdResult idResult, 371 IdRef operand1, 372 IdRef operand2); 373 void WriteFDiv(Blob *blob, 374 IdResultType idResultType, 375 IdResult idResult, 376 IdRef operand1, 377 IdRef operand2); 378 void WriteUMod(Blob *blob, 379 IdResultType idResultType, 380 IdResult idResult, 381 IdRef operand1, 382 IdRef operand2); 383 void WriteSRem(Blob *blob, 384 IdResultType idResultType, 385 IdResult idResult, 386 IdRef operand1, 387 IdRef operand2); 388 void WriteSMod(Blob *blob, 389 IdResultType idResultType, 390 IdResult idResult, 391 IdRef operand1, 392 IdRef operand2); 393 void WriteFRem(Blob *blob, 394 IdResultType idResultType, 395 IdResult idResult, 396 IdRef operand1, 397 IdRef operand2); 398 void WriteFMod(Blob *blob, 399 IdResultType idResultType, 400 IdResult idResult, 401 IdRef operand1, 402 IdRef operand2); 403 void WriteVectorTimesScalar(Blob *blob, 404 IdResultType idResultType, 405 IdResult idResult, 406 IdRef vector, 407 IdRef scalar); 408 void WriteMatrixTimesScalar(Blob *blob, 409 IdResultType idResultType, 410 IdResult idResult, 411 IdRef matrix, 412 IdRef scalar); 413 void WriteVectorTimesMatrix(Blob *blob, 414 IdResultType idResultType, 415 IdResult idResult, 416 IdRef vector, 417 IdRef matrix); 418 void WriteMatrixTimesVector(Blob *blob, 419 IdResultType idResultType, 420 IdResult idResult, 421 IdRef matrix, 422 IdRef vector); 423 void WriteMatrixTimesMatrix(Blob *blob, 424 IdResultType idResultType, 425 IdResult idResult, 426 IdRef leftMatrix, 427 IdRef rightMatrix); 428 void WriteOuterProduct(Blob *blob, 429 IdResultType idResultType, 430 IdResult idResult, 431 IdRef vector1, 432 IdRef vector2); 433 void WriteDot(Blob *blob, 434 IdResultType idResultType, 435 IdResult idResult, 436 IdRef vector1, 437 IdRef vector2); 438 void WriteIAddCarry(Blob *blob, 439 IdResultType idResultType, 440 IdResult idResult, 441 IdRef operand1, 442 IdRef operand2); 443 void WriteISubBorrow(Blob *blob, 444 IdResultType idResultType, 445 IdResult idResult, 446 IdRef operand1, 447 IdRef operand2); 448 void WriteUMulExtended(Blob *blob, 449 IdResultType idResultType, 450 IdResult idResult, 451 IdRef operand1, 452 IdRef operand2); 453 void WriteSMulExtended(Blob *blob, 454 IdResultType idResultType, 455 IdResult idResult, 456 IdRef operand1, 457 IdRef operand2); 458 void WriteAny(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef vector); 459 void WriteAll(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef vector); 460 void WriteIsNan(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef x); 461 void WriteIsInf(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef x); 462 void WriteLogicalEqual(Blob *blob, 463 IdResultType idResultType, 464 IdResult idResult, 465 IdRef operand1, 466 IdRef operand2); 467 void WriteLogicalNotEqual(Blob *blob, 468 IdResultType idResultType, 469 IdResult idResult, 470 IdRef operand1, 471 IdRef operand2); 472 void WriteLogicalOr(Blob *blob, 473 IdResultType idResultType, 474 IdResult idResult, 475 IdRef operand1, 476 IdRef operand2); 477 void WriteLogicalAnd(Blob *blob, 478 IdResultType idResultType, 479 IdResult idResult, 480 IdRef operand1, 481 IdRef operand2); 482 void WriteLogicalNot(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand); 483 void WriteSelect(Blob *blob, 484 IdResultType idResultType, 485 IdResult idResult, 486 IdRef condition, 487 IdRef object1, 488 IdRef object2); 489 void WriteIEqual(Blob *blob, 490 IdResultType idResultType, 491 IdResult idResult, 492 IdRef operand1, 493 IdRef operand2); 494 void WriteINotEqual(Blob *blob, 495 IdResultType idResultType, 496 IdResult idResult, 497 IdRef operand1, 498 IdRef operand2); 499 void WriteUGreaterThan(Blob *blob, 500 IdResultType idResultType, 501 IdResult idResult, 502 IdRef operand1, 503 IdRef operand2); 504 void WriteSGreaterThan(Blob *blob, 505 IdResultType idResultType, 506 IdResult idResult, 507 IdRef operand1, 508 IdRef operand2); 509 void WriteUGreaterThanEqual(Blob *blob, 510 IdResultType idResultType, 511 IdResult idResult, 512 IdRef operand1, 513 IdRef operand2); 514 void WriteSGreaterThanEqual(Blob *blob, 515 IdResultType idResultType, 516 IdResult idResult, 517 IdRef operand1, 518 IdRef operand2); 519 void WriteULessThan(Blob *blob, 520 IdResultType idResultType, 521 IdResult idResult, 522 IdRef operand1, 523 IdRef operand2); 524 void WriteSLessThan(Blob *blob, 525 IdResultType idResultType, 526 IdResult idResult, 527 IdRef operand1, 528 IdRef operand2); 529 void WriteULessThanEqual(Blob *blob, 530 IdResultType idResultType, 531 IdResult idResult, 532 IdRef operand1, 533 IdRef operand2); 534 void WriteSLessThanEqual(Blob *blob, 535 IdResultType idResultType, 536 IdResult idResult, 537 IdRef operand1, 538 IdRef operand2); 539 void WriteFOrdEqual(Blob *blob, 540 IdResultType idResultType, 541 IdResult idResult, 542 IdRef operand1, 543 IdRef operand2); 544 void WriteFUnordEqual(Blob *blob, 545 IdResultType idResultType, 546 IdResult idResult, 547 IdRef operand1, 548 IdRef operand2); 549 void WriteFOrdNotEqual(Blob *blob, 550 IdResultType idResultType, 551 IdResult idResult, 552 IdRef operand1, 553 IdRef operand2); 554 void WriteFUnordNotEqual(Blob *blob, 555 IdResultType idResultType, 556 IdResult idResult, 557 IdRef operand1, 558 IdRef operand2); 559 void WriteFOrdLessThan(Blob *blob, 560 IdResultType idResultType, 561 IdResult idResult, 562 IdRef operand1, 563 IdRef operand2); 564 void WriteFUnordLessThan(Blob *blob, 565 IdResultType idResultType, 566 IdResult idResult, 567 IdRef operand1, 568 IdRef operand2); 569 void WriteFOrdGreaterThan(Blob *blob, 570 IdResultType idResultType, 571 IdResult idResult, 572 IdRef operand1, 573 IdRef operand2); 574 void WriteFUnordGreaterThan(Blob *blob, 575 IdResultType idResultType, 576 IdResult idResult, 577 IdRef operand1, 578 IdRef operand2); 579 void WriteFOrdLessThanEqual(Blob *blob, 580 IdResultType idResultType, 581 IdResult idResult, 582 IdRef operand1, 583 IdRef operand2); 584 void WriteFUnordLessThanEqual(Blob *blob, 585 IdResultType idResultType, 586 IdResult idResult, 587 IdRef operand1, 588 IdRef operand2); 589 void WriteFOrdGreaterThanEqual(Blob *blob, 590 IdResultType idResultType, 591 IdResult idResult, 592 IdRef operand1, 593 IdRef operand2); 594 void WriteFUnordGreaterThanEqual(Blob *blob, 595 IdResultType idResultType, 596 IdResult idResult, 597 IdRef operand1, 598 IdRef operand2); 599 void WriteShiftRightLogical(Blob *blob, 600 IdResultType idResultType, 601 IdResult idResult, 602 IdRef base, 603 IdRef shift); 604 void WriteShiftRightArithmetic(Blob *blob, 605 IdResultType idResultType, 606 IdResult idResult, 607 IdRef base, 608 IdRef shift); 609 void WriteShiftLeftLogical(Blob *blob, 610 IdResultType idResultType, 611 IdResult idResult, 612 IdRef base, 613 IdRef shift); 614 void WriteBitwiseOr(Blob *blob, 615 IdResultType idResultType, 616 IdResult idResult, 617 IdRef operand1, 618 IdRef operand2); 619 void WriteBitwiseXor(Blob *blob, 620 IdResultType idResultType, 621 IdResult idResult, 622 IdRef operand1, 623 IdRef operand2); 624 void WriteBitwiseAnd(Blob *blob, 625 IdResultType idResultType, 626 IdResult idResult, 627 IdRef operand1, 628 IdRef operand2); 629 void WriteNot(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand); 630 void WriteBitFieldInsert(Blob *blob, 631 IdResultType idResultType, 632 IdResult idResult, 633 IdRef base, 634 IdRef insert, 635 IdRef offset, 636 IdRef count); 637 void WriteBitFieldSExtract(Blob *blob, 638 IdResultType idResultType, 639 IdResult idResult, 640 IdRef base, 641 IdRef offset, 642 IdRef count); 643 void WriteBitFieldUExtract(Blob *blob, 644 IdResultType idResultType, 645 IdResult idResult, 646 IdRef base, 647 IdRef offset, 648 IdRef count); 649 void WriteBitReverse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef base); 650 void WriteBitCount(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef base); 651 void WriteDPdx(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p); 652 void WriteDPdy(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p); 653 void WriteFwidth(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p); 654 void WriteDPdxFine(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p); 655 void WriteDPdyFine(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p); 656 void WriteFwidthFine(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p); 657 void WriteDPdxCoarse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p); 658 void WriteDPdyCoarse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p); 659 void WriteFwidthCoarse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p); 660 void WriteEmitVertex(Blob *blob); 661 void WriteEndPrimitive(Blob *blob); 662 void WriteEmitStreamVertex(Blob *blob, IdRef stream); 663 void WriteEndStreamPrimitive(Blob *blob, IdRef stream); 664 void WriteControlBarrier(Blob *blob, 665 IdScope execution, 666 IdScope memory, 667 IdMemorySemantics semantics); 668 void WriteMemoryBarrier(Blob *blob, IdScope memory, IdMemorySemantics semantics); 669 void WriteAtomicLoad(Blob *blob, 670 IdResultType idResultType, 671 IdResult idResult, 672 IdRef pointer, 673 IdScope scope, 674 IdMemorySemantics semantics); 675 void WriteAtomicStore(Blob *blob, 676 IdRef pointer, 677 IdScope scope, 678 IdMemorySemantics semantics, 679 IdRef value); 680 void WriteAtomicExchange(Blob *blob, 681 IdResultType idResultType, 682 IdResult idResult, 683 IdRef pointer, 684 IdScope scope, 685 IdMemorySemantics semantics, 686 IdRef value); 687 void WriteAtomicCompareExchange(Blob *blob, 688 IdResultType idResultType, 689 IdResult idResult, 690 IdRef pointer, 691 IdScope scope, 692 IdMemorySemantics equal, 693 IdMemorySemantics unequal, 694 IdRef value, 695 IdRef comparator); 696 void WriteAtomicIIncrement(Blob *blob, 697 IdResultType idResultType, 698 IdResult idResult, 699 IdRef pointer, 700 IdScope scope, 701 IdMemorySemantics semantics); 702 void WriteAtomicIDecrement(Blob *blob, 703 IdResultType idResultType, 704 IdResult idResult, 705 IdRef pointer, 706 IdScope scope, 707 IdMemorySemantics semantics); 708 void WriteAtomicIAdd(Blob *blob, 709 IdResultType idResultType, 710 IdResult idResult, 711 IdRef pointer, 712 IdScope scope, 713 IdMemorySemantics semantics, 714 IdRef value); 715 void WriteAtomicISub(Blob *blob, 716 IdResultType idResultType, 717 IdResult idResult, 718 IdRef pointer, 719 IdScope scope, 720 IdMemorySemantics semantics, 721 IdRef value); 722 void WriteAtomicSMin(Blob *blob, 723 IdResultType idResultType, 724 IdResult idResult, 725 IdRef pointer, 726 IdScope scope, 727 IdMemorySemantics semantics, 728 IdRef value); 729 void WriteAtomicUMin(Blob *blob, 730 IdResultType idResultType, 731 IdResult idResult, 732 IdRef pointer, 733 IdScope scope, 734 IdMemorySemantics semantics, 735 IdRef value); 736 void WriteAtomicSMax(Blob *blob, 737 IdResultType idResultType, 738 IdResult idResult, 739 IdRef pointer, 740 IdScope scope, 741 IdMemorySemantics semantics, 742 IdRef value); 743 void WriteAtomicUMax(Blob *blob, 744 IdResultType idResultType, 745 IdResult idResult, 746 IdRef pointer, 747 IdScope scope, 748 IdMemorySemantics semantics, 749 IdRef value); 750 void WriteAtomicAnd(Blob *blob, 751 IdResultType idResultType, 752 IdResult idResult, 753 IdRef pointer, 754 IdScope scope, 755 IdMemorySemantics semantics, 756 IdRef value); 757 void WriteAtomicOr(Blob *blob, 758 IdResultType idResultType, 759 IdResult idResult, 760 IdRef pointer, 761 IdScope scope, 762 IdMemorySemantics semantics, 763 IdRef value); 764 void WriteAtomicXor(Blob *blob, 765 IdResultType idResultType, 766 IdResult idResult, 767 IdRef pointer, 768 IdScope scope, 769 IdMemorySemantics semantics, 770 IdRef value); 771 void WritePhi(Blob *blob, 772 IdResultType idResultType, 773 IdResult idResult, 774 const PairIdRefIdRefList &variableParentPairList); 775 void WriteLoopMerge(Blob *blob, 776 IdRef mergeBlock, 777 IdRef continueTarget, 778 spv::LoopControlMask loopControl); 779 void WriteSelectionMerge(Blob *blob, IdRef mergeBlock, spv::SelectionControlMask selectionControl); 780 void WriteLabel(Blob *blob, IdResult idResult); 781 void WriteBranch(Blob *blob, IdRef targetLabel); 782 void WriteBranchConditional(Blob *blob, 783 IdRef condition, 784 IdRef trueLabel, 785 IdRef falseLabel, 786 const LiteralIntegerList &branchweightsList); 787 void WriteSwitch(Blob *blob, 788 IdRef selector, 789 IdRef default_, 790 const PairLiteralIntegerIdRefList &targetPairList); 791 void WriteKill(Blob *blob); 792 void WriteReturn(Blob *blob); 793 void WriteReturnValue(Blob *blob, IdRef value); 794 void WriteUnreachable(Blob *blob); 795 void WriteGroupAll(Blob *blob, 796 IdResultType idResultType, 797 IdResult idResult, 798 IdScope execution, 799 IdRef predicate); 800 void WriteGroupAny(Blob *blob, 801 IdResultType idResultType, 802 IdResult idResult, 803 IdScope execution, 804 IdRef predicate); 805 void WriteGroupBroadcast(Blob *blob, 806 IdResultType idResultType, 807 IdResult idResult, 808 IdScope execution, 809 IdRef value, 810 IdRef localId); 811 void WriteGroupIAdd(Blob *blob, 812 IdResultType idResultType, 813 IdResult idResult, 814 IdScope execution, 815 spv::GroupOperation operation, 816 IdRef x); 817 void WriteGroupFAdd(Blob *blob, 818 IdResultType idResultType, 819 IdResult idResult, 820 IdScope execution, 821 spv::GroupOperation operation, 822 IdRef x); 823 void WriteGroupFMin(Blob *blob, 824 IdResultType idResultType, 825 IdResult idResult, 826 IdScope execution, 827 spv::GroupOperation operation, 828 IdRef x); 829 void WriteGroupUMin(Blob *blob, 830 IdResultType idResultType, 831 IdResult idResult, 832 IdScope execution, 833 spv::GroupOperation operation, 834 IdRef x); 835 void WriteGroupSMin(Blob *blob, 836 IdResultType idResultType, 837 IdResult idResult, 838 IdScope execution, 839 spv::GroupOperation operation, 840 IdRef x); 841 void WriteGroupFMax(Blob *blob, 842 IdResultType idResultType, 843 IdResult idResult, 844 IdScope execution, 845 spv::GroupOperation operation, 846 IdRef x); 847 void WriteGroupUMax(Blob *blob, 848 IdResultType idResultType, 849 IdResult idResult, 850 IdScope execution, 851 spv::GroupOperation operation, 852 IdRef x); 853 void WriteGroupSMax(Blob *blob, 854 IdResultType idResultType, 855 IdResult idResult, 856 IdScope execution, 857 spv::GroupOperation operation, 858 IdRef x); 859 void WriteImageSparseSampleImplicitLod(Blob *blob, 860 IdResultType idResultType, 861 IdResult idResult, 862 IdRef sampledImage, 863 IdRef coordinate, 864 const spv::ImageOperandsMask *imageOperands, 865 const IdRefList &imageOperandIdsList); 866 void WriteImageSparseSampleExplicitLod(Blob *blob, 867 IdResultType idResultType, 868 IdResult idResult, 869 IdRef sampledImage, 870 IdRef coordinate, 871 spv::ImageOperandsMask imageOperands, 872 const IdRefList &imageOperandIdsList); 873 void WriteImageSparseSampleDrefImplicitLod(Blob *blob, 874 IdResultType idResultType, 875 IdResult idResult, 876 IdRef sampledImage, 877 IdRef coordinate, 878 IdRef dref, 879 const spv::ImageOperandsMask *imageOperands, 880 const IdRefList &imageOperandIdsList); 881 void WriteImageSparseSampleDrefExplicitLod(Blob *blob, 882 IdResultType idResultType, 883 IdResult idResult, 884 IdRef sampledImage, 885 IdRef coordinate, 886 IdRef dref, 887 spv::ImageOperandsMask imageOperands, 888 const IdRefList &imageOperandIdsList); 889 void WriteImageSparseSampleProjImplicitLod(Blob *blob, 890 IdResultType idResultType, 891 IdResult idResult, 892 IdRef sampledImage, 893 IdRef coordinate, 894 const spv::ImageOperandsMask *imageOperands, 895 const IdRefList &imageOperandIdsList); 896 void WriteImageSparseSampleProjExplicitLod(Blob *blob, 897 IdResultType idResultType, 898 IdResult idResult, 899 IdRef sampledImage, 900 IdRef coordinate, 901 spv::ImageOperandsMask imageOperands, 902 const IdRefList &imageOperandIdsList); 903 void WriteImageSparseSampleProjDrefImplicitLod(Blob *blob, 904 IdResultType idResultType, 905 IdResult idResult, 906 IdRef sampledImage, 907 IdRef coordinate, 908 IdRef dref, 909 const spv::ImageOperandsMask *imageOperands, 910 const IdRefList &imageOperandIdsList); 911 void WriteImageSparseSampleProjDrefExplicitLod(Blob *blob, 912 IdResultType idResultType, 913 IdResult idResult, 914 IdRef sampledImage, 915 IdRef coordinate, 916 IdRef dref, 917 spv::ImageOperandsMask imageOperands, 918 const IdRefList &imageOperandIdsList); 919 void WriteImageSparseFetch(Blob *blob, 920 IdResultType idResultType, 921 IdResult idResult, 922 IdRef image, 923 IdRef coordinate, 924 const spv::ImageOperandsMask *imageOperands, 925 const IdRefList &imageOperandIdsList); 926 void WriteImageSparseGather(Blob *blob, 927 IdResultType idResultType, 928 IdResult idResult, 929 IdRef sampledImage, 930 IdRef coordinate, 931 IdRef component, 932 const spv::ImageOperandsMask *imageOperands, 933 const IdRefList &imageOperandIdsList); 934 void WriteImageSparseDrefGather(Blob *blob, 935 IdResultType idResultType, 936 IdResult idResult, 937 IdRef sampledImage, 938 IdRef coordinate, 939 IdRef dref, 940 const spv::ImageOperandsMask *imageOperands, 941 const IdRefList &imageOperandIdsList); 942 void WriteImageSparseTexelsResident(Blob *blob, 943 IdResultType idResultType, 944 IdResult idResult, 945 IdRef residentCode); 946 void WriteNoLine(Blob *blob); 947 void WriteImageSparseRead(Blob *blob, 948 IdResultType idResultType, 949 IdResult idResult, 950 IdRef image, 951 IdRef coordinate, 952 const spv::ImageOperandsMask *imageOperands, 953 const IdRefList &imageOperandIdsList); 954 void WriteGroupIAddNonUniformAMD(Blob *blob, 955 IdResultType idResultType, 956 IdResult idResult, 957 IdScope execution, 958 spv::GroupOperation operation, 959 IdRef x); 960 void WriteGroupFAddNonUniformAMD(Blob *blob, 961 IdResultType idResultType, 962 IdResult idResult, 963 IdScope execution, 964 spv::GroupOperation operation, 965 IdRef x); 966 void WriteGroupFMinNonUniformAMD(Blob *blob, 967 IdResultType idResultType, 968 IdResult idResult, 969 IdScope execution, 970 spv::GroupOperation operation, 971 IdRef x); 972 void WriteGroupUMinNonUniformAMD(Blob *blob, 973 IdResultType idResultType, 974 IdResult idResult, 975 IdScope execution, 976 spv::GroupOperation operation, 977 IdRef x); 978 void WriteGroupSMinNonUniformAMD(Blob *blob, 979 IdResultType idResultType, 980 IdResult idResult, 981 IdScope execution, 982 spv::GroupOperation operation, 983 IdRef x); 984 void WriteGroupFMaxNonUniformAMD(Blob *blob, 985 IdResultType idResultType, 986 IdResult idResult, 987 IdScope execution, 988 spv::GroupOperation operation, 989 IdRef x); 990 void WriteGroupUMaxNonUniformAMD(Blob *blob, 991 IdResultType idResultType, 992 IdResult idResult, 993 IdScope execution, 994 spv::GroupOperation operation, 995 IdRef x); 996 void WriteGroupSMaxNonUniformAMD(Blob *blob, 997 IdResultType idResultType, 998 IdResult idResult, 999 IdScope execution, 1000 spv::GroupOperation operation, 1001 IdRef x); 1002 1003 } // namespace spirv 1004 } // namespace angle 1005 1006 #endif // COMMON_SPIRV_SPIRVINSTRUCTIONBUILDERAUTOGEN_H_ 1007