Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This is a fork of [ALVR](https://github.com/polygraphene/ALVR).
- SteamVR.
- A high-end gaming PC:
- See the OS compatibility table above.
- NVIDIA GPU with NVENC support (GTX 1000 series or newer), or an AMD GPU with AMF VCE support, with the latest drivers.
- NVIDIA GPU with NVENC support (GTX 1000 series or newer), an AMD GPU with AMF VCE support, or an INTEL GPU with VPL support (Arc, Tiger Lake or newer), with the latest drivers.
- On laptops with both an integrated GPU (Intel HD, AMD iGPU) and a dedicated GPU (NVIDIA GTX/RTX, AMD HD/R5/R7), make sure to assign the dedicated GPU (or "high performance graphics adapter") to ALVR and SteamVR for the best performance and compatibility.
(NVIDIA: Nvidia Control Panel → 3D Settings → Application Settings; AMD: similar method)

Expand Down
16 changes: 16 additions & 0 deletions alvr/server_openvr/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,22 @@ fn main() {
#[cfg(feature = "gpl")]
build.define("ALVR_GPL", None);

#[cfg(target_os = "windows")]
{
let vpl_path = alvr_filesystem::deps_dir().join("windows/libvpl/alvr_build");
let vpl_include_path = vpl_path.join("include");
let vpl_lib_path = vpl_path.join("lib");

println!(
"cargo:rustc-link-search=native={}",
vpl_lib_path.to_string_lossy()
);

build.define("ONEVPL_EXPERIMENTAL", None);
build.include(vpl_include_path);
println!("cargo:rustc-link-lib=static=vpl");
}

build.compile("bindings");

#[cfg(all(target_os = "linux", feature = "gpl"))]
Expand Down
21 changes: 18 additions & 3 deletions alvr/server_openvr/cpp/platform/win32/CEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,23 @@ void CEncoder::Initialize(std::shared_ptr<CD3DRender> d3dRender) {
uint32_t encoderWidth, encoderHeight;
m_FrameRender->GetEncodingResolution(&encoderWidth, &encoderHeight);

Exception vplException;
Exception vceException;
Exception nvencException;
#ifdef ALVR_GPL
Exception swException;
#endif

try {
Debug("Try to use VideoEncoderVPL.\n");
m_videoEncoder = std::make_shared<VideoEncoderVPL>(d3dRender, encoderWidth, encoderHeight);
m_videoEncoder->Initialize();
return;
} catch (Exception e) {
vplException = e;
}

#ifdef ALVR_GPL
if (Settings::Instance().m_force_sw_encoding) {
try {
Debug("Try to use VideoEncoderSW.\n");
Expand Down Expand Up @@ -63,16 +76,18 @@ void CEncoder::Initialize(std::shared_ptr<CD3DRender> d3dRender) {
swException = e;
}
throw MakeException(
"All VideoEncoder are not available. VCE: %s, NVENC: %s, SW: %s",
"All VideoEncoder are not available. VCE: %s, NVENC: %s, VPL: %s, SW: %s",
vceException.what(),
nvencException.what(),
vplException.what(),
swException.what()
);
#else
throw MakeException(
"All VideoEncoder are not available. VCE: %s, NVENC: %s",
"All VideoEncoder are not available. VCE: %s, NVENC: %s, VPL: %s",
vceException.what(),
nvencException.what()
nvencException.what(),
vplException.what()
);
#endif
}
Expand Down
1 change: 1 addition & 0 deletions alvr/server_openvr/cpp/platform/win32/CEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "VideoEncoder.h"
#include "VideoEncoderAMF.h"
#include "VideoEncoderNVENC.h"
#include "VideoEncoderVPL.h"
#include "alvr_server/Utils.h"
#include <d3d11.h>
#include <d3d11_1.h>
Expand Down
Loading
Loading