aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* nir: Add some docs to the metadata typesJason Ekstrand2020-05-141-0/+51
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5028>
* freedreno: Fix attempts to push UBO contents past the constlen on pre-a6xx.Eric Anholt2020-05-141-0/+6
| | | | | | | | The binning variant likely won't have any UBO load code in it, so we were writing past constlen (and sometimes asserting about it) when loading more than one ubo block. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5027>
* panfrost: Fix background showing when using discardIcecream952020-05-141-1/+7
| | | | | | | | | | | | This fixes problems in a number of games, including SuperTuxKart, OpenMW and RVGL. v2: Use MALI_READS_ZS | 0x20 instead of MALI_WRITES_Z to match with the blob. Keep using 0x400 | 0x20 when depth is disabled. Closes: #2620 Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5001>
* anv: Translate relative timeout to absolute when calling anv_timelines_waitDanylo Piliaiev2020-05-141-1/+1
| | | | | | | Fixes: 34f32a6d6648073e2fda3fb78377124fb32bb288 Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5025>
* anv: Set MOCS in 3DSTATE_CONSTANT_* on Gen9+Jason Ekstrand2020-05-141-1/+15
| | | | | | | | While we're here, we add a nice detailed comment about why always assuming internal is ok. Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5022>
* anv: Set 3DSTATE_VF_INSTANCING on the SVGS elementJason Ekstrand2020-05-141-0/+6
| | | | | | | | It probably doesn't matter because that buffer should have a stride of zero. However, it still seems like a good idea just to be safe. Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5022>
* freedreno/a6xx: Use LDC for UBO loads.Eric Anholt2020-05-146-54/+65
| | | | | | | | | | | | It saves addressing math, but may cause multiple loads to be done and bcseled due to NIR not giving us good address alignment information currently. I don't have any workloads I know of using non-const-uploaded UBOs, so I don't have perf numbers for it This makes us match the GLES blob's behavior, and turnip (other than being bindful). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
* freedreno: Trim num_ubos to just the ones we haven't lowered to constbuf.Eric Anholt2020-05-142-22/+29
| | | | | | | | | With the upcoming LDC usage in the GL driver, we don't want to be uploading descriptors for every UBO when they aren't actually in use. Trimming NIR's num_ubos will avoid that, and cleans up num_ubo handling elsewhere right now. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
* freedreno/ir3: Move i/o offset lowering after analyze_ubo_ranges.Eric Anholt2020-05-142-14/+12
| | | | | | | | I found that when moving more UBOs to load_ubo_ir3, analyze_ubo_ranges would move things back in a broken way. We can just run this pass later and drop the _ir3 path. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
* freedreno/ir3: Leave the cursor alone during ir3_nir_try_propagate_bit_shift.Eric Anholt2020-05-141-4/+2
| | | | | | | Otherwise, we might end up inserting the nir_intrinsic_load_ubo_ir3() after the non-offset src's definition, leading to nir_validate() failures. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
* freedreno/ir3: Clean up a silly nir_src_for_ssa(src.ssa).Eric Anholt2020-05-141-1/+1
| | | | | | Just copy the src through. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
* nir: Include num_ubos in the printed shader (if nonzero).Eric Anholt2020-05-141-0/+2
| | | | | | I keep wanting this number for debugging shaders. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
* util/ra: Add [de]serialization supportJason Ekstrand2020-05-132-0/+69
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
* util/vma: Add a debug print helperJason Ekstrand2020-05-132-0/+24
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
* util/vma: Add an option to configure high/low preferenceJason Ekstrand2020-05-132-19/+54
| | | | | | | | | | | | The vma_heap allocator was originally designed to prefer high addresses in order to find bugs in ANV's high address handling. However, there are cases where you might want the allocator to prefer lower addresses for some reason. This provides a configure bit for exactly this purpose. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
* util/list: Add list_foreach_entry_from_safeCaio Marcelo de Oliveira Filho2020-05-131-0/+7
| | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
* util/list: Add a list pair iteratorJason Ekstrand2020-05-131-0/+7
| | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
* anv: Implement VK_EXT_custom_border_colorIván Briano2020-05-134-31/+109
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4898>
* anv: Add a way to reserve states from a poolIván Briano2020-05-132-0/+55
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4898>
* anv: Disable B5G6R5_UNORM_PACK16Iván Briano2020-05-131-1/+1
| | | | | | | It's not a required format and it causes issues with some features. Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4898>
* anv: use the correct format on AndroidIván Briano2020-05-131-1/+1
| | | | | | | | | Per https://android.googlesource.com/platform/frameworks/native/+/master/vulkan/libvulkan/swapchain.cpp#745 the format Android requires is R5G6B5, and we have it backwards here. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4898>
* drirc: Enable glthread for PCSX2JibbityJobbity2020-05-131-0/+3
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5023>
* glthread: stop using GLenum16 to get correct GL errors for out-of-bounds enumsMarek Olšák2020-05-132-11/+8
| | | | | | | Reported by Ian Romanick. Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5016>
* radeonsi: also enable tgsi_to_nir caching for compute shadersMarek Olšák2020-05-131-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4993>
* radeonsi: Enable tgsi to nir disk cacheAxel Davy2020-05-131-1/+1
| | | | | | | | Enable the tgsi to nir cache for radeonsi. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4993>
* st/nine: Enable ttn cacheAxel Davy2020-05-131-1/+1
| | | | | | | | | | A trace of a Hat in Time, which builds thousands of shaders takes 339 seconds to run the second time without this patch, and 41 seconds with it (basically there is no more loading times). Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4993>
* ttn: Implement disk cacheAxel Davy2020-05-131-2/+82
| | | | | | | | ttn is slow, let's disk cache it. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4993>
* ttn: Add new allow_disk_cache parameterAxel Davy2020-05-1314-17/+21
| | | | | | | | | | For now this parameter doesn't do anything. It means the implementation is allowed to use a cache on disk. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4993>
* freedreno/a6xx: Fix UBWC mipmapping height alignment.Eric Anholt2020-05-132-6/+137
| | | | | | | After fixing the power of two sizing, pitches worked, but 1-pixel high and unaligned height miplevels were off. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4931>
* freedreno/a6xx: Fix UBWC mipmap sizing.Eric Anholt2020-05-132-14/+95
| | | | | | | | | The HW requires a log2 width/height of the level 0 meta_* size in the descriptors, making it pretty clear that UBWC mipmapping is all power-of-two sized. Fixes a bunch of failures in the upcoming unit UBWC layout unit tests. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4931>
* freedreno/a6xx: Fix UBWC blockheight for RG8.Eric Anholt2020-05-131-1/+4
| | | | | | | | Using texturator on a P3A at 1024x1024, RG8 has log2w/h of 6x7 instead of R16I/UI's 6x8. The other blockw/h I verified other than cpp=1 (R8/R8I/R8UI didn't use UBWC) and 32 (would need a bigger type). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4931>
* freedreno: Pull the tile_alignment lookup for a layout to a helper.Eric Anholt2020-05-131-20/+25
| | | | | | | The r8g8 case UBWC alignment will be changing in the next commit, so fdl6_get_ubwc_blockwidth needs to start paying attention to r8g8 too. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4931>
* freedreno/a6xx: Add a testcase for UBWC buffer sharing.Eric Anholt2020-05-131-4/+22
| | | | | | | These offsets are hand-computed referencing msm_media_info.h, and match our driver's current behavior. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4931>
* freedreno/a6xx: Improve layout testcase logging for UBWC fails.Eric Anholt2020-05-131-2/+2
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4931>
* freedreno/a4xx+: Increase max texture size to 16384.Eric Anholt2020-05-134-6/+10
| | | | | | | | Noticed when poking around with texture layouts and found that my big texture layout from the blob buffer overflowed. Values come from http://vulkan.gpuinfo.org for Adreno 418, 512, 630. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4931>
* nir: reset ssa-defs as non-divergent during divergence analysis instead of ↵Daniel Schürmann2020-05-131-21/+36
| | | | | | | upfront Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4062>
* nir: simplify phi handling in divergence analysisDaniel Schürmann2020-05-131-113/+116
| | | | | | | | | | This patch adds some control flow information to the state to keep track whether a loop contains divergent continue or break statements to not having to recalculate this property for every phi. Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4062>
* nir: rework phi handling in divergence analysisDaniel Schürmann2020-05-131-173/+214
| | | | | | | | | | | | This patch splits the visit_phi() function into three different ones according to the kind of phi (merge-node, loop-header or loop-exit) and calls them when visiting the cf_nodes. This allows to revisit loops if the loop header's phis have changed, only. Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4062>
* nir: refactor divergence analysis stateDaniel Schürmann2020-05-131-35/+37
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4062>
* nir: add nir_intrinsic_elect to divergence analysisDaniel Schürmann2020-05-131-0/+1
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4062>
* nir: Make "divergent" a property of an SSA valueJason Ekstrand2020-05-135-95/+122
| | | | | | | v2: fix usage in ACO (by Daniel Schürmann) Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4062>
* gallium: remove more "state tracker" occurencesMarek Olšák2020-05-136-13/+11
| | | | | | Trivial. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
* gallium: rename PIPE_RESOURCE_FLAG_ST_PRIV to FRONTEND_PRIVMarek Olšák2020-05-132-3/+3
| | | | | | | Acked-by: Eric Anholt <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
* gallium: change comments to remove 'state tracker'Marek Olšák2020-05-1395-183/+178
| | | | | | | Acked-by: Eric Anholt <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
* gallium: rename 'state tracker' to 'frontend'Marek Olšák2020-05-13443-162/+348
| | | | | | | Acked-by: Eric Anholt <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
* tu: Implement fallback linear staging blit for CopyImageConnor Abbott2020-05-131-24/+173
| | | | | | | | | | | Also, rewrite the format decision code so that we correctly decide when the linear fallback is needed, even if UBWC is disabled. As part of that, I also moved around some of the code to handle compressed formats to make sure that copying compressed formats with a linear staging blit works (this is now possible since we started allowing tiled compressed textures). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5007>
* tu: Add noubwc debug flag to disable UBWCConnor Abbott2020-05-133-1/+4
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5007>
* tu: Add a "scratch bo" allocation mechanismConnor Abbott2020-05-132-0/+74
| | | | | | | | | This is simpler than a full-blown memory reuse mechanism, but is good enough to make sure that repeatedly doing a copy that requires the linear staging buffer workaround won't use excessive memory or be slowed down due to repeated allocations. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5007>
* aco: improve phi affinities with p_split_vectorRhys Perry2020-05-131-0/+19
| | | | | | | | | | | | Totals from 5860 (4.59% of 127638) affected shaders: VGPRs: 460212 -> 460216 (+0.00%) CodeSize: 65554356 -> 65464816 (-0.14%) Instrs: 12655972 -> 12633578 (-0.18%) Copies: 1309994 -> 1292163 (-1.36%) Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4990>
* aco: consider affinities when creating v_mac_f32Rhys Perry2020-05-131-2/+8
| | | | | | | | | | | | Totals from 8487 (6.65% of 127638) affected shaders: CodeSize: 62061988 -> 62058020 (-0.01%); split: -0.01%, +0.01% Instrs: 11910757 -> 11885409 (-0.21%); split: -0.21%, +0.00% Copies: 1065244 -> 1040945 (-2.28%); split: -2.30%, +0.02% Branches: 349665 -> 348914 (-0.21%) Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4990>