summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-06-08 11:29:15 -0700
committerJason Ekstrand <[email protected]>2016-07-15 15:53:47 -0700
commit9a999ceab8ce092543d6e1dfb965098418573ba7 (patch)
tree70209f12528cb2388ee402c8d3758fe925635219 /src
parent0f6eb5dea0e92218af0741d8e5befe22e9068eaf (diff)
genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
Signed-off-by: Jason Ekstrand <[email protected]> Acked-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/genxml/Android.mk15
-rw-r--r--src/intel/genxml/Makefile.am3
-rw-r--r--src/intel/genxml/Makefile.sources3
-rw-r--r--src/intel/genxml/gen4.xml52
-rw-r--r--src/intel/genxml/gen45.xml56
-rw-r--r--src/intel/genxml/gen5.xml56
6 files changed, 185 insertions, 0 deletions
diff --git a/src/intel/genxml/Android.mk b/src/intel/genxml/Android.mk
index e5b7597977a..39b5e2cb356 100644
--- a/src/intel/genxml/Android.mk
+++ b/src/intel/genxml/Android.mk
@@ -49,6 +49,21 @@ define header-gen
$(hide) $(PRIVATE_SCRIPT) $(PRIVATE_XML) > $@
endef
+$(intermediates)/genxml/gen4_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
+$(intermediates)/genxml/gen4_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen4.xml
+$(intermediates)/genxml/gen4_pack.h: $(LOCAL_PATH)/gen4.xml $(LOCAL_PATH)/gen_pack_header.py
+ $(call header-gen)
+
+$(intermediates)/genxml/gen45_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
+$(intermediates)/genxml/gen45_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen45.xml
+$(intermediates)/genxml/gen45_pack.h: $(LOCAL_PATH)/gen45.xml $(LOCAL_PATH)/gen_pack_header.py
+ $(call header-gen)
+
+$(intermediates)/genxml/gen5_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
+$(intermediates)/genxml/gen5_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen5.xml
+$(intermediates)/genxml/gen5_pack.h: $(LOCAL_PATH)/gen5.xml $(LOCAL_PATH)/gen_pack_header.py
+ $(call header-gen)
+
$(intermediates)/genxml/gen6_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
$(intermediates)/genxml/gen6_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen6.xml
$(intermediates)/genxml/gen6_pack.h: $(LOCAL_PATH)/gen6.xml $(LOCAL_PATH)/gen_pack_header.py
diff --git a/src/intel/genxml/Makefile.am b/src/intel/genxml/Makefile.am
index d6c1c5b5124..95c1ff9a508 100644
--- a/src/intel/genxml/Makefile.am
+++ b/src/intel/genxml/Makefile.am
@@ -35,6 +35,9 @@ $(BUILT_SOURCES): gen_pack_header.py
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = \
+ gen4.xml \
+ gen45.xml \
+ gen5.xml \
gen6.xml \
gen7.xml \
gen75.xml \
diff --git a/src/intel/genxml/Makefile.sources b/src/intel/genxml/Makefile.sources
index 9298b4a3bf0..86c0bbe2bc0 100644
--- a/src/intel/genxml/Makefile.sources
+++ b/src/intel/genxml/Makefile.sources
@@ -1,4 +1,7 @@
GENXML_GENERATED_FILES = \
+ gen4_pack.h \
+ gen45_pack.h \
+ gen5_pack.h \
gen6_pack.h \
gen7_pack.h \
gen75_pack.h \
diff --git a/src/intel/genxml/gen4.xml b/src/intel/genxml/gen4.xml
new file mode 100644
index 00000000000..1f89b1d2f33
--- /dev/null
+++ b/src/intel/genxml/gen4.xml
@@ -0,0 +1,52 @@
+<genxml name="BRW" gen="4">
+ <struct name="RENDER_SURFACE_STATE" length="6">
+ <field name="Surface Type" start="29" end="31" type="uint">
+ <value name="SURFTYPE_1D" value="0"/>
+ <value name="SURFTYPE_2D" value="1"/>
+ <value name="SURFTYPE_3D" value="2"/>
+ <value name="SURFTYPE_CUBE" value="3"/>
+ <value name="SURFTYPE_BUFFER" value="4"/>
+ <value name="SURFTYPE_NULL" value="7"/>
+ </field>
+ <field name="Data Return Format" start="27" end="27" type="uint">
+ <value name="DATA_RETURN_FLOAT32" value="0"/>
+ <value name="DATA_RETURN_S1.14" value="1"/>
+ </field>
+ <field name="Surface Format" start="18" end="26" type="uint"/>
+ <field name="Color Buffer Component Write Disables" start="14" end="17" type="uint">
+ <value name="WRITEDISABLE_ALPHA" value="8"/>
+ <value name="WRITEDISABLE_RED" value="4"/>
+ <value name="WRITEDISABLE_GREEN" value="2"/>
+ <value name="WRITEDISABLE_BLUE" value="1"/>
+ </field>
+ <field name="Color Blend Enable" start="13" end="13" type="bool"/>
+ <field name="Vertical Line Stride" start="12" end="12" type="uint"/>
+ <field name="Vertical Line Stride Offset" start="11" end="11" type="uint"/>
+ <field name="MIP Map Layout Mode" start="10" end="10" type="uint">
+ <value name="MIPLAYOUT_BELOW" value="0"/>
+ <value name="MIPLAYOUT_RIGHT" value="1"/>
+ </field>
+ <field name="Render Cache Read Write Mode" start="8" end="8" type="uint">
+ <value name="WRITE_ONLY" value="0"/>
+ <value name="READ_WRITE" value="1"/>
+ </field>
+ <field name="Media Boundary Pixel Mode" start="6" end="7" type="uint">
+ <value name="NORMAL_MODE" value="0"/>
+ </field>
+ <field name="Cube Face Enables" start="0" end="5" type="uint"/>
+ <field name="Surface Base Address" start="32" end="63" type="address"/>
+ <field name="Height" start="83" end="95" type="uint"/>
+ <field name="Width" start="70" end="82" type="uint"/>
+ <field name="MIP Count / LOD" start="66" end="69" type="uint"/>
+ <field name="Depth" start="117" end="127" type="uint"/>
+ <field name="Surface Pitch" start="99" end="115" type="uint"/>
+ <field name="Tiled Surface" start="97" end="97" type="uint"/>
+ <field name="Tile Walk" start="96" end="96" type="uint">
+ <value name="TILEWALK_XMAJOR" value="0"/>
+ <value name="TILEWALK_YMAJOR" value="1"/>
+ </field>
+ <field name="Surface Min LOD" start="156" end="159" type="uint"/>
+ <field name="Minimum Array Element" start="145" end="155" type="uint"/>
+ <field name="Render Target View Extent" start="136" end="144" type="uint"/>
+ </struct>
+</genxml>
diff --git a/src/intel/genxml/gen45.xml b/src/intel/genxml/gen45.xml
new file mode 100644
index 00000000000..973b3bb32ea
--- /dev/null
+++ b/src/intel/genxml/gen45.xml
@@ -0,0 +1,56 @@
+<genxml name="G45" gen="4.5">
+ <struct name="RENDER_SURFACE_STATE" length="6">
+ <field name="Surface Type" start="29" end="31" type="uint">
+ <value name="SURFTYPE_1D" value="0"/>
+ <value name="SURFTYPE_2D" value="1"/>
+ <value name="SURFTYPE_3D" value="2"/>
+ <value name="SURFTYPE_CUBE" value="3"/>
+ <value name="SURFTYPE_BUFFER" value="4"/>
+ <value name="SURFTYPE_NULL" value="7"/>
+ </field>
+ <field name="Data Return Format" start="27" end="27" type="uint">
+ <value name="DATA_RETURN_FLOAT32" value="0"/>
+ <value name="DATA_RETURN_S1.14" value="1"/>
+ </field>
+ <field name="Surface Format" start="18" end="26" type="uint"/>
+ <field name="Color Buffer Component Write Disables" start="14" end="17" type="uint">
+ <value name="WRITEDISABLE_ALPHA" value="8"/>
+ <value name="WRITEDISABLE_RED" value="4"/>
+ <value name="WRITEDISABLE_GREEN" value="2"/>
+ <value name="WRITEDISABLE_BLUE" value="1"/>
+ </field>
+ <field name="Color Blend Enable" start="13" end="13" type="bool"/>
+ <field name="Vertical Line Stride" start="12" end="12" type="uint"/>
+ <field name="Vertical Line Stride Offset" start="11" end="11" type="uint"/>
+ <field name="MIP Map Layout Mode" start="10" end="10" type="uint">
+ <value name="MIPLAYOUT_BELOW" value="0"/>
+ <value name="MIPLAYOUT_RIGHT" value="1"/>
+ </field>
+ <field name="Render Cache Read Write Mode" start="8" end="8" type="uint">
+ <value name="WRITE_ONLY" value="0"/>
+ <value name="READ_WRITE" value="1"/>
+ </field>
+ <field name="Media Boundary Pixel Mode" start="6" end="7" type="uint">
+ <value name="NORMAL_MODE" value="0"/>
+ <value name="PROGRESSIVE_FRAME" value="2"/>
+ <value name="INTERLACED_FRAME" value="3"/>
+ </field>
+ <field name="Cube Face Enables" start="0" end="5" type="uint"/>
+ <field name="Surface Base Address" start="32" end="63" type="address"/>
+ <field name="Height" start="83" end="95" type="uint"/>
+ <field name="Width" start="70" end="82" type="uint"/>
+ <field name="MIP Count / LOD" start="66" end="69" type="uint"/>
+ <field name="Depth" start="117" end="127" type="uint"/>
+ <field name="Surface Pitch" start="99" end="115" type="uint"/>
+ <field name="Tiled Surface" start="97" end="97" type="uint"/>
+ <field name="Tile Walk" start="96" end="96" type="uint">
+ <value name="TILEWALK_XMAJOR" value="0"/>
+ <value name="TILEWALK_YMAJOR" value="1"/>
+ </field>
+ <field name="Surface Min LOD" start="156" end="159" type="uint"/>
+ <field name="Minimum Array Element" start="145" end="155" type="uint"/>
+ <field name="Render Target View Extent" start="136" end="144" type="uint"/>
+ <field name="X Offset" start="185" end="191" type="offset"/>
+ <field name="Y Offset" start="180" end="183" type="offset"/>
+ </struct>
+</genxml>
diff --git a/src/intel/genxml/gen5.xml b/src/intel/genxml/gen5.xml
new file mode 100644
index 00000000000..37e1ac4f8dd
--- /dev/null
+++ b/src/intel/genxml/gen5.xml
@@ -0,0 +1,56 @@
+<genxml name="ILK" gen="5">
+ <struct name="RENDER_SURFACE_STATE" length="6">
+ <field name="Surface Type" start="29" end="31" type="uint">
+ <value name="SURFTYPE_1D" value="0"/>
+ <value name="SURFTYPE_2D" value="1"/>
+ <value name="SURFTYPE_3D" value="2"/>
+ <value name="SURFTYPE_CUBE" value="3"/>
+ <value name="SURFTYPE_BUFFER" value="4"/>
+ <value name="SURFTYPE_NULL" value="7"/>
+ </field>
+ <field name="Data Return Format" start="27" end="27" type="uint">
+ <value name="DATA_RETURN_FLOAT32" value="0"/>
+ <value name="DATA_RETURN_S1.14" value="1"/>
+ </field>
+ <field name="Surface Format" start="18" end="26" type="uint"/>
+ <field name="Color Buffer Component Write Disables" start="14" end="17" type="uint">
+ <value name="WRITEDISABLE_ALPHA" value="8"/>
+ <value name="WRITEDISABLE_RED" value="4"/>
+ <value name="WRITEDISABLE_GREEN" value="2"/>
+ <value name="WRITEDISABLE_BLUE" value="1"/>
+ </field>
+ <field name="Color Blend Enable" start="13" end="13" type="bool"/>
+ <field name="Vertical Line Stride" start="12" end="12" type="uint"/>
+ <field name="Vertical Line Stride Offset" start="11" end="11" type="uint"/>
+ <field name="MIP Map Layout Mode" start="10" end="10" type="uint">
+ <value name="MIPLAYOUT_BELOW" value="0"/>
+ <value name="MIPLAYOUT_RIGHT" value="1"/>
+ </field>
+ <field name="Render Cache Read Write Mode" start="8" end="8" type="uint">
+ <value name="WRITE_ONLY" value="0"/>
+ <value name="READ_WRITE" value="1"/>
+ </field>
+ <field name="Media Boundary Pixel Mode" start="6" end="7" type="uint">
+ <value name="NORMAL_MODE" value="0"/>
+ <value name="PROGRESSIVE_FRAME" value="2"/>
+ <value name="INTERLACED_FRAME" value="3"/>
+ </field>
+ <field name="Cube Face Enables" start="0" end="5" type="uint"/>
+ <field name="Surface Base Address" start="32" end="63" type="address"/>
+ <field name="Height" start="83" end="95" type="uint"/>
+ <field name="Width" start="70" end="82" type="uint"/>
+ <field name="MIP Count / LOD" start="66" end="69" type="uint"/>
+ <field name="Depth" start="117" end="127" type="uint"/>
+ <field name="Surface Pitch" start="99" end="115" type="uint"/>
+ <field name="Tiled Surface" start="97" end="97" type="uint"/>
+ <field name="Tile Walk" start="96" end="96" type="uint">
+ <value name="TILEWALK_XMAJOR" value="0"/>
+ <value name="TILEWALK_YMAJOR" value="1"/>
+ </field>
+ <field name="Surface Min LOD" start="156" end="159" type="uint"/>
+ <field name="Minimum Array Element" start="145" end="155" type="uint"/>
+ <field name="Render Target View Extent" start="136" end="144" type="uint"/>
+ <field name="X Offset" start="185" end="191" type="offset"/>
+ <field name="Y Offset" start="180" end="183" type="offset"/>
+ </struct>
+</genxml>