diff options
author | Dave Airlie <[email protected]> | 2020-03-20 13:29:13 +1000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-06 06:20:37 +0000 |
commit | f12dac5e106b20704aa66f12c3783f5f005b4fe1 (patch) | |
tree | 8f72ecb9968c96c1c6eca60341d750657af77d68 /src/gallium | |
parent | 5e949b16c166c6e433307f25dd476d1f35fd6b7e (diff) |
llvmpipe: move some fs code around
this just moves the num_fs loop around for follow on refactors
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index b2525334acf..0d24dea2e80 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -412,16 +412,6 @@ generate_fs_loop(struct gallivm_state *gallivm, ssbo_ptr = lp_jit_context_ssbos(gallivm, context_ptr); num_ssbo_ptr = lp_jit_context_num_ssbos(gallivm, context_ptr); - lp_build_for_loop_begin(&loop_state, gallivm, - lp_build_const_int32(gallivm, 0), - LLVMIntULT, - num_loop, - lp_build_const_int32(gallivm, 1)); - - mask_ptr = LLVMBuildGEP(builder, mask_store, - &loop_state.counter, 1, "mask_ptr"); - mask_val = LLVMBuildLoad(builder, mask_ptr, ""); - memset(outputs, 0, sizeof outputs); for(cbuf = 0; cbuf < key->nr_cbufs; cbuf++) { @@ -442,6 +432,15 @@ generate_fs_loop(struct gallivm_state *gallivm, } } + lp_build_for_loop_begin(&loop_state, gallivm, + lp_build_const_int32(gallivm, 0), + LLVMIntULT, + num_loop, + lp_build_const_int32(gallivm, 1)); + + mask_ptr = LLVMBuildGEP(builder, mask_store, + &loop_state.counter, 1, "mask_ptr"); + mask_val = LLVMBuildLoad(builder, mask_ptr, ""); /* 'mask' will control execution based on quad's pixel alive/killed state */ lp_build_mask_begin(&mask, gallivm, type, mask_val); |