summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
AgeCommit message (Collapse)AuthorFilesLines
2011-06-11i915g: implement fence signallingDaniel Vetter1-2/+6
v2: Incorporated feedback from Jakob Bornecrantz. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-09r600g: VGT_PRIMITIVE_TYPE is specialAlex Deucher2-3/+3
It's a special reg and does not require a flush like the other CONFIG regs. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-09r600g: Handle CONFIG regs properlyAlex Deucher2-32/+31
CONFIG regs (byte offsets 0x8000-0xac00) are single state and the pipeline must be flushed and hw idle when they are changed. Border color regs are in the CONFIG range and this is why a flush is required when changing them. CONTEXT regs (byte offset 0x28000+) are multi-state and those do not require flushes when changing them. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-09r600g: adjust vs/ps gprs on r600/r700 cards when needed.Dave Airlie2-17/+26
Ideally we'd have a compiler and register spilling and all that but this is good enough for now to avoid the gpu hang in piglit, glsl-vs-vec4-indexing-temp-dst-in-nested-loop-combined on r600/r700 cards. based on r600c patch Andre Maasikas <amaasikas@gmail.com> r600c: bump sq gpr resources if a shader needs more than default Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08gallium: s/bool/boolean/Brian Paul2-3/+3
2011-06-08r600g: set enable always bits for r600/r700 sq registers.Dave Airlie1-11/+11
This makes sure these are enabled even if set to 0 at startup. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08r600g: fix warnings in winsys.Dave Airlie1-5/+2
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08r600g: enable dynamic GPR resource management on evergreenDave Airlie1-2/+4
Evergreen can do this as well as cayman, so we should enable it. This fixes a gpu lockup with glsl-vs-vec4-indexing-temp-dst-in-nested-loop-combined.shader_test I need to add a better workaround for r600/r700. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08r600g: only add blocks once to the dirty/enabled lists.Dave Airlie1-3/+5
This caused a loop in some tests. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08r600g: fix regression in recent state changes.Dave Airlie1-0/+1
We weren't emitting the SQ setup regs at all which really is fail. When a state is always enabled we need to add it to the dirty list as well. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08r600g: move simple part of bo reloc processing inline.Dave Airlie2-12/+17
This just moves the messy stuff out of the fast path, and leaves the fast-case in the fast path. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08r600g: split resource emit path from main register emit pathDave Airlie3-17/+102
Since resources don't generally vary in size, this splits the emit path, it also takes into a/c that texture and vertex resources have different number of relocs, and avoids emitting the extra reloc for vertex resources. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08r600g: exit bo per reg scanning loop early.Dave Airlie2-9/+13
Exit this loop early to avoid pointless iterations later. Move the resource bos to the first two regs, it actually doesn't matter which regs we use for this in resource land. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08r600g: reorder evergreen draw packets to be smaller.Dave Airlie1-4/+8
We were always re-emitting lots of unnecessary changes here, avoid doing that. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08r600g: inline r600_bo_reference.Dave Airlie2-11/+2
This relies on the reference member being first, so document it. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08r600g: no need to drop the references here.Dave Airlie1-2/+0
We drop them when we reference the new objects in the next line. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08r600g: use memcmp instead of a loop in state_set_resourceDave Airlie1-5/+3
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-07r600g : fix incorrect size computation in r600_query_resultPierre-Eric Pelloux-Prayer1-1/+2
query->num_results already has the size in dwords of the query buffer. There no need to multiply again. We were reading past the end of the buffer, resulting in reading garbage. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=37028 agd5f: clarify the comment. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-07r600g: remove pre-r6xx asic families and pci idsAlex Deucher1-3/+0
Not sure why these were included originally. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-07r600g: always clear query memoryAlex Deucher1-3/+3
According to the hw documentation, the driver needs to: - allocate 128 bits for each possible DB - clear the 128 bits for each possible DB - write 1 to bits 127 and 63 for upper DBs that don't exist on a particular asic Previously we were only doing these steps if the asic had less than the max possible DBs. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-07r300g: Remove is_r3xxBenjamin Franzke3-215/+9
Use r300_pci_ids.h instead. Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-07r600g: Use radeon pciid list for the family lookup tableBenjamin Franzke2-481/+6
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-07r600g: optimise the draw emission packets for r600/egDave Airlie2-30/+37
This just reduces code size a bit for this chunk. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-07r600g: use an enabled list to track enabled blocks.Dave Airlie3-35/+54
At the end of flushing we were scanning over 450 blocks with generally about 50 enabled. This reduces the scanning to just the list of enabled blocks. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-07r600g/winsys: overhaul resource range/blocks.Dave Airlie3-65/+106
There isn't much point taking the overhead of range/block lookups on resources we aren't going to be getting resource registers at wierd offsets. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-07r600g: split out block initDave Airlie1-46/+55
This just splits this function up as pre-cursor to reusing the internals of it. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-07r600g: move resource setting to its own structures.Dave Airlie3-28/+30
resource setting could be a fair bit more lightweight, this patch just separates the resource structs from the standard reg tracking structs in the driver, later patches will improve the winsys. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-07r600g: only call bo loop if nbos is positive.Dave Airlie1-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 <airlied@redhat.com>
2011-06-07r600g: don't need to call the packet dirty function if not dirty.Dave Airlie2-11/+16
also fix a unneeded dirty check and add a dirty check speedup. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-02r600g: work out range/block etc at state build time.Dave Airlie1-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 <airlied@redhat.com>
2011-06-02r600g: migrate macros from r600_priv.h to r600.hDave Airlie1-10/+0
this is just an precursor change for some later patches. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-02r600g: remote ctx arg to block/range macros.Dave Airlie3-24/+24
These aren't used anymore. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-02r600g: avoid copying unnecessary pieces of a block.Dave Airlie1-11/+20
This just avoids copying stuff if its going to modify the number of dwords later anyways. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-02r600g: force new evergreen blocks for large range.Dave Airlie1-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 <airlied@redhat.com>
2011-05-31r600g: add llano supportAlex Deucher2-0/+13
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-05-31r600g: cs init fixesAlex Deucher3-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 <alexdeucher@gmail.com>
2011-05-31r600g: add context control to start of CSDave Airlie1-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 <airlied@redhat.com>
2011-05-31r600g: don't emit color blend register on original R600.Dave Airlie2-8/+15
The original R600 doesn't have these so don't emit them. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-25r600g: add initial cayman acceleration support.Dave Airlie3-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 <airlied@redhat.com>
2011-05-25r600g: flush the DB dest base as well.Dave Airlie1-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 <airlied@redhat.com>
2011-05-18r600g: bump domain selection up one layer.Dave Airlie3-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 <airlied@redhat.com>
2011-05-15r600g: reduce flushes so only when texture and CB overlap.Dave Airlie2-8/+17
We only need to do this when the texture and CB are using the same memory area. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-15r300g: dynamically ask for and release Hyper-Z accessMarek Olšák3-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.
2011-05-13r600g: don't unmap if we haven't mappedDave Airlie1-2/+4
should fix https://bugs.freedesktop.org/show_bug.cgi?id=37157 Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-13r600g: use a local var to store pointer to which register we are working onDave Airlie1-7/+8
this just makes the code a little bit cleaner. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-13r600g: make range/block act more like a page tableDave Airlie3-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 <airlied@redhat.com>
2011-05-13r600g: reduce r600_reg footprintDave Airlie3-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 <airlied@redhat.com>
2011-05-13r600g: reduce memory usage from range/block hash table.Dave Airlie3-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 <airlied@redhat.com>
2011-05-13r600g: delay mapping until first map request. (v2)Dave Airlie2-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 <airlied@redhat.com>
2011-05-11r600g: fix flushes on rs780/rs880Alex Deucher1-1/+3
They need the same hack as rv670. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=35312 Signed-off-by: Alex Deucher <alexdeucher@gmail.com>