Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Quiet about Graphics jobs

Discussion in 'General Discussion' started by AndersMalmgren, Apr 17, 2018.

  1. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    So Graphics jobs was introduced as experimental long time ago. But its been very quiet about the feature from UT ever since. Its still in experimental, it still crashes the player both in DX11 and Vulkan.

    Now when 6 and soon 8 cores are the norm for gaming PCs it would be nice if we could distribute the render load over multiple cores
     
    tatoforever likes this.
  2. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,139
    6 and 8 cores still definitely aren't the norm for your average gaming pc, but regardless, I share your concern about graphics jobs. Has anything changed about it in recent times?
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    5,361
    Did you report bugs for said crashes?
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    3,052
    Clicked thread expecting to type something about using Unity Connect.... :p
     
    AndersMalmgren likes this.
  5. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    Even with only 4 cores 8 threads you benefit from graphics jobs. In the mainstream segment maybe 4 cores is still the norm, but VR and none casual gamers are moving toward Ryzen and Intel 8700k

    But never the less its still interesting getting this feature for anyone with more than one logical processor?
     
  6. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    Truth be told I don't bother with that for experimental features, I use that time to report bugs on stable features :D
    But its easy to recreate, just check the Ghraphics Jobs, build game and it will crash almost instant. I test it once every new release I upgrade to
     
  7. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,139
    Oh I definitely agree that it's still very useful for 4C/8T and even 4C/4T (which I'd say IS the common gaming CPU). Maybe VR, sure, but you have to realise they are by no means the average gamer, but high end and/or a niche. I'd say mainstream and even medium core gamers will still be on 4C, most games just don't benefit from more so there isn't the incentive yet
     
    angrypenguin likes this.
  8. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,139
    Odd, I use graphics jobs without crashes
     
  9. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    We are getting there fast though the new Ryzens are crazy cheap, and I bet the 1700x will drop now
     
  10. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    We use forward rendering and SteamVR, single pass rendering, soon we switch to single pass instanced when all our shader bugs are fixed (Though instanced only saves on batches and not set pass calls and for us it seems the set pass calls are by far the most expensive thing). I dont know if its a combo of those. But Im pretty sure I tried it in a vanilla project too. Maybe its becasue I'm on 16 threads? :D
     
  11. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,139
    Vanilla forward rendering for me, no issues yet. The only issue I've found is that if you stop remote profiling a remote dev build it crashes
     
  12. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    Any performance gains?
     
  13. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,139
    I think I saw a speed boost but I haven't compared in a long time, was worth turning on
     
  14. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    I tried with 2017.4.1 and no crash for the short time I tried, thats nice!

    But also no real perfomance gain either. I'm on a 8 core ryzen 1800x

    Here with Gfx jobs enabled, watch the CPU frame time above graph
    upload_2018-4-19_19-52-29.png

    And here without gfx job
    upload_2018-4-19_19-52-55.png

    This part of the map culls pretty bad so its many set pass calls here
     
    Lu4e likes this.
  15. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    Single pass instanced does not seem todo much either for performance just yet

    upload_2018-4-19_20-31-29.png
     
  16. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    Tested jobs a bit more, and it seems it distributes work over more cores

    upload_2018-4-28_16-8-26.png

    Right side is with Graphics jobs. Since frame rate is locked to 90 fps in SteamVR GPU usage will not change. But the frame time for teh CPU is not changed either, isn't that strange?
     
  17. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,604
    Do you test with builds or in the editor?

    Also are you sure there isn't anything else bottlenecking your frametime on the cpu?
     
  18. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    Built, can't really bench in editor, SteamVR has a built in tool which calculates the time between frames both on CPU and GPU. Our domain is really thight and only adds a few fractions of a millisecond. There is no change in CPU frame time between gfx job enabled and disabled
     
    Last edited: Apr 28, 2018
    Martin_H likes this.
  19. grimunk

    grimunk

    Joined:
    Oct 3, 2014
    Posts:
    243
    https://store.steampowered.com/hwsurvey/cpus/

    4 physical cores is a big chunk of gaming rigs these days. No idea if they are hyperthreaded or not...
     
  20. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,139
  21. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    22,542
    You guys are all forgetting just how many PS4's and XBOnes there are out there that Unity's very well supporting. I think those have a fair few cores. Threading is high on Unity's list of priorities (possibly near the top).
     
    angrypenguin, Ryiah and QFSW like this.
  22. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    They probably need to perfect the syncing of the threads, my guess is that the overhead of thread syncing is too big and that's why I don't see any performance gains.

    Also maybe Vulkan works better I only tried dx11
     
  23. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    22,542
    If you use profiler you can see where the work goes (the built in Unity one).
     
    Peter77 likes this.
  24. grimunk

    grimunk

    Joined:
    Oct 3, 2014
    Posts:
    243
    Technically, you don't 'sync' threads so much as you wait until all of them have finished their work. In practice this means that the program is only as fast as the slowest thread, however in most cases the gains from breaking up the processing are so high that it's easy to ensure all the required work gets done in the time budget...

    That is if you don't bury yourself in mutex locks or stuff inordinately large amounts of data on message queues...
     
  25. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    I revisited this today, Unity 2017.4.5

    DX11 No jobs


    DX11 with Jobs, a small performance boost it seems


    Also tried Vulkan, didnt get Jobs to nto crash so this is only without Jobs, seems Vulkan needs more work
     
    Peter77 likes this.
  26. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    4,844
    It has been experimental for at least two years and it barely does anything.

    I’m not holding my breath.
     
    AndersMalmgren likes this.
  27. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    2,456
    It hurts seeing 15 cores basically doing nothing... :eek:
     
    AndersMalmgren likes this.
  28. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    It would be so awesome if we could see some real performance gains from jobs, it could mean so much more fidelity for VR games
     
  29. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
  30. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    Tried 2018.2.1 and Vulkan + gfx jobs. Does not crash so thats an improvement, but I get exactly the same perfomance with Vulkan with Jobs as I get DX11 with no jobs

    Vulkan with Jobs

    upload_2018-7-26_21-25-27.png

    DX11 no jobs
    upload_2018-7-26_21-25-53.png

    Edit its possibel somehow above screens are not valid and it was not built with gfx jobs and or vulkan enable for some reason, becasue now I cant get Vulkan + gfx to work
     
    Last edited: Jul 27, 2018
    Peter77 likes this.
  31. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    11,868
    This. The PlayStation 4 models have eight cores. The Xbox One models have eight cores. Nintendo Switch has eight cores.

    There are at least 79 million PlayStation 4 consoles on the market.

    https://en.wikipedia.org/wiki/PlayStation_4

    There are at least 18 million Xbox One consoles on the market.

    https://en.wikipedia.org/wiki/Xbox_One#Sales

    There are at least 17 million Nintendo Switch consoles on the market.

    https://en.wikipedia.org/wiki/Nintendo_Switch

    Steam has 125 million users.

    https://store.steampowered.com/news/21534/

    With the hardware survey we know there are about 29.5 million on two cores and 90.75 million on four cores.

    https://store.steampowered.com/hwsurvey/cpus/

    Add up the Steam numbers and you get about 120 million and while that's huge it's not that many more than the number of console users. Add up the console numbers and you get about 114 million. Keep in mind that the numbers are old for both sets and that Microsoft is tight lipped with their numbers as well.
     
  32. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    I have a strange bug with 2018.2.1 that the game closes itself and reopens in a new process and window. The second window will not connect to the profiler, so cant profile. It might be related to Steamworks.
     
  33. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    22,542
    You should post a bug report because that has nothing to do with this thread :p
     
    QFSW and Peter77 like this.
  34. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493
    Well it was more an explain why I cant supply profiler screenshots
     
  35. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    2,493