Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List operands lost in JSON #185

Open
PENGUINLIONG opened this issue Dec 20, 2020 · 3 comments
Open

List operands lost in JSON #185

PENGUINLIONG opened this issue Dec 20, 2020 · 3 comments

Comments

@PENGUINLIONG
Copy link
Contributor

It seems some ops with a trailing list specified with "Literal, Literal, …" have this issue. Affected ops are:

  • OpDecorate
  • OpMemberDecorate
  • OpExecutionMode
  • OpLoopMerge

While these ops described with "Literal, Literal, …" are not affected:

  • OpVectorShuffle
  • OpCompositeExtract
  • OpCompositeInsert
  • OpBranchConditional
@Jasper-Bekkers
Copy link

I just ran into this as well, we rely on spirv.core.grammar.json quite extensively for our project to codegen quite a few things, and to be able to parse our inline-assembly SPIR-V. For that parsing we rely on the operands being correctly specified.

I see where the trouble with OpDecorate and OpMemberDecorate comes from - the operands can be of different types then just literals, however I would like to see this spec'd fully in the spirv.core.grammar.json even if that complicates the format somewhat.

@ShabbyX
Copy link
Contributor

ShabbyX commented Jun 3, 2021

+1 to this. I just noticed OpExecutionMode having this issue and created #211 to address it (and looking back, it seems that previously I had worked around Op*Decorate in codegen as well as OpImage* which has the same problem). Would be great to fix them in the grammar.

@spencer-lunarg
Copy link
Contributor

I guess not sure the real issue, things like OpExecutionMode the "list" depends on the ExecutionMode which each can be parsed in

    {
      "category" : "ValueEnum",
      "kind" : "ExecutionMode",
      "enumerants" : [

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants