Age | Commit message (Collapse) | Author |
|
the driver. The loader now takes care of this for the driver.
Remove _glapi_DispatchTSD and give _glapi_Dispatch its semantic (i.e.,
having a NULL value means that the application is multithreaded and
_glapi_get_dispatch must be called).
Gut all of the dispatch override code. This removes _glapi_RealDispatch,
_glapi_tls_RealDispatch, _glapi_begin_dispatch_override,
_glapi_end_dispatch_override, and _glapi_get_override_dispatch.
Remove _glapi_get_proc_address, _glapi_get_proc_name, _glapi_get_version,
and _glapi_check_table from the loader / driver interface.
Reviewed by: Brian Paul
|
|
|
|
to free the key when entry was already found (presumably a common case).
|
|
CALL_by_offset, SET_by_offset, and GET_by_offset all had various problems.
The core issue is that parts of the device-independent code in Mesa assumes
that all functions have slots in the dispatch table. This is especially
true in the display list code. It will merrilly try to set dispatch
pointers for glVertexAttrib1fARB even if GL_ARB_vertex_program is not
supported. When the GET/SET/CALL macros are invoked, they would read a 0
from the remap table. The problem is that 0 is the dispatch offset for
glNewList!
One change is that the remap table is now initialized to be full of -1
values. In addtion, all of the *_by_offset marcos misbehave in an obvious
way if the specified offset is -1. SET_by_offset will do nothing,
GET_by_offset will return NULL, and CALL_by_offset, since it uses
GET_by_offset, will segfault.
I also had to add GL_EXT_blend_func_separate to the list of default
extensions in all_mesa_extensions (src/mesa/drivers/dri/common/utils.c).
Even though many drivers do not export this extension, glBlendFunc is
internally implemented by calling glBlendFuncSeparate. Without this
addition, glBlendFunc stopped working on drivers (such as mga) that do not
export GL_EXT_blend_func_separate.
There are still a few assertions / crashes in GL_ARB_vertex_program tests,
but I don't think that these are related to any of my changes.
|
|
_glapi_add_entrypoint has been replaced by a new routine called
_glapi_add_dispatch. This new routine dynamically assignes dispatch offsets
to functions added. This allows IHVs to add support for extension functions
that do not have assigned dispatch offsets.
It also means that a driver has no idea what offset will be assigned to a
function. The vast majority of the changes in this commit account for that.
An additional table, driDispatchRemapTable, is added. Functions not in the
Linux OpenGL ABI (i.e., anything not in GL 1.2 + ARB_multitexture) has a
fixed offset in this new table. The entry in this table specifies the
offset in of the function in the real dispatch table.
The internal interface was also bumped from version 20050725 to 20050727.
This has been tested with various programs in progs/demos on:
radeon (Radeon Mobility M6)
r128 (Rage 128 Pro)
mga (G400)
|
|
relative addressing can be negative.
Change some GLuint indexes to GLint in the t_vp_build.c file.
Added PROGRAM_UNDEFINED token for initializing the register File field to
avoid a gcc 4.0 warning.
|
|
|
|
|
|
|
|
|
|
|
|
generated file, called src/mesa/glapi/dispatch.h, is added. This file
contains three macros for each API function. It contains a GET, a SET, and
a CALL. Each of the macros take a pointer to the context and a pointer to
the dispatch table.
In several threads on mesa3d-dev we discussed replacing _glapi_add_entrypoint
with a new function called _glapi_add_dispatch. For this discussion, the
important difference between the two is that the caller of _glapi_add_dispatch
does *not* know what the dispatch offset will be at compile time. Because of
this callers need to track the dispatch offset returned by
_glapi_add_dispatch.
http://marc.theaimsgroup.com/?t=111947074700001&r=1&w=2
The downside is that driver code then has to access the dispatch table two
different ways. It accesses it using structure tags (e.g., exec->Begin) for
functions with fixed offsets and via a remap table (e.g., exec[
remap->NewExtensionFunction ]) for functions without fixed offsets. Yuck!
Using the macros allows both types of functions to be accessed
identically. If a driver needs to set a pointer for Begin, it does
'SET_Begin(ctx, exec, my_begin_function)'. If it needs to set a pointer
for NewExtensionFunction, it does 'SET_NewExtensionFunction(ctx, exec,
my_NewExtensionFunction_function)'. Furthermore, if at some point in
the future a static offset is assigned for NewExtensionFunction, only
the macros need to change (instead of every single place that accesses a
table for that function).
This code differs slightly from the originally posted patches in that the
CALL, GET, and SET marcos no longer take a context pointer as a parameter.
Brian Paul had suggested that the remap table could be stored as a global
since it would be set at CreateScreen time and would be constant for all
contexts. This change reflects that feedback.
http://marc.theaimsgroup.com/?t=112087194700001&r=1&w=2
|
|
modular X build
|
|
|
|
|
|
|
|
Restore that behavior with new _mesa_alloc_texmemory() function.
Should fix via_sse_memcpy() problem in found with flightgear.
|
|
is basically patch #2939 from X.org bugzilla #3379. This does *not*
fix the bug as it does not dynamically generate stubs at run-time. It
just gets things one step closer.
|
|
|
|
Now, OLD_RENDERBUFFER marks code that needs to eventually be removed when
all the drivers are updated to no longer need the SetBuffer() function.
|
|
|
|
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
|
|
|
|
testing the flags field.
Move definition of all the MAT_FLAGs into the m_matrix.c file since they're
now private.
|
|
|
|
If that stuff is still needed, lots of other updates are needed anyway.
Also, some misc MALLOC/FREE -> _mesa_malloc/free() changes.
|
|
|
|
|
|
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
|
|
|
|
using GCC or VMS.
|
|
|
|
vertex_program struct.
Allow switching between regular and vertex_program implementations
of fixed function TNL with the MESA_TNL_PROG environment var
(previously this required recompilation).
Ensure program compilation only references program data, not the
wider context. This means that compiled programs only need to be
invalidated when the program string changes, not on other state
changes.
|
|
|
|
removing that
|
|
|
|
|
|
|
|
multiple places don't get generated multiple times.
|
|
|
|
|
|
|
|
Add a TextureMemCpy callback, called from texstore.c when copying
texture data via the memcpy_texture() path.
Enable this code in the via driver - 100% speedup in texdown.c results.
|
|
|
|
generated somewhat, with all TEX instructions now emitted at the head
of the program.
|
|
Add Ben Skegg's ATI_texture_env_combine3 support.
|
|
|
|
involved in _mesa_textore_argb/rgba8888 (source, base-internal,
destination) differ. _mesa_swizzle_ubyte_image knows only about two of
the formats and can't handle the case that all three are different
correctly. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=3111.
|
|
with Ben Skeggs.
|
|
|