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

IR: emitVectorReshape fails if param type is a vector whilst param value is a scalar #4411

Closed
chaoticbob opened this issue Jun 18, 2024 · 0 comments · Fixed by #4419
Closed
Assignees
Labels
goal:client support Needed to support a slang use case kind:bug something doesn't work like it should

Comments

@chaoticbob
Copy link
Collaborator

Both of the assignment below causes a NULL pointer access in IRBuilder::emitVectorReshape().

sourceVectorType is null after the cast from value->getDataType().

CMD:

slangc.exe -target spirv -lang slang -D__spirv__ -emit-spirv-directly -profile vs_6_0 -entry main myshader.slang

Shader:

RWBuffer<uint>     MyRWBuffer;
RWTexture2D<int>   MyRWTexture;

void main() {
    MyRWBuffer[1].x = 15;
    MyRWTexture[uint2(2, 3)].x = 16;
}
@ArielG-NV ArielG-NV self-assigned this Jun 18, 2024
@ArielG-NV ArielG-NV added kind:bug something doesn't work like it should goal:client support Needed to support a slang use case labels Jun 18, 2024
@ArielG-NV ArielG-NV changed the title SPIR-V: Scalar assignment can result in NULL pointer access IR: emitVectorReshape fails if param type is a vector whilst param value is a scalar Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:client support Needed to support a slang use case kind:bug something doesn't work like it should
Projects
None yet
2 participants