Commit Graph

6720 Commits

Author SHA1 Message Date
Brian Paul 30aea49cf6 minor fixes 2005-07-01 01:04:31 +00:00
Roland Scheidegger cf5b2f7419 remove common macros used in the span functions of most drivers from the individual drivers and put them in common code. It is still possible for a driver to define its own macros if it has special needs. This affects CLIPPIXEL, CLIPSPAN, HW_CLIPLOOP, HW_ENDCLIPLOOP, and for drivers using the spantmp2 template also GET_SRC_PTR and GET_DST_PTR. 2005-07-01 00:08:46 +00:00
Ian Romanick c212abf99a Replace add_newer_entrypoints (src/mesa/main/context.c) with
device-specific code.  A new Python script
(src/mesa/glapi/extension_helper.py) generates a list of all
entry-points for all known extensions.  Each driver the selects only
the extensions that it needs and enables the via either
driInitExtensions or driInitSingleExtension.

This code has been compile-tested on a drivers, but has only been
run-tested on mga and i915 (on i830 hardware).

These changes were discussed at length on the mesa3d-dev mailing list.

http://marc.theaimsgroup.com/?t=111947074700001&r=1&w=2
2005-06-30 16:00:48 +00:00
Brian Paul 1ac8ae446a remove \n from warning message string 2005-06-30 14:24:44 +00:00
Brian Paul aa70253cbb added newline at end of file 2005-06-30 14:23:40 +00:00
Brian Paul 049e320f46 Add a set of predicate functions for testing matrices instead of directly
testing the flags field.
Move definition of all the MAT_FLAGs into the m_matrix.c file since they're
now private.
2005-06-30 14:22:23 +00:00
Brian Paul f138b977d0 Redo all the GL_LINEAR interpolation code in terms of LERP macros/functions.
This cleans up and simplifies the arithmetic quite a bit.
2005-06-30 13:42:10 +00:00
Roland Scheidegger 4d652b7855 Fix crashes with pixel readback when using the optimized assembly functions.
Pixel count can be negative (this could be fixed elsewhere), so adapt the
functions to work with such inputs correctly (same behaviour as non-optimized
functions).
Bugzilla #2317
Submitted by idr
2005-06-30 11:42:56 +00:00
Aapo Tahkola b0d62880e8 -"fix" page flipping
-use depth tiling if tiling is enabled
2005-06-30 04:37:19 +00:00
Brian Paul 0e55891674 fix a few glitches 2005-06-30 02:34:07 +00:00
Brian Paul ccda2162f6 fix Darwin dynamic lib naming 2005-06-30 02:33:25 +00:00
Brian Paul b6c0d753fa just code clean-ups and new comments 2005-06-28 03:48:08 +00:00
Vladimir Dergachev ec17e7941a Uncomment a couple of helper functions.
Fix slipup from CVS update that was commented out and did not show up during compilation.
2005-06-27 18:46:31 +00:00
Vladimir Dergachev b6c5116171 Rename unchecked state to match DRM driver.
Emit wait idle and pacify r300 before emitting state - this seems to improve stability.
2005-06-27 15:56:14 +00:00
Brian Paul 84f8d7aafb include t_vp_build.h 2005-06-27 00:45:36 +00:00
Brian Paul 39a488ed63 remove unused MEMSET16 macro 2005-06-27 00:39:33 +00:00
Brian Paul 2dbffb30f0 Get rid of the MESA_PBUFFER_ALLOC/FREE() macros.
If that stuff is still needed, lots of other updates are needed anyway.
Also, some misc MALLOC/FREE -> _mesa_malloc/free() changes.
2005-06-27 00:34:17 +00:00
Brian Paul 397088ff5e added _tnl_ProgramCacheDestroy() prototype 2005-06-27 00:30:56 +00:00
Brian Paul c43f03e38d make create_new_program() static 2005-06-27 00:30:37 +00:00
Eric Anholt 3f9839a52b Fix crashes during rasterization fallback by avoiding _tnl_need_projected_coords
during fallbacks.  In one case, _swsetup_Wakeup had just been called, covering
the need there, and in the other case, we can simply exit the entire
radeonChooseVertexState function, knowing that it will be called again once we
leave the fallback.

Bugzilla #:	2516
Submitted by:	sroland
2005-06-26 21:57:23 +00:00
Eric Anholt a4eb693b5f Remove the #if 0-ed out old span code. 2005-06-26 21:54:43 +00:00
Eric Anholt 32b898126e Explain the reason for TCL fallback when GL_SPHERE_MAP happens with
RADEON_DEBUG=fall.
2005-06-26 21:53:11 +00:00
Eric Anholt 3b817fde88 Zero out the ENGPACKET allocated on the stack, to avoid sending uninitialized
values to reserved fields on the card, resulting in all-black output and
sometimes hangs.

Submitted by:	Thomas Winischhofer
2005-06-26 21:02:58 +00:00
Brian Paul 845f2a7350 fix for-loop in _mesa_GetDouble to avoid out of bounds memory read 2005-06-26 20:08:23 +00:00
Brian Paul f8582b6c1f check for null oldBuffer in _mesa_realloc(), cleaned up some comments 2005-06-26 19:57:17 +00:00
Brian Paul 394fd40a53 need parenthesis in realloc call 2005-06-26 19:53:52 +00:00
Ian Romanick 4e1aae6e0e Ignore files generated as part of the build process. 2005-06-24 18:54:57 +00:00
Ian Romanick 5aafea03af Fix non-x86 specific builds. The changes from glTexImage3DEXT to
glTexImage3D that caused me so many problems during the re-development
of the API scripts reared its ugly head again.  This has been fixed by
tracking the parameter string for each entry-point individually.

This has the annoying side-effect that the names of the parameters in
all aliases of a function must be the same or gl_apitemp.py will
generate bad code. :(  The changes in
src/mesa/glapi/{gl_API.xml,glapitable.h} and src/glx/x11/* are caused
by fixing the parameter names in various function aliases that didn't
match.

Reported by: Eric Anholt, Jacob Jansen
2005-06-24 18:35:31 +00:00
Jeremy Kolb 3fb86eefe8 Fixed the XCB implementation when always_array is true, thanks to Ian Romanick for pointing it out. Please review. 2005-06-24 02:28:02 +00:00
Brian Paul 1c5caba184 Remove the xmesa_set_buffer() function. No longer needed since the
span functions pass in a gl_renderbuffer to indicate which color
buffer should be drawn into.  Optimized line/triangle routines are
smart enough to know which buffer to draw into as well.
The swrast->SetBuffer() routine should eventually be removed from
all drivers.
2005-06-23 15:09:32 +00:00
Ian Romanick 2636e853f6 Mark GenQueriesARB at 'always_array="true"'. This eliminates the need
to special-case the handling of that function in glX_proto_send.py.
2005-06-22 17:11:20 +00:00
Jeremy Kolb 814e5360b0 Fixed a bug where GenQueriesARB was generating the wrong code for XCB and wouldn't compile. Not sure how that slipped through before but it should work now. 2005-06-22 02:36:23 +00:00
Ian Romanick 66a5548fbb Mammoth update to the Python code generator scripts that live in
src/mesa/glapi.  Basically, the scripts that did simple things (like
gl_offsets.py) were simple, and the scripts that did more complicated things
(like glX_proto_send.py) were getting progressively more and more out of
control.  So, I re-write the foundation classes on which everything is based.

One problem with the existing code is that the division between the GL API
database representation and the way the output code is generated was either
blury or nonexistant.  The new code somewhat follows the
Model-View-Controller pattern, minus the Controller.  There is a distinct
set of classes that model the API data, and there is a distinct set of
classes that generate code from that data.

One big change is in the class that represents GL functions (was glFunction,
is now gl_function).  There used to be an instance of this calls for each
function and for each alias to that function.  For example, there was an
instance for PointParameterivSGIS, PointParameterivEXT, PointParameterivARB,
and PointParameteriv.  In the new code, there is one instance.  Each
instance has a list of entrypoint names for the function. In the next
revision, this will allow a couple useful things.  The script will be able
to verify that the parameters, return type, and GLX protocol for a function
and all it's aliases match.

It will also allow aliases to be represented in the XML more compactly.
Instead of repeating all the information, an alias can be listed as:

     <function name="PointParameterivARB" alias="PointParameterivEXT"/>

Because the data representation was changed, the order that the alias
functions are processed by the scripts also changed.  This accounts for at
least 2,700 of the ~3,600 lines of diffs in the generated code.

Most of the remaining ~900 lines of diffs are the result of bugs *fixed* by
the new scripts.  The old scripts also generated code with some bugs in it.
These bugs were discovered while the new code was being written.

These changes were discussed on the mesa3d-dev mailing list back at the end
of May:

http://marc.theaimsgroup.com/?t=111714569000004&r=1&w=2

Xorg bug: 3197, 3208
2005-06-21 23:42:43 +00:00
Nicolai Haehnle f292e13a20 Back out the actual enabling of depth tiling.
Depth tiling breaks software fallbacks and depth buffer reads.
radeon_span.c **must** be updated for anything that is related to tiling.
2005-06-21 17:18:00 +00:00
Nicolai Haehnle 1e4744d2b9 Add PCI ID for R420 JI.
The driver appears to work reliably (i.e. lockup-free) with a card based
on this chip. However, I have not explored whether we could get anything
in terms of 3D performance "for free" just by setting some magic bits
in those registers that are still a mystery to us.
2005-06-21 17:03:29 +00:00
Aapo Tahkola ebd99043ed r300 driver side of color tiling support. 2005-06-21 15:41:03 +00:00
Nicolai Haehnle a5fb15cb87 Make sure texture base addresses are used correctly.
They are relative to the card's address space, not relative to fbLocation,
which will be important once we program MC_FB/AGP_LOCATION in the way
they are programmed on older Radeon chips.
2005-06-21 15:21:14 +00:00
Brian Paul 04f863e856 check for NULL swrast->Driver.SetBuffer before calling it 2005-06-21 14:39:43 +00:00
Brian Paul 23606a5704 updated to version 29 2005-06-21 14:30:46 +00:00
Brian Paul 90b40c33e7 include light.h to silence warning 2005-06-21 03:38:10 +00:00
Brian Paul dc137ddb3f DirectFB updates (Claudio Ciccani) 2005-06-20 18:29:28 +00:00
Jeremy Kolb a6a3e01b09 ran "make" after update to glX_proto_send.py. 2005-06-20 03:18:16 +00:00
Jeremy Kolb 4378dee78c Fixed some issues where XCB replies were being freed and data was not being copied. 2005-06-20 03:12:35 +00:00
Brian Paul 38332a6d94 Define __FUNCTION__ as a preprocessor symbol in glheader.h if we're not
using GCC or VMS.
2005-06-19 14:57:34 +00:00
Aapo Tahkola 4e7df27466 Fix gloss breakage when using hw tnl. 2005-06-16 11:57:45 +00:00
Aapo Tahkola 3c6f17be32 Use depth tiling. 2005-06-16 11:41:19 +00:00
Aapo Tahkola af02907b4c Support 16-bit modes. 2005-06-16 10:40:39 +00:00
Aapo Tahkola 463c1d6c57 Fix problems with elts when immediate mode is on. 2005-06-16 10:27:04 +00:00
Aapo Tahkola 0e288e58ef Turn off VBO's. 2005-06-16 10:21:01 +00:00
Aapo Tahkola 3176f8e2e1 lost_context never gets reset. 2005-06-16 10:05:18 +00:00