Skip to content

Commit 798705c

Browse files
committed
ILogicalDevice: indent switch cases
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
1 parent 16c5d3f commit 798705c

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

src/nbl/video/ILogicalDevice.cpp

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -292,49 +292,49 @@ core::smart_refctd_ptr<asset::ICPUShader> ILogicalDevice::compileShader(const SS
292292
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPipelineShaderStageCreateInfo.html#VUID-VkPipelineShaderStageCreateInfo-stage-00706
293293
switch (shaderStage)
294294
{
295-
case IGPUShader::E_SHADER_STAGE::ESS_TESSELLATION_CONTROL: [[fallthrough]];
296-
case IGPUShader::E_SHADER_STAGE::ESS_TESSELLATION_EVALUATION:
297-
if (!features.tessellationShader)
298-
{
299-
NBL_LOG_ERROR("Cannot create IGPUShader for %p, Tessellation Shader feature not enabled!", creationParams.cpushader);
300-
return nullptr;
301-
}
302-
break;
303-
case IGPUShader::E_SHADER_STAGE::ESS_GEOMETRY:
304-
if (!features.geometryShader)
305-
{
306-
NBL_LOG_ERROR("Cannot create IGPUShader for %p, Geometry Shader feature not enabled!", creationParams.cpushader);
295+
case IGPUShader::E_SHADER_STAGE::ESS_TESSELLATION_CONTROL: [[fallthrough]];
296+
case IGPUShader::E_SHADER_STAGE::ESS_TESSELLATION_EVALUATION:
297+
if (!features.tessellationShader)
298+
{
299+
NBL_LOG_ERROR("Cannot create IGPUShader for %p, Tessellation Shader feature not enabled!", creationParams.cpushader);
300+
return nullptr;
301+
}
302+
break;
303+
case IGPUShader::E_SHADER_STAGE::ESS_GEOMETRY:
304+
if (!features.geometryShader)
305+
{
306+
NBL_LOG_ERROR("Cannot create IGPUShader for %p, Geometry Shader feature not enabled!", creationParams.cpushader);
307+
return nullptr;
308+
}
309+
break;
310+
case IGPUShader::E_SHADER_STAGE::ESS_ALL_OR_LIBRARY: [[fallthrough]];
311+
case IGPUShader::E_SHADER_STAGE::ESS_VERTEX: [[fallthrough]];
312+
case IGPUShader::E_SHADER_STAGE::ESS_FRAGMENT: [[fallthrough]];
313+
case IGPUShader::E_SHADER_STAGE::ESS_COMPUTE:
314+
break;
315+
// unsupported yet
316+
case IGPUShader::E_SHADER_STAGE::ESS_TASK: [[fallthrough]];
317+
case IGPUShader::E_SHADER_STAGE::ESS_MESH:
318+
NBL_LOG_ERROR("Unsupported (yet) shader stage");
307319
return nullptr;
308-
}
309-
break;
310-
case IGPUShader::E_SHADER_STAGE::ESS_ALL_OR_LIBRARY: [[fallthrough]];
311-
case IGPUShader::E_SHADER_STAGE::ESS_VERTEX: [[fallthrough]];
312-
case IGPUShader::E_SHADER_STAGE::ESS_FRAGMENT: [[fallthrough]];
313-
case IGPUShader::E_SHADER_STAGE::ESS_COMPUTE:
314-
break;
315-
// unsupported yet
316-
case IGPUShader::E_SHADER_STAGE::ESS_TASK: [[fallthrough]];
317-
case IGPUShader::E_SHADER_STAGE::ESS_MESH:
318-
NBL_LOG_ERROR("Unsupported (yet) shader stage");
319-
return nullptr;
320-
break;
321-
case IGPUShader::E_SHADER_STAGE::ESS_RAYGEN: [[fallthrough]];
322-
case IGPUShader::E_SHADER_STAGE::ESS_ANY_HIT: [[fallthrough]];
323-
case IGPUShader::E_SHADER_STAGE::ESS_CLOSEST_HIT: [[fallthrough]];
324-
case IGPUShader::E_SHADER_STAGE::ESS_MISS: [[fallthrough]];
325-
case IGPUShader::E_SHADER_STAGE::ESS_INTERSECTION: [[fallthrough]];
326-
case IGPUShader::E_SHADER_STAGE::ESS_CALLABLE:
327-
if (!features.rayTracingPipeline)
328-
{
329-
NBL_LOG_ERROR("Cannot create IGPUShader for %p, Raytracing Pipeline feature not enabled!", creationParams.cpushader);
320+
break;
321+
case IGPUShader::E_SHADER_STAGE::ESS_RAYGEN: [[fallthrough]];
322+
case IGPUShader::E_SHADER_STAGE::ESS_ANY_HIT: [[fallthrough]];
323+
case IGPUShader::E_SHADER_STAGE::ESS_CLOSEST_HIT: [[fallthrough]];
324+
case IGPUShader::E_SHADER_STAGE::ESS_MISS: [[fallthrough]];
325+
case IGPUShader::E_SHADER_STAGE::ESS_INTERSECTION: [[fallthrough]];
326+
case IGPUShader::E_SHADER_STAGE::ESS_CALLABLE:
327+
if (!features.rayTracingPipeline)
328+
{
329+
NBL_LOG_ERROR("Cannot create IGPUShader for %p, Raytracing Pipeline feature not enabled!", creationParams.cpushader);
330+
return nullptr;
331+
}
332+
break;
333+
default:
334+
// Implicit unsupported stages or weird multi-bit stage enum values
335+
NBL_LOG_ERROR("Unknown Shader Stage %d", shaderStage);
330336
return nullptr;
331-
}
332-
break;
333-
default:
334-
// Implicit unsupported stages or weird multi-bit stage enum values
335-
NBL_LOG_ERROR("Unknown Shader Stage %d", shaderStage);
336-
return nullptr;
337-
break;
337+
break;
338338
}
339339

340340
core::smart_refctd_ptr<asset::ICPUShader> spirvShader;

0 commit comments

Comments
 (0)