Skip to content

Add primitive instruction validation pass#1095

Closed
jeremy-lunarg wants to merge 1 commit intoKhronosGroup:masterfrom
jeremy-lunarg:jeremy_primitive_validation
Closed

Add primitive instruction validation pass#1095
jeremy-lunarg wants to merge 1 commit intoKhronosGroup:masterfrom
jeremy-lunarg:jeremy_primitive_validation

Conversation

@jeremy-lunarg
Copy link
Copy Markdown
Contributor

No description provided.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 14, 2017

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Collaborator

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would have been nice to see success test cases for the EmitVertex and EndPrimitive instructions. The binary parser and other general parts of the validator take care of it, but it would be nice to have receipts. :-)

The bot failure is a small formatting problem. We can take care of that before submission.

@dneto0
Copy link
Copy Markdown
Collaborator

dneto0 commented Dec 15, 2017

I reformatted the one line, then committed to master as cdfbf26


namespace libspirv {

// Validates correctness of composite instructions.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not composite.

switch (opcode) {
case SpvOpEmitStreamVertex:
case SpvOpEndStreamPrimitive: {
const uint32_t stream_type = _.GetOperandTypeId(inst, 0);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also function _.GetTypeId(id). (since you already have variable stream_id).

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

Successfully merging this pull request may close these issues.

4 participants