Hello Stefan and gang,
I was recently trying to troubleshoot some performance issues with EQ in our
cluster. In the process of my investigation i discovered a number of
behaviors and a bug that were related to my issue and I figured i should
bring up here. As a disclaimer, I am locally working on a REALLY old version
of EQ (from last year, 1.3.6) but from my investigation of the master branch
source on github, the issues still persists. Here we go:
First of all, when a pipe is not given a device # in the config then the
programming guide states that the device # is assigned automatically and
incremented for each pipe. It seems to be that this is not happening so all
pipes are assigned device id 0 (line 143 in wgl::Pipe). Thus, all display
DCs are created on the same display device which might be problematic in
multi-GPU scenarios. Additionally, even if the IDs were incremented
sequentially, they would still most likely not correspond to discrete GPUs
but rather to different display OUTPUTS on the same or different GPUs. For
example, an AMD Firepro card with 6 outputs will show 6 device ids to the
operating system (numbered 0-5 for the first GPU for example). So setting
two pipes with devices 0 and 1 would result in the windows being created on
the same GPU and potentially lead to performance issues.
Additionally, I came across a bug in the determination of the pixelvieport
geometry for a pipe in Win32. This happens in line 88 of wgl::Pipe and the
offending lines are those that set pvp.xy=0. However, in
multi-monitor/multi-GPU scenarios, this is not the case (the pvp.xy offset
depends on the virtual desktop arrangement of the displays). So if one were
to omit an explicit window viewport definition and instead rely on the
pipe's pvp to properly set up windows on different monitors, the result
would be that all windows get spawned at the (0,0) virtual desktop location.
The fix for this is quite easy:
*
HDC dc = createWGLDisplayDC();
pvp.x = 0;
pvp.y = 0;
if( dc )
{
uint32_t device = getPipe()->getDevice();
if( device == LB_UNDEFINED_UINT32 )
device = 0;
DISPLAY_DEVICE curDisplayDevice;
curDisplayDevice.cb = sizeof(curDisplayDevice);
if (EnumDisplayDevices(0, device, &curDisplayDevice, 0)
== TRUE)
{
DEVMODE curDeviceMode;
curDeviceMode.dmSize = sizeof(curDeviceMode);
if
(EnumDisplaySettings(curDisplayDevice.DeviceName,
ENUM_CURRENT_SETTINGS, &curDeviceMode) == TRUE)
{
pvp.x = curDeviceMode.dmPosition.x;
pvp.y = curDeviceMode.dmPosition.y;
}
}
pvp.w = GetDeviceCaps( dc, HORZRES );
pvp.h = GetDeviceCaps( dc, VERTRES );
DeleteDC( dc );
}
*
Just by using standard 32-bit APIs this is fixed and works perfectly on our
cluster.
I would clone the repo and do the edits myself, however I haven't been able
to build the master branch recently on OSX or Windows.
Thanks for the great software Stefan!
-Harris
PS: Is there an ETA on fixing the build system for OSX Mavericks?
--
View this message in context:
http://software.1713.n2.nabble.com/Bug-in-wgl-Pipe-pixel-viewport-detection-based-on-device-tp7584388.html
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.
_______________________________________________
eq-dev mailing list
[email protected]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com