The non-llvm path made sure that both clip and pre_clip_pos point to the data
output by position, not clipvertex, if user based clipping is disabled.
However, the llvm path did not, which apparently led to failures if
gl_ClipVertex was written but user plane clipping not enabled (bug 80183).
Why I have no idea really, but just make it match the non-llvm behavior...
Reviewed-by: Brian Paul <brianp@vmware.com>
if (pos != -1 && cv != -1) {
/* store original positions in clip before further manipulation */
- store_clip(gallivm, vs_type, io, outputs, 0, cv);
- store_clip(gallivm, vs_type, io, outputs, 1, pos);
+ store_clip(gallivm, vs_type, io, outputs, FALSE, key->clip_user ? cv : pos);
+ store_clip(gallivm, vs_type, io, outputs, TRUE, pos);
/* do cliptest */
if (enable_cliptest) {