Brian Paul
af3d7f6889
demos: call SetUniformValues()
2009-08-12 17:28:45 -06:00
Brian Paul
f95b82b486
mesa: const qualifiers
2009-08-12 17:28:45 -06:00
Brian Paul
bd4c6a2e50
vbo: use _mesa_is_bufferobj()
2009-08-12 17:28:45 -06:00
Brian Paul
684049d97d
demos: rename InitUniforms() to SetUniformValues()
...
And call new PrintUniforms() in demos.
2009-08-12 17:28:45 -06:00
Brian Paul
378bff0edd
progs/util: added more shader utility functions
2009-08-12 17:28:45 -06:00
Brian Paul
434ec3ada8
mesa: use _mesa_is_bufferobj()
2009-08-12 17:28:45 -06:00
Brian Paul
604031563c
mesa: use _mesa_is_bufferobj()
2009-08-12 17:28:45 -06:00
Brian Paul
abbf83551f
mesa: new _mesa_is_bufferobj() function
...
Tests if the given buffer object is a user-created, non-default buffer object.
Use this instead of testing bufferobj->Name != 0.
2009-08-12 17:28:45 -06:00
Eric Anholt
d64649a316
i965: Make the cube mapping RCP use a writemask.
...
Fixes cube mapping since the scalar changes.
2009-08-12 13:50:09 -07:00
Eric Anholt
5faa0dc591
i965: Allocate destination registers for GLSL TEX instructions contiguously.
...
This matches brw_wm_pass*.c behavior, and fixes the norsetto shadow demo.
Bug #19489
2009-08-12 13:18:47 -07:00
Eric Anholt
63fa5fd319
i965: drop dead scalar handling in GLSL.
2009-08-12 13:05:59 -07:00
Eric Anholt
08687c8b40
i965: Correct brw_wm_nr_args for WM_DELTAXY and WM_PIXELXY.
2009-08-12 12:54:43 -07:00
Eric Anholt
863ae3a527
i965: Drop GLSL ABS code, which is translated away in brw_wm_fp.
2009-08-12 12:43:43 -07:00
Eric Anholt
4de8b8902f
i965: Drop code for emitting OPCODE_SUB, since brw_wm_fp.c makes it an ADD.
2009-08-12 12:43:43 -07:00
Eric Anholt
0eb819a2d1
i965: Store the dispatch width in the WM compile struct.
...
I'll be using this in merging brw_wm_emit.c and brw_wm_glsl.c
2009-08-12 12:43:43 -07:00
Eric Anholt
536476f243
i965: Handle scalar result swizzling in shared GLSL/non-GLSL code.
...
This is preparation for merging of brw_wm_glsl.c and
brw_wm_emit.c, and glsl.c doesn't swizzle channel results around.
2009-08-12 12:43:43 -07:00
Eric Anholt
792c49968e
i965: Flag ARL-using programs as requiring brw_wm_glsl.c
...
This doesn't fix the glean testcase, but I guess it provides hope.
2009-08-12 12:43:42 -07:00
Eric Anholt
4e477aa1ba
i965: Remove some unused WM opcode args.
2009-08-12 12:43:42 -07:00
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