I'm trying to run SPECviewperf (http://www.specbench.org/gpc/opc.static/opcview.htm) using Chromium on W2K.
I focused on the AWadvs-04 test to get things going. Because even this test jumps through a lot of command files, I choose to emulate the crappfaker behavior by putting the Chromium dll in the AWadvs-04 directory together with a copy of the viewperf executable.
This works to the extent that Chromium cranks up, but I get these two strange errors:
*****************
-----------------------
Windows ERROR: Either the application has not called WSAStartup, or WSAStartup failed.
----------------------
CR Error(????:720): wglChoosePixelFormat: too much color precision requested
******************
I don't get these errors running the app on Linux.
Is my "emulation" bogus? Any suggestions for how I could work around this?
Thanks for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your emulation is fine. Here is the code that causes that error, from opengl_stub/wgl.c:
if ( pfd->cColorBits > 32 ||
pfd->cRedBits > 8 ||
pfd->cGreenBits > 8 ||
pfd->cBlueBits > 8 ||
pfd->cAlphaBits > 8 ) {
crError( "wglChoosePixelFormat: too much color precision requested\n" );
}
You can put a call to DebugBreak immediately before this test, which will drop the system into the debugger. You can then examine pfd and see what viewperf is doing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmm. It seems that the structure is messed up. You could try removing the error checking from wglChoosePixelFormat and see if everything goes smoothly, although obviously I can't check something like that into the tree :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I did some digging around in this because I was having the same problem.
As far as I can tell, the Chromium wglChoosePixelFormat_prox() stub is a proxy for the Windows OpenGL ChoosePixelFormat() function. However, the MSDN Library documentation for that function indicates that the cRedBits, cBlueBits, and cGreenBits fields are not used, and the cAlphaBits field only need be zero or greater. That means that the callee cannot assume that the values for these fields have anything meaningful in them. This matches with our observations that the data in these fields is fairly random.
I think that you *must* remove the sanity checks for cRedBits, cBlueBits and cGreenBits in wglChoosePixelFormat_prox() to have correct behavior. The existing sanity checks are not checking anything valid and are, in fact, getting in the way.
According to the MSDN Library, the cRedBits, cGreenBits, cBlueBits, and cAlphaBits fields of a PIXELFORMATDESCRIPTOR are
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to run SPECviewperf (http://www.specbench.org/gpc/opc.static/opcview.htm) using Chromium on W2K.
I focused on the AWadvs-04 test to get things going. Because even this test jumps through a lot of command files, I choose to emulate the crappfaker behavior by putting the Chromium dll in the AWadvs-04 directory together with a copy of the viewperf executable.
This works to the extent that Chromium cranks up, but I get these two strange errors:
*****************
-----------------------
Windows ERROR: Either the application has not called WSAStartup, or WSAStartup failed.
----------------------
CR Error(????:720): wglChoosePixelFormat: too much color precision requested
******************
I don't get these errors running the app on Linux.
Is my "emulation" bogus? Any suggestions for how I could work around this?
Thanks for your help.
Your emulation is fine. Here is the code that causes that error, from opengl_stub/wgl.c:
if ( pfd->cColorBits > 32 ||
pfd->cRedBits > 8 ||
pfd->cGreenBits > 8 ||
pfd->cBlueBits > 8 ||
pfd->cAlphaBits > 8 ) {
crError( "wglChoosePixelFormat: too much color precision requested\n" );
}
You can put a call to DebugBreak immediately before this test, which will drop the system into the debugger. You can then examine pfd and see what viewperf is doing.
I wrote a dumb dump routine for the pfd because DebugBreak was being uncooperative. Attached is the output from a viewperf run.
FYI Chromium runs fine for other apps (Atlantis, etc).
---------------------------
E:\Program Files\SPECopc\SPECviewperf 6.1.2\AWadvs-04>echo Viewset: AWadvs-04 1>>viewperf.log
E:\Program Files\SPECopc\SPECviewperf 6.1.2\AWadvs-04>echo Test Number 1: Weight 21 1>>viewperf.log
E:\Program Files\SPECopc\SPECviewperf 6.1.2\AWadvs-04>echo ------------ 1>>viewperf.log
E:\Program Files\SPECopc\SPECviewperf 6.1.2\AWadvs-04>echo ..\results\awadvs\awadvs1.png 1 620 670 100 100 1>grab.scr
E:\Program Files\SPECopc\SPECviewperf 6.1.2\AWadvs-04>echo ..\results\awadvs\awadvs1Full.png 2 0 0 1260 960 1>>grab.scr
E:\Program Files\SPECopc\SPECviewperf 6.1.2\AWadvs-04>viewperf -mh dyn2 -cp FRAME -zb -nll 2 -bf -txo texlist -te MODULATE -magf LIN
EAR -minf LINEAR_MIPMAP_LINEAR -xws 500 -yws 500 -wt -grab grab.scr
Dump of pfd:
----------
nSize: 40
nVersion: 1
dwFlags: 00000025
iPixelType: 00000000
cColorBits: 24
cRedBits: 76
cRedShift: 0
cGreenBits: 186
cGreenShift: 2
cBlueBits: 6
nBlueShift: 0
cAlphaBits: 0
cAlphaShift: 0
cAccumBits: 0
cAccumRedBits: 0
cAccumGreenBits: 0
cAccumBlueBits: 0
cAccumAlphaBits: 0
cDepthBits: 16
cStencilBits: 0
cAuxBuffers: 0
iLayerType: 00000000
bReserved: 1
dwLayerMask: 0012f5cc
dwVisibleMask: 77e1643d
dwDamageMask: 6767584
---------- -----------------------
Windows ERROR: Either the application has not called WSAStartup, or WSAStartup failed.
----------------------
CR Error(????:1768): wglChoosePixelFormat: too much color precision requested
E:\Program Files\SPECopc\SPECviewperf 6.1.2\AWadvs-04>del grab.scr
E:\Program Files\SPECopc\SPECviewperf 6.1.2\AWadvs-04>
------------------------
Hmm. It seems that the structure is messed up. You could try removing the error checking from wglChoosePixelFormat and see if everything goes smoothly, although obviously I can't check something like that into the tree :)
I did some digging around in this because I was having the same problem.
As far as I can tell, the Chromium wglChoosePixelFormat_prox() stub is a proxy for the Windows OpenGL ChoosePixelFormat() function. However, the MSDN Library documentation for that function indicates that the cRedBits, cBlueBits, and cGreenBits fields are not used, and the cAlphaBits field only need be zero or greater. That means that the callee cannot assume that the values for these fields have anything meaningful in them. This matches with our observations that the data in these fields is fairly random.
I think that you *must* remove the sanity checks for cRedBits, cBlueBits and cGreenBits in wglChoosePixelFormat_prox() to have correct behavior. The existing sanity checks are not checking anything valid and are, in fact, getting in the way.
According to the MSDN Library, the cRedBits, cGreenBits, cBlueBits, and cAlphaBits fields of a PIXELFORMATDESCRIPTOR are
Okay, I've changed the error to a warning.