|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |

DoRamius
Orcae Ita
|
Posted - 2009.02.25 20:20:00 -
[1]
^^ thanks for that. That was the missing piece in the puzzle for me.
Nvidia 7600GT driver version: 180.29 Wine 1.1.15 Ubuntu 8.04
Without scene2, everything worked as before. Once that was removed and SM 2.0/3.0 was forced on I also get a full black screen in the viewport. This is due to shaders not compiling/linking properly. This causes models to be invisible / etc.... so in space you see the background and icons but no stations or ships.
Wine 1.1.15 reports trace:d3d_caps:IWineD3DImpl_FillGLCaps Max ARB_VERTEX_SHADER float constants: 256 trace:d3d_caps:IWineD3DImpl_FillGLCaps Max ARB_FRAGMENT_SHADER float constants: 512
As a test I recompiled the wined3d.dll.so (directx.c) with a fixed setting of 1024 for the VERTEX_SHADER float constants.
And what do you know... models and full effects...
I strongly recommend NOT doing this :) Unless you know exactly what they should be. And I'll be putting it back to the way it was and hoping for a fix eventually.
I'd like to see what wine reports for other users as defaults for the above two lines. WINEDEBUG=d3d_caps wine eve.exe > d3dcaps.log 2>&1
|

DoRamius
Orcae Ita
|
Posted - 2009.02.25 21:15:00 -
[2]
Lol.. didn't need the whole thing just line 1908 and 1909... aka:
trace:d3d_caps:IWineD3DImpl_FillGLCaps Max ARB_VERTEX_SHADER float constants: 256 trace:d3d_caps:IWineD3DImpl_FillGLCaps Max ARB_FRAGMENT_SHADER float constants: 512
wine hq bug report (attention to comment #19)
The above link has a nice prophetic comment:
Quote: The Apocrypha not showing models issue is due to using vec4's > 225 (I think that's the number after setting max_fragment/vertex_uniform_components to 1024). The highest vec4 number I've seen on an Aprocrypha shader is 245 so far. I think only the highest end nvidia cards will be unaffected.
so lets see what the infamous number is run glxinfo -l | grep GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB
and see what the numbers are. Mine is 1024, which equals the 256 in the above post. I'm going to assume that all others not having issues aka 8x and 9x series cards the number reported by glxinfo will probably be greater than 2048
output should look something like so:
GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = 1024
|

DoRamius
Orcae Ita
|
Posted - 2009.02.27 02:29:00 -
[3]
Sevarus James, or anyone else that has an 8x or 9x card. Do acceleration gates display?
I ran a mission or two to see what the FPS etc was like and other than dust clouds ... etc... the only thing that didn't render were the gates or any effects associated with them.
|

DoRamius
Orcae Ita
|
Posted - 2009.02.27 03:08:00 -
[4]
Quote: Mind telling me exactly what I'm not supposed to change in directx.c? You know, so I don't do it. 
Kittens may die, your vid card / computer / house etc may burst into flames etc...
in dlls/wined3d/directx.c
find the line such that: gl_info->vs_glsl_constantsF - (MAX_CONST_B / 4) - MAX_CONST_I - 1;
and change it to: gl_info->vs_glsl_constantsF - (MAX_CONST_B / 4) - 1;
This will provide enough spare uniforms for the shaders to compile.
Replace your wined3d.dll.so with the newly compiled one (make a backup of your existing one). If your using a binary package it may be located in /usr/lib/wine.
** This will affect any other wine programs you run as your replacing this system wide.
Background:
I don't know enough to speak intelligently on this topic, but.... Your card, via the openGL spec, has a value for GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB. This value for 7x series cards is 1024. This is the number of uniforms that can be used by a single shader program.
Wine reserves a fixed number of these. gl_info->vs_glsl_constantsF == # of MAX_UNIFORM_ARBS from your HW (1024 on 7x series cards) divided by 4
The above on a 7x series card = 256 available vec4 uniforms.
so gl_info->vs_glsl_constantsF = 256 on a 7x card
MAX_CONST_B is the number of boolean uniforms to reserve. MAX_CONST_B is statically defined as 16, the divide by 4 is because the boolean size is 1 byte.
MAX_CONST_I is the number of integer uniforms to reserve. Here again the statically reserved # is 16. Each integer size is 4 bytes. << this is where you lose most of the space for the vec4 array.
And then -1 for another set of vars....
This leads to a max vec4 array size of 235. If any shader program indexes a vec4 array beyond this the shader will not compile. You get a glsl error from the compiler and no nothing is displayed when that shader is called for.
Since wine does not auto adjust how many bools or ints that are required for each shader. You get a hard limit of 235. Some shaders in the apoc client attempt to index up to 246 ... based on the DX9 to GLSL translation.
This means at a minimum you need the shader to be defined with a uniform vec4 VC[247]; as the initializaton portion. Otherwise bigger shaders will just not compile.
Removing the uniform INT reservation provides this room. Giving 235 + 16 = 251 available vec4's for the array.
Drawbacks: Scanning the shaders via the wine debug output no VI or VB declarations were found. As long as that continues to remain the case this *should* work for the short term.
If VI's exist (as not every shader is exposed to the client until its needed) then if enough of them + vec4 array indexes are used then you'd have an overwriting of the card memory. While it's unlikely it's possible that you could brick your card.
If its not a true HW limit .. nvidia could increase the available uniforms that are reported through glxinfo -l, or wine will have to change the implementation of the glsl dynamic reservation of ints and bools as they are used the shader. Which would allow the vec4 array to grow and shrink based on bool / int usage (per shader).
|

DoRamius
Orcae Ita
|
Posted - 2009.02.27 03:33:00 -
[5]
Originally by: Ravow Same thing here, invisible acceleration gate.
ATI HD4870
Same fix but I keep 4 MAX_CONST_B and 4 MAX_CONST_I (I will try to lower those 4 byte long)
In the wine bug report it was mentioned (as well as the eve ati fix thread) to set the MAX_CONST_I's in the .h files to 0. I did attempt this and while it does work, you subsitute one GL_INVALID error for another as wine uses the MAX_CONST_I for figuring out how many ints are allow for default shaders. These shaders don't require added glsl to work.
Partialy this is why I didn't suggest doing it that way. Removing the MAX_CONST_I reservation for the max uniforms allows up to 16 ints to be used on the default shaders, and only will cause a problem if there is a collision between a VI and vec4 declaration in a custom shader.
I spent probably a good hour + (didn't track the time) doing AE4. Had a 9gb shader.log when finished :P but it didn't crash and no other obvious anomalies.
30 - 50 fps in space with shaders set to high. All effects on, no shadows / HDR or bloom.
approx 33 fps in station.
|

DoRamius
Orcae Ita
|
Posted - 2009.02.27 03:52:00 -
[6]
Originally by: Ravow So it will be better if I remove the MAX_CONST_I and kept B to 4?
Currently 85-95fps in space and 98-102 in station. High*2, HDR ON, Bloom Max, Shadow OFF
I just kept it in there to give the minimum to allow the shaders to compile. Since B / 4 is only 4, it wasn't enough. Neither bools nor ints were used in the shaders that I scanned. So it makes no difference in that respect.
I was merely noting that changing the definition of MAX_CONST_I & B to something other than 16 could cause other issues not related to not having a large enough vec4 array.
|

DoRamius
Orcae Ita
|
Posted - 2009.03.05 22:40:00 -
[7]
Originally by: Sevarus James Beat me to the punch.
You guys are just too darn quick.
Map seems fixed. Flatten / un-flatten now works without going black screen on me.
Deadspace Accel Gates are back in! Probably a missing art asset. They look different than the previous classic content but hold true to the design.
While I'm happy with the progress, I'm trying to not to be optimisitc. If it works on release day "good show".. they get the pat on the back. If they sneak in something that breaks it. We'll it'll be working *soon*. So I'm still training a very long skill :) <-- has happened before (aka pretty much working up until production release and wack....
|
|
|
|