Bug 41152 - [glsl] Shader backend in Regnum Online does not work
Summary: [glsl] Shader backend in Regnum Online does not work
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Ian Romanick
QA Contact:
URL: http://www.regnumonlinegame.com/
Whiteboard:
Keywords:
: 46802 (view as bug list)
Depends on: 34006
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-23 06:57 UTC by Sven Arvidsson
Modified: 2012-07-28 22:44 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Sven Arvidsson 2011-09-23 06:57:26 UTC
Using the shader backend in the game Regnum Online does not work, either static or nothing at all is being rendered.

This is not a regression or a new bug, I'm only filing it as a new bug since the original bug tracked several other r300g specific problems with the game. There's also bug 28138 tracking the same problem but focused on solving this on i965.

At the moment to get the game started 6a35cbb656e0f8a2479a63eadefb1ab85f42d490 needs commenting out/reverting, bug 34006 is tracking this problem.

System environment:
-- system architecture: 32-bit
-- Linux distribution: Debian unstable
-- GPU: REDWOOD
-- Model: XFX Radeon HD 5670 1GB
-- Display connector: DVI
-- xf86-video-ati: 6.14.2
-- xserver: 1.10.2.902
-- mesa: 1a662e7c18cab98f1b122f6766faf338725de673
-- drm: 2.4.26
-- kernel: 3.0
Comment 1 Kenneth Graunke 2012-02-17 15:33:32 UTC
I've just pushed a workaround to the VBO module to make it ignore invalid out-of-bounds ranges in glDrawRangeElements, which should fix a lot of models flickering in and out of view with Regnum Online's shader-based renderer.

This may fix this bug.  Can you retest?  (See also 28138, 40361, 44701, and 45214...)
Comment 2 Sven Arvidsson 2012-02-18 08:54:42 UTC
No difference here. Bug 40361 seems to be a regression causing problems in the fixed function rendering, this bug is about the shader backend that has never worked correctly AFAIK.
Comment 3 Sven Arvidsson 2012-03-01 05:07:01 UTC
*** Bug 46802 has been marked as a duplicate of this bug. ***
Comment 4 Pablo 2012-03-01 12:15:02 UTC
let me clarify the situation.

Regnum online provides 5 modes to play.

SAFE MODE: if you check this, it replace any shader option. Perfectly playable

fixed : after the resolution of bug 44701 everything is ok with this.

Shader model 2: with mesa 7.11 it crash on load. with mesa 7.12 and higher you can use this option but nothing in the game is showed, just buttons and menu ( and splash screen ).

shader model 3: it cannot be selected by using gallium 3d ( only with restricted drivers) but it can be selected if you runs the windows version with wine. I guess this option must be added in the future as per future improvements in r600g

shader model 4: only with restricted drivers but I guess this option must be added in the future as per future improvements in r600g. 

shader 3 and 4 supports hardware skinning ( needful in order to improve the frame rates.)
Comment 5 Pablo 2012-03-01 12:16:55 UTC
I forgot to add that there are big problems with wine, and the game does not run on that mode, you only can confirm that shader model 3 is provided as an option
Comment 6 Sven Arvidsson 2012-03-03 05:22:36 UTC
I'm not sure what SM3 and 4 corresponds to in OpenGL (if anything?). You might want to ask the RO devs what OpenGL version, extensions etc. they're checking for.
Comment 7 Pablo 2012-03-03 10:46:47 UTC
I guess they follow standar values, actually the propietary drivers can handle it without problems. I will try to gather some information.
Comment 8 Ian Romanick 2012-03-04 19:07:26 UTC
(In reply to comment #6)
> I'm not sure what SM3 and 4 corresponds to in OpenGL (if anything?). You might
> want to ask the RO devs what OpenGL version, extensions etc. they're checking
> for.

There isn't really an analog for SM3 in OpenGL.  It's basically the OpenGL 2.0 feature set.  Various vendors correctly supported it to varying degrees.

Various SM4 features were added from GLSL 1.30 to GLSL 3.30 (and the associated OpenGL versions).  The main SM4 features that Mesa drivers lack are OpenGL 3.1 UBOs (this is the "16 x 4096" constant registers in the Wikipedia table) and OpenGL 3.2 geometry shaders.

See also http://en.wikipedia.org/wiki/HLSL
Comment 9 Pablo 2012-03-21 08:39:50 UTC
only you need to fix the shader model 2 mode, I guess it will be enough
Comment 10 Rafael Castillo 2012-07-28 18:02:35 UTC
the shader problem are
glGetError(glGetUniformLocationARB) = GL_INVALID_OPERATION
error: linking with uncompiled shader
glGetError(glUniform4fARB) = GL_INVALID_OPERATION

taken from apitrace 3.0 [i can put my apitrace online if needed]

happens with r600g TGSI and LLVM shaders
Comment 11 Sven Arvidsson 2012-07-28 18:40:14 UTC
(In reply to comment #10)
> the shader problem are
> glGetError(glGetUniformLocationARB) = GL_INVALID_OPERATION
> error: linking with uncompiled shader
> glGetError(glUniform4fARB) = GL_INVALID_OPERATION
> 
> taken from apitrace 3.0 [i can put my apitrace online if needed]
> 
> happens with r600g TGSI and LLVM shaders

Hmm, that sounds like a new bug. All the shaders used to compile without problems, they were just not rendering correctly.
Comment 12 Kenneth Graunke 2012-07-28 20:38:06 UTC
That's a recent regression due to Carl's #line changes.  I've pushed a temporary fix to master now: commit dcf8754cce1af09547a5976a74ba807bc6f2657c / glcpp: Add a newline to expanded #line directives.

With that in place, Regnum with SM2.0 seems to be working fine again.
Comment 13 Rafael Castillo 2012-07-28 21:56:36 UTC
many thanks/kudos

going to check now XD
Comment 14 Rafael Castillo 2012-07-28 22:23:29 UTC
ok it runs perfectly now XD the only glitch is when activating antialiasing the textures get corrupted but i think is cuz msaa is missing from master so i think at least for r600g you can close this bug 

just in case this is the output from apitrace(apitrace is AWESOME I LOVE IT)

glGetError(glCompressedTexImage2DARB) = GL_INVALID_OPERATION
Comment 15 Sven Arvidsson 2012-07-28 22:44:03 UTC
Yep, I can confirm that it's working with git master now. Besides the #line fix I'm not sure what fixed the shaders though. 

Just to be sure I'm going to retry the game on i965 before closing bug 28138.

Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.