Skip to content
Snippets Groups Projects
Commit 6ac4b149 authored by Joachim Pouderoux's avatar Joachim Pouderoux
Browse files

Fix GRAM size detection under X Window.

The size in kilobytes was saved in an int which was then multiplied by 1024.
With a board equipped with 2GB, this leads to a overflow and an negative
mem size saved in the vtkXGPUInfo structure.
This bug generated issues with some specific usage of
vtkOpenGLVolumeRayCastMapper for instance.

Change-Id: I54af3bb694e12aaa5b32b70a797920fdada3b309
parent 39183904
Branches
Tags
No related merge requests found
......@@ -78,7 +78,7 @@ void vtkXGPUInfoList::Probe()
ramSize=0;
}
vtkGPUInfo *info=vtkGPUInfo::New();
info->SetDedicatedVideoMemory(ramSize*1024); // ramSize is in KB
info->SetDedicatedVideoMemory(static_cast<vtkIdType>(ramSize)*1024); // ramSize is in KB
this->Array->v[j]=info;
++j;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment