summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
Commit message (Collapse)AuthorAgeFilesLines
* r300g: use the new vertex buffer managerMarek Olšák2011-02-079-560/+144
|
* r300g: do not flush the uploaderMarek Olšák2011-02-061-3/+0
| | | | | We don't have to unmap and recreate the upload buffer when a flush occurs. This should also prevent buffer allocations from failing.
* r300g: RS400 doesn't have ZMASKMarek Olšák2011-02-061-1/+0
|
* r300g: Make the buffer and texture vbtls static const.Henri Verbeet2011-02-032-2/+2
|
* r300g: upload translated indices via the uploaderMarek Olšák2011-01-301-20/+45
|
* r300g: rework vertex format fallbackMarek Olšák2011-01-307-78/+86
| | | | | | 1) Only translate the [min_index, max_index] range. 2) Upload translated vertices via the uploader. 3) Rename valid_vertex_buffer[] to real_vertex_buffer[]
* r300g: fix resource_copy_region for DXT SRGB formatsMarek Olšák2011-01-281-4/+4
|
* r300g: handle PIPE_CAP_ARRAY_TEXTURESMarek Olšák2011-01-281-0/+1
|
* r300g: 8x8-compressed zbuffer can only be point-sampledMarek Olšák2011-01-281-1/+2
|
* r300g: fix and re-enable 8x8 zbuffer compression modeMarek Olšák2011-01-286-44/+69
| | | | Also cleanup the whole thing.
* r300g: print driver info if RADEON_DEBUG=infoMarek Olšák2011-01-274-4/+39
|
* r300g: add winsys flag CAN_AACOMPRESSMarek Olšák2011-01-271-1/+2
|
* r300g: rename flag squaretiling -> drm_2_1_0Marek Olšák2011-01-273-3/+3
|
* r300g: fix some bugs with zbuffer compression (v4)Marek Olšák2011-01-2711-291/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This drops the memblock manager for ZMASK. Instead, only one zbuffer can be compressed at a time. Note that this does not necessarily have to be slower. When there is a large number of zbuffers, compression might be used more often than it was before. It's also easier to debug. How it works: 1) 'clear' turns the compression on. 2) If some other zbuffer is set or the currently-bound zbuffer is used for texturing, the driver decompresses it and then turns the compression off. Notes: - The ZMASK clear has been refactored, so that only one packet3 is used to clear ZMASK. - The 8x8 compression mode is disabled. I couldn't make it work without issues. - Also removed driver-specific stuff from u_blitter. Driver status: - RV530 and R580 appear to just work (finally). - RV570 should work, but there may be an issue that we don't correctly calculate the number of dwords to clear, resulting in a partially uninitialized zbuffer. - RS690 misrenders as if no ZMASK clear happened. No idea what's going on. - RV350 may even hardlock. This issue was already present and this patch doesn't fix it. I think we are still missing some hardware info we need to make the zbuffer compression work fully. Note that there is also an issue with HiZ, resulting in a sort of blocky zigzagged corruption around some objects.
* r300g: remove unused functionMarek Olšák2011-01-241-22/+0
|
* r300g: remove any traces of depth_clampMarek Olšák2011-01-242-3/+2
| | | | | | | | I couldn't make it work. GB_TILE_CONFIG.Z_EXTENDED, which enables per-pixel Z clamping, and VAP_CLIP_CNTL.CLIP_DISABLE, which disables clipping, do help, but they also add regressions like random graphics corruptions in some games.
* r300g: handle PIPE_CAP_INSTANCED_DRAWING in get_paramMarek Olšák2011-01-241-0/+1
|
* Revert "r300g/swtcl: re-enable LLVM"Jakob Bornecrantz2011-01-243-24/+1
| | | | This reverts commit 88550083b3857184445075e70fed8b2eed4952a1.
* r300g: Increase fragment shader limits for r400 cardsTom Stellard2011-01-233-39/+88
| | | | | r400 fragment shaders now support up to 64 temporary registers, 512 ALU instructions, and 512 TEX instructions.
* r300g: support sRGB colorbuffersMarek Olšák2011-01-232-6/+52
| | | | | | We are not required to do the linear->sRGB conversion if ARB_framebuffer_sRGB is unsupported. However I think the conversion should work in hw except for blending, which matches the D3D9 behavior.
* r300/compiler: remove any code related to relative addressing of temporariesMarek Olšák2011-01-234-1/+25
| | | | | The hw can't do it and the code was useless anyway (it's lowered in the GLSL compiler).
* 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.
* 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
|
* 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
|