summaryrefslogtreecommitdiff
path: root/src/intel/genxml
AgeCommit message (Collapse)AuthorFilesLines
2017-05-03genxml: Add alias for MOCS.Rafael Antognolli4-0/+4
Use an alias, so we can set the same value as the #define's. v3: - Call it "SO Buffer MOCS" to follow the most common naming scheme. - Add alias for gen7 and gen75 too (Ken). Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-05-03genxml: Add missing field values to 3DSTATE_SBE.Rafael Antognolli1-1/+6
Fill out "Attribute Active Component Format" possible values. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-05-03genxml: Update xml for 3DSTATE_SF.Rafael Antognolli2-6/+16
- Normalize "Anti-Aliasing Enable" - Add "Multisample Rasterization Mode" constants - Rename "Use Point Width on Vertex" to "Vertex" - Rename "Use Point Width from State" to "State" Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-05-03genxml: Rename clip enable property.Rafael Antognolli4-4/+4
There are two variants: - Clip Enable - CLIP Enable (on gen6) Rename everything to Clip Enable. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-05-03genxml: Fill out Gen4, Gen45 and Gen5 XMLLouis-Francis Ratté-Boulianne3-1065/+2517
Add some more details to Gen4 and Gen45 and add what is needed in Gen5 XML. This commit overwrite the previous work done on Gen4 and Gen45 as it contains more instructions and fixes some mistakes. However, comments (dword boundaries) are lost in the process. v3: - Set the type of some fields, instead of prefix. Also fix the SAMPLER_BORDER_COLOR_STATE fields of gen5.xml. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2017-04-24genxml: Fix gen_pack_header.py crash when field type is invalid.Rafael Antognolli1-2/+2
Just return earlier in that case. Also set prefix to an empty string, so we don't get to use it undefined. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-04-24genxml: Make BLEND_STATE command support variable length array.Rafael Antognolli5-10/+10
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>
2017-04-24genxml: Fix python crash when no dwords are found.Rafael Antognolli1-5/+12
If the 'dwords' dict is empty, max(dwords.keys()) throws an exception. This case could happen when we have an instruction that is only an array of other structs, with variable length. v2: - Add another clause for empty dwords and make it work with python 3 (Dylan) - Set the length to 0 if dwords is empty, and do not declare dw Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-04-24genxml: Remove unused parameter.Rafael Antognolli1-2/+2
'start' parameter from Group.emit_pack_function() is useless. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-04-20genxml: Add better support for MI_MATHJason Ekstrand3-12/+195
This breaks the guts of MI_MATH (the instruction part) out into its own structure with proper named values. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed by: Iago Toral Quiroga <itoral@igalia.com>
2017-04-20genxml/pack: Allow hex values in the XMLJason Ekstrand1-1/+2
Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-04-07intel/genxml/bits: Emit per-container _length helpersJason Ekstrand1-0/+34
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-04-07intel/genxml/bits: Emit per-field _start helpersJason Ekstrand1-0/+8
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-04-07intel/genxml/bits: Pull the function emit code into a helper blockJason Ekstrand1-26/+43
The helper block is extremely general. It takes an string property name and an object that supports three methods: has_prop, iter_prop, and get_prop. This way we can easily generalize it to emit more different types of getter functions. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-04-07intel/genxml/bits: Refactor to add a container classJason Ekstrand1-20/+36
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-04-04intel: genxml: add RING_BUFFER_CTL registersLionel Landwerlin5-0/+272
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-04-04intel: genxml: add FAULT_REG registerLionel Landwerlin5-0/+206
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-04-04intel: genxml: add gen7 ERR_INT registerLionel Landwerlin2-0/+22
v2: add register to gen7.5 (Matt) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-04-04intel: genxml: add ACTHD registersLionel Landwerlin2-0/+32
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-04-04intel: genxml: add GFX_ARB_ERROR_RPT registerLionel Landwerlin5-0/+73
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-04-04intel: genxml: add INSTDONE registersLionel Landwerlin5-0/+387
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-03-31intel: genxml: compress all gen files into oneLionel Landwerlin2-6/+30
Combining all the files into a single string didn't make any difference in the size of the aubinator binary. With this change we now also embed gen4/4.5/5 descriptions, which increases the aubinator size by ~16Kb. v2 (Lionel): rebase makefiles Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-03-28genxml: New generated header genX_bits.h (v6)Chad Versace2-0/+282
genX_bits.h contains the sizes of bitfields in genxml instructions, structures, and registers. It also defines some functions to query those sizes. isl_surf_init() will use the new header to validate that requested pitches fit in their destination bitfields. What's currently in genX_bits.h: - Each CONTAINER::Field from gen*.xml that has a bitsize has a macro in genX_bits.h: #define GEN{N}_CONTAINER_Field_bits {bitsize} - For each set of macros whose name, after stripping the GEN prefix, is the same, genX_bits.h contains a query function: static inline uint32_t __attribute__((pure)) CONTAINER_Field_bits(const struct gen_device_info *devinfo); v2 (Chad Versace): - Parse the XML instead of scraping the generated gen*_pack.h headers. v3 (Dylan Baker): - Port to Mako. v4 (Jason Ekstrand): - Make the _bits functions take a gen_device_info. v5 (Chad Versace): - Fix autotools out-of-tree build. - Fix Android build. Tested with git://github.com/android-ia/manifest. - Fix macro names. They were all missing the "_bits" suffix. - Fix macros names more. Remove all double-underscores. - Unindent all generated code. (It was floating in a sea of whitespace). - Reformat header to appear human-written not machine-generated. - Sort gens from high to low. Newest gens should come first because, when we read code, we likely want to read the gen8/9 code and ignore the gen4 code. So put the gen4 code at the bottom. - Replace 'const' attributes with 'pure', because the functions now have a pointer parameter. - Add --cpp-guard flag. Used by Android. - Kill class FieldCollection. After Jason's rewrite, it was just a dict. v6 (Chad Versace): - Replace `key not in d.keys()` with `key not in d`. [for dylan] Co-authored-by: Dylan Baker <dylan@pnwbakers.com> Co-authored-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v5) Reviewed-by: Dylan Baker <dylan@pnwbakers.com> (v6)
2017-03-24genxml: Add 3DSTATE_DEPTH_BUFFER to gen5.xmlChad Versace1-0/+56
isl will use this for validating the depth buffer pitch. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-03-24genxml: Whitespace fixesJason Ekstrand5-39/+39
Some field names had extra spaces and some had places where we should have had a space but didn't. Reviewed-by: Chad Versace <chadversary@chromium.org>
2017-03-24genxml: Replace "[N]" with "N"Jason Ekstrand3-15/+15
Reviewed-by: Chad Versace <chadversary@chromium.org>
2017-03-24genxml/gen6: Remove a couple of bogus valuesJason Ekstrand1-6/+2
Reviewed-by: Chad Versace <chadversary@chromium.org>
2017-03-24genxml/gen8: Remove BLACK_LEVEL_CORRECTION_STATEJason Ekstrand1-6/+0
We've never used it, it only exists on gen8, and the name of the struct contains piles of bad characters. Reviewed-by: Chad Versace <chadversary@chromium.org>
2017-03-24genxml: Rename two MCS fields to Auxiliary Surface on gen7Jason Ekstrand2-4/+4
This makes gen7 more consistent with gen8+ Reviewed-by: Chad Versace <chadversary@chromium.org>
2017-03-17genxml: Make MI_STORE_DATA_IMM have a single 64-bit data fieldJason Ekstrand5-10/+5
This is way more convenient than having two separate dword fields. Reviewed-By: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-03-17genxml: s/Clipper Statistics Enable/Statistics Enable/Jason Ekstrand5-5/+5
It's in 3DSTATE_CLIP, so it doesn't really need the extra detail. This matches what we do for VS, FS, etc. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-03-17genxml: Add pipeline statistics registers on gen7+Jason Ekstrand4-0/+176
Reviewed-By: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-03-16genxml: Add XML version tagsJason Ekstrand8-0/+8
There's not much point to having them or not having them but this reduces some pointless diff from the version we can auto-generate Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-03-13intel: genxml: prevent missing ; with address fields dwordsLionel Landwerlin1-28/+26
Before this change, the generator could print this kind of things : const uint32_t v0 = __gen_uint(values->ValidBit, 0, 0) | __gen_uint(values->FaultType, 1, 2) | __gen_uint(values->SRCIDofFault, 3, 10) | __gen_uint(values->GTTSEL, 11, 1) | dw[0] = __gen_combine_address(data, &dw[0], values->VirtualAddressofFault, v0); This change fix the trailing '|'. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-03-13intel: genxml: add script to generate gzipped genxmlLionel Landwerlin1-0/+47
v2 (from Dylan): Add main function Add missing Copyright Use print_function v3: Add actually license (Dylan) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-03-10genxml: remove shebang from gen_pack_header.pyEmil Velikov1-1/+0
Analogous to earlier commit(s). Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-03-03genxml: Fill out Gen4 and G45 XML.Kenneth Graunke2-1/+2232
This is a work in progress - some things may still need fixing. But it should be in pretty decent shape. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2017-02-21genxml: Make MI_STORE_DATA_IMM more consistentJason Ekstrand3-3/+3
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
2017-02-14genxml: Add the CACHE_MODE_0 register on gen9Jason Ekstrand1-0/+28
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-02-14genxml: Add the CACHE_MODE_1 register on gen8Jason Ekstrand1-0/+21
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-01-10genxml: Rename 3DSTATE_HS::Enable to "Function Enable".Kenneth Graunke4-4/+4
"Function Enable" is what the other stages use. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-12-14genxml: Make Gen8 3DSTATE_DS SIMD8 enable work like Gen9+.Kenneth Graunke1-1/+4
This will let us avoid ifdefs. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-12-14genxml: Rename "DS Function Enable" to "Function Enable".Kenneth Graunke2-2/+2
This makes Gen7/7.5 match Gen8-9. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-12-06genxml/gen9: Change the default of MI_SEMAPHORE_WAIT::RegisterPoleModeJason Ekstrand1-1/+1
We would really like it to be false as that's what you get on hardware that doesn't have RegisterPoleMode (Sky Lake for example). While we're at it, we change it to a boolean. This fixes dEQP-VK.synchronization.smoke.events on Broxton. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "13.0" <mesa-stable@lists.freedesktop.org>
2016-11-29intel/genxml: Fix ksp for INTERFACE_DESCRIPTOR_DATAKristian H. Kristensen2-4/+2
This one was split across two dwords as "Kernel Start Pointer" and "Kernel Start Pointer High", which looks like it works when the driver only accesses "Kernel Start Pointer". This breaks, of course, with BO offsets > 4G. Signed-off-by: Kristian H. Kristensen <hoegsberg@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-29intel/genxml: Use enum 3D_Logic_Op_Function where applicableKristian H. Kristensen5-56/+62
Signed-off-by: Kristian H. Kristensen <hoegsberg@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-29intel/genxml: Use blend function and factor enums where applicableKristian H. Kristensen5-130/+124
Signed-off-by: Kristian H. Kristensen <hoegsberg@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-29intel/genxml: Use enum 3D_Vertex_Component_Control where applicableKristian H. Kristensen5-20/+20
Signed-off-by: Kristian H. Kristensen <hoegsberg@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-29intel/genxml: Use enum 3D_Stencil_Operation where applicableKristian H. Kristensen5-84/+63
Signed-off-by: Kristian H. Kristensen <hoegsberg@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-11-29intel/genxml: Use enum SURFACE_FORMAT where applicableKristian H. Kristensen5-10/+10
Signed-off-by: Kristian H. Kristensen <hoegsberg@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>