Inputlayout problem (dx11) after visual studio 11 preview installation

Started by
15 comments, last by Jason Z 12 years, 6 months ago

Hi, I actually have the exact same error (same configuration, VS11 preview on Win7 x64). However, it seems that if you don't enable the debug layer, the problem goes away (InputLayoutCreation returns S_OK, and everything is fine: in PIX, the InputLayout is what is expected). What is even stranger, is that shader reflection still works fine, and loading offline compiled shaders seem to exhibit the same problem, so this seems to point to a corruption at the debug layer level (however, I don't have the skills in assembly to understand what's happening).

That sounds pretty strange... The only way that I know of to give the SDK headers precedence is to move their inclusion to the first place in the list of directories. That means to put it before any other standardized inclusions (in my projects it is listed as so: "$(DXSDK_DIR)Include;$(IncludePath)") I am discussing the topic with some MS guys, so I'll let you know if there is anything else to try out...

[quote name='Razispio']
By the way, Jason, I am using your library (Hieroglyph) and it's really great. I just have some minor gripes in some places (why using a custom TArray or a custom math library?), but in general it just works fine, so thanks!
[/quote]
That's great - I appreciate your feedback. I must admit that if I started over I probably wouldn't roll my own stuff from scratch, but I started writing Hieroglyph almost 10 years ago when I was just starting out... it was a bit of a learning exercise, and I just never saw a compelling reason to remove it. Who knows though - I could eventually migrate to another standardized system down the road...

I would be really interested to see some screenshots of something you build with it - it might even be cool to add a user page on the codeplex site... Thanks again!


EDIT: one other thing I just thought of - you are still trying to use a feature level 11 device right? Specifically, you aren't passing the 11.1 feature level to the device creation method? I just wanted to double check...
Advertisement
Can one or both of you check if your output application is trying to load the D3D11_1sdklayers.dll? If so, this is only compatible with Win8 and could be a source of the issue...

If you are familiar with how to use it, can you use dumpbin.exe on the build of your application with the debug layer enabled and generate a list of the dll's that it is using? This might also help to solve the problem.
No, I'm pretty sure that I am still using the dxsdk headers, since if you build with the vc10 toolchain, you don't even get access to the 8.0 platform sdk headers (no d3d11_1.h header, nothing new). I'll have to investigate that further... Microsoft should just release a real dxsdk (or a dxsdk preview). I just checked my System directory, and it seems that i have a d3d11_1sdklayers.dll file, so the d3d11sdklayers.dll may have been changed (or at least, the visual studio install did modify some system dlls). Do you know where I could get hashsums for these dlls? Maybe I could try and compare to see if I still have the same dll versions. (I've just checked the file version, it seems that my d3d11sdklayers.dll and d3d11_1sdklayers.dll have the same file and product version, so it's not too far I guess).

I understand why you have rolled some of your own stuff, we all do while building things (at the beginning, I thought it was for the book). Anyway, I already changed it so it's no longer an issue (only a little bit of find&replace, was quite easy). Thanks for your help.
In the output window it says 'ValkyrieSimpleTestApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d11sdklayers.dll'. So I assume it loads the correct one. I have never used dumpbin.exe before, but I think I managed to get it correct. I think that it's odd that it doesn't contain anything about d3d11sdklayers.dll, but that can however be because i used the wrong command (/imports).




Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.


Dump of file ValkyrieSimpleTestApp.exe

File Type: EXECUTABLE IMAGE

Section contains the following imports:

KERNEL32.dll
513528 Import Address Table
513128 Import Name Table
0 time date stamp
0 Index of first forwarder reference

C7 DebugBreak
54D lstrlenA
3B1 RaiseException
367 MultiByteToWideChar
215 GetModuleHandleA
202 GetLastError
162 FreeLibrary
218 GetModuleHandleW
4F1 VirtualQuery
214 GetModuleFileNameW
38A OutputDebugStringW
2CB HeapAlloc
2CF HeapFree
279 GetSystemTimeAsFileTime
1C1 GetCurrentProcessId
1C5 GetCurrentThreadId
293 GetTickCount
3A7 QueryPerformanceCounter
CA DecodePointer
4A5 SetUnhandledExceptionFilter
4D3 UnhandledExceptionFilter
1C0 GetCurrentProcess
4C0 TerminateProcess
33F LoadLibraryW
24A GetProcessHeap
389 OutputDebugStringA
300 IsDebuggerPresent
511 WideCharToMultiByte
2D3 HeapSetInformation
2E9 InterlockedCompareExchange
4B2 Sleep
2EC InterlockedExchange
EA EncodePointer
245 GetProcAddress

USER32.dll
513790 Import Address Table
513390 Import Name Table
0 time date stamp
0 Index of first forwarder reference

A6 DestroyWindow
305 UnregisterClassA
1EC LoadIconA
1E8 LoadCursorA
24C RegisterClassExA
17E GetSystemMetrics
23 ChangeDisplaySettingsA
2 AdjustWindowRect
6D CreateWindowExA
2DF ShowWindow
293 SetForegroundWindow
292 SetFocus
311 UpdateWindow
25A RegisterRawInputDevices
237 PostQuitMessage
E BeginPaint
DC EndPaint
20E MessageBoxA
AE DispatchMessageA
2FC TranslateMessage
232 PeekMessageA
16E GetRawInputData
19C GetWindowRect
9B DefWindowProcA
12D GetForegroundWindow

GDI32.dll
5134F8 Import Address Table
5130F8 Import Name Table
0 time date stamp
0 Index of first forwarder reference

20D GetStockObject

MSVCR100D.dll
513650 Import Address Table
513250 Import Name Table
0 time date stamp
0 Index of first forwarder reference

2EE _invalid_parameter
126 _CrtDbgReportW
FA ?raw_name@type_info@@QBEPBDXZ
5FE ldiv
614 memset
121 _CRT_RTC_INITW
E5 ?_name_internal_method@type_info@@QBEPBDPAU__type_info_node@@@Z
175 __clean_type_info_names_internal
21B _configthreadlocale
1C7 __setusermatherr
21A _commode
279 _fmode
1C4 __set_app_type
1F2 _amsg_exit
185 __getmainargs
25D _exit
14F _XcptFilter
209 _cexit
1E4 _aligned_malloc
186 __initenv
137 _CrtSetCheckCount
2E9 _initterm
2EA _initterm_e
104 ?terminate@@YAXXZ
EF ?_type_info_dtor_internal_method@type_info@@QAEXXZ
22D _crt_debugger_hook
21E _controlfp_s
2EF _invoke_watson
4C8 _unlock
17D __dllonexit
35A _lock
402 _onexit
254 _except_handler4_common
55F _wmakepath_s
675 wcscpy_s
581 _wsplitpath_s
78 ??_U@YAPAXI@Z
7A ??_V@YAXPAX@Z
5D ??1exception@std@@UAE@XZ
10F ?what@exception@std@@UBEPBDXZ
22 ??0exception@std@@QAE@ABQBD@Z
24 ??0exception@std@@QAE@ABV01@@Z
141 _CxxThrowException
612 memmove
641 strlen
5B4 exit
610 memcpy
63 ??2@YAPAXI@Z
65 ??3@YAXPAX@Z
411 _purecall
15C __CxxFrameHandler3
656 tan
5A3 atan
1E2 _aligned_free
65C tolower
65E towlower
4EC _vsnprintf
630 sprintf

MSVCP100D.dll
5135F4 Import Address Table
5131F4 Import Name Table
0 time date stamp
0 Index of first forwarder reference

285 ?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z
60 ??0_Lockit@std@@QAE@H@Z
9E ??1_Lockit@std@@QAE@XZ
1A8 ?_Debug_message@std@@YAXPB_W0I@Z
297 ?_Xlength_error@std@@YAXPBD@Z
299 ?_Xout_of_range@std@@YAXPBD@Z
25D ?_Orphan_all@_Container_base12@std@@QAEXXZ
5A ??0_Container_base12@std@@QAE@XZ
9A ??1_Container_base12@std@@QAE@XZ
1E7 ?_Getpfirst@_Container_base12@std@@QBEPAPAU_Iterator_base12@2@XZ

dxgi.dll
513898 Import Address Table
513498 Import Name Table
0 time date stamp
0 Index of first forwarder reference

0 CreateDXGIFactory

d3d11.dll
513834 Import Address Table
513434 Import Name Table
0 time date stamp
0 Index of first forwarder reference

4 D3D11CreateDevice

D3DCOMPILER_43.dll
5134C8 Import Address Table
5130C8 Import Name Table
0 time date stamp
0 Index of first forwarder reference

D D3DReflect

d3dx11d_43.dll
513864 Import Address Table
513464 Import Name Table
0 time date stamp
0 Index of first forwarder reference

16 D3DX11CreateTextureFromFileA
1 D3DX11CompileFromFileA

Summary

1000 .data
2000 .idata
3D000 .rdata
A000 .reloc
1000 .rsrc
90000 .text
44000 .textbss

In the output window it says 'ValkyrieSimpleTestApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d11sdklayers.dll'. So I assume it loads the correct one.


I have the same, but it is definitely the incorrect dll. On my machine with VS11 installed, the dll has a size of 576kb and a file version of 9.30.930.8102 while on another machine (with only the DXSDK and VS10), the file has a size of 484KB and a version of 9.27.952.3001.

Edit: That's it actually, just copied the old dll into the folder of my application, and it runs without error again! I would be curious which version of d3d11 the newer version was built against.
Thanks, that fixed the issue. I copied the [color="#1C2837"]d3d11sdklayers.dll from the dxsdk runtime folder to the applicaiton folder. Seems that vs11 updated that for some random reason. (I had to rename it so use lowercase letters only though)
It appears that all of the following dll's are updated with the new VS11 developer preview:

d3d11ref.dll
d3d10ref.dll
dxcpl.exe
VSD3DRefDebug.dll
d3d11_1sdklayers.dll
d3d11sdklayers.dll
d3d10sdklayers.dll
dxgidebug.dll
d3dref9.dll
d3d9d.dll
d2d1debug.dll

Since you already have been able to switch back to the standard functionality by replacing only one dll, then it shouldn't be a big issue... Still, if strange behavior persists, try replacing all of these with their SDK equivalents and see if it resolves the issue.

This topic is closed to new replies.

Advertisement