summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv
Commit message (Collapse)AuthorAgeFilesLines
* etnaviv: automake,meson: include common_3d.xml.h in the sources listsJuan A. Suarez Romero2017-11-132-0/+2
| | | | | | | v2: include the file also in the meson.build (Eric Engestrom). Fixes: f1e1c60ff6 ("etnaviv: Update from rnndb") Reviewed-by: Eric Engestrom <[email protected]>
* gallium: add CAPs to support HW atomic counters. (v3)Dave Airlie2017-11-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This looks like an evergreen specific feature, but with atomic counters AMD have hw specific counters they use instead of operating on buffers directly. These are separate to the buffer atomics, so require different limits and code paths. I've left the CAP for atomic type extensible in case someone else has a variant on this sort of thing (freedreno maybe?) and needs to change it. This adds all the CAPs required to add support for those atomic counters, along with a related CAP for limiting the number of output resources. I'd like to land this and the st patch then I can start to upstream the evergreen support for these and other GL4.x features. v2: drop the ATOMIC_COUNTER_MODE cap, just use the return from the HW counters. If 0 we use the current mode. v3: fix some rebase errors (Gert Wollny) Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* util: move os_time.[ch] to src/utilNicolai Hähnle2017-11-092-2/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* etnaviv: Don't over-pad compressed texturesWladimir J. van der Laan2017-11-061-9/+15
| | | | | | | | | HALIGN_FOUR/SIXTEEN has no meaning for compressed textures, and we can't render to them anyway. So use the tightest possible packing. This avoids bugs with non-power-of-two block sizes. 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-067-2/+57
| | | | | | | | 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: Update from rnndbWladimir J. van der Laan2017-11-0613-320/+1015
| | | | | | | Updated as of etnav_viv commit 3b4a8ec. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* gallium: add PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSETMarek Olšák2017-11-061-0/+1
|
* etnaviv: Allow clearing constant buffer using buffer==NULL user_buffer==NULLWladimir J. van der Laan2017-11-021-1/+1
| | | | | | | | | Prevents an assertion when using GALLIUM_HUD with ioquake3, when cso_restore_constant_buffer_slot0 restores an empty constant buffer in slot 0. Signed-off-by: Wladimir J. van der Laan <[email protected]> Signed-off-by: Lucas Stach <[email protected]>
* etnaviv: Don't flush on transfer when UNSYNCHRONIZEDWladimir J. van der Laan2017-11-021-12/+12
| | | | | | | | | Structure code to only flush when we will potentially call cpu_prep. This prevents spurious flushes in applications that heavily rely on u_uploader. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Signed-off-by: Lucas Stach <[email protected]>
* etnaviv: don't do resolve-in-place without valid TSWladimir J. van der Laan2017-11-024-0/+11
| | | | | | | | | | | | GC3000 resolve-in-place assumes that the TS state is configured. If it is not, this will result in MMU errors. This is especially apparent when using glGenMipmaps(). Fixes: 78ade659569e ("etnaviv: Do GC3000 resolve-in-place when possible") Cc: [email protected] Signed-off-by: Wladimir J. van der Laan <[email protected]> Tested-by: Chris Healy <[email protected]> Signed-off-by: Lucas Stach <[email protected]>
* gallium: add cap for driver specified max combined shader resources.Dave Airlie2017-11-011-0/+1
| | | | | | | | Some hw (evergreen) has a limit on how many combined (images/buffers/mrts) a fragment shader can access. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* etnaviv: add ext_texture_srgb supportChristian Gmeiner2017-10-283-1/+10
| | | | | | | | | | | | | | 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]>
* meson: build etnaviv driver + winsysDylan Baker2017-10-231-0/+96
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: fix implicit conversion warningChristian Gmeiner2017-10-202-2/+2
| | | | | | | Galliums query_type used in APIs is unsigned. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: enable occlusion query if GPU supports itChristian Gmeiner2017-10-201-1/+2
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: add support for occlusion queriesChristian Gmeiner2017-10-201-0/+78
| | | | | | | | | | | | | | Passes most occlusion query piglits. The following piglits are broken: - spec@arb_occlusion_query@occlusion_query_meta_fragments - spec@arb_occlusion_query@occlusion_query_meta_save - spec@arb_occlusion_query2@render v1 -> v2: - use one sample provider for all occlusion queries tyes - add comment about 'magic' value 0x1DF5E76 Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: add basic infrastructure for hw queriesChristian Gmeiner2017-10-206-0/+292
| | | | | | | | | | 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: update headers from rnndbChristian Gmeiner2017-10-205-89/+622
| | | | | | | Update to etna_viv commit 6c9c706. 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-143-5/+43
| | | | | | | | | | | | | | | 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: skip unused vertex attributes when assigning VS inputsLucas Stach2017-10-141-0/+4
| | | | | | | | | | | | | When not all of the vertex attributes are actually used in the shader, we end up with some inputs without an assigned reg. Those are marked as invalid and must be skipped when assigning the inputs, as those would overwrite other valid inputs otherwise. Fixes piglit drawpixels and a bunch of other tests using the st_draw path. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: Do GC3000 resolve-in-place when possibleWladimir J. van der Laan2017-10-124-4/+25
| | | | | | | | | | | | | If an RS blit is done with source exactly the same as destination, and the hardware supports this, do an in-place resolve. This only fills in tiles that have not been rendered to using information from the TS. This is the same as the blob does and potentially saves significant bandwidth when doing i.MX6qp scanout using PRE, and when rendering to textures (though here using sampler TS would be even better). Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* gallium: Create a new PIPE_CAP_TILE_RASTER_ORDER for vc4.Eric Anholt2017-10-101-0/+1
| | | | | | | | | | | | | | | | Because vc4 can control the order that tiles are rasterized in, we can use it to implement overlapping blits using normal drawing and GL_ARB_texture_barrier, as long as we can tell the kernel what order to render the tiles in. This commit introduces the core gallium support, vc4 changes will follow. v2: Fix on the simulator. v3: Add the cap (disabled) to other drivers, add rst docs for the cap. v4: Rebase on PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS v5: Drop vc4 changes from this commit, for clarity. Reviewed-by: Nicolai Hähnle <[email protected]> (v3)
* etnaviv: update HW headers and fix provoking vertexLucas Stach2017-10-106-47/+67
| | | | | | | | | | Now that the real meaning of the 2 bits in PA_SYSTEM_MODE is known, we can set them according to the rasterizer state, which fixes uses that are setting provoking vertex first. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: remove flat shading workaroundLucas Stach2017-10-101-5/+1
| | | | | | | | | | It turned out not to be a hardware bug, but the shader compiler emitting wrong varying component use information. With that fixed we can turn flat shading back on. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: fix varying interpolationLucas Stach2017-10-101-12/+10
| | | | | | | | | | | | It seems that newer cores don't use the PA_ATTRIBUTES to decide if the varying should bypass the flat shading, but derive this from the component use. This fixes flat shading on GC880+. VARYING_COMPONENT_USE_POINTCOORD is a bit of a misnomer now, as it isn't only used for pointcoords, but missing a better name I left it as-is. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: fix bogus flush requests in transfer handlingLucas Stach2017-10-101-5/+10
| | | | | | | | | | The logic to decide if we need to flush the GPU command stream was broken and hard to reason about. Fix and clarify this. Fixes the data sync subtests from piglit arb_vertex_buffer_object. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: call util_query_clear_result(..) in the generic layerChristian Gmeiner2017-10-092-2/+3
| | | | | | | | Saves us from calling util_query_clear_result(..) in every query type implementation. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: push query active handling into generic layerChristian Gmeiner2017-10-092-6/+16
| | | | | | | | We want the same active handling for every query type. So lets handle it in the generic layer. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-By: Wladimir J. van der Laan <[email protected]>
* gallium: add PIPE_CAP_TGSI_ANY_REG_AS_ADDRESSMarek Olšák2017-10-061-0/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* etnaviv: Set up unknown GC3000 statesWladimir J. van der Laan2017-10-031-0/+11
| | | | | | | | | | | Set up new states that the blob started setting for GC3000 consistently. This makes sure that when another test or driver leaves the GPU in unpredictable state, these states are set up correctly for our rendering. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: Fix point sprite rendering on GC3000Wladimir J. van der Laan2017-10-031-0/+2
| | | | | | | | Setting PA_VIEWPORT_UNK state correctly is necessary to make point sprite rendering on GC3000 work. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: Add support for DP2 instructionWladimir J. van der Laan2017-10-034-1/+7
| | | | | | | | A two-component dot product instruction is supported with HALTI2, use it on hardware that supports it. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: Support opcodes with bit 6 set in assemblerWladimir J. van der Laan2017-10-031-1/+4
| | | | | | | | Support opcodes with bit 6 set in assembler, and assert that only ops 0x00..0x7f are used. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* gallium: add LDEXP TGSI instruction and corresponding capNicolai Hähnle2017-09-291-0/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* etnaviv: optimize RS transfersLucas Stach2017-09-281-4/+25
| | | | | | | | | | | | | Currently we are blitting the whole resource when the RS is used to de-/tile a resource. This can be very inefficient for large resources where the transfer is only changing a small part of the resource (happens a lot with glTexSubImage2D). Optimize this by only blitting the tile aligned subregion of the resource, which the transfer is going to change. Signed-off-by: Lucas Stach <[email protected]> Reviewed-By: Wladimir J. van der Laan <[email protected]>
* etnaviv: add resource subregion copyLucas Stach2017-09-282-0/+32
| | | | | | | | This is useful if we only need to copy part of a larger resource, mostly when using the RS engine to de-/tile on pipe transfers. Signed-off-by: Lucas Stach <[email protected]> Reviewed-By: Wladimir J. van der Laan <[email protected]>
* etnaviv: support tile aligned RS blitsLucas Stach2017-09-281-8/+78
| | | | | | | | The RS can blit abitrary tile aligned subregions of a resource by adjusting the buffer offset. Signed-off-by: Lucas Stach <[email protected]> Reviewed-By: Wladimir J. van der Laan <[email protected]>
* etnaviv: Add missing includes after 6ace0b8Wladimir J. van der Laan2017-09-221-0/+2
| | | | | | | | | | Add missing includes after 6ace0b8 (etnaviv: don't enable RT full-overwrite when logicop is enabled), otherwise the etnaviv driver won't build because of missing macros. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Tested-by: Andres Gomez <[email protected]>
* etnaviv: fix 16bpp clearsLucas Stach2017-09-221-1/+1
| | | | | | | | | | | | | | | util_pack_color may leave undefined values in the upper half of the packed integer. As our hardware needs the upper 16 bits to mirror the lower 16bits, this breaks clears of those formats if the undefined values aren't masked off. I've only observed the issue with R5G6B5_UNORM surfaces, other 16bpp formats seem to work fine. Fixes: d6aa2ba2b2 (etnaviv: replace translate_clear_color with util_pack_color) Cc: [email protected] Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: don't enable RT full-overwrite when logicop is enabledLucas Stach2017-09-222-6/+14
| | | | | | | | | Logicop is a form of blending with the framebuffer, so we must allow framebuffer reads when logicop is enabled. Fixes: piglit gl-1.0-logicop on GC3000, which has logicop support Signed-off-by: Lucas Stach <[email protected]>
* gallium: Add PIPE_SHADER_CAP_INT64_ATOMICSJan Vesely2017-09-211-0/+1
| | | | | | | Denotes availability of 64bit int atomic instructions Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* etnaviv: move sw query defines to etnaviv_query_sw.hChristian Gmeiner2017-09-202-2/+4
| | | | | | | Also add new define ETNA_SW_QUERY_BASE. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: move sw get_driver_query_info(..)Christian Gmeiner2017-09-203-12/+28
| | | | | | | | | This change makes etna_get_driver_query_info(..) more generic and puts the knowledge of supported queries directly besides the implementation. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* gallium: Add PIPE_SHADER_CAP_FP16Jan Vesely2017-09-181-0/+1
| | | | | | | | | Denotes native half precision float operations capability v2: PIPE_CAP_HALFS -> PIPE_SHADER_CAP_FP16 fix indentation Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: introduce PIPE_CAP_LOAD_CONSTBUFTimothy Arceri2017-09-151-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* etnaviv: use correct param for etna_compatible_rs_format(..)Christian Gmeiner2017-08-261-1/+1
| | | | | | | | | Found by code inspection. Fixes: c9e8b49b885 ("etnaviv: gallium driver for Vivante GPUs") Cc: [email protected] Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium: remove TGSI opcode SCSMarek Olšák2017-08-221-23/+1
| | | | | | | use COS+SIN instead. Reviewed-by: Roland Scheidegger <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* gallium: remove TGSI opcode XPDMarek Olšák2017-08-221-1/+0
| | | | | | use MUL+MAD+MOV instead. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: remove TGSI opcode DPHMarek Olšák2017-08-221-28/+0
| | | | | | use DP4 or DP3 + ADD. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: remove TGSI opcode DP2AMarek Olšák2017-08-221-1/+0
| | | | | | use DP3 instead. Reviewed-by: Roland Scheidegger <[email protected]>