Skip to content

Commit 5444202

Browse files
committed
add file,pos context to existing error logs
1 parent f5f0583 commit 5444202

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/nbl/video/ILogicalDevice.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ core::smart_refctd_ptr<IGPUShader> ILogicalDevice::createShader(const SShaderCre
269269
{
270270
if (!creationParams.cpushader)
271271
{
272-
m_logger.log("No valid CPU Shader supplied",system::ILogger::ELL_ERROR);
272+
m_logger.log("No valid CPU Shader supplied [%s - %s:%p]", system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
273273
return nullptr;
274274
}
275275

@@ -289,14 +289,14 @@ core::smart_refctd_ptr<IGPUShader> ILogicalDevice::createShader(const SShaderCre
289289
case IGPUShader::E_SHADER_STAGE::ESS_TESSELLATION_EVALUATION:
290290
if (!features.tessellationShader)
291291
{
292-
m_logger.log("Cannot create IGPUShader for %p, Tessellation Shader feature not enabled!",system::ILogger::ELL_ERROR,creationParams.cpushader);
292+
m_logger.log("Cannot create IGPUShader for %p, Tessellation Shader feature not enabled! [%s - %s:%p]", system::ILogger::ELL_ERROR, creationParams.cpushader, __FUNCTION__, __FILE__, __LINE__);
293293
return nullptr;
294294
}
295295
break;
296296
case IGPUShader::E_SHADER_STAGE::ESS_GEOMETRY:
297297
if (!features.geometryShader)
298298
{
299-
m_logger.log("Cannot create IGPUShader for %p, Geometry Shader feature not enabled!",system::ILogger::ELL_ERROR,creationParams.cpushader);
299+
m_logger.log("Cannot create IGPUShader for %p, Geometry Shader feature not enabled! [%s - %s:%p]", system::ILogger::ELL_ERROR, creationParams.cpushader, __FUNCTION__, __FILE__, __LINE__);
300300
return nullptr;
301301
}
302302
break;
@@ -317,13 +317,13 @@ core::smart_refctd_ptr<IGPUShader> ILogicalDevice::createShader(const SShaderCre
317317
case IGPUShader::E_SHADER_STAGE::ESS_CALLABLE:
318318
if (!features.rayTracingPipeline)
319319
{
320-
m_logger.log("Cannot create IGPUShader for %p, Raytracing Pipeline feature not enabled!",system::ILogger::ELL_ERROR,creationParams.cpushader);
320+
m_logger.log("Cannot create IGPUShader for %p, Raytracing Pipeline feature not enabled! [%s - %s:%p]", system::ILogger::ELL_ERROR, creationParams.cpushader, __FUNCTION__, __FILE__, __LINE__);
321321
return nullptr;
322322
}
323323
break;
324324
default:
325325
// Implicit unsupported stages or weird multi-bit stage enum values
326-
m_logger.log("Unknown Shader Stage %d",system::ILogger::ELL_ERROR,shaderStage);
326+
m_logger.log("Unknown Shader Stage %d [%s - %s:%p]", system::ILogger::ELL_ERROR, shaderStage, __FUNCTION__, __FILE__, __LINE__);
327327
return nullptr;
328328
break;
329329
}
@@ -366,15 +366,15 @@ core::smart_refctd_ptr<IGPUShader> ILogicalDevice::createShader(const SShaderCre
366366

367367
if (!spirvShader)
368368
{
369-
m_logger.log("SPIR-V Compilation from non SPIR-V shader %p failed.",system::ILogger::ELL_ERROR,creationParams.cpushader);
369+
m_logger.log("SPIR-V Compilation from non SPIR-V shader %p failed [%s - %s:%p]", system::ILogger::ELL_ERROR, creationParams.cpushader, __FUNCTION__, __FILE__, __LINE__);
370370
return nullptr;
371371
}
372372
}
373373

374374
auto spirv = spirvShader->getContent();
375375
if (!spirv)
376376
{
377-
m_logger.log("SPIR-V Compilation from non SPIR-V shader %p failed.",system::ILogger::ELL_ERROR,creationParams.cpushader);
377+
m_logger.log("SPIR-V Compilation from non SPIR-V shader %p failed [%s - %s:%p]", system::ILogger::ELL_ERROR, creationParams.cpushader, __FUNCTION__, __FILE__, __LINE__);
378378
return nullptr;
379379
}
380380

0 commit comments

Comments
 (0)