summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/attrib.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Restore depth texture state on glPopAttrib(GL_TEXTURE_BIT).Kenneth Graunke2012-06-021-0/+8
| | | | | | | | | | | | | | | | | | According to Table 6.17 in the GL 2.1 specification, DEPTH_TEXTURE_MODE, TEXTURE_COMPARE_MODE, and TEXTURE_COMPARE_FUNC need to be restored on glPopAttrib(GL_TEXTURE_BIT). Makes a number of oglconform tests happier. v2: Make restoration conditional on the ARB_shadow and ARB_depth_texture extensions, as suggested by Brian. I'm not sure that any implementations still remain that don't support those, but why not? NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: move gl_array_attrib::NewState to gl_array_object::NewArraysBrian Paul2012-04-201-7/+0
| | | | | | | | The field wasn't actually used before and it's not used now either. But this is a more logical place for it and will hopefully allow doing smarter draw/array validation (per array object) in the future. Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa,vbo: properly detect when vertex arrays need to be recalculatedMarek Olšák2012-04-191-3/+0
| | | | | | | | | | | | | | | | | | | This moves the RebindArrays flag into the vbo module, consolidates the code, and adds missing vbo_draw_method calls. Also with this change, the vertex arrays are not needlessly recalculated twice. The issue with the old code was: - If recalculate_input_bindings updates vp_varying_inputs, _NEW_ARRAY is set. - _mesa_update_state is called and the vp_varying_inputs change causes regeneration of the fixed-function shaders, which also sets _NEW_PROGRAM. - The occurence of either _NEW_ARRAY or _NEW_PROGRAM sets the recalculate_inputs flag to TRUE again. - The new code sets the flag to FALSE after the second _mesa_update_state, because there can't possibly be any change which would require recalculating the arrays. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: Include the multisample enables under GL_MULTISAMPLE_BIT attrib as well.Eric Anholt2012-02-151-2/+17
| | | | | | | Fixes (with the previous commit) piglit GL_ARB_multisample/pushpop. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix push/pop of multisample coverage invert.Eric Anholt2012-02-151-5/+0
| | | | | | | | In the table of of push/pop attributes, this one doesn't fall under the enable group. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: reference shared state in glPushAttrib(GL_TEXTURE_BIT)Brian Paul2012-02-011-0/+13
| | | | | | | | | | | | This fixes a dangling texture object pointer bug hit via wglShareLists(). When we push the GL_TEXTURE_BIT state we may push references to the default texture objects which are owned by the gl_shared_state object. We don't want to accidentally delete that shared state while the attribute stack references shared objects. So keep a reference to it. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* mesa: remove stray comment in PopAttrib() codeBrian Paul2012-02-011-1/+0
|
* mesa: Don't resurrect deleted ARB VAOs in glPopClientAttribIan Romanick2012-01-241-11/+42
| | | | | | | | | | | | | | When ARB VAOs are used, glPopClientAttrib does not resurrect a deleted VAO or VBO. This difference between the two spec is, unfortunately, not very well spelled out in the specs. Fixes oglc vao(advanced.pushPop.deleteVAO) and vao(advanced.pushPop.deleteVBO) tests. NOTE: This is a candidate for release branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Rename gl_array_object::VBOonly to ::ARBsemanticsIan Romanick2012-01-241-1/+1
| | | | | | | | | | | | | | There are more differences between Apple and ARB than just requiring that all arrays be stored in VBOs. Additional uses will be added in following commits. Also, set the flag at Bind time instead of Gen time. The ARB_vao spec specifies that behavior. NOTE: This is a candidate for release branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix indentation in attrib.cBrian Paul2011-11-301-1/+1
|
* mesa: Use VERT_ATTRIB_* indexed array in gl_array_object.Mathias Fröhlich2011-11-291-13/+0
| | | | | | | | | | | | Replace the distinct struct gl_client_array members in gl_array_object by an array of gl_client_arrays indexed by VERT_ATTRIB_*. Renumber the vertex attributes slightly to keep the old semantics of the distinct array members. Make use of the upper 32 bits in VERT_BIT_*. Update all occurances of the distinct struct members with the array equivalents. Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: move ElementArrayBufferObj to gl_array_objectYuanhan Liu2011-11-291-4/+3
| | | | | | | | | | | | | | | According opengl spec 4.2.pdf table 6.12 (Vertex Array Object State) at page 515, the element buffer object is listed in vertex array object. So, move the ElementArrayBufferObj inside gl_array_object to make element buffer object per-vao. This would fix most of(3 left) intel oglc vao test fail NOTE: this is a candidate for the 7.11 branch. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add support for GL_OES_EGL_image_externalChia-I Wu2011-11-031-0/+2
| | | | | | | | | 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: Fix multithreaded buffer object refcounting.Mathias Fröhlich2011-10-231-72/+151
| | | | | | | | | | Buffer objects may be shared across contexts. Rework the array attrib push/pop implementation to be thread safe. Make use of more library functions for this purpose. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: number of combiner terms to pop depends on GL_NV_texture_env_combine4Brian Paul2011-10-011-1/+2
| | | | | | | | | | If GL_NV_texture_env_combine4 is not supported, setting the fourth combiner term would generate a GL error. Of course, I noticed this right after committing the previous patch to use a loop in the first place. <sigh> Note that GL_EXT_texture_env_combine is always supported so the first three combiner terms are always accepted.
* mesa: use !! to simplify some _mesa_set_enable() calls in attrib.cBrian Paul2011-10-011-43/+25
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: use loop in pop_texture_group() to restore 4 combiner termsBrian Paul2011-10-011-24/+13
| | | | | | | There's four combiner terms (not 3) with GL_NV_texture_env_combine4. Use a loop to make the code a little more compact. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_lod_bias extension enable flagIan Romanick2011-09-291-4/+2
| | | | | | | | | | | | 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: Remove EXT_texture_env_combine extension enable flagIan Romanick2011-09-291-35/+32
| | | | | | | | | | | | | | | | | | | | | 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. The existing support is already partially broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x). This patch does not change the situation in any way. It looks like the only hardware supported by Mesa that cannot do ARB_texture_env_combine is pre-NV10 NVIDA chips. It appears that these chips cannot do the GL_SUBTRACT mode. Based on looking at older copies of nvOpenGLspecs.pdf found on the net, NVIDIA never supported ARB_texture_env_combine on those chips either. This extension was previously not supported on mach64, mga (G200), r128, savage, sis, and tdfx (Voodoo Banshee and Voodoo3). Signed-off-by: Ian Romanick <[email protected]> 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/+0
| | | | | | | 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: Update clipping code to use ctx->Const.MaxClipPlanes.Paul Berry2011-09-201-2/+2
| | | | | | | | | | | | | To support GLSL 1.30, we will need to increase MAX_CLIP_PLANES to 8. To avoid breaking drivers that do not yet support 8 clip planes, this patch modifies the Mesa core code that pertains to clipping to use ctx->Const.MaxClipPlanes rather than MAX_CLIP_PLANES, since ctx->Const.MaxClipPlanes will remain 6 for drivers that only support 6 clip planes. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: introduce a clear color union to be used for int/unsigned buffersDave Airlie2011-09-141-4/+4
| | | | | | | | | | This introduces a new gl_color_union union and moves the current ClearColorUnclamped to use it, it removes current ClearColor completely and renames CCU to CC, then all drivers are modified to expected unclamped floats instead. also fixes st to use translated color in one place it wasn't. Signed-off-by: Dave Airlie <[email protected]>
* mesa: move sampler state into new gl_sampler_object typeBrian Paul2011-04-101-11/+14
| | | | | | 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: fix popping of texture state for GL_TEXTURE_BUFFERBrian Paul2011-04-061-0/+2
| | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=36032
* mesa: implement clamping controls (ARB_color_buffer_float)Marek Olšák2011-03-291-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 GL_SGI_texture_color_table supportBrian Paul2011-02-281-11/+0
| | | | | | It was only implemented in the swrast driver and probably not used by any applications. A modern app would use a dependent/chained texture lookup in the fragment shader.
* mesa: begin implementation of GL_ARB_draw_buffers_blendBrian Paul2011-01-151-14/+33
|
* mesa: Directly include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-071-0/+1
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-5/+5
|
* mesa: Remove EXT_convolution.Eric Anholt2010-09-231-12/+0
| | | | More optional code.
* mesa: Remove SGI_color_table.Eric Anholt2010-09-231-13/+0
| | | | Another optional ARB_imaging subset extension.
* mesa: Remove EXT_histogram.Eric Anholt2010-09-231-4/+0
| | | | This has always been optional, and not useful.
* mesa: Include macros.h in attrib.c for COPY_4FV symbol.Vinson Lee2010-07-301-0/+1
|
* mesa: remove unused headerBrian Paul2010-05-111-1/+0
|
* mesa: Move src/mesa/glapi/dispatch.h to mesa.Chia-I Wu2010-02-251-1/+1
| | | | | | glapi/dispatch.h is a core Mesa header file. Move the header file to main/ to make this clear. It also becomes clear after this change that IN_DRI_DRIVER is only used in core Mesa to enable the remap table.
* Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg2010-02-191-2/+2
|
* mesa: replace old MEMCPY macro with memcpyBrian Paul2010-02-191-30/+30
|
* Remove _mesa_memcpy in favor of plain memcpy.Kenneth Graunke2010-02-191-1/+1
| | | | This may break the SUNOS4 build, but it's no longer relevant.
* 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 attrib.c.Vinson Lee2010-01-181-1/+0
| |
* | mesa: make texture BorderColor a union of float/int/uintBrian Paul2010-01-041-1/+1
| | | | | | | | | | | | | | | | 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.
* | Merge branch 'mesa_7_7_branch'Brian Paul2010-01-041-15/+32
|\| | | | | | | | | | | | | | | | | Conflicts: docs/relnotes.html src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/r300/r300_cs.h src/mesa/drivers/dri/i965/brw_wm_surface_state.c src/mesa/main/enums.c
| * mesa: Prevent possible array out-of-bounds access by _mesa_light.Vinson Lee2010-01-041-15/+32
| |
* | mesa: fix-up blend enable/disable code in _mesa_PopAttrib()Brian Paul2009-12-291-7/+17
| |
* | mesa: finish-up indexed color mask code in _mesa_PopAttrib()Brian Paul2009-12-291-1/+1
| |
* | mesa: implement per-buffer color maskingBrian Paul2009-12-291-4/+16
| | | | | | | | | | | | | | | | | | | | | | This is part of the GL_EXT_draw_buffers2 extension and part of GL 3.0. The ctx->Color.ColorMask field is now a 2-D array. Until drivers are modified to support per-buffer color masking, they can just look at the 0th color mask. The new _mesa_ColorMaskIndexed() function will be called by glColorMaskIndexedEXT() or glColorMaski().
* | mesa: per-buffer blend enabled flagsBrian Paul2009-12-291-2/+14
|/ | | | | | | | | | | | | | | ctx->Color.BlendEnabled is now a GLbitfield instead of a GLboolean to indicate blend on/off status for each color/draw buffer. This is infrastructure for GL_EXT_draw_buffers2 and OpenGL 3.x New functions include _mesa_EnableIndexed(), _mesa_DisableIndexed(), and _mesa_IsEnabledIndexed(). The enable function corresponds to glEnableIndexedEXT() for GL_EXT_draw_buffers2 or glEnablei() for GL3. Note that there's quite a few tests for ctx->Color.BlendEnabled != 0 in drivers, etc. Those tests can remain as-is since the mask will be 0 or ~0 unless GL_EXT_draw_buffers2 is enabled.
* mesa/main: Make FEATURE_attrib_stack follow feature conventions.Chia-I Wu2009-09-301-0/+17
| | | | | As shown in mfeatures.h, this allows users of attrib.h to work without knowing if the feature is available.
* mesa: Add support for ARB_depth_clamp.Eric Anholt2009-09-081-0/+7
| | | | | This currently doesn't include fixing up the cliptests in the assembly paths to support ARB_depth_clamp, so enabling depth_clamp forces the C path.
* mesa: simplify glPushAttrib() list building codeBrian Paul2009-08-081-106/+40
|