aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_texture.c
Commit message (Collapse)AuthorAgeFilesLines
* etnaviv: implement buffer compressionJonathan Marek2019-07-041-2/+3
| | | | | | | | | | | | | | | Vivante GPUs have lossless buffer compression using the tile-status bits, which can reduce memory access and thus improve performance. This patch only enables compression for "V4" compression GPUs, but the implementation is tested on GC2000(V1) and GC3000(V2). V1/V2 compresssion looks absolutely useless, so it is not enabled. I couldn't test if this patch breaks MSAA, because it looks like MSAA is already broken. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: combine translate_ts_sampler_format/translate_msaa_formatJonathan Marek2019-07-041-2/+2
| | | | | | | Both translate the same thing, so just add the missing cases into one. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: implement TS_MODE for GC7000LJonathan Marek2019-07-041-0/+1
| | | | | | | GC7000L has a TS mode with larger tiles, which improves performance. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: update headers from rnndbJonathan Marek2019-07-041-2/+2
| | | | | | | Update to etna_viv commit 8a8b13a and use new names in the code. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* drm-uapi: use local files, not system libdrmEric Engestrom2019-02-141-1/+1
| | | | | | | | | There was an issue recently caused by the system header being included by mistake, so let's just get rid of this include path and always explicitly #include "drm-uapi/FOO.h" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* etnaviv: add linear sampling supportChristian Gmeiner2019-01-281-1/+3
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: extend etna_resource with an addressing modeChristian Gmeiner2019-01-281-0/+1
| | | | | | | | | Defines how sampler (and pixel pipes) needs to access the data represented with a resource. The used default is mode is ETNA_ADDRESSING_MODE_TILED. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: GC7000: Factor out state based texture functionalityWladimir J. van der Laan2017-11-301-166/+28
| | | | | | | | | | 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: Move active_samplers_bits to textureWladimir J. van der Laan2017-11-301-0/+6
| | | | | | | This needs to be shared between texture_plain and texture_desc. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: GC7000: Factor out incompatible texture handling logicWladimir J. van der Laan2017-11-301-16/+26
| | | | | | | This will be shared with the texture descriptor path. 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-2/+7
| | | | | | | 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 sampler TS supportWladimir J. van der Laan2017-11-151-6/+68
| | | | | | | | | | | | | Sampler TS is an hardware optimization that can be used when rendering to textures. After rendering to a resource with TS enabled, the texture unit can use this to bypass lookups to empty tiles. This also means a resolve-in-place can be avoided to flush the TS. This commit is also an optimization when not using sampler TS, as resolve-in-place will now be skipped if a resource has no (valid) TS. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: ASTC texture supportWladimir J. van der Laan2017-11-061-2/+9
| | | | | | | | Add ASTC texture support for hardware that supports this (currently only GC3000 on i.MX6qp is known to have this). Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: add ext_texture_srgb supportChristian Gmeiner2017-10-281-1/+2
| | | | | | | | | | | | | | Following piglits are passing: - glean@texture_srgb - spec@ext_texture_srgb@fbo-srgb - spec@ext_texture_srgb@tex-srgb - spec@ext_texture_srgb@texwrap formats - spec@ext_texture_srgb@texwrap formats-s3tc Btw. this enables GL 2.1 :-) Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: implement resource creation with modifierLucas Stach2017-07-191-1/+4
| | | | | | | | | | This allows to create buffers with a specific tiling layout, which is primarily used by GBM to allocate the EGL back buffers with the correct tiling/modifier for use with the scanout engines. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* etnaviv: also update textures from external resourcesLucas Stach2017-07-191-8/+16
| | | | | | | | | | | | This reworks the logic in etna_update_sampler_source to select the newest resource view for updating the texture view. This should make the logic easier to follow and fixes texture updates from imported dma-bufs. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: add support for swizzled texture formatsChristian Gmeiner2017-06-261-5/+4
| | | | | | | Passes all ext_texture_swizzle piglits. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-By: Wladimir J. van der Laan <[email protected]>
* etnaviv: add support for extended texture formatsChristian Gmeiner2017-06-261-3/+5
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: flush resource when binding as sampler viewLucas Stach2017-06-081-0/+3
| | | | | | | | As TS is also allowed on sampler resources, we need to make sure to resolve to self when binding the resource as a texture, to avoid stale content being sampled. Signed-off-by: Lucas Stach <[email protected]>
* etnaviv: clean up sampler view reference countingLucas Stach2017-05-161-3/+3
| | | | | | | | Use the proper pipe_resource_reference function instead of rolling our own. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: Supertiled texture support on gc3000Wladimir J. van der Laan2017-04-221-2/+8
| | | | | | | | | | | | | | | | | Support supertiled textures on hardware that has the appropriate feature flag SUPERTILED_TEXTURE. Most of the scaffolding was already in place in etna_layout_multiple: case ETNA_LAYOUT_SUPER_TILED: *paddingX = 64; *paddingY = 64; *halign = TEXTURE_HALIGN_SUPER_TILED; So this is just a matter of allowing it. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: s/unsigned/enum pipe_shader_type/Brian Paul2017-03-081-2/+2
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* etnaviv: add missing fallthrough annotationChristian Gmeiner2017-02-211-0/+1
| | | | | | | Caught by Coverity, reported to me by imirkin. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* etnaviv: add flags parameter to texture barrierChristian Gmeiner2017-01-181-1/+1
| | | | | | Fixes compile warning introduced by commit a1c848. Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: gallium driver for Vivante GPUsThe etnaviv authors2017-01-121-0/+338
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]>