Re: [JAVA2D] d3dCapsValidity
Thanks Dmitri, the application do run in fullscreen as you suspected. The flag was exactly what I was hoping to find. Thanks a lot. [Message sent by forum member 'khe' (khe)] http://forums.java.net/jive/thread.jspa?messageID=279334 === To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff JAVA2D-INTEREST. For general help, send email to [EMAIL PROTECTED] and include in the body of the message help.
Re: [JAVA2D] d3dCapsValidity
Thanks for the info. I'm assuming your application uses full screen mode, since the d3d pipeline is disabled in 6u4 by default in windowed mode. It's hard to tell why exactly the initialization would fail, but like I said it would typically happen when application dies during the d3d pipeline initialization phase. We set a flag to 0 in the registry before trying to initialize Direct3D device, then we initialize it and perform some tests, and if the check is successful we set the registry value to 2. If vm starts up and detects that the registry value is 0 it assumes that the vm which tried to initialize d3d crashed and never had a chance to set it to 2, so it doesn't even try to init d3d. This was done to work around some very bad driver bugs which would send a system into continuous reboot cycle (incidentally, with older ATI video adapters). Now, there's an obvious problem with this approach - if two applications start at the same time and the timing is right it's possible that one of them will read value 0 set by another app and won't init d3d. May be that's what's happening in your case. Anyway, there's a flag you can specify which will force the pipeline to re-run the test on startup. Use it at your discretion (not a supported flag, could go away in the future release, etc). The flag is: -Dsun.java2d.accelReset=true You can, for example, run a small java app at system startup time with this flag to make sure the flag is reset at least once during user's session. Or if you're confident that you won't run into issues in your controlled environment you can always run your apps with it. One other thing - I would suggest to try the beta builds of upcoming 6u10 release (http://jdk6.dev.java.net) to see if you have any issues with it on your systems. It has a new d3d pipeline (which may or may not be enabled on your hardware). Thanks, Dmitri Java2D Team [Message sent by forum member 'trembovetski' (trembovetski)] http://forums.java.net/jive/thread.jspa?messageID=278103 === To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff JAVA2D-INTEREST. For general help, send email to [EMAIL PROTECTED] and include in the body of the message help.
Re: [JAVA2D] d3dCapsValidity
Thanks for the insightful reply. I've tried to perform the tests you suggest. The environment is started by a tiny booter program which is using the classloader to launch the rest of the program (the booter handles updates). No explicit java2D-parameters are given to the booter (i.e. no forced d3d). [b]The original installation (working) gives the following output:[/b] [code] [W] GetFlagValues: DDraw screen locking is disabled (W2K, XP+) [I] InitDirectX [V] CheckRegistry: Found Display Device 0: ATI MOBILITY RADEON HD 2600 [I] CreateDevice: lpGUID=0x95cb28 hMon=0x10001 [I] DDSetupDevice [I] DDraw::CreateDDPrimarySurface: back-buffers=0 [V] DDSetupDevice: successfully created primary surface [V] DDSetupDevice: successfully setup ddraw device [I] DDSetupDevice [I] DDraw::CreateDDPrimarySurface: back-buffers=1 [V] DDSetupDevice: successfully created primary surface [V] DDSetupDevice: successfully setup ddraw device [I] D3DContext::D3DContext [V] D3DUtils_SelectDeviceGUID: using TNL rasterizer [I] D3DContext::CreateD3DDevice [I] D3DContext::CreateAndTestD3DDevice [I] D3DContext::InitD3DDevice: d3dDevice=Oxb6860 [V] D3DContext::CreateAndTestD3DDevice: D3D device creation/initialization successful [W] TestRenderingResults: Quality test failed due to value ff00 at (34, 0) [I] CreateD3DDevice: tests PASSED, d3d enabled (forced: no). [I] D3DContext::CreateD3DDevice [I] D3DContext::CreateAndTestD3DDevice [I] D3DContext::InitD3DDevice: d3dDevice=Oxb9da0 [V] D3DContext::CreateAndTestD3DDevice: D3D device creation/initialization successful [W] TestRenderingResults: Quality test failed due to value ff00 at (34, 0) [I] CreateD3DDevice: tests PASSED, d3d enabled (forced: no). [I] D3DContext::CreateD3DDevice [I] D3DContext::CreateAndTestD3DDevice [I] D3DContext::InitD3DDevice: d3dDevice=Oxb9da0 [V] D3DContext::CreateAndTestD3DDevice: D3D device creation/initialization successful [W] TestRenderingResults: Quality test failed due to value ff00 at (34, 0) [I] CreateD3DDevice: tests PASSED, d3d enabled (forced: no). [I] D3DContext::CreateD3DDevice [I] D3DContext::CreateAndTestD3DDevice [I] D3DContext::InitD3DDevice: d3dDevice=Oxb9da0 [V] D3DContext::CreateAndTestD3DDevice: D3D device creation/initialization successful [W] TestRenderingResults: Quality test failed due to value ff00 at (34, 0) [I] CreateD3DDevice: tests PASSED, d3d enabled (forced: no). ... 1080 calls to D3DDrawLine 1 call to sun.java2d.loops.Blit::Blit(ByteIndexed, SrcNoEa, IntArgbBm) 137 calls to sun.java2d.d3d.D3DTextureToSurfaceScale::ScaledBlit(Direct3D Texture, AnyAlpha, D3D render target) 351 calls to D3DDrawGlyphs 31 calls to sun.java2d.loops.Blit::Blit(IntArgbBm, SrcOverNoEa, IntRgb) 9 calls to sun.java2d.loops.MaskBlit$General::MaskBlit(IntArgbBm, SrcOver, D3Drender target) 2 calls to sun.java2d.loops.TransformHelper::TransformHelper(IntBgr, SrcNoEa, IntArgbPre) 2788 calls to sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit(Direct3D Texture, AnyAlpha, D3D render target) 2 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb) 68 calls to sun.java2d.loops.MaskBlit$General::MaskBlit(IntRgb, SrcNoEa, IntArgbBm) 41 calls to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, AnyAlpha, IntArgbPre) 50 calls to sun.java2d.loops.Blit::Blit(IntArgbBm, SrcNoEa, IntArgb) 145 calls to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, AnyAlpha, IntArgbBm) 68 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntArgb) 9 calls to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntRgb) 41 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgbBm, SrcNoEa, IntArgbPre) 40 calls to sun.java2d.loops.TransformHelper::TransformHelper(IntArgbBm, SrcNoEa, IntArgbPre) 41 calls to sun.java2d.loops.MaskBlit$General::MaskBlit(IntArgbBm, SrcNoEa, IntArgbPre) 41 calls to sun.java2d.d3d.DelegateSwToTextureLoop::Blit(Any, SrcNoEa, Direct3D Texture) 39 calls to D3DFillRect 9 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgbBm, SrcOver, D3Drender target) 68 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntRgb, SrcNoEa, IntArgbBm) 1 call to sun.java2d.loops.ScaledBlit::ScaledBlit(IntArgbBm, SrcOverNoEa, IntRgb) 77 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, IntArgbBm) 5139 total calls to 24 different primitives [/code] [b]With the erroneous configuration I get this:[/b] [code] [W] GetFlagValues: DDraw screen locking is disabled (W2K, XP+) [I] InitDirectX [V] CheckRegistry: Found Display Device 0: ATI MOBILITY RADEON HD 2600 [I] CreateDevice: lpGUID=0x95cb28 hMon=0x10001 [I] DDSetupDevice [I] DDraw::CreateDDPrimarySurface: back-buffers=0 [V] DDSetupDevice: successfully created primary surface [V] DDSetupDevice: successfully setup ddraw device [I] DDSetupDevice [I] DDraw::CreateDDPrimarySurface: back-buffers=0 [V] DDSetupDevice: successfully created primary surface [V] DDSetupDevice: successfully setup ddraw device [I] DDSetupDevice [I] DDraw::CreateDDPrimarySurface: back-buffers=1 [V]
Re: [JAVA2D] d3dCapsValidity
Hi, Is your application full screen? Does it set -Dsun.java2d.d3d=true flag? Could you please provide the output on the console when running your application with the following env. variable set: set J2D_TRACE_LEVEL=4 java -jar YourApp.jar Also, could you please provide the output of the following command on a system with and w/o the problem: java -Dsun.java2d.trace=count -jar YourApp.jar [EMAIL PROTECTED] wrote: I'm working on a java2D-based game environment for windows. The application is installed on a number of identical, dedicated laptop computers. No other applications are running on these machines and the user can only interact with them through a joystick and a power switch. After a couple of weeks, a few of these machines have started to behave strangely. The double-buffering has stopped to work in games using the drawLine() method. Note that it has been working fine for two weeks (10 hours of playing) and then suddenly the behaviour changes. The machine has only been used for playing during this period and the games have not been updated. By comparing the ghost image of the original installation we have found that the following registry value has changed from 2 to 0: HKEY_CURRENT_USER\Software\JavaSoft\Java2D\1.6.0_04\Drivers\.DISPLAY1 ATI MOBILITY RADEON HD 2600\32\d3dCapsValidity If we change it back, the problem disappears. What is this d3dCapsValidity used for? Why does it change suddenly? Is there any way (except from manually editing the registry) to force java to use the original setting? One way around would be to stop using drawLine(), but it is possible that there are problems with other drawing primitives as well. I'm grateful for input on this problem. This registry key is used to track the state of initalization of the Direct3D pipeline in releases prior to 6u10. 0 means that the application did not finished initialization successfully at some point. Typically that happens if the app crashes during the initialization. The consequent starts of this version of the JRE detect this failure and disable the use of the Direct3D pipeline for this release. One thing is to make absolutely sure that you have the latest video drivers installed on those systems. Thanks, Dmitri === To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message signoff JAVA2D-INTEREST. For general help, send email to [EMAIL PROTECTED] and include in the body of the message help.