aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* pipe-loader: drop unnecessary xmlpool_options_hEric Engestrom2019-10-311-2/+2
| | | | | | | idep_xmlconfig already covers that Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* radv: drop unnecessary xmlpool_options_hEric Engestrom2019-10-311-1/+1
| | | | | | | idep_xmlconfig already covers that Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* anv: add missing xmlconfig headers dependencyEric Engestrom2019-10-311-0/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* meson: split out idep_xmlconfig_headers from idep_xmlconfigEric Engestrom2019-10-311-2/+5
| | | | | | | A bunch of components need the former but not the latter. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* pipe-loader: Build kmsro loader for with all kmsro targetsAlyssa Rosenzweig2019-10-311-1/+10
| | | | | | | | | | | | | | | Build failure reported by i965 CI, triggered by building dynamic pipeloaders with kmsro drivers (besides 'frost). At this point, there's no reason to actually do that -- mesa CI didn't mind -- but let's not break the build. v2: Simplify script. Add extra dependencies for v3d. Fixes: afb0d08cb0f ("pipe-loader: Default to kmsro if probe fails") Signed-off-by: Alyssa Rosenzweig <[email protected]> Reported-by: Clayton Craft <[email protected]> Tested-by: Clayton Craft <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]>
* zink: heap-allocate samplers objectsErik Faye-Lund2019-10-311-7/+14
| | | | | | | | | | VkSampler is 64-bit even on 32-bit systems, so casting it to a pointer is a bad idea there. So let's heap-allocate the sampler-object instead. Signed-off-by: Erik Faye-Lund <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2017 Reviewed-by: Witold Baryluk <[email protected]> Tested-by: Witold Baryluk <[email protected]>
* anv: Zero released anv_bo structsJason Ekstrand2019-10-311-1/+12
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use a bitset for tracking residencyJason Ekstrand2019-10-312-79/+87
| | | | | | | | | Now that we can conveniently map between GEM handles and struct anv_bo pointers, we can use a simple bitset for residency tracking instead of the complex hash set. This shaves about 3% off of a CPU-limited example running with the Dawn WebGPU implementation. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Set the batch allocator for compute pipelinesJason Ekstrand2019-10-311-2/+5
| | | | | | | Otherwise relocations just up and crash. Fixes: a3153162a9b "anv: Delay allocation of relocation lists" Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Add a device parameter to anv_execbuf_add_boJason Ekstrand2019-10-311-19/+32
| | | | | | | We're about to start needing to lookup BO pointers by GEM handle so we need access to the device. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Drop anv_bo_init and anv_bo_init_newJason Ekstrand2019-10-313-49/+35
| | | | | | | BOs are now only ever allocated through the BO cache so there's no need to have these exposed. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Allocate misc BOs from the cacheJason Ekstrand2019-10-318-63/+52
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Allocate scratch BOs from the cacheJason Ekstrand2019-10-312-41/+18
| | | | | | | | While we're here, we get rid of the locking and use a lock-free algorithm. The chances of spilling contention are low and this is actually a bit simpler in some ways. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Allocate batch and fence buffers from the cacheJason Ekstrand2019-10-315-200/+125
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* util: Add a free list structure for use with util_sparse_arrayJason Ekstrand2019-10-312-0/+137
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Allocate descriptor buffers from the BO cacheJason Ekstrand2019-10-313-36/+14
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Set more flags on descriptor pool buffersJason Ekstrand2019-10-311-1/+8
| | | | | | | the ASYNC flag, in particular, has the potential to help performance because it means less sync tracking in the kernel. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Allocate query pool BOs from the cacheJason Ekstrand2019-10-312-26/+16
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use the query_slot helper in vkResetQueryPoolEXTJason Ekstrand2019-10-311-1/+1
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Allocate block pool BOs from the cacheJason Ekstrand2019-10-312-48/+34
| | | | | | | This commit switches block pools over to being allocated from the BO cache rather than being allocated manually by the block pool. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/tests: Initialize the BO cache and device mutexJason Ekstrand2019-10-316-0/+8
| | | | | | | We're about to start depending on the BO cache in the state and block pools so we need them properly initialized for the tests to work. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/tests: Zero-initialize instancesJason Ekstrand2019-10-316-6/+14
| | | | | | | | Some of the tests were actually relying on some of those uninitialized bits to be non-zero. In particular, a couple want use_softpin = true. Cc: [email protected] Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Choose BO flags internally in anv_block_poolJason Ekstrand2019-10-319-76/+70
| | | | | | | All block pools are allocated with the same flags. There's no good reason why it needs to be configurable. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Rework the internal BO allocation APIJason Ekstrand2019-10-316-102/+217
| | | | | | | | | | | | | | | | | | | | This makes a number of changes to the current API: 1. Everything is renamed to anv_device_* instead of anv_bo_cache_* because the BO cache is soon going to be the sole BO allocation path and not some special case to make import/export work. 2. Drop the cache parameter. It's totally redundant with the device and just annoying to keep typing. 3. Rework flags so that they go the convenient direction for usage in ANV rather than whichever awkward way the i915 specified it to maintain backwards compatibility. This also gives us the opportunity to set some defaults. 4. Add flags for mapping and coherency. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use anv_block_pool_foreach_bo in get_bo_from_poolJason Ekstrand2019-10-311-6/+5
| | | | | | While we're at it, use gen_48b_address(). Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Rework anv_block_pool_expand_rangeJason Ekstrand2019-10-312-103/+76
| | | | | | | | | | | | | | | | | | | The growing algorithms for the softpin case and the userptr version are almost entirely different. Having this weird join doesn't make the code more comprehensible. This rework does a few things: 1. Move the comment about 48-bit addresses to anv_device_init where we actually unset the EXEC_OBJECT_SUPPORTS_48B_ADDRESS flag. 2. Separate the paths in anv_block_pool_expand_range so it's easier to see what happens in the two different cases. 3. Use the anv_block_poo::bos array for storing all allocated BOs in both paths rather than using the cleanup list in both paths. This lets us make the cleanups array only used for mmaps of the memfd for the userptr case. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Fix a potential BO handle leakJason Ekstrand2019-10-311-1/+3
| | | | | Fixes: 731c4adcf9b "anv/allocator: Add support for non-userptr" Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Handle state pool relocations using "wrapper" BOsJason Ekstrand2019-10-313-14/+56
| | | | | | | | | | Instead of depending on a mutable BO in the state pool for handling growing state pools, add a concept of "wrapper" BOs which just wrap an actual BO. This way, the wrapper can exist once for all of time and we can put it in relocation lists even if the actual BO it references gets swapped out. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Replace ANV_BO_EXTERNAL with anv_bo::is_externalJason Ekstrand2019-10-316-20/+22
| | | | | | | | We're not THAT strapped for space that we can't burn one extra bit for a boolean. If we're really worried about it, we can always shrink the flags field to 16 bits because the kernel only uses 7 currently. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Inline anv_block_pool_get_boJason Ekstrand2019-10-311-27/+13
| | | | | | | It has exactly one caller and we're about to change some of the dynamics which would make this confusing as a separate function. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Declare the bo in the anv_block_pool_foreach_bo loopJason Ekstrand2019-10-313-3/+2
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Stop storing the GEM handle in anv_reloc_list_addJason Ekstrand2019-10-311-1/+1
| | | | | | | | We have to go through and rewrite them all anyway so it doesn't do us any good to put them in the list in anv_reloc_list_add. Also, for state pools the handles are likely wrong by the time vkQueueSubmit is called. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Fix a relocation race conditionJason Ekstrand2019-10-314-12/+25
| | | | | | | | | | | | | | Previously, we would read the offset from the BO in anv_reloc_list_add to generate the presumed offset and then again in the caller to compute the 64-bit address to write into the buffer. However, if the offset somehow changed between these two points, the presumed offset would no longer match the written offset. This is unlikely to actually ever be a problem in practice because the presumed offset gets recorded first and so if the written address is wrong then the presumed offset is almost certainly wrong and the relocation will trigger. However, it's much safer to simply have anv_reloc_list_add return the 64-bit address. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use a util_sparse_array for the GEM handle -> BO mapJason Ekstrand2019-10-312-90/+36
| | | | | | | | This lets us do less allocation because the anv_bo's are now embedded in the sparse array and it also allows lock-free translation from GEM handle to BO which will be useful in future commits. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Move refcount to anv_boJason Ekstrand2019-10-312-61/+50
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* util: Add a util_sparse_array data structureJason Ekstrand2019-10-316-0/+399
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* mesa: enable msaa in clear_with_quad if neededPierre-Eric Pelloux-Prayer2019-10-311-0/+1
| | | | | | | | | | | If the DrawBuffer sample count is > 1 and msaa is enabled we must also enable msaa when clearing it. Fixes: ea5b7de138b ("radeonsi: make gl_SampleMaskIn = 0x1 when MSAA is disabled") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1991 Reviewed-by: Marek Olšák <[email protected]> Tested-by: Witold Baryluk <[email protected]>
* intel/perf: fix Android buildLionel Landwerlin2019-10-311-1/+2
| | | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: 15b7b56eb2fb ("intel/perf: add TGL support") Reviewed-by: Eric Engestrom <[email protected]> Reviewed-By: Tapani Pälli <[email protected]>
* gitlab-ci: Disable lima jobsTomeu Vizoso2019-10-311-2/+2
| | | | | | | The runner that submits jobs there is down and will turn some time to get fixed. Disable them for now to keep the CI green. Signed-off-by: Tomeu Vizoso <[email protected]>
* radv: Fix disk_cache_get size argument.Bas Nieuwenhuizen2019-10-311-2/+2
| | | | | | | Got some int->pointer warnings and 20 is not a valid pointer .... Fixes: 2e3a635ee69 "radv: Add an early exit in the secure compile if we already have the cache entries." Reviewed-by: Timothy Arceri <[email protected]>
* main: fix several 'may be used uninitialized' warningsAndrii Simiklit2019-10-311-0/+2
| | | | | | | | | | | | This patch fixes approximately 39 warnings in 'texcompress_etc.c' for the release configuration v2: Fixed by adding the unreachable case to the etc2_rgb8_fetch_texel ( Eric Engestrom <[email protected]> ) Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Andrii Simiklit <[email protected]>
* anv: Remove _mesa_locale_init/fini calls.Bas Nieuwenhuizen2019-10-311-3/+0
| | | | | | | | | The resulting locale is not used for Vulkan, and it is not reference counted, giving issues when multiple instances are created. CC: 19.2 19.3 <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* turnip: Remove _mesa_locale_init/fini calls.Bas Nieuwenhuizen2019-10-311-3/+0
| | | | | | | | | The resulting locale is not used for Vulkan, and it is not reference counted, giving issues when multiple instances are created. CC: 19.2 19.3 <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Remove _mesa_locale_init/fini calls.Bas Nieuwenhuizen2019-10-311-3/+0
| | | | | | | | | The resulting locale is not used for Vulkan, and it is not reference counted, giving issues when multiple instances are created. CC: 19.2 19.3 <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radeonsi: tell the shader disk cache what IR is usedPierre-Eric Pelloux-Prayer2019-10-311-7/+10
| | | | | | | | | | | | | | | Until 8bef4df196fbb the IR (TGSI or NIR) was used in disk_cache driver_flags. This commit restores this features to avoid crashing when switching from one IR to the other. As radeonsi's default is TGSI, I used "driver_flags & 0x8000000 = 0" for TGSI to keep the same driver_flags. Fixes: 8bef4df196f ("radeonsi: add si_debug_options for convenient adding/removing of options") Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* intel/perf: add TGL supportLionel Landwerlin2019-10-314-0/+8611
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* android: Add panfrost support to build scriptsRobert Foss2019-10-3112-4/+364
| | | | | | | | | | | | Currently the Android build system doesn't expose the panfrost driver. This patch enables the panfrost driver to be build on for the Android platform. Signed-off-by: Robert Foss <[email protected]> Reviewed-By: Rohan Garg <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* nir: Build nir_lower_point_size.c in libmesa_nirRobert Foss2019-10-311-0/+1
| | | | | | | | | | nir_lower_point_size.c was not build into the libmesa_nir library for non-meson builds. However it was included in the meson build. This patch fixes that. Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* v3d: rename vertex shader key (num)_fs_inputs fieldsIago Toral Quiroga2019-10-315-23/+24
| | | | | | | | | | | | Until now this made sense because we always paired vertex shaders with fragment shaders, but as soon as we implement geometry and tessellation shaders that will no longer be the case, so rename this to (num_)used_outputs. v2: Use 'used_outputs' instead of ns_outputs, which is more explicit (Eric). Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* android: aco: fix Lower to CSSAMauro Rossi2019-10-311-0/+1
| | | | | | | | | | Fixes the following building error: external/mesa/src/amd/compiler/aco_spill.cpp:1768: error: undefined reference to 'aco::lower_to_cssa(aco::Program*, aco::live&, radv_nir_compiler_options const*)' Fixes: 0b8216b ("aco: Lower to CSSA") Signed-off-by: Mauro Rossi <[email protected]>