aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state.c
Commit message (Collapse)AuthorAgeFilesLines
* r300/compiler: Clear loop registers in vertex shaders w/o loopsTom Stellard2012-04-131-3/+2
| | | | | | | | | | | | | | The loop registers weren't being cleared, so any shader that was executed after a shader containing loops was at risk of having a loop randomly inserted into it. This fixes over one hundred piglit tests, although these test only failed during full piglit runs and would pass if run individually. The exact number of piglit tests that this patch fixes will vary depending on the version of piglit and the order the tests are run. NOTE: This is a candidate for the stable branches.
* r300g/swtcl: fix polygon offsetMarek Olšák2012-04-041-0/+4
|
* r300g/swtcl: don't enter u_vbuf_mgrMarek Olšák2012-04-041-20/+24
|
* r300g/swtcl: don't print an error when getting ClipVertexMarek Olšák2012-04-041-2/+2
| | | | Draw can do it just fine.
* r300g: set minimum point size to 1.0 for non-sprite non-aa pointsMarek Olšák2012-01-311-4/+5
|
* r300g: nuke the fallback for fragment color clampingMarek Olšák2012-01-251-8/+0
|
* st/mesa: do vertex and fragment color clamping in shadersMarek Olšák2012-01-251-1/+2
| | | | | | | | | | | | | | For ARB_color_buffer_float. Most hardware can't do it and st/mesa is the perfect place for a fallback. The exceptions are: - r500 (vertex clamp only) - nv50 (both) - nvc0 (both) - softpipe (both) We also have to take into account that r300 can do CLAMPED vertex colors only, while r600 can do UNCLAMPED vertex colors only. The difference can be expressed with the two new CAPs.
* Squash-merge branch 'gallium-clip-state'Marek Olšák2012-01-101-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/tgsi/tgsi_strings.c src/mesa/state_tracker/st_atom_clip.c commit d919791f2742e913173d6b335128e7d4c63c0840 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 17:59:22 2012 +0100 d3d1x: adapt to new clip state commit cfec82bca3fefcdefafca3f4555285ec1d1ae421 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:16:51 2012 +0100 gallium/docs: update for clip state changes commit c02bfeb81ad9f62041a2285ea6373bbbd602912a Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:21:43 2012 +0100 tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS commit d4e0a785a6a23ad2f6819fd72e236acb9750028d Author: Brian Paul <[email protected]> Date: Thu Jan 5 08:30:00 2012 -0700 tgsi: consolidate TGSI string arrays in new tgsi_strings.h There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <[email protected]> commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 12:48:09 2012 +0100 gallium: extend user_clip_plane_enable to apply to clip distances commit f1d5016c07f786229ed057effbe55fbfd160b019 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 02:39:09 2012 +0100 nvfx: adapt to new clip state commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 01:41:39 2012 +0100 st/mesa: fix DrawPixels with GL_DEPTH_CLAMP commit c86ad730aa1c017788ae88a55f54071bf222be12 Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:51:30 2012 +0100 nv50: adapt to new clip state commit 3a8ae6ac243bae5970729dc4057fe02d992543dc Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:32:36 2012 +0100 nvc0: adapt to new clip state commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11 Author: Marek Olšák <[email protected]> Date: Thu Dec 29 01:32:51 2011 +0100 draw: initalize pt.user.planes in draw_init This fixes a crash in glean/fpexceptions. commit e3056524b19b56d473f4faff84ffa0eb41497408 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:26:55 2011 +0100 svga: adapt to new clip state commit c5bfa8b37d6d489271df457229081d6bbb51b4b7 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:11:51 2011 +0100 r600g: adapt to new clip state commit f11890905362f62627c4a28a8255b76eb7de7df2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:10:26 2011 +0100 r300g: adapt to new clip state commit e37465327c79a01112f15f6278d9accc5bf3103f Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:39:16 2011 +0100 draw: adapt to new clip state This adds a regression in the LLVM clipping path. Can anybody see anything wrong with the code? It works for every other case, just glean/fpexceptions crashes when doing the "Infinite clip plane test". commit b474d2b18c72d965eefae4e427c269cba5ce6ba2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:14:59 2011 +0100 u_blitter: don't save/set/restore clip state commit 9dd240ea91f523a677af45e8d0adb9e661e28602 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:11:56 2011 +0100 gallium: don't cso_save/set/restore clip state The enable bits are in the rasterizer state. commit a4f7031179f5f4ad524b34b394214b984ac950f6 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:58:55 2011 +0100 gallium: default depth_clip to 1 depth_clip = !depth_clamp commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:14:19 2011 +0100 trace,util: update state logging to new clip state Also dump the other missing flags. commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 10:43:43 2011 +0100 st/mesa: adapt to new clip state commit b7b656a42fca19d7c85267f42649a206a85a2c72 Author: Marek Olšák <[email protected]> Date: Sat Dec 17 15:45:19 2011 +0100 gallium: move state enable bits from clip_state to rasterizer_state
* r300g: rework resource_copy_region, not changing pipe_resourceMarek Olšák2012-01-011-8/+25
| | | | | | | | | | | | | Changing pipe_resource was wrong, because it can be used by other contexts at the same time. This fixes the last possible race condition in r300g that I know of. This also fixes blitting NPOT compressed textures. Random pixels sometimes appeared at the right-hand edge of the texture. Finally, this removes r300_texture_desc::stride_in_pixels. It makes little sense with sampler views and surfaces being able to override width0, height0, and the format entirely.
* r300g: take advantage of KEEP_TILING_FLAGS flush flagMarek Olšák2011-12-131-2/+6
| | | | This fixes at least two multi-context-related races.
* gallium: separate out floating-point CAPs into its own enumMarek Olšák2011-11-221-1/+1
| | | | | | | | | | | | | | | The motivation behind this is to add some self-documentation in the code about how each CAP can be used. The idea is: - enum pipe_cap is only valid in get_param - enum pipe_capf is only valid in get_paramf Which CAPs are floating-point have been determined based on how everybody except svga implemented the functions. svga have been modified to match all the other drivers. Besides that, the floating-point CAPs are now prefixed with PIPE_CAPF_.
* r300g: use u_vbuf_mgr to set/get the index bufferMarek Olšák2011-11-201-11/+1
|
* u_vbuf_mgr: s/u_vbuf_mgr_/u_vbuf_Marek Olšák2011-09-261-4/+4
|
* r300g: max_anisotropy of 1 is not anisotropic filteringMarek Olšák2011-06-111-1/+1
|
* r300g: log when getting unsupported texture formatMarek Olšák2011-05-311-4/+14
|
* r300g: fix occlusion queries when depth test is disabled or zbuffer is missingMarek Olšák2011-05-291-6/+14
| | | | | | | | | | | | | | | From now on, depth test is always enabled in hardware. If depth test is disabled in Gallium, the hardware Z function is set to ALWAYS. If there is no zbuffer set, the colorbuffer0 memory is set as a zbuffer to silence the CS checker. This fixes piglit: - occlusion-query-discard - NV_conditional_render/bitmap - NV_conditional_render/drawpixels - NV_conditional_render/vertex_array
* r300g: dynamically ask for and release Hyper-Z accessMarek Olšák2011-05-151-2/+1
| | | | | We ask for Hyper-Z access when clearing a zbuffer. We release it if no zbuffer clear has been done for 2 seconds.
* r300g: remove redundant state variable hyperz_lockedMarek Olšák2011-05-091-6/+6
|
* r300g/winsys: rename r300->radeon and do a little cleanupMarek Olšák2011-04-181-2/+1
| | | | | Renaming a few files, types, and functions. Also make the winsys independent of r300g.
* r300g: fix another crash with hyperzMarek Olšák2011-04-081-0/+1
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=36086
* r300g: postpone fragment shader state validation until draw_vboMarek Olšák2011-04-051-14/+5
|
* r300g: enable clamping controlsMarek Olšák2011-03-291-5/+9
|
* r300g: implement the texture barrierMarek Olšák2011-03-151-0/+10
|
* r300g: clamp after blending for fixed-point formats onlyMarek Olšák2011-03-141-12/+30
|
* r300g: implement fragment color clamping in the shaderMarek Olšák2011-03-121-0/+6
| | | | | This finishes the implementation of the fragment color clamp control for ARB_color_buffer_float. I don't wanna keep this stuff in a branch...
* r300g: cleanup parameters of draw functionsMarek Olšák2011-03-051-7/+4
|
* r300g: preliminary implementation of clamping controlsMarek Olšák2011-03-041-3/+14
|
* r300g: implement FP16 alpha testMarek Olšák2011-03-041-4/+30
|
* r300g: implement blending for some of non-RGBA8 formatsMarek Olšák2011-03-041-7/+51
| | | | | | | | | | | | | | | | Blending is now fully supported with: - R8_UNORM - R8G8_UNORM - B8G8R8A8_UNORM - R16G16B16A16_FLOAT (r500-only) Blending is partially supported (DST_ALPHA not working) with: - L8A8_UNORM - I8_UNORM - B5G5R5A1_UNORM - B10G10R10A2_UNORM The other formats can't do blending.
* r300g: require DRM 2.3.0 (kernel 2.6.34)Marek Olšák2011-03-021-20/+18
| | | | Running any older kernel is not recommended anyway.
* r300g: fix HiZ memory size computation and deciding when to use HiZMarek Olšák2011-03-011-22/+8
| | | | | | | I removed the HiZ memory management, because the HiZ RAM is too small and I also did it in hope that HiZ will be enabled more often. This also sets aligned strides to HIZ_PITCH and ZMASK_PITCH.
* r300g: remove tracking whether vertex buffers need to be validatedMarek Olšák2011-02-181-9/+0
| | | | | This was getting hard to maintain and didn't really bring any real benefits. Instead, validate buffers when the vertex array state is dirty.
* r300g: fix a race between CS and SET_TILING ioctlsMarek Olšák2011-02-161-6/+1
|
* r300g: fix SIGFPE on debug buildsMarek Olšák2011-02-151-2/+2
|
* gallium: notify drivers about possible changes in user buffer contentsMarek Olšák2011-02-141-0/+2
| | | | Also implement the redefine_user_buffer hook in the drivers.
* r300g: cleanup the draw functionsMarek Olšák2011-02-141-0/+3
|
* r300g: import the last bits of libdrm and cleanup the whole thingMarek Olšák2011-02-111-4/+4
| | | | | | | | | | | | | | Based on Dave's branch. The majority of this commit is a cleanup, mainly renaming things. There wasn't much code to import, just ioctl calls. Also done: - implemented unsynchronized bo_map (important optimization!) - radeon_bo_is_referenced_by_cs is no longer a refcount hack - dropped the libdrm_radeon dependency I'm surprised that this has resulted in less code in the end.
* r300g: consolidate buffers and textures to r300_resourceMarek Olšák2011-02-101-19/+19
| | | | Transfers and create/destroy are still handled separately.
* r300g: simplify WRITE_RELOC API and cleanupMarek Olšák2011-02-101-2/+2
|
* r300g: use the new vertex buffer managerMarek Olšák2011-02-071-154/+33
|
* r300g: rework vertex format fallbackMarek Olšák2011-01-301-4/+5
| | | | | | 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 some bugs with zbuffer compression (v4)Marek Olšák2011-01-271-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 any traces of depth_clampMarek Olšák2011-01-241-2/+1
| | | | | | | | 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: 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-071-14/+24
| | | | | | | 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: skip buffer validation of upload buffers when appropriateMarek Olšák2011-01-061-6/+14
| | | | because the upload buffers are reused for subsequent draw operations.
* r300g: support user buffers as constant buffersMarek Olšák2010-12-291-3/+9
|
* r300g: rename aos to vertex arraysMarek Olšák2010-12-281-2/+2
|
* r300g: add support for color0 writes to all bound color buffers.Dave Airlie2010-12-241-2/+20
| | | | | | Thanks to Marek Olšák for making my initial attempt actually work. Signed-off-by: Dave Airlie <[email protected]>
* 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.