if (bt.ubo_count != sh_prog->_LinkedShaders[MESA_SHADER_VERTEX]->NumUniformBlocks) {
// If there is no UBO data to pull from, the shader is using a default uniform, which
// will not work in XGL. We need a binding slot to pull from.
- icd_log(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, XGL_NULL_HANDLE, 0, 0,
+ intel_log(gpu, XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, XGL_NULL_HANDLE, 0, 0,
"compile error: VS reads from global, non-block uniform");
assert(0);
if (bt.ubo_count != sh_prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->NumUniformBlocks) {
// If there is no UBO data to pull from, the shader is using a default uniform, which
// will not work in XGL. We need a binding slot to pull from.
- icd_log(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, XGL_NULL_HANDLE, 0, 0,
+ intel_log(gpu, XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, XGL_NULL_HANDLE, 0, 0,
"compile error: FS reads from global, non-block uniform");
assert(0);
return;
va_start(ap, format);
- icd_logv(msg_type, validation_level, (XGL_BASE_OBJECT) src_object,
+ intel_logv(dev, msg_type, validation_level, (XGL_BASE_OBJECT) src_object,
location, msg_code, format, ap);
va_end(ap);
}
if (gpu->render_fd_internal < 0 && gpu->render_node) {
gpu->render_fd_internal = open(gpu->render_node, O_RDWR);
if (gpu->render_fd_internal < 0) {
- icd_log(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, NULL, 0,
+ intel_log(gpu, XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, NULL, 0,
0, "failed to open %s", gpu->render_node);
}
}
struct intel_gpu *gpu;
if (gen < 0) {
- icd_log(XGL_DBG_MSG_WARNING, XGL_VALIDATION_LEVEL_0, XGL_NULL_HANDLE,
- 0, 0, "unsupported device id 0x%04x", devid);
+ intel_log(instance, XGL_DBG_MSG_WARNING, XGL_VALIDATION_LEVEL_0,
+ XGL_NULL_HANDLE, 0, 0, "unsupported device id 0x%04x", devid);
return XGL_ERROR_INITIALIZATION_FAILED;
}
break;
}
- icd_log(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, XGL_NULL_HANDLE,
+ intel_log(gpu, XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, XGL_NULL_HANDLE,
0, 0, "unknown Gen or shader stage");
switch (stage) {
gpu->winsys = intel_winsys_create_for_fd(gpu->handle.icd, fd);
if (!gpu->winsys) {
- icd_log(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, XGL_NULL_HANDLE,
- 0, 0, "failed to create GPU winsys");
+ intel_log(gpu, XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0,
+ XGL_NULL_HANDLE, 0, 0, "failed to create GPU winsys");
gpu_close_render_node(gpu);
return XGL_ERROR_UNKNOWN;
}
}
ICD_EXPORT XGL_RESULT XGLAPI xglDbgRegisterMsgCallback(
- XGL_INSTANCE instance,
+ XGL_INSTANCE instance_,
XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback,
void* pUserData)
{
- return icd_logger_add_callback(pfnMsgCallback, pUserData);
+ struct intel_instance *instance = intel_instance(instance_);
+
+ return icd_instance_add_logger(instance->icd, pfnMsgCallback, pUserData);
}
ICD_EXPORT XGL_RESULT XGLAPI xglDbgUnregisterMsgCallback(
- XGL_INSTANCE instance,
+ XGL_INSTANCE instance_,
XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback)
{
- return icd_logger_remove_callback(pfnMsgCallback);
+ struct intel_instance *instance = intel_instance(instance_);
+
+ return icd_instance_remove_logger(instance->icd, pfnMsgCallback);
}
ICD_EXPORT XGL_RESULT XGLAPI xglDbgSetGlobalOption(
- XGL_INSTANCE instance,
+ XGL_INSTANCE instance_,
XGL_DBG_GLOBAL_OPTION dbgOption,
size_t dataSize,
const void* pData)
{
+ struct intel_instance *instance = intel_instance(instance_);
XGL_RESULT res = XGL_SUCCESS;
if (dataSize == 0)
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));
+ res = icd_instance_set_bool(instance->icd, dbgOption,
+ *((const bool *) pData));
break;
default:
res = XGL_ERROR_INVALID_VALUE;
#include "icd-spv.h"
#include "icd-format.h"
#include "icd-instance.h"
-#include "icd-log.h"
#include "icd-utils.h"
#define INTEL_API_VERSION XGL_API_VERSION