summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove NV_read_buffer extension enable flagMarek Olšák2012-10-311-1/+1
| | | | | | It's been enabled by default, so the flag isn't really useful. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: remove NV_light_max_exponent extension enable flagMarek Olšák2012-10-311-1/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove IBM_rasterpos_clip extension enable flagMarek Olšák2012-10-311-1/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove EXT_compiled_vertex_array extension enable flagMarek Olšák2012-10-311-1/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove ARB_copy_buffer extension enable flagMarek Olšák2012-10-311-1/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: implement ARB_map_buffer_alignmentMarek Olšák2012-10-311-0/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: silence some MSVC conversion warnings in get.cBrian Paul2012-10-291-3/+3
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Remove get and enable bits for NV_fragment_program.Kenneth Graunke2012-10-161-10/+0
| | | | | | | | | Also remove a leftover remnant from NV_vertex_program. v2: Update for Imre's get changes. Reviewed-by: Brian Paul <[email protected]> [v1] Reviewed-by: Eric Anholt <[email protected]> [v1]
* mesa: Remove miscellaneous remains of NV_vertex_program.Eric Anholt2012-10-151-19/+0
| | | | | | v2: Rebase on top of get.c changes. Reviewed-by: Brian Paul <[email protected]> (v1)
* mesa: Prevent CONST macro re-definition.José Fonseca2012-10-101-0/+1
| | | | | | | Should fix MSVC build, as windows.h also defines CONST. CONST usage in get.c is not new, so probably this just appeared now due to changes in the includes.
* mesa: glGet: remove the unused TYPE_API_MASK flagsImre Deak2012-10-101-6/+0
| | | | | | | | | Since we generate the hash tables in build time, these flags aren't used any more, remove them. Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa: glGet: use the build time generated hash tablesImre Deak2012-10-101-1013/+13
| | | | | | Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa: glGet: rename *{_EXT,_ARB} enums missing from the XML specImre Deak2012-10-101-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following enums used to be extensions but later became part of the core specification. The _EXT/_ARB versions of these are not present in in the current XML spec files, only defined in GL/glext.h Later we'll need to look up these in a python script using the XML spec. As a preparation for that remove the _EXT,_ARB suffix from these enums and rename GL_DISTANCE_ATTENUATION_EXT to GL_POINT_DISTANCE_ATTENUATION. Naturally, all enums keep their numerical values. Note that similar renames shouldn't be necessary in the future: in case of a new extension the XML spec is updated with the new _EXT/_ARB etc. name and this name is added to the enum table in get.c. Later the extension may become part of the core spec, at which point the name w/o the _EXT/_ARB suffix is added to the XML spec and the table in get.c remains the same. GL_BLEND_DST_ALPHA_EXT GL_BLEND_DST_RGB_EXT GL_BLEND_SRC_ALPHA_EXT GL_BLEND_SRC_RGB_EXT GL_COLOR_SUM_EXT GL_COMPRESSED_TEXTURE_FORMATS_ARB GL_CURRENT_FOG_COORDINATE_EXT GL_CURRENT_SECONDARY_COLOR_EXT GL_DISTANCE_ATTENUATION_EXT GL_FOG_COORDINATE_ARRAY_EXT GL_FOG_COORDINATE_ARRAY_STRIDE_EXT GL_FOG_COORDINATE_ARRAY_TYPE_EXT GL_FOG_COORDINATE_SOURCE_EXT GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB GL_PACK_IMAGE_HEIGHT_EXT GL_PACK_SKIP_IMAGES_EXT GL_SECONDARY_COLOR_ARRAY_EXT GL_SECONDARY_COLOR_ARRAY_SIZE_EXT GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT GL_SECONDARY_COLOR_ARRAY_TYPE_EXT GL_UNPACK_IMAGE_HEIGHT_EXT GL_UNPACK_SKIP_IMAGES_EXT Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa: glGet: simplify the 'enum not found' conditionImre Deak2012-10-101-3/+5
| | | | | | | | | | | | | | | | | When traversing the hash table looking up an enum that is invalid we eventually reach the first element in the descriptor array. By looking at the type of that element, which is always TYPE_API_MASK, we know that we can stop the search and return error. Since this element is always the first it's enough to check for its index being 0 without looking at its type. Later in this patchset, when we generate the hash tables during build time, this will allow us to remove the TYPE_API_MASK and related flags completly. Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa: glGet: fix parameter lookup for apps using multiple APIsImre Deak2012-10-101-15/+29
| | | | | | | | | | | | | The glGet hash was initialized only once for a single GL API, even if the application later created a context for a different API. This resulted in glGet failing for otherwise valid parameters in a context if that parameter was invalid in another context created earlier. Fix this by using a separate hash table for each API. Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* mesa/es: Define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT enum for all GLsTomeu Vizoso2012-09-161-5/+5
| | | | | | | instead of just for GL and ES1. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Temporarily revert "mesa: remove remaining FEATURE_* defines where protected ↵José Fonseca2012-09-151-0/+2
| | | | | | | | by API check." This reverts commit 9f37b405a3de8668a5f74c9681829688475ac3b7. Fixes windows builds.
* mesa: remove remaining FEATURE_* defines where protected by API check.Oliver McFadden2012-09-151-2/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_ARB_sync define.Oliver McFadden2012-09-151-4/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: glGet: fix API check for EGL_image_external enumsImre Deak2012-09-111-6/+9
| | | | | | | | These enums are valid only in ES1 and ES2. So far they were marked valid incorrectly, depending on the previous API mask in the enum list. Signed-off-by: Imre Deak <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: glGet: fix indentation of print_table_statsImre Deak2012-09-111-9/+9
| | | | | | | No functional change. Signed-off-by: Imre Deak <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: glGet: fix indentation of find_valueImre Deak2012-09-111-4/+4
| | | | | | | No functional change. Signed-off-by: Imre Deak <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: glGet: fix indentation of _mesa_init_get_hashImre Deak2012-09-111-9/+9
| | | | | | | No functional change. Signed-off-by: Imre Deak <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: remove #undef CONST in get.cBrian Paul2012-09-051-2/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa/es: Enable GL_OES_vertex_array_objectIan Romanick2012-08-291-3/+3
| | | | | | | Functionally the same as GL_ARB_vertex_array_object. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Enable GL_{ARB,APPLE}_vertex_array_object in all driversIan Romanick2012-08-291-3/+1
| | | | | | | | This is a purely software extension. The drivers don't need to do any work to support it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Enable a bunch of missing getters on 3.1 core.Eric Anholt2012-08-291-1/+1
| | | | NOTE: maybe I enabled too many?
* mesa: Expose texture buffer objects when the context is GL 3.1 core.Eric Anholt2012-08-291-5/+11
| | | | | | | | | | | v2: Use API_OPENGL_CORE. v3: Only require desktop GL. If a driver can't support TexBOs in a non-core context, it should not enable them. Signed-off-by: Eric Anholt <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Allow PACK / UNPACK queries for ES2Ian Romanick2012-08-291-9/+9
| | | | | | These are part of the GL_EXT_unpack_subimage extension and ES 3.0. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Replace VersionMajor/VersionMinor with a Version field.Eric Anholt2012-08-071-3/+10
| | | | | | | | | | | 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: Make ARB_sampler_objects mandatoryPauli Nieminen2012-08-011-6/+1
| | | | | | | | | | | To allow meta acceleration operations to use sampler objects the ARB_sampler_objects extension needs to be mandatory for all drivers. Because the extension doesn't have any hardware dependencies it is trivial to implement. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add support for using API_OPENGL_COREJordan Justen2012-07-301-4/+7
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: implement glGet queries and error handling for ARB_transform_feedback3Marek Olšák2012-07-121-0/+9
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement glGet(GL_TIMESTAMP) v2Marek Olšák2012-07-101-1/+14
| | | | | | This is adds a new driver function to retrieve the timestamp. Reviewed-by: Eric Anholt <[email protected]>
* mesa: rename MaxTransformFeedbackSeparateAttribs to MaxTransformFeedbackBuffersMarek Olšák2012-06-281-4/+4
| | | | | | | | | | | | This is a cleanup for ARB_transform_feedback3, where GL_MAX_TRANSFORM_FEEDBACK_BUFFERS is introduced for interleaved attribs and has the same meaning as GL_MAX_.._SEPARATE_ATTRIBS for separate attribs. Also, the maximum number of TFB buffers is reduced from 32 to 4, which makes this patch useful even without the extension. I don't know of any hardware which can do more than 4. Reviewed-by: Brian Paul <[email protected]>
* mesa: Add support for glGetIntegeri_v from GL_ARB_uniform_buffer_object.Eric Anholt2012-06-211-0/+24
| | | | | | | Fixes piglit ARB_uniform_buffer_object/getintegeri_v. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for the GL_UNIFORM_BUFFER general binding point.Eric Anholt2012-06-211-0/+6
| | | | | | | Fixes piglit ARB_uniform_buffer_object/buffer-targets. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add state and getters for the GL_ARB_uniform_buffer_object maximums.Eric Anholt2012-06-211-0/+30
| | | | | | | Fixes piglit GL_ARB_uniform_buffer_object/minmax. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gles2: Add GL_NV_read_buffer extensionKristian Høgsberg2012-06-181-1/+21
| | | | | | | This lets us select the front buffer for reading under GLES2. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* get.c: Rename EXTRA_VERSION_ES2 to EXTRA_API_ES2Kristian Høgsberg2012-06-181-5/+5
| | | | | | | | This extra condition checks the API not the version of the API, so rename to reflect that. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add support for ARB_blend_func_extended (v4)Dave Airlie2012-04-131-0/+3
| | | | | | | | | | | | | | | | | | | | Add implementations of the two API functions, Add a new strings to uint mapping for index bindings Add the blending mode validation for SRC1 + SRC_ALPHA_SATURATE Add get for MAX_DUAL_SOURCE_DRAW_BUFFERS v2: Add check in valid_to_render to address case in spec ERRORS. v3: Add index to ir.h so this patch compiles on its own fixup comment v4: fixup Brian's comments The GLSL patch will setup the indices. Signed-off-by: Dave Airlie <[email protected]>
* 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]>