[Mesa-dev] [PATCH 64/84] st/nine: Simplify ARG_BIND_REF

Axel Davy axel.davy at ens.fr
Wed Dec 7 22:55:37 UTC 2016


Remove some noop operations.

Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 src/gallium/state_trackers/nine/nine_csmt_helper.h | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/gallium/state_trackers/nine/nine_csmt_helper.h b/src/gallium/state_trackers/nine/nine_csmt_helper.h
index a498725..b0bbc05 100644
--- a/src/gallium/state_trackers/nine/nine_csmt_helper.h
+++ b/src/gallium/state_trackers/nine/nine_csmt_helper.h
@@ -346,16 +346,12 @@ name##_priv( struct NineDevice9 *device ARGS_FOR_DECLARATION( __VA_ARGS__ ) )
 
 #define ARG_BIND_REF(x, y) \
         x * _##y ,\
-        args->_##y = NULL; \
-        if (args->_##y != y && args->_##y) \
-            NineUnknown_Unbind((void *)(args->_##y)); \
-        if ( args->_##y != y && y ) \
+        if ( y ) \
             NineUnknown_Bind( (void *)y ); \
-        if ( args->_##y != y ) \
-            args->_##y = y ; ,\
+        args->_##y = y ; ,\
         x *y ,\
         args->_##y,\
-        if (args->_##y != NULL && args->_##y) \
+        if (args->_##y) \
             NineUnknown_Unbind((void *)(args->_##y)); \
         args->_##y = NULL; ,\
         ,\
-- 
2.10.2



More information about the mesa-dev mailing list