when run NvAPI_GPU_SetScanoutWarping() error, inWarpBlend-Quadros.cpp,
Closed this issue · 2 comments
zkailinzhang commented
code following
std::vector<float> vertices1 = get_warping_vertices2(row, col, srcLeft, srcTop, srcWidth, srcHeight);
int maxnumvert = 6 * 6 * 16 * 16;
warpingData.version =NV_SCANOUT_WARPING_VER;
warpingData.numVertices = maxnumvert;
warpingData.vertexFormat = NV_GPU_WARPING_VERTICE_FORMAT_TRIANGLES_XYUVRQ;
warpingData.textureRect = &scanInfo.sourceDesktopRect;
warpingData.vertices = &vertices1 [96 * 6 * 0];
error = NvAPI_GPU_SetScanoutWarping(dispIds[dispIndex].displayId, &warpingData, &maxNumVertices, &sticky);
an error occurred:
zkailinzhang commented
i open the physical display Nvidia,change extended mode to Mosaic mode, it is ok,run successfully;
why display configuration as extended mode,error,the implementation for this method from the code:
if(topo.enabled == false)
{
// Extended mode
// warp texture coordinates are defined in desktopRect coordinates
srcLeft = (float)scanInfo.sourceDesktopRect.sX;
srcTop = (float)scanInfo.sourceDesktopRect.sY;
srcWidth = (float)scanInfo.sourceDesktopRect.sWidth;
srcHeight = (float)scanInfo.sourceDesktopRect.sHeight;
}
else
{
// Mosaic -- we only want the pixels under the physical display here
printf("Mosaic is enabled\n");
srcLeft = (float)scanInfo.sourceViewportRect.sX;
srcTop = (float)scanInfo.sourceViewportRect.sY;
srcWidth = (float)scanInfo.sourceViewportRect.sWidth;
srcHeight = (float)scanInfo.sourceViewportRect.sHeight;
}
zkailinzhang commented
int maxnumvert = 6 * 6 * 16 * 16;
int maxnumvert = 6 * 16 * 16;
it ok