i965: Add brw_prog_key_set_id helper to set the program id on any stage
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 6 Mar 2018 01:17:23 +0000 (17:17 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 10 Jul 2018 06:02:33 +0000 (23:02 -0700)
commit170d76de9fd29cfcfb75c4b5570f9d8271a8928e
treedb5b3686126f018d1e544840d480d097e22076e2
parent1c1a7d11c88b32b6411daaded3cb7e6dce86e0b8
i965: Add brw_prog_key_set_id helper to set the program id on any stage

For saving programs (shader cache; get program binary) it is useful to
set the id to 0, with the stage being a parameter.

For restoring programs it is useful to set the id to the id allocated
to the program at creation time.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/drivers/dri/i965/brw_program.c
src/mesa/drivers/dri/i965/brw_program.h