Commit Graph

366 Commits

Author SHA1 Message Date
Brian Paul
4ff70b7a8f mesa: consolidate glCompressedTexImage1/2/3D() functions 2010-12-07 21:37:20 -07:00
Brian Paul
1c23b860ce mesa: consolidate glCopyTexSubImage1/2/3D() functions 2010-12-07 21:37:20 -07:00
Brian Paul
11f386fb50 mesa: consolidate glCopyTexImage1/2D() code 2010-12-07 21:37:19 -07:00
Brian Paul
45124e043d mesa: consolidate the glTexSubImage1/2/3D() functions 2010-12-07 21:37:19 -07:00
Brian Paul
35f620d55c mesa: simplify proxy texture code in texture_error_check() 2010-12-07 21:37:19 -07:00
Brian Paul
d0b2b8da7d mesa: consolidate glTexImage1/2/3D() code
Something similar could be done for glCopyTex[Sub]Image() and the
compressed texture image functions as well.
2010-12-06 17:10:05 -07:00
Brian Paul
4b08f35487 mesa: raise max texture sizes to 16K
This allows 16K x 16K 2D textures, for example, but we don't want to
allow that for 3D textures.  The new gl_constants::MaxTextureMBytes
field is used to prevent allocating too large of texture image.
This allows a 16K x 32 x 32 3D texture, for example, but prevents 16K^3.
Drivers can override this limit.  The default is currently 1GB.

Apps should use the proxy texture mechanism to determine the actual
max texture size.
2010-12-02 10:09:03 -07:00
Brian Paul
5e3733fadf mesa: fix get_texture_dimensions() for texture array targets
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31779
2010-11-21 10:05:51 -07:00
Brian Paul
83e93b6008 mesa: pass gl_format to _mesa_init_teximage_fields()
This should prevent the field going unset in the future.  See bug
http://bugs.freedesktop.org/show_bug.cgi?id=31544 for background.

Also remove unneeded calls to clear_teximage_fields().

Finally, call _mesa_set_fetch_functions() from the
_mesa_init_teximage_fields() function so callers have one less
thing to worry about.
2010-11-18 16:15:38 -07:00
Brian Paul
85288ad722 mesa: reorder texture_error_check() params
To better match other functions.
2010-11-16 20:12:34 -07:00
Brian Paul
3c59febf05 mesa: 80-column wrapping 2010-11-16 20:12:34 -07:00
Brian Paul
56b4819932 mesa: consolidate assertions in teximage code 2010-11-12 07:21:29 -07:00
Brian Paul
412b960883 mesa: rename function to _mesa_is_format_integer_color()
Be a bit more clear about its operation.
2010-10-26 20:30:42 -06:00
Brian Paul
326b981d3f mesa: additional teximage error checks for GL_EXT_texture_integer 2010-10-25 19:21:55 -06:00
Brian Paul
646afcc340 mesa: simplify target_can_be_compressed() function 2010-10-23 10:19:31 -06:00
Brian Paul
8fb49554d9 mesa: remove post-convolution width/height vars
These were left-over bits from when convolution was removed.
2010-10-14 17:28:24 -06:00
Kristian Høgsberg
f9995b3075 Drop GLcontext typedef and use struct gl_context instead 2010-10-13 09:43:25 -04:00
Ian Romanick
e2a054b70c mesa: Add ARB_texture_compression_rgtc as an alias for EXT_texture_compression_rgtc
Change the name in the extension tracking structure to ARB (from EXT).
2010-10-01 16:55:35 -07:00
Ian Romanick
3ebbc176f9 ARB_texture_rg: Correct some errors in RED / RG internal format handling
Fixes several problems:

The half-float, float, and integer internal formats depend on
ARB_texture_rg and other extensions.

RG_INTEGER is not a valid internal format.

Generic compressed formats depend on ARB_texture_rg, not
EXT_texture_compression_rgtc.

Use GL_RED instead of GL_R.
2010-10-01 15:49:12 -07:00
Eric Anholt
a62efdf82c mesa: Remove EXT_convolution.
More optional code.
2010-09-23 13:25:45 -07:00
Vinson Lee
c5dde53f4e mesa: Fix printf-like warnings. 2010-09-02 16:03:32 -07:00
Brian Paul
bab484a59b mesa: call ctx->Driver.ChooseTextureFormat() only when necessary.
When defining mipmap level 'L' and level L-1 exists and the new level's
internalFormat matches level L-1's internalFormat, then use the same hw
format.  Otherwise, do the regular ctx->Driver.ChooseTextureFormat() call.

This avoids a problem where we end up choosing different hw formats for
different mipmap levels depending on how the levels are defined (glTexImage
vs. glCopyTexImage vs. glGenerateMipmap, etc).

The root problem is the ChooseTextureFormat() implementation in some
drivers uses the user's glTexImage format/type parameters in the choosing
heuristic.  Later mipmap levels might be generated with different calls
(ex: glCopyTexImage()) so we don't always have format/type info and the
driver may choose a different format.

For more background info see the July 2010 mesa-dev thread "Bug in
_mesa_meta_GenerateMipmap"
2010-07-20 08:50:32 -06:00
Vinson Lee
5f9d7bb242 mesa: Add error path in compressed_texture_error_check.
Add error path for unhandled dimensions in
compressed_texture_error_check.
2010-07-15 23:45:25 -07:00
Brian Paul
6988f65e43 mesa: initial support for new GL 3.0 texture formats 2010-07-07 20:26:33 -06:00
Brian Paul
abd5627a6a mesa: initial support for unnormalized integer texture formats
As defined by GL_EXT_texture_integer.
2010-07-05 20:14:39 -06:00
Brian Paul
2236a301c3 mesa: fix error message strings 2010-05-11 21:13:21 -06:00
Kristian Høgsberg
0870e4a202 Merge branch 'gles2-2'
Conflicts:
	src/mesa/drivers/dri/common/dri_util.h
2010-05-02 10:17:07 -04:00
Vinson Lee
fc1be4a994 mesa: s/sprintf/_mesa_snprintf/ 2010-05-02 01:03:59 -07:00
Kristian Høgsberg
7179a82262 mesa: Move support for paletted textures to main/teximage.c 2010-04-28 14:05:18 -04:00
Brian Paul
c34feadd1c mesa: make is_compressed_format() non-static 2010-04-23 12:29:31 -06:00
Brian Paul
3643841079 mesa: faster, simpler is_compressed_format() 2010-04-23 12:29:31 -06:00
Vinson Lee
8978e45e50 mesa: Add missing format specifiers in error strings. 2010-04-15 17:17:29 -07:00
Chia-I Wu
2002e4d06e mesa: Add OES_EGL_image to extension list. 2010-04-06 18:01:41 +08:00
Vinson Lee
17efc8c05c mesa: Fix SCons build. 2010-02-24 14:00:30 -08:00
Kristian Høgsberg
d1dc5b124e core: Implement GL_OES_EGL_image entry points 2010-02-24 13:38:56 -05:00
Kristian Høgsberg
298be2b028 Replace the _mesa_*printf() wrappers with the plain libc versions 2010-02-19 12:32:24 -05: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
Brian Paul
ca0d048e4e mesa: fix int/uint comparison warnings
Reported by Karl Schultz.
2010-01-27 17:04:30 -07:00
Vinson Lee
6938dccf1a mesa: Remove unnecessary header from teximage.c. 2010-01-17 22:31:53 -08:00
Brian Paul
ecb03d75a2 mesa: added another check in check_gen_mipmap()
We don't need to call ctx->Driver.GenerateMipmap() if we're updating
a texture level >= MAX_LEVEL.
2009-11-16 08:18:03 -07:00
Brian Paul
b8fdb900fb mesa: make _mesa_get_current_tex_objec() public 2009-11-02 19:38:35 -07:00
Brian Paul
a71edc9455 mesa: better error message 2009-10-30 19:08:18 -06:00
Brian Paul
67df4fb56b mesa: move, clean-up _mesa_print_texture() 2009-10-29 10:50:26 -06:00
Brian Paul
d580c0c8f7 mesa: fix some tests in subtexture_error_check2()
Don't use hard-coded compressed block sizes.
Update comments and error strings.
2009-10-29 10:50:26 -06:00
Brian Paul
1f196b786d Merge branch 'texformat-rework'
Conflicts:
	src/mesa/drivers/dri/radeon/radeon_fbo.c
	src/mesa/drivers/dri/s3v/s3v_tex.c
	src/mesa/drivers/dri/s3v/s3v_xmesa.c
	src/mesa/drivers/dri/trident/trident_context.c
	src/mesa/main/debug.c
	src/mesa/main/mipmap.c
	src/mesa/main/texformat.c
	src/mesa/main/texgetimage.c
2009-10-28 21:24:11 -06:00
Brian Paul
6bc1e9fd69 mesa: consolidate _mesa_CompressedTexSubImage[123]DARB() functions 2009-10-27 21:39:44 -06:00
Brian Paul
f3c29bd74f mesa: consolidate CompressedTexSubImage1/2/3DARB() error checking 2009-10-27 21:15:48 -06:00
Brian Paul
9519603f74 mesa: simplify teximage code with get_current_tex_object() 2009-10-27 21:15:36 -06:00
Brian Paul
11caea687e mesa: choose texture format in core mesa, not drivers
Call the ctx->Driver.ChooseTextureFormat() function from core Mesa's
_mesa_[Copy]TexImage functions instead of in the driver functions.
One less thing for drivers to do.
2009-10-25 18:06:24 -06:00
Brian Paul
07ad6393cb mesa: fix-up error checking related to compressed texture block size 2009-10-25 17:07:27 -06:00