* use iso_volatile_load for just a load of u64/u32 from memory on msvc
* use intrin.h _interlocked* intrinsics instead of defines from windows.h
* use better suited fetch_xyz instead of xyz_fetch ones on gcc/clang
minidump did not have proper exception record passed in, so it did not
contain actual issue of the unhandled exception. Also stack walking
before was mutating registers in exception CONTEXT, this means that
minidump did not have proper call stack anymore. Now code make a local
copy of CONTEXT for stack walking.
This improves callstack in win32 unhandled exception handler when
indirect call to NULL happens. Before no call stack was printed at
all, so it was hard to know what happened. Now call stack explicitly
will print out [NULL] stack entry + rest of call stack entries. This
is done by manually looking up return address from call stack when
possible.
Also fixes wine compatibility for os_commit function. Wine does not
support RIO buffer functions.
Otherwise it was trying lookup .pdb files only in the current folder,
as that is how .exe's are built (/pdbaltpath). This change now makes
exception handler to load .pdb from the same folder as where .exe is.
D3D11 is quite strict about how resources are supposed to be used - read/write & CPU access.
This changes Tex2DKind and BufferKind into one uniform ResourceKind (because it's the same thing really).
And it is more strict about usage:
1) Static is not allowed to update, resource is immutable, data provided at creation
2) Dynamic allows CPU to update GPU resource occasionally via UpdateSubresource
3) Stream allows CPU to update GPU resource often via Map/Unmap (currently unused)
cl.exe for some reason spends unreasonable amount of time optimizing
df_window_update_and_render function, we can use pragma to skip
optimization for this function
1) automatically tries WARP driver if HW creation fails
2) HRESULT checks for swap chain creation or Present call (can fail if GPU driver crashes)
3) checks HRESULT of D3DCompile functions instead of using shader pointer as error condition
4) releases shader blob memory when not needed anymore