summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r200
AgeCommit message (Collapse)Author
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-10-18Want to stop passing x/y/width/height to Clear() function.Brian Paul
The coordinates need to be computed after we've got the hw lock. Code updated to: 1. Ignore all/x/y/width/height/ params passed to Clear func. 2. Pass 0,0,0,0,0 to _swrast_Clear() until they're totally removed.
2006-10-15fix handling of textures with a base internal format that does not have all ↵Roland Scheidegger
four rgba values set for radeon and r200 (discovered with a modified glean pixelFormats test, noone ever noticed in over 2 years). For radeon, use hw format I8 as previously, and change tex env to make the correct default values appear for both GL_ALPHA and GL_LUMINANCE textures. For r200, which supports GL_LUMINANCE just fine, use the AL88 hw format for GL_ALPHA textures, since it seems like it's probably not worth the effort to fix up the texture environment (certainly complicated in case of ATI_fragment_shader programs).
2006-10-15Remove a bunch of "ctx->Driver.function = _swrast_Function" lines sinceBrian Paul
default/fallback functions are already plugged in by the call to _mesa_init_driver_functions().
2006-10-15Remove Driver.ResizeBuffers = _mesa_resize_framebuffer lines.Brian Paul
This is already done by the preceeding call to _mesa_init_driver_functions() which plugs in default functions like that.
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-28Make driDrawableInitVBlank() initialize the sequence number.Michel Dänzer
This prevents the first wait for vertical blank from timing out when the X server has been running for a long time.
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-20try to use a 8888 texture format which will result in only a memcopy in ↵Roland Scheidegger
mesa's texstore functions whenever possible for r200 and r300. r200 can use hw formats argb8888, rgba8888 and abgr8888 (or the opposite on big endian), r300 can use argb8888, bgra8888, rgba8888 and abgr8888 regardless of endian, as it supports free component swizzling.
2006-09-20fix mixed texgen/non-texgen with texgen modes requiring plane parameters ↵Roland Scheidegger
(GL_OBJECT_LINEAR, GL_EYE_LINEAR). This is a chip limitation, try to hack it up regardless or use a tcl fallback in some cases. Might still produce wrong results if fixed up, but so far this corrects celestia ring shadows (in multitexture mode), doom3 (arb renderer), quake4 (arb renderer and some less visible bugs in r200 renderer), and even the remaining texgenmix broken case (this is pure luck though, it is easy to construct artifical cases where it will break).
2006-09-13Always mark tex state atom as dirty when the texture image is dirty, this ↵Roland Scheidegger
ensures texture cache gets flushed in case the new texture has the same offset as the old one (fixes glean pixelFormat test at least on r200).
2006-09-13don't use derived value _ColorLogicOpEnabled as it's not current by the time ↵Roland Scheidegger
we call the blend/logic op functions. Fixes glean logicOp test on r200.
2006-09-13fix GL_REFLECTION_MAP texgen by not using tex matrix negation when lighting ↵Roland Scheidegger
is not enabled (?). This fixes demos/cubemap as well as glean texCube test.
2006-09-13make sure we upload the new vertex program if the program string changes.Roland Scheidegger
2006-09-08cause a vtxfmt fallback directly when hitting NewList for radeon and r200 ↵Roland Scheidegger
drivers, otherwise we'll mix up tcl and vtxfmt path for some reason. This fixes a warzone2100 asssertion failure.
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-04fog state atom contains (only) fog params necessary for tcl. Must not be ↵Roland Scheidegger
emitted if vertex progs are enabled as it overlaps vertex param #94.
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-08-19remove the now confusing option to manually enable software ARB_vp if drm is ↵Roland Scheidegger
not new enough on r200
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-07-03check if radeon_drm.h from libdrm is new enough, otherwise print an error to ↵Roland Scheidegger
make it easier to figure out why it won't compile...
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.
2006-06-02remove code dealing with drmMinor version < 6 since all radeon drivers ↵Roland Scheidegger
request at least drmMinor 6 anyway.
2006-06-01retry on EBUSY instead of EAGAIN in radeonWaitIrq (it appears this was the ↵Roland Scheidegger
intention as drm seems to never return EAGAIN) in all radeon drivers.
2006-05-27fix some whitespace in previous commitRoland Scheidegger
2006-05-27preparation for r200 hw vertex programs. Increase R200_CMD_BUF_SZ to 16k ↵Roland Scheidegger
instead of 8k (the reasons why it was exactly 8k are unclear). Add register defines, sanity code, fix potential issue with wrong statechange order when disabling fragment programs.
2006-05-08updates to dri drivers for recent stencil changesKeith Whitwell
2006-04-20Make most of the _mesa_noop_*() functions static.Brian Paul
Generate GL_INVALID_VALUE, not GL_INVALID_ENUM when glVertexAttrib is called with a bad index. Use _mesa_noop_vtxfmt_init() in DRI drivers to initialize vertex format struct.
2006-04-17Add .note.GNU-stack section to assembler files to avoid the default behaviorKristian Høgsberg
of requesting executable stacks.
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-04-09Destroy the GL context after driDestroyTextureHeap, because the driver'sEric Anholt
DestroyTexObj has a dependence on the glCtx and may segfault otherwise.
2006-04-06Set DRIVER_DEFINES instead of DEFINES to fix duplicate flags problemBrian Paul
2006-04-04switch to card_type rather than IsPCI, doesn't change any functionality yetDave Airlie
2006-03-31Dave Reveman's patch for GLX_MESA_copy_sub_buffer supportBrian Paul
2006-03-28fix missing *_STATECHANGE in *UpdateViewportOffset for radeon, r200 and r300 ↵Roland Scheidegger
(reported by Jim Duchek). Fix some potential problems with strict-aliasing with r200 and radeon drivers in *UpdateViewportOffset, *PolygonOffset and *UpdateWindow functions (some compiler warnings about strict-aliasing remain in the codegen vertex code, and there may be more problems unnoticed by the compiler).
2006-03-27make allow_large_textures 1 by default for radeon and r200, and consequently ↵Roland Scheidegger
enable all texture units by default on those cards (3 for radeon, 6 for r200). Fix the usually forgotten DRIVER_DATE accordingly.
2006-02-28No need to call *_FIREVERTICES twice.Aapo Tahkola
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)