summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r200/r200_tcl.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-21r200: Fix emit size prediction to account elt splitting.Pauli Nieminen
Emit sizes prediction didn't account for render splitting in hwtnl path.
2010-03-21r200: Fix swtnl fallback to flush pending rendering before transition.Pauli Nieminen
Flush after transition would emit wrong state that could cause wrong state emited for pending rendering operation. Fixes wan once from extrement tuxracer that is using per vertex materials.
2010-03-21r200: Fix mixed indetion in r200TclFallback.Pauli Nieminen
2010-01-30r200: Remove unnecessary headers.Vinson Lee
2009-11-17Merge branch 'outputswritten64'Ian Romanick
Add a GLbitfield64 type and several macros to operate on 64-bit fields. The OutputsWritten field of gl_program is changed to use that type. This results in a fair amount of fallout in drivers that use programs. No changes are strictly necessary at this point as all bits used are below the 32-bit boundary. Fairly soon several bits will be added for clip distances written by a vertex shader. This will cause several bits used for varyings to be pushed above the 32-bit boundary. This will affect any drivers that support GLSL. At this point, only the i965 driver has been modified to support this eventuality. I did this as a "squash" merge. There were several places through the outputswritten64 branch where things were broken. I foresee this causing difficulties later for bisecting. The history is still available in the branch. Conflicts: src/mesa/drivers/dri/i965/brw_wm.h
2009-09-01r200: emit max vtx info for index buffer.Dave Airlie
We need this for the CS bounds checking.
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-26r200: Add scissor to state atom list.Pauli Nieminen
Scissors are jsut one of states that we have to emit so it should be in state list
2009-08-25r200: Addd missing parameter to debug output.Pauli Nieminen
2009-08-25r200: Fix commit size prediction.Pauli Nieminen
Scissor are emited for every primitive so fix that in prediction.
2009-08-25radeon/r200/r300/r600: Warn if we emit more than prediction was.Pauli Nieminen
Prediction code making too small prediction may cause space check aserttion failure later in rendering. So warning about any failure to predict correctly should be fixed.
2009-08-21radeon: Improve state emit code.Pauli Nieminen
Trying to make understanding code easier with small refactoring and renaming.
2009-08-21r200: Remove unnecessery Elts from r200 context.Pauli Nieminen
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21r200: Remove unnecessary calls to rcommonEnsureCmdBufSpace.Pauli Nieminen
Calling EnsureCmdBufSpace is not required because rendering pipeline has to quarentee free space. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21r200: Prevent flush in middle of rendering.Pauli Nieminen
Patch adds prediction functionthat tries to predict emit size to the smallest possible values that is quarenteed to be higher than worst case scenario in rendering pipeline. State emit size prediction code is in place but fix for emit sizes is included in next patch. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-18r200: Fix missing offset from elt buffer pointer.Pauli Nieminen
Signed-off-by: Pauli Nieminen <suokkos@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: 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-02-09r200: cleanup some bits that aren't usedDave Airlie
2009-01-31r200/r300: swtcl fixups to use old dma buffers on top of BOsDave Airlie
2009-01-31r200/r300: add aperture space checksDave Airlie
2009-01-29r200: bring back single dma flushDave Airlie
2009-01-22r200: fix up swtcl/tcl flushesDave Airlie
2009-01-23r200: disable some debugDave Airlie
2009-01-23r200: emit elts into a separate ELT boDave Airlie
2009-01-22r200: remove indexed vertsDave Airlie
2009-01-21r200: make tri render on my r200.Dave Airlie
2009-01-20r200: clear is working at least - not much elseDave Airlie
2009-01-14radeon/r200/r300: initial attempt to convert to common context codeDave Airlie
2008-09-18mesa: added "main/" prefix to includes, remove some -I paths from ↵Brian Paul
Makefile.template
2007-12-22fix GL_LINE_LOOP with drivers using own render pipeline stage (#12410, #13527)Roland Scheidegger
primitive needs to include the begin/end flags (broken since vbo-0.2). Should fix missing first/last line segment on gamma, i810, i915, mga, r200, radeon, s3v, savage, unichrome (r300 already correct). Tested on r200, fixes #13527.
2007-05-17remove CVS/XFree86 keywordsChristoff Brill
2007-02-09r200: simplify / unify input map handling for vp and fftnlRoland Scheidegger
Use the same input map handling for fftnl and vertex programs. It doesn't enable any new functionality (should make it easy to support per-vertex materials though), but the code is much cleaner.
2007-01-16Merge branch 'master' of git+ssh://keithw@git.freedesktop.org/git/mesa/mesa ↵Keith Whitwell
into vbo-0.2 Conflicts: src/mesa/array_cache/sources src/mesa/drivers/dri/i965/brw_context.c src/mesa/drivers/dri/i965/brw_draw.c src/mesa/drivers/dri/i965/brw_fallback.c src/mesa/drivers/dri/i965/brw_vs_emit.c src/mesa/drivers/dri/i965/brw_vs_tnl.c src/mesa/drivers/dri/mach64/mach64_context.c src/mesa/main/extensions.c src/mesa/main/getstring.c src/mesa/tnl/sources src/mesa/tnl/t_save_api.c src/mesa/tnl/t_save_playback.c src/mesa/tnl/t_vtx_api.c src/mesa/tnl/t_vtx_exec.c src/mesa/vbo/vbo_attrib.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_api.c src/mesa/vbo/vbo_save_draw.c
2006-11-05fix vp lockups due to incorrectly set up / emitted attrib inputs.Roland Scheidegger
2006-11-03enable generic arrays for r200 hw vertex programs by assigning unused color ↵Roland Scheidegger
and texture inputs to them. Not widely tested yet. This should eliminate all fallbacks due to vertex programs, except writes to back facing colors, or when exceeding a hw limit (12 temps, 12 attribs etc.).
2006-10-31remove vtxfmt code, switch over to vboKeith Whitwell
2006-10-24fix (per-vertex) fog when using ARB_vp by incorporating fog factor ↵Roland Scheidegger
computation into the vertex program (not yet fixed for swtnl). Simplify (and correct) the VTX_TCL_OUTPUT_VTXFMT handling when using vertex programs, turns out it's solely driven by the needs of the past-vertex stage of the pipeline, this should fix lockups with ill-specified applications using vertex programs (for instance applications enabling fog but not writing to fog coord output will now get (conformant) undefined results instead of lockups).
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-09-07make really sure R200_VAP_PROG_VTX_SHADER_ENABLE is never set when we're ↵Roland Scheidegger
already in a tcl fallback, otherwise the chip will instantly lock up when vertex progs are enabled the next time not in a tcl fallback (fixes for instance guaranteed lockup running any program which uses vertex progs with tcl_mode=0 and then later with tcl_mode=1).
2006-06-02implement arb_vertex_program in hw for r200. Code contains still some hacks, ↵Roland Scheidegger
generic attribs cause a fallback, but otherwise it seems to work quite well. Passes all glean vertProg1 tests with the exception of the degnerated LIT case (which is a hw limitation), as well as runs the r200 render path of doom3/quake4 (1.1 patch needed for quake4). The code is heavily borrowed from the r300 driver as vertex programs encoding is almost identical. arb_vertex_program is not yet announced by default and still needs to be enabled via driconf.
2005-10-29Bug #4901: Correct secondary color emission when lighting is turned off, testedEric Anholt
with seccolor on rv200 and r200. Submitted by: sroland
2005-10-18on r200, don't emit fog coords when fog isn't actually enabled. Fix bug with ↵Roland Scheidegger
vtxfmt not causing a fallback when fog coords are active.
2005-10-05enable point sizes larger than 1 (for aliased points only) by using the hw ↵Roland Scheidegger
point sprite primitive.