llvmpipe,draw,gallivm: Ensure we don't walk beyond the end of the shader variant...
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 28 Nov 2011 16:54:09 +0000 (16:54 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 8 Dec 2011 17:59:33 +0000 (17:59 +0000)
commitf32c7232a8a16887af710a11f025381bc73640f0
treebf9a3911c3b0cdd87e6310bd744a195c6d8502dc
parent24e648490921a386fc3f65d1b1ed330067a4bb25
llvmpipe,draw,gallivm: Ensure we don't walk beyond the end of the shader variant list.

u_simple_list.h uses a sentinel element, and not a NULL element. So
ensure list is not empty when reducing the list of shader variants.

Something I noticed while trying to free variants more aggressively.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/gallium/drivers/llvmpipe/lp_state_setup.c