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

Mesh shader refactoring and bugfixes #3702

Merged
merged 12 commits into from
Mar 15, 2024
Merged

Conversation

expipiplus1
Copy link
Collaborator

Closes #2804 and #3401

// It's illegal to not write out the entire primitive at once, so limit
// this to set
[mutating]
__intrinsic_op($(kIROp_MeshOutputSet))
Copy link
Collaborator

Choose a reason for hiding this comment

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

We maybe able to get rid of this opcode by having set call __getMeshOutputRef() = newValue;

SLANG_ASSERT(ptr && "Mesh output parameter was passed by value");
auto t = ptr->getValueType();
auto tmp = builder->emitVar(t);
for(UInt i = 0; i < c->getOperandCount(); i++)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use c->getArg and c->setArg instead?

@@ -26,7 +26,7 @@ const static uint MAX_VERTS = 3;
const static uint MAX_PRIMS = 1;

// Test that we can convert the HLSL Syntax to the typed syntax
void foo(uint tig, out Vertices<Vertex, MAX_VERTS> verts)
void foo(uint tig, OutputVertices<Vertex, MAX_VERTS> verts)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are we removing the test for the out Vertices syntax?

@Ipotrick
Copy link

This looks close to beeing mergable. I have great interest in using the enhancements in this pr.

@csyonghe csyonghe merged commit d40931c into shader-slang:master Mar 15, 2024
16 checks passed
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.

Clean up output Vertices and Indices types for mesh shader.
3 participants