未验证 提交 dd7b255b 编写于 作者: M Matt Pharr 提交者: GitHub

Merge pull request #306 from gonsolo/wayland

Fix crash on Wayland.
......@@ -352,9 +352,10 @@ CUDAOutputBuffer<PIXEL_FORMAT>::CUDAOutputBuffer(int32_t width, int32_t height)
CUDA_CHECK(cudaGetDevice(&current_device));
CUDA_CHECK(cudaDeviceGetAttribute(&is_display_device, cudaDevAttrKernelExecTimeout,
current_device));
if (!is_display_device)
LOG_FATAL("GL interop is only available on display device.");
if (getenv("XDG_SESSION_TYPE") == nullptr || getenv("XDG_SESSION_TYPE") != std::string("wayland")) {
if (!is_display_device)
LOG_FATAL("GL interop is only available on display device.");
}
CUDA_CHECK(cudaGetDevice(&m_device_idx));
m_width = width;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册