is presently its sole maintainer,
You can support him:
Welcome. Details about the texture transfer saga.
nvidia didn't respond yet about _how_ to properly transfer textures overlapped.
Overlapping CPU work and GPU work are not the same thing. There are 2 required copies that have to happen in order for the textures to get to the GPU: one off of the disk into memory that GPU can _see_, and then from the memory that the GPU can see into the actual memory resident on the GPU.
Direct GPU Mapping process description
How do we tell the driver to start transferring textures using the asynchronous memory transfer capabilities that the card has
Decision to wait for nvidia's response about what they think the best way to transfer textures would be
Reminder that we don't fence the download on either side and doubt about whether that creates problems
Alternative approach - we could just continue to download textures on a single thread
Decide to fix the debug code
Reminder that on the AMD machine that Casey uses, the texture download problems don't seem to happen
glFlush() seems to force the download to happen on a separate thread
Reminder about the original debug code purposes
Focus on the debug interface
win32_handmade.cpp GlobalPause and GlobalUseSoftwareRendering would be nice to be included in the interface
win32_handmade.cpp - DEBUG_EDIT() as a means to include GlobalPause and GlobalUseSoftwareRendering
Doubts on the usage of handmade_config.h as a means to specify debug variables
win32_handmade.cpp - replacing DEBUG_EDIT() with DEBUG_VALUE() and checking if it works
Unhandled End Data Block
Debug interface is not visible in in-game mode
Check if debug components are drawn by not rendering the world
Add a clear before drawing
Confirmation that the debug interface doesn't show up in-game because of a sorting problem
handmade_render_group.cpp - Add a SortBias to PushBitmap -> Dim.Basis.SortKey
handmade_render_group.cpp - Investigate where and why is CAlign still used. [just for debug drawing]
handmade_debug.cpp - add a FLT_MAX sort bias to the PushBitmap call so that we get the debug interface closest to us (on Z)
handmade_debug.cpp - add a drop shadow to the text by duplicating the PushBitmap call, slightly displacing the position and changing the color
Getting back to what we were doing - check if if interactive selection works and confirming that End Data Block UNHANDLED is not a bug introduced by the addition of GlobalPause and GlobalUseSoftwareRendering
Checking the debug printout hierarchy
win32_handmade.cpp - Checking how "Platform" should work in DEBUG_BEGIN_DATA_BLOCK()
handmade_world_mode.cpp - Simulation_Entity | Confirm that printing block names is not yet implemented properly
handmade_debug_interface.h - Minimize complexity by removing DEBUG_IF and DEBUG_VARIABLE
Pulling out calls to DEBUG_VARIABLE and DEBUG_IF into globals ourselves
handmade_config.h - Change #defines to global_variable
handmade_render_group.cpp - Check we don't have code that writes to handmade_config.h
Checking where handmade_config.h is included [in handmade_platform.h] and moving the inclusion to handmade.h
Correcting types and initializers for globals in handmade_config.h and changing DEBUG_IF and DEBUG_VARIABLE calls in the rest of the code, removing compile errors one by one until...
...reaching Global_Renderer_ShowLightingSamples, which is moved directly to handmade_render.cpp
win32_handmade.cpp - Moving (and afterwards eliminating) Global_Renderer_UseSoftware from handmade_config.h and creating an enum with the rendering type, which allows to manage the Win32DisplayBufferInWindow cases better.
win32_handmade.cpp - The reason for ordering the enum components is for having the 0 value being the default
Plans for next day: hooking up debug printout for editing and maybe cleanup
dino27_1988 Q: Casey, at what point is it _bad_ to separate everything into multiple files, and when is it _good_?
dino27_1988 Q: Okay, so basically personal preference, compile time, and external impositions. Thank you very much for your answer :)
rohit_n Q: Does "texture download" on this stream mean "glTexImage2D"?
dudeinbasement1 Q: Have you ever used #pragma section(...) and grouped memory into sections, and read the map file, or have you always used this style of meta programming?
Cubercaleb Q: Off-topic: If you wanted to extend the hot-code reloading to work with structure changes wouldn't you have to store meta data about each struct along with information about every allocation, so that you could walk the data, adjust the data, move things around and fix pointers?
guitarm87 Q: Do you specifically have to say inline for functions to be inlined or does the compiler do that automagically if it finds one/several to fit?
Cubercaleb Q: Would you try to fix the memory in-place or would you copy it to a new memory arena?
dudeinbasement1 Q: Programming style - why do you have the function return on the preceeding line? Is it just so that the function name is in the first column?
StrangeZak Q: Yeah I don't know what the deal was, when I asked about inlining last night it blew up everywhere.
Garryjohanson Q: I was messing around with loop unrolling by hand and got massive speedups, any idea why would that be?
Wind things down