(Resent, originally sent to -patches... Sorry) If WINED3DRS_POINTSCALEENABLE is false and WINED3DRS_POINTSIZE render state is set to an invalid size, glPointSize will fail. This happens in "Black & White 2", causing log/stderr to be flooded with opengl errors.
I'm not sure if this should be fixed here, or when setting state value. Also, maybe it should be avoided to double-check against opengl bounds when WINED3DRS_POINTSCALEENABLE is true. I would be happy to get some feedback on that patch. -- Vincent Pelletier
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index e4c819d..c494f56 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1495,8 +1495,10 @@ static void state_pscale(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3 WARN("POINT_PARAMETERS not supported in this version of opengl\n"); } - glPointSize(pointSize.f); - checkGLcall("glPointSize(...);"); + if (pointSize.f < GL_LIMITS(pointsize) && GL_LIMITS(pointsizemin) < pointSize.f) { + glPointSize(pointSize.f); + checkGLcall("glPointSize(...);"); + } } static void state_colorwrite(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {