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

Remove the need for a patched nvidia library for NvFBC. #2471

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/platform/linux/cuda.cpp
Expand Up @@ -614,6 +614,12 @@
make() {
NVFBC_CREATE_HANDLE_PARAMS params { NVFBC_CREATE_HANDLE_PARAMS_VER };

// Set privateData to allow NvFBC on consumer NVIDIA GPUs.
// Based on https://github.com/keylase/nvidia-patch/blob/3193b4b1cea91527bf09ea9b8db5aade6a3f3c0a/win/nvfbcwrp/nvfbcwrp_main.cpp#L23-L25 .
const unsigned int MAGIC_PRIVATE_DATA[4] = { 0xAEF57AC5, 0x401D1A39, 0x1B856BBE, 0x9ED0CEBA };
params.privateData = MAGIC_PRIVATE_DATA;

Check warning on line 620 in src/platform/linux/cuda.cpp

View check run for this annotation

Codecov / codecov/patch

src/platform/linux/cuda.cpp#L619-L620

Added lines #L619 - L620 were not covered by tests
params.privateDataSize = sizeof(MAGIC_PRIVATE_DATA);

handle_t handle;
auto status = func.nvFBCCreateHandle(&handle.handle, &params);
if (status) {
Expand Down