Commit Graph

6599 Commits

Author SHA1 Message Date
Keith Whitwell 02df36f394 Basic facility for playing back captured aubfiles. Requires a small
hack to the drm to disable command verification on the cmd_buffer
ioctl.  Doesn't exactly replay as commands are normally delivered as
batchbuffers but are captured and replayed as commands on the ring.
2006-09-08 10:36:32 +00:00
Roland Scheidegger a5e73e6887 cause a vtxfmt fallback directly when hitting NewList for radeon and r200 drivers, otherwise we'll mix up tcl and vtxfmt path for some reason. This fixes a warzone2100 asssertion failure. 2006-09-08 00:54:55 +00:00
Keith Whitwell 3e05902d30 Consistent return values from the bm* functions.
Get aubfile generation working again.
2006-09-07 19:58:16 +00:00
Keith Whitwell 493b2ddecb Cope with memory pool fragmentation by allowing a second attempt at
rendering operations to take place after evicting all resident
buffers.

Cope better with memory allocation failures throughout the driver and
improve tracking of failures.
2006-09-07 19:05:40 +00:00
Keith Whitwell c26f36c830 Add some asserts, fix some not-quite-bugs. 2006-09-07 18:28:35 +00:00
Keith Whitwell e48db4430f Fix glitch with pool alignments. 2006-09-07 16:29:37 +00:00
Keith Whitwell 1456a0fff6 Use lower alignments where possible. Also pad out allocated blocks to
a multiple of alignment to avoid accumulating unusable free blocks.
2006-09-07 16:23:22 +00:00
Keith Whitwell 133f141680 Make sure bmBufferOffset is called for all active buffers every time
we render.  Currenly requires that some state be re-examined after
every LOCK_HARDWARE().
2006-09-07 16:09:50 +00:00
Roland Scheidegger c5cb8e2c6f make really sure R200_VAP_PROG_VTX_SHADER_ENABLE is never set when we're 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-07 13:34:29 +00:00
Roland Scheidegger 28e7219b96 only allow VERT_ATTRIB_MAX instead of _TNL_ATTRIB_MAX for inputs of vertex programs (fixes a segfault since the result of the shift is undefined otherwise, and it may happen that _TNL_ATTRIB_POINTSIZE will be tried to read, unlike all other attribs this however may be unitialized (might be a bug in itself)). 2006-09-07 13:26:44 +00:00
Eric Anholt d016d4e70f Fix a leak of the screen's option cache on cleanup (copied from radeon). 2006-09-07 06:02:00 +00:00
Keith Whitwell 14ec34d647 Simplify the immediate and displaylist code. Treat VertexAttrib*ARB
as non-aliasing and cope with the >32 attributes that result, taking
materials into account.
2006-09-06 18:30:00 +00:00
Brian Paul 7d767604c7 remove stray tab 2006-09-06 13:44:57 +00:00
Brian Paul d9aebd8498 for VERTEX_ATTRIB_WEIGHT, use break, not return 2006-09-06 05:03:47 +00:00
Brian Paul 3a55750d48 Hack for Warcraft (bug 8060): allow 'vertex.weight' to be referenced in
vertex program, even though it's not really supported.  Results will be
undefined, but Warcraft doesn't actually use the attribute.
2006-09-05 23:15:29 +00:00
Brian Paul 43cc1dc18f fix typo in enable_parser_extensions(): s/point_parameters/vertex_blend/ 2006-09-05 23:11:09 +00:00
Brian Paul a088f160b3 Consolidate common case of _mesa_set_program_error() followed by _mesa_error()
in new program_error() function.
Add const qualifiers in many places.
Reorder some debug code to prevent referencing free'd memory.
2006-09-05 23:08:51 +00:00
Keith Whitwell d5cbb49c22 Dynamically allocate instruction store for tnl programs according to
requirements.
2006-09-05 10:01:24 +00:00
Keith Whitwell 74b2166ff8 Fixes for calculating point attenuation 2006-09-04 23:34:36 +00:00
Keith Whitwell f65ad97469 Don't export NV_vertex_program as it's not supported, it confuses
glean, and we no longer need to export it to keep Mesa happy as we did
at one time.
2006-09-04 18:27:40 +00:00
Rune Petersen ac7ea94030 Managed to make a commit that can't build... Sorry again... 2006-09-04 16:20:16 +00:00
Brian Paul c78e895f09 get rid of GL_BOOLEAN definition (bug 8113) 2006-09-04 14:07:04 +00:00
Roland Scheidegger 014bfda235 fog state atom contains (only) fog params necessary for tcl. Must not be emitted if vertex progs are enabled as it overlaps vertex param #94. 2006-09-04 00:57:39 +00:00
Rune Petersen 5300e8242f add missing change to skip low impact RAST fallback...
Sorry.
2006-09-03 20:31:52 +00:00
Roland Scheidegger 5b4e7cdca4 fix the presumably broken check for the allow_large_textures and vblank_mode options (same as bug 8042). 2006-09-01 23:36:30 +00:00
Roland Scheidegger 91650469ae make sure vertex programs are only enabled on the hw when they are really 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-09-01 20:21:12 +00:00
Keith Whitwell 6ec2d37ae8 Catch a few more cases of using a message reg as an instruction source
arg.
2006-09-01 14:57:19 +00:00
Keith Whitwell db0e53af74 fix a couple of cases where a message reg is used as an instruction source. 2006-09-01 14:18:06 +00:00
Ian Romanick 75faa1e19a Add API description for GLX_SGI_swap_control. 2006-08-31 20:50:43 +00:00
Ian Romanick d6c675f497 Fix problems with vertex program protocol
There were two sets of bugs in the vertex program (ARB and NV)
protocol.  First, several of the ARB functions were missing the
'doubles_in_order="true"' annotation.  Second, after the ARB decided
that glVertexAttrib*ARB functions must not alias fixed-function state
for GLSL, Nvidia re-assigned GLX protocol opcodes for
glVertexAttrib*NV (circa Septeber 2004).  For some reason gl_API.xml
was never updated to reflect this, and the updated version of the
GL_NV_vertex_program spec never made into the registry.
2006-08-31 20:41:16 +00:00
Rune Petersen 934a2dcf0f re-apply shader fix.
appears to have been reverted by mistake.
2006-08-31 18:19:50 +00:00
Keith Whitwell b237d7fa14 When using the old technique to set up the front buffer mapping, there
is no need to add front.offset to sPriv->pFB, it seems.  Fixes several
glean issues and frontbuffer rendering generally.
2006-08-31 17:24:55 +00:00
Rune Petersen 3cbfef3917 Give the user posibility to choose speed over correctness.
It does 2 things:
1) Allows you to disable S3TC, wine-games sometimes need S3TC enabled.
2) Disable fallbacks that usually have low impact.
2006-08-31 15:15:29 +00:00
Brian Paul 52e36cd8d9 check if ext->name is null before strcmp() 2006-08-31 13:58:08 +00:00
Roland Scheidegger 901f83f14e do not abort with not supported vertex prog output configuration, fallback instead 2006-08-31 01:10:07 +00:00
Karl Schultz cdb12bd0ae Handle API and dispatch table changes that removed a bunch of extension entry points. 2006-08-30 23:45:32 +00:00
Brian Paul b7fc1c32f8 Check that we don't try to reference more than one target of a texture unit.
For example, referencing both "texture[0], 2D" and "texture[0], CUBE" in one
program is an error.
2006-08-30 23:38:03 +00:00
Brian Paul f6de865e56 s/0/VERT_RESULT_HPOS/ 2006-08-30 23:36:52 +00:00
Ian Romanick a70d56485a Add missing parenthesis so that glXSwapIntervalSGI protocol is
correctly generated.
2006-08-30 23:15:02 +00:00
Michal Krol c7f571eb7e Add missing vec4 instructions to the interpreter.
Other cosmetic changes.
2006-08-30 22:36:29 +00:00
Brian Paul 6c06ce281a Use XAddExtension() to register an XCloseDisplay() callback function.
When the callback is called, free all Mesa's private visual and buffer
data structures which are tied to the display.
Fixes problems reported by Kitware.
2006-08-30 21:17:51 +00:00
Brian Paul 12a5f812fc init a local var to silence warning 2006-08-30 19:02:45 +00:00
Roland Scheidegger a974aaaa3e Minor r200 vertex program cleanups. Remove disabled leftovers from r300 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-30 13:44:31 +00:00
Roland Scheidegger e6de1edaf0 fix initialization of native resource usage of vertex/fragment programs 2006-08-30 11:55:18 +00:00
Roland Scheidegger ef3f00f67e fix typo causing a segfault when a vertex program uses more than 96 parameters 2006-08-30 10:26:31 +00:00
Brian Paul 8334c8a216 Move call to _swrast_update_rasterflags() since it depends on the
results of _swrast_update_fog_state().
Fixes bug where first frame of progs/samples/fog.c does not show fog.
2006-08-29 22:32:31 +00:00
Brian Paul f7c4dc007f _mesa_debug() should be a no-op when not compiled with DEBUG defined. 2006-08-29 22:30:58 +00:00
Brian Paul 70c2d51230 remove assertion that referenced &glSetFenceNV for debug test 2006-08-29 21:54:01 +00:00
Brian Paul 0aab798a18 replace abort with _mesa_problem() 2006-08-29 19:09:57 +00:00
Ian Romanick 8d675aa637 Deprecate GL_EXT_vertex_weighting.
Nvidia no longer supports this extension, and they no longer export its
entry points from their libGL.  There's no reason for us to keep dragging it
around either.
2006-08-29 17:44:45 +00:00