Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-vr-interactive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-vr-interactive
Commits
370f22af
Commit
370f22af
authored
4 years ago
by
Martin Pulec
Browse files
Options
Downloads
Patches
Plain Diff
UltraGrid plugin: implement stereo mode for GPU
parent
c3f5712b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/ultragrid/ultragrid.cpp
+10
-2
10 additions, 2 deletions
client/ultragrid/ultragrid.cpp
with
10 additions
and
2 deletions
client/ultragrid/ultragrid.cpp
+
10
−
2
View file @
370f22af
...
...
@@ -373,8 +373,16 @@ bool copy_data(struct cesnet_shm *cesnet_shm,
char
*
out2_u
=
out2_y
+
width
*
height
;
char
*
out2_v
=
out2_u
+
width
*
height
/
4
;
if
(
cesnet_shm
->
use_gpu
)
{
fprintf
(
stderr
,
"Stereo mode not yet implemented with the GPU version.
\n
"
);
return
false
;
# ifdef WITH_CLIENT_CUDA
CUDA_CHECK
(
cudaMemcpy2D
(
out1_y
,
width
,
y
,
2
*
width
,
width
,
height
,
cudaMemcpyHostToDevice
));
CUDA_CHECK
(
cudaMemcpy2D
(
out2_y
,
width
,
y
+
width
,
2
*
width
,
width
,
height
,
cudaMemcpyHostToDevice
));
CUDA_CHECK
(
cudaMemcpy2D
(
out1_u
,
width
/
2
,
u
,
width
,
width
/
2
,
height
/
2
,
cudaMemcpyHostToDevice
));
CUDA_CHECK
(
cudaMemcpy2D
(
out2_u
,
width
/
2
,
u
+
width
/
2
,
width
,
width
/
2
,
height
/
2
,
cudaMemcpyHostToDevice
));
CUDA_CHECK
(
cudaMemcpy2D
(
out1_v
,
width
/
2
,
v
,
width
,
width
/
2
,
height
/
2
,
cudaMemcpyHostToDevice
));
CUDA_CHECK
(
cudaMemcpy2D
(
out2_v
,
width
/
2
,
v
+
width
/
2
,
width
,
width
/
2
,
height
/
2
,
cudaMemcpyHostToDevice
));
CUDA_CHECK
(
cudaIpcCloseMemHandle
(
out
));
# endif
}
else
{
// Y
for
(
int
i
=
0
;
i
<
height
;
++
i
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment