summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-07-19 15:45:22 +1000
committerDave Airlie <[email protected]>2019-08-27 12:29:33 +1000
commitcf84b46a1cd8f602341b1fce32d5f5ec41633e40 (patch)
treebcb24b21c5ab4f2c500434052c6b643aa5c20282 /src/gallium
parenta1e8fcef47545db29950a6b2baf400dd0c6085a5 (diff)
llvmpipe: handle early test property.
Also handle setting late for shaders that use stores Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 101877ded34..bf2c0313572 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -346,8 +346,12 @@ generate_fs_loop(struct gallivm_state *gallivm,
zs_format_desc = util_format_description(key->zsbuf_format);
assert(zs_format_desc);
- if (!shader->info.base.writes_z && !shader->info.base.writes_stencil) {
- if (key->alpha.enabled ||
+ if (shader->info.base.properties[TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL])
+ depth_mode = EARLY_DEPTH_TEST | EARLY_DEPTH_WRITE;
+ else if (!shader->info.base.writes_z && !shader->info.base.writes_stencil) {
+ if (shader->info.base.writes_memory)
+ depth_mode = LATE_DEPTH_TEST | LATE_DEPTH_WRITE;
+ else if (key->alpha.enabled ||
key->blend.alpha_to_coverage ||
shader->info.base.uses_kill ||
shader->info.base.writes_samplemask) {