aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv
Commit message (Collapse)AuthorAgeFilesLines
...
* etnaviv: support 3d/array/integer formats in texture descriptorsJonathan Marek2019-11-261-3/+19
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: blt: fix partial ZS clears with TSJonathan Marek2019-11-261-4/+7
| | | | | | | | If not all bits are cleared, then BLT needs to be given the current clear value and not the new one. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: implement 64bpp clearJonathan Marek2019-11-2510-19/+41
| | | | | | | | At the same time, update etna_clear_blit_pack_rgba to work with integer formats. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: avoid using RS for 64bpp formatsJonathan Marek2019-11-253-6/+14
| | | | | | | At the same time, this change allows using BLT for 8bpp formats Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: add support for extended pe formatsChristian Gmeiner2019-11-251-2/+8
| | | | | | | | | | | Use the extended format if an such a format was passed. v1 -> v2: - set FORMAT_MASK bit when using ext PE format as suggested by Wladimir J. van der Laan Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: handle 8 byte block in tilingChristian Gmeiner2019-11-251-2/+6
| | | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: use a more self-explanatory param nameChristian Gmeiner2019-11-221-10/+10
| | | | Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: drop not used config_out function paramChristian Gmeiner2019-11-225-21/+8
| | | | Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: blt: set TS dirty after clearJonathan Marek2019-11-181-0/+2
| | | | | | | | RS engine does this already, it is missing for BLT engine. This fixes cases where a clear isn't immediately at the start of the frame. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: separate PE and RS formats, use only RS only for tilingJonathan Marek2019-11-188-56/+54
| | | | | | | | | | | There are PE formats not supported by RS, so we can't have a single to translate both. Use RS only for same formats until we have a translate_rs_format and test the possible different format blits. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: blt: use only for tiling, and add missing formatsJonathan Marek2019-11-181-22/+30
| | | | | | | | | | | | | | | | | | * Removes the incorrect usage of translate_rs_format * Disables use of BLT engine for different src/dst format We only really need the BLT engine for tiling/detiling right now, but it would be nice to support as many blit cases as possible to avoid using PE for that. To deal with different formats we need to: * Have a translate_blt_format which has all supported formats * Fix the swizzle translation from gallium (current version was wrong) * Set the src/dst sRGB bits as needed * Find which type conversions the BLT engine can actually do Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: rs: upsampling is not supportedChristian Gmeiner2019-11-171-1/+32
| | | | | | | | This change makes it possible to support different downsample cases like 4 -> 2 or 4 -> 1. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Gert Wollny <[email protected]>
* util: Move gallium's PIPE_FORMAT utils to /util/format/Eric Anholt2019-11-144-4/+4
| | | | | | | | | | | | | | | To make PIPE_FORMATs usable from non-gallium parts of Mesa, I want to move their helpers out of gallium. Since u_format used util_copy_rect(), I moved that in there, too. I've put it in a separate directory in util/ because it's a big chunk of related code, and it's not clear to me whether we might want it as a separate library from libmesa_util at some point. Closes: #1905 Acked-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* etnaviv: fix non-pointsprite points on GC7000LJonathan Marek2019-10-301-0/+4
| | | | | | | | | | | | | Fixes these deqp tests (and more): dEQP-GLES2.functional.draw.draw_arrays.points.single_attribute dEQP-GLES2.functional.draw.draw_arrays.points.multiple_attributes dEQP-GLES2.functional.draw.draw_arrays.points.default_attribute dEQP-GLES2.functional.draw.draw_elements.points.single_attribute dEQP-GLES2.functional.draw.draw_elements.points.multiple_attributes dEQP-GLES2.functional.draw.draw_elements.points.default_attribute Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: stencil fixJonathan Marek2019-10-301-13/+15
| | | | | | | | | | | | | | | The final version of previous stencil fix patch ended up breaking one-sided stencil. Fixes remaining failures in these deqp tests (tested on GC3000/GC7000L): dEQP-GLES2.functional.fragment_ops.depth_stencil.* Note: deqp tests require --deqp-gl-config-name=rgba8888d24s8ms0 Fixes: 05da025f ("etnaviv: fix two-sided stencil") Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: fix depth biasJonathan Marek2019-10-302-1/+2
| | | | | | | | | | Fixes remaining failures in these deqp tests (tested on GC3000/GC7000L): dEQP-GLES2.functional.polygon_offset.* Fixes: 6c3c05dc ("etnaviv: fix polygon offset") Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* util: remove LIST_IS_EMPTY macroTimothy Arceri2019-10-281-1/+1
| | | | | | | Just use the inlined function directly. The new function was introduced in addcf410. Reviewed-by: Eric Engestrom <[email protected]>
* util: rename list_empty() to list_is_empty()Timothy Arceri2019-10-281-1/+1
| | | | | | | This makes it clear that it's a boolean test and not an action (eg. "empty the list"). Reviewed-by: Eric Engestrom <[email protected]>
* nir/lower_idiv: add new llvm-based pathRhys Perry2019-10-211-1/+1
| | | | | | | | | | | | | | | | | v2: make variable names snake_case v2: minor cleanups in emit_udiv() v2: fix Panfrost build failure v3: use an enum instead of a boolean flag in nir_lower_idiv()'s signature v4: remove nir_op_urcp v5: drop nv50 path v5: rebase v6: add back nv50 path v6: add comment for nir_lower_idiv_path enum v7: rename _nv50/_llvm to _fast/_precise v8: fix etnaviv build failure Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* etnaviv: keep track of buffer valid ranges for PIPE_BUFFERChristian Gmeiner2019-10-203-2/+35
| | | | | | | | | | | | | | | | | | This allows a write to proceed to an uninitialized part of a buffer even when the GPU is using the previously-initialized portions. Such a situation can be triggered with the following API usage example: glBufferSubData(..., offset, size, data1); glDrawArrays(...); // append new vertex data glBufferSubData(..., offset+size, size, data2); glDrawArrays(...); Same is done for freedreno, nouveau and radeon. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: store updated usage in pipe_transfer objectChristian Gmeiner2019-10-201-8/+8
| | | | | | | Store the changed usage in the newly created transfer object. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: fix code styleChristian Gmeiner2019-10-201-1/+2
| | | | | | Fixes: 1194afdfe35 ("etnaviv: rework the stream flush to always go through the context flush") Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: fix compile warningsChristian Gmeiner2019-10-203-7/+0
| | | | | | | Fixes: e5cc66dfad0 ("etnaviv: Rework locking") Fixes: 1456aa61cc5 ("etnaviv: Rework resource status tracking") Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: check NO_ASTC feature bitJonathan Marek2019-10-181-1/+2
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: fix TS samplers on GC7000LJonathan Marek2019-10-181-1/+2
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: fix linear_nearest / nearest_linear filters on GC7000LiteJonathan Marek2019-10-181-2/+4
| | | | | | | | MIN filter is only used when LOD MAX is at least 4 (I guess the 2 LSB don't actually exist). Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: GC7000: flush TX descriptor and instruction cacheLucas Stach2019-10-181-0/+7
| | | | | | | | | The etnaviv kernel driver will only ever flush write caches. As both the TX descriptor and instruction cache are read caches they must be flushed from the user cmdstream at an appropriate time. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: add linear texture support on GC7000Lucas Stach2019-10-181-1/+3
| | | | | | | | It's just a matter of writing the addressing mode into the texture descriptor. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: GC7000: Texture descriptorsWladimir J. van der Laan2019-10-188-1/+440
| | | | | | | | | | | | | | | | | | Create a separate implementation file with texture-descriptor-based sampler views and sampler states. Initialize the one or the other based on the GPU. There is so little in common that this seemed more appropriate that keeping them as one type of state object would only be confusing. This commit is actually a combiation of the original commit by Wladimir, fixes and TS implementation from Jonathan and changed to use softpin by Lucas. Signed-off-by: Wladimir J. van der Laan <[email protected]> Signed-off-by: Jonathan Marek <[email protected]> Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Guido Günther <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: check for softpin availability on Halti5 devicesLucas Stach2019-10-181-0/+5
| | | | | | | | | | | | Halti5 uses texture descriptors to control the samplers, and thus needs to know the GPU virtual address for the texture buffers to fill into the descriptor buffer. Without softpin userspace has no control over the GPU VM and also no way to fix up the texture descriptor buffer, so there is no point in creating a screen on a Halti5 device without softpin being available. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: Rework lockingMarek Vasut2019-10-189-16/+28
| | | | | | | | Replace the per-screen locking of flushing with per-context one and add per-context lock around command stream buffer accesses, to prevent cross-context flushing from corrupting these command stream buffers. Signed-off-by: Marek Vasut <[email protected]>
* etnaviv: Rework resource status trackingMarek Vasut2019-10-184-32/+93
| | | | | | | | | | Have each context track which resources it marked as pending read and pending write. Have each resource track in which context it is pending. This way, it is possible to identify when a resource is both pending read and pending write at the same time. Moreover, the status field can be correctly calculated and updated when necessary. Signed-off-by: Marek Vasut <[email protected]>
* etnaviv: rework the stream flush to always go through the context flushLucas Stach2019-10-181-36/+43
| | | | | | | | | This way we can ensure that the pipe driver tracking of pending resources stays in sync with the actual command buffer state, even if a space reservation triggers a forced flush. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: keep references to pending resourcesLucas Stach2019-10-182-11/+10
| | | | | | | | | | As long as a resource is pending in any context we must not destroy it, otherwise we'll hit a classical use-after-free with fireworks. To avoid this take a reference when the resource is first added to the pending set and put the reference when no longer pending. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: Make contexts track resourcesMarek Vasut2019-10-185-15/+40
| | | | | | | | | | | | | Currently, the screen tracks all resources for all contexts, but this is not correct. Each context should track the resources it uses. This also allows a context to detect whether a resource is used by another context and to notify another context using a resource that the current context is done using the resource. Signed-off-by: Marek Vasut <[email protected]> Cc: Christian Gmeiner <[email protected]> Cc: Guido Günther <[email protected]> Cc: Lucas Stach <[email protected]>
* etnaviv: remove variable from global namespaceLionel Landwerlin2019-10-151-1/+1
| | | | | | | | | Found out by accident this was clashing with another driver. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Cc: <[email protected]>
* etnaviv: fix vertex buffer state emission for single stream GPUsLucas Stach2019-10-141-1/+1
| | | | | | | | | GPUs with a single supported vertex stream must use the single state address to program the stream. Fixes: 3d09bb390a39 (etnaviv: GC7000: State changes for HALTI3..5) Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: rework etna_resource_create tiling choiceJonathan Marek2019-10-111-40/+26
| | | | | | | | | | Now that the base resource is allowed to be incompatible with PE, we can make a smarter choice of tiling mode to avoid allocating a PE compatible base that is never used for regular textures. This affects GPUs like GC2000 where there is no tiling compatible with both PE and TE. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: rework compatible render baseJonathan Marek2019-10-117-58/+64
| | | | | | | | For PE-incompatible layouts, use a mechanism similar to what texture does to create a compatible base resource. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: get addressing mode from tiling layoutJonathan Marek2019-10-115-24/+8
| | | | | | | | Remove the "addressing_mode" state, which is currently set incorrectly, and instead deduce the addressing mode from the tiling layout. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: clear texture cache and flush ts when texture is modifiedJonathan Marek2019-10-113-29/+53
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: output the same shader-db format as freedreno, v3d and intelChristian Gmeiner2019-10-111-6/+3
| | | | | | | This lets us reuse their report.py. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: nir: start to make use of compile_error(..)Christian Gmeiner2019-10-112-12/+15
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* gallium: remove PIPE_SHADER_CAP_SCALAR_ISAMarek Olšák2019-10-101-1/+0
| | | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* etnaviv: set texture INT_FILTER bitJonathan Marek2019-10-051-1/+2
| | | | | | | This should improve texture sampling performance on GC3000. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: implement texture comparatorJonathan Marek2019-10-056-5/+51
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: update headers from rnndbJonathan Marek2019-10-053-31/+40
| | | | | | | Update to etna_viv commit 7ff8029. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: enable triangle strips only when the hardware supports itGert Wollny2019-10-021-1/+7
| | | | | | | | | | | | | | Some hardware has a bug with triangle strips and it is signalled by the flag BUG_FIXED8 whether this bug has been fixed. So only enable triangle strips when this flag is set. Thanks: Jonathan Marek and Christian Gmeiner for the pointers v2: Add TODO to indicate that the handling should be refined (Jonathan & Christian) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: fix bitmask typoEric Engestrom2019-09-301-1/+1
| | | | | | Fixes: d92689c46f0d2da05ae6 ("etnaviv: nir: add native integers (HALTI2+)") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: nir: fix gl_FragDepthJonathan Marek2019-09-281-3/+17
| | | | | | | Fixes the following piglit test: fragdepth_gles2 (for ETNA_MESA_DEBUG=nir) Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>