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

Arrays of structs in GS OutputStreams are not supported #1768

Open
tristanlabelle opened this issue Dec 12, 2018 · 1 comment
Open

Arrays of structs in GS OutputStreams are not supported #1768

tristanlabelle opened this issue Dec 12, 2018 · 1 comment
Assignees
Labels
bug Bug, regression, crash
Milestone

Comments

@tristanlabelle
Copy link
Contributor

tristanlabelle commented Dec 12, 2018

Repro:

struct GSInOutNested { float value : TEXCOORD0; };
struct GSInOut { GSInOutNested nested[1]; };

[maxvertexcount(1)]
void main(point GSInOut input[1], inout PointStream<GSInOut> output)
{
    output.Append(input[0]);
}

It looks like this was never implemented. It will currently hit this assert:

DXASSERT(0, "Not support array of struct when split pointers.");
(from ::SplitPtr, in file D:\DirectXShaderCompiler\lib\Transforms\Scalar\ScalarReplAggregatesHLSL.cpp)

@tristanlabelle
Copy link
Contributor Author

The issue probably has to do with the fact that DXIL supports arrays but not structures, so struct { int; float; } [42] kind of has to be lowered to int[42]; float[42], but that changes the in-memory layout and potentially the ordering of the semantics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash
Projects
Status: Triaged
Development

No branches or pull requests

2 participants