[Mesa-dev] [PATCH] r600: remove unnecessary NULL check in r600_shader_select

Vlad Golovkin vlad.golovkin.mail at gmail.com
Thu Jun 15 02:52:17 UTC 2017


r600_shader_select is always called through the macro SELECT_SHADER_OR_FAIL,
which never passes NULL pointers as parameter 'dirty'.
---
 src/gallium/drivers/r600/r600_state_common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index 8ace7793f0..51c4c6dc30 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -803,8 +803,7 @@ static int r600_shader_select(struct pipe_context *ctx,
 		sel->num_shaders++;
 	}
 
-	if (dirty)
-		*dirty = true;
+	*dirty = true;
 
 	shader->next_variant = sel->current;
 	sel->current = shader;
-- 
2.11.0



More information about the mesa-dev mailing list