-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
D3D11: Finish up #9317
Comments
I think it also needs backends selection menu in MainWindowMenu.cpp. |
Thanks @xebra , adding that soon. |
@xebra if D3D11 backend work great , and you can continue to implement HW Tessellation |
hardware tess for D3D11 should be as easy as with GL. I'll leave it for @xebra :) |
Alright, that's three checkboxes :) Gripshift should work better now. |
@hrydgard Grihpshift bug DX11 are fixed. only has glitch flickering in the inferior of screen but this bug happen in DX9/OpenGL too I open new issue for that? |
Yeah, I think that deserves an issue. Please make a search first and see if there is one already, I don't remember. |
Yeah, now I'm trying :) |
All of my games crashes when I try to open them if I turn on any kind of texture scaling(xBRZ etc.). Maybe it's just not implemented yet for D3D11? |
Good catch, I haven't tried that yet. I'll fix it up. |
@tywald found the bug, committed a fix. Should be all good now. |
I implemented it on DX11 but it has some issues similar as DX9 one. |
At least you shouldn't be running up against any limits in D3D11... |
Probably fixed it without using "instanced tessellation" only with spline. Well, DX11 backend still buggy on my PC(Win7), so I can't test well. Also, FF4CC doesn't work with unstable error. FF4 is the best platform with testing about spline/bezier. |
Oh, yes, that sounds like a possible alignment issue - are you on 32-bit? On 64-bit all allocations should be aligned by default. Though the main issue on windows 7 is that for some silly reason the B4G4R4A4 texture format is not supported so we need to upconvert those textures to RGBA8888, which is a pain because the code currently assumes that the format converted to has the same amount of bits... |
@xebra I fixed the alignment crash. |
Thanks! |
Ah, this fixes for 32-bit... |
Noooo, I was misunderstanding. |
I saw the issue about Win7. It's 16-bit texture format issue, I think it also crashes with 5551 and 565 not only 4444. |
@xebra Pixel formats 5551, 565 or 4444 Only implemented in Windows 8 and higher. So these variables Microsoft never implemented it under Windows 7 system |
Yup, so we'll need to convert them all to 32-bit texture formats to work correctly on Win7. Silly of Microsoft, I guess they didn't think anyone would want such poor texture formats anymore, but we do :) And so did others because they're back in Win8. |
Yeah, it's silly decision anyway :( |
CreateTexture() must returns success or fail, if 16-bit texture is unsupported, it must return fail(reason is unknown/unsupported format), but crashes in the function so it's a BUG I mean. |
Well, not really a bug, it's defined not to work. So we'll just work around it. Well, I will. Soon :) Though you're right that it should return an error code not crash, heh. |
Hmm, maybe depth buffer or alpha blending issue... |
Yeah, looks more like broken depth buffering... |
…ted, like on Windows 7. Part of issue #9317
@xebra , Now that that's been merged, should no longer crash on 16-bit textures on D3D11. Please try it :) |
@hrydgard Nice work, thanks :) |
D3d11 still closes on boot for me on win 7 when not running with VS debugger attached, but I used CodeXL to debug and got https://github.com/hrydgard/ppsspp/blob/master/ext/native/thin3d/thin3d_d3d11.cpp#L752 with
Win 10 unaffected. |
But it does work with it attached? Bizarre that alignment would be an issue when calling the shader compiler. Same result with both 32-bit and 64-bit builds? Maybe we simply fail to load it for some reason and the error message is just some kind of side effect of that? |
Yeah with VS debugger attached it does run fine. Edit: and yes, 32/64 bit builds have same result. |
You should be able to attach MSVC to the crashed binary before pressing the close button in the dialog that comes up (in some cases the crash dialog should even display a debug button but I can't remember what makes that happen). I'm baffled though. |
Dolphin uses the old D3DX11CompileFromMemory instead, though I think nowadays that just forwards to D3DCompile. Not sure if it would be worth doing the same for backwards compatibility with something. |
We can see that ptr_D3DCompile is nullptr. That makes it impossible to build shaders so we need to bail. Probably simply need to use Dolphin's method to load the shader compiler as it's more backwards compatible. However, the thing where it only worked in the debugger on one of your PCs is still odd. |
I got the same issue. I think this issue is missing DLL. |
Hm, I wonder what you need to install to get it, like a DX redistributable or something. Or if there's another version that's available by default. |
Thanks for the hint xebra, I copied C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\d3dcompiler_47.dll into C:\Windows\System32 and 64 bit build works fine:). And indeed this file is installed with Win 10(althrough slightly different version than the VS one). Oh see this
|
d3dcompiler_47.dll found in SDK windows 8.1 so maybe fault too in Windows 8 . Windows Kits\8.1\Redist\D3D\x64 -> For Runtime x64 |
BTW, running on Win7 works fine so we don't need below code in GameSettingsScreen.cpp anymore :)
|
So the issue is that while the latest available version of DirectX for a Windows version is always installed by Windows Update, D3DCompiler.dll is not: https://msdn.microsoft.com/en-us/library/ee416644.aspx "Note The HLSL compiler (D3DCompile*.dll) and the D3DX utility library for Direct3D 11 (D3DX11*.dll) are not built into any version of the Windows operating system, but they can be deployed as part of an application's installer by using the existing DirectSetup technology; for more information about using DirectSetup, see DirectX Installation for Game Developers" Most games can precompile their shaders so you don't need to ship the compiler, but we can't. Sigh. So will need to redistribute it somehow, I wonder if it's alright to just grab the _47 DLL and ship it or if we should link to an installer. |
Apparently it is alright to redistribute it, at least according to this answer: http://stackoverflow.com/questions/25873609/directx-11-2-development-on-windows-7d |
wrong button |
The major work is done! A few bugs left to fix etc. |
Remaining features to fix and/or implement:
For Windows 7:
Please report other issues with D3D11 in this issue.
The text was updated successfully, but these errors were encountered: