summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r200
Commit message (Collapse)AuthorAgeFilesLines
* enable generic arrays for r200 hw vertex programs by assigning unused color ↵Roland Scheidegger2006-11-034-27/+143
| | | | 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.).
* remove setting some driver funcs explicitly to NULL, as they are no longer ↵Roland Scheidegger2006-11-031-4/+0
| | | | set up later. Thix fixes a segfault in _mesa_Bitmap().
* casting, type changes to silence warningsBrian Paul2006-11-022-5/+5
|
* Remove x/y/width/height parameters from Clear functions.Brian Paul2006-11-011-3/+2
|
* remove code for inserting mvp transform into position-invariant vertex progs ↵Roland Scheidegger2006-10-261-96/+7
| | | | and instead use _mesa_insert_mvp_code().
* change some bogus comments regarding the base e exponential function used ↵Roland Scheidegger2006-10-252-7/+6
| | | | for fog in vertex programs.
* fix (per-vertex) fog when using ARB_vp by incorporating fog factor ↵Roland Scheidegger2006-10-246-67/+153
| | | | 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).
* Want to stop passing x/y/width/height to Clear() function.Brian Paul2006-10-181-8/+16
| | | | | | | 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.
* fix handling of textures with a base internal format that does not have all ↵Roland Scheidegger2006-10-151-1/+3
| | | | 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).
* Remove a bunch of "ctx->Driver.function = _swrast_Function" lines sinceBrian Paul2006-10-152-15/+0
| | | | | default/fallback functions are already plugged in by the call to _mesa_init_driver_functions().
* Remove Driver.ResizeBuffers = _mesa_resize_framebuffer lines.Brian Paul2006-10-151-1/+0
| | | | | This is already done by the preceeding call to _mesa_init_driver_functions() which plugs in default functions like that.
* implement ARB_point_parameters and ARB_point_sprite on r200. The code is ↵Roland Scheidegger2006-10-139-18/+236
| | | | 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.
* Make driDrawableInitVBlank() initialize the sequence number.Michel Dänzer2006-09-281-1/+2
| | | | | This prevents the first wait for vertical blank from timing out when the X server has been running for a long time.
* fix up access to vertex attrib components which don't really exist but are ↵Roland Scheidegger2006-09-221-1/+39
| | | | 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.
* try to use a 8888 texture format which will result in only a memcopy in ↵Roland Scheidegger2006-09-203-9/+75
| | | | 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.
* fix mixed texgen/non-texgen with texgen modes requiring plane parameters ↵Roland Scheidegger2006-09-201-4/+89
| | | | (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).
* Always mark tex state atom as dirty when the texture image is dirty, this ↵Roland Scheidegger2006-09-131-4/+7
| | | | 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).
* don't use derived value _ColorLogicOpEnabled as it's not current by the time ↵Roland Scheidegger2006-09-131-2/+2
| | | | we call the blend/logic op functions. Fixes glean logicOp test on r200.
* fix GL_REFLECTION_MAP texgen by not using tex matrix negation when lighting ↵Roland Scheidegger2006-09-132-5/+9
| | | | is not enabled (?). This fixes demos/cubemap as well as glean texCube test.
* make sure we upload the new vertex program if the program string changes.Roland Scheidegger2006-09-131-0/+2
|
* cause a vtxfmt fallback directly when hitting NewList for radeon and r200 ↵Roland Scheidegger2006-09-081-0/+10
| | | | drivers, otherwise we'll mix up tcl and vtxfmt path for some reason. This fixes a warzone2100 asssertion failure.
* make really sure R200_VAP_PROG_VTX_SHADER_ENABLE is never set when we're ↵Roland Scheidegger2006-09-072-2/+1
| | | | 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).
* fog state atom contains (only) fog params necessary for tcl. Must not be ↵Roland Scheidegger2006-09-041-2/+2
| | | | emitted if vertex progs are enabled as it overlaps vertex param #94.
* make sure vertex programs are only enabled on the hw when they are really ↵Roland Scheidegger2006-09-012-9/+11
| | | | 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.
* do not abort with not supported vertex prog output configuration, fallback ↵Roland Scheidegger2006-08-311-3/+19
| | | | instead
* Minor r200 vertex program cleanups. Remove disabled leftovers from r300 ↵Roland Scheidegger2006-08-302-62/+24
| | | | 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).
* fix typo causing a segfault when a vertex program uses more than 96 parametersRoland Scheidegger2006-08-301-1/+1
|
* Check mesa_vp->Base.NumInstructions == 0 instead of mesa_vp->Base.String toBrian Paul2006-08-281-1/+1
| | | | determine if we actually have a program. See "[r300] TCL fallback with Quake3".
* Check for NULL program string in r200_translate_vertex_program().Brian Paul2006-08-241-2/+18
| | | | | Fixes bug reported by Chris Rankin. Added some new comments.
* Check if mesa_vp->Base.Parameters is null before dereferencing (bug reportBrian Paul2006-08-241-3/+6
| | | | | from Chris Rankin). Also, fix some bad casts.
* remove the now confusing option to manually enable software ARB_vp if drm is ↵Roland Scheidegger2006-08-191-2/+1
| | | | not new enough on r200
* Some structure renaming. Prefix vertex/fragment-related structs withBrian Paul2006-07-202-12/+17
| | | | "gl_" to match other structs.
* some minor simplifications (same as in r300 driver) since mesa's internally ↵Roland Scheidegger2006-07-031-23/+17
| | | | 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.
* check if radeon_drm.h from libdrm is new enough, otherwise print an error to ↵Roland Scheidegger2006-07-031-0/+4
| | | | make it easier to figure out why it won't compile...
* no need to handle ARL in a special way, it's a generic scalar operation. ↵Tilman Sauerbeck2006-06-181-10/+4
| | | | only tested on r300.
* enable arb_vertex_program by default if drm is new enough. Do a fallback ↵Roland Scheidegger2006-06-102-1/+7
| | | | when it's a nv_vp as there could be issues.
* Improve slightly wrong CMP_SRCS test to avoid unencessary instructions. ↵Roland Scheidegger2006-06-082-95/+56
| | | | Clean up the r200 vertex program code a bit.
* implement arb_vertex_program in hw for r200. Code contains still some hacks, ↵Roland Scheidegger2006-06-0210-22/+1617
| | | | 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.
* remove code dealing with drmMinor version < 6 since all radeon drivers ↵Roland Scheidegger2006-06-024-26/+13
| | | | request at least drmMinor 6 anyway.
* retry on EBUSY instead of EAGAIN in radeonWaitIrq (it appears this was the ↵Roland Scheidegger2006-06-011-1/+1
| | | | intention as drm seems to never return EAGAIN) in all radeon drivers.
* fix some whitespace in previous commitRoland Scheidegger2006-05-271-2/+2
|
* preparation for r200 hw vertex programs. Increase R200_CMD_BUF_SZ to 16k ↵Roland Scheidegger2006-05-274-4/+86
| | | | 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.
* updates to dri drivers for recent stencil changesKeith Whitwell2006-05-081-5/+5
|
* Make most of the _mesa_noop_*() functions static.Brian Paul2006-04-201-11/+5
| | | | | | | 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.
* Add .note.GNU-stack section to assembler files to avoid the default behaviorKristian Høgsberg2006-04-171-0/+4
| | | | of requesting executable stacks.
* More GLSL code:Michal Krol2006-04-112-15/+18
| | | | | | | | | | | | - 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;
* Destroy the GL context after driDestroyTextureHeap, because the driver'sEric Anholt2006-04-091-4/+4
| | | | DestroyTexObj has a dependence on the glCtx and may segfault otherwise.
* Set DRIVER_DEFINES instead of DEFINES to fix duplicate flags problemBrian Paul2006-04-061-1/+1
|
* switch to card_type rather than IsPCI, doesn't change any functionality yetDave Airlie2006-04-041-1/+1
|
* Dave Reveman's patch for GLX_MESA_copy_sub_buffer supportBrian Paul2006-03-314-17/+70
|