aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/fdl
Commit message (Collapse)AuthorAgeFilesLines
* freedreno: Fix resource layout dump loop.Eric Anholt2020-05-141-1/+1
| | | | | | | Apparently I've never dumped a fully populated slices array, so the 0-init always terminated the loop. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5020>
* 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-131-1/+1
| | | | | | | | 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>
* freedreno/fdl: Align after dividing by block sizeKristian H. Kristensen2020-05-061-13/+9
| | | | | | | | | For compressed formats, we need to align the number of blocks, not the logical number of pixels in the texture. Only compressed formats have block width/height > 1, so we can just unconditionally multiply the alignment by the block width/height. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4868>
* freedreno: Make the slice pitch be bytes, not pixels.Eric Anholt2020-04-234-11/+8
| | | | | | | | | | | Back in a2xx, HW pitches were in pixels, so storing that was reasonable. Ever since then, the HW wants pitches in bytes, and we have only one instance of using pitch in pixels in the code (a3xx sysmem path). Flip things around so that only a2xx has to worry about the cpp for looking at pitches. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4558>
* freedreno: Introduce a "cpp_shift" value for cpp divs/muls.Eric Anholt2020-04-233-0/+16
| | | | | | | This only converts part of the driver to use it, leaving the rest to the following commit (which inspired this one). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4558>
* freedreno/a6xx: Set a level's pitch based on minified level0 pitch, not width0.Eric Anholt2020-04-072-13/+274
| | | | | | | | | | | | Found from piglit fbo-generatemipmaps failures, then tracked down with the texturator test. The piece that really revealed things was finding that 1024x1 linear RGBA8 on the older blob drivers would have a pitch of 5120 instead of 4096, and the following levels minified that pitch. Fixes ~124 piglit tests (~8.5% of piglit failures) on cheza. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3987> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3987>
* freedreno: Add the outline of a test for a6xx texture layout.Eric Anholt2020-04-072-0/+243
| | | | | | | | | | Trying to work out texture layout by remembering what things looked like in texturator is hard. Instead, let's use texture layouts from tracing the blob as a source of truth to make sure that we pick the same layouts they do (and don't break known-good ones). More testcases will be added as I fix layout bugs. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3987>
* freedreno/a6xx: Drop the "alignment" layout temporary.Eric Anholt2020-04-071-10/+3
| | | | | | | It's just 1 for !3d, which means that the align we're doing in that case is pointless. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3987>
* freedreno/a6xx: Remove the "aligned_height" temporary.Eric Anholt2020-04-071-5/+3
| | | | | | Now that we're not incrementally minifying height, we can just modify it. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3987>
* freedreno/a6xx: Sink the per-level size temps inside the loop.Eric Anholt2020-04-071-17/+5
| | | | | | | u_minify(n, 1) is no cheaper than u_minify(n, level), and this makes the logic a lot simpler to follow. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3987>
* freedreno/fdl: Add base_alignConnor Abbott2020-03-312-13/+21
| | | | | | | | | | Tell users what the base address of the image needs to be aligned to. These values are based on experimentation via passing an offset to vkBindImageMemory with turnip and seeing if tests still pass. Note that r8g8 is also special in this regard, however it actually has an increased alignment (in bytes). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4357>
* meson: inline `inc_common`Eric Engestrom2020-03-281-1/+1
| | | | | | | | | Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* freedreno: Allow UBWC on textures with multiple mipmap levels.Eric Anholt2020-02-043-18/+19
| | | | | | | | | | | | This is a backport of Jonathan Marek's UBWC work on turnip to GL. Performance highlights from our trace set (320 frames sampled) traces/glmark2/texture-texture-filter=mipmap.rdc: +9.1% +/- 2.2% traces/android/trex.rdc: +8.7% +/- 0.4% traces/glmark2/desktop-effect=shadow:windows=4.rdc: +4.2% +/- 2.5% Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3059> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3059>
* freedreno: Rename the UBWC layer size field and store it as bytes.Eric Anholt2020-02-043-10/+9
| | | | | | | This makes the field description match its usage in the code, matches tu's usage of the field, and avoids storing values in surprising units. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3059>
* freedreno: Include the layer size in layout debug.Eric Anholt2020-02-041-1/+2
| | | | | | It's been many of my bugs so far. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3059>
* freedreno: Move the layout debug under FD_MESA_DEBUG=layout.Eric Anholt2020-02-043-22/+33
| | | | | | | I keep wanting to turn this on while debugging layout stuff, and I suspect krh and robclark could use it too. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3059>
* tu: Move UBWC layout into fdl6_layout() and use that function.Eric Anholt2019-12-112-20/+94
| | | | | | | | This gets us shared non-UBWC layout code between gallium and turnip. Until I fix up the rest of gallium to handle UBWC mipmapping, we do the single-level UBWC setup in gallium as a fixup after layout. Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno: Switch the 16-bit workaround to match what turnip does.Eric Anholt2019-12-111-4/+4
| | | | | | | Prevents regressions on argb1555 and rgb565 when making turnip use freedreno's layout. Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno: Move a6xx's setup_slices() to a shareable helper function.Eric Anholt2019-12-114-2/+278
| | | | | | | We pass in all the parameters for setting up the layout, though freedreno still sets a few of them up early (since it uses layout helpers in making some decisions about the layout setup parameters that will be cleaned up once krh's blitter work lands).
* tu: Move our image layout into a freedreno_layout struct.Eric Anholt2019-12-111-2/+4
| | | | | | | | | This lets us start using some of the fdl_* helpers and have more obviously matching code between gallium and turnip. We can't yet use the fdl_* UBWC helpers, since the gallium driver doesn't do UBWC mipmaps (which I'm working on in another branch). Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno: Move UBWC layout into a slices array like the non-UBWC slices.Eric Anholt2019-12-111-4/+2
| | | | | | This is a little refactor in preparation for UBWC mipmapping support. Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno: Drop the extra offset field for mipmap slices.Eric Anholt2019-12-111-4/+1
| | | | | | | | We can just bake the UBWC-goes-first delta into the slices at setup time. I did have to fix up the resource shadowing swap path to swap the slice fields, as it was missing and regressed the format reinterpets otherwise. Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno: Introduce a resource layout header.Eric Anholt2019-11-261-0/+164
This will be used for sharing resource layout code between freedreno and tu. Mostly copied from a commit by Rob, with a new location and the slice struct renamed for consistency. Acked-by: Rob Clark <[email protected]>