summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove FEATURE_point_size_array define.Oliver McFadden2012-09-151-3/+1
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_userclip define.Oliver McFadden2012-09-151-2/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* meta: Refactor handling of GL_MULTISAMPLE.Paul Berry2012-09-141-5/+19
| | | | | | | | | | | | | | | | | In commit 055093e (meta: remove call to _meta_in_progress(), fix multisample enable/disable), we created a meta_set_enable() function that could be used by meta ops to enable and disable GL_MULTISAMPLE even when the GLES API was in use (the GLES API doesn't support GL_MULTISAMPLE; it behaves as if it is always enabled). This created some unfortunate code duplication between meta_set_enable() and the existing _mesa_set_enable() function. This patch eliminates the duplication by creating a _mesa_set_multisample() function, which is used by both meta ops and _mesa_set_enable() to enable/disable GL_MULTISAMPLE. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* meta: remove call to _meta_in_progress(), fix multisample enable/disableBrian Paul2012-08-301-6/+1
| | | | | | | | | | | | | | | | | | | This partially reverts d638da23d2ec2e9c52655b1ea138249e7f8bcccb. With gallium the meta code is not always built so the call to _meta_in_progress() was unresolved. Simply special-case the GL_MULTISAMPLE case in the meta code. There might be other special cases in the future given all the differences between legacy GL, core GL, GLES, etc. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=54234 and https://bugs.freedesktop.org/show_bug.cgi?id=54239 v2 (Paul Berry <[email protected]>): keep _meta_in_progress function, since it's needed by the i965 driver, but don't call it from core mesa. Signed-off-by: Brian Paul <[email protected]>
* meta: Don't stray outside the confines of the API specified in the contextPaul Berry2012-08-291-1/+7
| | | | | Signed-off-by: Paul Berry <[email protected]> Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glEnable cap in Mesa code rather than the ES wrapperIan Romanick2012-08-291-6/+296
| | | | | | | | | Also handle glDisable, glIsEnabled, glEnableClientState, and glDisableClientState. v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Replace VersionMajor/VersionMinor with a Version field.Eric Anholt2012-08-071-2/+2
| | | | | | | | | | | As we get into supporting GL 3.x core, we come across more and more features of the API that depend on the version number as opposed to just the extension list. This will let us more sanely do version checks than "(VersionMajor == 3 && VersionMinor >= 2) || VersionMajor >= 4". v2: Fix a bad <= 30 check. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: look up enum name for glEnable/Disable errorsBrian Paul2012-06-271-5/+6
|
* mesa: move gl_array_attrib::NewState to gl_array_object::NewArraysBrian Paul2012-04-201-1/+2
| | | | | | | | 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: remove unused DD_TRI_TWOSTENCILBrian Paul2012-03-121-2/+0
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add infrastructure for GL_ARB_debug_outputnobled2012-03-101-0/+5
| | | | Marek v2: don't add the extension to extensions.c yet
* mesa: use arrayObj var in more places in client_state()Brian Paul2012-02-291-3/+3
|
* mesa: Add _NEW_RASTERIZER_DISCARD as synonym for _NEW_TRANSFORM.Paul Berry2011-12-211-1/+1
| | | | | | | | | | This makes it easier to keep track of which dirty bits correspond to which pieces of context, since it makes _NEW_RASTERIZER_DISCARD correspond with ctx->RasterDiscard. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Move RasterDiscard to toplevel of gl_context.Paul Berry2011-12-211-3/+3
| | | | | | | | | | | | | | | | | | | | Previously we were storing the RasterDiscard flag (for GL_RASTERIZER_DISCARD) in gl_context::TransformFeedback. This was confusing, because we use the _NEW_TRANSFORM flag (not _NEW_TRANSFORM_FEEDBACK) to track state updates to it, and because rasterizer discard has effects even when transform feedback is not in use. This patch makes RasterDiscard a toplevel element in gl_context rather than a subfield of gl_context::TransformFeedback. Note: We can't put RasterDiscard inside gl_context::Transform, since all items inside gl_context::Transform need to be pieces of state that are saved and restored using PushAttrib and PopAttrib. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Use VERT_ATTRIB_* indexed array in gl_array_object.Mathias Fröhlich2011-11-291-22/+22
| | | | | | | | | | | | 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: Make gl_array_object::_Enabled 64 bits.Mathias Fröhlich2011-11-291-1/+1
| | | | | | Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Replace _NEW_ARRAY_* bits with VERT_BIT_*Mathias Fröhlich2011-11-291-10/+10
| | | | | | | | Consolidate the two distinct set of flags to use VERT_BIT_*. Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add support for GL_OES_EGL_image_externalChia-I Wu2011-11-031-0/+13
| | | | | | | | | 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: Make enable.c and get.c properly range check clip flags.Paul Berry2011-09-271-8/+19
| | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to commit 2d686fe911a89fa477ee3848da41ebfb100500bf, which added decoding of GL_CLIP_DISTANCE[67] to the _mesa_set_enable() function. This patch makes the following additional fixes: - Uses GL_CLIP_DISTANCEi enums consistently within enable.c rather than the deprecated GL_CLIP_PLANEi enums. - Generates an error if the user tries to access a clip flag that is unsupported by the hardware. - Applies the same change to _mesa_IsEnabled(), so that querying clip flags using glIsEnabled() works properly. - Applies corresponding changes to get.c, so that querying clip flags using glGet*() works properly. Fixes piglit test clip-flag-behavior. Reviewed-by: Brian Paul <[email protected]>
* mesa: Decode GL_CLIP_DISTANCE[67] properly in _mesa_set_enable().Paul Berry2011-09-231-6/+8
| | | | | | | | | | | | | In order to support 8 clip distances, we need to properly decode when the user sets the GL_CLIP_DISTANCE6 and GL_CLIP_DISTANCE7 enable flags. For clarity, this patch changes the names GL_CLIP_PLANE[0-5] in the switch statement to the equivalent names GL_CLIP_DISTANCE[0-5], since the GL_CLIP_PLANE names are deprecated. Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* mesa: generate GL_INVALID_OPERATION in glIsEnabledIndex() between Begin/EndBrian Paul2011-09-191-0/+1
|
* mesa: fix error handling for glIsEnabledYuanhan Liu2011-09-191-0/+2
| | | | | | | | | According the man page, GL_INVALID_OPERATION should be generated if glIsEnabled is executed betwwen the execution of glBegin and the correspoding execution of glEnd. Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: Remove API facing bits of EXT_paletted_texture and ↵Ian Romanick2011-09-061-8/+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: minor comment updates in enable.cBrian Paul2011-08-041-9/+2
|
* mesa: flush vertices before changing GL_RASTERIZER_DISCARD state, not afterMarek Olšák2011-05-031-1/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: make _NEW_TEXTURE dirty when changing GL_TEXTURE_CUBE_MAP_SEAMLESSMarek Olšák2011-05-031-1/+4
| | | | | | | Otherwise there would be no way to know whether the state has been changed. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: 80-column wrapping, update commentBrian Paul2011-03-191-7/+12
|
* mesa: consolidate enable/disable code for GL_TEXTURE_GEN_S/T/R/QBrian Paul2011-03-191-67/+9
|
* mesa: consolidate clip plane update codeBrian Paul2011-03-191-11/+2
|
* mesa: remove GL_SGI_texture_color_table supportBrian Paul2011-02-281-14/+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: remove the MESA_NO_DITHER env varBrian Paul2011-02-171-3/+0
| | | | This was sometimes useful back when 16-bit framebuffers were prominent.
* mesa/965: add support for GL_EXT_framebuffer_sRGB (v2)Dave Airlie2011-02-051-3/+4
| | | | | | | | | | | | This adds i965 support for GL_EXT_framebuffer_sRGB, it introduces a new constant to say that the driver can support sRGB enabled FBOs since enabling the extension doesn't mean the driver can actually support sRGB. Also adds the suggested state flush in the core code suggested by Brian. fix the ARB_fbo color encoding. Signed-off-by: Dave Airlie <[email protected]>
* mesa: EXT_framebuffer_sRGB interface additions.Dave Airlie2011-01-211-0/+11
| | | | | | | | | | | This adds the get/enable enums and internal gl_config storage for this extension. In theory this is all that is needed to enable this extension from what I can see, since its not mandatory to implement the features if you don't advertise the visuals or the fb configs. 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 uninitialized var warningBrian Paul2010-10-251-0/+1
| | | | http://bugs.freedesktop.org/show_bug.cgi?id=31067
* mesa: set/get primitive restart stateBrian Paul2010-10-211-3/+20
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-6/+6
|
* Remove GL_EXT_cull_vertexIan Romanick2010-09-271-7/+0
| | | | | This is only used in the i915 driver where it provides little benefit for very few applications that use it with fixed function TNL.
* mesa: Remove EXT_convolution.Eric Anholt2010-09-231-34/+0
| | | | More optional code.
* mesa: Remove SGI_color_table.Eric Anholt2010-09-231-33/+1
| | | | Another optional ARB_imaging subset extension.
* mesa: Remove EXT_histogram.Eric Anholt2010-09-231-21/+0
| | | | This has always been optional, and not useful.
* mesa: Handle GL_TEXTURE_GEN_STR_OES in _mesa_Enable()Kristian Høgsberg2010-04-281-0/+28
|
* mesa: API and state for GL 3.1 primitive restartBrian Paul2010-04-201-0/+18
|
* mesa: better, smaller error handling code for glEnable/Disable/IsEnabled()Brian Paul2010-04-201-24/+29
| | | | | Use a goto instead of replicating the _mesa_error() call many times. enable.o is about 15% smaller.
* mesa: added glEnable/Disable state for transform feedbackBrian Paul2010-03-301-0/+16
|
* 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 enable.c.Vinson Lee2010-01-181-1/+0
| |
* | mesa: added infrastructure for GL_EXT_draw_buffers2Brian Paul2009-12-291-3/+10
| |
* | mesa: per-buffer blend enabled flagsBrian Paul2009-12-291-5/+79
|/ | | | | | | | | | | | | | | 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: minor code clean-up in client_state()Brian Paul2009-10-271-10/+11
|