Commit Graph

21640 Commits

Author SHA1 Message Date
Eric Anholt
255e5be265 i965: Avoid re-uploading the index buffer when we don't need to.
No performance difference proven at 95% confidence with my GLSL demo (n=10).
2009-08-12 12:43:42 -07:00
Alex Deucher
a245c05dd3 r600: fix warning 2009-08-12 15:40:15 -04:00
Alex Deucher
b0c191acaf r600: state cleanups 2009-08-12 15:40:15 -04:00
Alex Deucher
2f6675b816 r600: clean up Create/DestroyContext 2009-08-12 15:40:15 -04:00
Pauli Nieminen
b6a4f5f1d3 r200: Prevent TexGenMatrix from leaking when destroying r200 context.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-12 15:40:14 -04:00
Brian Paul
855374a76a vbo: fix incorrect pointer 2009-08-12 13:16:41 -06:00
Brian Paul
8f9ee06925 glsl: add gl_Vertex, gl_Normal, etc to list of active attributes
If a vertex shader uses gl_Vertex, gl_Normal, etc, we need to include them
when the user queries the list of active attributes.  Before this we were
just including the user-defined attributes.
2009-08-12 12:35:13 -06:00
Brian Paul
fd5eda1423 glsl: move predefined shader input/output info/code to slang_builtin.c
This is a more logical place for this code.
Also add some functions for querying vertex shader input names, types, etc.
2009-08-12 12:35:12 -06:00
Eric Anholt
2708ddfb06 vbo: Avoid extra validation of DrawElements.
This saves mapping the index buffer to get a bounds on the indices that
drivers just drop on the floor in the VBO case (cache win), saves a bonus
walk of the indices in the CheckArrayBounds case, and other miscellaneous
validation.  On intel it's a particularly a large win (50-100% in my app)
because even though we let the indices stay in both CPU and GPU caches, we
still end up waiting for the GPU to be done with the buffer before reading
from it.

Drivers that want the min/max_index fields must now check index_bounds_valid
and use vbo_get_minmax_index before using them.
2009-08-12 11:28:34 -07:00
Eric Anholt
ef3ad412c7 radeon: Minor warnings cleanup. 2009-08-12 11:28:34 -07:00
Eric Anholt
e643bc5fc7 i965: Use _MaxElement instead of index-calculated min/max for VBO bounds. 2009-08-12 11:28:33 -07:00
Pauli Nieminen
29173d3d5c radeon: Add protection against recursive DRM locking.
Reference counting protects DRM lock call from recursive locking that would
cause hang. Code also adds optional debugging output for recursive call that
is compiled only if NDEBUG is not defined.

This code is not 100% thread safe because mesa doesn't include increment and
test atomic operation. There is built-in gcc functions but they are only
available from gcc 4.2.
2009-08-12 14:14:29 -04:00
Michel Dänzer
5eeb44f398 st/xorg: Acquire/drop DRM master in order to work with multiple servers. 2009-08-12 19:11:11 +02:00
Brian Paul
f21b0e9a04 gallium/glx/xlib: main/ prefix on Mesa includes, remove -I$(TOP)/src/mesa/main/ 2009-08-12 10:32:22 -06:00
Brian Paul
10eb2ca954 gallium/glx/xlib: updated comments 2009-08-12 10:32:22 -06:00
Brian Paul
80b8fbcaba gallium/glx/xlib: delete fakeglx.h 2009-08-12 10:32:22 -06:00
Brian Paul
275d0e7e92 gallium/glx/xlib: rename fakeglx.c to glx_api.c 2009-08-12 10:32:22 -06:00
Brian Paul
622d531296 gallium/glx/xlib: delete glxapi.h 2009-08-12 10:32:22 -06:00
Brian Paul
f5dd1cff94 gallium/glx/xlib: rename fakeglx_fonts.c to glx_usefont.c 2009-08-12 10:32:22 -06:00
Brian Paul
0528d6c704 gallium/glx/xlib: rename glxapi.c to glx_getproc.c 2009-08-12 10:32:22 -06:00
Brian Paul
f546fa00aa gallium/glx/xlib: don't include fakeglx.h 2009-08-12 10:32:22 -06:00
Brian Paul
4a4039e199 gallium/glx/xlib: overhaul and simplification of the Gallium Xlib-based GLX
The old GLX dispatch table stuff isn't needed (same story for the Mesa/Xlib
driver).  The intention of that code was being able to switch on the fly
between the real GLX library and the fake/Xlib-based emulation.  That hasn't
been used in a long time.

Next up: some file renaming.
2009-08-12 10:32:22 -06:00
Cooper Yuan
1e52b8b4e0 r600: A shader is bound that exports Z as a float into Red channel 2009-08-12 17:39:18 +08:00
Chia-I Wu
64e7bb3262 egl: Use _eglAddAtExitCall to free thread infos and displays.
Thread infos and displays are usually not freed by applications.  This
commit add atexit calls to free them.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu
435c7ac24d egl: Add _eglAddAtExitCall.
Add a convenient wrapper to register atexit calls.  Add mutex to
_eglGlobal along the way.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu
0e3687e33d egl: Make _eglGlobal initialize statically.
Now that display and surface hash tables are moved out, _eglGlobal can
be initialized statically.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu
413969a920 egl: Implement _eglFiniDisplay.
_eglFiniDisplay is called at exit time to free allocated displays.  It
is, however, not used right now.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu
621801abd2 egl: Make display and surface hash tables local.
Move display and surface hash tables to egldisplay.c, and have them
initialized on demand.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu
56d2119280 egl: Initialize current thread management on demand.
Current thread management was initialized in _eglInitGlobals, which is
called only in eglGetDisplay.  Since EGL does not require eglGetDisplay
to be called first, the initialization is better to be done on demand.

_eglFiniCurrent is removed, as it is not called at all.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu
f6c2f5e379 egl: Destroy eglThreadInfo on thread exit.
This is done through pthread TSD destructor.  It destroys all thread
infos except for main thread's.  The thread info of the main thread is
destroyed by _eglFiniCurrent.

TLS case is not supported yet.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu
e79d21ca1f egl: Add eglmutex.h.
The implementation uses pthread mutex when available.  Otherwise, it is
no-op.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
RALOVICH, Kristóf
50f8ca2344 glx: fix signedness warning 2009-08-11 22:14:35 -06:00
Brian Paul
fd90d8000c mesa: handle glDrawPixels images which are larger than max rect texture size 2009-08-11 20:34:22 -06:00
Brian Paul
dba6d52ba0 mesa: added _mesa_meta_draw_pixels() 2009-08-11 20:34:21 -06:00
Brian Paul
f821866360 mesa: added META_FOG and optimize some meta_begin/end() code 2009-08-11 20:34:21 -06:00
Brian Paul
9ba19b892c gallium/trace: remove stray semicolons 2009-08-11 20:34:21 -06:00
Brian Paul
b681f396e6 gallium/xlib: add missing tex_usage parameter 2009-08-11 20:34:21 -06:00
Brian Paul
6deaa6d4b1 gallium/egl: add missing tex_usage parameter 2009-08-11 20:34:21 -06:00
Brian Paul
2e8be3ab79 gallium/xlib: add missing tex_usage parameter 2009-08-11 20:34:21 -06:00
Brian Paul
26a762c2f6 gallium/identity: remove stray semicolons 2009-08-11 20:34:21 -06:00
Alex Deucher
c2b29b5df5 r600: use the drm ioctls for swap and texture upload
NOTE:  THIS REQUIRES AN UPDATED DRM!
2009-08-11 22:21:26 -04:00
Jakob Bornecrantz
164d8e8701 i915g: Reduce max relocs 2009-08-12 03:58:38 +02:00
Jakob Bornecrantz
df9f27822e i915g: Check relocs as well 2009-08-12 03:58:37 +02:00
Jakob Bornecrantz
7a60ed2015 i915g: Implement surface_buffer_create for softpipe
In order to run softpipe on st/xorg we need this function
2009-08-11 18:37:09 +01:00
Jakob Bornecrantz
a41a253ce3 gallium: Add texture usage information to surface_buffer_create
We need aditional meta data about the usage of the surface
	in softpipe because we need to be able tell the diffrence
	between PRIMARY and DISPLAY_TARGET surfaces.
2009-08-11 18:34:43 +01:00
Brian Paul
7013a4dfb8 mesa/glapi: regenerated files from gl_API.xml 2009-08-11 10:00:02 -06:00
Brian Paul
bb45e6f07b gallium: fix debug_printf() format string 2009-08-11 09:30:12 -06:00
Brian Paul
a9d37f6837 glut: fix incorrect Vista maximisation size due to WM_GETMINMAXINFO handling
See bug 23182.
2009-08-11 08:54:25 -06:00
Brian Paul
20e4421fe3 mesa: remove _mesa_set_vp_override() from _mesa_Bitmap()
This reverts part of commit 2c9812e3d3.
The calls to _mesa_set_vp_override() were causing extra state validation
and caused the gallium state tracker's bitmap cache to get flushed on
every call.
2009-08-11 08:38:51 -06:00
Michel Dänzer
e93be5132c r300g: Fix up remaining VAP_CNTL_STATUS writes for big endian. 2009-08-11 09:16:48 +02:00