Remove const modifier on float4 color definition in volume kernel #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a bug with the ClearVolume Fiji plugin where it is unable to compile the VolumeRender kernel on Intel GPUs. The plugin works fine on Nvidia GPUs, but on a PC with an Intel GPU the window appears blank, and an error message appears in the log (as well as a full output of the source code). An example of this error code can be found in #76; there are a lot of other examples of errors with NullPointerExceptions, and I wonder if they are related!
Basically, there is a float4 definition for "color" that is labeled const, but then immediately modified right after that. For whatever reason, Nvidia GPUs seem to be fine with this, but Intel must be stricter and fails to compile. Removing the "const" allows the kernel to compile on both Nvidia and Intel, but I haven't tested it anywhere else yet.
I think, given the code that is right below the color variable definition, it is NOT meant to be const, but I am absolutely not familiar with OpenCL development at all, nor could I even safely call myself a Java developer. If this change is dangerous, I hope someone else might catch it; however, I can say that I am very happy to finally be able to use CV on my intel-GPU laptop!