[Mesa-dev] [PATCH 1/2] draw: don't use clipvertex output if user plane clipping is disabled
Brian Paul
brianp at vmware.com
Fri Aug 8 11:56:47 PDT 2014
On 08/08/2014 11:02 AM, sroland at vmware.com wrote:
> From: Roland Scheidegger <sroland at vmware.com>
>
> 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...
> ---
> src/gallium/auxiliary/draw/draw_llvm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
> index d29adfb..5a7bedb 100644
> --- a/src/gallium/auxiliary/draw/draw_llvm.c
> +++ b/src/gallium/auxiliary/draw/draw_llvm.c
> @@ -1732,7 +1732,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
>
> 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, 0, key->clip_user ? cv : pos);
> store_clip(gallivm, vs_type, io, outputs, 1, pos);
>
> /* do cliptest */
>
As long as you're there, maybe convert the 0/1 arguments to TRUE/FALSE.
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list