project-navigation
Personal tools

Author Topic: Geoscape very slow in 2.2-dev with Intel video  (Read 4536 times)

Offline Azzy

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
Geoscape very slow in 2.2-dev with Intel video
« on: September 16, 2007, 01:12:39 pm »
Hi,

I'm running the development version from 15.09.2007 on Ubuntu Gutsy. The video is Intel GMA3100 (chipset G33).
The problem is, sometimes geoscape becomes really slow, ~1fps. Normally it is about 83 fps. It happens with about ~50% probability when I  switch from something else (options menu, base screen or mission) to geoscape. After that, I can switch to base screen or menu screen, and they are still fast, but whenever I return to geoscape, its 1fps. The only way I have found to make it fast again is to remove ~/.ufoai.

Before that I've tried 2.1.1, and it was slow in the start menu already.

Here is a sample console output. Notice "[driAllocateTexture:636] unable to allocate texture" messages. They appear about 1 per second in the "slow geoscape mode".


Adding game dir: ./base
using /local/home/eugeni/.ufoai/2.2-dev/base for writing
Adding game dir: /local/home/eugeni/.ufoai/2.2-dev/base
execing default.cfg
execing config.cfg
execing keys.cfg
----- network initialization -------
..added 3 maps to the mapcycle
Console initialized.

------- sound initialization -------
Loading snd_sdl sound driver
Soundsystem: SDL.
SDL version: 1.2.11
SDL audio driver is "alsa".
Bits: 16
Frequency: 48000
Samples: 4096
Channels: 2
sound sampling rate: 48000
SDL version: 1.2.11
I: setting mode 6: 1024x768
I: got 8 bits of stencil
I: got 24 bits of depth buffer
I: got double buffer
I: got 8 bits for red
I: got 8 bits for green
I: got 8 bits for blue
GL_VENDOR: Tungsten Graphics, Inc
GL_RENDERER: Mesa DRI Intel(R) G33 20061017 x86/MMX/SSE2
GL_VERSION: 1.3 Mesa 7.0.1
GL_EXTENSIONS: GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_point_parameters GL_ARB_shadow 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_crossbar 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_window_pos GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_cull_vertex GL_EXT_compiled_vertex_array GL_EXT_convolution GL_EXT_copy_texture GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_histogram GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_polygon_offset GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_subtexture GL_EXT_texture GL_EXT_texture3D GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_vertex_array GL_3DFX_texture_compression_FXT1 GL_APPLE_client_storage GL_APPLE_packed_pixels GL_ATI_blend_equation_separate GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_INGR_blend_func_separate GL_MESA_pack_invert GL_MESA_ycbcr_texture GL_MESA_window_pos GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texture_rectangle GL_NV_texgen_reflection GL_NV_vertex_program GL_NV_vertex_program1_1 GL_OES_read_format GL_SGI_color_matrix GL_SGI_color_table GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SUN_multi_draw_arrays
...ignoring GL_EXT_LockArrays
...using GL_ARB_multitexture
...using GL_EXT_texture_env_combine
...GL_SGIS_multitexture not found
...ignoring GL_ARB_texture_compression
...using GL_EXT_texture_filter_anisotropic [ 2 max] [ 1 selected]
...using GL_EXT_texture_lod_bias
...using GL_EXT_stencil_wrap
...using GL_EXT_fog_coord
...GL_ATI_separate_stencil not found
...GL_EXT_stencil_two_side not found
...max texture size:
......detected 2048
...SDL_ttf version 2.0.9 - we need at least 2.0.7
Init saving subsystems
...added size subsystem (check ff)
...added base subsystem (check 0)
...added campaign subsystem (check 1)
...added hospital subsystem (check 2)
...added market subsystem (check 3)
...added research subsystem (check 4)
...added employee subsystem (check 5)
...added aliencont subsystem (check 6)
...added production subsystem (check 7)
...added aircraft subsystem (check 8)
...added messagesystem subsystem (check 9)
...added stats subsystem (check a)
...added nations subsystem (check b)
...added transfer subsystem (check c)
libcurl/7.16.4 OpenSSL/0.9.8e zlib/1.2.3.3 libidn/1.0 initialized.
Shared Client/Server Info loaded
Cinematic videos/intro.roq not found
CL_LanguageInit()... language settings are stored in configuration: en
====== UFO Initialized ======

execing autoexec.cfg
"version" is "UFO: Alien Invasion 2.2-dev i386 Sep 16 2007 Linux DEBUG"
Switch grab input off
I: setting mode 6: 1024x768
Loading savegame
...version: 2
...game version: 2.2-dev
RS_ParseTechnologies: unknown token "mdltop" ignored (entry rs_craft_alien_detection)
RS_ParseTechnologies: unknown token "craft_item_detector" ignored (entry rs_craft_alien_detection)
Global data loaded - size 4419020 bytes
...techs: 164
...buildings: 21
...ranks: 16
...nations: 8

Load 'slot0'
...subsystem 'size' - loaded 93 bytes
...subsystem 'base' - loaded 10164 bytes
Activate stage intro
......warning: Set with no missions (stop)
...subsystem 'campaign' - loaded 264 bytes
...subsystem 'hospital' - loaded 0 bytes
...subsystem 'market' - loaded 2874 bytes
...subsystem 'research' - loaded 7836 bytes
...subsystem 'employee' - loaded 5306 bytes
...subsystem 'aliencont' - loaded 0 bytes
...subsystem 'production' - loaded 8 bytes
...subsystem 'aircraft' - loaded 354 bytes
...subsystem 'messagesystem' - loaded 724 bytes
...subsystem 'stats' - loaded 28 bytes
...subsystem 'nations' - loaded 864 bytes
...subsystem 'transfer' - loaded 45424 bytes
File 'slot0' loaded.
Changing to Singleplayer
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
[driAllocateTexture:636] unable to allocate texture
Save user settings to /local/home/eugeni/.ufoai/2.2-dev/base/config.cfg
SDL audio device shut down.
...releasing 0 bytes
recursive shutdown

Offline Azzy

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
Re: Geoscape very slow in 2.2-dev with Intel video
« Reply #1 on: September 20, 2007, 11:24:41 pm »
If anybody is interested, the problem was caused by a lack of texture memory. Only 32M was allocated, and somehow it was not affected by the corresponding option in xorg.conf. Anyway, setting "compressed textures" seems to solve the problem.

A related question: the latest stable version 2.1.1 does not work with intel video. This means that unlucky owners of inter videocards can't participate in multiplayer games with their windows friends that, mostly, are unable to compile -dev version. Could you backport the intel video fix (r9702) to 2.1.1 branch ? The following patch applies cleanly and resulting binary works fine on my system.
Index: src/ref_gl/gl_rmisc.c
===================================================================
--- src/ref_gl/gl_rmisc.c       (revision 11885)
+++ src/ref_gl/gl_rmisc.c       (working copy)
@@ -245,19 +245,6 @@

        GL_TexEnv(GL_REPLACE);

-       if (qglPointParameterfEXT) {
-               float attenuations[3];
-
-               attenuations[0] = gl_particle_att_a->value;
-               attenuations[1] = gl_particle_att_b->value;
-               attenuations[2] = gl_particle_att_c->value;
-
-               qglEnable(GL_POINT_SMOOTH);
-               qglPointParameterfEXT(GL_POINT_SIZE_MIN_EXT, gl_particle_min_size->value);
-               qglPointParameterfEXT(GL_POINT_SIZE_MAX_EXT, gl_particle_max_size->value);
-               qglPointParameterfvEXT(GL_DISTANCE_ATTENUATION_EXT, attenuations);
-       }
-
        GL_UpdateSwapInterval();

        /* doesn't really belong here... but works fine */
Index: src/ref_gl/gl_local.h
===================================================================
--- src/ref_gl/gl_local.h       (revision 11885)
+++ src/ref_gl/gl_local.h       (working copy)
@@ -283,17 +283,13 @@
 extern cvar_t *r_texture_lod;  /* lod_bias */
 extern cvar_t *r_displayrefresh;

-extern cvar_t *gl_vertex_arrays;
-
 extern cvar_t *gl_screenshot;
 extern cvar_t *gl_screenshot_jpeg_quality;

 extern cvar_t *gl_ext_swapinterval;
 extern cvar_t *gl_ext_multitexture;
 extern cvar_t *gl_ext_combine;
-extern cvar_t *gl_ext_pointparameters;
 extern cvar_t *gl_ext_lockarrays;
-extern cvar_t *gl_ext_compiled_vertex_array;
 extern cvar_t *gl_ext_texture_compression;
 extern cvar_t *gl_ext_s3tc_compression;

Index: src/ref_gl/gl_rmain.c
===================================================================
--- src/ref_gl/gl_rmain.c       (revision 11885)
+++ src/ref_gl/gl_rmain.c       (working copy)
@@ -91,8 +91,6 @@
 cvar_t *gl_screenshot;
 cvar_t *gl_screenshot_jpeg_quality;

-cvar_t *gl_vertex_arrays;
-
 cvar_t *gl_particle_min_size;
 cvar_t *gl_particle_max_size;
 cvar_t *gl_particle_size;
@@ -104,9 +102,7 @@
 cvar_t *gl_ext_palettedtexture;
 cvar_t *gl_ext_multitexture;
 cvar_t *gl_ext_combine;
-cvar_t *gl_ext_pointparameters;
 cvar_t *gl_ext_lockarrays;
-cvar_t *gl_ext_compiled_vertex_array;
 cvar_t *gl_ext_texture_compression;
 cvar_t *gl_ext_s3tc_compression;

@@ -1078,15 +1074,12 @@
        gl_wire = ri.Cvar_Get("gl_wire", "0", 0, NULL);
        gl_fog = ri.Cvar_Get("gl_fog", "1", CVAR_ARCHIVE, NULL);
        gl_showbox = ri.Cvar_Get("gl_showbox", "0", CVAR_ARCHIVE, "Shows model bounding box");
-       gl_vertex_arrays = ri.Cvar_Get("gl_vertex_arrays", "0", CVAR_ARCHIVE, NULL);

        gl_ext_swapinterval = ri.Cvar_Get("gl_ext_swapinterval", "1", CVAR_ARCHIVE, NULL);
        gl_ext_palettedtexture = ri.Cvar_Get("gl_ext_palettedtexture", "1", CVAR_ARCHIVE, NULL);
        gl_ext_multitexture = ri.Cvar_Get("gl_ext_multitexture", "1", CVAR_ARCHIVE, NULL);
        gl_ext_combine = ri.Cvar_Get("gl_ext_combine", "1", CVAR_ARCHIVE, NULL);
        gl_ext_lockarrays = ri.Cvar_Get("gl_ext_lockarrays", "0", CVAR_ARCHIVE, NULL);
-       gl_ext_pointparameters = ri.Cvar_Get("gl_ext_pointparameters", "1", CVAR_ARCHIVE, NULL);
-       gl_ext_compiled_vertex_array = ri.Cvar_Get("gl_ext_compiled_vertex_array", "1", CVAR_ARCHIVE, NULL);
        gl_ext_texture_compression = ri.Cvar_Get("gl_ext_texture_compression", "0", CVAR_ARCHIVE, NULL);
        gl_ext_s3tc_compression = ri.Cvar_Get("gl_ext_s3tc_compression", "1", CVAR_ARCHIVE, NULL);

@@ -1274,16 +1267,6 @@
                ri.Con_Printf(PRINT_ALL, "...WGL_EXT_swap_control not found\n");
 #endif

-       if (strstr(gl_config.extensions_string, "GL_EXT_point_parameters")) {
-               if (gl_ext_pointparameters->value) {
-                       qglPointParameterfEXT = (void (APIENTRY *) (GLenum, GLfloat)) qwglGetProcAddress("glPointParameterfEXT");
-                       qglPointParameterfvEXT = (void (APIENTRY *) (GLenum, const GLfloat *)) qwglGetProcAddress("glPointParameterfvEXT");
-                       ri.Con_Printf(PRINT_ALL, "...using GL_EXT_point_parameters\n");
-               } else
-                       ri.Con_Printf(PRINT_ALL, "...ignoring GL_EXT_point_parameters\n");
-       } else
-               ri.Con_Printf(PRINT_ALL, "...GL_EXT_point_parameters not found\n");
-
        if (strstr(gl_config.extensions_string, "GL_ARB_multitexture")) {
                if (gl_ext_multitexture->value) {
                        ri.Con_Printf(PRINT_ALL, "...using GL_ARB_multitexture\n");
« Last Edit: September 20, 2007, 11:28:05 pm by Azzy »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Geoscape very slow in 2.2-dev with Intel video
« Reply #2 on: September 21, 2007, 12:25:21 am »
ok, i've commited this to the 2.1.1 branch - but there are no updated source packages at sourceforge.net or something like that

2.2 is close so it's not worth to do the hole release steps for this backport imo

Offline Azzy

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
Re: Geoscape very slow in 2.2-dev with Intel video
« Reply #3 on: September 21, 2007, 11:42:40 am »
Thank you.
How close is it exactly ? Is there some kind of schedule or roadmap ?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Geoscape very slow in 2.2-dev with Intel video
« Reply #4 on: September 21, 2007, 11:53:43 am »
Quote
It's done when it's done
  ;D

we will create the branch in days or weeks - not months - after that there will be a bugfixing stage. how long this lasts.... well - i don't know. depends on how many bugs we still find and how hard they are to fix.

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Geoscape very slow in 2.2-dev with Intel video
« Reply #5 on: September 21, 2007, 12:44:13 pm »
Armour...

Offline XaverXN

  • Squad Leader
  • ****
  • Posts: 110
    • View Profile
Re: Geoscape very slow in 2.2-dev with Intel video
« Reply #6 on: September 22, 2007, 07:42:09 pm »
Yes! Thank you, that works for me too.

I have a Fujitsu-Siemens Lifebook with an integrated intel graphics card
(KDE Infocenter says:
Code: [Select]
Vendor: Intel Corporation
Device: 82852/855GM Integrated graphics device
[...]
Driver:
 Manufacturer: Tungsten Graphics, Inc.
 Renderer: Mesa DRI Intel (R) 852GM/855GM 20061017 x86/MMX/SSE2
 OpenGL-Version: 1.3 Mesa 7.0.1
)
and have ~1 fps second all the time in geoscape (current revision).
However, enabling texture compression solves the problem.

But eventually this should be working again w/o compression, right?

Add. Info:
Repository Root: https://ufoai.svn.sourceforge.net/svnroot/ufoai
Repository UUID: 39b98707-f80d-0410-bc7e-c6b02f5409da
Revision: 11919
Debian Lenny