yuphin / Lumen

A Vulkan Raytracing framework for various bidirectional path tracing techniques
MIT License
449 stars 29 forks source link

Crashes and errors #3

Closed trsh closed 1 year ago

trsh commented 1 year ago

The release version (1 from git releases) crashes without any warnings. It says Logger initialized and window closes.

I build a release with VS 2022 and got this.

  1. Console full of everything, like https://pastebin.com/DF19sUaZ . Never ending scroll.
  2. And at last:
Unable to parse built-ins
ERROR: 0:362: 'double' : not supported with this profile: none
ERROR: 0:362: '' : compilation terminated
INTERNAL ERROR: Unable to parse built-ins
ERROR: 0:3: 'arrays of arrays' : not supported with this profile: none
ERROR: 0:3: 'arrays of arrays' : not supported with this profile: none
ERROR: 0:3: '' : compilation terminated
INTERNAL ERROR: Unable to parse built-ins

void subgroupMemoryBarrierShared();
void barrier();void memoryBarrierShared();void groupMemoryBarrier();void writePackedPrimitiveIndices4x8NV(uint, uint);
out gl_MeshPerVertexNV {vec4 gl_Position;float gl_PointSize;float gl_ClipDistance[];float gl_CullDistance[];perviewNV vec4 gl_PositionPerViewNV[];perviewNV float gl_ClipDistancePerViewNV[][];perviewNV float gl_CullDistancePerViewNV[][];} gl_MeshVerticesNV[];perprimitiveNV out gl_MeshPerPrimitiveNV {int gl_PrimitiveID;int gl_Layer;int gl_ViewportIndex;int gl_ViewportMask[];perviewNV int gl_LayerPerViewNV[];perviewNV int gl_ViewportMaskPerViewNV[][];} gl_MeshPrimitivesNV[];out uint gl_PrimitiveCountNV;out uint gl_PrimitiveIndicesNV[];in uint gl_MeshViewCountNV;in uint gl_MeshViewIndicesNV[4];const highp uvec3 gl_WorkGroupSize = uvec3(1,1,1);in highp uvec3 gl_WorkGroupID;in highp uvec3 gl_LocalInvocationID;in highp uvec3 gl_GlobalInvocationID;in highp uint gl_LocalInvocationIndex;
in highp int gl_DeviceIndex;in int gl_DrawIDARB;
in int gl_DrawID;
uniform uint gl_SubGroupSizeARB;in uint     gl_SubGroupInvocationARB;in uint64_t gl_SubGroupEqMaskARB;in uint64_t gl_SubGroupGeMaskARB;in uint64_t gl_SubGroupGtMaskARB;in uint64_t gl_SubGroupLeMaskARB;in uint64_t gl_SubGroupLtMaskARB;
in mediump uint  gl_SubgroupSize;in mediump uint  gl_SubgroupInvocationID;in highp   uvec4 gl_SubgroupEqMask;in highp   uvec4 gl_SubgroupGeMask;in highp   uvec4 gl_SubgroupGtMask;in highp   uvec4 gl_SubgroupLeMask;in highp   uvec4 gl_SubgroupLtMask;in highp   uint  gl_WarpsPerSMNV;in highp   uint  gl_SMCountNV;in highp   uint  gl_WarpIDNV;in highp   uint  gl_SMIDNV;
in highp   uint  gl_NumSubgroups;in highp   uint  gl_SubgroupID;
const highp int gl_ShadingRateFlag2VerticalPixelsEXT       = 1;
const highp int gl_ShadingRateFlag4VerticalPixelsEXT       = 2;
const highp int gl_ShadingRateFlag2HorizontalPixelsEXT     = 4;
const highp int gl_ShadingRateFlag4HorizontalPixelsEXT     = 8;

src/shaders/integrators/restir/gi/restir.rgen: error: #version: ray tracing shaders require non-es profile with version 460 or above
src/shaders/integrators/restir/gi/spatial_reuse.rgen: error: #version: ray tracing shaders require non-es profile with version 460 or above
src/shaders/ray.rahit: error: #version: ray tracing shaders require non-es profile with version 460 or above
src/shaders/ray.rchit: error: #version: ray tracing shaders require non-es profile with version 460 or above
src/shaders/integrators/restir/gi/temporal_reuse.rgen: error: #version: ray tracing shaders require non-es profile with version 460 or above
src/shaders/ray.rmiss: error: #version: ray tracing shaders require non-es profile with version 460 or above
src/shaders/post.frag: error: #version: Desktop shaders for Vulkan SPIR-V require version 140 or higher
src/shaders/post.vert: error: #version: Desktop shaders for Vulkan SPIR-V require version 140 or higher
src/shaders/ray_shadow.rmiss: error: #version: ray tracing shaders require non-es profile with version 460 or above
Failed to create shader module!
Failed to create shader module!
Failed to create shader module!
Failed to create shader module!
Failed to create shader module!
Unhandled image layout case
yuphin commented 1 year ago

Seems that the issue is during the compilation of ray tracing shaders. Currently Lumen assumes the GPU supports RTX (or at least Vulkan RT). What GPU do you have?

trsh commented 1 year ago

Seems that the issue is during the compilation of ray tracing shaders. Currently Lumen assumes the GPU supports RTX (or at least Vulkan RT). What GPU do you have?

RTX 3060

yuphin commented 1 year ago

Hmm, did you try updating the Vulkan SDK? Judging by the output, it seems like your glslang doesn't compile the shaders correctly. By the way in the master branch Lumen is currently using shaderc instead of relying on an external glslang. What's the behavior there? (Note that the code in master branch needs Vulkan beta drivers to work properly)

trsh commented 1 year ago

My vulkan sdk is 1.3.216.0. And I am using master branch.

yuphin commented 1 year ago

Although I've the same GPU, I couldn't reproduce it. Did you try changing the USE_SHADERC define in Framework/Shader.cpp? (In the master branch)

trsh commented 1 year ago

Sorry. I missed this. No I did not try to change this define.