We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42f61ac commit 0f8deadCopy full SHA for 0f8dead
source/adapters/mock/ur_mock.cpp
@@ -89,9 +89,11 @@ ur_result_t mock_urDeviceGetInfo(void *pParams) {
89
context_t::context_t() {
90
mock::getCallbacks().set_replace_callback("urPlatformGetApiVersion",
91
&mock_urPlatformGetApiVersion);
92
- mock::getCallbacks().set_replace_callback("urPlatformGetInfo",
93
- &mock_urPlatformGetInfo);
94
- mock::getCallbacks().set_replace_callback("urDeviceGetInfo",
95
- &mock_urDeviceGetInfo);
+ // Set the default info stuff as before overrides, this way any application
+ // passing in an override for them in any slot will take precedence.
+ mock::getCallbacks().set_before_callback("urPlatformGetInfo",
+ &mock_urPlatformGetInfo);
96
+ mock::getCallbacks().set_before_callback("urDeviceGetInfo",
97
+ &mock_urDeviceGetInfo);
98
}
99
} // namespace driver
0 commit comments