i965/fs: Fix the dummy fragment shader.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 17 Jan 2015 09:01:35 +0000 (01:01 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 17 Jan 2015 22:20:41 +0000 (14:20 -0800)
commit461103ef64858e9d81073fad1bd8222b70b2754b
tree4eb084bb579cbc74bbf54e9eda8e5c80c7e61060
parent8c6018e9bcdd3067d35fa942f0c5b7e229d837d0
i965/fs: Fix the dummy fragment shader.

We hit an assertion that the destination of the FB write should not be
an immediate.  (I don't know what we were thinking.)  Use ARF null.

Trying to substitute real shaders with the dummy shader would crash
when trying to upload non-existent uniforms.  Say there are none.

It also wouldn't generate any code because we didn't compute the CFG,
and code generation now requires it.  Compute it.

Gen4-5 also require a message header to be present.

On Gen6+, there were assertion failures in SF/SBE state because
urb_setup was memset to 0 instad of -1, causing it to think there were
attributes when nothing was set up right.  Set to no attributes.

Finally, you have to ensure "Setup URB Entry Read Length" is non-zero
or you get GPU hangs, at least on Crestline.

It now works on at least Crestline and Haswell.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp