diff options
author | Dave Airlie <[email protected]> | 2020-03-24 12:54:52 +1000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-06 06:20:38 +0000 |
commit | c5021ebb15d2d4d29c9202bea01fe8d5acb62902 (patch) | |
tree | 8ba7339b775621d9352bed70cf80d27cc4070edf /src/gallium | |
parent | 335938cffd10a7285b98999ad7a6bc8a4ed92ba1 (diff) |
llvmpipe: fix multisample occlusion queries.
This needs to check the per-sample mask inside the loop if
multisample is enabled.
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 | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 34ed257b5b0..38973e6ceb1 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -859,17 +859,18 @@ generate_fs_loop(struct gallivm_state *gallivm, z_value, s_value); } - if (key->multisample) { - /* store the sample mask for this loop */ - LLVMBuildStore(builder, s_mask, s_mask_ptr); - lp_build_for_loop_end(&sample_loop_state); - } - if (key->occlusion_count) { LLVMValueRef counter = lp_jit_thread_data_counter(gallivm, thread_data_ptr); lp_build_name(counter, "counter"); + lp_build_occlusion_count(gallivm, type, - lp_build_mask_value(&mask), counter); + key->multisample ? s_mask : lp_build_mask_value(&mask), counter); + } + + if (key->multisample) { + /* store the sample mask for this loop */ + LLVMBuildStore(builder, s_mask, s_mask_ptr); + lp_build_for_loop_end(&sample_loop_state); } mask_val = lp_build_mask_end(&mask); |