Skip to content

Conversation

@solstice0
Copy link

cgcomp will segfault for some fragment shaders. This is caused by a bug in the parser that tokenizes nv40 asm in order to create an rsx compatible binary.

Example:

MOVH  oCol(NE.y), fragment.color.primary;

The problem was with parsing oCol dst mask. It would get tokenized as 'oCol(' which is not a valid token . The reg variable would not get set which causes a segfault later in processing.

Reading the code, its clear the intent was to skip over the oCol token, then parser.cpp line 232 would hit the paren and parse condition instructions.

ps Thank you Scummvm team for actively maintaining psl1ght!

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.

1 participant