Commit graph

33017 commits

Author SHA1 Message Date
Corbin Simpson
21961f6e96 r300g: Expound on dithering comment. 2010-04-02 14:21:50 -07:00
Dave Airlie
f6c7b91165 r300g: make dithering work like fglrx.
From fglrx traces the dithering is never enabled.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-03 07:03:01 +10:00
Yann Droneaud
1d11ba0ba3 gallium: fix dri_destroy_option_cache() when optionCache.info is NULL
With an Intel 855GM handled by intel_drv, there's a crash with Gallium3D
enabled DRI driver for Intel i915 (--enable-gallium-intel).
The Gallium3D driver doesn't support the 855GM as expected by
intel_drv, it failed to open the screen and give an half
initialized screen structure to dri_destroy_option_cache():
optionCache.info is NULL, so it's crashing while trying
to free array content. This patch at least fix the crash in the function.

Here's some logs of the fixed version:

[ 16274.137] LoaderOpen(/opt/mesa/lib/xorg/modules/drivers/intel_drv.so)
[ 16274.139] (II) Loading /opt/mesa/lib/xorg/modules/drivers/intel_drv.so
[ 16274.183] (II) Module intel: vendor="X.Org Foundation"
[ 16274.183]    compiled for 1.8.0, module version = 2.11.0
[ 16274.183]    Module class: X.Org Video Driver
[ 16274.183]    ABI class: X.Org Video Driver, version 7.0
[ 16274.183] (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
        i810-dc100, i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G,
        E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, Pineview G,
        965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, GM45,
        4 Series, G45/G43, Q45/Q43, G41, B43, Clarkdale, Arrandale
[ 16274.382] (II) intel(0): Integrated Graphics Chipset: Intel(R) 855GME
[ 16274.382] (--) intel(0): Chipset: "852GM/855GM"
[ 16276.675] (II) intel(0): [DRI2] Setup complete
[ 16276.675] (II) intel(0): [DRI2]   DRI driver: i915
debug_get_option: GALLIUM_TRACE = (null)
debug_get_bool_option: GALLIUM_RBUG = FALSE
debug_get_bool_option: INTEL_DUMP_CMD = FALSE
i915_create_screen: unknown pci id 0x3582, cannot create screen
dri_init_screen_helper: failed to create pipe_screen
[ 16276.794] (EE) AIGLX error: Calling driver entry point failed
[ 16276.794] (EE) AIGLX: reverting to software rendering
[ 16276.794] (II) AIGLX: Screen 0 is not DRI capable
[ 16276.796] (II) AIGLX: Loaded and initialized /opt/mesa/lib/dri/swrast_dri.so
[ 16276.796] (II) GLX: Initialized DRISWRAST GL provider for screen 0

Signed-off-by: Yann Droneaud <yann@droneaud.fr>
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2010-04-02 13:44:31 -07:00
Brian Paul
bc50336b6a llvmpipe: limit max texture size to 2Kx2K for now
MAXWIDTH/HEIGHT were 2048 but the max texture size was 4096.
This caused a crash if a 4Kx4K texture was created and rendered to.
See comment about max framebuffer size in lp_scene.h.

Also added assertions to catch this inconsistancy in the future.
2010-04-02 09:20:05 -06:00
Vinson Lee
82e289d355 gallivm: Add fallthrough comment at end of case statement.
The code is correct. Tell Coverity that the fallthrough case is
intentional.
2010-04-02 01:16:13 -07:00
Vinson Lee
c87e6e50ee progs/gallium/unit: Silence uninitialized variable warnings. 2010-04-02 01:08:31 -07:00
Luca Barbieri
2d65a7caf9 gallium/util: print \n after DXTn printf 2010-04-02 07:33:12 +02:00
Luca Barbieri
f50247c9aa softpipe: remove S3TC init, since it's done on-demand now 2010-04-02 07:33:12 +02:00
Vinson Lee
36ed9a7f13 progs/gallium/unit: Move declaration before code.
Fixes SCons build.
2010-04-01 22:29:23 -07:00
Brian Paul
3e1a3923f4 glsl: fix bad return value in link_transform_feedback() 2010-04-01 22:32:46 -06:00
Brian Paul
e47d7e8790 gallium/util: remove extraneous semicolon 2010-04-01 22:19:52 -06:00
Brian Paul
361b179720 gallium: remove old comment about return values 2010-04-01 22:17:14 -06:00
Brian Paul
30b9ead229 glsl: remove obsolete comment 2010-04-01 22:17:14 -06:00
Brian Paul
107c72f355 glsl: do extra link checking for transform feedback 2010-04-01 22:17:14 -06:00
Brian Paul
50a75a0b4a docs: update GL3 / GL_ARB_fragment_coord_conventions status 2010-04-01 22:17:14 -06:00
Brian Paul
3100f31b74 mesa: minor fixes in _mesa_GetTransformFeedbackVarying() 2010-04-01 22:17:14 -06:00
Brian Paul
3b49437372 glsl: append built-in, used varying vars to the varying vars list 2010-04-01 22:17:14 -06:00
Brian Paul
1a14866689 mesa: make _mesa_copy_string() non-static 2010-04-01 22:17:13 -06:00
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
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
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
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