summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
Commit message (Collapse)AuthorAgeFilesLines
* r600g: implement buffer copying using CP DMA for R7xx, Evergreen, CaymanMarek Olšák2013-01-089-24/+140
| | | | | | | | | | R6xx doesn't work - the issue seems to be with flushing (sometimes the destination buffer contains garbage). There are no hangs, so we're good. R7xx doesn't seem to have any alignment restriction despite our initial thinking. Everything just works. Reviewed-by: Alex Deucher <[email protected]>
* r600g: set the virtual address for the htile bufferAlex Deucher2013-01-072-2/+4
| | | | | | | | | Fixes cayman and TN with htile enabled. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=59089 https://bugs.freedesktop.org/show_bug.cgi?id=58667 Possibly others. Signed-off-by: Alex Deucher <[email protected]>
* radeon/winsys: move radeon family/class identification to winsysJerome Glisse2013-01-074-62/+13
| | | | | | | | Upcoming async dma support rely on winsys knowing about GPU families. Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g/radeon/winsys: indentation cleanupJerome Glisse2013-01-072-10/+10
| | | | | | Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: flush FMASK and CMASK at the end of CSMarek Olšák2013-01-061-1/+3
|
* r600g: implement 3D transfersMarek Olšák2013-01-041-22/+32
| | | | That means we can map and read multiple slices with one transfer_map call.
* gallium/u_blitter: unify some parameters into a dstbox parameter in blit_genericMarek Olšák2013-01-041-3/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: remove useless parameter from blitter_default_dst_textureMarek Olšák2013-01-041-1/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/radeon: send the END_OF_FRAME flag to the DRMMarek Olšák2013-01-041-1/+2
|
* gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2013-01-041-1/+2
| | | | | | | | | | | | | | | | | Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]>
* r600g: fix int->bool conversion in fence_signalledMarek Olšák2013-01-041-1/+1
| | | | NOTE: This is a candidate for the stable branches.
* r600g: rename GPU_FLUSH -> INVAL_READ_CACHESMarek Olšák2012-12-225-11/+11
| | | | because that's what it does.
* r600g: remove redundant parameter alloc_bo from r600_texture_create_objectMarek Olšák2012-12-221-6/+5
| | | | alloc_bo == !buf
* r600g: always use a tiled resource as the destination of MSAA resolveMarek Olšák2012-12-213-8/+16
| | | | | | | | | i.e. we have to allocate a temporary tiled resource if dst isn't tiled. This fixes hardlocks on r6xx-r7xx, though using a linear resource is forbidden on later asics as well. NOTE: This is a candidate for the stable branches.
* r600g: remove a false commentMarek Olšák2012-12-211-1/+0
|
* r600g: don't suspend TIME_ELAPSED queries during flushingMarek Olšák2012-12-214-54/+8
| | | | | According to the GL spec, the result should be equivalent to comparing two timestamps.
* r600g: add cs tracing infrastructure for lockup pin pointingJerome Glisse2012-12-205-2/+106
| | | | | | | | It's a build time option you need to set R600_TRACE_CS to 1 and it will print to stderr all cs along as cs trace point value which gave last offset into a cs process by the GPU. Signed-off-by: Jerome Glisse <[email protected]>
* r600g: add htile support v16Jerome Glisse2012-12-2010-24/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | htile is used for HiZ and HiS support and fast Z/S clears. This commit just adds the htile setup and Fast Z clear. We don't take full advantage of HiS with that patch. v2 really use fast clear, still random issue with some tiles need to try more flush combination, fix depth/stencil texture decompression v3 fix random issue on r6xx/r7xx v4 rebase on top of lastest mesa, disable CB export when clearing htile surface to avoid wasting bandwidth v5 resummarize htile surface when uploading z value. Fix z/stencil decompression, the custom blitter with custom dsa is no longer needed. v6 Reorganize render control/override update mecanism, fixing more issues in the process. v7 Add nop after depth surface base update to work around some htile flushing issue. For htile to 8x8 on r6xx/r7xx as other combination have issue. Do not enable hyperz when flushing/uncompressing depth buffer. v8 Fix htile surface, preload and prefetch setup. Only set preload and prefetch on htile surface clear like fglrx. Record depth clear value per level. Support several level for the htile surface. First depth clear can't be a fast clear. v9 Fix comments, properly account new register in emit function, disable fast zclear if clearing different layer of texture array to different value v10 Disable hyperz for texture array making test simpler. Force db_misc_state update when no depth buffer is bound. Remove unused variable, rename depth_clearstencil to depth_clear. Don't allocate htile surface for flushed depth. Something broken the cliprect change, this need to be investigated. v11 Rebase on top of newer mesa v12 Rebase on top of newer mesa v13 Rebase on top of newer mesa, htile surface need to be initialized to zero, somehow special casing first clear to not use fast clear and thus initialize the htile surface with proper value does not work in all case. v14 Use resource not texture for htile buffer make the htile buffer size computation easier and simpler. Disable preload on evergreen as its still troublesome in some case v15 Cleanup some comment and remove some left over v16 Define name for bit 20 of CP_COHER_CNTL Signed-off-by: Pierre-Eric Pelloux-Prayer <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Jerome Glisse <[email protected]>
* r600g: rework flusing and synchronization pattern v7Jerome Glisse2012-12-208-162/+89
| | | | | | | | | | | | | | | This bring r600g allmost inline with closed source driver when it comes to flushing and synchronization pattern. v2-v4: history lost somewhere in outer space v5: Fix compute size of flushing, use define for flags, update worst case cs size requirement for flush, treat rs780 and newer as r7xx when it comes to streamout. v6: Fix num dw computation for framebuffer state, remove dead code, use define instead of hardcoded value. v7: Remove dead code Signed-off-by: Jerome Glisse <[email protected]>
* gallium: s/PIPE_CAP_TIMER_QUERY/PIPE_CAP_QUERY_TIME_ELAPSED/José Fonseca2012-12-201-1/+1
| | | | | | | | To better reflect what it is being advertised. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* r600g: add assertions to prevent creation of invalid surfacesMarek Olšák2012-12-203-16/+18
|
* r600g: refactor and make streamout dumping more informativeMarek Olšák2012-12-201-12/+21
| | | | Reviewed-by: Dave Airlie <[email protected]>
* r600g: try to fix streamout for the cases where BURST_COUNT > 0Marek Olšák2012-12-201-1/+1
| | | | | | | | | | The burst was incorrectly used, because ELEM_SIZE was always 0. I don't know if the burst works, because I don't know of any test which uses it. NOTE: This is a candidate for the stable branches. Reviewed-by: Dave Airlie <[email protected]>
* r600g: lower stream outputs with dst_offset < start_componentMarek Olšák2012-12-201-7/+47
| | | | | | This fixes streamout breakage caused by the varying packing. Reviewed-by: Dave Airlie <[email protected]>
* r600g: use r600_get_temp to get temporaries for CLIPDIST shader outputsMarek Olšák2012-12-201-3/+11
| | | | | | I need this to be able to use r600_get_temp in the function later. Reviewed-by: Dave Airlie <[email protected]>
* Revert "r600g: work around ddx over alignment"Jerome Glisse2012-12-191-9/+3
| | | | | | This reverts commit d8287bac1fd4a77abc2db38de134f14176740d23. Cause more issue than it fix. Need to think of a proper solution.
* r600g: work around ddx over alignmentJerome Glisse2012-12-181-3/+9
| | | | | | | | | This force surface allocated from ddx to be consider as height aligned on 8 and fix 1D->2D tiling transition that result from this. Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeon/llvm: improve cube map handlingVadim Girlin2012-12-181-0/+3
| | | | | | | | Add support for TEX2, TXB2, TXL2, fix SHADOWCUBE Signed-off-by: Vadim Girlin <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Tested-by: Michel Dänzer <[email protected]>
* r600g: initialize inst_mod in r600_tex_from_byte_streamVadim Girlin2012-12-181-0/+2
| | | | Signed-off-by: Vadim Girlin <[email protected]>
* r600g: fixup offset types for printingDave Airlie2012-12-162-4/+4
| | | | | | This allows the debug code to at least show the sign properly. Signed-off-by: Dave Airlie <[email protected]>
* r600g/radeonsi: Silence warningsMaxence Le Dore2012-12-134-30/+47
| | | | Reviewed-by: Tom Stellard <[email protected]>
* r600g: use load_ar checks with llvm output.Vincent Lejeune2012-12-131-0/+6
| | | | Reviewed-by: Tom Stellard <[email protected]>
* r600g: suballocate memory for fetch shaders from a large bufferMarek Olšák2012-12-126-19/+37
| | | | | | | | | | Fetch shaders are usually destroyed at the context destruction by the state tracker, so we can put them all in a large buffer without wasting memory. This reduces the number of relocations sent to the kernel a little bit. Tested-by: Aaron Watry <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: suballocate memory for the STRMOUT_BUFFER_FILLED_SIZE registerMarek Olšák2012-12-125-16/+28
| | | | | | | | | | Instead of having a 4-byte buffer for each streamout target, we suballocate each dword from a 4K buffer. This further reduces the overall number of relocations. Tested-by: Aaron Watry <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: use u_upload_mgr for allocating staging transfer buffersMarek Olšák2012-12-121-15/+15
| | | | | | | | | | u_upload_mgr suballocates memory from a large buffer and maps the allocated range (unsychronized), which is perfect for short-lived staging buffers. This reduces the number of relocations sent to the kernel. Tested-by: Aaron Watry <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* winsys/radeon: don't use BIND flags, add a flag for the cache bufmgr insteadMarek Olšák2012-12-123-6/+8
|
* gallium: remove pipe_surface::usageMarek Olšák2012-12-123-6/+0
| | | | | | Not really used by anybody now. Reviewed-by: Brian Paul <[email protected]>
* gallium: fix cap warnings for tbo cap.Dave Airlie2012-12-121-0/+1
| | | | Signed-off-by: Dave Airlie <[email protected]>
* gallium/u_blitter: fix conflict with u_memory.hMarek Olšák2012-12-072-0/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* r600g: transfers of MSAA color textures should do the resolveMarek Olšák2012-12-071-5/+32
| | | | | | so that ReadPixels and various fallbacks work. Reviewed-by: Brian Paul <[email protected]>
* r600g: mirror simplification of if/break opcodesVincent Lejeune2012-11-291-32/+12
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* r600g: separate resource_id and sampler_id tex info in tgsi-to-llvmVincent Lejeune2012-11-291-0/+3
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* r600g: fix broken streamout if streamout_begin caused a context flushMarek Olšák2012-11-231-2/+6
| | | | | | | This fixes graphics corruption in the case where the DISCARD_RANGE flag is used to map a buffer. NOTE: This is a candidate for the stable branches.
* r600g: fix ARB_map_buffer_alignment with unaligned offsets and staging buffersMarek Olšák2012-11-223-3/+8
|
* r600g: use LINEAR_ALIGNED tiling for 1D array textures and if height0 <= 3Marek Olšák2012-11-131-1/+3
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: untiled window-system buffers should be LINEAR_ALIGNEDMarek Olšák2012-11-131-1/+1
| | | | | | though I guess the DDX allocates them as LINEAR_GENERAL Reviewed-by: Alex Deucher <[email protected]>
* r600g: use LINEAR_ALIGNED tiling for 1D texturesMarek Olšák2012-11-131-1/+2
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: use LINEAR_ALIGNED tiling for staging textures, reorder the codeMarek Olšák2012-11-131-6/+10
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove redundant parameter in r600_init_surfaceMarek Olšák2012-11-131-6/+4
|
* r600g: fix printk warningsDave Airlie2012-11-101-4/+4
| | | | | | | | | | | | | Brian reported seeing: r600_texture.c: In function ‘r600_texture_create_object’: r600_texture.c:468:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ r600_texture.c:468:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ r600_texture.c:485:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ r600_texture.c:485:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ this should wrap over them fine. Signed-off-by: Dave Airlie <[email protected]>