summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* mesa: use _mesa_get_current_tex_unit() helperBrian Paul2009-09-281-2/+2
|
* Merge branch 'mesa_7_6_branch'Brian Paul2009-09-241-6/+1
|\ | | | | | | | | | | Conflicts: src/mesa/vbo/vbo_exec_array.c
| * Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul2009-09-241-6/+1
| |\
| | * mesa: remove glEnable(GL_DEPTH_BOUNDS_TEST_EXT) check/warningBrian Paul2009-09-241-5/+0
| | | | | | | | | | | | | | | At the time of the enable there may not be a Z buffer, but one may be attached to the FBO later.
| | * mesa: remove rgbMode check in enable_texture()Brian Paul2009-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | If the currently bound FBO isn't yet validated it's possible for rgbMode to be zero so we'll lose the texture enable. This could fix some FBO rendering glitches, but I don't know of any specific instances.
* | | mesa: move call to init_c_cliptest() from enable.c to tnl module.Brian Paul2009-09-091-8/+0
| | | | | | | | | | | | Fixed gallium build breakage.
* | | mesa: Add support for ARB_depth_clamp.Eric Anholt2009-09-081-0/+20
|/ / | | | | | | | | 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.
* | Infrastructure for GL_ARB_seamless_cube_mapIan Romanick2009-08-141-0/+10
| |
* | mesa: added some assertionsBrian Paul2009-05-221-0/+2
| |
* | mesa: minor simplification in enable_texture(), updated commentsBrian Paul2009-05-051-3/+5
|/
* mesa: remove GL_MESA_program_debug extensionBrian Paul2009-03-071-22/+0
| | | | This was never fully fleshed out and hasn't been used.
* mesa: remove warning/short-circuit of stencil enable w/ no stencil bufferBrian Paul2009-03-021-5/+0
| | | | With FBOs one could enable stencil before a stencil buffer is later bound.