Skip to content

fix whole-wildcard and short prefix globs in determine_filter_type - #1990

Open
aizu-m wants to merge 1 commit into
KhronosGroup:mainfrom
aizu-m:filter-glob-classification
Open

fix whole-wildcard and short prefix globs in determine_filter_type#1990
aizu-m wants to merge 1 commit into
KhronosGroup:mainfrom
aizu-m:filter-glob-classification

Conversation

@aizu-m

@aizu-m aizu-m commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Setting the select filter to the whole-wildcard form leaves no usable driver:

$ VK_LOADER_DRIVERS_SELECT='**' ./vulkaninfo
[Vulkan Loader] WARNING | DRIVER: Driver "ABC_ICD.json" ignored because not selected by env var 'VK_LOADER_DRIVERS_SELECT'
[Vulkan Loader] WARNING | DRIVER: Driver "BCD_ICD.json" ignored because not selected by env var 'VK_LOADER_DRIVERS_SELECT'
vkCreateInstance: VK_ERROR_INCOMPATIBLE_DRIVER

Found this reading determine_filter_type for something unrelated. ** is one of the three
whole-wildcard forms next to * and ~all~, so it should have matched every name.

Both branches that classify a token as FILTER_STRING_SPECIAL assign the type and then fall
through into the star_begin/star_end classification below, which overwrites it. ** comes out
as a suffix filter on *, and no manifest or layer name ends in a star. The filter_length == 2
test also never checked the leading character, so a two character glob like A* took that same
branch and ended up FILTER_STRING_FULLNAME on the literal A* rather than a prefix on A.

Worth noting the disable direction fails open: VK_LOADER_LAYERS_DISABLE=** sets neither
disable_all nor a filter that can match, so every layer stays enabled.

Returning once a token is classified special, and requiring the leading star for the two
character case, fixes both. Every other glob form classifies exactly as before.

@ci-tester-lunarg

Copy link
Copy Markdown

Author aizu-m not on autobuild list. Waiting for curator authorization before starting CI build.

1 similar comment
@ci-tester-lunarg

Copy link
Copy Markdown

Author aizu-m not on autobuild list. Waiting for curator authorization before starting CI build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants