Closed Hideman85 closed 2 months ago
This does not work because fsl runs its own preprocessor step, you can use this:
@fsl_extension GL_EXT_debug_printf: enable
float4 PS_MAIN(VSOutput In)
{
INIT_MAIN;
float4 Out;
debugPrintfEXT("Hello World!");
Thanks @david-tf for your reply 🙌
It seems it needs something more when using the shader in the app cause now it isnt running.
vkCreateShaderModule(): The SPIR-V Extension (SPV_KHR_non_semantic_info) was declared, but none of the requirements were met to use it. The Vulkan spec states: If pCode declares any of the SPIR-V extensions listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied.
Do you know what I should do in the app code? I havent found something in ShaderLoadDesc
that I could flag on.
Thanks in advance for your help 🙏
You will need to add VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME to the ppDeviceExtensions/mDeviceExtensionCount RendererDesc.
Perfect, thanks again 🙌
I cant see any logs for some reason even tho my shader is running. Note the documentation said that by default the Debug callback handle it (the one created by The Forge) but nothing is dumped. I tried with the env VK_LAYER_PRINTF_TO_STDOUT=1
that should redirect to stdout but nothing either. Any Idea?
I would like to enable shader debugging to help me find issues in my implementation. Right now I'm using Vulkan backend only and so I would like to have
printf
with#extension GL_EXT_debug_printf : enable
but no way to have this working. As soon as I put a string in my shader, I'm getting the compilation errorAnd when I put
#extension GL_EXT_debug_printf : enable
I'm gettingI checked the
fsl.py
compiler and seem no options for enabling this. How can I do so?