You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
Running the following shader through the Standalone LunarGOO.exe results in clearly erroneous code, as seen below:
#version 450
layout (binding = 0) buffer IntBuffer {
int IntList[];
};
layout (location = 0) out int outInt;
void main() {
outInt = IntList[1];
}
becomes
#version 450 core
// LunarGOO output
layout(binding=0) buffer IntBuffer {
int IntList[];
} ;
layout(location=0) out int outInt;
void main() {
outInt = [1].IntList;
}
Inspecting the AST as well as the intermediate Top IR suggest that this problem is a result of some optimizations run in translateTopToBottom, where apparently the order of the operands of a "direct indexing" operation gets reversed. The behaviour can not be observed when using fixed-size arrays.
I can't speak of the exact place this error occurs, however the period between the two operands seems to be an artifact of IntList being part of an anonymous block and it would be dealt with, were the operands ordered correctly as .IntList[1]
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Running the following shader through the Standalone LunarGOO.exe results in clearly erroneous code, as seen below:
becomes
Inspecting the AST as well as the intermediate Top IR suggest that this problem is a result of some optimizations run in translateTopToBottom, where apparently the order of the operands of a "direct indexing" operation gets reversed. The behaviour can not be observed when using fixed-size arrays.
I can't speak of the exact place this error occurs, however the period between the two operands seems to be an artifact of
IntList
being part of an anonymous block and it would be dealt with, were the operands ordered correctly as.IntList[1]
The text was updated successfully, but these errors were encountered: