Eliwood
|
 |
«
Posted
2006-12-20 23:30:13 » |
|
For one tester (out of about 40) who has an NVIDIA GeForce FX 5200, Java 5, it takes about 10 seconds to create a window in LWJGL. It's not my code since I broke it all down and timed each part. Once the window shows, everything runs very smoothly and quickly (and level loading times are instant too). What's going on?
|
|
|
|
Matzon
|
 |
«
Reply #1 - Posted
2006-12-20 23:38:44 » |
|
does he have an insane amount of displaymodes? can you possible run it with -Xprof to check where the code is using its time ?
|
|
|
|
Eliwood
|
 |
«
Reply #2 - Posted
2006-12-21 02:16:59 » |
|
I was actually checking up on that first one, and he has more than normal, but I don't think it could cause a 10 second creation time. I will have him -xprof and see what's up.
Edit: I don't use XProf that often (I use something else), and it told me nothing useful (the stuff it reported occured after the window was created). How do I just target that part of the code?
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Eliwood
|
 |
«
Reply #3 - Posted
2006-12-21 05:14:26 » |
|
Well, here is one problem. He has 244 display modes. I am pressing him for more specifics, but that is all I know right now. That would cause the slowdown right?
|
|
|
|
Matzon
|
 |
«
Reply #4 - Posted
2006-12-21 07:22:28 » |
|
In my mind 244 displaymodes isn't really a lot, I'm not sure whats going on - I will check with elias, and see if he has a clue
|
|
|
|
Matzon
|
 |
«
Reply #5 - Posted
2006-12-21 09:03:29 » |
|
elias doesn't have a clue either. We'v never seen this behaviour... Your best bet is to try and profile it - at least determine if its something in Java code that is causing the issues
|
|
|
|
Matzon
|
 |
«
Reply #6 - Posted
2006-12-21 10:11:46 » |
|
A comment from IRC (irc://irc.freenode.net/lwjgl) [10:03:11] FN'MatthiasM: Mazon: about this forum link - maybe he has somekind of of tool installed that messes with 3d app driver settings - like thie NVTune app from nVidia
|
|
|
|
EgonOlsen
|
 |
«
Reply #7 - Posted
2006-12-21 15:11:52 » |
|
Are you by any chance forcing anti-aliasing in the driver settings? I once had similar problems and GeForce cards when opening a LWJGL-window.
|
|
|
|
Riven
|
 |
«
Reply #8 - Posted
2006-12-21 20:02:14 » |
|
Maybe... this: 1 2 3 4
| for(int i=0; i<...; i++) { DisplayMode mode = Display.getDisplayModes()[i]; } |
?
|
|
|
|
princec
|
 |
«
Reply #9 - Posted
2006-12-22 16:25:11 » |
|
Yeah, that is a painfully slow way to do it. Cas 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Eliwood
|
 |
«
Reply #10 - Posted
2007-01-17 05:21:09 » |
|
Yay. After nearly a month, I finally got him to successfully profile. Here is a screen shot of the profiling results. It appears that choosePixelFormat() is the root of the problem. http://img403.imageshack.us/img403/1122/opentree3fs7.pngWhat could possibly be going wrong?
|
|
|
|
Matzon
|
 |
«
Reply #11 - Posted
2007-01-17 07:38:11 » |
|
int pixel_format_id = findPixelFormatOnDC(env, peer_info->drawable_hdc, origin_x, origin_y, pixel_format, pixel_format_caps, use_hdc_bpp, window, pbuffer, double_buffer, floating_point); applyPixelFormat(env, peer_info->drawable_hdc, pixel_format_id); both of which is native code in context.c It would probably be better to let elias look at this (he's the author of that code) - I didn't see anything suspicious. I'll tell him of this thread.
|
|
|
|
elias
|
 |
«
Reply #12 - Posted
2007-01-17 11:47:20 » |
|
There's nothing in choosePixelFormat that should be overly slow (there are no loops, just calls to the Win32 API), so I'd like to know how many times you're calling Display.create() (including the calls where it fails due to unsupported pixel formats and whatnot). What the parameters to your Display.create() and are you using lwjgl 1.0 rc1? Additionally, could you try one of the early NeHe tests ( http://nehe.gamedev.net/) to see if they have the window creation problem too? - elias
|
|
|
|
Eliwood
|
 |
«
Reply #13 - Posted
2007-01-17 18:53:18 » |
|
There's nothing in choosePixelFormat that should be overly slow (there are no loops, just calls to the Win32 API), so I'd like to know how many times you're calling Display.create() (including the calls where it fails due to unsupported pixel formats and whatnot). What the parameters to your Display.create() and are you using lwjgl 1.0 rc1? Additionally, could you try one of the early NeHe tests ( http://nehe.gamedev.net/) to see if they have the window creation problem too? - elias 1) Yes, this is LWJGL 1.0 RC 1. 2) The code surrounding this is here. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| long start = System.currentTimeMillis();
try { DisplayMode best = (fullscreen) ? getBestDisplay(size) : new DisplayMode(size.width, size.height);
if (best == null) { throw new Exception(); }
Display.setDisplayMode(best);
}
catch (Exception e) { e.printStackTrace(); throw new RuntimeException("LWJGL Error: "+ "Unable to set desired display " + "mode ("+size.width+"x"+size.height+"x"+16+")"); }
try { Display.setTitle("Stencyl"); Display.setFullscreen(fullscreen); Display.setVSyncEnabled(vsync); Display.create(); }
catch (Exception e) { e.printStackTrace(); throw new RuntimeException("LWJGL Error: Unable to initialize display"); } long end = System.currentTimeMillis(); System.out.println("Display Selection Time = " + (end - start) + "ms"); |
3) According to the profiling results posted above, the function appears to be called once unless I'm reading things wrong. (the last column is number of invocations) I will get him to run the NeHe tests to see if he gets similar problems there.
|
|
|
|
Eliwood
|
 |
«
Reply #14 - Posted
2007-01-18 03:11:00 » |
|
Well, well... He is getting 11 second window creation times for those tuts, so the problem is clearly on his end, but what is the cause? (Just to remind you, the window creation time is poor, but actual gameplay is fine) Edit: Here is his IGL report. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298
| IGL v2.0.1 PROFILE FOR: NVIDIA GeForce FX 5200
System information
Processor Architecture: x86 Class: Pentium Processor: 2 processor(s) detected
Operating System Platform: Windows NT Detected OS: Windows XP Version: 5.1 build 2600 Service Pack 2
Display Adapter Primary display: NVIDIA GeForce FX 5200 Vendor ID: 0x10DE Device ID: 0x0322
Display Driver ICD driver: c:\windows\system32\nvoglnt.dll Driver version: 6.14.10.7801 Company: NVIDIA Corporation Copyrights: © NVIDIA Corporation. All rights reserved. Descriptions: NVIDIA Compatible OpenGL ICD
OpenGL Library Vendor: NVIDIA Corporation Version: 2.0.0 Renderer: GeForce FX 5200/AGP/SSE2
GL Extensions GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_half_float_pixel GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_Cg_shader GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_object GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_paletted_texture GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_shared_texture_palette GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_object GL_EXT_vertex_array GL_HP_occlusion_test GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_copy_depth_to_color GL_NV_depth_clamp GL_NV_fence GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum GL_WIN_swap_hint WGL_EXT_swap_control
Total extensions 106
WGL Extensions WGL_ARB_buffer_region WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_multisample WGL_ARB_pbuffer WGL_ARB_pixel_format WGL_ARB_render_texture WGL_EXT_extensions_string WGL_EXT_swap_control WGL_NV_float_buffer WGL_NV_render_depth_texture WGL_NV_render_texture_rectangle
Total extensions 12
Implementation specifics capabilities • Stacks Max. modelview stack depth 32 Max. projection stack depth 4 Max. texture stack depth 10 Max. name stack depth 128 Max. attribute stack depth 16 Max. client attribute stack depth 16 • Frame buffer Max. viewport dimensions 4096 x 4096 Sub-pixel precision bits 12 Stereo buffers enabled no Double buffers enabled yes Auxilliary buffers 1 • Miscellaneous Max. texture size 4096 x 4096 Max. pixel map table 65536 Max. list nesting 64 Max. evaluator polynomial order 8 Max. number of lights 8 Max. clip planes 6 Point size granularity 0.125000 Point size range 1.000000 to 63.375000 Line-width granularity 0.125000 Line-width range 0.500000 to 10.000000
Extension specifics capabilities • GL_ARB_multitexture Texture units 4 • GL_ARB_texture_cube_map Max. cube map texture size 4096 • GL_ARB_imaging Max. color matrix stack depth 2 • GL_ARB_texture_compression Number of texture compression formats 3 Supported formats DXT1 RGB DXT3 RGBA DXT5 RGBA • GL_ARB_vertex_program Max. vertex attributes 16 Max. matrices 8 Max. matrix stack depth 1 Max. instructions 256 Max. native instructions 256 Max. temporaries 16 Max. native temporaries 16 Max. parameters 256 Max. native parameters 256 Max. attributes 16 Max. native attributes 16 Max. address registers 2 Max. native address registers 2 Max. local parameters 256 Max. env local parameters 256 • GL_ARB_vertex_shader Max. uniform vertex components 256 Max. vertex attributes 16 Max. varying floats 32 Max. combined texture image units 16 Max. vertex texture image units 0 Max. texture image units 16 Max. texture coords 8 • GL_ARB_fragment_program Max. matrices 8 Max. matrix stack depth 1 Max. ALU instructions 1024 Max. Texture instructions 1024 Max. Texture indirections 1024 Max. native ALU instructions 1024 Max. native texture instructions 1024 Max. native texture indirections 1024 Max. texture coords 8 Max. texture image units 16 Max. instructions 1024 Max. native instructions 1024 Max. temporaries 32 Max. native temporaries 32 Max. parameters 1024 Max. native parameters 1024 Max. attributes 16 Max. native attributes 16 Max. address registers 0 Max. native address registers 0 Max. local parameters 256 Max. env local parameters 256 • GL_ARB_fragment_shader Max. uniform fragment components 256 Max. texture coords 8 Max. texture image units 16 • GL_EXT_texture_filter_anisotropic Max. texture filter anisotropy 8 • GL_EXT_texture3D Max. 3D texture size 512 x 512 x 512 • GL_EXT_texture_lod_bias Max. texture LOD bias 15 • GL_EXT_draw_range_elements Max. elements vertices 4096 Max. elements indices 4096 • GL_NV_texture_rectangle Max. texture rectangle size 4096 • GL_NV_vertex_array_range Max. VAR size 1048575 • GL_NV_register_combiners Max. general combiners 8 • GL_NV_occlusion_query Pixel counter bits 32 • GL_NV_vertex_program Max. track matrix stack depth 1 Max. track matrices 8 • GL_NV_light_max_exponent Max. light shininess 1024 Max. light spot exponent 1024 • GL_NV_fragment_program Max. texture coords 8 Max. texture image units 16 Max. fragment program local parameters 256
OpenGLU Library Vendor Microsoft Corporation Version 1.2.2.0
GLU Extensions GL_EXT_bgra |
|
|
|
|
elias
|
 |
«
Reply #15 - Posted
2007-01-19 10:26:35 » |
|
Yeah, if you only call Display.create once and if the NeHe tutorials are also showing the problem, I would also think that the problem is on his end. However, I've never seen anything like it, especially not with a Geforce card. Only two reasons I can think of is some third party "scanner" program like an anti virus or anti-spyware program blocking the window creation. Other than that, I'd try a re-install of the graphics drivers.
- elias
|
|
|
|
Eliwood
|
 |
«
Reply #16 - Posted
2007-03-01 22:59:53 » |
|
As a follow up, the problem never got fixed. He just got a new video card instead, and as expected, the problem went away with it. I still wonder what happened though...
|
|
|
|
Matzon
|
 |
«
Reply #17 - Posted
2007-03-02 06:53:04 » |
|
where is he located? - could be interresting if we could get the card in hand ...
|
|
|
|
Eliwood
|
 |
«
Reply #18 - Posted
2007-03-02 09:07:20 » |
|
He is located in the US state of Oregon. I don't know anything past that.
|
|
|
|
HappyCat
Junior Newbie
|
 |
«
Reply #19 - Posted
2007-07-04 14:49:13 » |
|
I know this is an old tread, but just wanted to say that I had the same problem (really slow window creation) on a GeForce 7900 GS and fixed it simply by updating my drivers from 91.something to 94.something 
|
|
|
|
|