aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost
Commit message (Collapse)AuthorAgeFilesLines
* gallium: Add pipe cap for primitive restart with fixed indexNeil Roberts2020-06-221-0/+1
| | | | | | | | | | | | | | | | | | | | Adds PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX which is a subset of the primitive restart cap for when the hardware can only support the fixed indices specified in GLES. The switch statements were automatically modified with this command: find \( \( -name \*.cpp -o -name \*.c \) \! -type l \) \ -exec sed -i -r \ 's/^(\s*case\s+PIPE_CAP_PRIMITIVE_RESTART)\s*:.*$/\0\n\1_FIXED_INDEX:/' \ {} \; v2: Add a note in screen.rst Reviewed-by: Eric Anholt <[email protected]> (v1) Reviewed by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5559>
* panfrost: Copy resources when mapping to avoid waiting for readersIcecream952020-06-221-1/+23
| | | | | | | | | | | It is often faster to copy the whole resource and modify that than to flush and wait for readers of the BO. Helps anything which updates textures after already using them in a frame, such as most GLQuake ports. Reviewed-by: Tomeu Vizoso <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5573>
* panfrost: Update sampler views when the texture bo changesIcecream952020-06-223-1/+4
| | | | | | | | | | | The BO reallocation path in panfrost_transfer_map caused textures and sampler views to get out of sync. v2: Use the GPU address of the BO in case two BOs get allocated at the same address. Reviewed-by: Tomeu Vizoso <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5573>
* panfrost: RGBA4 and RGB5_A1 framebuffer supportIcecream952020-06-222-0/+3
| | | | | | | Tested with fbo_firecube. Reviewed-by: Tomeu Vizoso <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5573>
* panfrost: Implement ARB_depth_clampIcecream952020-06-162-3/+18
| | | | | | | This significantly improves the quality of shadows in OpenMW. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5453>
* panfrost: Clean up panfrost_frag_meta_rasterizer_updateIcecream952020-06-161-7/+7
| | | | | | | | Create a pointer to ctx->rasterizer->base so it isn't repeatedly referred to. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5453>
* panfrost: Update sampler view in Bifrost pathAlyssa Rosenzweig2020-06-151-0/+1
| | | | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Fixes: fafc305600c ("panfrost: Create a new sampler view bo when the layout changes") Tested-by: Christian Hewitt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5474>
* panfrost: Merge bifrost_bo/midgard_boAlyssa Rosenzweig2020-06-153-12/+10
| | | | | | | | | The content is difference but a BO is a BO. Let's reduce code repition between Midgard and Bifrost paths. Signed-off-by: Alyssa Rosenzweig <[email protected]> Tested-by: Christian Hewitt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5474>
* panfrost: Tiled to linear layout conversionIcecream952020-06-122-8/+51
| | | | | | | | | | | | | | | | | | Tiling is expensive, so this patch converts textures that appear to be used for streaming to a linear layout. Performance of mpv is significantly improved, with software-decoded 1080p mp4 playback on RK3288 going from 30fps to 50fps when testing with `--untimed --no-audio`. To keep things simple, conversion only happens when updating the whole texture and no mipmapping is used. v2: Make it clear that the heuristic doesn't rely on a texture being uninitialized, since layout switching code can get confusing (Alyssa). Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4628>
* panfrost: Create a new sampler view bo when the layout changesIcecream952020-06-123-3/+21
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4628>
* panfrost: Move sampler view bo creation to a separate functionIcecream952020-06-122-40/+53
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4628>
* panfrost: Demote mediump varyings to fp16Alyssa Rosenzweig2020-06-121-2/+16
| | | | | | | Likewise lowp. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Override varying format to minimal precisionAlyssa Rosenzweig2020-06-121-5/+22
| | | | | | | Spec allows this! Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Use shader_info harderAlyssa Rosenzweig2020-06-121-15/+5
| | | | | | | We already have this metadata.. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Only store varying formatsAlyssa Rosenzweig2020-06-123-53/+10
| | | | | | | This reduces linking complexity. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Allow R/RG/RGB varyingsAlyssa Rosenzweig2020-06-121-4/+14
| | | | | | | This can be a bandwidth savings. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Remove unused routinesAlyssa Rosenzweig2020-06-121-51/+0
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Use new varying linkingAlyssa Rosenzweig2020-06-121-227/+54
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Add high-level varying emitAlyssa Rosenzweig2020-06-121-0/+94
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Add helper to determine if we are capturingAlyssa Rosenzweig2020-06-121-0/+15
| | | | | | | That is, is the varying setup for xfb *and* is there a buffer for it? Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Emit xfb recordsAlyssa Rosenzweig2020-06-121-0/+45
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Emit special varyingsAlyssa Rosenzweig2020-06-121-0/+18
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Emit unlinked varyingsAlyssa Rosenzweig2020-06-121-0/+30
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Determine varying buffer presenceAlyssa Rosenzweig2020-06-121-0/+39
| | | | | | | | Essentially the same logic as before, but the assumptions are much more explicit. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Introduce bitfields for tracking varyingsAlyssa Rosenzweig2020-06-121-0/+43
| | | | | | | | | | Rather than having all sorts of random state flyng about with varying emission, we can use a simple present mask and general stride to encode everything we need for non-XFB cases, and layer XFB on top easily enough. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Add panfrost_streamout_offset helperAlyssa Rosenzweig2020-06-121-0/+7
| | | | | | | | Calculates the bias required for an xfb record in the src_offset field to account for truncating the address to force alignment. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Calculate varying size by formatAlyssa Rosenzweig2020-06-121-0/+26
| | | | | | | Will enable <16-byte varyings. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* panfrost: Add writes_stencil to the EARLY_Z disable listIcecream952020-06-101-1/+2
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* panfrost: Ensure we have ro before using itAlyssa Rosenzweig2020-06-091-4/+4
| | | | | | | | | | | | | | | | Even through the resouce requested has a BIND_SCANOUT or related tag, this does not mean that we have a render-only driver. This can trivially happen as one requests such resource from GBM, while using the panfrost fd (and hence panfrost_dri.so) Forward port of !3000 Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Robert Foss <[email protected]> Signed-off-by: Alyssa Rosenzweig <[email protected]> Closes: #2664 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5410>
* panfrost: Mark PIPE_BUFFER BOs as not renderableIcecream952020-06-091-1/+2
| | | | | | | | Without this, memory usage explodes by 16x due to height alignment. Closes: #2715 Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4451>
* panfrost: Mark point sprites as todo on BifrostAlyssa Rosenzweig2020-06-031-2/+7
| | | | | | | | | Emulating them will be a rather annoying dance. Let's not worry about this until further down the line when we have a better sence of how to do handle them efficiently. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5290>
* panfrost: Fix gl_PointSize out of GL_POINTSAlyssa Rosenzweig2020-06-031-0/+9
| | | | | | | | | | | | | | | | | | | In this case, vs->writes_point_size is true as the VS writes gl_PointSize, but panfrost_writes_points_size() is false as we are not drawing points so the hardware doesn't process it. Thus the varying descriptor is emitted but elements is never written. When the VS runs, it will attempt to write to elements, a NULL pointer. The behaviour is architecture-independent. On Midgard, the write silently fails, hence why this bug was never noticed before. On Bifrost, this raises an MMU fault. The fix is to set the format to VARYING_DISCARD to ignore the write. Noticed on Neverball. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5290>
* panfrost: Prefer sysval for gl_PointCoord on BifrostAlyssa Rosenzweig2020-06-031-0/+1
| | | | | | | | It's like gl_FragCoord. Still not implemented. This unfortunately makes point sprites a lot more complicated. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5290>
* panfrost: Explicitly convert to 32-bit for logic-opsAlyssa Rosenzweig2020-06-031-1/+11
| | | | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Reported-by: Icecream95 <[email protected]> Fixes: 19b4e586f62 ("panfrost: Switch to pan_lower_framebuffer") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5289>
* panfrost: Handle writes_memory correctlyAlyssa Rosenzweig2020-06-033-3/+8
| | | | | | | | We need to pass it thru to EARLY_Z and WRITES_GLOBAL instead of ignoring and assuming respectively. Nontrivial performance fix. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5300>
* panfrost: Document MALI_WRITES_GLOBAL bitAlyssa Rosenzweig2020-06-031-1/+1
| | | | | | | We've been setting this unconditionally -- oops! Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5300>
* panfrost: Only use AFBC YTR with RGB and RGBAIcecream952020-06-031-1/+7
| | | | | | | The "lossless colorspace transform" is lossy for R and RG formats. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5293>
* panfrost: Decode AFBC flag bitsIcecream952020-06-031-2/+2
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5293>
* gallium: add shader caps INT16 and FP16_DERIVATIVESMarek Olšák2020-06-021-0/+2
| | | | | Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
* meson: use gnu_symbol_visibility argumentDylan Baker2020-06-011-1/+2
| | | | | | | | | | This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* panfrost: Remove unused nir_lower_framebuffer passAlyssa Rosenzweig2020-06-014-427/+0
| | | | | | | Superseded. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284>
* panfrost: Don't flush explicitly when mipmappingAlyssa Rosenzweig2020-06-011-19/+1
| | | | | | | The reorder work already takes cares of this nicely. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284>
* panfrost: Fix PRESENT flag mix-upAlyssa Rosenzweig2020-06-011-1/+1
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284>
* panfrost: Use internal_format throughoutAlyssa Rosenzweig2020-06-011-8/+9
| | | | | | | Fixes R32F_S8 texturing. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
* panfrost: Add separate_stencil BO to batchAlyssa Rosenzweig2020-06-011-0/+3
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
* panfrost: Check for large tilebuffer requirementsAlyssa Rosenzweig2020-06-011-1/+21
| | | | | | | | Fixes the rest of dEQP-GLES3.functional.fragment_out.array.uint.*, this situation occurs with MRT and large pixels. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
* panfrost: Let Gallium pack coloursAlyssa Rosenzweig2020-06-011-10/+4
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
* panfrost: Account for differing types in blend lowerAlyssa Rosenzweig2020-06-011-6/+31
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
* panfrost: Conditionally allow fp16 blendingAlyssa Rosenzweig2020-06-012-10/+21
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
* panfrost: Switch to pan_lower_framebufferAlyssa Rosenzweig2020-06-011-1/+5
| | | | | | | It now supports what we need. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>