summaryrefslogtreecommitdiffstats
path: root/src/intel/genxml
diff options
context:
space:
mode:
authorRafael Antognolli <[email protected]>2017-03-30 11:33:05 -0700
committerKenneth Graunke <[email protected]>2017-04-24 15:14:10 -0700
commit9670124e3157636e5325fc0d3302375709403d0e (patch)
tree778ca551f408f8e8a5ac4a5ae6925a85b2217baf /src/intel/genxml
parent4ace73b1f6e8c8d96663a0d8f0f1d61f934e9cb2 (diff)
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/genxml')
-rw-r--r--src/intel/genxml/gen6.xml4
-rw-r--r--src/intel/genxml/gen7.xml4
-rw-r--r--src/intel/genxml/gen75.xml4
-rw-r--r--src/intel/genxml/gen8.xml4
-rw-r--r--src/intel/genxml/gen9.xml4
5 files changed, 10 insertions, 10 deletions
diff --git a/src/intel/genxml/gen6.xml b/src/intel/genxml/gen6.xml
index 5083f074a12..3059bfc2604 100644
--- a/src/intel/genxml/gen6.xml
+++ b/src/intel/genxml/gen6.xml
@@ -452,8 +452,8 @@
<field name="Post-Blend Color Clamp Enable" start="32" end="32" type="bool"/>
</struct>
- <struct name="BLEND_STATE" length="16">
- <group count="8" start="0" size="64">
+ <struct name="BLEND_STATE" length="0">
+ <group count="0" start="0" size="64">
<field name="Entry" start="0" end="63" type="BLEND_STATE_ENTRY"/>
</group>
</struct>
diff --git a/src/intel/genxml/gen7.xml b/src/intel/genxml/gen7.xml
index ada8f743960..867a1d40921 100644
--- a/src/intel/genxml/gen7.xml
+++ b/src/intel/genxml/gen7.xml
@@ -507,8 +507,8 @@
<field name="Post-Blend Color Clamp Enable" start="32" end="32" type="bool"/>
</struct>
- <struct name="BLEND_STATE" length="16">
- <group count="8" start="0" size="64">
+ <struct name="BLEND_STATE" length="0">
+ <group count="0" start="0" size="64">
<field name="Entry" start="0" end="63" type="BLEND_STATE_ENTRY"/>
</group>
</struct>
diff --git a/src/intel/genxml/gen75.xml b/src/intel/genxml/gen75.xml
index 4d1feafd5f0..9f0486c05c8 100644
--- a/src/intel/genxml/gen75.xml
+++ b/src/intel/genxml/gen75.xml
@@ -517,8 +517,8 @@
<field name="Post-Blend Color Clamp Enable" start="32" end="32" type="bool"/>
</struct>
- <struct name="BLEND_STATE" length="16">
- <group count="8" start="0" size="64">
+ <struct name="BLEND_STATE" length="0">
+ <group count="0" start="0" size="64">
<field name="Entry" start="0" end="63" type="BLEND_STATE_ENTRY"/>
</group>
</struct>
diff --git a/src/intel/genxml/gen8.xml b/src/intel/genxml/gen8.xml
index 33c8c9f9c83..408d241e7a0 100644
--- a/src/intel/genxml/gen8.xml
+++ b/src/intel/genxml/gen8.xml
@@ -546,7 +546,7 @@
<field name="Write Disable Blue" start="0" end="0" type="bool"/>
</struct>
- <struct name="BLEND_STATE" length="17">
+ <struct name="BLEND_STATE" length="1">
<field name="Alpha To Coverage Enable" start="31" end="31" type="bool"/>
<field name="Independent Alpha Blend Enable" start="30" end="30" type="bool"/>
<field name="Alpha To One Enable" start="29" end="29" type="bool"/>
@@ -556,7 +556,7 @@
<field name="Color Dither Enable" start="23" end="23" type="bool"/>
<field name="X Dither Offset" start="21" end="22" type="uint"/>
<field name="Y Dither Offset" start="19" end="20" type="uint"/>
- <group count="8" start="32" size="64">
+ <group count="0" start="32" size="64">
<field name="Entry" start="0" end="63" type="BLEND_STATE_ENTRY"/>
</group>
</struct>
diff --git a/src/intel/genxml/gen9.xml b/src/intel/genxml/gen9.xml
index c04e9d4e482..ee7056b3675 100644
--- a/src/intel/genxml/gen9.xml
+++ b/src/intel/genxml/gen9.xml
@@ -555,7 +555,7 @@
<field name="Write Disable Blue" start="0" end="0" type="bool"/>
</struct>
- <struct name="BLEND_STATE" length="17">
+ <struct name="BLEND_STATE" length="1">
<field name="Alpha To Coverage Enable" start="31" end="31" type="bool"/>
<field name="Independent Alpha Blend Enable" start="30" end="30" type="bool"/>
<field name="Alpha To One Enable" start="29" end="29" type="bool"/>
@@ -565,7 +565,7 @@
<field name="Color Dither Enable" start="23" end="23" type="bool"/>
<field name="X Dither Offset" start="21" end="22" type="uint"/>
<field name="Y Dither Offset" start="19" end="20" type="uint"/>
- <group count="8" start="32" size="64">
+ <group count="0" start="32" size="64">
<field name="Entry" start="0" end="63" type="BLEND_STATE_ENTRY"/>
</group>
</struct>