Commit Graph

6 Commits

Author SHA1 Message Date
Ben Clayton f25d51977a Move IntrinsicType parsing to semantic/intrinsic.h
Keeps the enum / parse / print code all together.

Change-Id: I78e5e15b6a97d3aec619a94e4390ecc4a77ab478
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/43980
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-03-04 23:00:46 +00:00
Ben Clayton 7732ca51c4 Rename TINT_INSTANTIATE_CLASS_ID()
to TINT_INSTANTIATE_TYPEINFO()

ClassID isn't a thing any more.

Change-Id: Ie1c0d4a95e58ef7166d3cab5ef733a2dfc702345
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/42921
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-03-02 20:51:18 +00:00
Alan Baker cd17ea88e3 Implement data unpacking intrinsics
* Add support for data unpacking intrinsics
  * spir-v reader
  * type determiner
  * intrinsic table
  * spir-v, hlsl and msl writers

Bug: tint:341
Change-Id: I8f40d19d59a4699af75cd579fe8398c735a77a59
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/41320
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Alan Baker <alanbaker@google.com>
2021-02-09 21:23:00 +00:00
dan sinclair 81302443f7 Fix building with gcc.
This CL renames the Parameters using statement to ParametersList so it
doesn't conflict with the Parameters method which is used later to
return the ParametersList.

Change-Id: I2ac19ba52fc0834e5a35b4b35a210dcc170866fc
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/41240
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-02-09 15:37:44 +00:00
Ben Clayton 316f9f6b6d Add semantic::Intrinsic
semantic::Intrinsic derives from semantic::CallTarget, which can be obtained from the Target() accessor on the CallExpression.

Flesh out semantic::Parameter to contain a `Usage` - extra metadata for the parameter.

The information in `Intrinsic` is enough to remove the `semantic::IntrinsicCall` and `semantic::TextureIntrinsicCall` types.

Change-Id: Ida9c193674ad8605d8f12f6a1d27f38c7d008434
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/40503
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-02-08 22:31:44 +00:00
Ben Clayton 599d8f8c0d Rename intrinsic.cc to sem_intrinsic.
For consistency with the other .cc file names in this directory.
The reason we need the sem_ prefix is because all the tint lib code is compiled as a single target, and .GN cannot cope with .cc files with the same file name, even if they're in different directories.
This could be fixed by building each directory as a separate target, but we have circular dependencies that currently make this impossible.

Change-Id: I2f1379ff11dd863f81662449f73d67832f0a8a4e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/40501
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2021-02-08 20:11:22 +00:00