Commit Graph

33062 Commits

Author SHA1 Message Date
Brian Paul 038aba1f08 glsl: pass datatype to _mesa_add_varying()
Will be needed later for transform feedback support.
2010-04-01 22:17:13 -06:00
Brian Paul ee91c1e367 glsl: add more vertex/fragment output info helpers 2010-04-01 22:17:13 -06:00
Luca Barbieri 2a090ae80a gallium/util: revert util_format_init addition
Putting calls to util_format_init all over the codebase is infeasible.

Instead, half float tables are pregenerated, and the s3tc library is
loaded on demand.

I believe this is a solution that combines performance, cleanliness,
flexibility and portability.
2010-04-02 06:16:30 +02:00
Luca Barbieri 5126683e3b gallium/util: add util_format_is_supported to check for pack/unpack
This improves the code by making it more readable, and removes
special knowledge of S3TC and other formats from softpipe.
2010-04-02 06:16:30 +02:00
Luca Barbieri 52e9b990a1 gallium/util: load s3tc on demand
This changes the S3TC function pointers to be initialized to stubs
that load the S3TC library and then delegate to the real functions.

If the S3TC library fails to load, the function pointers are replaced
with a "nop" function.

The code is also changed to attempt to load the library only one time.c

Note that unlike checking for a flag, this method has no performance
cost at all.

The use of the "nop" functions also allows to avoid most checks, that
are only preserved when the function does non-trivial work.
2010-04-02 06:16:30 +02:00
Luca Barbieri 6259264c57 progs/gallium: add unit test for u_half 2010-04-02 06:16:30 +02:00
Luca Barbieri c476305cde gallium/util: pregenerate half float tables
This solution avoids the issue of how to run the initializers and
also allows those pages (and the parts of them in processor caches)
to be shared between multiple processes.

The drawback is slightly higher library size.
2010-04-02 06:16:18 +02:00
Chia-I Wu 154d9242de st/vega: Do not depend on libm.
This fixes the "no rule to make target -lm" error on darwin, reported by
Jeremy Huddleston.
2010-04-02 10:32:36 +08:00
Chia-I Wu 2ae66e9b97 st/egl: Add a missing break.
The swtich in egl_g3d_st_framebuffer_validate misses a break.
2010-04-02 10:20:24 +08:00
Chia-I Wu c36d15d158 progs/egl: Update .gitignore. 2010-04-02 10:03:31 +08:00
Chia-I Wu 1054f22e48 progs/egl: Link to eglut first.
This moves eglut before EGL so that the symbols can be resolved.
2010-04-02 10:01:00 +08:00
Vinson Lee 87275e8fab gallium/util: s/inline/INLINE/
Fixes MSVC build.
2010-04-01 18:50:31 -07:00
Luca Barbieri cbf4097b8d nv50: call util_format_init
Needed to fetch static vertex attributes.
2010-04-02 02:36:59 +02:00
Luca Barbieri aee5bb5b8a gallium/util: add util_format_init that inits s3tc and util_half
Switch from auto-init to explicit init for util_half per Brian Paul's
indication.

NOTE: this is probably broken because not enough things call util_format_init.
Will be fixed shortly
2010-04-02 02:31:43 +02:00
Jesse Barnes 2b4d8616f5 GLX/DRI2: pass GLX drawable ID to dri2InvalidateBuffers
The IDs will be the same in the case where an X window is used directly
as a GLX drawable, but will fail if a new GLX drawable is created
explicitly, as with glxgears_fbconfig.

Fixes fdo bug #27190.
2010-04-01 17:29:19 -07:00
Jeremy Huddleston 115203281c Revert accidental commits from the xquartz tree
This reverts commit 9aadc793f3.
This reverts commit 69ea4e7718.
This reverts commit dbe8b01393.
This reverts commit 23215ef4d6.
This reverts commit 9495e37030.
This reverts commit 0594cf7088.
This reverts commit 86a7978d37.
This reverts commit 437902ce97.
2010-04-01 17:01:51 -07:00
Luca Barbieri ecaaf8c15f gallium/util: add one-time initialization helper 2010-04-02 02:01:25 +02:00
Luca Barbieri 3040462c10 gallium/util: use #pragma section instead of #pragma data_seg
They apparently both declare the section, but #pragma data_seg
also puts all subsequent definitions in the section, which is
undesirable.

This should be the correct solution, and is actually used by the
reference I cited (but I forgot to do it in my code).

Untested, let me know if it doesn't work.
2010-04-02 00:48:27 +02:00
Luca Barbieri 6c5f444f59 gallium/util: reindent u_half.c and u_half.h with Mesa coding style
Sorry, forgout about that.
2010-04-02 00:48:27 +02:00
Luca Barbieri 7bb54c99a4 Revert "util: Init half-float tables on demand."
This reverts commit 950300eb25.
2010-04-02 00:47:11 +02:00
Dan Nicholson e40fce13e1 progs: Fix linking of Xlib demos for non-autoconf builds
The Xlib demos were fixed to use $(X11_LIBS) so that configure could
detect the proper directory to link the library from, but this broke
the non-autoconf builds. Give X11_LIBS a default value to fallback on.
2010-04-01 15:03:33 -07:00
Corbin Simpson 950300eb25 util: Init half-float tables on demand.
Gets rid of unnecessary delays on startup and compiler-specific hax.
2010-04-01 14:41:18 -07:00
Jeremy Huddleston 9aadc793f3 apple: Don't build gallium
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:48 -07:00
Jeremy Huddleston 69ea4e7718 apple: Use mesa gl.h rather than generating one.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-04-01 12:33:47 -07:00
Jeremy Huddleston dbe8b01393 apple: Integrate our libGL into the existing build system better
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:47 -07:00
Jeremy Huddleston 23215ef4d6 apple: Change ifdefs for DRI to be DRI && !APPLE
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:46 -07:00
Jeremy Huddleston 9495e37030 apple: Remove duplicate headers that already exist in mesa.
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2010-04-01 12:33:46 -07:00
Jeremy Huddleston 0594cf7088 apple: Initial import of libGL for OSX from AppleSGLX svn repository.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:45 -07:00
Jeremy Huddleston 86a7978d37 xdemos: Build object files first
This helps debugging on darwin.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:33:39 -07:00
Jeremy Huddleston 437902ce97 xdemos: Fix a build failure for non-autoconf configs
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-01 12:14:45 -07:00
José Fonseca 7e1aceaf0a llvmpipe: Support sampling from PIPE_FORMAT_R32_FLOAT. 2010-04-01 19:01:46 +01:00
Michal Krol 13d2f3c738 util: Declare .CRT$XCU data segment. 2010-04-01 19:25:25 +02:00
Michal Krol 8c519e5f87 scons: Remove `util/u_gctors.cpp'. 2010-04-01 19:06:05 +02:00
Luca Barbieri 4edffe026e gallium/util: rewrite global constructor system for half floats (GCC/MSVC only!)
NOTE: this commit will cause Gallium to fail to build on any compiler
      except GCC, the Microsoft C compiler and compatible compilers that
      claim to be one of those.

This commit removes the u_gctors.cpp mechanism, in favor of using
compiler-specific syntax to add global constructors from C files.

This solves the problem of u_gctors.o not being pulled from static
libraries and avoids using C++.

However, it needs compiler-specific support for every compiler.

The Microsoft C compiler support has not been tested.
2010-04-01 18:52:02 +02:00
José Fonseca 8f38135e28 llvmpipe: Support sampling from signed and mixed siged formats. 2010-04-01 17:46:59 +01:00
José Fonseca 675fcb6cae python/tests: We're using a rgba8 rendertarget so sample only in the [0, 1] range. 2010-04-01 17:46:59 +01:00
José Fonseca f14c5adbc7 st/python: Allow to sample only in the [0,1] range. 2010-04-01 17:46:59 +01:00
José Fonseca 811e602954 python/tests: Several cleanups. 2010-04-01 17:46:59 +01:00
José Fonseca e011272fa3 st/python: Always use softpipe as reference driver. 2010-04-01 17:46:58 +01:00
Luca Barbieri 38afd1e445 gallium/util: add copyright header to u_half.c 2010-04-01 17:31:31 +02:00
Chia-I Wu a49db89326 Update DEMO_FILES for demos using EGL.
Reflect the recent addtion of eglut and reorganization of the EGL demos.
This helps remove ~2k lines of duplicated code

$ git diff --shortstat -M 57cc1db87b
 18 files changed, 298 insertions(+), 2178 deletions(-)
2010-04-01 22:29:48 +08:00
Chia-I Wu 532b7400fd progs/egl: Port OpenVG lion and sp to eglut. 2010-04-01 22:25:50 +08:00
Chia-I Wu 7b48d88407 progs/egl: Port ES1 gears to eglut.
As gears in the last demo under "screen" subdirectory, this also removes
the directory.
2010-04-01 22:25:49 +08:00
Chia-I Wu dd7276f494 progs/egl: Port ES1 tri to eglut.
This also removes EGL_MESA_screen_surface version of ES1 tri as eglut
supports the extension.
2010-04-01 22:25:49 +08:00
Chia-I Wu 765b30849c progs/egl: Replace egltri by xegl_tri.
With the switch to eglut, xegl_tri supports both X11 and
EGL_MESA_screen_surface.  Have it replace egltri.
2010-04-01 22:25:49 +08:00
Chia-I Wu 02551cab47 progs/egl: Porg xegl_tri to eglut. 2010-04-01 22:25:49 +08:00
Chia-I Wu 589f6740ea progs/egl: Port eglgears to eglut. 2010-04-01 22:25:49 +08:00
Chia-I Wu 57cc1db87b progs/egl: Add eglut.
eglut is a simple library with GLUT-like API.  It is intended to be used
by simple EGL demos.
2010-04-01 22:25:48 +08:00
Chia-I Wu fc3ddd4b56 progs/openvg: Move OpenVG demos to a subdirectory of progs/egl.
That is, move

  progs/openvg/demos to progs/egl/openvg,
  progs/openvg/trivial to progs/egl/openvg/trivial.
2010-04-01 22:25:48 +08:00
Chia-I Wu 7f231cab2b progs/es: Move OpenGL ES demos to subdirectories of progs/egl.
Move

  progs/es1/xegl -> progs/egl/opengles1,
  progs/es1/screen -> progs/egl/opengles1/screen,
  progs/es2/xegl -> progs/egl/opengles2.
2010-04-01 22:25:48 +08:00