Bug 94819 - Nearest neighbor scaling?
Summary: Nearest neighbor scaling?
Status: NEW
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nVidia (proprietary) (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Aaron Plattner
QA Contact: Aaron Plattner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-04 14:48 UTC by N. W.
Modified: 2016-05-22 16:55 UTC (History)
12 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description N. W. 2016-04-04 14:48:03 UTC
Hello,

would it be possible that you add a nearest-neighbor scaling mode to the driver, so that one could display 1920x1080 natively on a 3840x2160 monitor or 1280x720 natively on a 2560x1440 monitor and so on (one pixel becomes four pixels)?

There is some information on this topic over there:

https://forums.geforce.com/default/topic/844905/geforce-drivers/integer-scaling-mode/

Regards
Comment 1 Aaron Plattner 2016-04-05 06:23:22 UTC

*** This bug has been marked as a duplicate of bug 94818 ***
Comment 2 Aaron Plattner 2016-04-05 06:26:20 UTC
Whoops, didn't notice the different module for this bug vs. 94818, sorry. Reopening.
Comment 3 N. W. 2016-04-05 13:31:58 UTC
(In reply to Aaron Plattner from comment #2)
> Whoops, didn't notice the different module for this bug vs. 94818, sorry.
> Reopening.

Yeah, sorry for using the wrong one initially.

Aaron, actually I have submitted the same feature request for the Intel and AMD drivers as well yesterday. It has resulted in a patch for xrandr that allows to use nearest neighbor scaling now, see:

https://bugs.freedesktop.org/show_bug.cgi?id=94816
https://bugs.freedesktop.org/show_bug.cgi?id=94820

Anyway, as being discussed in both threads, it would be interesting to know if the dedicated hardware scaler inside the GPU could also be used for this instead of using xrandr.

Can you comment on this?

And would there be any chance you could point the NVIDIA Windows driver team to this issue as well? It would be nice if nearest neighbor scaling would be available for NVIDIA cards on Windows as well.

As already pointed out, there is a thread on the NVIDIA GeForce forums, but nobody at NVIDIA seems to have noticed it yet or doesn't seem to listen, see:

https://forums.geforce.com/default/topic/844905/geforce-drivers/integer-scaling-mode/

Would be really nice if you could do something about that.

Regards
Comment 4 Aaron Plattner 2016-04-15 05:58:27 UTC
Older GPUs certainly can't do nearest neighbor scaling in the display hardware. I'll have to look into whether it's possible with newer GPUs.
Comment 5 N. W. 2016-04-16 17:33:52 UTC
(In reply to Aaron Plattner from comment #4)
> Older GPUs certainly can't do nearest neighbor scaling in the display
> hardware. I'll have to look into whether it's possible with newer GPUs.

Well, in the following video at around 18:39 min, your workmate Tom Petersen says the following regarding NVIDIA's DSR (Dynamic Super Resolution):

> https://youtu.be/cr-GToUHino
> 
> [...] but what's different about this is, we're not using the
> hardware of the GPU do downsample. [...] we no longer use the
> hardware scaler. We're now using a filter that's designed to
> make this look beautiful. So it's a thirteen tap gaussian
> filter that runs as sort of a shader path [...]
> It's done in software [...] it's run on hardware but it's a
> filter that's running a complex gaussian filter to get
> beautiful smooth edges even as we scale from pretty much any
> resolution to any other resolution [...] In contrast to using
> the hardware filter which is a very simple hardware filter, 
> it's roughly a box filter, so that's a lower quality scaler.

So maybe the same shader method that is used for DSR could also be used to scale in software on the hardware with a nearest neighbor filter instead of a gaussian filter?

Regards
Comment 6 N. W. 2016-05-22 16:55:47 UTC
Any update on this one?


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.