I’m developing an application which runs in multi-display mode using Eyefinity's multi-display group of Firepro GPU. The settings of Eyefinity must be manipluated using c++ code for user’s convenience. The Eyefinity display group can be enabled/disabled. The code also adjusts the horizational/vertical overlap values of compensation between multi-display images.
I know that users can get all the aforementioned work done by manually adjusting settings in "Firepro control center “. Unfortunately, the work must be done automatically using c++ code.
I tested the eyefintity samples of ADL(AMD Developer Library). The code could sucessfully enable/disable the eyefinity display group of Firepro GPU.
However, the sample code does not provide any function of modifying the value of overlap compensation. I searched the sample code and ADL’s document, but there is no function, parameter or description whose name/content includes keywords “overlap”.
Then, I tried to confirm whether the overlap compensation value can be effected by any function in ADL. Finally, I found one function out. But it isn't an complete approach. (please refer to Notes below for more details)
So I would like to know how to adjust overlap compensation of eyefinity by ADL. Or any one could give me a piece of sample code?
My software environment:
1. ADL version: v7.0
URL: http://developer.amd.com/tools-and-sdks/graphics-development/display-library-adl-sdk/
2. Firepro Driver Version: v13.352.1006
URL: http://www2.ati.com/drivers/firepro/13.352.1006-whql-firepro-windowsx32x64-retail.exe
3. OS: windows 7 sp1 64-bits
Hardware environment:
AMD Firepro W5000
----------------Notes:
I test each function in the ADL eyefinity sample code(ADL_SDK/Sample/Eyefinity2) and found out that the "setBezelOffsets" function can make effect on the edge between two display images. In the AMD Firepro Control Center, the "adjust bezel compensation"(in the setting group "AMD Eyefinity Multi-Display") is to compensate for gaps between displays.
I think maybe we can regard overlap compensation as another kind of bezel compensation which has a negative compensation value. So I guessed that giving a negative bezel mode percent in ADL function may cause the result same to "overlap". I tried this method but still meet some problem.
In the Eyefinity sample code (ADL_SDK/Sample/Eyefinity2), I modified the function “setBezelOffsets” in the file “ati_eyefinity.c” by giving a negative "bezel mode percent” (-5) in Function "ADL_Display_SLSMapConfig_Create.
And change these two line:
lpAppliedBezelOffsets[iCurrentSLSTarget].iBezelOffsetX = lppCreatedBezelOffsets[iCurrentBezelOffset].iBezelOffsetX - (lppCreatedSLSTargets[iCurrentSLSTarget].iSLSGridPositionX * iHbezel);
lpAppliedBezelOffsets[iCurrentSLSTarget].iBezelOffsetY = lppCreatedBezelOffsets[iCurrentBezelOffset].iBezelOffsetY - (lppCreatedSLSTargets[iCurrentSLSTarget].iSLSGridPositionY * iVbezel);
to
lpAppliedBezelOffsets[iCurrentSLSTarget].iBezelOffsetX = lppCreatedBezelOffsets[iCurrentBezelOffset].iBezelOffsetX ;
lpAppliedBezelOffsets[iCurrentSLSTarget].iBezelOffsetY = lppCreatedBezelOffsets[iCurrentBezelOffset].iBezelOffsetY ;
which means the bezelOffset is the same as “-5%" not influenced by the program/function argument.
you can also see the modified code in attachment.
Firstly, I get adapter index by running the program with parameter "i".
Then enable the eyefinity by running the program with parameter "e<adapter id>,<layout-type> m<monitor list>"
Then I test the "setBezelOffset" function in debug mode by running the program with parameter "b<adapter id> h<some value bigger than 0> v<some value bigger than 0>" which is just used to let the program invoke the "setBezelOffset" function and <some value bigger than 0> won't make effect because of the modifying I made before. After the function “ADL_Display_SLSMapConfig_Create” and “ADL_Display_Modes_Set” was executed, the appearance of my monitors is just the same as the Eyefinity with 192px overlap.
But at this moment, the ADL sample code(ADL_SDK/Sample/Eyefinity) show me that Eyefinity is disabled. ControlCenter show me that eyefinity is enabled and there's no overlap or bezel compensation.(maybe the information of Control center hasn’t been updated)
Finally, after the function "ADL_Display_BezelOffset_Set" was called, both the ControlCenter and ADL code(ADL_SDK/Sample/Eyefinity2) show me that Eyefinity is enabled and has no overlap or bezel compensation. So does the appearance of Eyefinity.
ps:
there's some bug in the "ADL_SDK/Sample/Eyefinity", we should change these line:
// If this adapter/display isn't the one the calling app is asking about, jump ahead to the next one in the list
if (0 != memcmp(lpAdapterInfo[iCurrentAdapter].strDisplayName,OSDisplayName,sizeof(OSDisplayName)))
{
continue;
}
to
int cmplen = strlen(OSDisplayName);
int cmpr =strncmp(lpAdapterInfo[iCurrentAdapter].strDisplayName,OSDisplayName,cmplen) ;
if (0 != cmpr)
{
continue;
}