CppCon 2017: Nicolas Guillemot “Design Patterns for Low-Level Real-Time Rendering”

CppCon.org
-
Presentation Slides, PDFs, Source Code and other presenter materials are available at: github.com/CppCon/CppCon2017
-
In recent years, the GPU graphics community has seen the introduction of many new GPU programming APIs like Khronos' Vulkan, Microsoft's Direct3D 12, and Apple's Metal. These APIs present much more control of GPU hardware, but bring with them a great increase in complexity. We need to rethink the way we do graphics programming to take advantage of new features, while also keeping complexity under control.
This talk presents solutions to recurring programming problems with these new GPU graphics APIs. These solutions are intended to simplify the complexity of the API by an order of magnitude, while simultaneously improving overall performance. This talk aims to discuss some key techniques for other developers to create their own GPU rendering engine.
Topics covered include using a ring buffer to stream data and descriptors from CPU to GPU, scheduling GPU memory and work from the CPU, designing a multi-pass real-time GPU renderer, and using fork/join parallelism to increase the performance of the CPU code that submits GPU work.
-
Nicolas Guillemot: University of Victoria, MSc Student
Nicolas is a master's student at the University of Victoria, where he searches for solutions to the game industry's real-time rendering problems at the intersection of software and hardware. In the past, Nicolas has worked at Electronic Arts, and in Intel's Visual and Parallel Computing Advanced Technology Group.
-
Videos Filmed & Edited by Bash Films: www.BashFilms.com
*-----*
Register Now For CppCon 2022: cppcon.org/registration/
*-----*

Пікірлер: 30

  • @jankodedic3130
    @jankodedic31306 жыл бұрын

    This guy explains everything so well... Great talk!

  • @broken_abi6973

    @broken_abi6973

    6 жыл бұрын

    Janko Dedic as always!

  • @OperationDarkside
    @OperationDarkside5 жыл бұрын

    I would have needed these explanations far sooner. This was finally a version I understood. So many other tutorials and talks assume existing knowledge of graphics programming

  • @scolic03
    @scolic036 жыл бұрын

    10/10 talk, liked, shared on Facebook, subscribed, excitedly printed on A3 wallpaper, studied and revered! This kind of explanation only comes from a person knowing the subject matter intimately. A lot of hard work went into this talk and it shows. Thank you.

  • @satellite964
    @satellite9643 жыл бұрын

    This is the stuff I wanted to learn at Uni when I got my CS degree, instead I got put through OOP hell, I wasted time learning OOP stuff that I don't even use in real life. Also UML(overrated), a sprinkling of stuff like SCRUM and AGILE, all of which could've been picked up automatically from actually working in a firm. The math courses were worth it though.

  • @k6l2t

    @k6l2t

    2 жыл бұрын

    His proposal for the render graph abstraction layer was basically an OOP rabbit hole design though. There are no "free" abstractions.

  • @PixelPulse168
    @PixelPulse1686 жыл бұрын

    cppcon is awesome.

  • @jaredmistretta3018
    @jaredmistretta30186 жыл бұрын

    Great talk! Great ideas explained simply and concisely. Good job!

  • @user-ws4xj4fi7i
    @user-ws4xj4fi7i4 ай бұрын

    Amazing explanation methods!

  • @sc0reBDO
    @sc0reBDO5 жыл бұрын

    48:01 Stack allocator might be beneficial for this case. Basically it makes the memory allocated for T1 to be implicitly reused for OUT (due to nature of stack allocators). So sequence will be: [NEW T2] [NEW T1] [RUN A] [DEL T1] [NEW OUT] ...

  • @greje656
    @greje6566 жыл бұрын

    great talk!

  • @Sychonut
    @Sychonut6 жыл бұрын

    Interesting talk. Thanks for sharing!

  • @TheLavaBlock
    @TheLavaBlock5 жыл бұрын

    Thanks for sharing. Great

  • @cgcode
    @cgcode2 жыл бұрын

    Thank you for your great talk!

  • @CppCon

    @CppCon

    2 жыл бұрын

    Glad you enjoyed it!

  • @raghul1208
    @raghul1208 Жыл бұрын

    excellent

  • @u28OO
    @u28OO11 ай бұрын

    thx!

  • @infinitecmdz
    @infinitecmdz6 жыл бұрын

    Since opengl context can be bound to one thread at a time, how does a fork, join thread of command list work?

  • @guy1524

    @guy1524

    6 жыл бұрын

    OpenGL is high level

  • @infinitecmdz

    @infinitecmdz

    6 жыл бұрын

    dont understand, how is opengl high level here. The presenter said command list are opengl functions like glUseProgram, setting shader parameters etc. My question is since opengl context is only current for one thread at a time, how do you fork and join multiple threads?

  • @nlguillemot

    @nlguillemot

    6 жыл бұрын

    It is possible to write OpenGL commands from multiple threads using multiple GL contexts, but you won't reap the benefits of multi-threaded command writing that exist in D3D12 and Vulkan. The closest thing in GL is NVIDIA's extension NV_command_list. Broadly, I think OpenGL has been designed to use multi-threading in a different way. Rather than using multi-threading to accelerate command list writing, you use multi-threading to accelerate operations on memory mapped buffers. This comes from the observation that even if you only have a GL context bound to one thread, the memory mapped pointers of its buffers can be freely passed to and accessed by other threads. So you can memory map a buffer, then spawn some tasks which each write a region of that buffer, and join them all when they finish their work. You can take this idea very far in the design of a very data-oriented rendering engine (see "Almost Zero Driver Overhead" GDC presentation). You can also do something similar to recording draw commands in this style, since you can write indirect draw commands to a memory mapped buffer from multiple threads (again, see AZDO talk for details.) Also, some OpenGL drivers internally use multi-threading to accelerate itself, so it's effectively trying to automatically do the things you would otherwise be doing manually in these lower level APIs. One benefit of these newer APIs is that you no longer depend so much on threads internal to the driver, although there still exist some things happening asynchronously beyond your control. For example, the system paging process manages operations for the GPU's page table asynchronously from your program, in an effort to transparently hide the latency of those operations.

  • @infinitecmdz

    @infinitecmdz

    6 жыл бұрын

    thanks for your detailed answer. The talk is amazing and i liked your explanation of ring buffers. Yes i have seen AZDO presentation and have used many if not all of the suggestions. have you had any experimentation on having data structures on the gpu that can simulate a scene graph and scene graph traversals?

  • @nlguillemot

    @nlguillemot

    6 жыл бұрын

    I'm glad you liked the talk! With regards to your question, I'm wondering what your idea of a scene graph is, and what kind of operation you intend to do when traversing it. You can definitely use eg. a compute shader to traverse a data structure like that. If you want the GPU to feed itself with draw calls through that scene traversal, you can do that by writing to an indirect draw buffer from the aforementioned compute shader, and follow the compute shader by a call to eg. glDraw*Indirect. D3D12's indirect draw can let you take this one step further, since it also allows you to also switch shader parameters (like texture and buffer bindings and etc) through indirect commands. Some platforms also allow you to switch the currently bound pipeline state object itself through indirect draw commands. NVIDIA also has an interesting experimental Vulkan extension that gives you access to the command encoder from GPU code: developer.nvidia.com/driver-and-new-sample-vknvxdevicegeneratedcommands

  • @henrituhola
    @henrituhola6 жыл бұрын

    Barely scratches the paint on the surface of the subject. I hoped to see some real code among it and not just those oversimplifications.

  • @aleksijokinen9914

    @aleksijokinen9914

    6 жыл бұрын

    There was a lot of ground to cover. Going any deeper would've needed multiple 1h talks. I think the talk was a really good high level overview.

  • @N00byEdge

    @N00byEdge

    6 жыл бұрын

    Yeah another reason not to go into the code specifics is that each GPU API is very different. It is good to know how it works in general

  • @MartinPreinfalk
    @MartinPreinfalk5 жыл бұрын

    great talk!