summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texparam.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|/
* mesa: add missing _mesa_lock_texture() callBrian Paul2010-01-041-0/+1
|
* Merge branch 'mesa_7_6_branch' into mesa_7_7_branchBrian Paul2009-12-111-7/+18
|\
| * mesa: Fix array out-of-bounds access by _mesa_TexParameteriv.Vinson Lee2009-12-101-2/+4
| |
| * mesa: Fix array out-of-bounds access by _mesa_TexParameteri.Vinson Lee2009-12-081-1/+6
| | | | | | | | | | _mesa_TexParameteri calls set_tex_parameteri, which uses the params argument as an array.
| * mesa: Fix array out-of-bounds access by _mesa_TexParameteri.Vinson Lee2009-12-081-2/+4
| | | | | | | | | | _mesa_TexParameteri calls set_tex_parameterf, which uses the params argument as an array.
| * mesa: Fix array out-of-bounds access by _mesa_TexParameterfv.Vinson Lee2009-12-081-2/+4
| | | | | | | | | | _mesa_TexParameterfv calls set_tex_parameteri, which uses the params argument as an array.
| * mesa: Fix array out-of-bounds access by _mesa_TexParameterf.Vinson Lee2009-12-051-2/+7
| | | | | | | | | | | | _mesa_TexParameterf calls set_tex_parameterf, which uses the params argument as an array. (cherry picked from commit 270d36da146b899d39e08f830fe34b63833a3731)
| * mesa: Fix array out-of-bounds access by _mesa_TexParameterf.Vinson Lee2009-12-051-2/+4
| | | | | | | | | | | | _mesa_TexParameterf calls set_tex_parameteri, which uses the params argument as an array. (cherry picked from commit a201dfb6bf28b89d6f511c2ec9ae0d81ef18511d)
* | mesa: Fix array out-of-bounds access by _mesa_TexParameterf.Vinson Lee2009-11-291-2/+7
| | | | | | | | | | _mesa_TexParameterf calls set_tex_parameterf, which uses the params argument as an array.
* | mesa: Fix array out-of-bounds access by _mesa_TexParameterf.Vinson Lee2009-11-291-2/+4
| | | | | | | | | | _mesa_TexParameterf calls set_tex_parameteri, which uses the params argument as an array.
* | mesa: added commentBrian Paul2009-11-021-0/+2
| |
* | mesa: Fix compilation errors and warnings when features are disabled.Chia-I Wu2009-10-291-1/+1
| | | | | | | | | | | | Some of the fixes are cherry-picked from opengl-es branch. Signed-off-by: Chia-I Wu <[email protected]>
* | Merge branch 'texformat-rework'Brian Paul2009-10-281-42/+46
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/drivers/dri/radeon/radeon_fbo.c src/mesa/drivers/dri/s3v/s3v_tex.c src/mesa/drivers/dri/s3v/s3v_xmesa.c src/mesa/drivers/dri/trident/trident_context.c src/mesa/main/debug.c src/mesa/main/mipmap.c src/mesa/main/texformat.c src/mesa/main/texgetimage.c
| * mesa: remove _mesa_compressed_texture_size()Brian Paul2009-10-241-6/+2
| | | | | | | | Use _mesa_format_image_size() instead.
| * mesa: remove gl_texture_image::IsCompressed fieldBrian Paul2009-10-011-2/+2
| | | | | | | | Use _mesa_is_format_compressed() instead.
| * mesa: replace gl_texture_format with gl_formatBrian Paul2009-09-301-1/+1
| | | | | | | | | | | | Now gl_texture_image::TexFormat is a simple MESA_FORMAT_x enum. ctx->Driver.ChooseTexture format also returns a MESA_FORMAT_x. gl_texture_format will go away next.
| * mesa: fix GL_TEXTURE_LUMINANCE_SIZE queryBrian Paul2009-09-271-1/+1
| |
| * mesa: use more mesa format functionsBrian Paul2009-09-271-19/+29
| |
| * mesa: use _mesa_get_format_bits()Brian Paul2009-09-271-24/+23
| |
* | mesa: fix GL_TEXTURE_INTERNAL_FORMAT query for compressed formatsBrian Paul2009-10-231-1/+9
|/ | | | | Need to return the actual compressed format when the user originally requested a generic compressed format.
* Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul2009-09-151-3/+3
|\
| * mesa: raise GL_INVALID_ENUM not GL_INVALID_VALUE for glTexParamter errorsVinson Lee2009-09-111-3/+3
| | | | | | | | Signed-off-by: Brian Paul <[email protected]>
* | mesa: rework error check in glGetTexLevelParameter(), remove ↵Brian Paul2009-08-131-47/+2
| | | | | | | | tex_image_dimensions()
* | mesa: use _mesa_get_current_tex_unit() in more placesBrian Paul2009-08-131-4/+5
| |
* | mesa: check for ARB_framebuffer_object for GL_TEXTURE_STENCIL_SIZE_EXT queryBrian Paul2009-06-291-1/+2
| |
* | mesa: limit number of error raised by invalid GL_TEXTURE_MAX_ANISOTROPY_EXTBrian Paul2009-05-071-2/+4
|/
* mesa: more informative error messagesBrian Paul2009-04-231-6/+10
|
* mesa: fix TexParameter functionsRoland Scheidegger2009-04-021-62/+86
| | | | | | | | | premature return in TexParameterf caused mesa to never call Driver.TexParameter breaking drivers relying on this (fix bug #20966). While here, also fix using ctx->ErrorValue when deciding to call Driver.TexParameter. Errors are sticky and uncleared errors thus would cause this to no longer get called. Since we thus need return value of set_tex_parameter[if] can also optimize this to only call when value changed.
* mesa: get rid of gl_texture_object::_BorderChanBrian Paul2009-04-011-4/+0
|
* mesa: use an array for current texture objectsBrian Paul2009-02-211-7/+7
| | | | Use loops to consolidate lots of texture object code.
* mesa: avoid setting texObj->_Complete = GL_FALSE when there's no state changeBrian Paul2009-02-091-31/+37
| | | | | | | Avoid a little bit of unneeded state validation and fixes a bug where the texture complete flags was set to false, but we didn't signal _NEW_TEXTURE. Fixes piglit tex1d-2dborder failure.
* mesa: add no-change testing for a few more texture parametersBrian Paul2009-02-091-8/+20
|
* Make GL_ARB_texture_compression mandatoryIan Romanick2009-01-281-25/+13
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa: remove GL_SGIX_shadow, GL_SGIX_shadow_ambient and GL_SGIX_depth_textureBrian Paul2009-01-281-70/+12
| | | | Everyone should be using the newer/better ARB versions of these extensions.
* mesa: additional GL_INVALID_OPERATION tests for texture swizzleBrian Paul2009-01-281-2/+7
|
* mesa: set/get new state for GL_EXT_texture_swizzleBrian Paul2009-01-281-34/+185
|
* mesa: refactor glTexParameter codeBrian Paul2009-01-271-347/+480
|
* Unify ARB_depth_texture and SGIX_depth_textureIan Romanick2008-10-011-2/+1
| | | | | | | The ARB extension is a superset of the older SGIX extension. Any hardware that can support the SGIX version can also support the ARB version. In Mesa, any driver that supports one also supports the other. This unification just simplifies some bits of code.
* mesa: fix param indexingBrad King2008-09-261-6/+6
|
* mesa: texture crop rect stateBrian Paul2008-09-211-0/+30
| | | | (cherry picked from commit c01fbc7866d7cd5cf4263dffec6d9591470b4c23)
* mesa: refactor: move various ENUM_TO_x macros into macros.hBrian Paul2008-09-211-3/+0
|
* mesa: refactor: move glTexParameter-related functions into new texparam.c fileBrian Paul2008-09-211-0/+1039