summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r200/r200_swtcl.c
AgeCommit message (Collapse)Author
2010-11-10r200: fix r200 large pointsRoland Scheidegger
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.
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-10-11r200: revalidate after radeon_update_renderbuffersDaniel Vetter
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 <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-08-02radeon: Add DRI2 flush extension support, so we synchronize properly.Mario Kleiner
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 <jglisse@redhat.com> Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-08-02Revert "radeon: Add DRI2 flush extension to so we synchronize properly."Jerome Glisse
This reverts commit 8446f257b3e3ca4a3eb2c79bc357e46343e04e87.
2010-08-02radeon: Add DRI2 flush extension to so we synchronize properly.Mario Kleiner
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 <jglisse@redhat.com> Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-03-03Remove stray defines of HAVE_RGBAIan Romanick
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 <ian.d.romanick@intel.com>
2010-01-30r200: Remove unnecessary headers.Vinson Lee
2009-11-24radeon/r200/r300/r600: make bo mapping be explicitDave Airlie
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 <airlied@redhat.com>
2009-11-19tnl: Replace deprecated TexCoordPtr with AttribPtr[_TNL_ATTRIB_TEX*]Eric Anholt
2009-08-31r200: Convert r200 to use new style debug code.Pauli Nieminen
Only very few places where realy converted so there isa lot of to do.
2009-08-29radeon: Fix swtcl emit pediction.Pauli Nieminen
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.
2009-08-27radeon/r200/r300: Fix swtcl prediction to work after primitie change.Pauli Nieminen
Swtcl calls flush everytime primitive changes so prediction has to made again after flushing.
2009-08-27radeon/r200/r300: Fix swtcl flushing not to invalidate dma region.Pauli Nieminen
We were check command buffer sizes too alte so allocated dma regions were freed before relocations so space checking failed.
2009-08-25radeon: Fix all compiler warnings.Pauli Nieminen
2009-08-21radeon: Improve state emit code.Pauli Nieminen
Trying to make understanding code easier with small refactoring and renaming.
2009-08-21r200: Make swtcl use state size prediction for flush.Pauli Nieminen
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-18radeon: Optimize memory handling for dma operations.Pauli Nieminen
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 <suokkos@gmail.com>
2009-05-24radeon: Remove drawable & readable from radeon_dri_mirrorNicolai Hähnle
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 <nhaehnle@gmail.com>
2009-04-02radeon/r200/r300: collapse context destruction down to a common path.Dave Airlie
Context destruction was nearly the same over all the drivers, so collapse it down.
2009-02-12radeon/r200/r300: make build with out libdrm_radeon installed for nowDave Airlie
2009-02-12radeon/r200/r300: another big merge upheavel.Dave Airlie
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
2009-01-31r200/r300: swtcl fixups to use old dma buffers on top of BOsDave Airlie
2009-01-30r200: fix swtcl - slow but worksDave Airlie
2009-01-29r200: bring back single dma flushDave Airlie
2009-01-29r200: unref swtcl buffer correctlyDave Airlie
2009-01-22r200: fix up swtcl/tcl flushesDave Airlie
2009-01-22r200: remove indexed vertsDave Airlie
2009-01-20r200: clear is working at least - not much elseDave Airlie
2009-01-14radeon/r200/r300: attempt to move lock to common codeDave Airlie
2009-01-14radeon/r200/r300: initial attempt to convert to common context codeDave Airlie
2009-01-14radeon/r200: move more stuff closer together in contextDave Airlie
2009-01-13radeon/r200: start splitting out commonalities into separate headersDave Airlie
2008-09-18mesa: added "main/" prefix to includes, remove some -I paths from ↵Brian Paul
Makefile.template
2007-05-17remove CVS/XFree86 keywordsChristoff Brill
2006-10-31remove vtxfmt code, switch over to vboKeith Whitwell
2006-10-13implement ARB_point_parameters and ARB_point_sprite on r200. The code is ↵Roland Scheidegger
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.
2006-04-11More GLSL code:Michal Krol
- 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;
2006-02-16Reinstate vertex format after a rasterization fallback for both r200 and ↵Roland Scheidegger
radeon driver when a tcl fallback is active, fixes a blender issue with non-tcl hw (bug #5601)
2005-10-31fix problems found with gcc 2.96 (bug 4934)Brian Paul
2005-10-05enable point sizes larger than 1 (for aliased points only) by using the hw ↵Roland Scheidegger
point sprite primitive.
2005-09-01s/__inline/INLINE/Brian Paul
2005-06-26Fix crashes during rasterization fallback by avoiding _tnl_need_projected_coordsEric Anholt
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
2005-05-31Correct the descriptions of the glBlend{Equation,Func} fallbacks in r128, andEric Anholt
remove those descriptions and the corresponding bits on r200, where they're no longer used.
2005-05-31Remove unused CTX_ARG2 define.Eric Anholt
2005-02-17s/0/NULL/ (Jeff Muizelaar)Brian Paul
2005-02-10(Andreas Stenglein) fix projected textures with swtcl, they need the w ↵Roland Scheidegger
coordinate of the vertex (bugzilla #1648)
2004-11-23revert enabling of hw quads for swtcl. It lead to problems with quad_strips, ↵Roland Scheidegger
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.
2004-11-12enable hw quad primitive for swtclRoland Scheidegger
2004-11-10GL_(UN)PACK_SKIP_IMAGES should only be applied to 3D texture pack/unpackingBrian Paul
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.