[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mesa3d-dev
Subject:    [Mesa-dev] [PATCH 5/5] r600: add support for early depth/stencil.
From:       Dave Airlie <airlied () gmail ! com>
Date:       2017-10-31 23:32:53
Message-ID: 20171031233253.4969-6-airlied () gmail ! com
[Download RAW message or body]

From: Dave Airlie <airlied@redhat.com>

This add support for the early depth/stencil property found
on image shaders.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 src/gallium/drivers/r600/evergreen_state.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 4ffc268..96eb35a 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -3159,6 +3159,9 @@ void evergreen_update_ps_state(struct pipe_context *ctx, struct r600_pipe_shader
 	db_shader_control |= S_02880C_STENCIL_EXPORT_ENABLE(stencil_export);
 	db_shader_control |= S_02880C_MASK_EXPORT_ENABLE(mask_export);
 
+	if (shader->selector->info.properties[TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL])
+		db_shader_control |= S_02880C_DEPTH_BEFORE_SHADER(1);
+
 	switch (rshader->ps_conservative_z) {
 	default: /* fall through */
 	case TGSI_FS_DEPTH_LAYOUT_ANY:
-- 
2.9.5

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic