Cxbx-reloaded: Failing pixel shader conversions

Created on 10 Jun 2018  路  6Comments  路  Source: Cxbx-Reloaded/Cxbx-Reloaded

Some titles log messages indicating pixel shader conversion failure, messages like:

[0x049C] WARN: Could not create pixel shader
[0x049C] WARN: (Statement 5) (Validation Error) Invalid dest reg num: 4. Max allowed for this reg type is 1.
(Statement 6) (Validation Error) Invalid dest reg num: 4. Max allowed for this reg type is 1.

Titles that show this:

  • Raw 2

TODO: add more

For this issue, investigate fixes to get those shaders compiling successfully. (It might not be possible under Direct3D 8, but 9 should suffice)

HLE graphics

Most helpful comment

I think Sega GT Online has this problem too.

All 6 comments

Do you can create test-case for it? Or it is unnessesary?

Games will do

I think this Japanese title has it with a different message:

[15B8] WARN: Trying fixed or recompiled programmable pipeline pixel shader!


Received Fatal Message:

* Unknown PushBuffer Operation (0x1E60, 1)

You replied:

1E60 seems to be NV097_SET_COMBINER_CONTROL, possibly a pixel shader related modification done from within the push buffer command stream

Should those games that pop up the pushbuffer messages/warnings be a part of this issue?


Edit (April 2020):
Fixing this issue could fix the graffiti menu glitch in Jet Set Radio Future (old problem mentioned there in September 2018).

[0x028C] WARN: Locking host surface failed!

The Elder Scrolls III : Morowind has some of pixel shader creation fails:

Log block 1:

[0x2B54] WARN: Locking host Texture failed!
[0x2B54] WARN: Locking host Surface failed!
[0x2B54] WARN: Could not create pixel shader
[0x2B54] WARN: (Statement 14) (Validation Error) Dest write mask must be .rgb, .a, or .rgba (all).
(Statement 14) (Validation Error) Dest write mask must be .rgb, or .rgba (all) for dp3.

Log block 2:

[0x2B54] WARN: We're lying about the creation of a pixel shader!
[0x2B54] WARN: Could not create pixel shader
[0x2B54] WARN: (Statement 6) (Validation Error) Read of uninitialized component(*) in r1: r/0 g/1 b/2 *a/3
(Statement 10) (Validation Error) Invalid dest reg num: 4. Max allowed for this reg type is 1.

Scarface also have this pixel shader issue

[0x2D10] WARN: Could not create pixel shader
[0x2D10] WARN: (Statement 3) (Validation Error) Invalid dest reg num: 4. Max allowed for this reg type is 1.
(Statement 4) (Validation Error) Invalid reg num: 4 for first source param. Max allowed for this type is 1.
[0x2D10] WARN: Could not create pixel shader
[0x2D10] WARN: (Statement 3) (Validation Error) Dest write mask must be .rgb, .a, or .rgba (all).
(Statement 3) (Validation Error) Dest write mask must be .rgb, or .rgba (all) for dp3.
(Statement 5) (Validation Error) Read of uninitialized components(*) in r0: *r/0 *g/1 *b/2 a/3
(Statement 6) (Validation Error) Invalid dest reg num: 4. Max allowed for this reg type is 1.
(Statement 7) (Validation Error) Invalid dest reg num: 4. Max allowed for this reg type is 1.
(Statement 8) (Validation Error) Invalid dest reg num: 5. Max allowed for this reg type is 1.
(Statement 9) (Validation Error) Invalid reg num: 5 for first source param. Max allowed for this type is 1.
(Statement 9) (Validation Error) Invalid dest reg num: 5. Max allowed for this reg type is 1.
(Statement 11) (Validation Error) Invalid reg num: 4 for first source param. Max allowed for this type is 1.
(Statement 11) (Validation Error) Invalid reg num: 5 for second source param. Max allowed for this type is 1.
(Statement 13) (Validation Error) Invalid dest reg num:

Destroy All Humans has this issue too

[0x17D8] WARN: Could not create pixel shader
[0x17D8] WARN: (Statement 3) (Validation Error) Dest write mask must be .rgb, .a, or .rgba (all).
(Statement 3) (Validation Error) Dest write mask must be .rgb, or .rgba (all) for dp3.
(Global Validation Error) r0 must be written by shader. Uninitialized components(*): *r/0 *g/1 *b/2 a/3

Halo


Click to expand

```
[0x217C] WARN: Could not create pixel shader
[0x217C] WARN: (16) : (Assembly Error) syntax error

; xps.1.1
ps.1.3
def c6, 1.000000f,1.000000f,1.000000f,1.000000f
tex t0
tex t1
tex t2
tex t3
; xdd r0.rgb,r1.rgb, t2.rgb,c0.rgb,t2.rgb,c1.rgb ; d0=s0 dot s1, d1=s2 dot s3
dp3 r0.rgb, t2,c0 ; d0=s0 dot3 s1
dp3 r1.rgb, t2,c1 ; d0=s0 dot3 s1
; +xmma r0.a,discard,discard, t2.b,1.000000f,0.000000f,0.000000f ; d0=s0s1, d1=s2s3, d2={s0s1}+{s2s3}
mov r0.a, t2.b ; d0=s0
; xmma discard,discard,v0.rgb, v0.rgb,1.000000f,r0.rgb,c2.rgb ; d0=s0s1, d1=s2s3, d2={s0s1}+{s2s3}
mad v0.rgb, r0,c2,v0 ; d0=s0s1+s2
; xmma discard,discard,r0.rgb, 1-r0.a,1.000000f,r0.a,c3.rgb ; d0=s0
s1, d1=s2s3, d2={s0s1}+{s2s3}
lrp r0.rgb, 1-r0.a,1.000000f,c3 ; d0=s0
s1+{1-s0}s2=s0{s1-s2}+s2
; +xmma r0.a,r1.a,discard, r0.b,1.000000f,r1.b,v1.a ; d0=s0s1, d1=s2s3, d2={s0s1}+{s2s3}
+mov r0.a, r0.b ; d0=s0
mul r1.a, r1.b,v1.a ; d0=s0s1
; xmma discard,discard,t1.rgb, 0.000000f,0.500000f,t1.rgb,1.000000f ; d0=s0
s1, d1=s2s3, d2={s0s1}+{s2s3}
mad t1.rgb, 0.000000f,0.500000f,t1 ; d0=s0
s1+s2
; xmma t3.rgb,v0.rgb,discard, t3.rgb,v1.rgb,v0.rgb,r0.rgb ; d0=s0s1, d1=s2s3, d2={s0s1}+{s2s3}
mul t3.rgb, t3,v1 ; d0=s0s1
mul v0.rgb, v0,r0 ; d0=s0
s1
; xmma discard,discard,r1.rgb, c4.rgb,1.000000f,v0.a,-c5.rgb ; d0=s0s1, d1=s2s3, d2={s0s1}+{s2s3}
mov r4.rgb, c5 ; d0=s0 Inserted to avoid constant modifier (applied below on register)
mov r4.rgb, c4 ; d0=s0
mov r5.rgb, c5 ; d0=s0 Inserted to avoid constant modifier (applied below on register)
mov r5.rgb, c5 ; d0=s0 Inserted to avoid constant modifier (applied below on register)
mul r5.rgb, v0.a,-r5 ; d0=s0s1
mov r1.rgb, c5 ; d0=s0 Inserted to avoid constant modifier (applied below on register)
add r1.rgb, r4,r5 ; d0=s0+s1
; xmma discard,discard,t0.rgb, t0.rgb,t1.rgb,t0.rgb,t1.rgb ; d0=s0
s1, d1=s2s3, d2={s0s1}+{s2s3}
mul t0.rgb, t0,t1 ; d0=s0
s1
mad t0.rgb, t0,t1,t0 ; d0=s0s1+s2
; xmma discard,discard,r0.rgb, t0.rgb,v0.rgb,t3.rgb,r1.a ; d0=s0
s1, d1=s2s3, d2={s0s1}+{s2s3}
mul r0.rgb, t0,v0 ; d0=s0
s1
mad r0.rgb, t3,r1.a,r0 ; d0=s0s1+s2
; +xfc 1-v0.a,prod.rgb,c6.rgb,r1.rgb,r0.rgb,c6.a,t0.a ; r0.rgb=s0
s1+{1-s0}s2+s3, r0.a=s6.a, prod=s4s5, sum=r0+v1
mul r3, r0,c6.a ; d0=s0s1
lrp r0.rgb, 1-v0.a,r3,c6 ; d0=s0
s1+{1-s0}s2=s0{s1-s2}+s2
add r0.rgb, r0,r1 ; d0=s0+s1
+mov r0.a, t0.a ; d0=s0
[0x217C] WARN: We're lying about the creation of a pixel shader!

I think Sega GT Online has this problem too.

Was this page helpful?
0 / 5 - 0 ratings