Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Fixes #1

Merged
merged 46 commits into from
Apr 2, 2020
Merged

Fixes #1

merged 46 commits into from
Apr 2, 2020

Conversation

didito
Copy link
Contributor

@didito didito commented Apr 2, 2020

No description provided.

…my Quadro M1000M (driver 442.74). CreateDevice could be improved by trying highest level first and falling back to lower levels
base and derived classes allocate resources, so at least deleted copy constructor, copy assignment operator, move constructor and move assignment operator

if Compute or Render were deleted by base pointer we would already  have a memory leak (see warning "delete called on non-final class instance that has virtual functions but non-virtual destructor")
- increased warning level in debug build configuration. had to disable some warnings because of dreaded D3D12X library
- disabled FP exceptions, enabled fast math (not important in this demo)
- set standard to C++14 (basically C++11 with fixes) -> best for compatibility
- disabled RTTI (not used)
- enabled faster multiprocessor compilation
-do certain things really only if Intel device
-prevent copy,move,assignment
-remove unnecessary code
-const fixes
-added more checks
-unnecessary delete
-using correct interface versions (Win10 DX12 base line)
-don't use unnecessary temporary variables
-check return values
-const fixes
this part of the start up was excruciating slow, especially in debug (10s in total)
so I optimized some of the CPU code using this better rand() alternative https://software.intel.com/en-us/articles/fast-random-number-generator-on-the-intel-pentiumr-4-processor

results on my machine (i7-6820HQ 4C8T @ 2.7GHz) with Visual Studio 2019 (16.4.5):

* Debug (via Debugger)

USE_ORIG               avg ~5s (x2)
USE_SCALAR_OPTIMIZED   avg ~1.2s (x2)
USE_SIMD_OPTIMIZED     avg ~1.2s (x2)

* Release (via Debugger, NO_DEBUG_HEAP)

USE_ORIG               avg ~1.9s (x2)
USE_SCALAR_OPTIMIZED   avg ~0.05s (x2)
USE_SIMD_OPTIMIZED     avg ~0.05s (x2)
MSDN warning:

"Do not mix the use of DXGI 1.0 (IDXGIFactory) and DXGI 1.1 (IDXGIFactory1) in an application. Use IDXGIFactory or IDXGIFactory1, but not both in an application."

https://docs.microsoft.com/en-us/windows/win32/api/dxgi/nf-dxgi-createdxgifactory
@allenhux allenhux merged commit f22a4c7 into GameTechDev:master Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants