summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
Commit message (Collapse)AuthorAgeFilesLines
* radeon/winsys: add dma ring support to winsys v3Jerome Glisse2013-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | Add ring support, you can create a cs for each ring. DMA ring is bit special regarding relocation as you must emit as much relocation as there is use of the buffer. v2: - Improved comment on relocation changes - Use a single thread to queue cs submittion this simplify driver code while not impacting performances. Rational for this is that you have to wait for all previous submission to have completed so there was never a case while we could have 2 different thread submitting a command stream at the same time. This code just consolidate submission into one single thread per winsys. v3: - Do not use semaphore for empty queue signaling, instead use cond var. This is because it's tricky to maintain an even number of call to semaphore wait and semaphore signal (the number of cs in the stack would for instance make that number vary). Signed-off-by: Jerome Glisse <[email protected]>
* r300g: add a workaround for the AA colorbuffer addressing bug on R500Marek Olšák2013-01-212-7/+42
|
* r300g: allow resolutions up to 1280x1024 with AA optimizations on 1-pipe cardsMarek Olšák2013-01-212-3/+6
| | | | because single-pipe cards have bigger CMASK RAM
* r300g: enable AA optimizations for the RGBA16F formatMarek Olšák2013-01-213-1/+11
|
* r300g: fix and cleanup flushing before clearing CMASK, ZMASK, and HIZMarek Olšák2013-01-154-18/+17
|
* r300g: implement MSAA compression and fast MSAA color clearMarek Olšák2013-01-1513-6/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | These are optimizations which make MSAA a lot faster. The MSAA work is complete with this commit. (except for enablement of AA optimizations for RGBA16F, for which a patch is ready and waiting until the kernel CS checker fix lands) MSAA can't be made any faster as far as hw programming is concerned. The catch is only one process and one colorbuffer can use the optimizations at a time. There usually is only one MSAA colorbuffer, so it shouldn't be an issue. Also, there is a limit on the size of MSAA colorbuffer resolution in terms of megapixels. If the limit is surpassed, the AA optimizations are disabled. The limit is: - 1 Mpix on low-end and some mid-level chipsets (1024x768 and 1280x720) - 2 Mpix on some mid-level chipsets (1600x1200 and 1920x1080) - 3 or 4 Mpix on high-end chipsets (2048x1536 or 2560x1600, respectively) It corresponds to the number of raster pipes (= GB pipes) available, each pipe can hold 1 Mpix of AA compression data. If it's enabled, the driver prints to stdout: radeon: Acquired access to AA optimizations.
* gallium: remove PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATEMarek Olšák2013-01-151-1/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* r300g: set a dummy vertex buffer in context_createMarek Olšák2013-01-141-0/+1
| | | | so that the driver doesn't crash if an app doesn't set any vertex buffers.
* r300g: fix MSAA resolve to an untiled textureMarek Olšák2013-01-143-3/+10
| | | | | RB3D_DEBUG_CTL doesn't help, so I resolve to a tiled temporary texture and then blitting it to the destination one, which we also do in other situations.
* r300g: advertise MSAA support for the RGB10_A2 format on r500Marek Olšák2013-01-142-12/+47
| | | | It seems to be working just fine.
* r300g: allow separate depth and stencil clearMarek Olšák2013-01-141-1/+1
| | | | | | | | The handling of the CAP is broken in st/mesa anyway. Let's just kill it. This commit pretty much enables fast Z clear for FBOs with Z24S8. The driver falls back to clearing with a quad if the fast clear cannot be used. It can still do fast color clear, for example.
* r300g: if both Z and stencil are present, they must be fast-cleared togetherMarek Olšák2013-01-141-6/+11
|
* r300g: allow HiZ with a 16-bit zbufferMarek Olšák2013-01-141-1/+0
|
* r300g: random hyperz cleanupsMarek Olšák2013-01-142-3/+2
|
* Remove hacks for static MakefilesMatt Turner2013-01-131-5/+0
| | | | | | | | | | | v2: Andreas Boll <[email protected]> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <[email protected]> - remove more obsolete hacks v4: Andreas Boll <[email protected]> - add a previously removed TOP variable to fix vgapi build
* Clean up .gitignore filesMatt Turner2013-01-101-1/+0
|
* r300g: Link ralloc.c and register_allocate.c into separate libraryMatt Turner2013-01-101-4/+13
|
* r300g: Build a libtool archiveTom Stellard2013-01-101-7/+11
|
* r300g: Use gallium automake include fileTom Stellard2013-01-101-5/+3
| | | | [mattst88] v2: Remove ARCH_FLAGS/OPT_FLAGS
* r300g: don't set sample positions to the pixel center if MSAA is disabledMarek Olšák2013-01-103-11/+5
| | | | | | | | | | | but an MSAA resource is bound. This effectively makes the MSAA disable switch not affect rasterization, but it still affects the alpha-to-one and alpha-to-coverage states. This hardware just lacks a proper MSAA disable switch. This fixes graphics corruption in sauerbraten. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59194
* r300g: optionally log MSAA resources to stderrMarek Olšák2013-01-093-0/+8
| | | | Set: RADEON_DEBUG=msaa
* r300g: fix the GPU name in the renderer stringMarek Olšák2013-01-091-0/+1
| | | | Broken by ca474f98f2cda5cb333e9f851.
* r300g: fix CS checker errors caused by emit_dsa_stateMarek Olšák2013-01-091-1/+1
| | | | size is 10 on r500 and 8 on r300
* r300g: fix assertion failure in emit_dsa_stateMarek Olšák2013-01-082-3/+5
| | | | Broken by 8ed6b1400bc8a78f46340f41aaf2e88b24c23267.
* radeon/winsys: move radeon family/class identification to winsysJerome Glisse2013-01-075-64/+38
| | | | | | | | 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]>
* r300g: implement MSAAMarek Olšák2013-01-0613-148/+456
| | | | | | | | | | | | | | | | | | | | | | This is not as optimized as r600g - the MSAA compression is missing, so r300g needs a lot of bandwidth (more than r600g to do the same thing). However, if the bandwidth is not an issue for you, you can enjoy this unoptimized MSAA support. The only other missing optimization for MSAA is the fast color clear. MSAA is enabled on r500 only, because that's the only GPU family I tested. That said, MSAA should work on r300 and r400 as well (but you must set RADEON_MSAA=1 to allow it, then turn MSAA on in your app or set GALLIUM_MSAA=n, n >= 2, n <= 6) I will enable the support by default on r300-r400 once someone (other than me) tests those chipsets with piglit. The supported modes are 2x, 4x, 6x. The supported MSAA formats are RGBA8, BGRA8, and RGBA16F (r500 only). Those 3 formats are used for all GL internal formats. Tested with piglit. (I have ported all MSAA tests to GL2.1)
* r300g: simplify DSA state, add ability to patch FG_ALPHA_FUNC while emittingMarek Olšák2013-01-063-79/+46
| | | | Preparation for MSAA and alpha-to-coverage.
* r300g/compiler: add shader emulation for the alpha_to_one stateMarek Olšák2013-01-065-0/+41
|
* r300g: don't check for vertex and index buffer bind flagsMarek Olšák2013-01-042-4/+2
|
* r300g/swtcl: use memcpy to emit indicesMarek Olšák2013-01-041-10/+11
|
* r300g/swtcl: simplify vertex uploadingMarek Olšák2013-01-045-88/+42
| | | | | | | | - skip the vertex buffer reallocation in flush and just use the unsynchronized flag to get new memory. - remove the cruft needed to get around the issues with the vertex buffer reallocation in flush - use pb_buffer instead of pipe_resource
* r300g/swtcl: fix crash when setting vertex buffersMarek Olšák2013-01-041-0/+3
| | | | Broken by e73bf3b805de78299f1a652668ba4e6eab9bac94.
* r300g: don't set PIPE_BIND flags for internal texturesMarek Olšák2013-01-042-21/+1
|
* gallium/u_blitter: unify some parameters into a dstbox parameter in blit_genericMarek Olšák2013-01-041-6/+8
| | | | 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/+3
|
* 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]>
* r300g: Fix visibility CFLAGS in automakeAdam Jackson2013-01-021-0/+1
| | | | | | Note: this is a candidate for the 9.0 stable branch. Signed-off-by: Adam Jackson <[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]>
* winsys/radeon: don't use BIND flags, add a flag for the cache bufmgr insteadMarek Olšák2012-12-124-12/+11
|
* gallium: remove pipe_surface::usageMarek Olšák2012-12-121-1/+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]>
* r300: Don't disable destination read if the src blend factor needs itStefan Dösinger2012-12-071-2/+10
| | | | | | | | | | | The read can remain disabled if the src alpha factor needs it because the result would still be zero. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57984 NOTE: This is a candidate for stable release branches. Signed-off-by: Marek Olšák <[email protected]>
* r300g: Give CLIP_DISABLE another tryStefan Dösinger2012-12-042-2/+3
| | | | Signed-off-by: Marek Olšák <[email protected]>
* r300g: increment num_z_clears only if we have Hyper-ZMarek Olšák2012-12-021-2/+1
|
* r300g: add blacklist for apps that shouldn't steal hyperz accessMarek Olšák2012-12-021-0/+28
|
* r300g: enable Hyper-Z by default on r500Marek Olšák2012-12-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | I fixed the only known bugs on r500 with 0222b2bd4107b9e5cabfbc06c1a6ca3eae. Now there are no piglit regressions with Hyper-Z and all apps I tested seem to work. To summarize how it works: - Only one process can use it at a time. This is a hardware limitation. - The first process to clear a zbuffer gets the exclusive access to use Hyper-Z. - Compositors don't use any zbuffer, so they won't steal it, but some web browsers do, so make sure there's no web browser running if you want your game to use Hyper-Z. - There's no need to restart an app which couldn't get the access to Hyper-Z. Just quit the app which took it, the driver can turn it on for the other app in the middle of rendering. - If an app gets the access to Hyper-Z, it prints "radeon: Acquired Hyper-Z" to stdout. r300-r400: Hyper-Z will be enabled by default on r300-r400 once sufficient testing is done with piglit and Lightsmark at least. Be sure to set the env var RADEON_HYPERZ and run piglit with parameters: -c 0
* r300g: clear the ZB cache before clearing ZMASK or HIZMarek Olšák2012-12-022-2/+8
| | | | | | | This fixes wrong rendering in Lightsmark and the piglit/depthstencil-render-miplevels. I think I fixed Hyper-Z. So far every app seems to work like a charm.
* Revert "r300g: fix occlusion queries when depth test is disabled or zbuffer ↵Marek Olšák2012-12-022-27/+6
| | | | | | is missing" It broke Hyper-Z terribly.
* r300g: refuse to create too large texturesMarek Olšák2012-12-011-0/+15
|