Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

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