genxml: Make BLEND_STATE command support variable length array.
authorRafael Antognolli <rafael.antognolli@intel.com>
Thu, 30 Mar 2017 18:33:05 +0000 (11:33 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Apr 2017 22:14:10 +0000 (15:14 -0700)
commit9670124e3157636e5325fc0d3302375709403d0e
tree778ca551f408f8e8a5ac4a5ae6925a85b2217baf
parent4ace73b1f6e8c8d96663a0d8f0f1d61f934e9cb2
genxml: Make BLEND_STATE command support variable length array.

We need to emit BLEND_STATE, which size is 1 + 2 * nr_draw_buffers
dwords (on gen8+), but the BLEND_STATE struct length is always 17. By
marking it size 1, which is actually the size of the struct minus the
BLEND_STATE_ENTRY's, we can emit a BLEND_STATE of variable number of
entries.

For gen6 and gen7 we set length to 0, since it only contains
BLEND_STATE_ENTRY's, and no other data.

With this change, we also change the code for blorp and anv to emit only
the needed BLEND_STATE_ENTRY's, instead of always emitting 16 dwords on
gen6-7 and 17 dwords on gen8+.

v2:
   - Use designated initializers on blorp and remove 0 from
   initialization (Jason)
   - Default entries to disabled on Vulkan (Jason)
   - Rebase code.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/blorp/blorp_genX_exec.h
src/intel/genxml/gen6.xml
src/intel/genxml/gen7.xml
src/intel/genxml/gen75.xml
src/intel/genxml/gen8.xml
src/intel/genxml/gen9.xml
src/intel/vulkan/genX_pipeline.c