freedreno/a4xx: fix fragcoord.z + fragdepth
authorRob Clark <robclark@freedesktop.org>
Sun, 13 Dec 2015 18:28:59 +0000 (13:28 -0500)
committerRob Clark <robclark@freedesktop.org>
Tue, 15 Dec 2015 14:40:54 +0000 (09:40 -0500)
commite677b3047be30c0990ce72e5debb19c1f5627fc4
treeb88a00d8a32d6bb2cdb8d77ef67846c169e005b7
parentcad0920d11bdb9ee998cbf67118c0f8423d28abc
freedreno/a4xx: fix fragcoord.z + fragdepth

It seems like disabling earlyz on a4xx also, by defaults, disables
fragcoord.z to the FS.  For frag shaders that both read fragcoord(.z)
and write fragdepth, we need to set some extra bits to prevent a
lockup.

This lets us get rid of the hack of disabling fragcoord.z (which
prevented 0ad from lockups, but resulted in rendering corruption).  Also
fixes fbo-depth-sample-compare.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a4xx/fd4_emit.c
src/gallium/drivers/freedreno/a4xx/fd4_program.c