summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r200/r200_vertprog.c
AgeCommit message (Collapse)Author
2011-02-08r200: add cast to silence warningBrian Paul
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-06-10mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul
2010-02-04mesa: change ctx->Driver.ProgramStringNotify() to return GLbooleanBrian Paul
GL_TRUE indicates that the driver accepts the program. GL_FALSE indicates the program can't be compiled/translated by the driver for some reason (too many resources used, etc). Propogate this result up to the GL API: set GL_INVALID_OPERATION error if glProgramString() was called. Set shader program link status to GL_FALSE if glLinkProgram() was called. At this point, drivers still don't do any program checking and always return GL_TRUE.
2010-01-24r200: Silence fprintf format warning.Vinson Lee
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-04-22Merge remote branch 'origin/master' into radeon-rewriteDave Airlie
2009-04-14mesa: merge the prog_src_register::NegateBase and NegateAbs fieldsBrian Paul
There's really no need for two negation fields. This came from the GL_NV_fragment_program extension. The new, unified Negate bitfield applies after the absolute value step.
2009-03-20Merge remote branch 'main/master' into radeon-rewriteDave Airlie
Conflicts: src/mesa/drivers/dri/r300/r300_cmdbuf.c src/mesa/drivers/dri/r300/r300_state.c src/mesa/drivers/dri/r300/r300_swtcl.c src/mesa/drivers/dri/r300/radeon_ioctl.c src/mesa/drivers/dri/radeon/radeon_screen.c
2009-03-07mesa: gl_register_file enum typedefBrian Paul
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
2008-06-21replace __inline and __inline__ with INLINE macroBrian Paul
2008-04-17r200: accept PROGRAM_CONSTANT inputs due to mesa changesAndrew Randrianasulu
2008-04-12r200: fix XPD vertex program instruction when using temps as inputsRoland Scheidegger
due to the two read ports limit into temp memory may need the MAD_2 instruction for the second instruction of the decomposed XPD. While here, also try to avoid MAD_2 for MAD if all 3 inputs are temps but the temps aren't actually distinct.
2008-01-02rx00: fix off by one error in tempreg checkHans de Goede
2007-09-11Fix-up #includes to remove some -I options.Brian
eg: #include "shader/program.h" and remove -I$(TOP)/src/mesa/program
2007-02-23Update DRI drivers for new glsl compiler.Brian
Mostly: - update #includes - update STATE_* token code
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-02-03fix errorneously adding fog state params to all vertex programs...Roland Scheidegger
2006-12-14submit vertex weights to make World of Warcraft maybe happy (bug 8250)Roland Scheidegger
submit the vertex weights to hw, which will enable broken vertex programs errorneously using them to work. Note however that this will only work if glWeight is used, there is no code in mesa at all to deal with weight vertex array (glWeightPointerARB).
2006-11-30fix mixed conventional / generic vertex arrays which caused a wrong array ↵Roland Scheidegger
order leading to very bogus rendering (for instance WoW intro screen mentioned in #8250).
2006-11-29call Driver.ProgramStringNotify if a ati_fragment_shader changes and pick up ↵Roland Scheidegger
the change in the r200 driver accordingly.
2006-11-05fix using VERT_ATTRIB_WEIGHT instead of VERT_BIT_WEIGHT when assigning vp ↵Roland Scheidegger
inputs.
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-26remove code for inserting mvp transform into position-invariant vertex progs ↵Roland Scheidegger
and instead use _mesa_insert_mvp_code().
2006-10-25change some bogus comments regarding the base e exponential function used ↵Roland Scheidegger
for fog in vertex programs.
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-09-22fix up access to vertex attrib components which don't really exist but are ↵Roland Scheidegger
defined to some default value by the spec (fogcoord yzw, normal w, secondary color w), by replacing those components with zero/one respectively using swizzling.
2006-09-13make sure we upload the new vertex program if the program string changes.Roland Scheidegger
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-09-01make sure vertex programs are only enabled on the hw when they are really ↵Roland Scheidegger
enabled, not just when a program enables vertex progs (could still be not enabled due to some error). Otherwise the hw potentially would try to execute a not valid (not set up at all) vertex program, likely leading to lockups. Hopefully fixes #8060.
2006-08-31do not abort with not supported vertex prog output configuration, fallback ↵Roland Scheidegger
instead
2006-08-30Minor r200 vertex program cleanups. Remove disabled leftovers from r300 ↵Roland Scheidegger
vertex program code. Fix authors. Correct slightly wrong check to determine if ran out of temps. Simplify check to determine if ran out of max instructions. Correctly report used native temps. Always kick off program translation when ProgramStringNotify is called (otherwise the reported native resources used queried might be wrong).
2006-08-30fix typo causing a segfault when a vertex program uses more than 96 parametersRoland Scheidegger
2006-08-28Check mesa_vp->Base.NumInstructions == 0 instead of mesa_vp->Base.String toBrian Paul
determine if we actually have a program. See "[r300] TCL fallback with Quake3".
2006-08-24Check for NULL program string in r200_translate_vertex_program().Brian Paul
Fixes bug reported by Chris Rankin. Added some new comments.
2006-08-24Check if mesa_vp->Base.Parameters is null before dereferencing (bug reportBrian Paul
from Chris Rankin). Also, fix some bad casts.
2006-07-20Some structure renaming. Prefix vertex/fragment-related structs withBrian Paul
"gl_" to match other structs.
2006-07-03some minor simplifications (same as in r300 driver) since mesa's internally ↵Roland Scheidegger
used swizzle and writemask flags are identical to the bits used on the hardware, use a macro to error out if these assumptions are no longer true.
2006-06-18no need to handle ARL in a special way, it's a generic scalar operation. ↵Tilman Sauerbeck
only tested on r300.
2006-06-10enable arb_vertex_program by default if drm is new enough. Do a fallback ↵Roland Scheidegger
when it's a nv_vp as there could be issues.
2006-06-08Improve slightly wrong CMP_SRCS test to avoid unencessary instructions. ↵Roland Scheidegger
Clean up the r200 vertex program code a bit.
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.