zed icon indicating copy to clipboard operation
zed copied to clipboard

Add `ZED_BLADE_VALIDATE` flag for enabling blade validation on Linux

Open probably-neb opened this issue 11 months ago • 6 comments

Closes #ISSUE

Stems from https://github.com/zed-industries/zed/issues/28851#issuecomment-2869970976

Release Notes:

  • linux: Add ZED_BLADE_VALIDATE flag for enabling blade validation

probably-neb avatar May 12 '25 13:05 probably-neb

Messages
:book:

This PR includes links to the following GitHub Issues: #28851 If this PR aims to close an issue, please include a Closes #ISSUE line at the top of the PR body.

Generated by :no_entry_sign: dangerJS against 559944d2a550b0e68df91fd321c45309dbd91b40

zed-industries-bot avatar May 12 '25 13:05 zed-industries-bot

Hey @kvark, apologies for the double ping, I've added an env var to enable or disable the validate flag on the ContextDesc struct, however, I'm having trouble determining if there's anything else we should do to surface the information that gets generated when this flag is enabled, or whether it will just cause more context to show up in errors when they occur and this should just be merged as is.

probably-neb avatar May 12 '25 13:05 probably-neb

I see, what would you recommend doing instead to fully enable/utilize the debug information output?

probably-neb avatar May 24 '25 14:05 probably-neb

I thought this could be just one of the settings in Zed config.

kvark avatar May 25 '25 00:05 kvark

Ok, how it is enabled can be a flag or value in settings. I don't have strong feelings on that. What I'm wondering is whether there is anything else we need to do besides set validation: true to output the debug information / make it useful. Will it be outputted as logs? Or is it something else?

probably-neb avatar May 25 '25 15:05 probably-neb

Easiest way to configure the behavior of validation layers is via this file - https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/main/layers/vk_layer_settings.txt I have it in Blade repo, for example - https://github.com/kvark/blade/blob/main/vk_layer_settings.txt The default behavior of "khronos_validation.printf_to_stdout" is true, which is probably what you want.

kvark avatar May 25 '25 22:05 kvark

Ok, it sounds like this is something we should just document.

I.e. using the

VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation zed

env var as you described to enable the validation layers, as well as pointing users to a link to download the vulkan SDK themselves. I misunderstood the validation flag in ContextDesc.

If there is actually something useful we could do to make using the validation layers nicer, let me know

probably-neb avatar Jun 06 '25 13:06 probably-neb