summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote branch 'origin/master' into pipe-videoChristian König2011-01-128-93/+93
|\ | | | | | | | | Conflicts: src/gallium/drivers/r600/r600_shader.c
| * r300g: add debug option for buffer upload loggingMarek Olšák2011-01-103-0/+9
| |
| * r300g: do not upload the same user buffer several timesMarek Olšák2011-01-091-1/+3
| | | | | | | | Performance++.
| * r300g: fix crash when flushing ZMASKMarek Olšák2011-01-095-92/+81
| | | | | | | | | | | | | | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=32912 The fix is to call update_derived_state before user buffer uploads. I've also moved some code around. Unfortunately, there are still some ZMASK-related bugs which cause misrendering, i.e. flushing doesn't always work and glean/fbo fails.
* | Merge remote branch 'origin/master' into pipe-videoChristian König2011-01-0821-411/+503
|\| | | | | | | | | | | | | | | | | | | Conflicts: configure.ac src/gallium/drivers/r600/eg_asm.c src/gallium/drivers/r600/r600_asm.c src/gallium/drivers/r600/r600_asm.h src/gallium/include/pipe/p_format.h src/gallium/targets/dri-nouveau/Makefile
| * r300g: fix a surface leak when flushing ZMASKMarek Olšák2011-01-081-0/+1
| |
| * r300g: rework command submission and resource space checkingMarek Olšák2011-01-085-97/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation behind this rework is to get some speed by reducing CPU overhead. The performance increase depends on many factors, but it's measurable (I think it's about 10% increase in Torcs). This commit replaces libdrm's radeon_cs_gem with our own implemention. It's optimized specifically for r300g, but r600g could use it as well. Reloc writes and space checking are faster and simpler than their counterparts in libdrm (the time complexity of all the functions is O(1) in nearly all scenarios, thanks to hashing). (libdrm's radeon_bo_gem is still being used in the driver.) It works like this: cs_add_reloc(cs, buf, read_domain, write_domain) adds a new relocation and also adds the size of 'buf' to the used_gart and used_vram winsys variables based on the domains, which are simply or'd for the accounting purposes. The adding is skipped if the reloc is already present in the list, but it accounts any newly-referenced domains. cs_validate is then called, which just checks: used_vram/gart < vram/gart_size * 0.8 The 0.8 number allows for some memory fragmentation. If the validation fails, the pipe driver flushes CS and tries do the validation again, i.e. it validates only that one operation. If it fails again, it drops the operation on the floor and prints some nasty message to stderr. cs_write_reloc(cs, buf) just writes a reloc that has been added using cs_add_reloc. The read_domain and write_domain parameters have been removed, because we already specify them in cs_add_reloc. The space checking has been tested by putting small values in vram/gart_size variables.
| * r300g: Remove invalid assertion.Łukasz Krotowski2011-01-081-1/+0
| | | | | | | | | | | | | | Invalid after be1af4394e060677b7db6bbb8e3301e38a3363da (user buffer creation with width0 == ~0). Signed-off-by: Marek Olšák <[email protected]>
| * r300g: derive user buffer sizes at draw timeMarek Olšák2011-01-079-104/+144
| | | | | | | | | | | | | | This only uploads the [min_index, max_index] range instead of [0, userbuf size], which greatly speeds up user buffer uploads. This is also a prerequisite for atomizing vertex arrays in st/mesa.
| * r300g: fix corruption when nr_cbufs==0 and multiwrites enabledMarek Olšák2011-01-061-1/+2
| | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=32634
| * r300g: remove the buffer range checkingMarek Olšák2011-01-062-60/+1
| | | | | | | | | | | | It's no longer needed because the upload buffer remains mapped while the CS is being filled (openarena, ut2004 and others that this code was for do not use VBOs by default).
| * r300g: skip buffer validation of upload buffers when appropriateMarek Olšák2011-01-065-8/+36
| | | | | | | | because the upload buffers are reused for subsequent draw operations.
| * u_upload_mgr: new featuresMarek Olšák2011-01-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added a parameter to specify a minimum offset that should be returned. r300g needs this to better implement user buffer uploads. This weird requirement comes from the fact that the Radeon DRM doesn't support negative offsets. - Added a parameter to notify a driver that the upload flush occured. A driver may skip buffer validation if there was no flush, resulting in a better performance. - Added a new upload function that returns a pointer to the upload buffer directly, so that the buffer can be filled e.g. by the translate module.
| * r300g: support user buffers as constant buffersMarek Olšák2010-12-291-3/+9
| |
| * r300g: rename aos to vertex arraysMarek Olšák2010-12-286-45/+45
| |
| * r300g: mark vertex arrays as dirty after a buffer_offset changeMarek Olšák2010-12-281-0/+1
| | | | | | | | | | | | We shouldn't hit this bug in theory. NOTE: This is a candidate for the 7.10 branch.
| * r300g: simplify buffer_transfer_inline_writeMarek Olšák2010-12-251-8/+8
| |
| * r300g: simplify the code for buffer uploadsMarek Olšák2010-12-253-62/+32
| |
| * r300g: user index buffers are always alignedMarek Olšák2010-12-251-1/+2
| |
| * r300g: increase the size of upload buffersMarek Olšák2010-12-252-4/+3
| |
| * r300g/swtcl: re-enable LLVMMarek Olšák2010-12-243-1/+24
| | | | | | | | | | | | Based on a patch from Drill <[email protected]>. NOTE: This is a candidate for the 7.10 branch.
| * r300g: turn back on rv530 hiz.Dave Airlie2010-12-241-1/+1
| | | | | | | | | | | | still needs RADEON_HYPERZ=y env var. Signed-off-by: Dave Airlie <[email protected]>
| * r300g: hyperz fixing typo.Dave Airlie2010-12-241-2/+2
| | | | | | | | | | | | | | | | | | Really no idea why I didn't see this before, but these values were opposite the register spec. this seems to fix rv530 HiZ on my laptop, will reenable in next commit. Signed-off-by: Dave Airlie <[email protected]>
| * r300g: add support for color0 writes to all bound color buffers.Dave Airlie2010-12-245-9/+54
| | | | | | | | | | | | Thanks to Marek Olšák for making my initial attempt actually work. Signed-off-by: Dave Airlie <[email protected]>
| * r300g: use a simpler fallback for misaligned ushort indices with trianglesMarek Olšák2010-12-231-26/+53
| | | | | | | | | | | | If 'start' is odd, render the first triangle with indices embedded in the command stream, which adds 3 to 'start' and makes it even. Then continue with the fast path.
| * r300g: add support for B2G3R3 texturingMarek Olšák2010-12-232-0/+9
| |
* | Merge remote branch 'origin/master' into pipe-videoChristian König2010-12-2210-71/+77
|\|
| * r300g: Remove unnecessary headers.Vinson Lee2010-12-222-3/+0
| |
| * r300g: fix precision issues with B10G10R10A2Marek Olšák2010-12-221-0/+2
| |
| * r300g: support B10G10R10A2 render targets only with DRM 2.8.0 or later versionsMarek Olšák2010-12-222-3/+6
| |
| * gallium: remove unused 'buf' parameter in pipe_buffer_unmapMarek Olšák2010-12-202-9/+7
| |
| * r300g: optimize the fallback for misaligned ushort indicesMarek Olšák2010-12-192-2/+22
| |
| * r300g: finally fix the texture corruption on r3xx-r4xxMarek Olšák2010-12-171-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Even though a bound texture stays bound when calling set_fragment_sampler_views, it must be assigned a new cache region depending on the occupancy of other texture units. This fixes: https://bugs.freedesktop.org/show_bug.cgi?id=28800 Thanks to Álmos <[email protected]> for finding the bug in the code. NOTE: This is a candidate for both the 7.9 and 7.10 branches.
| * r300g: fixup rs690 tiling stride alignment calculations.Dave Airlie2010-12-133-31/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | The RS690 memory controller prefers things to be on a different boundary than the discrete GPUs, we had an attempt to fix this, but it still failed, this consolidates the stride calculation into one place and removes the really special case check. This fixes gnome-shell and 16 piglit tests on my rs690 system. NOTE: This is a candidate for both the 7.9 and 7.10 branches. Signed-off-by: Dave Airlie <[email protected]>
| * r300g: fix rendering with a vertex attrib having a zero strideMarek Olšák2010-12-111-7/+7
| | | | | | | | | | | | | | | | | | The hardware apparently does support a zero stride, so let's use it. This fixes missing objects in ETQW, but might also fix a ton of other similar-looking bugs. NOTE: This is a candidate for both the 7.9 and 7.10 branches.
* | Merge remote branch 'origin/master' into pipe-videoChristian König2010-12-1133-481/+693
|\| | | | | | | | | | | Conflicts: src/gallium/drivers/r600/r600_pipe.c src/gallium/drivers/r600/r600_texture.c
| * r300g: also revalidate the SWTCL vertex buffer after its reallocationMarek Olšák2010-12-071-0/+1
| |
| * r300g: validate buffers only if any of bound buffers is changedMarek Olšák2010-12-077-13/+39
| | | | | | | | This prevents needless buffer validation (CS space checking).
| * r300g: cache packet dwords of 3D_LOAD_VBPNTR in a command buffer if possibleMarek Olšák2010-12-073-15/+65
| | | | | | | | | | | | | | | | | | It's not always possible to preprocess the content of 3D_LOAD_VBPNTR in a command buffer, because the offset to all vertex buffers (which the packet depends on) is derived from the "start" parameter of draw_arrays and the "indexBias" parameter of draw_elements, but we can at least lazily make a command buffer for the case when offset == 0, which should occur most of the time.
| * r300g: optimize looping over atomsMarek Olšák2010-12-0513-119/+121
| | | | | | | | This also removes DBG_STATS (the stats can be obtained with valgrind instead).
| * r300g: cleanup winsysMarek Olšák2010-12-055-11/+12
| |
| * r300g: try and use all of vertex constant spaceDave Airlie2010-12-054-47/+62
| | | | | | | | | | | | | | | | | | | | Finished up by Marek Olšák. We can set the constant space to use a different area per-call to the shader, we can avoid flushing the PVS as often as we do by spreading out the constants across the whole constant space. Signed-off-by: Marek Olšák <[email protected]>
| * r300g: do not use the index parameter in set_constant_bufferMarek Olšák2010-12-051-2/+1
| | | | | | | | | | | | It appears to be a constant buffer index (in case there are more constant buffers explicitly used by a shader), i.e. something that Gallium currently does not use. We treated it incorrectly as the offset to a constant buffer.
| * r300g: one more r500_index_bias_supported leftoverMarek Olšák2010-12-031-2/+1
| |
| * r300g: add capability bit index_bias_supportedMarek Olšák2010-12-036-12/+10
| | | | | | | | .. instead of calling r500_index_bias_supported(..) every draw call.
| * r300g: do not remove unused constants if we are not near the limitMarek Olšák2010-12-032-2/+9
| |
| * r300g: fix pointer arithmetic with void* in transfer_inline_writeMarek Olšák2010-12-032-3/+3
| |
| * r300g: implement simple transfer_inline_write for buffersMarek Olšák2010-12-031-10/+38
| | | | | | | | | | r600g might need something like that as well. This speeds up constant buffer upload a bit.
| * r300g: use internal BO handle for add_buffer and write_relocMarek Olšák2010-12-0310-35/+49
| | | | | | | | | | | | | | Small perf improvement in ipers. radeon_drm_get_cs_handle is exactly what this commit tries to avoid in every write_reloc.
| * r300g: fix buildMarek Olšák2010-12-031-1/+1
| |