Handmade Hero»Episode Guide
Aligning Rendering Memory
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next marker
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
1:23Set the stage for this week
1:23Set the stage for this week
1:23Set the stage for this week
2:51Demo the problem with the tile size
2:51Demo the problem with the tile size
2:51Demo the problem with the tile size
4:04Confirm that _mm_sfence is unnecessary
4:04Confirm that _mm_sfence is unnecessary
4:04Confirm that _mm_sfence is unnecessary
5:46Blackboard: "Write-Combining Memory"
5:46Blackboard: "Write-Combining Memory"
5:46Blackboard: "Write-Combining Memory"
13:43Blackboard: Tiles and Alignment
13:43Blackboard: Tiles and Alignment
13:43Blackboard: Tiles and Alignment
21:02Suggest rounding TileWidth and TileHeight to the nearest 4 and aligning the tiles to the 4-byte boundary
21:02Suggest rounding TileWidth and TileHeight to the nearest 4 and aligning the tiles to the 4-byte boundary
21:02Suggest rounding TileWidth and TileHeight to the nearest 4 and aligning the tiles to the 4-byte boundary
21:35Think some more, and then unthink it
21:35Think some more, and then unthink it
21:35Think some more, and then unthink it
22:11handmade_render_group.cpp: Ensure that we always get aligned tiles
22:11handmade_render_group.cpp: Ensure that we always get aligned tiles
22:11handmade_render_group.cpp: Ensure that we always get aligned tiles
23:27Blackboard: Calculating and filling the correct number of 4-pixel units
23:27Blackboard: Calculating and filling the correct number of 4-pixel units
23:27Blackboard: Calculating and filling the correct number of 4-pixel units
26:10Blackboard: The destination buffer must always allow us to overwrite it by a certain amount
26:10Blackboard: The destination buffer must always allow us to overwrite it by a certain amount
26:10Blackboard: The destination buffer must always allow us to overwrite it by a certain amount
29:49Assert that OutputTarget->Memory is aligned to 16-bytes
29:49Assert that OutputTarget->Memory is aligned to 16-bytes
29:49Assert that OutputTarget->Memory is aligned to 16-bytes
31:45Round TileWidth up to the nearest 4
31:45Round TileWidth up to the nearest 4
31:45Round TileWidth up to the nearest 4
33:13See what numbers we're getting
33:13See what numbers we're getting
33:13See what numbers we're getting
34:14Ensure that FinalTileWidth accounts for the fact that it'll be smaller
34:14Ensure that FinalTileWidth accounts for the fact that it'll be smaller
34:14Ensure that FinalTileWidth accounts for the fact that it'll be smaller
34:54Remove FinalTileWidth and limit ClipRect.MaxX to the OutputTarget->Width
34:54Remove FinalTileWidth and limit ClipRect.MaxX to the OutputTarget->Width
34:54Remove FinalTileWidth and limit ClipRect.MaxX to the OutputTarget->Width
35:23Remove the ClipRect adjustments
35:23Remove the ClipRect adjustments
35:23Remove the ClipRect adjustments
36:17Run single-threaded for the moment
36:17Run single-threaded for the moment
36:17Run single-threaded for the moment
37:06Moment of realisation: We're only clipping to the end, but don't handle clipping at the beginning
37:06Moment of realisation: We're only clipping to the end, but don't handle clipping at the beginning
37:06Moment of realisation: We're only clipping to the end, but don't handle clipping at the beginning
37:34Blackboard: The clipping problem
37:34Blackboard: The clipping problem
37:34Blackboard: The clipping problem
41:58Align the MinX and MaxX
41:58Align the MinX and MaxX
41:58Align the MinX and MaxX
47:08Blackboard: Setting the EndClipMasks
47:08Blackboard: Setting the EndClipMasks
47:08Blackboard: Setting the EndClipMasks
48:24Figure out when to use the EndClipMask
48:24Figure out when to use the EndClipMask
48:24Figure out when to use the EndClipMask
50:01Compile and see what's happening
50:01Compile and see what's happening
50:01Compile and see what's happening
50:30Reverse the sense of the test and run it again
50:30Reverse the sense of the test and run it again
50:30Reverse the sense of the test and run it again
50:55See if we're always aligned
50:55See if we're always aligned
50:55See if we're always aligned
51:16Compile in -O2 and turn on multi-threading to ensure everything's still kosher
51:16Compile in -O2 and turn on multi-threading to ensure everything's still kosher
51:16Compile in -O2 and turn on multi-threading to ensure everything's still kosher
52:02win32_handmade.cpp: Double-check that the platform code is allocating the memory aligned
52:02win32_handmade.cpp: Double-check that the platform code is allocating the memory aligned
52:02win32_handmade.cpp: Double-check that the platform code is allocating the memory aligned
53:20Align Buffer->Pitch to 16-bytes
53:20Align Buffer->Pitch to 16-bytes
53:20Align Buffer->Pitch to 16-bytes
54:10handmade_platform.h: Introduce Align16
54:10handmade_platform.h: Introduce Align16
54:10handmade_platform.h: Introduce Align16
55:13Everything looks fine at 1920x1080
55:13Everything looks fine at 1920x1080
55:13Everything looks fine at 1920x1080
56:13handmade.cpp: Setup the PlatformAddEntry and PlatformCompleteAllWork at the beginning
56:13handmade.cpp: Setup the PlatformAddEntry and PlatformCompleteAllWork at the beginning
56:13handmade.cpp: Setup the PlatformAddEntry and PlatformCompleteAllWork at the beginning
58:00Q&A
🗩
58:00Q&A
🗩
58:00Q&A
🗩
58:43robotchocolatedino The bitmap memory size calculation squares BytesPerPixel which allocates more memory than necessary
🗪
58:43robotchocolatedino The bitmap memory size calculation squares BytesPerPixel which allocates more memory than necessary
🗪
58:43robotchocolatedino The bitmap memory size calculation squares BytesPerPixel which allocates more memory than necessary
🗪
58:50win32_handmade.cpp: Remove the multiplication by BytesPerPixel
58:50win32_handmade.cpp: Remove the multiplication by BytesPerPixel
58:50win32_handmade.cpp: Remove the multiplication by BytesPerPixel
59:19ttbjm Can you test if weird resolutions actually are working?
🗪
59:19ttbjm Can you test if weird resolutions actually are working?
🗪
59:19ttbjm Can you test if weird resolutions actually are working?
🗪
1:00:33handmade_render_group.cpp: Ensure that it goes all the way to the end if this is the last tile
1:00:33handmade_render_group.cpp: Ensure that it goes all the way to the end if this is the last tile
1:00:33handmade_render_group.cpp: Ensure that it goes all the way to the end if this is the last tile
1:07:06handmade.cpp: Hard-set the game's DrawBuffer dimensions to test our support of arbitrary resolutions
1:07:06handmade.cpp: Hard-set the game's DrawBuffer dimensions to test our support of arbitrary resolutions
1:07:06handmade.cpp: Hard-set the game's DrawBuffer dimensions to test our support of arbitrary resolutions
1:08:28braincruser Will you check for Cache Aliasing? With this much alignment hitting cache aliasing is much easier
🗪
1:08:28braincruser Will you check for Cache Aliasing? With this much alignment hitting cache aliasing is much easier
🗪
1:08:28braincruser Will you check for Cache Aliasing? With this much alignment hitting cache aliasing is much easier
🗪
1:08:51braincruser Cache Associativity aliasing...
🗪
1:08:51braincruser Cache Associativity aliasing...
🗪
1:08:51braincruser Cache Associativity aliasing...
🗪
1:09:27flyingwafflenyc What about the extra pixel around the edges to deal with bilinear filtering? Will you get rid of that?
🗪
1:09:27flyingwafflenyc What about the extra pixel around the edges to deal with bilinear filtering? Will you get rid of that?
🗪
1:09:27flyingwafflenyc What about the extra pixel around the edges to deal with bilinear filtering? Will you get rid of that?
🗪
1:10:33Compile with that #if 0'd out and glimpse into the future of 4K art
1:10:33Compile with that #if 0'd out and glimpse into the future of 4K art
1:10:33Compile with that #if 0'd out and glimpse into the future of 4K art
1:11:50pragmascrypt Will you keep the rendering of the two lines on separate hyperthreads?
🗪
1:11:50pragmascrypt Will you keep the rendering of the two lines on separate hyperthreads?
🗪
1:11:50pragmascrypt Will you keep the rendering of the two lines on separate hyperthreads?
🗪
1:13:33terrorscout So this game is going to be a 4K Zelda 1-style game?
🗪
1:13:33terrorscout So this game is going to be a 4K Zelda 1-style game?
🗪
1:13:33terrorscout So this game is going to be a 4K Zelda 1-style game?
🗪
1:14:43Assess our progress and glimpse into the future of tightening up the renderer
1:14:43Assess our progress and glimpse into the future of tightening up the renderer
1:14:43Assess our progress and glimpse into the future of tightening up the renderer
1:16:38Shut things down here
🗩
1:16:38Shut things down here
🗩
1:16:38Shut things down here
🗩