summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* mesa: reduce calls to _mesa_test_framebuffer_completeness()Brian Paul2011-02-281-2/+6
| | | | | | when doing glCopyTex[Sub]Image() and checking the source buffer's completeness. We only need to determine FBO completeness when the status is indeterminate.
* mesa: fix MESA/EXT typoBrian Paul2011-01-261-1/+1
| | | | Spotted by Bernd Buschinski.
* mesa: add checks for GL_EXT_texture_arrayBrian Paul2011-01-251-14/+19
| | | | In case the driver enables GL_MESA_texture_array but not the EXT version.
* mesa: allow internalFormat=GL_BGRA_EXT in TexImage2DBenjamin Franzke2011-01-241-0/+9
|
* mesa/swrast: handle sRGB FBOs correctly (v2)Dave Airlie2011-01-111-3/+3
| | | | | | | | | | | | | | | | From reading EXT_texture_sRGB and EXT_framebuffer_sRGB and interactions with FBO I've found that swrast is converting the sRGB values to linear for blending when an sRGB texture is bound as an FBO. According to the spec and further explained in the framebuffer_sRGB spec this behaviour is not required unless the GL_FRAMEBUFFER_SRGB is enabled and the Visual/config exposes GL_FRAMEBUFFER_SRGB_CAPABLE_EXT. This patch fixes swrast to use a separate Fetch call for FBOs bound to SRGB and avoid the conversions. v2: export _mesa_get_texture_dimensions as per Brian's comments. Signed-off-by: Dave Airlie <[email protected]>
* mesa: Directly include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-071-0/+1
|
* mesa: Fix the baseFormat for GL_COMPRESSED_SLUMINANCE_EXT.Eric Anholt2011-01-041-1/+1
| | | | | | | It's just LUMINANCE, not LUMINANCE_ALPHA. Fixes fbo-generatemipmap-formats GL_EXT_texture_sRGB-s3tc assertion failure when it tries to pack the L8 channels into LUMINANCE_ALPHA and wonders why it's trying to do that.
* mesa: simplify target checking for TexImage functionsBrian Paul2010-12-081-8/+18
|
* mesa: revamp error checking for compressed texture imagesBrian Paul2010-12-081-67/+44
| | | | Simplify some code, remove unneeded checks, etc.
* mesa: make _mesa_test_proxy_teximage() easier to readBrian Paul2010-12-071-55/+71
|
* mesa: consolidate glCompressedTexImage1/2/3D() functionsBrian Paul2010-12-071-374/+190
|
* mesa: consolidate glCopyTexSubImage1/2/3D() functionsBrian Paul2010-12-071-145/+63
|
* mesa: consolidate glCopyTexImage1/2D() codeBrian Paul2010-12-071-148/+90
|
* mesa: consolidate the glTexSubImage1/2/3D() functionsBrian Paul2010-12-071-165/+86
|
* mesa: simplify proxy texture code in texture_error_check()Brian Paul2010-12-071-49/+51
|
* mesa: consolidate glTexImage1/2/3D() codeBrian Paul2010-12-061-294/+161
| | | | | Something similar could be done for glCopyTex[Sub]Image() and the compressed texture image functions as well.
* mesa: raise max texture sizes to 16KBrian Paul2010-12-021-107/+201
| | | | | | | | | | | 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.
* mesa: fix get_texture_dimensions() for texture array targetsBrian Paul2010-11-211-5/+5
| | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31779