summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texparam.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove the ctx->Driver.IsTextureResident() hookBrian Paul2011-12-081-4/+2
| | | | | | | No driver implemented this and we always returned "True" for residence queries. Reviewed-by: Ian Romanick <[email protected]>
* mesa: move _mesa_base_format_has_channel() into image.cBrian Paul2011-11-281-83/+1
| | | | | | This is where other format-related functions live. Reviewed-by: Eric Anholt <[email protected]>
* mesa: combine GL_TEXTURE_INTENSITY/LUMINANCE_SIZE queriesBrian Paul2011-11-281-17/+8
| | | | | | | Use the _mesa_base_format_has_channel() helper as we do for the other texture format component queries. Reviewed-by: Eric Anholt <[email protected]>
* mesa: use _mesa_base_format_has_channel() in fbobject.c queriesBrian Paul2011-11-281-4/+21
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't report types for 0-sized components of textures.Eric Anholt2011-11-221-50/+69
| | | | | | | | | | | | | | | | | | | | The GL_TEXTURE_WHATEVER_SIZE entrypoints were checking if the specified base type of the texture allowed that channel to be present before reporting the size of the channel, so that GL_RGB didn't end up with an alpha size if the hardware driver had to store it that way. The GL_TEXTURE_WHATEVER_TYPE entrypoints weren't checking it, so you would end up with strange responses from the GL involving 0-bit floating-point alpha components in GL_RGB32F, even though it says GL_NONE as expected for other 0-sized channels. Make _TYPE check _BaseFormat the same as _SIZE, which results in fixing most of the GL_RGB* testcases of gl-3.0-required-sized-formats pass on i965. v2: Add a default case with a warning (suggestion by Brian Paul) Reviewed-by: Brian Paul <[email protected]> (v1)
* mesa: add support for GL_OES_EGL_image_externalChia-I Wu2011-11-031-1/+19
| | | | | | | | | 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: clean up validate_texture_wrap_modeChia-I Wu2011-11-031-15/+27
| | | | | | | | GL_TEXTURE_RECTANGLE_NV (and soon GL_TEXTURE_EXTERNAL_OES) is special. Handle it in its own if-block. There should be no functional change. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* mesa: complete the GL_TEXTURE_SWIZZLE* setupYuanhan Liu2011-11-031-0/+27
| | | | | | | | | | | | | | | | | | | | | The ARB_texture_swizzle spec says: The error INVALID_OPERATION is generated if TexParameteri, TexParameterf, TexParameteriv, or TexParameterfv, parameter <pname> is TEXTURE_SWIZZLE_R, TEXTURE_SWIZZLE_G, TEXTURE_SWIZZLE_B, or TEXTURE_SWIZZLE_A, and <param> is not RED, GREEN, BLUE, ALPHA, ZERO, or ONE. The error INVALID_OPERATION is generated if TexParameteriv, or TexParameterfv, parameter <pname> TEXTURE_SWIZZLE_RGBA, and the four consecutive values pointed to by <param> are not all RED, GREEN, BLUE, ALPHA, ZERO, or ONE. So, the GL_TEXTURE_SWIZZLE* pname is legal for glTexParameterf(v) NOTE: this is a candidate for the 7.11 branch Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove the redundant checkYuanhan Liu2011-11-031-6/+5
| | | | | Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: glGetTexParameter support for GL_ARB_texture_storageBrian Paul2011-10-311-0/+12
|
* mesa: s/INLINE/inline/Brian Paul2011-10-011-2/+2
| | | | | | | 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 ARB_texture_mirrored_repeat extension enable flagIan Romanick2011-09-291-2/+1
| | | | | | | | | | | | | 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. This extension was previously not supported on mach64, mga, and savage (Savage3D and other pre-Savage4). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_lod_bias extension enable flagIan Romanick2011-09-291-11/+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. This extension was previously not supported on mach64, mga, or r128. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: move software texel fetch code into swrastBrian Paul2011-09-171-1/+0
| | | | It's only used by swrast now so move it out of core Mesa.
* mesa: move _mesa_update_fetch_functions() calls into swrastBrian Paul2011-09-171-1/+0
| | | | | | 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-6/+0
| | | | | | | | | | | | | | 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: whitespace, formatting fixes in GetTexParameter() codeBrian Paul2011-08-041-8/+6
|
* mesa: add null ptr checks in GetTexParameterI[u]iv() functionsBrian Paul2011-08-041-0/+4
|
* mesa: condense GL_TEXTURE_RESIDENT query codeBrian Paul2011-08-041-16/+4
|
* mesa: make error handling in glGetTexParameter() a bit more conciseBrian Paul2011-08-041-170/+96
|
* mesa: add missing breaks for GL_TEXTURE_CUBE_MAP_SEAMLESS queriesBrian Paul2011-07-291-6/+8
| | | | | | And fix indentation. NOTE: This is a candidate for the 7.11 branch.
* mesa: test against MESA_FORMAT_NONE in _mesa_GetTexLevelParameteriv()Brian Paul2011-07-281-1/+1
|
* mesa: Return the correct internal fmt when a generic compressed fmt was usedIan Romanick2011-07-251-3/+17
| | | | | | | | | | If an application requests a generic compressed format for a texture and the driver does not pick a specific compressed format, return the generic base format (e.g., GL_RGBA) for the GL_TEXTURE_INTERNAL_FORMAT query. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3165 Reviewed-by: Brian Paul <[email protected]>
* mesa: implement AMD_seamless_cubemap_per_textureMarek Olšák2011-05-061-0/+32
|
* mesa: implement EXT_texture_shared_exponentMarek Olšák2011-04-291-5/+3
| | | | | | | | | swrast support done. There is no renderbuffer support in swrast, because it's not required by the extension. Reviewed-by: Brian Paul <[email protected]>
* mesa: move sampler state into new gl_sampler_object typeBrian Paul2011-04-101-80/+80
| | | | | | gl_texture_object contains an instance of this type for the regular texture object sampling state. glGenSamplers() generates new instances of gl_sampler_object which can override that state with glBindSampler().
* mesa: clamp texture border color if ARB_texture_float is unsupportedMarek Olšák2011-03-291-4/+12
| | | | | ARB_texture_float disables clamping of the texture border color, ARB_color_buffer_float only modifies clamping of the glGet query.
* mesa: implement clamping controls (ARB_color_buffer_float)Marek Olšák2011-03-291-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: Author: Marek Olšák <[email protected]> mesa: fix getteximage so that it doesn't clamp values mesa: update the compute_version function mesa: add display list support for ARB_color_buffer_float mesa: fix glGet query with GL_ALPHA_TEST_REF and ARB_color_buffer_float commit b2f6ddf907935b2594d2831ddab38cf57a1729ce Author: Luca Barbieri <[email protected]> Date: Tue Aug 31 16:50:57 2010 +0200 mesa: document known possible deviations from ARB_color_buffer_float commit 5458935be800c1b19d1c9d1569dc4fa30a97e8b8 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:54:56 2010 +0200 mesa: expose GL_ARB_color_buffer_float commit aef5c3c6be6edd076e955e37c80905bc447f8a82 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:12:34 2010 +0200 mesa, mesa/st: handle read color clamping properly (I'll squash the st/mesa part to a separate commit. -Marek) We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where the operation mandates it. TODO: did I get the set of operations mandating it right? commit 3a9cb5e59b676b6148c50907ce6eef5441677e36 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:09:41 2010 +0200 mesa: respect color clamping in texenv programs (v2) Changes in v2: - Fix attributes other than vertex color sometimes getting clamped commit de26f9e47e886e176aab6e5a2c3d4481efb64362 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:05:53 2010 +0200 mesa: restore color clamps on glPopAttrib commit a55ac3c300c189616627c05d924c40a8b55bfafa Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 18:04:26 2010 +0200 mesa: clamp color queries if and only if fragment clamping is enabled commit 9940a3e31c2fb76cc3d28b15ea78dde369825107 Author: Luca Barbieri <[email protected]> Date: Wed Aug 25 00:00:16 2010 +0200 mesa: introduce derived _ClampXxxColor state resolving FIXED_ONLY To do this, we make ClampColor call FLUSH_VERTICES with the appropriate _NEW flag. We introduce _NEW_FRAG_CLAMP since fragment clamping has wide-ranging effects, despite being in the Color attrib group. This may be easily changed by s/_NEW_FRAG_CLAMP/_NEW_COLOR/g commit 6244c446e3beed5473b4e811d10787e4019f59d6 Author: Luca Barbieri <[email protected]> Date: Thu Aug 26 17:58:24 2010 +0200 mesa: add unclamped color parameters
* mesa: remove isProxy local varBrian Paul2011-01-251-4/+2
|
* mesa: use texFormat local var in more placesBrian Paul2011-01-251-4/+4
|
* mesa: consolidate error handling code in _mesa_GetTexLevelParameteriv()Brian Paul2011-01-251-26/+19
|
* mesa: consolidate error handling in set_tex_parameteri()Brian Paul2011-01-251-38/+36
|
* mesa: add checks for GL_EXT_texture_arrayBrian Paul2011-01-251-2/+4
| | | | In case the driver enables GL_MESA_texture_array but not the EXT version.
* mesa: smarter glTexParameter state invalidationBrian Paul2011-01-231-25/+38
| | | | | | Only a few texture object parameters can effect texture completeness: min level, max level, minification filter. Don't mark the texture incomplete for other texture object state changes.
* mesa/swrast: implement EXT_texture_sRGB_decodeDave Airlie2011-01-161-1/+17
| | | | | | | This implements the extension by choosing a different set of texture fetch functions when the texture parameter changes. 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: Include mtypes.h in files that use gl_context struct.Vinson Lee2011-01-051-0/+1
| | | | | | Directly include mtypes.h if a file uses a gl_context struct. This allows future removal of headers that are not strictly necessary but indirectly include mtypes.h for a file.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-5/+5
|
* ARB_texture_rg: Add GL_RED as a valid GL_DEPTH_TEXTURE_MODEIan Romanick2010-10-011-1/+2
|
* ARB_texture_rg: Add GL_TEXTURE_{RED,GREEN}_SIZE query supportIan Romanick2010-10-011-0/+10
|
* mesa: Force GL_SGIS_generate_mipmap to always be enabledIan Romanick2010-09-271-22/+6
| | | | As per discussions at XDS.
* mesa: rename src/mesa/shader/ to src/mesa/program/Brian Paul2010-06-101-1/+1
|
* mesa: Add missing features.Chia-I Wu2010-03-301-4/+4
| | | | | | | Add features tested in the code but missing from mfeatures.h. This also fixes some tests of features. They should be tested with "#if", not "#ifdef".
* mesa: added GL3 query for GL_TEXTURE_SHARED_SIZEBrian Paul2010-03-201-0/+12
|
* mesa: increase number of texture units to MAX_COMBINED_TEXTURE_IMAGE_UNITSBrian Paul2010-02-031-2/+2
| | | | | | | | | | | | | | | | | | | We were misinterpretting GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS previously. It's the number of texture units for which we need to keep state; not just the total number of texture units addressable by the vertex shader plus fragment shader. Since sw Mesa independently supports 16 texture units in vertex shaders and 16 texture units in fragment shaders, the max combined units is 32. Note that the docs for glActiveTexture() indicate the max legal unit is MAX(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, MAX_TEXTURE_COORDS) - 1. A new piglit test (texunits.c) tests the various texture unit limits. I'm pretty sure I've got this all right now, but additional reviews are welcome...
* Merge branch 'mesa_7_7_branch'Brian Paul2010-01-221-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c src/gallium/auxiliary/pipebuffer/Makefile src/gallium/auxiliary/pipebuffer/SConscript src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/tgsi/tgsi_scan.c src/gallium/drivers/i915/i915_surface.c src/gallium/drivers/i915/i915_texture.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/softpipe/sp_prim_vbuf.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/winsys/drm/intel/gem/intel_drm_api.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_drm.c src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c src/mesa/state_tracker/st_cb_clear.c
| * mesa: Remove unnecessary header from texparam.c.Vinson Lee2010-01-171-1/+0
| |
* | mesa: added _mesa_[Get]TexParameterI[u]iv() functionsBrian Paul2010-01-041-1/+116
| | | | | | | | | | New in GL 3.0. Primarily meant for setting int/uint-valued texture border color. Not plugged into dispatch table yet.
* | mesa: make texture BorderColor a union of float/int/uintBrian Paul2010-01-041-12/+9
| | | | | | | | | | | | | | | | When we have integer-valued texture formats, the texture border color must also store integer and uint values. With GL 3.0, the new glTexParameterIiv() and glTexParameterIuiv() functions can set the border color to int or uint values.
* | mesa: use get_texobj() in _mesa_GetTexParameter() funcsBrian Paul2010-01-041-35/+16
|/