[Bug 88627] [BYT HSW] Papo & Yo ground surface rendering is broken

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jun 27 09:43:57 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=88627

--- Comment #18 from vadym <vadym.shovkoplias at globallogic.com> ---
Confirm that this issue is reproducible when switching graphics mode from
defaulut mode. And after restart grass surface is rendered as a black color.
Issue is reproducible on the following platforms:
HSW, SKL, KBL, llvmpipe and AMD.

Shaders responsible for this render was found using qapitrace and frameretrace
tools:
FS_c5d224633770824b77948abaa21ac7101f4da3d8.glsl
VS_7a5820722988a8a7897f64f28a35ba4cf47d4aac.glsl

It was found that PConstFloat uniform in a fragment shader is initialized
differently for default graphics mode
and low fraphics mode:

Default graphics mode:
======================
PConstFloat[0]:  0.15516959130764008, 1.4687154293060303, 0.6459256410598755,
0.6465722322463989
PConstFloat[1]:  1.4499469995498657, -0.1571781486272812, -0.06912530213594437,
-0.069194495677948
PConstFloat[2]:  0.0, 1.2643097639083862, -0.7589484453201294,
-0.7597081661224365
PConstFloat[3]:  0.0017628404311835766, 0.0015916860429570079,
-9.989959716796875, 3.970821853727102e-5
PConstFloat[4]:  0.0, 0.0, 0.0, 1.0
PConstFloat[5]:  1.0, 1.0, 0.0, 0.0
PConstFloat[6]:  0.5800891518592834, 0.3527241349220276, 0.0, 1.0
PConstFloat[7]:  0.4309230148792267, 0.3861844539642334, 0.29760390520095825,
1.0
PConstFloat[8]:  0.8999999761581421, 0.8999999761581421, 0.0, 0.0
PConstFloat[9]:  0.0, 0.0, 0.0, 1.0
PConstFloat[10]: 0.009999999776482582, 0.20000000298023224, 2.0,
0.20000000298023224
PConstFloat[11]: 2.0, 1.0, 0.0, 2.0
PConstFloat[12]: 0.20000000298023224, 0.0, 0.0, 0.0
PConstFloat[13]: 2.0, 1.2241312265396118, 0.5098317265510559, 0.0
PConstFloat[14]: -0.46666666865348816, 14.999999046325684, 2.0, 0.0
PConstFloat[15]: 0.20000000298023224, 0.0, 0.0, 0.0

Low graphics mode:
==================
PConstFloat[0]:  1.3075134754180908, -0.3961544334888458, -0.3926851153373718,
-0.39307817816734314
PConstFloat[1]:  -0.645625650882721, -0.8022872805595398, -0.7952612638473511,
-0.7960572838783264
PConstFloat[2]:  0.0, 1.7261825799942017, -0.4597381055355072,
-0.4601982831954956
PConstFloat[3]:  -0.00077915407018736, -0.00024380529066547751,
-9.989983558654785, 1.6511185094714165e-5
PConstFloat[4]:  0.0, 0.0, 0.0, 1.0
PConstFloat[5]:  1.0, 1.0, 0.0, 0.0
PConstFloat[6]:  0.5800891518592834, 0.3527241349220276, 0.0, 1.0
PConstFloat[7]:  0.4309230148792267, 0.3861844539642334, 0.29760390520095825,
1.0
PConstFloat[8]:  0.8999999761581421, 0.8999999761581421, 0.0, 0.0
PConstFloat[9]:  0.0, 0.0, 0.0, 1.0
PConstFloat[10]: 0.009999999776482582, 0.20000000298023224, 2.0,
0.20000000298023224
PConstFloat[11]: 2.0, 1.0, 0.0, 2.0
PConstFloat[12]: 0.20000000298023224, 0.0, 0.0, 0.0
PConstFloat[13]: 2.0, 1.2241312265396118, 0.5098317265510559, 0.0


Looks like PConstFloat[14] and PConstFloat[15] are not initialized explicitly
for low graphics. Accordingly to the spec it is initialized to zeroes and this
leads to wrong calculations in a fragment shader:

    Temporary0.a = (Temporary6.r + PConstFloat[14].r);
    Temporary0.a = (Temporary0.a * PConstFloat[14].g);
    Temporary0.a = clamp(Temporary0.a, 0.0, 1.0);
    Temporary0.a = (( log2( abs( Temporary0.a ) ) ) );
    Temporary0.a = (Temporary0.a * PConstFloat[14].b);


In the second line of the code above Temporary0.a is set to 0.0 because uniform
PConstFloat[14] was not explicitly initialized. Then float log2(float x) is run
with zero input parameter, that is why it returns NaN. In the further
calculations NaN value from log2() is set to gl_FragData[0].rgb which leads to
incorrect rendering of the ground.

This issue can be fixed by explicit initialization of PConstFloat[14] with the
following values (used in default graphics mode):

PConstFloat[14]: -0.46666666865348816, 14.999999046325684, 2.0, 0.0


So, this bug is not related to Mesa.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180627/5be3685a/attachment.html>


More information about the intel-3d-bugs mailing list