Skip to content
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

Improve scaling quality of Windows direct3d renderer #1422

Open
rustyx opened this issue May 23, 2020 · 6 comments
Open

Improve scaling quality of Windows direct3d renderer #1422

rustyx opened this issue May 23, 2020 · 6 comments

Comments

@rustyx
Copy link

rustyx commented May 23, 2020

On Windows, the default renderer is direct3d which is nice because it's much faster than opengl.
But unfortunately this renderer doesn't seem to support trilinear filtering as is evident from the log:

[server] INFO: Device: samsung SM-N910C (Android 6.0.1)
INFO: Renderer: direct3d
WARN: Trilinear filtering disabled (not an OpenGL renderer)
INFO: Initial texture: 1440x2560

Is there any chance of improving the jagged scaling with Direct3D? Tried forcing hardware-accelerated antialiasing via NVIDIA control panel to no avail.

Environment

  • OS: Windows 10 x64
  • scrcpy version: scrcpy 1.13
    dependencies:
  • SDL 2.0.12
  • libavcodec 58.54.100
  • libavformat 58.29.100 - libavutil 56.31.100
  • installation method: Windows release

scrpy-d3d-scaling

@rom1v
Copy link
Collaborator

rom1v commented May 23, 2020

Ref: #1394 (comment)

@cjxgm
Copy link

cjxgm commented May 23, 2020

@rustyx Are you sure about direct3d being much faster than opengl, even on NVIDIA hardware? I know that other vendors do not have good enough opengl drivers for Windows (thus direct3d support for trilinear filtering is still needed), but NVIDIA's opengl driver should be as fast as direct3d.

@rustyx
Copy link
Author

rustyx commented May 23, 2020

@cjxgm yes, direct3d definitely feels more responsive and uses much less CPU, too:

  • --max-fps=20 --render-driver=opengl : 80% of 1 CPU used
  • --max-fps=20 --render-driver=direct3d: 1% of 1 CPU used

@cjxgm
Copy link

cjxgm commented May 24, 2020

Wow that's unexpected and strange. Looks like bug to me (VSync issue?). Should probably open a new issue for that.

@JianYuhaha
Copy link

Do you fix the problem? I get it too.

@rom1v
Copy link
Collaborator

rom1v commented Nov 17, 2021

I submitted an issue on SDL few months ago: libsdl-org/SDL#4156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants