Help! 256 flag + crashing on ATI

Blitz3D Forums/Blitz3D Programming/Help! 256 flag + crashing on ATI

MadJack(Posted 2008) [#1]
Need some urgent assistance!

A some of you may know, I've recently had a game published on Steam. This is great but I'm getting a lot of crash reports from people with ATI cards (particulalry X800's), and it seems to be down to using Flag 256 when loading/copying textures.

I wrote a thread about this yonks ago, but in the end it seemed this wouldn't be a great problem and so I implemented a 'safe' mode and moved on.

http://www.blitzbasic.com/Community/posts.php?topic=70527#788441

However it seems to be affecting a lot of ATI users (particularly X800's) and although using -safe mode resolves the problem, it still means they'll experience a crash first time and come running to the forums with pitchforks at the ready! I'd like to avoid that!

I need a reliable way to check if Flag256 is ok and in a way that won't trigger a crash in itself.

(Note: I was using Tom's DX7test.dll, however this was causing issues with Steam's GUI overlay and so have gone on to using Mikhail's FastExt.)

Help!


Sledge(Posted 2008) [#2]
You could use GfxDriverName() to see if it's an ATI chipset I suppose.


MadJack(Posted 2008) [#3]
Sledge

Yes, but I don't want to auto switch all ATI to safe mode by default as that means reduced visuals. I might get accused of being biased towards Nvidia ;-)

I'm just sorting out a test app now.


Naughty Alien(Posted 2008) [#4]
..which particular command from FastLib causing that problem? Or it is B3D Loadtexture commandset with flag 256?


MadJack(Posted 2008) [#5]
NA

It appears to be the B3D loadtexture command (with flag 256)

I've set up a small test utility. This will test textureloading, copying and a glowfx using flag256 and write logfile.

Could I ask the community to run the proggy, run it twice (first time answer y to enable flag 256, then n) and send me the two logfiles the programme creates? Or post contents in this thread. They'll be in the same directory as
LOGFILE_FLAG256.TXT
LOGFILE_FLAG0.TXT

Nvidia users would be welcome to give it a go too!
(It'll just run and render a few spheres on-screen)

http://madjack.fileburst.com/256_TEST.zip

Thanks! This could be a big help!


Naughty Alien(Posted 2008) [#6]
here is test for nVidia, I dont have here my ATI rig wich running exactly card you did mentioned(X800), as well as ATI MAX 128 (old card), so i will give it a go on monday..

May I know why you have necessity to load texture with flag 256?
---------
-Yes log-
---------
FLAG_256 =256
Primary Display Driver
INIT FLAG=2
BrushBlendsSrc (EntityBlendsSrc): 00001FFF
+ D3DPBLENDCAPS_ZERO
+ D3DPBLENDCAPS_ONE
+ D3DPBLENDCAPS_SRCCOLOR
+ D3DPBLENDCAPS_INVSRCCOLOR
+ D3DPBLENDCAPS_SRCALPHA
+ D3DPBLENDCAPS_INVSRCALPHA
+ D3DPBLENDCAPS_DESTALPHA
+ D3DPBLENDCAPS_INVDESTALPHA
+ D3DPBLENDCAPS_DESTCOLOR
+ D3DPBLENDCAPS_INVDESTCOLOR
+ D3DPBLENDCAPS_SRCALPHASAT
+ D3DPBLENDCAPS_BOTHSRCALPHA
+ D3DPBLENDCAPS_BOTHINVSRCALPHA

BrushBlendsDest (EntityBlendsDest): 00001FFF
+ D3DPBLENDCAPS_ZERO
+ D3DPBLENDCAPS_ONE
+ D3DPBLENDCAPS_SRCCOLOR
+ D3DPBLENDCAPS_INVSRCCOLOR
+ D3DPBLENDCAPS_SRCALPHA
+ D3DPBLENDCAPS_INVSRCALPHA
+ D3DPBLENDCAPS_DESTALPHA
+ D3DPBLENDCAPS_INVDESTALPHA
+ D3DPBLENDCAPS_DESTCOLOR
+ D3DPBLENDCAPS_INVDESTCOLOR
+ D3DPBLENDCAPS_SRCALPHASAT
+ D3DPBLENDCAPS_BOTHSRCALPHA
+ D3DPBLENDCAPS_BOTHINVSRCALPHA

TextureCaps: 000006CD
+ D3DPTEXTURECAPS_PERSPECTIVE
- D3DPTEXTURECAPS_POW2
+ D3DPTEXTURECAPS_ALPHA
+ D3DPTEXTURECAPS_TRANSPARENCY
- D3DPTEXTURECAPS_BORDER
- D3DPTEXTURECAPS_SQUAREONLY
+ D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE
+ D3DPTEXTURECAPS_ALPHAPALETTE
- D3DPTEXTURECAPS_NONPOW2CONDITIONAL
+ D3DPTEXTURECAPS_PROJECTED
+ D3DPTEXTURECAPS_CUBEMAP
- D3DPTEXTURECAPS_COLORKEYBLEND

TextureBlends: 00FEFFFF
+ D3DTEXOPCAPS_DISABLE
+ D3DTEXOPCAPS_SELECTARG1
+ D3DTEXOPCAPS_SELECTARG2
+ D3DTEXOPCAPS_MODULATE
+ D3DTEXOPCAPS_MODULATE2X
+ D3DTEXOPCAPS_MODULATE4X
+ D3DTEXOPCAPS_ADD
+ D3DTEXOPCAPS_ADDSIGNED
+ D3DTEXOPCAPS_ADDSIGNED2X
+ D3DTEXOPCAPS_SUBTRACT
+ D3DTEXOPCAPS_ADDSMOOTH
+ D3DTEXOPCAPS_BLENDDIFFUSEALPHA
+ D3DTEXOPCAPS_BLENDTEXTUREALPHA
+ D3DTEXOPCAPS_BLENDFACTORALPHA
+ D3DTEXOPCAPS_BLENDTEXTUREALPHAPM
+ D3DTEXOPCAPS_BLENDCURRENTALPHA
- D3DTEXOPCAPS_PREMODULATE
+ D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR
+ D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA
+ D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR
+ D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA
+ D3DTEXOPCAPS_BUMPENVMAP
+ D3DTEXOPCAPS_BUMPENVMAPLUMINANCE
+ D3DTEXOPCAPS_DOTPRODUCT3

TextureMaxStages: 8
TextureMaxWidth: 8192
TextureMaxHeight: 8192
TextureMaxAspectRatio: 8192
ClipplanesMax: 8
LightsMax: 8
Bump: 1
BumpLum: 1
AnisotropyMax: 16

TEXTURE LOAD - PNG
10936448
TEXTURE 0 LOAD - DDS
10944488
TEXTURE 1 LOAD - DDS
11614832
TEXTURE 2 LOAD - DDS
10917264
CREATETEXTURE
10917832
COPY TEXTURE
Testing Vram
1

DDS RENDER TEXTURE TEST
OK

+PNG RENDER TEXTURE TEST
OK

HARDWARE GLOWFX
...ok

--------
-No Log-
--------

FLAG_256 =0
Primary Display Driver
INIT FLAG=2
BrushBlendsSrc (EntityBlendsSrc): 00001FFF
+ D3DPBLENDCAPS_ZERO
+ D3DPBLENDCAPS_ONE
+ D3DPBLENDCAPS_SRCCOLOR
+ D3DPBLENDCAPS_INVSRCCOLOR
+ D3DPBLENDCAPS_SRCALPHA
+ D3DPBLENDCAPS_INVSRCALPHA
+ D3DPBLENDCAPS_DESTALPHA
+ D3DPBLENDCAPS_INVDESTALPHA
+ D3DPBLENDCAPS_DESTCOLOR
+ D3DPBLENDCAPS_INVDESTCOLOR
+ D3DPBLENDCAPS_SRCALPHASAT
+ D3DPBLENDCAPS_BOTHSRCALPHA
+ D3DPBLENDCAPS_BOTHINVSRCALPHA

BrushBlendsDest (EntityBlendsDest): 00001FFF
+ D3DPBLENDCAPS_ZERO
+ D3DPBLENDCAPS_ONE
+ D3DPBLENDCAPS_SRCCOLOR
+ D3DPBLENDCAPS_INVSRCCOLOR
+ D3DPBLENDCAPS_SRCALPHA
+ D3DPBLENDCAPS_INVSRCALPHA
+ D3DPBLENDCAPS_DESTALPHA
+ D3DPBLENDCAPS_INVDESTALPHA
+ D3DPBLENDCAPS_DESTCOLOR
+ D3DPBLENDCAPS_INVDESTCOLOR
+ D3DPBLENDCAPS_SRCALPHASAT
+ D3DPBLENDCAPS_BOTHSRCALPHA
+ D3DPBLENDCAPS_BOTHINVSRCALPHA

TextureCaps: 000006CD
+ D3DPTEXTURECAPS_PERSPECTIVE
- D3DPTEXTURECAPS_POW2
+ D3DPTEXTURECAPS_ALPHA
+ D3DPTEXTURECAPS_TRANSPARENCY
- D3DPTEXTURECAPS_BORDER
- D3DPTEXTURECAPS_SQUAREONLY
+ D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE
+ D3DPTEXTURECAPS_ALPHAPALETTE
- D3DPTEXTURECAPS_NONPOW2CONDITIONAL
+ D3DPTEXTURECAPS_PROJECTED
+ D3DPTEXTURECAPS_CUBEMAP
- D3DPTEXTURECAPS_COLORKEYBLEND

TextureBlends: 00FEFFFF
+ D3DTEXOPCAPS_DISABLE
+ D3DTEXOPCAPS_SELECTARG1
+ D3DTEXOPCAPS_SELECTARG2
+ D3DTEXOPCAPS_MODULATE
+ D3DTEXOPCAPS_MODULATE2X
+ D3DTEXOPCAPS_MODULATE4X
+ D3DTEXOPCAPS_ADD
+ D3DTEXOPCAPS_ADDSIGNED
+ D3DTEXOPCAPS_ADDSIGNED2X
+ D3DTEXOPCAPS_SUBTRACT
+ D3DTEXOPCAPS_ADDSMOOTH
+ D3DTEXOPCAPS_BLENDDIFFUSEALPHA
+ D3DTEXOPCAPS_BLENDTEXTUREALPHA
+ D3DTEXOPCAPS_BLENDFACTORALPHA
+ D3DTEXOPCAPS_BLENDTEXTUREALPHAPM
+ D3DTEXOPCAPS_BLENDCURRENTALPHA
- D3DTEXOPCAPS_PREMODULATE
+ D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR
+ D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA
+ D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR
+ D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA
+ D3DTEXOPCAPS_BUMPENVMAP
+ D3DTEXOPCAPS_BUMPENVMAPLUMINANCE
+ D3DTEXOPCAPS_DOTPRODUCT3

TextureMaxStages: 8
TextureMaxWidth: 8192
TextureMaxHeight: 8192
TextureMaxAspectRatio: 8192
ClipplanesMax: 8
LightsMax: 8
Bump: 1
BumpLum: 1
AnisotropyMax: 16

TEXTURE LOAD - PNG
10936448
TEXTURE 0 LOAD - DDS
10944488
TEXTURE 1 LOAD - DDS
11614832
TEXTURE 2 LOAD - DDS
10917264
CREATETEXTURE
10917832
COPY TEXTURE
Testing Vram
0

DDS RENDER TEXTURE TEST
OK

+PNG RENDER TEXTURE TEST
OK

HARDWARE GLOWFX
...ok


MadJack(Posted 2008) [#7]
LO7
Thanks for that - it didn't highlight the issue,

However I've since managed to scrounge an older ATI card that is reproducing the error. Just about to go into the code to isolate what's causing the crash.

Thanks again though


Stevie G(Posted 2008) [#8]
@ Madjack - please let us know how you resolve this.

I'm sure I read somewhere that you must set Flags 1+256 for this to work on some cards. Worth a try if you're not doing it already.


MadJack(Posted 2008) [#9]
StevieG

I've found the problem - turns out it's not the 256 flag, but will discuss it shortly.


big10p(Posted 2008) [#10]
I know it's moot now but I'm sure someone had code to test for flag 256 compatibility. By jfk maybe - it was a long time ago.


MadJack(Posted 2008) [#11]
Appear to have found the problem.

Fastext's glow post process was having a violent reaction to two of the game's animated models - as in BSOD and reboot! Only affected ATI cards (as far as I can tell) and recompiling those models has appeared to solve the issue!

Very odd - may fire one of the offending models Mikhail's way.
My feeling though is that this is a symptom of both shoehorning extra abilities into DirectX7 Blitz3d and probably some dodgy engineering on ATI's part.
Mikhail's stuff seems pretty solid.