amdgpu on hd 7970 (gcn 1.0)

Kernel drm-next-4.9-si
Mesa-git\amdgpu ddx\llvm 26.08.16
All works fine, except low performance because of the low gpu and vram frequency (dpm not fully supported for now)

amdgpu si

Gears on Gallium 2016.08.24

Released an updated Gears on Gallium iso image:
openSUSE – Leap 42.1
Mesa-git – 12.1_git2016.08.24 + (vendor and gl render override patch)
Kernel – 4.8-rc3 (drm-next-4.9-wip)
libdrm – 2.4.99_git2016.07.30
Mesa-demos – 9.1.0_git2016.04.05
wine – 1.9.17-gallium-nine+staging (use WINEARCH=win32 winecfg) + (id Software games patch)
xorg-server – 1.18.99 with threaded input
xf86-video-ati – 7.99.99_2016.06.24
xf86-video-amdgpu – 1.1.99_2016.08.24
xf86-video-intel – 2.9.99_2016.08.24
xf86-video-nouveau – 1.1.99_2016.07.22
KDE – 5.26.0 (5.7.90git) + plasma5 wayland session
LLVM – 4.0svn
Phoronix Test Suite – 6.4
Steam – 1.0.0.48
LXDE – 0.8.0

Users root and gog has empty password.
The image is the hybrid iso, can be written as the CD and as USB flash drive (use dd for writing).
Download 915 mb
md5 a1164a95d8a7499ef9295ea0f7687080
sha256 b5590fae759613b4460dfb867ab2ad425a41ba2c5b821ad79b057a21da35749d

How to use wine on livecd:
It’s better make /home/gog/.wine as symlink to external hdd\usb (ram disk is only 700 mb) or add ramdisk_size=1024000 (1gb) to kernel parameters to increase ramdisk size.

For VAAPI and VDPAU use
VDPAU_DRIVER=radeonsi | r600 | nouveau
LIBVA_DRIVER_NAME=radeonsi | r600 | nouveau | i965

Mesa vendor and gl renderer override

HMESA_VENDOR_OVERRIDE=”AMD inc.” HMESA_RENDERER_OVERRIDE=”Radeon HD 7970″ glxinfo|grep OpenGL
OpenGL vendor string: AMD inc.
OpenGL renderer string: Radeon HD 7970
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.1.0-devel (git-0420666 pontostroy:X11)
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

Use LIBG_DRI3_DISABLE=1 steam if you have problem with steam (symbol lookup error: /usr/lib/libxcb-dri3.so.0: undefined symbol: xcb_send_request_with_fds)
steam fix

Kernel with amdgpu CIK (Sea Island) now on openSUSE

http://download.opensuse.org/repositories/Kernel:/HEAD/standard/ and http://download.opensuse.org/repositories/home:/pontostroy:/drm-next/ now support amdgpu CIK part

Rust on radeonsi (hd 7970 native)

BioShock Infinite mesa performance patch

I5 3330
HD 7970

Patch

BioShock Infinite Mesa vanilla Mesa patch
High(average/min/max) 33/5/110 38/7/113
Ultra(average/min/max) 27/5/56 30/6/62

Overlord I & II on radeonsi (hd 7970 gallium-nine vs “native” port)

 

Kerbal Space Program on radeonsi (hd 7970 native)

Perspective on radeonsi (hd 7970 wine dx11)

Gears on Gallium 2016.07.25

Released an updated Gears on Gallium iso image:
openSUSE – Leap 42.1
Mesa-git – 12.1_git2016.07.25 + (vendor and gl render override patch)
Kernel – 4.7
libdrm – 2.4.99_git2016.07.22
Mesa-demos – 9.1.0_git2016.04.05
wine – 1.9.15-gallium-nine+staging (use WINEARCH=win32 winecfg) + (id Software games patch)
xorg-server – 1.18.99 with threaded input
xf86-video-ati – 7.99.99_2016.07.22
xf86-video-amdgpu – 1.1.99_2016.07.22
xf86-video-intel – 2.9.99_2016.07.22
xf86-video-nouveau – 1.1.99_2016.07.22
KDE – 5.24.0 (5.6.90git) + plasma5 wayland session
LLVM – 4.0svn
Phoronix Test Suite – 6.4
Steam – 1.0.0.48
LXDE – 0.8.0

Users root and gog has empty password.
The image is the hybrid iso, can be written as the CD and as USB flash drive (use dd for writing).
Download 927 mb
md5 673e741e4feb53b415819b084059353c
sha256 f2e2cefb0b620dfd9d4f8d69d9f6c8b7747f0512ed0348a34f42420943f81293

How to use wine on livecd:
It’s better make /home/gog/.wine as symlink to external hdd\usb (ram disk is only 700 mb) or add ramdisk_size=1024000 (1gb) to kernel parameters to increase ramdisk size.

For VAAPI and VDPAU use
VDPAU_DRIVER=radeonsi | r600 | nouveau
LIBVA_DRIVER_NAME=radeonsi | r600 | nouveau | i965

Mesa vendor and gl renderer override

HMESA_VENDOR_OVERRIDE=”AMD inc.” HMESA_RENDERER_OVERRIDE=”Radeon HD 7970″ glxinfo|grep OpenGL
OpenGL vendor string: AMD inc.
OpenGL renderer string: Radeon HD 7970
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.1.0-devel (git-0420666 pontostroy:X11)
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

How to run Rage and other newest id Software games on Mesa

Newest d Software games like Rage or Wolfenstein: The New Order does not work on mesa ( FATAL ERROR: wglCreateContextAttribsARB failed,  missed compatibility profile context GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB).
So for run this games we need

  1. Disable WGL_CONTEXT_PROFILE_MASK_ARB attribute(patch for wine).
diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 932b217..0b218bc 100644                                                                                                                                
--- a/dlls/opengl32/wgl.c                                                                                                                                    
+++ b/dlls/opengl32/wgl.c                                                                                                                                    
@@ -261,6 +261,31 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)                                                                                        
     return ret;                                                                                                                                             
 }                                                                                                                                                           
 
+static
+const int* remove_profile_mask(const int *attribs)
+{
+    int* ret = NULL;
+    int i = 0;
+    int j = 0;
+    int attr_num = 0;
+    int profile_mask = 0;
+    for (i = 0; attribs[i] != NULL; i += 2) {
+        if (attribs[i] == WGL_CONTEXT_PROFILE_MASK_ARB)
+            profile_mask = 1;
+        ++attr_num;
+    }
+    if (profile_mask == 0) return attribs;
+    ret = calloc(attr_num*2 - 1, sizeof(int));
+    for (i = 0; attribs[i] != NULL; i += 2) {
+        if (attribs[i] != WGL_CONTEXT_PROFILE_MASK_ARB) {
+            ret[j] = attribs[i];
+            ret[j+1] = attribs[i+1];
+            j += 2;
+        }
+    }
+    return ret;
+}
+
 /***********************************************************************
  *             wglCreateContextAttribsARB
  *
@@ -274,6 +299,8 @@ HGLRC WINAPI wglCreateContextAttribsARB( HDC hdc, HGLRC share, const int *attrib
     struct opengl_context *context;
     struct opengl_funcs *funcs = get_dc_funcs( hdc );
 
+    attribs = remove_profile_mask(attribs);
+
     if (!funcs || !funcs->ext.p_wglCreateContextAttribsARB) return 0;
     if (share && !(share_ptr = get_handle_ptr( share, HANDLE_CONTEXT ))) return 0;
     if ((drv_ctx = funcs->ext.p_wglCreateContextAttribsARB( hdc,

2. Run game and dump shader

MESA_SHADER_READ_PATH=/shader/read/  MESA_SHADER_DUMP_PATH=/shader/dump/  MESA_GL_VERSION_OVERRIDE=4.3COMPAT wine ./Rage.exe

3. Fix the vertex shader and copy shaders to /shader/read

cd /shader/dump/
sed -i 's/out vec4 gl_Position;//g' VS* && cp /shader/dump/* /shader/read/

4. Repeat step 2 and 3 until game does not start

5. Or just use my shaders dump (download and unpack)

MESA_SHADER_READ_PATH=/path/to/read/dir/   MESA_GL_VERSION_OVERRIDE=4.3COMPAT wine ./Rage.exe

Use 64 bit wine and mesa