aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r200/r200_swtcl.c
Commit message (Collapse)AuthorAgeFilesLines
* r200: fix r200 large pointsRoland Scheidegger2010-11-101-4/+3
| | | | | | | | | | | | | | | | | | | | DD_POINT_SIZE got never set for some time now (as it was set only in ifdefed out code), which caused the r200 driver to use the point primitive mistakenly in some cases which can only do size 1 instead of point sprite. Since the logic to use point instead of point sprite prim is flaky at best anyway (can't work correctly for per-vertex point size), just drop this and always emit point sprites (except for AA points) - reasons why the driver tried to use points for size 1.0 are unknown though it is possible they are faster or more conformant. Note that we can't emit point sprites without point sprite cntl as that might result in undefined point sizes, hence need drm version check (which was unnecessary before as it should always have selected points). An alternative would be to rely on the RE point size clamp controls which could clamp the size to 1.0 min/max even if the SE point size is undefined, but currently always use 0 for min clamp. (As a side note, this also means the driver does not honor the gl spec which mandates points, but not point sprites, with zero size to be rendered as size 1.) This should fix recent reports of https://bugs.freedesktop.org/show_bug.cgi?id=702. This is a candidate for the mesa 7.9 branch.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-16/+16
|
* r200: revalidate after radeon_update_renderbuffersDaniel Vetter2010-10-111-0/+3
| | | | | | | | | | | | | | | | | By calling radeon_draw_buffers (which sets the necessary flags in radeon->NewGLState) and revalidating if NewGLState is non-zero in r200TclPrimitive. This fixes an assert in libdrm (the color-/ depthbuffer was changed but not yet validated) and and stops the kernel cs checker from complaining about them (when they're too small). Thanks to Mario Kleiner for the hint to call radeon_draw_buffer (instead of my half-broken hack). v2: Also fix the swtcl r200 path. Cc: Mario Kleiner <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
* radeon: Add DRI2 flush extension support, so we synchronize properly.Mario Kleiner2010-08-021-0/+2
| | | | | | | | | | | | | | When a DRI2 swap buffer is pending we need to make sure we have the flush extension so radeon doesn't resume rendering to or reading from the not yet blitted front buffer. This fixes: https://bugs.freedesktop.org/show_bug.cgi?id=28341 https://bugs.freedesktop.org/show_bug.cgi?id=28410 Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Mario Kleiner <[email protected]>
* Revert "radeon: Add DRI2 flush extension to so we synchronize properly."Jerome Glisse2010-08-021-2/+0
| | | | This reverts commit 8446f257b3e3ca4a3eb2c79bc357e46343e04e87.
* radeon: Add DRI2 flush extension to so we synchronize properly.Mario Kleiner2010-08-021-0/+2
| | | | | | | | | | | | | | | | | When DRI2 swap buffer is pending (copy buffer not pageflipping) we need to make sure we have the flush extension so radeon doesn't resume rendering on the not yet blitted front buffer. Modified version of Jerome's patch to add flush extension in the correct place. This prepares a possible fix for: https://bugs.freedesktop.org/show_bug.cgi?id=28341 https://bugs.freedesktop.org/show_bug.cgi?id=28410 Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Mario Kleiner <[email protected]>
* Remove stray defines of HAVE_RGBAIan Romanick2010-03-031-1/+0
| | | | | | | Now that color-index support is removed from t_dd_tritmp.h and t_dd_unfilled.h, drivers no longer need define HAVE_RGBA. Signed-off-by: Ian Romanick <[email protected]>
* r200: Remove unnecessary headers.Vinson Lee2010-01-301-1/+0
|
* radeon/r200/r300/r600: make bo mapping be explicitDave Airlie2009-11-241-1/+1
| | | | | | | | | | This moves the bo mapping outside the DMA layer and makes it explicit, this should in theory make it simpler to split the clean up the dma/cmdbuf linkage that I created before that is broken. Tested on: r600, rv380 (tcl/no-tcl), rv200 (tcl/no-tcl) Signed-off-by: Dave Airlie <[email protected]>
* tnl: Replace deprecated TexCoordPtr with AttribPtr[_TNL_ATTRIB_TEX*]Eric Anholt2009-11-191-1/+1
|
* r200: Convert r200 to use new style debug code.Pauli Nieminen2009-08-311-6/+6
| | | | Only very few places where realy converted so there isa lot of to do.
* radeon: Fix swtcl emit pediction.Pauli Nieminen2009-08-291-5/+14
| | | | | | Problem was to find the correct place to run prediction. Only place that is called for every primitive is ALLOC_VERTS so we have to do prediction there before allocation.
* radeon/r200/r300: Fix swtcl prediction to work after primitie change.Pauli Nieminen2009-08-271-12/+25
| | | | | Swtcl calls flush everytime primitive changes so prediction has to made again after flushing.
* radeon/r200/r300: Fix swtcl flushing not to invalidate dma region.Pauli Nieminen2009-08-271-3/+19
| | | | | We were check command buffer sizes too alte so allocated dma regions were freed before relocations so space checking failed.
* radeon: Fix all compiler warnings.Pauli Nieminen2009-08-251-1/+1
|
* radeon: Improve state emit code.Pauli Nieminen2009-08-211-1/+1
| | | | Trying to make understanding code easier with small refactoring and renaming.
* r200: Make swtcl use state size prediction for flush.Pauli Nieminen2009-08-211-1/+1
| | | | Signed-off-by: Pauli Nieminen <[email protected]>
* radeon: Optimize memory handling for dma operations.Pauli Nieminen2009-08-181-1/+2
| | | | | | | | | | We keep dma buffer objects in list untill they have been unused for many draw operations. Current limit of having 100 flushes is just guess for good performance/memory trade off. Moving WARN_ONCE macro to common context because it is used in multiple drivers. Signed-off-by: Pauli Nieminen <[email protected]>
* radeon: Remove drawable & readable from radeon_dri_mirrorNicolai Hähnle2009-05-241-18/+18
| | | | | | | The duplication of state data caused a crash due to double-free on destruction of context, because a variable wasn't correctly null'ed out. Signed-off-by: Nicolai Hähnle <[email protected]>
* radeon/r200/r300: collapse context destruction down to a common path.Dave Airlie2009-04-021-4/+0
| | | | | Context destruction was nearly the same over all the drivers, so collapse it down.
* radeon/r200/r300: make build with out libdrm_radeon installed for nowDave Airlie2009-02-121-1/+0
|
* radeon/r200/r300: another big merge upheavel.Dave Airlie2009-02-121-7/+3
| | | | | | | | This merges lots of the hw state atom emission and firevertices code. it also removes a lot of the extra radeon crap from r300 and merge scissor
* r200/r300: swtcl fixups to use old dma buffers on top of BOsDave Airlie2009-01-311-76/+37
|
* r200: fix swtcl - slow but worksDave Airlie2009-01-301-0/+4
|
* r200: bring back single dma flushDave Airlie2009-01-291-3/+3
|
* r200: unref swtcl buffer correctlyDave Airlie2009-01-291-0/+1
|
* r200: fix up swtcl/tcl flushesDave Airlie2009-01-221-5/+1
|
* r200: remove indexed vertsDave Airlie2009-01-221-2/+0
|
* r200: clear is working at least - not much elseDave Airlie2009-01-201-45/+25
|
* radeon/r200/r300: attempt to move lock to common codeDave Airlie2009-01-141-2/+2
|
* radeon/r200/r300: initial attempt to convert to common context codeDave Airlie2009-01-141-18/+19
|
* radeon/r200: move more stuff closer together in contextDave Airlie2009-01-141-1/+1
|
* radeon/r200: start splitting out commonalities into separate headersDave Airlie2009-01-131-8/+8
|
* mesa: added "main/" prefix to includes, remove some -I paths from ↵Brian Paul2008-09-181-7/+7
| | | | Makefile.template
* remove CVS/XFree86 keywordsChristoff Brill2007-05-171-1/+0
|
* remove vtxfmt code, switch over to vboKeith Whitwell2006-10-311-8/+0
|
* implement ARB_point_parameters and ARB_point_sprite on r200. The code is ↵Roland Scheidegger2006-10-131-1/+19
| | | | nearly the same as outlined in bug #4707, except it disables perspective correction for point sprites to make them actually work. And, separate the state atom into two as the tcl parameters would overwrite vertex program parameters when active. Also implement the GL_VERTEX_PROGRAM_POINT_SIZE_ARB option to make vertex programs outputting a point size work correctly (untested). Smooth points will still always be size 1. While here, enable gouraud shading for fog when using fog coord.
* More GLSL code:Michal Krol2006-04-111-14/+17
| | | | | | | | | | | | - use macros to access and modify render inputs bit-field; - un-alias generic vertex attributes for ARB vertex calls; - use MAX_VERTEX_PROGRAM_ATTRIBS (NV code) or MAX_VERTEX_ATTRIBS (ARB code) in place of VERT_ATTRIB_MAX; - define VERT_ATTRIB_GENERIC0..15 for un-aliased vertex attributes for ARB_vertex_shader; - fix generic attribute index range check in arbprogparse.c; - interface GLSL varyings between vertex and fragment shader; - use 64-bit optimised bitset (bitset.h) for render inputs;
* Reinstate vertex format after a rasterization fallback for both r200 and ↵Roland Scheidegger2006-02-161-0/+3
| | | | radeon driver when a tcl fallback is active, fixes a blender issue with non-tcl hw (bug #5601)
* fix problems found with gcc 2.96 (bug 4934)Brian Paul2005-10-311-2/+4
|
* enable point sizes larger than 1 (for aliased points only) by using the hw ↵Roland Scheidegger2005-10-051-14/+20
| | | | point sprite primitive.
* s/__inline/INLINE/Brian Paul2005-09-011-2/+2
|
* Fix crashes during rasterization fallback by avoiding _tnl_need_projected_coordsEric Anholt2005-06-261-1/+7
| | | | | | | | | | during fallbacks. In one case, _swsetup_Wakeup had just been called, covering the need there, and in the other case, we can simply exit the entire radeonChooseVertexState function, knowing that it will be called again once we leave the fallback. Bugzilla #: 2516 Submitted by: sroland
* Correct the descriptions of the glBlend{Equation,Func} fallbacks in r128, andEric Anholt2005-05-311-2/+0
| | | | | remove those descriptions and the corresponding bits on r200, where they're no longer used.
* Remove unused CTX_ARG2 define.Eric Anholt2005-05-311-1/+0
|
* s/0/NULL/ (Jeff Muizelaar)Brian Paul2005-02-171-1/+1
|
* (Andreas Stenglein) fix projected textures with swtcl, they need the w ↵Roland Scheidegger2005-02-101-2/+10
| | | | coordinate of the vertex (bugzilla #1648)
* revert enabling of hw quads for swtcl. It lead to problems with quad_strips, ↵Roland Scheidegger2004-11-231-2/+2
| | | | since they'll get reduced to quads sometimes if hw quads are enabled. But this needs more thought, since it looks like clipped primitives will always be emitted as polys, so the reduced primitives for triangles, quads, quads_strips, polys all need to be the same, otherwise get lockups with for instance the olympic test. Render templates would probably need to be changed for this to work.
* enable hw quad primitive for swtclRoland Scheidegger2004-11-121-2/+2
|
* GL_(UN)PACK_SKIP_IMAGES should only be applied to 3D texture pack/unpackingBrian Paul2004-11-101-2/+2
| | | | | | | and ignored for 1D and 2D images. Need to pass in image dimensions (1,2,3) to the _mesa_image_address() function. This change gets propogated to some other routines. Also added new _mesa_image_address[123]d() convenience functions.