From: Axel Davy Date: Sat, 3 Dec 2016 16:52:12 +0000 (+0100) Subject: st/nine: Simplify ARG_BIND_REF X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=930f479acf07296b25806fc55a07bff6e307d5c6;p=mesa.git st/nine: Simplify ARG_BIND_REF Remove some noop operations. Signed-off-by: Axel Davy --- 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; ,\ ,\