summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
Commit message (Collapse)AuthorAgeFilesLines
* r600g: only call bo loop if nbos is positive.Dave Airlie2011-06-071-17/+19
| | | | | | | | we don't need to loop over all the registers unless we have some bos in the block, also avoid setting the ctx flags, and move the optional stuff down below this chunk. Signed-off-by: Dave Airlie <[email protected]>
* r600g: don't need to call the packet dirty function if not dirty.Dave Airlie2011-06-072-11/+16
| | | | | | also fix a unneeded dirty check and add a dirty check speedup. Signed-off-by: Dave Airlie <[email protected]>
* r600g: work out range/block etc at state build time.Dave Airlie2011-06-021-4/+2
| | | | | | | | This moves the overhead of working out the range/block to state build time, it also allows the compiler to use constants for a lot of things instead of working them out each time. Signed-off-by: Dave Airlie <[email protected]>
* r600g: migrate macros from r600_priv.h to r600.hDave Airlie2011-06-021-10/+0
| | | | | | this is just an precursor change for some later patches. Signed-off-by: Dave Airlie <[email protected]>
* r600g: remote ctx arg to block/range macros.Dave Airlie2011-06-023-24/+24
| | | | | | These aren't used anymore. Signed-off-by: Dave Airlie <[email protected]>
* r600g: avoid copying unnecessary pieces of a block.Dave Airlie2011-06-021-11/+20
| | | | | | | This just avoids copying stuff if its going to modify the number of dwords later anyways. Signed-off-by: Dave Airlie <[email protected]>
* r600g: force new evergreen blocks for large range.Dave Airlie2011-06-021-0/+3
| | | | | | | This range was 76 dwords long, the 75th dword changes, the first 60 or so don't. split the block so it emits less often. Signed-off-by: Dave Airlie <[email protected]>
* r600g: add llano supportAlex Deucher2011-05-312-0/+13
| | | | Signed-off-by: Alex Deucher <[email protected]>
* r600g: cs init fixesAlex Deucher2011-05-313-5/+12
| | | | | | | | | - all asics need to emit CONTEXT_CONTROL - all r6xx asics need to emit 3D_START_CMDBUF The ddx and r600c already do this. r600g should as well. Signed-off-by: Alex Deucher <[email protected]>
* r600g: add context control to start of CSDave Airlie2011-05-311-0/+13
| | | | | | | | | On my original R600 card this at least lets gnome shell run for a while longer and the piglit r300-readcache test case works a lot more reliably. Still a few more stability issues running a piglit test run though. Signed-off-by: Dave Airlie <[email protected]>
* r600g: don't emit color blend register on original R600.Dave Airlie2011-05-312-8/+15
| | | | | | The original R600 doesn't have these so don't emit them. Signed-off-by: Dave Airlie <[email protected]>
* r600g: add initial cayman acceleration support.Dave Airlie2011-05-253-4/+424
| | | | | | | | | | | | | | | | Cayman is the RadeonHD 69xx series of GPUs. This adds support for 3D acceleration to the r600g driver. Major changes: Some context registers moved around - mainly MSAA and clipping/guardband related. GPR allocation is all dynamic no vertex cache - all unified in texture cache. 5-wide to 4-wide shader engines (no scalar or trans slot) - some changes to how instructions are placed into slots - removal of END_OF_PROGRAM bit in favour of END flow control clause - no vertex fetch clause - TC accepts vertex or texture Signed-off-by: Dave Airlie <[email protected]>
* r600g: flush the DB dest base as well.Dave Airlie2011-05-251-1/+1
| | | | | | | | If we do this for CB bases then we should do it for DB bases. noticed while adding cayman support. Signed-off-by: Dave Airlie <[email protected]>
* r600g: bump domain selection up one layer.Dave Airlie2011-05-183-6/+24
| | | | | | | this is taken from a patch from Mathias Froehlich, just going to stage it in a few pieces. Signed-off-by: Dave Airlie <[email protected]>
* r600g: reduce flushes so only when texture and CB overlap.Dave Airlie2011-05-152-8/+17
| | | | | | | We only need to do this when the texture and CB are using the same memory area. Signed-off-by: Dave Airlie <[email protected]>
* r300g: dynamically ask for and release Hyper-Z accessMarek Olšák2011-05-153-27/+99
| | | | | We ask for Hyper-Z access when clearing a zbuffer. We release it if no zbuffer clear has been done for 2 seconds.
* r600g: don't unmap if we haven't mappedDave Airlie2011-05-131-2/+4
| | | | | | should fix https://bugs.freedesktop.org/show_bug.cgi?id=37157 Signed-off-by: Dave Airlie <[email protected]>
* r600g: use a local var to store pointer to which register we are working onDave Airlie2011-05-131-7/+8
| | | | | | this just makes the code a little bit cleaner. Signed-off-by: Dave Airlie <[email protected]>
* r600g: make range/block act more like a page tableDave Airlie2011-05-133-50/+45
| | | | | | | | | | | | | | | | only allocate the blocks ptr in the range if we ever have one, otherwise don't bother wasting the memory. valgrind glxinfo before: ==967== in use at exit: 419,754 bytes in 706 blocks ==967== total heap usage: 3,552 allocs, 2,846 frees, 3,550,131 bytes allocated after: ==5227== in use at exit: 419,754 bytes in 706 blocks ==5227== total heap usage: 3,452 allocs, 2,746 frees, 3,140,531 bytes allocate Signed-off-by: Dave Airlie <[email protected]>
* r600g: reduce r600_reg footprintDave Airlie2011-05-133-788/+785
| | | | | | | | This drops 6k of the text segment, a minor drop in the ocean, however it also makes the code a lot cleaner and removes a lot of duplicated information, hopefully making it more maintainable. Signed-off-by: Dave Airlie <[email protected]>
* r600g: reduce memory usage from range/block hash table.Dave Airlie2011-05-133-23/+38
| | | | | | | | | | | | | | | | | | This table covered a large range unnecessarily, reduce the address range covered, use the fact that the bottom two bits aren't significant, and remove unused fields from the range struct. It also drops the hash_size/shift in context in favour of a define, which should make doing the math a bit less CPU intensive. valgrind glxinfo Before: ==320== in use at exit: 419,754 bytes in 706 blocks ==320== total heap usage: 3,691 allocs, 2,985 frees, 7,272,467 bytes allocated After: ==967== in use at exit: 419,754 bytes in 706 blocks ==967== total heap usage: 3,552 allocs, 2,846 frees, 3,550,131 bytes allocated Signed-off-by: Dave Airlie <[email protected]>
* r600g: delay mapping until first map request. (v2)Dave Airlie2011-05-132-6/+4
| | | | | | | | | | | | | | Currently r600g always maps every bo, this is quite pointless as it wastes VM and on 32-bit with wine running VM space is quite useful. So with this patch we don't create the mappings until first use, without tiling enabled this probably won't make a major difference on its own, but with tiled staged uploads it should avoid keeping maps for most of the textures unnecessarily. v2: add bo data ptr check Signed-off-by: Dave Airlie <[email protected]>
* r600g: fix flushes on rs780/rs880Alex Deucher2011-05-111-1/+3
| | | | | | | | | They need the same hack as rv670. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=35312 Signed-off-by: Alex Deucher <[email protected]>
* svga/drm: Implement svga_winsys_screen::get_hw_version.José Fonseca2011-05-101-0/+14
|
* r600g: avoid recursion in rv670 flush workaroundAlex Deucher2011-05-061-2/+7
| | | | | | | Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=36914 Signed-off-by: Alex Deucher <[email protected]>
* Add pci id for FirePro 2270Kostas Georgiou2011-05-061-0/+1
| | | | Signed-off-by: Kostas Georgiou <[email protected]>
* r600g: further r6xx cache flush fixesAlex Deucher2011-05-051-12/+10
| | | | | | | Don't emit sync packets for additional CBs or DB. Spotted by Fredrik Höglund. Signed-off-by: Alex Deucher <[email protected]>
* r600g: add rv670 flushing workaround.Dave Airlie2011-05-061-0/+4
| | | | | | | Hopefully we can find out the proper fix for this, but for now this makes the fbo mipmap tests pass on my rv670 (x2 card). Signed-off-by: Dave Airlie <[email protected]>
* r600g: fix cache flushes on r6xxAlex Deucher2011-05-061-9/+27
| | | | | | | | | | | | | | | r6xx asics have some problems with the surface sync logic for the CB and DB. It's recommended to use the event write interface for flushing the DB/CB caches rather than the sync packets. A single event write flush flushes all dst caches, so we only need one for all CBs and DB. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=35312 Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: do RV6xx base updates inline with state updates.Dave Airlie2011-05-052-54/+22
| | | | | | | | | This seems more in line with what the documentation suggests we should be doing. It doesn't fix the rv635 regression, though I thought it might, so it means I've no idea whats actually going wrong there. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* i915g: add const qualifier to silence warningBrian Paul2011-05-031-1/+1
|
* r600g: add some new pci idsAlex Deucher2011-05-031-0/+4
| | | | Signed-off-by: Alex Deucher <[email protected]>
* winsys/wayland: Fix typo in MakefileBenjamin Franzke2011-04-251-1/+1
| | | | Reported by dir1212 on irc.
* winsys: Add wayland shm sw winsysBenjamin Franzke2011-04-254-0/+343
|
* r600g: remove some pointless and unused functionsMarek Olšák2011-04-253-21/+3
|
* r600g: do not reset device to 0 when doing unrelated operationsMarek Olšák2011-04-251-2/+0
| | | | Seems to be a copy-paste bug.
* r600g: fix userspace fences againAlex Deucher2011-04-201-0/+3
| | | | | | | reinstate b7617346dcff50a66a10c61b95c33682cf629c9e after the rework in 6067a2a67f9a7aab2aee051469bea8af03747a95. Signed-off-by: Alex Deucher <[email protected]>
* r600g: don't flush the dest caches on every drawFredrik Höglund2011-04-202-67/+141
| | | | | | | Keep track of when the caches are dirty, and only flush them when the framebuffer state is set and when the context is flushed. Signed-off-by: Dave Airlie <[email protected]>
* r600g: make loop const always flushDave Airlie2011-04-192-2/+2
| | | | | | | | this needs revisiting, we really don't want to be flushing all 32 of these, but currently we don't flush any of them, and it seems to have caused a regression as reported on irc with doom3 on evergreen. Signed-off-by: Dave Airlie <[email protected]>
* r600g: add dirty tracking to context reg.Dave Airlie2011-04-191-7/+12
| | | | | | just makes the code more consistent. Signed-off-by: Dave Airlie <[email protected]>
* r600g: deinline some large functions.Dave Airlie2011-04-192-76/+83
| | | | | | really at these sort of sizes these are pointless inlines. Signed-off-by: Dave Airlie <[email protected]>
* r600g: consolidate r600/evergreen code for resource emission.Dave Airlie2011-04-193-41/+8
| | | | | | These really didn't have much difference, and totally not inline material. Signed-off-by: Dave Airlie <[email protected]>
* r600g: don't flush caches if we already did so, even for a subset of the flagsBas Nieuwenhuizen2011-04-191-2/+2
| | | | | | | Merging the flushes that are left doesn't seem to give a significant performance improvement Signed-off-by: Dave Airlie <[email protected]>
* r600g: attempt to avoid emitting resources that are the sameDave Airlie2011-04-191-18/+49
| | | | | | This just avoids reemitting resources that haven't changed. Signed-off-by: Dave Airlie <[email protected]>
* r600g: modify block to only emit the first few dirty registers. (v2)Dave Airlie2011-04-193-11/+37
| | | | | | | | | | | This gets me from 2200 to 1978 dwords for a gears frame. This is due to us having some 32-dwords blocks in the SPI, that we only modify the first dwords off. v2: fix dirty reg count from Bas Nieuwenhuizen Signed-off-by: Dave Airlie <[email protected]>
* r600g: track dirty registers better. (v2)Dave Airlie2011-04-193-121/+170
| | | | | | | | | | | | | | | | | | | | | | | | | This is a first step to decreasing the CPU usage, by decreasing how much stuff we pass to the GPU and hence to the kernel CS checker. This adds a check to see if the values we need to write are actually dirty, and avoids writing if they are. However certain register need to always be written so we add a new flag to say which ones should be always written if used. (Note this could probably be done cleaner with a larger refactoring, since I think the CONST_BUFFER_SIZE_PS/VS and CONST_CACHE_PS/VS might be better off as a special state). It also moves the need_bo to be a flags on the register now. With this, a frame of gears goes from emitting 3k dwords to emitting 2k dwords, and I'm sure it could get a lot smaller. v2: fix some evergreen dirty bits. Original patch from: Bas Nieuwenhuizen, I NIHed nearly the same thing before seeing his patch on the list, oops. Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Dave Airlie <[email protected]>
* r300g/winsys: rename r300->radeon and do a little cleanupMarek Olšák2011-04-1810-146/+461
| | | | | Renaming a few files, types, and functions. Also make the winsys independent of r300g.
* r600g: use some loops.Dave Airlie2011-04-172-29/+24
| | | | | | | unrolling loops is for Gentoo users, and I really want to put something else inside these loops later. Signed-off-by: Dave Airlie <[email protected]>
* r600g: consolidate the same piece of cut-n-paste code into a function.Dave Airlie2011-04-173-42/+21
| | | | Signed-off-by: Dave Airlie <[email protected]>
* r300g: fix crash when adding a new relocationMarek Olšák2011-04-081-1/+2
| | | | | | | No idea why it's so hard to reproduce. Broken with: c35572352e3e92683988ee8d151b47f4190d62f9 Thanks to Toni Spets for assistance.