cinera_handmade.network/cmuratori/hero/code/code406.hmml

68 lines
4.5 KiB
Plaintext
Raw Permalink Normal View History

[video output=day406 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Getting a Graphics Debugger Working" vod_platform=youtube id=ozEdHE2ie8o annotator=Miblo]
[0:02][Welcome to the new setup]
[3:08][Open up and begin to reacquaint ourselves with the code]
[4:18][Run the game to see that it is running correctly, but with weird artifacts]
[5:40][handmade_render_group.cpp: Continue to reacquaint ourselves with the lighting code]
[18:19][handmade_platform.h: Describe the lighting_textures struct, from where we left off]
[22:08][handmade_world_mode.cpp: Check our hotkeys]
[23:14][Run the game and toggle on the lighting solution]
[24:27][handmade_opengl.cpp: Make CompileZBiasProgram() set UseLightC to 1, 0, 0]
[26:08][Run the game to see red]
[26:58][Graphics debuggers]
[29:47][Run our game in RenderDoc]
[35:39][Install Nsight and update the graphics driver[ref
site="NVIDIA"
page="Nsight"
url="https://developer.nvidia.com/nvidia-nsight-visual-studio-edition"]]
[48:21][Run our game with the Nsight HUD enabled, try to capture a frame but remain stuck in the HUD]
[53:56][Inspect our captured rendering data]
[57:07][Try to capture a frame with the game window not fullscreen]
[59:58][Inspect our shader data]
[1:03:08][handmade_opengl.cpp: VoxMinCorner and VoxInvCelDim]
[1:04:05][Run the game, toggle on the lighting, try to Alt-Tab to Visual Studio and crash in Win32ProcessPendingMessages()]
[1:06:29][build.bat: Remove the HANDMADE_STREAMING workaround]
[1:09:13][Run the game, crash in the same manner in Win32ProcessPendingMessages() and investigate why]
[1:19:42][Read the disassembly in the TIMED_BLOCK PeekMessage, and guess that our debug events are piling up and overflowing]
[1:23:31][build.bat: Toggle off HANDMADE_INTERNAL and run the game without problem]
[1:26:30][Investigate our debug events overflow]
[1:29:29][win32_handmade.cpp: Count our loops through TIMED_BLOCK("PeekMesssage") in Win32ProcessPendingMessages()]
[1:32:12][Find a massive number of messages]
[1:34:16][win32_handmade.cpp: Buffer up our messages]
[1:35:20][Find that all those messages are 0x738, and try to identify that message]
[1:39:25][Describe WM_USER]
[1:41:02][Launch Spy++]
[1:45:26][Use Spy++ to try and determine who is issuing the 0x738 messages]
[1:52:37][Reflect on the situation]
[1:58:50][win32_handmade.cpp: Temporarily prevent Win32ProcessPendingMessages() from calling TIMED_BLOCK("PeekMessage")]
[1:59:34][Run the game to find that we avoid the crash]
[2:01:01][Q&A][:speech]
[2:01:46][@bestalloys][Regarding message 0x738[ref
site="Fleex's Lab"
page="Windows 10 1703 sometimes sends messages in response to PeekMessage"
url="https://fleexlab.blogspot.co.uk/2017/06/windows-10-1703-sometimes-sends.html"]]
[2:05:34][win32_handmade.cpp: Make Win32ProcessPendingMessages() skip the 0x738 message]
[2:09:00][Run the game without crashing]
[2:11:35][Consult our rendering data]
[2:13:28][@abarishu][What do you mean by "generated" message?]
[2:15:36][@uplinkcoder][This seems to be a known big since Windows 10 build 1703]
[2:16:23][@resantic][How is the performance of the from-scratch-written renderer compared to OpenGL?]
[2:16:37][@vaualbus][How in 4coder you make it possible to have typedef highlight?]
[2:17:25][@khrob][If this has been answered many times, Ill dig back through YouTube, but when and why did Handmade Hero move from being a fully software rendered project to using graphics APIs?]
[2:18:33][@sahfortv][Any chance to run the game with the lighting actually on, just for old time's sake?]
[2:18:39][@dautor][How would you cast a pointer and call it directly without an extra typedef?]
[2:20:19][@resantic][How about 2D? How is the performance there?]
[2:20:36][@dautor][Function pointer, yeah]
[2:20:40][Demo calling a function pointer without making a typedef]
[2:25:04][Blackboard: Mathematical operator precedence, and Dijkstra's shunting yard algorithm]
[2:30:04][Blackboard: Abstract syntax tree]
[2:32:37][Blackboard: Parsing a cast expression into an abstract syntax tree]
[2:34:07][Blackboard: Understanding the function pointer cast]
[2:43:48][@dautor][I was doing some compiler things a few months ago. Could a parser programming (maybe operator parsing only) stream?]
[2:44:17][@popcorn0x90][Can you explain how you would fix some stuff such as the fog in PUBG someday? Maybe like a 9-hour lecture?]
[2:44:31][@rytzale][What "blackboard" program are you using?[ref
site="Milton"
url="https://www.miltonpaint.com/"]]
[2:45:20][A few words on C's type definition syntax][:speech]
[2:48:02][Wrap it up][:speech]
[/video]