summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: simplify Driver.TexImage() parametersBrian Paul2011-12-301-13/+10
| | | | | | | | As with TexSubImage(), the target, level and texObj values can be obtained through the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: simplify Driver.TexSubImage() parametersBrian Paul2011-12-301-9/+6
| | | | | | | | There's no need to pass the target, level and texObj parameters since they can be easily obtained from the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix a leak in _mesa_delete_texture_image()Pekka Paalanen2011-12-201-0/+1
| | | | | | | | | | | | | Valgrind complains about a definitely lost block allocated in intelNewTextureImage(). This leak was apparently created by 6e0f9001fe3fb191c2928bd09aa9e9d05ddf4ea9, "mesa: move gl_texture_image::Data, RowStride, ImageOffsets to swrast", as it removes the free() from _mesa_delete_texture_image(). Put the free() back, fixes a Valgrind error. Signed-off-by: Pekka Paalanen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: make _mesa_set_tex_image() static since it's not called anywhere elseBrian Paul2011-12-181-7/+7
|
* mesa: make update_fbo_texture() non-staticBrian Paul2011-12-161-5/+6
| | | | | | | We'll call this from the mipmap generation code. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Allow glTexImage2D with a depth component cube map.Anuj Phogat2011-12-051-2/+5
| | | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: move _mesa_error() call in compressedteximage()Brian Paul2011-12-021-7/+2
| | | | | | | | We shouldn't call _mesa_error() if the target is a proxy texture. Errors are handled later in the function. Fixes a Coverity warning. Reviewed-by: José Fonseca <[email protected]>
* mesa: add support for GL_OES_compressed_ETC1_RGB8_textureChia-I Wu2011-12-021-0/+51
| | | | | | | | | | | Add support for GL_OES_compressed_ETC1_RGB8_texture to core mesa. There is no driver support yet. Unlike desktop GL compressed texture formats, GLES compressed texture formats usually can only be used with glCompressedTexImage2D. All other gl*Tex*Image* functions are updated to check for that. Reviewed-by: Brian Paul <[email protected]>
* mesa/format: add mesa MESA_FORMAT_ARGB2101010_UINT support.Dave Airlie2011-11-281-0/+1
| | | | | | | | | | | | | | This format is used in the ARB_texture_rgb10_a2ui spec. It adds core mesa support, texformat + texstore support, format_unpack and fbobject.c (all patches from list merged + fixed up). also fixes some whitespace issues. Parts were: Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: update comment for clear_teximage_fields()Brian Paul2011-11-221-9/+2
|
* mesa: define, use _mesa_is_cube_face() in several placesBrian Paul2011-11-191-6/+3
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add support for GL_OES_EGL_image_externalChia-I Wu2011-11-031-11/+15
| | | | | | | | | This is an OpenGL ES specific extension. External textures are textures that may be sampled from, but not be updated (no glTexSubImage* and etc.). The image data are taken from an EGLImage. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* mesa: new glTexImage error checks for GL_ARB_texture_storageBrian Paul2011-10-311-0/+34
| | | | | If the texture memory was allocated with glTexStorage1/2/3D() we can only change the image data with glTexSubImage calls.
* mesa: Apply StripTextureBorder to CopyTexImage as well.Eric Anholt2011-10-261-0/+10
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Fold gallium's texture border stripping into a core Mesa option.Eric Anholt2011-10-261-3/+54
| | | | | | | | | We wanted to reuse this in the Intel driver. v2: Move the flag to ctx->Const Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Brian Paul <[email protected]>
* mesa: remove dead code from teximage.cBrian Paul2011-10-231-29/+0
|
* mesa: remove _mesa_alloc_texmemory(), _mesa_free_texmemory()Brian Paul2011-10-231-46/+0
| | | | Core Mesa no longer does any texture memory allocation.
* mesa: move gl_texture_image::Data, RowStride, ImageOffsets to swrastBrian Paul2011-10-231-6/+8
| | | | | | Only swrast and the drivers that fall back to swrast need these fields now. This removes the last of the fields related to software rendering from gl_texture_image.
* s/format/baseFormat/ to be more explicitBrian Paul2011-10-131-5/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove redundant buffer checks in copytexsubimage_error_check2()Brian Paul2011-10-131-17/+0
| | | | | | | Again, there was already a call to _mesa_source_buffer_exists() earlier in the function. Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove redundant buffer checks in copytexture_error_check()Brian Paul2011-10-131-16/+0
| | | | | | | There was already a call to _mesa_source_buffer_exists() earlier in the function. Reviewed-by: Eric Anholt <[email protected]>
* mesa: s/INLINE/inline/Brian Paul2011-10-011-1/+1
| | | | | | | INLINE is still seen in some files (some generated files, etc) but this is a good start. Acked-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_bgra and EXT_texture_format_BGRA8888 extension enable flagsIan Romanick2011-09-261-2/+4
| | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. EXT_texture_format_BGRA8888 is mostly a subset of EXT_bgra. The only difference seems to be that EXT_texture_format_BGRA8888 allows GL_BGRA as an internal format to glTexImage2D and friends. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: remove support for GL_APPLE_client_storage extensionBrian Paul2011-09-221-1/+1
| | | | | | | AFAIK, there are few users of this extension and I can see a couple reasons why this is probably broken in Mesa anyway. Reviewed-by: Ian Romanick <[email protected]>
* mesa: move gl_texture_image::Width/Height/DepthScale fields to swrastBrian Paul2011-09-221-13/+0
| | | | | | | These fields were only used for swrast so move them into swrast_texture_image. Reviewed-by: Ian Romanick <[email protected]>
* mesa: move gl_texture_image::_IsPowerOfTwo into swrastBrian Paul2011-09-221-7/+0
| | | | | | It's only used by swrast. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Refactor compressed texture error checks to work with paletted texturesIan Romanick2011-09-191-11/+70
| | | | | | | | | | | | | This code was really broken before. A lot of the error checks were done much later (too late), and some of the error checks would fail. The underlying problem is that Mesa doesn't ever keep compressed paletted textures in their original format. The textures are immediately converted to some RGB or RGBA format. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39991 Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Add GL_OES_compressed_paletted_texture formats to _mesa_base_tex_formatIan Romanick2011-09-191-0/+19
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: move gl_texture_image::FetchTexel fields to swrastBrian Paul2011-09-171-2/+0
| | | | | This also involves passing swrast_texture_image instead of gl_texture_image into all the fetch functions.
* mesa: add new DeleteTextureImage() driver hookBrian Paul2011-09-171-1/+2
| | | | | | Matches the NewTextureImage() hook. With new subclasses of gl_texture_image coming we need a new hook to properly delete objects of those subclasses.
* mesa: move _mesa_update_fetch_functions() calls into swrastBrian Paul2011-09-171-6/+1
| | | | | | Do it during swrast state validation since the FetchTexel() functions are only called from swrast now and not core Mesa. Remove assertions in mipmap.c since they're no longer appropriate.
* mesa: Remove API facing bits of EXT_paletted_texture and ↵Ian Romanick2011-09-061-18/+7
| | | | | | | | | | | | | | EXT_shared_texture_palette This was also discussed at XDS 2010. However, actually making the change was delayed because several drivers still exposed these extensions to significant benefit (e.g., tdfx). Now that those drivers have been removed, this code can be removed as well. v2: A lot of bits that were missed in the previous patch have been removed. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't check for image->Data when freeing an image's contents.Eric Anholt2011-08-291-8/+3
| | | | | | | | | | | | | | | | | | | | | All driver implementations of FreeTextureImageBuffer already check that Data != NULL and free it. However, this means that we will also free driver storage if the driver storage wasn't in the form of a Data pointer. This was produced by the following semantic patch: @@ expression C; expression T; @@ - if (T->Data) { - C->Driver.FreeTextureImageBuffer(C, T); + C->Driver.FreeTextureImageBuffer(C, T); - } Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Rename FreeTexImageData to FreeTextureImageBuffer.Eric Anholt2011-08-291-8/+8
| | | | | | | | This was produced by sed, except for one hunk in driverfuncs.c where trailing whitespace was dropped. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add gl_texture_image::Face, Level fieldsBrian Paul2011-08-241-0/+2
| | | | | | | Several drivers have these fields in their subclasses of gl_texture_image. They'll be useful for core Mesa too... Reviewed-by: Ian Romanick <[email protected]>
* mesa: minor comment changes in teximage.cBrian Paul2011-07-291-7/+2
|
* mesa: stop using ctx->Driver.CopyTexImage1D/2D() hooksBrian Paul2011-07-191-17/+32
|
* mesa: fix incorrect error stringBrian Paul2011-06-231-1/+1
|
* mesa: allow depth texture arraysBrian Paul2011-06-171-1/+5
| | | | | | | The GL_EXT_texture_array spec allows this (Section 3.8.1). Fixes failing piglit fbo-depth-array test. NOTE: This is a candidate for the 7.10 branch.
* mesa: use __builtin_clz for logbase2 when availableRoland Scheidegger2011-06-091-20/+3
| | | | | Also rename to _mesa_logbase2 and move to imports.h to keep the ugly ifdef GNUC stuff outside other files (also to allow reuse).
* mesa: faster logbase2Benjamin Bellec2011-06-021-24/+11
| | | | | | With minor clean-ups by Brian Paul. Signed-off-by: Brian Paul <[email protected]>
* mesa: s/height/depth/ in texsubimage()Brian Paul2011-05-261-1/+1
| | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=37648
* mesa: provide more info for glCompressedTexImage() errorsCarl-Philip Haensch2011-04-161-8/+26
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: move error check code in compressedteximage()Brian Paul2011-04-161-2/+2
| | | | This was mistakenly inside the #if FEATURE_ES block.
* mesa: core support for GL_ARB_texture_buffer_objectBrian Paul2011-04-051-2/+280
| | | | No GLSL or driver support yet.
* mesa: added _mesa_get_attachment_teximage() helpersBrian Paul2011-04-051-1/+1
|
* mesa: initial EXT_texture_snorm supportMarek Olšák2011-03-291-1/+30
| | | | | The component ordering of some formats has been been reversed to match Gallium types.
* mesa: remove _MESA_NEW_TRANSFER_STATEBrian Paul2011-03-231-6/+4
|
* mesa: add ATI_texture_compression_3dcMarek Olšák2011-03-081-0/+9
| | | | | | | LUMINANCE_ALPHA_LATC2 = LUMINANCE_ALPHA_3DC, so this is easy. Note that there is no specification for 3DC, just a few white papers from ATI.
* mesa: add EXT_texture_compression_latcMarek Olšák2011-03-081-0/+13
| | | | | | | | | | | | | | | | | The encoding/decoding algorithms are shared with RGTC. Thanks to some magic with the base format, the RGTC texstore functions work for LATC too. swrast passes the related piglit tests besides two things: - The alpha channel is wrong (it's always 1), however the incorrect alpha channel makes some other tests fail too, so I guess it's unrelated to LATC. - Signed LATC fetches aren't correct yet (signed values are clamped to [0,1]), however RGTC has the same problem. Further testing (with other of my patches) shows that hardware drivers and softpipe work. BTW, ETQW uses this extension.