summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: make _mesa_texture_buffer_range() staticBrian Paul2016-10-061-8/+0
| | | | | | Not called from any other file. Also, add a comment. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* mesa: add numLevels, numSamples to Driver.TestProxyTexImage()Brian Paul2016-07-151-3/+4
| | | | | | | | | | | | | So that the function can work properly with glTexStorage(), where we know how many mipmap levels there are. And so we can compute storage for MSAA textures. Also, remove the obsolete texture border parameter. A subsequent patch will update _mesa_test_proxy_teximage() to use these new parameters. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* mesa/teximage: add _mesa_is_cube_map_texture utility methodEduardo Lima Mitev2016-03-031-0/+4
| | | | Reviewed-by: Dave Airlie <airlied@redhat.com>
* mesa/main: not fill mesa_error on _mesa_legal_texture_base_format_for_targetAlejandro Piñeiro2016-03-031-3/+1
| | | | | | | This would allow to use this method if you are just querying if it is allowed, like for arb_internalformat_query2. Reviewed-by: Dave Airlie <airlied@redhat.com>
* mesa/teximage: Make _mesa_format_no_online_compression publicAntia Puentes2016-03-031-0/+3
| | | | | | | | It will be used by the ARB_internalformat_query2 implementation to check if a certain compressed 'internalformat' is supported by texture 'targets'. Reviewed-by: Dave Airlie <airlied@redhat.com>
* mesa/teximage: make public is_renderable_texture_formatAntia Puentes2016-03-031-0/+3
| | | | | | | | It will be used by the ARB_internalformat_query2 implementation to check if the 'internalformat' passed is supported by texture MULTISAMPLE 'targets'. Reviewed-by: Dave Airlie <airlied@redhat.com>
* mesa: move assertion in _mesa_cube_face_target()Brian Paul2016-02-141-3/+5
| | | | | | | Fixes piglit arb_texture_view-sampling-2d-array-as-2d-layer regression. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94134 Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* mesa: move _mesa_num_tex_faces() to teximage.hBrian Paul2016-02-121-0/+19
| | | | | | | So it's near the other cube map helper functions. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
* mesa: add _mesa_cube_face_target() helperBrian Paul2016-02-121-0/+17
| | | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
* mesa: make _mesa_tex_target_to_face() an inline functionBrian Paul2016-02-121-3/+15
| | | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
* mesa: remove _ARB suffix from cube map enumsBrian Paul2016-02-121-2/+2
| | | | | | | Just minor clean-up so we're consistent everywhere. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
* mesa: Move _mesa_base_tex_format() from teximage to glformats filesEduardo Lima Mitev2015-09-281-4/+0
| | | | | | | | | | | | | | | | | This function will be needed as part of validating the combination of format, type and internal format of texture pixel operations, which happens in glformats files. Specifically, we want to be able to obtain the base format of a resolved effective internal format, to compare it with the original internal format passed. Also, since this function deals solely with GL formats, it fits better in glformats where the rest of similar format functionality rests. The function is moved as-is, without any modification. Cc: "11.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Tested-by: Mark Janes <mark.a.janes@intel.com>
* mesa: const-qualify _mesa_base_tex_format() ctx paramBrian Paul2015-09-221-1/+1
| | | | Reviewed-by: Matt Turner <mattst88@gmail.com>
* mesa/teximage: Add GL error parameter to _mesa_target_can_be_compressedNanley Chery2015-08-251-1/+1
| | | | | | | | | | Enables _mesa_target_can_be_compressed to return the appropriate GL error depending on it's inputs. Use the parameter to return the appropriate GL error for ETC2 formats on GLES3. Suggested-by: Chad Versace <chad.versace@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com> Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
* mesa: remove extern from texture functionTimothy Arceri2015-08-131-9/+0
| | | | Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* main: Simplify debug messages for CopyTex*SubImage*D.Laura Ekstrand2015-03-191-1/+2
| | | | | Reviewed-by: Martin Peres <martin.peres@linux.intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* main: Add entry point for TextureBufferRange.Laura Ekstrand2015-03-091-0/+4
| | | | | | | | v2: Review by Martin Peres - Get rid of difficult-to-follow code copied and pasted from the original TexBufferRange Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* main: Refactor _mesa_texture_buffer_range.Laura Ekstrand2015-03-091-3/+3
| | | | | | | | | | | Changes how the caller is identified in error messages, moves a check for ARB_texture_buffer_object from the entry points to the shared code in _mesa_texture_buffer_range, and removes an unused argument (GLenum target). v2: Review from Anuj Phogat - Split rebase of Tex[ture]Buffer[Range] Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* main: Add TEXTURE_CUBE_MAP support for glCompressedTextureSubImage3D.Laura Ekstrand2015-03-091-1/+2
| | | | | | | | | v2: Review from Anuj Phogat - Remove redundant copies of the cube map block comment - Replace redundant "if (!texImage) return;" statements with assert(texImage) Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* mesa: Add _mesa_is_array_texture helperIago Toral Quiroga2015-02-241-0/+3
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* main: Added entry point for glTextureBuffer.Laura Ekstrand2015-01-081-0/+11
| | | | Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* main: Added entry points for glTextureStorage[23]DMultisample.Laura Ekstrand2015-01-081-0/+20
| | | | Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* main: Added entry points for glCompressedTextureSubImage*D.Laura Ekstrand2015-01-081-0/+30
| | | | Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* main: Added entry points for CopyTextureSubImage*D.Laura Ekstrand2015-01-081-2/+24
| | | | Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* main: Corrected comment on _mesa_is_zero_size_texture.Laura Ekstrand2015-01-081-1/+1
| | | | Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* main: Added entry points for glTextureSubImage*D.Laura Ekstrand2015-01-081-0/+30
| | | | Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* main: Moved _mesa_get_current_tex_object from teximage.c to texobj.c.Laura Ekstrand2015-01-081-4/+0
| | | | Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* main: Moved _mesa_lock_texture and _mesa_unlock_texture to texobj.h from ↵Laura Ekstrand2015-01-081-18/+0
| | | | | | teximage.h. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* mesa: remove unused ctx parameter for _mesa_select_tex_image()Brian Paul2015-01-051-2/+1
| | | | Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: add _mesa_base_tex_image() helper functionBrian Paul2015-01-051-0/+10
| | | | Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: move _mesa_compressed_texture_pixel_storage_error_check()Brian Paul2014-08-161-6/+0
| | | | | | | to pixelstore.c, add const qualifier to the 'packing' parameter. Add comments. Reviewed-by: Matt Turner <mattst88@gmail.com>
* mesa: Turn target_can_be_compressed() in to a utility functionAnuj Phogat2014-08-041-0/+3
| | | | | | | | V2: Declare the function in teximage.h Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* mesa: add ARB_clear_texture.xml to file list, remove duplicate declsIlia Mirkin2014-07-241-12/+0
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* mesa/main: Add generic bits of ARB_clear_texture implementationNeil Roberts2014-07-231-0/+12
| | | | | | | | | This adds the driver entry point for glClearTexSubImage and fills in the _mesa_ClearTexImage and _mesa_ClearTexSubImage functions that call it. v2: Don't clear some of the images if only one of them makes an error Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* mesa/main: add ARB_clear_texture entrypointsIlia Mirkin2014-07-231-0/+10
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Neil Roberts <neil@linux.intel.com>
* mesa: Emit errors for inconsistent compressed pixel store stateChris Forbes2014-06-101-0/+6
| | | | | | | V2: Use bool rather than GLboolean for internal function Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: switch to c11 mutex functionsBrian Paul2014-03-031-2/+2
| | | | Reviewed-by: José Fonseca <jfonseca@vmware.com>
* mesa: make _mesa_get_proxy_target() staticBrian Paul2014-02-021-3/+0
| | | | | | Wasn't used in any other file. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: remove unused _mesa_select_tex_object() functionBrian Paul2014-02-021-5/+0
| | | | | | | The _mesa_get_current_tex_object() function is now used everywhere that _mesa_select_tex_object() was formerly used. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: change gl_format to mesa_formatMark Mueller2014-01-271-4/+4
| | | | s/\bgl_format\b/mesa_format/g. Use better name for Mesa Formats enum
* mesa: Refactor internalFormat / target checks to a separate functionIan Romanick2014-01-271-0/+8
| | | | | | | | | We need almost identical code in the glTexStorage path. v2: Fix typo in a comment noticed by Topi. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Define helper function to get the number of texture layers.Francisco Jerez2014-01-151-0/+6
| | | | | | | | | | | And to check if it can have layers at all. This will be used by the implementation of ARB_shader_image_load_store. v2: Fix constness of texobj argument, use assert and return reasonable default rather than calling unreachable() in default switch case. Reviewed-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Make validate_texbuffer_format function available externallyPi Tabred2013-12-181-0/+4
| | | | | | | - change storage class from static to extern - rename validate_texbuffer_format to _mesa_validate_texbuffer_format Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: change glTexImage[23]DMultisample() internalformat to GLenumBrian Paul2013-10-161-2/+2
| | | | | | To match glext.h and the GL_ARB_texture_multisample extension. However, the GL 4.0 spec and man page say it's GLint. An OpenGL spec bug will be filed.
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <brianp@vmware.com>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-3/+4
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: fix texture storage multisample prototypes harder.Dave Airlie2013-04-011-2/+2
| | | | | | I just noticed the warnings since I fixed the other bit. Signed-off-by: Dave Airlie <airlied@redhat.com>
* glapi: add definition of ARB_texture_storage_multisampleChris Forbes2013-03-311-0/+11
| | | | | | | | | | Adds XML for the extension, dispatch_sanity enabling, and the two new entrypoints. These are both implemented by calling the shared teximagemultisample() with immutable=GL_TRUE. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Brian Paul <brianp@vmware.com>