STEAM GROUP
Special K - "Kaldaien's Mod" Special☆K
STEAM GROUP
Special K - "Kaldaien's Mod" Special☆K
251
IN-GAME
2,455
ONLINE
Founded
May 23, 2016
Language
English
All Discussions > Development > Topic Details
 This topic has been pinned, so it's probably important
Kaldaien Apr 12, 2019 @ 6:20pm
Special K - v 0.10.3 - [HDR stuff probably]
What's New? (Current Test Build :: 0.10.3)


I've opted to add a new form of frametime analysis to Special K's framepacing graph.
    The old data (which still remains), was based on higher-level statistics and standard deviation; an uncommon representation of data not easily understood or comparable to expected benchmark performance and limited to a very small sample window of 120 frames. In short, it was useful to me for performance optimization and analysis but those numbers had no meaning to anyone else!
      Fun bit of trivia, however, the color of the framepacing graph is based entirely on the standard deviation.

What are Percentiles and Why Should I care?

To put it simply, when we speak of frametime percentiles, we mean either the bottom N-% or top N-% performing frames recorded. Since I don't care about high framerates and only care about stuttering, Special K's analysis focuses on the low percentiles.

    When numbers like "10% Low FPS" are being thrown about, it's another way of saying 90% of all frames drawn were faster than xyz FPS.

Common numbers used for frametime analysis are 10% / 1% and 1% / 0.1%.

It is my strong belief that 1% / 0.1% is not appropriate for measuring and tweaking game performance. 1% / .1% should be reserved only for people publishing benchmark scores because that's really all they're good for :P

    I would suggest configuring the framepacing widget manually and selecting something more reasonable such as 5% / 0.5% or even 10% / 1%, but it is pre-configured for 1% and 0.1% since this is the most common percentile ranking published in online reviews of games.

How large is the dataset used?
There are two different datasets for percentile analysis.

There's one that keeps track of the last 1,000 frames and then there's an even longer-term one that gets a summary of all 1,000 frames every time the short-term history fills up with data. Effectively this gives a 1,000,000 frame history and that ought to be enough for anybody :P

    If you're trying to find optimal in-game settings, I suggest focusing on the smaller 1,000 frame history. That's at least 8 seconds worth of data even at 144 Hz.

Conclusion
Knowing what this new feature is designed to measure (how poorly the worst-performing part of the game is performing), you should be able to use it to find the perfect set of graphics settings that keeps the two percentile charts in the green. Failing the ability to find any settings in-game that stop stuttering, you can always fallback to Special K's framerate limiter.
Last edited by Kaldaien; Jun 6, 2020 @ 4:40am
Originally posted by Aemony:
The new discussion forum, http://special-k.info/, is now up and running with working mail notifications as well. Feel free to sign up for an account there if anyone want -- it's the only place to reach Kaldaien right now. We still haven't landed on what categories to set up and such, but that will probably be figured out soon enough.
< >
Showing 6,466-6,480 of 8,121 comments
Draken/Eitan May 18, 2020 @ 9:03am 
My 4k 350nits HDR10 monitor arrived. Sure its not a 1000nits display but there is still a vast improvement in HDR content vs SDR. Shadow of the Tomb Raider looks great, and is much improved (native HDR support +/-)

What is a good game to test out the HDR Retrofit and how can I ensure its active?

For example, Rise of the Tomb Raider does not automatically activate HDR when played under DX11.

Aemony May 18, 2020 @ 9:52am 
Originally posted by Draken/Eitan:
My 4k 350nits HDR10 monitor arrived. Sure its not a 1000nits display but there is still a vast improvement in HDR content vs SDR. Shadow of the Tomb Raider looks great, and is much improved (native HDR support +/-)

What is a good game to test out the HDR Retrofit and how can I ensure its active?

For example, Rise of the Tomb Raider does not automatically activate HDR when played under DX11.

You can use the HDR visualization option in the HDR widget to tell what's being rendered in a higher range, while the typical Fullscreen/Window resolution row will tell you whether its running in HDR or not (it will have a "(HDR)" label on it).

As for what game... eh... any D3D11 I would say?
Draken/Eitan May 18, 2020 @ 9:56am 
Originally posted by Aemony:
Originally posted by Draken/Eitan:
My 4k 350nits HDR10 monitor arrived. Sure its not a 1000nits display but there is still a vast improvement in HDR content vs SDR. Shadow of the Tomb Raider looks great, and is much improved (native HDR support +/-)

What is a good game to test out the HDR Retrofit and how can I ensure its active?

For example, Rise of the Tomb Raider does not automatically activate HDR when played under DX11.

You can use the HDR visualization option in the HDR widget to tell what's being rendered in a higher range, while the typical Fullscreen/Window resolution row will tell you whether its running in HDR or not (it will have a "(HDR)" label on it).

As for what game... eh... any D3D11 I would say?
Ah! I was looking for HDR on the menu bar as with FAR's HDR. (Which doesn't work for me).

Thanks!

Edit: okay Tomb Raider 2013 is beautiful in HDR, even when it's only HDR10 and not from a brighter monitor.

Thanks!
Last edited by Draken/Eitan; May 18, 2020 @ 10:09am
Aemony May 18, 2020 @ 10:32am 
@Kal, how much would you need to be able to purchase an EV code signing certificate and create a scaled down open-source version of the WinRing0 driver without the useless shenanigans you don't need?

Also, the current WinRing0 driver on my end is configured to start automatically with Windows, and not manually. Is this by design? Otherwise I'd probably recommend starting the driver "manually" from user-space, or set up an intermediate background service (startup: manual) that all users have permission to start as other products does to circumvent invoking UAC on startup.

Edit: Also, on the subject of the EV code signing cert, I believe it suffices to have a single year one, right? It's not as if you need that level post-kernel driver compile.
Last edited by Aemony; May 18, 2020 @ 10:34am
TrowGundam May 19, 2020 @ 10:06am 
So, I just ran Windows Updates, and I'm having a weird issue that I can't seem to figure out. It isn't anything breaking, mostly just annoying. Whenever any game loses focus it acts like it is in Exclusive Fullscreen mode and the screen goes black before reappearing despite the game being in Borderless mode. This is really annoying in my MMOs, where I'm always alt-tabbing to a browser to either load a video or look something up. It is especially annoying because I have a program called Barrier that lets me use my mouse and keyboard with another PC on my third display. So, if I just move my cursor a little it goes to the other machine and the game loses focus. None of this happened before I ran updates. Any ideas? Because this is really getting annoying.
Kaldaien May 19, 2020 @ 10:55am 
Such a kernel code signing certificate runs ~$600 USD a year when I last checked. The cost is actually the least inconvenient thing about it, there's also a criminal background check, and several forms of identification and getting a notary and witnesses. I was reluctant to waste all my time going through all of that since I do have an FBI record, but have been told it does not matter.

As for why I have the driver setup to start with Windows. Starting / Stopping a driver service requires admin. privileges, and it would be a security vulnerability to elevate every game you launch to admin to start/stop the driver.

Things are much more secure when the driver starts with Windows and games don't have to be admin to use it. The driver cannot be tampered with while it is running, so there is zero risk of someone (i.e. idiot affiliated with r/CrackWatch) dropping a fake driver in its place and restarting a game and getting a user to start it. User would have to uninstall the driver first, and they don't have the privileges to do that without requesting it from SK's control panel.

Start/Stop was removed from the driver, there is only Install/Uninstall. I really am _that_ paranoid that some pirate shithead is going to distribute a future Special K mod w/ a modified driver and try to get their driver loaded everytime a user runs a legit game. Those people are the worst.
Last edited by Kaldaien; May 19, 2020 @ 11:20am
JBeckman May 19, 2020 @ 11:29am 
https://www.phoronix.com/scan.php?page=news_item&px=Microsoft-DX12-WSL2

Linux gets D3D12 support.

As part of bringing GPU acceleration to WSL2 that was announced at today's virtual Build conference, Microsoft just published a blog post with more details including their port of Direct3D 12 for Linux.

Part of this DirectX work for Linux involves a new "DXGKRNL" Linux kernel driver for exposing the DirectX graphics adapters to the Linux user-space through the WSL2 setup. The DXGKRNL driver interfaces with the Windows host via a VM bus connection. Multiple GPUs will be supported.

The more interesting work is in user-space with Microsoft to provide a "real and full D3D12 API" for Linux. "This is the real and full D3D12 API, no imitations, pretender or reimplementation here… this is the real deal. libd3d12.so is compiled from the same source code as d3d12.dll on Windows but for a Linux target."

The current support allows only offscreen rendering until the WSL2 GUI support is in place. This support will also require Windows WDDMv2.9 graphics drivers.

Before getting too excited, the Direct3D 12 library for Linux will be closed-source. The DirectX core and D3D12 libraries will be closed-source and shipped as part of Windows. With it targeting the DXGKRNL kernel interfaces, these libraries will likely be of little value to Wine / Proton and the like unless there was a new layer implemented so the DXGKRNL interfaces could be re-implemented for bare metal Linux systems.

Via this Direct3D 12 implementation is also how WSL2 will support OpenGL, OpenCL, and Vulkan. You may recall recently Microsoft and Collabora announced their work to map OpenGL and OpenCL over DirectX 12.

Microsoft is also working with NVIDIA to support CUDA under WSL2.

More details via this interesting blog post.

Additionally, Microsoft also published now their virtual GPU driver for the Linux kernel. The kernel driver portion is open-source and ultimately they will be looking to mainline it. This kernel driver is just relevant in the context of a Windows host / WSL2 setup and contingent upon Microsoft Hyper-V.


EDIT:

WDDM 2.9 ??

Isn't 2004 / 20H1 / 19041.x (208 currently.) at 2.7?

Now that's a jump. :D
Last edited by JBeckman; May 19, 2020 @ 11:30am
TrowGundam May 19, 2020 @ 11:43am 
Well, that is really cool. Isn't there also that official D3D11 to D3D12 translation layer? I wonder how well those will work together. If so, maybe Proton will be a thing of the past, lol. I highly doubt that, but if nothing else this means gaming on LInux is closer and closer to actually being viable. Hell, all my main games work well enough under Linux (mainly WoW and FFXIV atm), that I'd probably just boot Linux most days if it wasn't for the fact that DPI scaling in Linux, if you can believe, is even worse than Windows' implementation. It is really sad, and I don't see that changing any time soon. The problem is everything implements it differently, and since everything is so open and fragmented, you have to configure like 5 different systems and none of it ever matches with everything else. Add that to the fact that you actually get tearing on Desktop with high end hardware and the only way to fix it hurts performance, I'm still stuck with Windows.
JBeckman May 19, 2020 @ 12:45pm 
Will be interesting to see how it works out and yeah Proton and other efforts to simplify or standardize things for Linux gaming and cross compatibility probably helps but judging by some of the ways DXVK handles or implements features the various methods to handle stuff like DPI Awareness can also be a hindrance at times, think one of the later additions actually related to some other form of syncing but I don't know if it reduces screen tearing or if it was performance related in intent.


Also from early info the re-releases of Mafia 2 and Mafia 3 aren't too bad but they do have their issues (Several of them and both PC and console editions.) and it sounds like at least one initial later fixed problem with Mafia 3 was brought back where it upscales from 1920x1080 to any higher resolution instead of rendering to it natively.

Both are at least free for existing owners although whereas Mafia 2 definitive is a separate application Mafia 3 is just a patch doing...something.
(There's a few asset updates and changes for Mafia 2 also going from ~8 GB to nearly 40 GB and for Mafia 3 it kinda just adds the DLC but that update is still nearly 16 GB.)



EDIT: Mafia 1 or rather it's remake is also getting a much needed feature...collectibles.

And pre-order extras.

If you pre-order Mafia: Definitive Edition ahead of launch, you'll be entitled to The Chicago Outfit pack of stylish cosmetic items, featuring the Smith V12 limousine vehicle, Gold Semi-Automatic Pistol weapon skin, and The Don outfit.

Heh.
Last edited by JBeckman; May 19, 2020 @ 2:23pm
Aemony May 19, 2020 @ 3:21pm 
Originally posted by Kaldaien:
As for why I have the driver setup to start with Windows. Starting / Stopping a driver service requires admin. privileges, and it would be a security vulnerability to elevate every game you launch to admin to start/stop the driver.

Things are much more secure when the driver starts with Windows and games don't have to be admin to use it. The driver cannot be tampered with while it is running, so there is zero risk of someone (i.e. idiot affiliated with r/CrackWatch) dropping a fake driver in its place and restarting a game and getting a user to start it. User would have to uninstall the driver first, and they don't have the privileges to do that without requesting it from SK's control panel.

Start/Stop was removed from the driver, there is only Install/Uninstall. I really am _that_ paranoid that some pirate shithead is going to distribute a future Special K mod w/ a modified driver and try to get their driver loaded everytime a user runs a legit game. Those people are the worst.

If I were to go for a secure yet accessible approach I'd gone for something like this:

1. Rip everything related to the installation/uninstallation of the driver away from the Special K DLL files.

2. Manage the installation/uninstallation of the driver through SKIF, which should properly invoke UAC as necessary.

3. SKIF would install a background service running as the local system, but configured to start manually. Said service would be configured to allow all users to start/stop it.

4. The background service would, when started, perform validation of the provided kernel driver (could reside in the same folder as the background service) and if it was found to be OK, install and run the driver.

5. The Special K DLL files would, upon the launch of a game, check for the present of said background service and driver. If the background service was found but not the driver, it would run the background service to install the driver. If the driver was found it would assume it to be valid and use it as necessary.

6. Upon closing the game the Special K DLL files would signal the background service to stop and uninstall the kernel driver again.


Like, this serves multiple purposes:
* Rips out everything about it from the SK DLL files.
* Stops using whatever COM security hole you're using to bypass UAC.
* Handles it beautifully through UAC and SKIF.
* Proper setup that allows the Special K DLL files to essentially dynamically install/uninstall the driver as needed without invoking UAC or exploiting COM.
* No running components at all when Special K isn't being used in a game.
Aemony May 19, 2020 @ 3:26pm 
Like, I honestly don't think you're "paranoid" enough given your current implementation. Almost no other third-party application that uses the WinRing0 driver leaves it installed and running at all times _because_ of the potential security concerns it introduces.

That fact is the tiny thing that makes its use "excusable" in those applications.

That you choses the approach you've decided upon looks to me like you're focusing on absolutely the wrong things -- and for no real gain either. It is even more surprising given the recent response to kernel drivers.

I mean, I don't even trust the WinRing0 driver as far as I can throw it, which is why I leave it uninstalled on my system basically whenever I can. To hear that you chose arguably _the least secure_ approach in that regard surprised me.
Last edited by Aemony; May 19, 2020 @ 3:27pm
Kaldaien May 19, 2020 @ 3:55pm 
Running nothing as admin is always the most secure approach ;)

It's pretty silly to not trust the WinRing0 driver, it's open source. It should be among the most trustworthy because you can see everything that it does and because my service is stripped down this way.

Implemented
InitializeOls
DeinitializeOls

ReadPciConfigDword // 1 instruction WritePciConfigDword // 1 instruction RdmsrTx // 1 instruction + Thread Affinity Mask Rdmsr // 1 instruction Rdpmc // 1 instruction


Unimplemented
IsCpuid IsMsr IsTsc Hlt Rdpmc Cpuid Rdtsc Wrmsr HltTx RdpmcTx RdtscTx HltPx WrmsrTx WrmsrPx RdpmcPx CpuidPx RdtscPx ReadIoPortByte ReadIoPortWord ReadIoPortDword WriteIoPortByte WriteIoPortWord WriteIoPortDword ReadIoPortByteEx ReadIoPortWordEx ReadIoPortDwordEx WriteIoPortByteEx WriteIoPortWordEx WriteIoPortDwordEx SetPciMaxBusIndex ReadPciConfigByte ReadPciConfigWord WritePciConfigByte WritePciConfigWord FindPciDeviceById FindPciDeviceByClass ReadPciConfigByteEx ReadPciConfigWordEx ReadPciConfigDwordEx WritePciConfigByteEx WritePciConfigWordEx WritePciConfigDwordEx

Sure the driver contains those other things, but user-mode code has to go with the user-mode service's DLL to use any of them and I stripped that thing down to just the 7 functions above. If someone wanted to do something else with the driver Special K ships, they need to write their own user-mode service that implements those and install it as a separate service.

It's much safer to just leave the thing loaded and prevent someone from dropping a different driver in its place.
Last edited by Kaldaien; May 19, 2020 @ 3:57pm
Kaldaien May 19, 2020 @ 6:35pm 
Needs a bit of work, but...

https://imgur.com/a/9OxhMvq

When I get that polished, it'll help navigate save / config files in Cloud-enabled games a lot easier. Does all the hard work of substituting Game AppIDs, embedded Steam account IDs, etc. to give paths that you can actually go to.

I was absolutely horrified to see how the Steam client handles My Documents:

https://partner.steamgames.com/doc/features/cloud#3

The expansion of %USERPROFILE% to get those directories is all wrong, there's a function called SHGetKnownFolderPath that uses FOLDERID_... values. On many systems, these two things give different values and the Steam client's looking in the wrong path. I, of course, have to duplicate Steam's bug or I'm never going to find these files on a lot of systems.
Kaldaien May 19, 2020 @ 7:14pm 
lol

[appinfo.depots.branches.nvidia] buildid=1966795 description=blah pwdrequired=1 timeupdated=1509725746
Last edited by Kaldaien; May 19, 2020 @ 7:15pm
< >
Showing 6,466-6,480 of 8,121 comments
Per page: 1530 50

All Discussions > Development > Topic Details