aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_blit.c
Commit message (Collapse)AuthorAgeFilesLines
* r600: always flush between gfx and computeDave Airlie2017-12-181-0/+5
| | | | | | | | This is in no way optimal, but there seems to be some problems mixing at the moment, lots of hangs, it is possible, just need to figure out more magic. Signed-off-by: Dave Airlie <[email protected]>
* r600: add core pieces of image support.Dave Airlie2017-11-171-0/+59
| | | | | | | | | This adds the atoms and gallium api implementations, along with support for compress/decompress paths for shader images. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/surface: add radeon_surf::has_stencil for convenienceMarek Olšák2017-09-071-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add helpers for whether HTILE is enabledMarek Olšák2017-08-221-2/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: don't allocate HTILE in a separate bufferMarek Olšák2017-06-081-1/+1
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_blitter: use 2D_ARRAY for cubemap blits if possibleMarek Olšák2017-06-071-1/+1
| | | | | | | | so that we can use TXF. The cubemap blit pixel shader code size: 148 -> 92 bytes Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: fix MIP0_WIDTH & MIP0_HEIGHT for compressed texture blitsMarek Olšák2017-03-301-1/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: move pre-GFX9 radeon_surf.* members to radeon_surf.u.legacy.*Marek Olšák2017-03-301-2/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* r600: increase performance for DRI PRIME offloading if 2nd GPU is Evergreen+Mario Kleiner2016-08-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct port of Marek Olšáks patch "radeonsi: increase performance for DRI PRIME offloading if 2nd GPU is CIK or VI" to r600. It uses SDMA for the detiling blit from renderoffload VRAM to GTT, as SDMA is much faster for tiled->linear blits from VRAM to GTT. Testing on a dual Radeon HD-5770 setup reduced the time for the render offload gpu to get its rendering into system RAM from approximately 16 msecs for simple rendering at 1920x1080 pixel 32 bpp to 5 msecs, a > 3x speedup! This was measured using ftrace to trace the time the radeon kms driver waited on the dmabuf fence of the renderoffload gpu to complete. All in all this brought the time for a flip down from 20 msecs to 9 msecs, so the prime setup can display at full 60 fps instead of barely 30 fps vsync'ed. The current r600 implementation supports SDMA on Evergreen and later, but not R600/R700 due to some bugs apparently present in their SDMA implementation. Signed-off-by: Mario Kleiner <[email protected]> Cc: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/radeon: handle render_condition_enable for clear_rt/dsMarek Olšák2016-08-101-2/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add render_condition_enable param to clear_render_target/depth_stencilMarek Olšák2016-08-101-2/+4
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: replace is_flushing_texture with db_compatibleNicolai Hähnle2016-07-061-2/+2
| | | | | | | | | | | This is a left-over of when I considered generalizing the separate stencil support. I do prefer the new name since it emphasizes what flushing vs. non-flushing means from a functional point-of-view, namely special handling of the texture format. v2: adjust r600_init_color_surface as well Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: add can_sample_z/s flags for texturesNicolai Hähnle2016-07-061-4/+2
| | | | | | v2: adjust r600_init_color_surface as well Reviewed-by: Marek Olšák <[email protected]>
* r600g: use hw MSAA resolve for non-trivial resolvesMarek Olšák2016-06-061-9/+53
| | | | | | This improves MSAA resolve performance. Reviewed-by: Nicolai Hähnle <[email protected]>
* r600g: remove a CP DMA workaround that's not needed anymoreMarek Olšák2016-06-041-6/+0
| | | | | | Reviewed-by: Alex Deucher <[email protected]> Tested-by: Grazvydas Ignotas <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* r600g: fix CP DMA hazard with index buffer fetches (v3)Marek Olšák2016-06-041-1/+1
| | | | | | | | | v3: use PFP_SYNC_ME on EG-CM only when supported by the kernel, otherwise use MEM_WRITE + WAIT_REG_MEM to emulate that Reviewed-by: Alex Deucher <[email protected]> Tested-by: Grazvydas Ignotas <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* r600g: do GL-compliant integer resolvesMarek Olšák2016-05-311-37/+1
| | | | | | | The GL spec has been clarified and the new rule says we should just copy 1 sample. u_blitter does the right thing. Reviewed-by: Nicolai Hähnle <[email protected]>
* r600g: use the hw MSAA resolving if formats are compatibleMarek Olšák2016-05-061-1/+2
| | | | | | | This allows resolving RGBA into RGBX. This should improve HL2 Lost Coast performance. Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: rework clear_buffer flagsMarek Olšák2016-04-281-1/+1
| | | | | | | | | Changes: - don't flush DB for fast color clears - don't flush any caches for initial clears - remove the flag from si_copy_buffer, always assume shader coherency Reviewed-by: Nicolai Hähnle <[email protected]>
* r600g: fix code indentationOded Gabbay2016-04-181-9/+9
| | | | | Signed-off-by: Oded Gabbay <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: use common scissor and viewport codeMarek Olšák2016-04-121-2/+2
| | | | | | | | It's the same as radeonsi. This adds guard band support to r600g. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Grigori Goronzy <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: allow clearing buffers >= 4 GBMarek Olšák2016-04-121-1/+1
| | | | | | | Only CMASK and DCC clears can use this, because only textures can be so large. Reviewed-by: Nicolai Hähnle <[email protected]>
* r600g: don't manually stop queries for blitterMarek Olšák2016-04-121-3/+0
| | | | | | | r600_set_active_query_state does it better. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: remove radeon_winsys_cs_handleMarek Olšák2015-12-111-1/+1
| | | | | | | | "radeon_winsys_cs_handle *cs_buf" is now equivalent to "pb_buffer *buf". Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* r600g: allow copying between compatible un/compressed formatsEdward O'Callaghan2015-12-091-1/+2
| | | | | | | | | | | | See: `commit e82c527f1fc2f8ddc64954ecd06b0de3cea92e93` which is where a block in src maps to a pixel in dst and vice versa. e.g. DXT1 <-> R32G32_UINT DXT5 <-> R32G32B32A32_UINT Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600/blit: add tcs/tes shader saves.Dave Airlie2015-12-071-0/+2
| | | | Signed-off-by: Dave Airlie <[email protected]>
* gallium/radeon*: Remove useless castsEdward O'Callaghan2015-12-061-2/+2
| | | | | | | | These are unnecessary and are likely just left overs from prior work. Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/radeon: simplify disabling render condition for u_blitterMarek Olšák2015-11-131-7/+5
| | | | | | just disable it by not setting the predication bit Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: inline the r600_rings structureMarek Olšák2015-11-131-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* r600g: fix clear_buffer fallback with offset != 0Marek Olšák2015-11-131-0/+1
| | | | | | | Discovered by luck. This code path hasn't been exercised since transform feedback was implemented. Reviewed-by: Nicolai Hähnle <[email protected]>
* r600g: only do depth-only or stencil-only in-place decompressionMarek Olšák2015-10-031-5/+22
| | | | | | | instead of always doing both. Usually, only depth is needed, so stencil decompression is useless. Reviewed-by: Michel Dänzer <[email protected]>
* r600g: make all viewport states use single atomGrazvydas Ignotas2015-09-031-1/+1
| | | | | | | Similarly to scissor states, we can use single atom to track all viewport states. This will allow to simplify dirty atom handling later. Signed-off-by: Marek Olšák <[email protected]>
* r600g: make all scissor states use single atomGrazvydas Ignotas2015-09-031-1/+1
| | | | | | | As suggested by Marek Olšák, we can use single atom to track all scissor states. This will allow to simplify dirty atom handling later. Signed-off-by: Marek Olšák <[email protected]>
* radeonsi: avoid redundant CB and DB register updatesMarek Olšák2015-09-011-1/+1
| | | | | | | | | | The main idea is to avoid setting CB_COLORi_INFO = 0 for i>0 repeatedly when those colorbuffers aren't used. This is mainly for glamor. Same for DB. Z_INFO and STENCIL_INFO need to be cleared only once. Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* util/u_blitter: implement alpha blending for pipe->blitMarek Olšák2015-08-211-1/+2
|
* gallium/radeon: use helper functions to mark atoms dirtyGrazvydas Ignotas2015-08-111-8/+8
| | | | | | | | | | This is analogous to r300_mark_atom_dirty() used by r300, and will be used by later patches. For common radeon code, appropriate helper is called through a function pointer. No functional changes. Signed-off-by: Marek Olšák <[email protected]>
* r600g: re-enable single-sample fast clearMarek Olšák2015-08-031-6/+1
| | | | | | | Fixed by the CB_SHADER_MASK fix. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* r600g: early exit in r600_clear if there's nothing to doMarek Olšák2015-07-311-0/+2
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* r600g: disable single-sample fast color clear due to hangsMarek Olšák2015-07-031-1/+6
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73528 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82186 Cc: 10.4 10.5 10.6 <[email protected]>
* radeonsi: only flush the right set of caches for CP DMA operationsMarek Olšák2015-01-071-1/+2
| | | | | | | | That's either framebuffer caches or caches for shader resources. The motivation is that framebuffer caches need to be flushed very rarely here. Reviewed-by: Michel Dänzer <[email protected]>
* r600: Use DMA transfers in r600_copy_global_bufferNiels Ole Salscheider2014-10-071-17/+42
| | | | | | v2: Do not demote items that are already in the pool Signed-off-by: Niels Ole Salscheider <[email protected]>
* r600g,radeonsi: add debug option which forces DMA for copy_region and blitMarek Olšák2014-09-121-7/+11
|
* r600g: fix layered clearMarek Olšák2014-09-011-1/+2
| | | | | Cc: [email protected] Acked-by: Michel Dänzer <[email protected]>
* r600g: enable fast depth clear for array textures and cubemapsMarek Olšák2014-09-011-1/+2
| | | | | | I have a piglit test that hits this. Acked-by: Michel Dänzer <[email protected]>
* radeonsi: use r600_draw_rectangle from r600gMarek Olšák2014-08-191-1/+0
| | | | | | Rectangles are easier than triangles for the rasterizer. Reviewed-by: Michel Dänzer <[email protected]>
* r600g,radeonsi: switch all occurences of array_size to util_max_layerMarek Olšák2014-07-281-2/+3
| | | | | | | | | | | | | | | | | | This fixes 3D texture support in all these cases, because array_size is 1 with 3D textures and depth0 actually contains the "array size". util_max_layer is universal and returns the last layer index for any texture target. A lot of the cases below can't actually be hit with 3D textures, but let's be consistent. This fixes a failure in: piglit layered-rendering/clear-color-all-types 3d single_level for r600g and radeonsi, which was caused by an incorrect CMASK size calculation. Cc: [email protected] Reviewed-by: Michel Dänzer <[email protected]>
* util/u_format: move utility function from r600gGrigori Goronzy2014-06-181-11/+1
| | | | | We need this for radeonsi, and it might be useful for other drivers, too.
* r600g,radeonsi: don't use hardware MSAA resolve if dst is fast-clearedMarek Olšák2014-06-031-1/+2
| | | | | | | It doesn't work and our docs say so too. Cc: [email protected] Reviewed-by: Michel Dänzer <[email protected]>
* r600g: BlitFramebuffer should follow render conditionMarek Olšák2014-06-031-5/+6
|
* r600g: fix buffer copying on R600-R700Marek Olšák2014-04-251-0/+6
| | | | | | | This fixes broken rendering in DOTA 2. Cc: 10.0 10.1 [email protected] Reviewed-by: Alex Deucher <[email protected]>