Commit Graph

366 Commits

Author SHA1 Message Date
Brian Paul
54bb414e00 mesa: clean-up, simplify compressed texture size checking 2009-10-25 16:59:08 -06:00
Brian Paul
90cd968300 mesa: don't include texformat.h 2009-10-05 17:56:31 -06:00
Brian Paul
1a2bb37264 mesa: lift _mesa_set_fetch_functions() calls out of drivers
Call it from in the main Mesa glTexImage functions.
2009-10-05 17:12:40 -06:00
Brian Paul
32aa40eee4 mesa: removed gl_texture_image::CompressedSize field
Just call ctx->Driver.CompressedTextureSize() when we need to get
the compressed image size.
2009-10-01 21:13:34 -06:00
Brian Paul
b6bdafdf2c mesa: remove gl_texture_image::IsCompressed field
Use _mesa_is_format_compressed() instead.
2009-10-01 16:29:44 -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
Chia-I Wu
5a1e25afac mesa/main: Make FEATURE_convolve follow feature conventions.
As shown in mfeatures.h, this allows users of convolve.h to work without
knowing if the feature is available.
2009-09-24 21:48:39 -06:00
Maciej Cencora
d100cbf721 mesa: add some debug info to teximage.c 2009-09-21 14:56:11 -06:00
Brian Paul
2914f2b7fd mesa: move generate mipmap calls
Per the suggestion in the Intel driver, move the calls to
ctx->Driver.GenerateMipmap() into core Mesa so that drivers don't
have to worry about it.
2009-09-15 18:17:43 -06:00
Brian Paul
a31ac84d74 mesa: remove last of gotos 2009-09-15 18:17:43 -06:00
Brian Paul
c352566933 mesa: more goto removal 2009-09-15 18:17:43 -06:00
Brian Paul
ecf6f37fc2 mesa: remove some gotos
This will make some subsequent changes easier...
2009-09-15 18:17:42 -06:00
Brian Paul
fe988d786c mesa: add extension checks in _mesa_max_texture_levels() 2009-08-13 12:50:56 -06:00
Brian Paul
6aa7a03d85 mesa: use _mesa_get_current_tex_unit() in more places 2009-08-13 12:50:56 -06:00
Brian Paul
73b150c816 mesa: refactor: move _mesa_is_color/depth/stencil_format() helpers to image.c 2009-08-13 12:50:56 -06:00
Brian Paul
ba2a55ccd6 mesa: move _mesa_Get[Compressed]TexImage() to texgetimage.c
All the glGetTexImage code is in one file now.
2009-08-13 12:50:56 -06:00
Brian Paul
434ec3ada8 mesa: use _mesa_is_bufferobj() 2009-08-12 17:28:45 -06:00
Chia-I Wu
42b6b067ac mesa/main: Add functions to clear and dirty texture objects.
This commit adds a function to clear a texture object such that there is
no image data associated with it, and a function to dirty it so that it
will be re-tested for completeness.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-05 16:06:50 -06:00
Brian Paul
2465c4fa9c mesa: more glGetTexImage() error checking consolidation, new assertion 2009-08-04 15:36:28 -06:00
Brian Paul
9c936403de mesa: re-enable _mesa_source_buffer_exists() call
Somehow this code wound up inside a comment a while back.
2009-07-30 10:04:42 -06:00
Brian Paul
4406f79402 mesa: get_current_tex_unit() helper function 2009-07-30 09:59:52 -06:00
Brian Paul
25be043940 mesa: refactor glGetTexImage error checking code 2009-07-30 09:50:36 -06:00
Brian Paul
c156eeb682 mesa: simplify _mesa_select_tex_image() 2009-07-30 09:24:01 -06:00
Brian Paul
9c9a9abd7b mesa: simplify _mesa_set_tex_image() 2009-07-30 09:10:26 -06:00
Michel Dänzer
a120778c72 Always free image offsets memory when re-initializing texture image fields.
Fixes leak running compiz with direct rendering.
2009-06-19 18:00:33 +02:00
Brian Paul
63f0130980 mesa: fix state validation bug for glCopyTex[Sub]Image()
We need to make sure the framebuffer state is up to date to make sure we
read pixels from the right buffer when doing a texture image copy.
2009-05-01 18:04:07 -06:00
Roland Scheidegger
c6a6cc1918 mesa: add new signed rgba texture format
This is a (partial) backport of the signed texture format support in OGL 3.1.
Since it wasn't promoted from an existing extension roll our own.
2009-03-28 02:02:42 +01:00
Vinson Lee
1eee1bac1f mesa: update/fix doxygen comments 2009-03-17 09:34:30 -06:00
Brian Paul
1826ff3fb3 mesa: override_internal_format() function for debug/test purposes (disabled) 2009-03-12 18:25:09 -06:00
Brian Paul
8a8919a7dd mesa: improve some error messages 2009-03-12 18:25:09 -06:00
Roland Scheidegger
114152e068 mesa: add support for ATI_envmap_bumpmap
add new entrypoints, new texture format, etc
translate in texenvprogram.c for drivers using the mesa-generated tex env
fragment program
also handled in swrast, but not tested (cannot work due to negative texel
results not handled correctly)
2009-03-12 15:01:16 +01:00
Brian Paul
9818734e01 mesa: use an array for current texture objects
Use loops to consolidate lots of texture object code.
2009-02-21 14:53:25 -07:00
Brian Paul
5340b6dff7 Merge commit 'origin/gallium-master-merge'
This is the big merge of the gallium-0.2 branch into master.
gallium-master-merge was just the staging area for it.
Both gallium-0.2 and gallium-master-merge are considered closed now.

Conflicts:

	progs/demos/Makefile
	src/mesa/main/state.c
	src/mesa/main/texenvprogram.c
2009-02-10 16:44:02 -07:00
Brian Paul
1ed5fe5cbf mesa: s/_IMAGE_NEW_TRANSFER_STATE/_MESA_NEW_TRANSFER_STATE/ to be more consistant with other flags 2009-02-10 15:53:35 -07:00
Brian Paul
e97681c7f5 mesa: merge gallium-0.2 into gallium-master-merge
Merge commit 'origin/gallium-0.2' into gallium-master-merge

Conflicts:

	Makefile
	docs/relnotes-7.4.html
	docs/relnotes.html
	src/mesa/drivers/dri/i965/brw_wm.h
	src/mesa/main/imports.c
	src/mesa/main/mtypes.h
	src/mesa/main/texcompress.c
	src/mesa/main/texenvprogram.c
	src/mesa/main/version.h
	src/mesa/vbo/vbo_exec_api.c
	src/mesa/vbo/vbo_save_draw.c
2009-02-09 09:22:22 -07:00
Brian Paul
803504e69f mesa: minor error msg improvement 2009-02-04 16:33:25 -07:00
Brian Paul
80684649a6 mesa: simplify the _mesa_get_proxy_tex_image() function 2009-01-30 16:03:32 -07:00
Brian Paul
ea4b183b8c mesa: fix incorrect call to clear_teximage_fields() in _mesa_TexImage2D()
Fixes failed assertion / segfault for particular proxy texture tests.
2009-01-30 16:03:32 -07:00
Brian Paul
2897cee99f mesa: fix a render to texture FBO validation bug
When glTexImage() is called we need to re-validate any FBOs that point to
the texture (i.e. render-to-texture) since changing the texture's size/format
will effect FBO completeness.

We don't keep a list of all FBOs rendering into each texture (which would be
a bit messy) so we check all FBOs in existance.  To optimize this, the
gl_texture_object->_RenderToTexture flag is used to avoid checking textures
that have never been used as renderbuffers.  So, we only walk over all FBOs
(there's usually only a few) when glTexImage() modifies a RTT texture.

Fixes a bug seen in shadowtex.c when toggling packed depth/stencil mode.
2009-01-29 09:20:18 -07:00
Ian Romanick
33fa5e4bfa Make GL_ARB_texture_compression mandatory
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-01-28 16:28:10 -08:00
Brian Paul
19e4222f93 Merge commit 'origin/master' into gallium-0.2
Conflicts:

	src/mesa/shader/prog_execute.c
	src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
2008-11-11 14:42:41 -07:00
Brian
be1b8e5d6c mesa: new _mesa_is_pow_two() function 2008-11-10 20:16:00 -07:00
Alan Hourihane
61d3a66456 Merge commit 'origin/master' into gallium-0.2 2008-10-27 15:37:22 +00:00
Brian Paul
95c04cccfe mesa: move convolution image adjustment code for glCopyTexSubImage1/2/3D()
Do it after initial error checking, after we know the texture's internal format.
2008-10-22 07:53:26 -06:00
Brian Paul
9dfd54fa83 mesa: some re-org of glCopyTexSubImage1/2/3D() error checking 2008-10-22 07:48:37 -06:00
Brian Paul
22e442544b mesa: in textore.c, only adjust image for convolution if image is a color format
Makes things consistant with the code in teximage.c.
We only want to apply convolution to color formats (not depth/index formats)
2008-10-22 07:36:33 -06:00
Keith Whitwell
3a3801c143 Merge commit 'origin/master' into gallium-0.2
Conflicts:

	src/mesa/glapi/descrip.mms
	src/mesa/shader/grammar/descrip.mms
2008-10-10 15:26:28 +01:00
Ian Romanick
4741dbcbbc Unify ARB_depth_texture and SGIX_depth_texture
The ARB extension is a superset of the older SGIX extension.  Any
hardware that can support the SGIX version can also support the ARB
version.  In Mesa, any driver that supports one also supports the
other.  This unification just simplifies some bits of code.
2008-10-01 20:38:10 -07:00
Brian
03bafd1f9f Added new _mesa_clip_copytexsubimage() function to do avoid clipping down in the drivers.
This should probably be pulled into main-line Mesa...
(cherry picked from commit 324ecadbfd)
2008-09-23 16:59:56 -07:00
Brian
e93243f8b7 added _mesa_tex_target_to_face()
(cherry picked from commit b52ce6341f)
2008-09-21 22:13:54 -07:00