+++ /dev/null
-/*
- * XGL
- *
- * Copyright (C) 2014 LunarG, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Chia-I Wu <olv@lunarg.com>
- */
-
-#include "icd-log.h"
-#include "icd.h"
-
-XGL_RESULT XGLAPI icdDbgRegisterMsgCallback(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback, XGL_VOID* pUserData)
-{
- return icd_logger_add_callback(pfnMsgCallback, pUserData);
-}
-
-XGL_RESULT XGLAPI icdDbgUnregisterMsgCallback(XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback)
-{
- return icd_logger_remove_callback(pfnMsgCallback);
-}
-
-XGL_RESULT XGLAPI icdDbgSetGlobalOption(XGL_DBG_GLOBAL_OPTION dbgOption, XGL_SIZE dataSize, const XGL_VOID* pData)
-{
- XGL_RESULT res = XGL_SUCCESS;
-
- if (dataSize == 0)
- return XGL_ERROR_INVALID_VALUE;
-
- switch (dbgOption) {
- case XGL_DBG_OPTION_DEBUG_ECHO_ENABLE:
- case XGL_DBG_OPTION_BREAK_ON_ERROR:
- case XGL_DBG_OPTION_BREAK_ON_WARNING:
- res = icd_logger_set_bool(dbgOption, *((const bool *) pData));
- break;
- default:
- res = XGL_ERROR_INVALID_VALUE;
- break;
- }
-
- return res;
-}