From 1a3db96bebf9d97ab2770d0b1ba95417829f7453 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Tue, 15 Sep 2020 10:26:59 +0300 Subject: [PATCH] Bug note --- components/streams/src/renderers/openvr_render.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/streams/src/renderers/openvr_render.cpp b/components/streams/src/renderers/openvr_render.cpp index 1c90b8301..bf2934623 100644 --- a/components/streams/src/renderers/openvr_render.cpp +++ b/components/streams/src/renderers/openvr_render.cpp @@ -366,6 +366,8 @@ bool OpenVRRender::retrieve(ftl::data::Frame &frame_out) { texture1_.make(width, height, ftl::utility::GLTexture::Type::BGRA); texture2_.make(width, height, ftl::utility::GLTexture::Type::BGRA); + // FIXME: Using same buffer each frame results in race if previous frame is still being used + // eg. if recording the VR view then the recording can sometimes get the next frame instead. rgbdframe.create<cv::cuda::GpuMat>(Channel::Colour) = texture1_.map(rgbdframe.stream()); rgbdframe.create<cv::cuda::GpuMat>(Channel::Colour2) = texture2_.map(rgbdframe.stream()); rgbdframe.create<cv::cuda::GpuMat>(Channel::Depth).create(height, width, CV_32F); -- GitLab