gallivm: pass jit_context pointer through to sampling
authorRoland Scheidegger <sroland@vmware.com>
Wed, 25 Mar 2015 02:10:10 +0000 (03:10 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 27 Mar 2015 18:25:53 +0000 (19:25 +0100)
commit8dad9455ff748c543635b24908566c3b94cb93a9
treefadf8b3b7e08a30fe37e53b4c4ea226db29ad55d
parent787aa26cb7b48504f7770cacfc321324ecafa29a
gallivm: pass jit_context pointer through to sampling

The callbacks used for getting the dynamic texture/sampler state were using
the jit_context from the generated jit function. This works just fine, however
that way it's impossible to generate separate functions for texture sampling,
as will be done in the next commit. Hence, pass this pointer through all
interfaces so it can be passed to a separate function (technically, it would
probably be possible to extract this pointer from the current function instead,
but this feels hacky and would probably require some more hacks if we'd use
real functions instead of inlining all shader functions at some point).
There should be no difference in the generated code for now.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/auxiliary/draw/draw_llvm.h
src/gallium/auxiliary/draw/draw_llvm_sample.c
src/gallium/auxiliary/gallivm/lp_bld_sample.c
src/gallium/auxiliary/gallivm/lp_bld_sample.h
src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/gallium/drivers/llvmpipe/lp_tex_sample.c
src/gallium/drivers/llvmpipe/lp_tex_sample.h