aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv
Commit message (Collapse)AuthorAgeFilesLines
...
* 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]>
* etnaviv: disable earlyZ when shader writes fragment depthJonathan Marek2019-09-283-3/+8
| | | | | | | Fixes the following piglit test: fragdepth_gles2 Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: make lower_alu easier to followJonathan Marek2019-09-281-32/+36
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: remove extra allocation for shader codeJonathan Marek2019-09-281-1/+1
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: remove "options" structJonathan Marek2019-09-282-41/+24
| | | | | | | It just makes thing more complicated for no reason. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: use store_deref instead of store_outputJonathan Marek2019-09-282-70/+59
| | | | | | | Allows some simplification. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: add native integers (HALTI2+)Jonathan Marek2019-09-285-34/+170
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* qetnaviv: nir: use new immediates when possibleJonathan Marek2019-09-281-1/+21
| | | | | | | | | Note it can still be improved a bit: * Use alu swizzle to determine if src is scalar * Take into account new immediates in the multiple uniform src lowering Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: set num_components for inputs/outputsJonathan Marek2019-09-281-3/+3
| | | | | | | | | This can improve performance by allowing the LAST_VARYING_2X bit to be set when possible (and possibility more benefits on HALTI5 where the number of components is set for each varying). Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: allocate contiguous components for LOAD destinationJonathan Marek2019-09-281-8/+53
| | | | | | | | | LOAD starts reading into the first enabled destination component, and doesn't skip disabled components, so we need to allocate a destination with contiguous components. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: fix gl_FrontFacingJonathan Marek2019-09-283-1/+9
| | | | | | | | | | Only invert front facing when glFrontFace is GL_CW. Fixes following deqp test: dEQP-GLES2.functional.shaders.builtin_variable.frontfacing Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: support ARB_framebuffer_objectChristian Gmeiner2019-09-271-0/+1
| | | | | | | | Passes most of piglit's tests regarding arb_framebuffer_object and unlocks some more piglit tests. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: etna_resource_copy_region(..): drop assertChristian Gmeiner2019-09-271-3/+0
| | | | | | | | | We are using util_resource_copy_region(..) as fallback which supports different formats for src and dst. Improves the experience when running deqp or piglit with a debug build. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: fix two-sided stencilJonathan Marek2019-09-185-30/+44
| | | | | | | | | | | | | * Set missing STENCIL_CONFIG_EXT2 bits * Swap stencil sides when rendering CCW Fixes following deqp tests (which were 99% failing): dEQP-GLES2.functional.fragment_ops.depth_stencil.* Note: deqp tests require --deqp-gl-config-name=rgba8888d24s8ms0 Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: disable ARB_shadowChristian Gmeiner2019-09-181-0/+2
| | | | | | | | | Looks like only HALT2 GPUs have support for it but that is not yet implemented so disable ARB_shadow for now. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* etnaviv: a bit of micro-optimizationChristian Gmeiner2019-09-172-1/+4
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* nir: allow specifying filter callback in lower_alu_to_scalarVasily Khoruzhick2019-09-061-20/+29
| | | | | | | | | | | | | Set of opcodes doesn't have enough flexibility in certain cases. E.g. Utgard PP has vector conditional select operation, but condition is always scalar. Lowering all the vector selects to scalar increases instruction number, so we need a way to filter only those ops that can't be handled in hardware. Reviewed-by: Qiang Yu <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* etnaviv: rs: add support for 64bpp clearsChristian Gmeiner2019-08-191-7/+5
| | | | | | | | Starting with HALTI2 the RS supports 64bpp clears. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: update headers from rnndbChristian GMEINER2019-08-1913-115/+204
| | | | | | | | Update to etna_viv commit c51353e. Signed-off-by: Christian GMEINER <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>