summaryrefslogtreecommitdiffstats
path: root/src/intel
Commit message (Collapse)AuthorAgeFilesLines
* intel: move gen_decoder.* to DECODER_FILESTapani Pälli2017-03-232-3/+5
| | | | | | | | | | patch adds DECODER_FILES for libintel_common, this is so that platforms such as Android not currently using this functionality can opt out. Fixes: 7d84bb3 ("intel: Move tools/decoder.[ch] to common/gen_decoder.[ch].") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* android: fix vulkan build issues with anv_entrypointsTapani Pälli2017-03-231-6/+12
| | | | | | | | | | | | Patch fixes entrypoint generation for libmesa_anv_entrypoints that still used old style of calling generator script. Also small fixes to libmesa_vulkan_common where there was a typo in target name (vulknan) and files were generated to wrong folder. Fixes: 8211e3e6 ("anv: Generate anv_entrypoints header and code in one command") Signed-off-by: Tapani Pälli <[email protected]> Acked-by: Emil Velikov <[email protected]>
* android: rename Intel Vulkan library to match desktop oneTapani Pälli2017-03-231-2/+2
| | | | | | | | Original naming was following Vulkan HAL naming scheme for no good purpose and we need same binary name for build-id code. Signed-off-by: Tapani Pälli <[email protected]> Acked-by: Emil Velikov <[email protected]>
* anv: Remove dead prototype from entrypointsDylan Baker2017-03-221-1/+0
| | | | | | | | Spotted by Emil. v2: - Add this patch Signed-off-by: Dylan Baker <[email protected]>
* anv: use cElementTree in anv_entrypoints_gen.pyDylan Baker2017-03-221-1/+1
| | | | | | | It's written in C rather than pure python and is strictly faster, the only reason not to use it that it's classes cannot be subclassed. Signed-off-by: Dylan Baker <[email protected]>
* anv: don't use Element.get in anv_entrypoints_gen.pyDylan Baker2017-03-221-6/+7
| | | | | | | | | | | | | This has the potential to mask errors, since Element.get works like dict.get, returning None if the element isn't found. I think the reason that Element.get was used is that vulkan has one extension that isn't really an extension, and thus is missing the 'protect' field. This patch changes the behavior slightly by replacing get with explicit lookup in the Element.attrib dictionary, and using xpath to only iterate over extensions with a "protect" attribute. Signed-off-by: Dylan Baker <[email protected]>
* anv: use dict.get in anv_entrypoints_gen.pyDylan Baker2017-03-221-4/+1
| | | | | | | Instead of using an if and a check, use dict.get, which does the same thing, but more succinctly. Signed-off-by: Dylan Baker <[email protected]>
* anv: anv_entrypoints_gen.py: use reduce function.Dylan Baker2017-03-221-5/+3
| | | | | | Reduce is it's own reward. Signed-off-by: Dylan Baker <[email protected]>
* anv: anv-entrypoints_gen.py: rename hash to cal_hash.Dylan Baker2017-03-221-3/+4
| | | | | | | hash is reserved name in python, it's the interface to access an object's hash protocol. Signed-off-by: Dylan Baker <[email protected]>
* anv: Generate anv_entrypoints header and code in one commandDylan Baker2017-03-223-18/+17
| | | | | | | This produces the header and the code in one command, saving the need to call the same script twice, which parses the same XML file. Signed-off-by: Dylan Baker <[email protected]>
* anv: anv_entrypoints_gen.py: directly write files instead of pipingDylan Baker2017-03-223-18/+22
| | | | | | | | | | | | | | This changes the output to be written as a file rather than being piped. This had one critical advantage, it encapsulates the encoding. This prevents bugs where a symbol (generally unicode like © [copyright]) is printed and the system being built on doesn't have a unicode locale. v2: - Update Android.mk v3: - Don't generate both files at once - Fix Android.mk - drop --outdir, since the filename is passed in as an argument Signed-off-by: Dylan Baker <[email protected]>
* anv: convert C generation to template in anv_entrypoints_gen.pyDylan Baker2017-03-221-173/+167
| | | | | | | | | This produces a file that is identical except for whitespace, there is a table that has 8 columns in the original and is easy to do with prints, but is ugly using mako, so it doesn't have columns; the data is not inherently tabular. Signed-off-by: Dylan Baker <[email protected]>
* anv: convert header generation in anv_entrypoints_gen.py to makoDylan Baker2017-03-221-35/+42
| | | | | | This produces an identical file except for whitespace. Signed-off-by: Dylan Baker <[email protected]>
* anv: Update "do not edit" comments with proper filenameDylan Baker2017-03-221-5/+7
| | | | | | | | | | | | | | This does two things, first it updates both the .h and the .c file to have the same do not edit string. Second, it uses __file__ to ensure that even if the file is moved or renamed that the name will be correct. One thing to note is the use of '{{' and '}}' in the C template. This is to instruct python to print a literal '{' and '}' respectively, rather than treating the contents as a formatter specifier. v3: - add this patch Signed-off-by: Dylan Baker <[email protected]>
* anv: split main into two functions in anv_entrypoints_gen.pyDylan Baker2017-03-221-52/+56
| | | | | | | | This is groundwork for the next patches, it will allows porting the header and the code to mako separately, and will also allow both to be run simultaneously. Signed-off-by: Dylan Baker <[email protected]>
* anv: don't pass xmlfile via stdin anv_entrypoints_gen.pyDylan Baker2017-03-223-23/+16
| | | | | | | | | It's slow, and has the potential for encoding issues. v2: - pass xml file location via argument - update Android.mk Signed-off-by: Dylan Baker <[email protected]>
* anv: make constants capitals in anv_entrypoints_gen.pyDylan Baker2017-03-221-19/+19
| | | | | | Again, it's standard python style. Signed-off-by: Dylan Baker <[email protected]>
* anv: Use python style in anv_entrypoints_gen.pyDylan Baker2017-03-221-31/+36
| | | | | | | | | | | | | | | | | | These are all fairly small cleanups/tweaks that don't really deserve their own patch. - Prefer comprehensions to map() and filter(), since they're faster - replace unused variables with _ - Use 4 spaces of indent - drop semicolons from the end of lines - Don't use parens around if conditions - don't put spaces around brackets - don't import modules as caps (ET -> et) - Use docstrings instead of comments v2: - Replace comprehensions with multiplication Signed-off-by: Dylan Baker <[email protected]>
* anv: anv_entrypoints_gen.py: use a main functionDylan Baker2017-03-221-225/+233
| | | | | | This is just good practice. Signed-off-by: Dylan Baker <[email protected]>
* intel/compiler: consistently use ifndef guards over pragma onceEmil Velikov2017-03-228-5/+31
| | | | | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Lionel Landwerlin <[email protected]> Acked-by: Vedran Miletić <[email protected]> Acked-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* intel/common: consistently use ifndef guards over pragma onceEmil Velikov2017-03-221-1/+5
| | | | | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Lionel Landwerlin <[email protected]> Acked-by: Vedran Miletić <[email protected]> Acked-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* i965: make brw_setup_image_uniform_values staticEmil Velikov2017-03-221-5/+0
| | | | | | | | | | Used only internally. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Lionel Landwerlin <[email protected]> Acked-by: Vedran Miletić <[email protected]> Acked-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* anv/device: Move push descriptor query handlingJason Ekstrand2017-03-221-8/+8
| | | | | | | The query is a properties query so it needs to be handled in GetPhysicalDeviceProperties2, not GetPhysicalDeviceFeatures2. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/image: Return early when unbinding an imageJason Ekstrand2017-03-221-4/+5
| | | | | | | | Found by inspection. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Cc: "17.0 13.0" <[email protected]>
* anv: android: remove unused include/vulkan includeEmil Velikov2017-03-221-1/+0
| | | | | | | Spotted while skimming through similar hunks for the Autotools build. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* anv: automake: use the local headers over any system provided onesEmil Velikov2017-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | At the moment, we would honour any system headers - vulkan_intel.h in particular over the ones in-tree. Thus, if one does incremental build of mesa, without the vulkan.h already installed (or at least not in the same directory as vulkan_intel.h) the build will fail. In the future we might want to upstream the vulkan_intel.h within vulkan.h or use other ways to make vulkan_intel.h obsolete. In either case, the more robust thing is to rely on our own copy. v2: Move AM_CPPFLAGS just above LIBDRM_CFLAGS (Grazvydas, Jason) Tested-by: Grazvydas Ignotas <[email protected]> Fixes: ee8044fd "intel/vulkan: Get rid of recursive make" Suggested-by: Jason Ekstrand <[email protected]> Reported-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* isl: Refactor row pitch calculation (v2)Chad Versace2017-03-211-33/+89
| | | | | | | | | | | | | | | | | The calculations of row_pitch, the row pitch's alignment, surface size, and base_alignment were mixed together. This patch moves the calculation of row_pitch and its alignment to occur before the calculation of surface_size and base_alignment. This simplifies a follow-on patch that adds a new member, 'row_pitch', to struct isl_surf_init_info. v2: - Also extract the row pitch alignment. - More helper functions that will later help validate the row pitch. Reviewed-by: Nanley Chery <[email protected]> (v2) Reviewed-by: Jason Ekstrand <[email protected]> (v2)
* isl: Drop misplaced comment about paddingChad Versace2017-03-211-46/+0
| | | | | | | | | | | | | isl has a giant comment that explains the hardware's padding requirements. (Hint: Cache lines and page faults). But the comment is in the wrong place, in isl_calc_linear_row_pitch(), which is unrelated to padding. The important parts of that comment were copied to isl_apply_surface_padding() long ago. So drop the misplaced comment. Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Drop AUB_TRACE_* stuff.Kenneth Graunke2017-03-212-8/+5
| | | | | | | | | | | | This was used for aubdumping (deleted a while ago) and INTEL_DEBUG=bat decoding (deleted recently). While we're changing parameters, delete the wrapper macro and make the actual function brw_state_batch instead of __brw_state_batch. This subsumes a patch by Emil Velikov to drop this from BLORP. Reviewed-by: Emil Velikov <[email protected]>
* intel: Move tools/decoder.[ch] to common/gen_decoder.[ch].Kenneth Graunke2017-03-215-7/+7
| | | | | | | This way they become part of libintel_common.la so I can use them in the i965 driver. Reviewed-by: Emil Velikov <[email protected]>
* intel: Add a INTEL_DEBUG=color option.Kenneth Graunke2017-03-212-0/+2
| | | | | | | This will be used for color output in debug messages. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* aubinator: Move the guts of decode_group() to decoder.c.Kenneth Graunke2017-03-203-31/+42
| | | | | | This lets us use it outside of the aubinator binary itself. Reviewed-by: Lionel Landwerlin <[email protected]>
* aubinator: Drop spec parameter to decode_group().Kenneth Graunke2017-03-201-13/+12
| | | | | | No longer necessary - the iterator gets it from the group. Reviewed-by: Lionel Landwerlin <[email protected]>
* aubinator: Make the iterator store a pointer to structure descriptions.Kenneth Graunke2017-03-203-27/+11
| | | | | | | | | | | When the iterator encounters a structure field, it now looks up the gen_group for that structure definition and saves a pointer to it. This lets us drop a lot of ridiculous code in the caller, which looked at item->value (<struct NAME dword>), strtok'd the structure name back out, and looked it up itself. Reviewed-by: Lionel Landwerlin <[email protected]>
* aubinator: Track the current field's starting dword offset.Kenneth Graunke2017-03-203-26/+18
| | | | | | | | | | The iterator code already computed this value, then we stored it in the structure name, strtok'd it back out, and also manually computed it when printing dword headers. Just put the value in the struct and use it. Way simpler. Reviewed-by: Lionel Landwerlin <[email protected]>
* aubinator: Drop decode_structure() helper.Kenneth Graunke2017-03-201-16/+9
| | | | | | | It made more sense when decode_group() took a bunch of extra options, but now that there's only one...we may as well pass 0 and call it a day. Reviewed-by: Lionel Landwerlin <[email protected]>
* aubinator: Drop unused print_dword_headers flag.Kenneth Graunke2017-03-201-5/+4
| | | | | | | | | I added this flag in 65a9d5eabb05e4925c1c9a17836cad57304210d6 but it was completely unused. Both callers appear to have printed dword headers, so we can just drop the flag and continue doing it unconditionally. Reviewed-by: Lionel Landwerlin <[email protected]>
* aubinator: Store a pointer from gen_group back to gen_spec.Kenneth Graunke2017-03-202-0/+2
| | | | | | | When decoding a structure field within a group, we may want to look up that structure type. Having a gen_spec pointer makes it easy to do so. Reviewed-by: Lionel Landwerlin <[email protected]>
* aubinator: Store enum textual name in iter->value.Kenneth Graunke2017-03-203-19/+15
| | | | | | | | | | | | | | | gen_field_iterator_next() produces a string representing the value of the field. For enum values, it also produced a separate "description" string containing the textual name of the enum. The only caller of this function combines the two, printing enums as "<numeric value> (<texture enum name>)". We may as well just store that in item->value directly, eliminating the description field, and a layer of wrapping. v2: Use non-overlapping source and destination strings in snprintf. Reviewed-by: Lionel Landwerlin <[email protected]>
* intel: Correct the BDW surface state sizeNanley Chery2017-03-201-1/+1
| | | | | | | | | | | The PRMs state that this packet is 16 DWORDS long. Ensure that the last three DWORDS are zeroed as required by the hardware when allocating a null surface state. Cc: <[email protected]> Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* anv/genX: Solve the vkCreateGraphicsPipelines crashXu,Randy2017-03-201-2/+2
| | | | | | | | | | | | The crash is due to NULL pColorBlendState, which is legal if the pipeline has rasterization disabled or if the subpass of the render pass the pipeline is created against does not use any color attachments. Test: Sample subpasses from LunarG can run without crash Signed-off-by: Xu,Randy <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "17.0 13.0" <[email protected]>
* genxml: Make MI_STORE_DATA_IMM have a single 64-bit data fieldJason Ekstrand2017-03-176-12/+6
| | | | | | This is way more convenient than having two separate dword fields. Reviewed-By: Lionel Landwerlin <[email protected]>
* anv: Turn on inherited queriesJason Ekstrand2017-03-171-1/+1
| | | | | | | It all just works since it's just a hardware register so we might as well turn it on. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Implement pipeline statistics queriesIlia Mirkin2017-03-174-12/+226
| | | | | | | | In the end, pipeline statistics queries look a lot like occlusion queries only with between 1 and 11 begin/end pairs being generated instead of just the one. Reviewed-By: Lionel Landwerlin <[email protected]>
* anv: Disable VF statistics for blorp and SOL memcpyJason Ekstrand2017-03-174-3/+18
| | | | | | | | | | | | | | | | | | | In order to get accurate statistics, we need to disable statistics for blits, clears, and the surface state memcpy at the top of each secondary command buffer. There are two possible approaches to this: 1) Disable before the blit/memcpy and re-enable afterwards 2) Move emitting 3DSTATE_VF_STATISTICS from initialization and make it part of pipeline state and then just disabale statistics before blits and memcpy operations. Emitting 3DSTATE_VF_STATISTICS should be fairly cheap so it doesn't really matter which path we take. We choose the second option as it's more consistent with the way the rest of the statistics are enabled and disabled. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/pipeline: Enable clipper statisticsJason Ekstrand2017-03-171-0/+1
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* genxml: s/Clipper Statistics Enable/Statistics Enable/Jason Ekstrand2017-03-175-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 <[email protected]>
* anv/query: Rework store_query_resultJason Ekstrand2017-03-171-15/+24
| | | | | | | | The new version is a nice GPU parallel to cpu_write_query_result and it nicely handles things like dealing with 32 vs. 64-bit offsets in the destination buffer. Reviewed-By: Lionel Landwerlin <[email protected]>
* anv/query: Break GPU query calculation into a helperJason Ekstrand2017-03-171-12/+18
| | | | Reviewed-By: Lionel Landwerlin <[email protected]>
* genxml: Add pipeline statistics registers on gen7+Jason Ekstrand2017-03-174-0/+176
| | | | Reviewed-By: Lionel Landwerlin <[email protected]>