Skip to content

Commit 9bd058a

Browse files
committed
[ur] Match null DDI table entry error code
When validation is disabled and an adapter does not sets a DDI table entry to null the loader returns `UR_RESULT_ERROR_UNINITIALIZED` however when validation is enabled `UR_RESULT_ERROR_FEATURE_UNSUPPORTED` is returned. This patch aligns the error codes return by the loader and validation layer when a null DDI table entry is found.
1 parent a00e9ba commit 9bd058a

File tree

2 files changed

+172
-171
lines changed

2 files changed

+172
-171
lines changed

scripts/templates/valddi.cpp.mako

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ namespace ur_validation_layer
4747
{
4848
auto ${th.make_pfn_name(n, tags, obj)} = context.${n}DdiTable.${th.get_table_name(n, tags, obj)}.${th.make_pfn_name(n, tags, obj)};
4949

50-
if( nullptr == ${th.make_pfn_name(n, tags, obj)} )
51-
return ${X}_RESULT_ERROR_UNSUPPORTED_FEATURE;
50+
if( nullptr == ${th.make_pfn_name(n, tags, obj)} ) {
51+
return ${X}_RESULT_ERROR_UNINITIALIZED;
52+
}
5253

5354
if( context.enableParameterValidation )
5455
{

0 commit comments

Comments
 (0)