summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* mesa: pass gl_format to _mesa_init_teximage_fields()Brian Paul2010-11-181-91/+146
| | | | | | | | | | | 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.
* mesa: reorder texture_error_check() paramsBrian Paul2010-11-161-15/+15
| | | | To better match other functions.
* mesa: 80-column wrappingBrian Paul2010-11-161-13/+16
|
* mesa: consolidate assertions in teximage codeBrian Paul2010-11-121-10/+1
|
* mesa: rename function to _mesa_is_format_integer_color()Brian Paul2010-10-261-2/+2
| | | | Be a bit more clear about its operation.
* mesa: additional teximage error checks for GL_EXT_texture_integerBrian Paul2010-10-251-4/+38
|
* mesa: simplify target_can_be_compressed() functionBrian Paul2010-10-231-8/+18
|
* mesa: remove post-convolution width/height varsBrian Paul2010-10-141-35/+19
| | | | These were left-over bits from when convolution was removed.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-31/+31
|
* mesa: Add ARB_texture_compression_rgtc as an alias for ↵Ian Romanick2010-10-011-5/+5
| | | | | | EXT_texture_compression_rgtc Change the name in the extension tracking structure to ARB (from EXT).
* ARB_texture_rg: Correct some errors in RED / RG internal format handlingIan Romanick2010-10-011-9/+32
| | | | | | | | | | | | | | 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.
* mesa: Remove EXT_convolution.Eric Anholt2010-09-231-62/+0
| | | | More optional code.
* mesa: Fix printf-like warnings.Vinson Lee2010-09-021-2/+2
|
* mesa: call ctx->Driver.ChooseTextureFormat() only when necessary.Brian Paul2010-07-201-45/+73
| | | | | | | | | | | | | | | | | | | 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"
* mesa: Add error path in compressed_texture_error_check.Vinson Lee2010-07-151-0/+4
| | | | | Add error path for unhandled dimensions in compressed_texture_error_check.
* mesa: initial support for new GL 3.0 texture formatsBrian Paul2010-07-071-0/+75
|
* mesa: initial support for unnormalized integer texture formatsBrian Paul2010-07-051-2/+50
| | | | As defined by GL_EXT_texture_integer.
* mesa: fix error message stringsBrian Paul2010-05-111-5/+5
|
* Merge branch 'gles2-2'Kristian Høgsberg2010-05-021-1/+19
|\ | | | | | | | | Conflicts: src/mesa/drivers/dri/common/dri_util.h
| * mesa: Move support for paletted textures to main/teximage.cKristian Høgsberg2010-04-281-1/+19
| |
* | mesa: s/sprintf/_mesa_snprintf/Vinson Lee2010-05-021-5/+5
| |