From 930f479acf07296b25806fc55a07bff6e307d5c6 Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Sat, 3 Dec 2016 17:52:12 +0100 Subject: st/nine: Simplify ARG_BIND_REF Remove some noop operations. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_csmt_helper.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/state_trackers/nine/nine_csmt_helper.h b/src/gallium/state_trackers/nine/nine_csmt_helper.h index a4987253bc6..b0bbc054fc3 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; ,\ ,\ -- cgit v1.2.3