aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_context.h
Commit message (Collapse)AuthorAgeFilesLines
* etnaviv: GC7000: Texture descriptorsWladimir J. van der Laan2019-10-181-0/+4
| | | | | | | | | | | | | | | | | | 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: Rework lockingMarek Vasut2019-10-181-0/+2
| | | | | | | | 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-181-1/+2
| | | | | | | | | | 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: Make contexts track resourcesMarek Vasut2019-10-181-0/+3
| | | | | | | | | | | | | 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: drop struct etna_3d_stateChristian Gmeiner2019-08-071-3/+0
| | | | | | | Also drop #if 0 code block. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Philipp Zabel <[email protected]>
* etnaviv: prep for UBOsJonathan Marek2019-08-061-1/+3
| | | | | | | | | | | | | | | Allow UBO relocs and only emitting uniforms that are actually used. GC7000Lite has no address register, so upload uniforms to a UBO object to LOAD from. I removed the code to check for changes to individual uniforms and just reupload to entire uniform state when the state is dirty. I think there was very limited benefit to it and it isn't compatible with relocs. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: fix resource usage tracking across different pipe_context'sChristian Gmeiner2019-03-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | A pipe_resource can be shared by all the pipe_context's hanging off the same pipe_screen. Changes from v2 -> v3: - add locking with mtx_*() to resource and screen (Marek) Changes from v3 -> v4: - drop rsc->lock, just use screen->lock for the entire serialization (Marek) - simplify etna_resource_used() flush condition, which also prevents potentially flushing resources twice (Marek) - don't remove resouces from screen->used_resources in etna_cmd_stream_reset_notify(), they may still be used in other contexts and may need flushing there later on (Marek) Changes from v4 -> v5: - Fix coding style issues reported by Guido Changes from v5 -> v6: - Add missing locking in etna_transfer_map(..) (Boris) Signed-off-by: Christian Gmeiner <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Tested-by: Marek Vasut <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Tested-by: Boris Brezillon <[email protected]>
* etnaviv: keep track of mapped bo addressChristian Gmeiner2019-03-011-0/+1
| | | | | | | | Saves us from calling etna_bo_map(..) and saves us from doing the same offset calcs for map() and unmap() operations. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: use dummy RT buffer when rendering without color bufferLucas Stach2018-11-191-0/+3
| | | | | | | | | | | | | | | At least GC2000 seems to push some dirt from the PE color cache into the last bound render target when drawing depth only. Newer cores seem to behave properly and don't do this, but I have found no way to fix it on GC2000. Flushes and stalls don't seem to make any difference. In order to stop the core from pushing the dirt into a precious real render target, plug in dummy buffer when rendering without a color buffer. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]>
* etnaviv: GC7000: Factor out state based texture functionalityWladimir J. van der Laan2017-11-301-0/+6
| | | | | | | | | | Prepare for two texture handling paths, the descriptor-based path will be added in a future commit. These are structured so that the texture implementation handles its own state emission. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: GC7000: Track dirty sampler viewsWladimir J. van der Laan2017-11-301-0/+1
| | | | | | | Need this to efficiently emit texture descriptor invalidations. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: add basic infrastructure for hw queriesChristian Gmeiner2017-10-201-0/+3
| | | | | | | | | | No hardware query is supported yet. v1 -> v2 - removed query_type from strcut etna_hw_sample_provider Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: rework TS enable to be a derived stateLucas Stach2017-10-141-0/+1
| | | | | | | | | | | | | | | Draw operations should not use the TS if the TS buffer content is invalid, as this leads to wrong rendering or even GPU hangs. As the TS valid status can change between draws (clear operations changing it to valid, blits using the RS to the color or ZS buffer changing it to invalid), the TS_MEM_CONFIG must be updated before each draw if the status has changed. This fixes the remaining TS related piglit failures (regressions of a standard run against a piglit run with TS completely disabled). Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: add rs-operations sw queryChristian Gmeiner2017-06-161-0/+1
| | | | | | | | It could be useful to get the number of emited resolve operations when doing driver optimizations. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* gallium: remove pipe_index_buffer and set_index_bufferMarek Olšák2017-05-101-1/+0
| | | | | | | | | | | | | | pipe_draw_info::indexed is replaced with index_size. index_size == 0 means non-indexed. Instead of pipe_index_buffer::offset, pipe_draw_info::start is used. For indexed indirect draws, pipe_draw_info::start is added to the indirect start. This is the only case when "start" affects indirect draws. pipe_draw_info::index is a union. Use either index::resource or index::user depending on the value of pipe_draw_info::has_user_indices. v2: fixes for nine, svga
* etnaviv: native fence fd supportPhilipp Zabel2017-04-151-0/+1
| | | | | | | | | | This adds native fence fd support to etnaviv, similarly to commit 0b98e84e9ba0 ("freedreno: native fence fd"), enabled for kernel driver version 1.1 or later. Signed-off-by: Philipp Zabel <[email protected]> Reviewed-By: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: add etna_shader_key and generate variants if neededChristian Gmeiner2017-04-051-0/+1
| | | | Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: add struct etna_shader_stateChristian Gmeiner2017-04-051-4/+5
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: s/etna_shader/etna_shader_variantChristian Gmeiner2017-04-051-3/+3
| | | | | | Prep work to add shader variant support. Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: wire up core pipe_debug_callbackChristian Gmeiner2017-02-111-0/+2
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: gallium driver for Vivante GPUsThe etnaviv authors2017-01-121-0/+194
This driver supports a wide range of Vivante IP cores like GC880, GC1000, GC2000 and GC3000. Changes from V1 -> V2: - added missing files to actually integrate the driver into build system. - adapted driver to new renderonly API Signed-off-by: Christian Gmeiner <[email protected]> Signed-off-by: Lucas Stach <[email protected]> Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Russell King <[email protected]> Signed-off-by: Wladimir J. van der Laan <[email protected]> Acked-by: Emil Velikov <[email protected]>