-
-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Bug Report
What's the issue you encountered?
Certain directives perform no function, or worse, enable undefined behavior when used with the .nodvle directive. A compilation error should be raised in these circumstances.
Affected directives include:
- all
.constdirectives - all
.setdirectives .entry
How can the issue be reproduced?
Compile a group of shader files, with at least one file containing the .nodvle directive and one or more of the aforementioned directives. This program will compile normally.
Environment?
- What host OS are you using?
- Win10 x64 with Ubuntu LTS 18.04 under WSL2
- Official release or unofficial/self-compiled build:
- Official Release
Additional context?
According to the README, constants are never shared between DVLEs. Despite this, they can be declared inside of shader source files containing the .nodvle directive. These constants will not have a defined value, as constants are only ever initialized when a DVLE is selected, thus causing undefined behavior that can be very difficult to trace if a developer is unfamiliar with their function.
The same applies to the .set directives, which are also only ever executed in files with DVLEs.
The .entry directive, while harmless, has no function within a .nodvle file.