-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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] Hack to fix refresh rate issue in full screen exclusive mode. #10083
Conversation
Is there still any advantage in running Kodi windowless an Windows? |
on win10 there are no advantages I think, but on pre win10 systems FSE mode requires less resources. In my oppinion windowed mode is still a bit stuttery when compared to full screen. also FSE exclusive supports 10bit output on all systems (we don't use 10b output, but this may change in future) |
@FernetMenta lots of people use Kodi in windowed mode, especially when looking at things on the computer while doing other things. |
// 4. and then reverse vector to start iterate with the best candidate for d3d11 driver | ||
std::reverse(drivers.begin(), drivers.end()); | ||
|
||
for (auto it = drivers.begin(); it != drivers.end(); ++it) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
(edited)
|
full screen windowed mode is my preference as it avoid the ugly switching that you get with full screen exclusive. Maybe not the one a hardcore movie-buff would choose but it's perfect for say having kodi up on a second screen(which my daughter use extensively) and ofc during debugging as it's so much faster when hitting a breakpoint. Can't say I understand it all but codewise it looks fine so no objections to merging |
Sure, I use it daily for development 😄 or listening to music. |
I was referring to true / faked fullscreen. On Linux and OSX for example there is only faked fullstreen, means Kodi is running in a window without any title bar or frame visible. |
Based on the level black arts involved in this hack I'd vote in favor of dropping exclusive fullscreen. |
dropping FSE mode will cause a shit storm on windows forum |
Hacky or not, this is fairly self contained. I support any decision the Windows devs take. |
real fullscreen mode(Use fullscreen window = false) is almost useless on win10 and multi screen setup (huge flickering/crashing/no picture when system wakes up from suspend/hibernate sometimes even when you bring another app to top) and 50% more CPU usages 4-5% at idle compared to 1-2% when Use fullscreen window is is enabled Edit: yes you are right its just useless for me, mainly ;) ... maybe it has something to do with intel CPUs and their graphic drivers couse i see same issues at multiple PCs |
@Sorien why I have results opposite than yours, on win10? If you have an issue with fse mode this does not mean that fse mode is useless. |
@@ -57,8 +57,7 @@ | |||
void APIENTRY HookCreateResource(D3D10DDI_HDEVICE hDevice, const D3D10DDIARG_CREATERESOURCE* pResource, D3D10DDI_HRESOURCE hResource, D3D10DDI_HRTRESOURCE hRtResource); | |||
HRESULT APIENTRY HookCreateDevice(D3D10DDI_HADAPTER hAdapter, D3D10DDIARG_CREATEDEVICE* pCreateData); | |||
HRESULT APIENTRY HookOpenAdapter10_2(D3D10DDIARG_OPENADAPTER *pOpenData); | |||
typedef HRESULT(APIENTRY *pfnOpenAdapter10_2)(_Inout_ D3D10DDIARG_OPENADAPTER *); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
hm.. appveyor is happy, jenkins build this please |
does jenkins have WDK8.1 installed? |
I don't think so. It fails because has not found header file. |
@afedchin @FernetMenta okay, let's not drop it then :-) |
@afedchin - I would suggest the addition of another patch: Voyager1@5a5d35d - the reason being that Numerator is UINT and you assign it a float value. This is each time used for FindClosestMatchingMode, so if refreshrate to be matched is 23.976 or 59.940 the decimals are dropped. Not a big deal, because one can assume that the closest matching mode will return the one you're looking for anyway. Maybe this is another "cosmetic" fix. |
jenkins build this please |
nice! |
@@ -1915,6 +1914,13 @@ void CRenderSystemDX::FixRefreshRateIfNecessary(const D3D10DDIARG_CREATERESOURCE | |||
} | |||
} | |||
|
|||
void CRenderSystemDX::GetRefreshRatio(uint32_t refresh, uint32_t * num, uint32_t * den) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
8e5ab83
to
b1fb716
Compare
jenkins build this please |
…ix refresh rate issue in FSE mode.
b1fb716
to
3af7082
Compare
if no objections I will merge this tonight |
There is an ugly "bug" in DX11 which causes DX system is unable switch to desired display mode in full screen exclusive mode
23.976 <-> 24.00
29.970 <-> 30.00
47.952 <-> 48.00
59.940 <-> 60.00
On some system DX is unable to switch to 24.00 on others to 23.976 mode. Some systems has no the issue. This trick fixes the issue.
This also requires:
ping @Voyager1 @Paxxi @FernetMenta