Friday, August 09, 2019

Unsigned Shader Code

If you get this error:

D3D12 WARNING: ID3D12ShaderBytecode::CreatePipelineState: Shader is corrupt or in an unrecognized format, or is not signed. Ensure that DXIL.dll is used to sign the shader. This shader and PSO containing it will not be validated. [ EXECUTION WARNING #1243: NON_RETAIL_SHADER_MODEL_WONT_VALIDATE]

Head over here to Graham Wihlidal's blog to understand:

Note this is not going to help if you are trying to compile a (for example) 6.4 shader on a platform that does not yet support 6.4. This is probably a good thing.

Tuesday, June 25, 2019

Making a DX12 'Hello World' Starting Point from D3D2HelloWorld Samples

To create a very basic starting point DX12 Visual Studio based on the D3D12 Samples SDK codebase (branching from friendly developer license code as starting point):

Visual Studio 2017
Create a console application (File->New Project->Empty Project)
Pull in .cpp, .c, and .hlsl files from D3DFramebuffer (my feeling is this is the best base case due to correct render loop that does not block on previous frames Present call before starting to build command list for next frame).

Changed to an x64 build environment
On the project, walked the 'full compiler options' and the 'full linker options'

  1. Change character set to unicode from multibyte
  2. Add  'WIN32' to preprocessor definitions


  1. Add d3d12.lib, d3dcompiler.lib, and dxgi.lib to the set of files to link to
  2. Change subsystem to  'Windows' 
  3. Disabled compilation of shaders.hlsl by Visual studio

Change the lines that compile the shaders from this:
 ThrowIfFailed(D3DCompileFromFile(GetAssetFullPath(L"shaders.hlsl").c_str(), nullptr, nullptr, "VSMain", "vs_5_0", compileFlags, 0, &vertexShader, nullptr));
 ThrowIfFailed(D3DCompileFromFile(GetAssetFullPath(L"shaders.hlsl").c_str(), nullptr, nullptr, "PSMain", "ps_5_0", compileFlags, 0, &pixelShader, nullptr));
To this:
ThrowIfFailed(D3DCompileFromFile(L"shaders.hlsl", nullptr, nullptr, "VSMain", "vs_5_0", compileFlags, 0, &vertexShader, nullptr));
ThrowIfFailed(D3DCompileFromFile(L"shaders.hlsl", nullptr, nullptr, "PSMain", "ps_5_0", compileFlags, 0, &pixelShader, nullptr));

Note: I am sure GetAssetFullPath is useful, probably esp. in remote debug cases. Will circle back to this later.

imgui for DX12 hints

command line, in a visual studio window, builds the .objs but does not create a .exe. Did not resolve.

was able to pull in the project for the visual studio solution into the main solution for the imgui project. i used that to create build the project. i got a runtime error on line 384:

    // Store our identifier
//    static_assert(sizeof(ImTextureID) >= sizeof(g_hFontSrvGpuDescHandle.ptr), "Can't pack descriptor handle into TexID, 32-bit not supported yet.");

commented this out to get the basic sample running and it did not crash.

useful to at least investigate/learn more about imgui with DX12

Sunday, June 02, 2019

Sinus infection doctor recommendations

aleve/advil X
mucinex X
sudafed X X (don't take after 3pm)
clariten X X (via 24hr version)
nedi pot

Friday, April 26, 2019

Movie Maker paths for projects

Wow....they think this is secret...impossible to find via the GUI. It will be something like this:


Sunday, March 31, 2019

Building UE4 and a .NET error

Building UE4 and got an error about .NET. instead of tracking down a .NET specific issue, resolution was to update my Visual Studio and include the .NET tools. Not doing whatever the long winded stack overflow comments suggested.

Tuesday, March 12, 2019

Driver Reset in Windows

Got all choked up on your driver? try this: ctrl-shift-windows+b

ack to Marissa Du Bois for the pointer.