project-navigation
Personal tools

Author Topic: MESA Invasion  (Read 3428 times)

harduser

  • Guest
MESA Invasion
« on: April 08, 2006, 01:29:28 am »
Hi guys,

I've been having trouble running UFO:AI, since I refreshed my Fedora Cora 4 installation. I successfully installed ATI drivers:

Code: [Select]
[harduser@float ufoai]$ glxinfo
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_EXT_import_context, GLX_OML_swap_method, GLX_SGI_make_current_read,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig
client glx vendor string: ATI
client glx version string: 1.3
client glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_ATI_pixel_format_float,
    GLX_ATI_render_texture
GLX extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context,
    GLX_ARB_multisample
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON XPRESS 200M Series SW TCL Generic
OpenGL version string: 2.0.5695 (8.23.7)


As you can see direct rendering is enabled. xorg.conf is OK, with DRI section:

Code: [Select]

Section "DRI"
        Group        0
        Mode         0666
EndSection


I've tried this: http://liflg.org/forum/viewtopic.php?t=615

and this:

Code: [Select]

//set vid_ref                   gl
//set gl_driver           "opengl32"
set vid_ref                     glx
set gl_driver         libGL.so


but still get ufoai trying to use MESA indirect rendering, which delays mouse movements and makes the game unplayable and even hard to quit. Here's the output from ufoai:

Code: [Select]

[harduser@float ufoai]# ./ufoai
Adding game dir: ./base
using /root/.ufoai/base/ for writing
Adding game dir: /root/.ufoai/base
Using data dir (./base/i18n/) for locate settings
Setting language to C
execing default.cfg
execing config.cfg
execing keys.cfg
Console initialized.

------- sound initialization -------
Using Alsa
sound sampling rate: 48000
------------------------------------
------- Loading ref_glx.so -------
LoadLibrary("ref_glx.so"): can't open /etc/ufo.conf
LoadLibrary("./ref_glx.so")
ref_gl version: GL 0.12
Initializing OpenGL display
...setting fullscreen mode 6: 1024 768
Using XFree86-VidModeExtension Version 2.2
Using hardware gamma
GL_VENDOR: Mesa project: www.mesa3d.org
GL_RENDERER: Mesa GLX Indirect
GL_VERSION: 1.2 (1.5 Mesa 6.2.1)
GL_EXTENSIONS: GL_ARB_depth_texture GL_ARB_imaging GL_ARB_multitexture GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_texture_border_clamp 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_transpose_matrix GL_ARB_window_pos GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_logic_op GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_copy_texture GL_EXT_draw_range_elements GL_EXT_fog_coord 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_two_side 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_lod_bias GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_vertex_array GL_APPLE_packed_pixels GL_ATI_texture_env_combine3 GL_ATI_texture_mirror_once GL_ATIX_texture_env_combine3 GL_IBM_texture_mirrored_repeat GL_INGR_blend_func_separate GL_MESA_pack_invert GL_MESA_ycbcr_texture GL_NV_blend_square GL_NV_point_sprite GL_NV_texgen_reflection GL_NV_texture_rectangle GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SGIX_shadow_ambient GL_SUN_multi_draw_arrays
...allowing CDS
...GL_EXT_compiled_vertex_array not found
...using GL_EXT_point_parameters
...using GL_ARB_multitexture
...using GL_EXT_texture_env_combine
...GL_SGIS_multitexture not found
...GL_ARB_texture_compression not found
Max texture size supported
...detected 2048
------------------------------------
CDAudio_Init: No CD in drive.
CDAudio_Init: CD contains no audio tracks.
CD Audio Initialized.
Map mask loaded.
stage: intro
stage: ufos_are_coming
stage: invasion
Shared Client/Server Info loaded
Couldn't open file '/root/.ufoai/base/save/current.mpt'.
Team 'current' loaded.
Couldn't open 'music/theme.ogg'
====== UFO Initialized ======

Using XF86DGA Mouse
./ufoai: line 104:  4966 Segmentation fault      ./$GAME_BINARY $CMD_ARGS "$@"
[harduser@float ufoai]#


And what's that 'Segmentation fault' in the last line?

Please, help...

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
MESA Invasion
« Reply #1 on: April 08, 2006, 06:58:16 am »
Quote
[harduser@float ufoai]$ glxinfo
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2


SGI? This should be ATI, don't it?
Do you use the fglrx as driver in your xorg.conf?

harduser

  • Guest
MESA Invasion
« Reply #2 on: April 08, 2006, 11:21:57 am »
xorg.conf looks fine to me. I used aticonfig tool to set it up. Please, have a look:

Code: [Select]

[root@float ufoai]# cat /etc/X11/xorg.conf

# XFree86 4 configuration created by pyxf86config

Section "ServerLayout"
        Identifier     "Default Layout"
        Screen      0  "aticonfig Screen 0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"

# RgbPath is the location of the RGB database.  Note, this is the name of the
# file minus the extension (like ".txt" or ".db").  There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
        RgbPath      "/usr/X11R6/lib/X11/rgb"
        FontPath     "unix/:7100"
EndSection

Section "Module"
        Load  "dbe"
        Load  "extmod"
        Load  "fbdevhw"
        Load  "glx"
        Load  "record"
        Load  "freetype"
        Load  "type1"
        Load  "dri"
EndSection

Section "InputDevice"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
#       Option  "Xleds"         "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
#       Option  "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults).  For example, for a non-U.S.
# keyboard, you will probably want to use:
#       Option  "XkbModel"      "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
#       Option  "XkbModel"      "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
#       Option  "XkbLayout"     "de"
# or:
#       Option  "XkbLayout"     "de"
#       Option  "XkbVariant"    "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
#       Option  "XkbOptions"    "ctrl:swapcaps"
# Or if you just want both to be control, use:
#       Option  "XkbOptions"    "ctrl:nocaps"
#
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "pl"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "IMPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "yes"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "LCD Panel 1024x768"
        HorizSync    31.5 - 48.5
        VertRefresh  40.0 - 70.0
        Option      "dpms"
EndSection

Section "Monitor"
        Identifier   "aticonfig Monitor 0"
EndSection

Section "Device"
        Identifier  "Videocard0"
        Driver      "vesa"
        VendorName  "Videocard vendor"
        BoardName   "VESA driver (generic)"
EndSection

Section "Device"
        Identifier  "ATI Graphics Adapter 0"
        Driver      "fglrx"
        BusID       "PCI:1:5:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     16
                Modes    "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1024x768" "800x600" "640x480"
        EndSubSection
EndSection

Section "Screen"
        Identifier "aticonfig Screen 0"
        Device     "ATI Graphics Adapter 0"
        Monitor    "aticonfig Monitor 0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "DRI"
        Group        0
        Mode         0666
EndSection


Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
MESA Invasion
« Reply #3 on: April 08, 2006, 01:12:42 pm »
try to start ufo with:
./ufo +set vid_ref sdl

but only if you use the svn version

harduser

  • Guest
MESA Invasion
« Reply #4 on: April 08, 2006, 02:43:48 pm »
Thanks Mattn, but I solved my problem reinstalling ati driver from ati installation script. Everything looks better now:

Code: [Select]

------------------------------------
------- Loading ref_glx.so -------
LoadLibrary("ref_glx.so"): can't open /etc/ufo.conf
LoadLibrary("./ref_glx.so")
ref_gl version: GL 0.12
Initializing OpenGL display
...setting fullscreen mode 6: 1024 768
Using XFree86-VidModeExtension Version 2.2
Using hardware gamma
GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: RADEON XPRESS 200M Series SW TCL Generic
GL_VERSION: 2.0.5695 (8.23.7)


The game runs and rocks!

I'm gonna kick some alien asses now. Cheers!