Commit Graph

39 Commits

Author SHA1 Message Date
Vinson Lee
0117da40cd mesa: Include mtypes.h in files that use gl_context struct.
Directly include mtypes.h if a file uses a gl_context struct. This
allows future removal of headers that are not strictly necessary but
indirectly include mtypes.h for a file.
2011-01-05 23:11:54 -08:00
Kristian Høgsberg
f9995b3075 Drop GLcontext typedef and use struct gl_context instead 2010-10-13 09:43:25 -04:00
Brian Paul
9f7c8053e0 mesa: fix assertions to handle srgb formats
http://bugs.freedesktop.org/show_bug.cgi?id=30333

NOTE: This is a candidate for the 7.9 branch.
2010-09-24 07:55:49 -06:00
Eric Anholt
a62efdf82c mesa: Remove EXT_convolution.
More optional code.
2010-09-23 13:25:45 -07:00
Eric Anholt
0673b46933 mesa: Don't warn when the desired result of s3tc lib available occurs. 2010-08-25 23:43:21 -07:00
Vinson Lee
245d5a8913 mesa: Remove unnecessary headers. 2010-07-31 14:37:32 -07:00
Vinson Lee
3fdd9fa556 mesa: Include macros.h in files that use symbols from macros.h.
Don't rely on inclusion of other files that already include macros.h.
2010-07-30 00:41:08 -07:00
Eric Anholt
fef303bc94 mesa: Remove _mesa_pow(), which is always just pow(). 2010-05-13 13:02:09 -07:00
José Fonseca
96548d80e5 mesa: Use a consistent name of the external s3tc library for all windows compilers. 2010-03-31 19:53:25 +01:00
Kristian Høgsberg
32f2fd1c5d Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions 2010-02-19 12:03:01 -05:00
Chia-I Wu
59798cd886 mesa/main: Make FEATURE_texture_s3tc follow feature conventions.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-29 07:52:58 -06:00
Brian Paul
90cd968300 mesa: don't include texformat.h 2009-10-05 17:56:31 -06:00
Brian Paul
bdc761b0f9 mesa: remove gl_texture_format 2009-09-30 20:35:32 -06:00
Brian Paul
1f7c914ad0 mesa: replace gl_texture_format with gl_format
Now gl_texture_image::TexFormat is a simple MESA_FORMAT_x enum.
ctx->Driver.ChooseTexture format also returns a MESA_FORMAT_x.
gl_texture_format will go away next.
2009-09-30 20:28:45 -06:00
Brian Paul
4fc344790d mesa: update comments 2009-09-27 21:13:46 -06:00
Brian Paul
a608257a02 mesa: remove unused gl_texture_format fields 2009-09-27 18:57:02 -06:00
Brian Paul
9525b92efb mesa: NULL-out unused texformat field initializers 2009-09-27 18:28:48 -06:00
Brian Paul
7116ae857c mesa: make some s3tc/fxt1 functions public 2009-09-27 18:08:49 -06:00
Jakob Bornecrantz
b3c1c5cf2c mesa: Report name for missing s3tc functions 2009-04-09 00:13:10 +02:00
Brian Paul
b0caa10a85 Merge commit 'origin/master' into gallium-0.2 2008-12-16 15:50:14 -07:00
Brian Paul
c573b9f94a mesa: move _mesa_dlopen(), etc into separate dlopen.c file 2008-12-15 18:19:05 -07:00
Roland Scheidegger
5bd093bd7b mesa: fixes for srgb, new srgb formats
add some more srgb texture formats, including compressed ones
various fixes relating to srgb formats

issues: _mesa_get_teximage is completely broken for srgb textures,
        both for non-compressed ones (swizzling) and compressed ones
        (shouldn't do standard-to-linear conversion)
        texelFetch function may be broken for little or big endian
        (or both...)
2008-12-12 05:12:48 +01:00
Zou Nan hai
6bf81a5edf EXT_texture_sRGB support on i965 2007-08-02 14:26:12 +08:00
Brian
c9855a60f4 Call _mesa_warning() instead of _mesa_problem() when external s3tc lib not found.
The later incorrectly encourages filing a bug (10703, for example).
2007-04-21 09:47:36 -06:00
Brian
18d1fdebeb fixes for C++ warnings/errors 2007-01-23 11:46:02 -07:00
Brian Paul
7e75f51b27 fix MINGW32 problems 2006-10-31 19:14:27 +00:00
Brian Paul
9c3876d7d8 New wrapper functions: _mesa_dlopen(), _mesa_dlsym(), _mesa_dlclose().
Eventually move them into imports.c
2006-08-03 03:59:20 +00:00
Brian Paul
b0b6d1abe5 In gl_texture_image, replace ImageStride with an ImageOffsets array.
Some hardware lays out 3D mipmaps in a manner that can't be expressed
with a simple image stride.
The ImageOffsets array is allocated and initialized to typical defaults
in the _mesa_init_teximage_fields() function.  If needed, a driver will
then have to replace these offsets.
TexStore and TexelFetch routines updated to use offsets array.
2006-05-20 16:19:48 +00:00
Brian Paul
5999c5b620 Fix a number of texture compression issues.
Pass the MESA_FORMAT_* token to the _mesa_compressed_row_stride(),
_mesa_compressed_texture_size() and _mesa_compressed_image_address()
functions since we want to use the driver-chosen format, not the user's
internalFormat hint.
Consolidate code related to choosing the texture format in texstoree.c
2006-05-08 19:14:38 +00:00
Brian Paul
a9bcf75103 Replace MESA_FORMAT_DEPTH_COMPONENT_FLOAT32 with 32-bit integer format.
This allows render to depth texture (we don't support floating pt. Z buffers).
Rename MESA_FORMAT_DEPTH_COMPONENT16/32 as MESA_FORMAT_Z16/32.
Software fallback for glCopyTexImage now uses integer temporary image instead
of float, eliminates a lot of float/int conversions.
2006-04-06 04:23:58 +00:00
Brian Paul
1ad7b99925 Initial work for GL_EXT_packed_depth_stencil extension.
glReadPixels done, glDrawPixels mostly done.
2005-09-28 02:29:50 +00:00
Brian Paul
f15b499cfd make some vars static 2005-09-10 16:20:47 +00:00
Daniel Borca
8cd728f436 added dstRowStride to dxtCompressTexFuncExt;
good for subimages, padded images and such.
NB: intentionally, this is the last parameter, to avoid
breaking the current API! adding a new parameter
is not harmful, at worst it will be ignored, since all
platforms use a CDECL calling convention.
2004-10-18 07:54:09 +00:00
Daniel Borca
76908ab9d4 add more mess to the dynamic linking system 2004-10-12 06:41:20 +00:00
Eric Anholt
d09209f553 Add Roland Scheidegger's S3TC patch. This patch does not implement the
(patented) S3TC/DXTC algorithms, but adds an option to dlopen a library module
providing functions to do so.  Because it uses dlopen, it is only enabled if
USE_EXTERNAL_DXTN_LIB=1 is defined (which is only in linux-dri config, so far).
It adds support for S3TC to several DRI drivers, and adds a DRI config option to
force enabling S3TC even if the software compression/decompression is
unavailable.  This may allow people to use apps that require S3TC even though
they don't have a license to implement the patented material themselves, if
those apps use precompressed textures.

Ideally we would get permission from the current holder of the patents to
implement the algorithm in Mesa, at which point the dlopen mess could go away.
Until then, this allows some to run applications they couldn't otherwise, and
hopefully will provide us with more push to get the final step of getting that
permission done.
2004-10-07 23:30:29 +00:00
Brian Paul
a6c423d956 Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696) 2004-08-25 15:59:48 +00:00
Brian Paul
bdd15b5749 Fix minor warnings found with g++. 2004-05-04 15:11:06 +00:00
Daniel Borca
33ffbd1c58 texture compression: getting warmer 2004-05-04 06:27:06 +00:00
Brian Paul
8f04c12e0a Removed the old teximage code.
Moved all code related to specific texture compression modes into
new texcompress_s3tc.c and texcompress_fxt1.c files (but not implemented).
2004-04-27 13:39:20 +00:00