i965: Fix state flagging of Gen6 SOL programs.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 22 Aug 2017 22:12:55 +0000 (15:12 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 2 Sep 2017 19:56:18 +0000 (12:56 -0700)
commite5654fc4506ce9789577204e9b1629071855d811
tree8eb765f5f21f98b7f5f3b62a34b7424ca447a1c6
parent4ddbc0a07155335293f0d48823e1faae8665c799
i965: Fix state flagging of Gen6 SOL programs.

It doesn't seem like the old code could possibly work.

1. brw_gs_state_dirty made us bail unless one of these flags were set:
   _NEW_TEXTURE, BRW_NEW_GEOMETRY_PROGRAM, BRW_NEW_TRANSFORM_FEEDBACK
2. If there was no geometry program, we called brw_upload_ff_gs_prog()3
3. That checked brw_ff_gs_state_dirty and bailed unless these were set:
   _NEW_LIGHT, BRW_NEW_PRIMITIVE, BRW_NEW_TRANSFORM_FEEDBACK,
   BRW_NEW_VS_PROG_DATA.
4. brw_ff_gs_prog_key pv_first and attr fields were set based on data
   depending on _NEW_LIGHT and BRW_NEW_VS_PROG_DATA.

This means that if we needed a FF GS program, and changed the VS
outputs or provoking vertex mode, we'd fail to notice that we needed
to emit a new program.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_gs.c
src/mesa/drivers/dri/i965/brw_state_upload.c