// Utility function to handle reporting
static inline VkBool32 debug_report_log_msg(
- VkInstance instance,
+ struct loader_instance *inst,
VkFlags msgFlags,
VkDebugReportObjectTypeLUNARG objectType,
uint64_t srcObject,
const char* pLayerPrefix,
const char* pMsg)
{
- struct loader_instance *inst = loader_get_instance(instance);
VkBool32 bail = false;
VkLayerDbgFunctionNode *pTrav = inst->DbgFunctionHead;
while (pTrav) {
{
VkDebugReportCallbackLUNARG *icd_info;
const struct loader_icd *icd;
- struct loader_instance *inst;
+ struct loader_instance *inst = (struct loader_instance *) instance;
VkResult res;
uint32_t storage_idx;
- for (inst = loader.instances; inst; inst = inst->next) {
- if ((VkInstance) inst == instance)
- break;
- }
-
icd_info = calloc(sizeof(VkDebugReportCallbackLUNARG), inst->total_icd_count);
if (!icd_info) {
return VK_ERROR_OUT_OF_HOST_MEMORY;
uint32_t storage_idx;
VkDebugReportCallbackLUNARG *icd_info;
const struct loader_icd *icd;
- struct loader_instance *inst;
-
- for (inst = loader.instances; inst; inst = inst->next) {
- if ((VkInstance) inst == instance)
- break;
- }
+ struct loader_instance *inst = (struct loader_instance *) instance;
icd_info = *(VkDebugReportCallbackLUNARG **) &callback;
storage_idx = 0;
for (icd = inst->icds; icd; icd = icd->next) {
const char* pMsg)
{
const struct loader_icd *icd;
- struct loader_instance *inst = loader_get_instance(instance);
+ struct loader_instance *inst = (struct loader_instance *) instance;
for (icd = inst->icds; icd; icd = icd->next) {
if (icd->DebugReportMessageLUNARG != NULL) {
* Now that all ICDs have seen the message, call the necessary callbacks.
* Ignoring "bail" return value as there is nothing to bail from at this point.
*/
- debug_report_log_msg(instance, flags, objType, object, location, msgCode, pLayerPrefix, pMsg);
+ debug_report_log_msg(inst, flags, objType, object, location, msgCode, pLayerPrefix, pMsg);
}
bool debug_report_instance_gpa(