Search Unity

Question My compute shader break when NOT adding enable_d3d11_debug_symbols

Discussion in 'Shaders' started by wechat_os_Qy05rdOcAMsibxHQFvnopygcs, Mar 29, 2023.

  1. wechat_os_Qy05rdOcAMsibxHQFvnopygcs

    wechat_os_Qy05rdOcAMsibxHQFvnopygcs

    Joined:
    Mar 29, 2023
    Posts:
    2
    I am implementing cluster lighting. Everything works fine at first. But after I change my StructuredBuffer to uniform buffer for the light list. The screen starts to flickering. I notice if I add enable_d3d11_debug_symbols when it's fixed. This behavior is even consistent in my android vulkan build. I think something is optimized away when not adding enable_d3d11_debug_symbols

    I'm using Unity 2020.3.36f1.
     
  2. wechat_os_Qy05rdOcAMsibxHQFvnopygcs

    wechat_os_Qy05rdOcAMsibxHQFvnopygcs

    Joined:
    Mar 29, 2023
    Posts:
    2
    Ok I think I found the problem. I am using GroupMemoryBarrierWithGroupSync when using a cross group buffer. I should use DeviceMemoryBarrierWithGroupSync instead. I guess by adding enable_d3d11_debug_symbols, unity enforces the strongest barrier for debuggers