summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add infrastructure for GL_ARB_debug_outputnobled2012-03-101-0/+7
| | | | Marek v2: don't add the extension to extensions.c yet
* mesa: Avoid segfault when getting an unbound transform feedback buffer name.Paul Berry2012-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | Previously we were using gl_transform_feedback_object::Buffers[i]->Name to service an indexed get request for GL_TRANSFORM_FEEDBACK_BUFFER_BINDING. However, if no buffer has been bound, gl_transform_feedback_object::Buffers[i] is NULL, so this was causing a segfault. This patch switches to using gl_transform_feedback_object::BufferNames[i], which is equal to gl_transform_feedback_object::Buffers[i]->Name if gl_transform_feedback_object::Buffers[i] is not NULL, and 0 if it is NULL. Fixes piglit test "EXT_transform_feedback/get-buffer-state indexed_binding". Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Move RasterDiscard to toplevel of gl_context.Paul Berry2011-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | 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: distinct gl_client_array arrays are goneChia-I Wu2011-11-291-3/+3
| | | | | | Fix build errors since 762c9766c93697af8d7fbaa729aed118789dbe8e. Acked-by: Jose Fonseca <[email protected]>
* mesa: Use VERT_ATTRIB_* indexed array in gl_array_object.Mathias Fröhlich2011-11-291-49/+49
| | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | 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/+9
| | | | | | | | | 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: Add the basics for the NV_fog_distance extensionNicholas Miell2011-11-011-0/+5
| | | | No driver implements it yet.
* mesa: Make the program texel offsets limits available with GLSL 1.30.Eric Anholt2011-10-181-5/+12
| | | | | | | | | | It was previously under gpu_shader4, but I'm pretty sure everyone's going to be doing GLSL 1.30 first (since gpu_shader4 is basically 1.30 plus a bunch of extra stuff). Fixes piglit glsl-1.30/texel-offset-limits. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/get: Move MAX_LIGHTS from GL/ES2 to GL/ES1.Kenneth Graunke2011-10-061-2/+1
| | | | | | | | | | It's required for ES 1.0 and 1.1, and isn't specified for ES 2. While the comment says Mesa depends on it internally, removing it from ES2 doesn't seem to regress any Piglit or ES2 conformance tests. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/es: Allow querying GL_DRAW_BUFFERi in OpenGL ES 2.0Ian Romanick2011-10-041-17/+17
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Allow querying GL_MAX_COLOR_ATTACHMENTS in OpenGL ES 2.0Ian Romanick2011-10-041-4/+4
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add missing glGetIntegerv() support for ARB_color_buffer_float tokens.Eric Anholt2011-10-011-0/+6
| | | | | | | Fixes piglit ARB_color_buffer_float/api-get Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_lod_bias 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, or r128. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove ARB_multitexture extension enable flagIan Romanick2011-09-291-7/+3
| | | | | | | | | | | | | | | 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_CLIENT_ACTIVE_TEXTURE in OpenGL ES 2.x). This patch does not change the situation in any way. This extension was previously not supported on i810, mga (G200), or tdfx (Voodoo Banshee). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Make enable.c and get.c properly range check clip flags.Paul Berry2011-09-271-6/+37
| | | | | | | | | | | | | | | | | | | | | | | 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: Remove OES_read_format extension enable flagIan Romanick2011-09-261-8/+2
| | | | | | | | | | | | This extension is always enabled, and drivers do not have to option to disable it. I kept this one separate from the others because I was a little uncertain about the changes to get.c. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* mesa: Remove many extension enable flagsIan Romanick2011-09-261-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The following extensions are always enabled, and drivers do not have to option to disable them: GL_ARB_multisample GL_ARB_texture_compression GL_ARB_vertex_buffer_object / GL_OES_mapbuffer GL_EXT_copy_texture GL_EXT_multi_draw_arrays / GL_SUN_multi_draw_arrays GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture_edge_clamp / GL_SGIS_texture_edge_clamp GL_EXT_vertex_array GL_SGIS_generate_mipmap This set was picked because the are all either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support for some is already partially broken in Mesa (e.g., proxy texture targets in OpenGL ES). This patch does not change the situation in any way. 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: fix error handling for some glGet* functionsYuanhan Liu2011-09-191-0/+15
| | | | | | | | | | | | | | | According to the man page, it should trigger a GL_INVALID_OPERATION while calling some glGet* functions inside glBegin and glEnd. This patch dose handle the following functions: glGetBooleanv glGetFloatv glGetIntegerv glGetInteger64v glGetDoublev Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: introduce a clear color union to be used for int/unsigned buffersDave Airlie2011-09-141-4/+7
| | | | | | | | | | 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: Remove API facing bits of EXT_paletted_texture and ↵Ian Romanick2011-09-061-1/+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: Make _mesa_get_compressed_formats match the texture compression specsIan Romanick2011-07-251-2/+2
| | | | | | | | | | | The implementation deviated slightly from the GL_EXT_texture_sRGB spec and from other implementations. A giant comment block was added to justify the somewhat odd behavior of this function. In addition, the interface had unnecessary cruft. The 'all' parameter was false at all callers, so it has been removed. Reviewed-by: Brian Paul <[email protected]>
* mesa: GL_PROVOKING_VERTEX_EXT is a GLenum, not GLboolean.José Fonseca2011-04-301-1/+1
|
* Squashed commit of the following:Brian Paul2011-04-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 864fe253b04105b7469e5f7b064dc37637b944f8 Author: Brian Paul <[email protected]> Date: Thu Apr 21 20:13:07 2011 -0600 mesa: s/exec/disp/ in _mesa_init_histogram_dispatch() This function isn't normally compiled (FEATURE_histogram). commit f4bf45e2b94b582cacd19cdca873c5be627e4250 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:58 2011 -0600 mesa: hook up GL_ARB_robustness dispatch functions ...and advertise the extension. Signed-off-by: Brian Paul <[email protected]> commit 2b89e38e5f572dc40cebc06381ae7c5d04386998 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:58 2011 -0600 mesa: regenerated API files for GL_ARB_robustness Signed-off-by: Brian Paul <[email protected]> commit 5d5ebfb7135cec9d833adef86cbf4d0f3d9beca8 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 glapi: add ARB_robustness xml Signed-off-by: Brian Paul <[email protected]> commit 0159d1d6d99f4bbc18381dc2081c20d3aff17ac9 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: implement GL_ARB_robustness functions Signed-off-by: Brian Paul <[email protected]> commit 938fd71f4c4742f274922d53492a7290ab8d9c9b Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add context fields for GL_ARB_robustness Signed-off-by: Brian Paul <[email protected]> commit 72075137bc79e65be03dac7e97b6dba93c3a86a4 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: standardize more bounds-checking error messages Signed-off-by: Brian Paul <[email protected]> commit 32a3fc23746db49da903fbc08afa0135af3007d2 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: standardize some bounds-checking error messages Signed-off-by: Brian Paul <[email protected]> commit cecbf1f4d164207de373dec0cadee2e84e1f9656 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add more bounds-checking support for client memory buffers Signed-off-by: Brian Paul <[email protected]> commit edc895b52383d5bd274422db56adead1d81daf5f Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add bounds-checking support for client memory buffers Signed-off-by: Brian Paul <[email protected]> commit 3a96ef28a538f158a219b406cd090dee70470c85 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: use is_bufferobj() helper function Signed-off-by: Brian Paul <[email protected]>
* mesa: add glGet for GL_ARB_sampler_objectsBrian Paul2011-04-101-0/+17
|
* mesa: core support for GL_ARB_texture_buffer_objectBrian Paul2011-04-051-0/+36
| | | | No GLSL or driver support yet.
* mesa: implement clamping controls (ARB_color_buffer_float)Marek Olšák2011-03-291-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: More glGet* fixes.José Fonseca2011-03-231-4/+4
| | | | | | glGet(GL_NORMAL_ARRAY) giving potentially wrong results. Most of glGet(GL_XXX_ARRAY_BUFFER_BINDING) giving totally bogus results.
* mesa: Fix typo glGet*v(GL_TEXTURE_COORD_ARRAY_*).José Fonseca2011-03-221-3/+3
|
* mesa: move location of some geometry program limitsBrian Paul2011-03-111-6/+6
| | | | | | | The gl_program_constants struct is for limits that are applicable to any/all shader stages. Move the geometry shader-only fields into the gl_constants struct. Remove redundant MaxGeometryUniformComponents field too.
* mesa: remove GL_SGI_texture_color_table supportBrian Paul2011-02-281-6/+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: EXT_framebuffer_sRGB interface additions.Dave Airlie2011-01-211-0/+5
| | | | | | | | | | | 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: implement glGet queries for GL_ARB_draw_buffers_blendBrian Paul2011-01-151-0/+47
|
* mesa: begin implementation of GL_ARB_draw_buffers_blendBrian Paul2011-01-151-8/+8
|
* mesa: Add getter for GL_SHADER_COMPILER with ARB_ES2_compatibility.Eric Anholt2011-01-141-0/+1
| | | | Fixes piglit arb_es2_compatibility-shadercompiler
* mesa: Add getters for ARB_ES2_compatibility MAX_*_VECTORS.Eric Anholt2011-01-141-0/+9
| | | | Fixes piglit arb_es2_compatibility-maxvectors.
* mesa: don't assert in GetIntegerIndexed, etcBrian Paul2011-01-121-6/+12
| | | | | | We were getting an assertion upon invalid pname. NOTE: This is a candidate for the 7.9 and 7.10 branches.
* mesa: Directly include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-071-0/+1
|
* mesa: make glGet*(GL_NONE) generate GL_INVALID_ENUMBrian Paul2010-12-031-3/+5
| | | | | | | | | In find_value() check if we've hit the 0th/invalid entry before checking if the pname matches. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31987 NOTE: This is a candidate for the 7.9 branch.
* mesa: Add getters for ARB_copy_buffer's attachment points.Eric Anholt2010-12-021-0/+13
| | | | Fixes more complaints by oglconform.
* mesa: Add getters for the rest of the supported draw buffers.Eric Anholt2010-12-021-0/+8
| | | | | MAX_DRAW_BUFFERS is 8, so allow all 8 GL_DRAW_BUFFER# to be retrieved. Fixes complaints by oglconform.
* mesa: Fix glGet of ES2's GL_MAX_*_VECTORS properties.Kenneth Graunke2010-11-241-6/+11
| | | | | | | | | | | | Previously, the get table listed all three as having custom locations, yet find_custom_value did not have cases to handle them. MAX_VARYING_VECTORS does not need a custom location since MaxVaryings is already stored as float[4] (or vec4). MaxUniformComponents is stored as the number of floats, however, so a custom implementation that divides by 4 is necessary. Fixes bugs.freedesktop.org #31495.
* mesa: Allow query of MAX_SAMPLES with EXT_framebuffer_multisampleIan Romanick2010-11-101-2/+2
| | | | | | | | | | | | | Previously queries of MAX_SAMPLES were only allowed with ARB_framebuffer_object, but EXT_framebuffer_multisample also enables this query. This seems to only effect the i915. All other drivers support both extensions or neither extension. This patch is based on a patch that Kenneth sent along with the report. NOTE: this is a candidate for the 7.9 branch. Reported-by: Kenneth Waters <[email protected]>
* mesa: state/queries for GL_MIN/MAX_PROGRAM_TEXEL_OFFSET_EXTBrian Paul2010-10-281-0/+13
|
* mesa: Track an ActiveProgram distinct from CurrentProgramIan Romanick2010-10-271-1/+1
| | | | | ActiveProgram is the GL_EXT_separate_shader_objects state variable used for glUniform calls. glUseProgram also sets this.
* mesa: added glGet query for GL_RGBA_INTEGER_MODE_EXTBrian Paul2010-10-231-0/+11
|
* mesa: set/get primitive restart stateBrian Paul2010-10-211-0/+16
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-16/+16
|
* mesa: Remove EXT_convolution.Eric Anholt2010-09-231-33/+0
| | | | More optional code.