summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-12-03 17:52:12 +0100
committerAxel Davy <[email protected]>2016-12-20 23:47:08 +0100
commit930f479acf07296b25806fc55a07bff6e307d5c6 (patch)
tree01cb92b08914fe292eb4e1a9456a088e195b8440 /src/gallium
parent9c4b4e8809f1e6e076c01ba7b11dc1636c2a26b4 (diff)
st/nine: Simplify ARG_BIND_REF
Remove some noop operations. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/nine/nine_csmt_helper.h10
1 files 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 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; ,\
,\