summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove _ARB suffix from cube map enumsBrian Paul2016-02-121-1/+1
| | | | | | | Just minor clean-up so we're consistent everywhere. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: move GL_ARB_debug_output code into new debug_output.c fileBrian Paul2016-02-081-0/+1
| | | | | | | | The errors.c file had grown quite large so split off this extension code into its own file. This involved making a handful of functions non-static. Acked-by: Timothy Arceri <[email protected]>
* mesa/get: fix a breakage after rebaseMarek Olšák2016-02-051-0/+1
| | | | trivial.
* mesa: implement GL_ATI_meminfo (v2)Marek Olšák2016-02-051-1/+25
| | | | | | | v2: rebase Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* mesa: implement GL_NVX_gpu_memory_info (v2)Marek Olšák2016-02-051-0/+24
| | | | | | | | v2: implement eviction queries properly add gl_memory_info structure Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* main: Use _mesa_geometric_samples to calculate GL_SAMPLE_BUFFERSNeil Roberts2016-02-051-0/+3
| | | | | | | Otherwise it won't take into account the default samples for framebuffers with no attachments. Reviewed-by: Ilia Mirkin <[email protected]>
* main: Use _mesa_geometric_samples to calculate the value of GL_SAMPLESNeil Roberts2016-02-051-0/+4
| | | | | | | Otherwise it won't take into account the default samples for framebuffers with no attachments. Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: Handle QUERY_BUFFER_BINDING in GetIntegervRafal Mielniczuk2016-02-041-0/+5
| | | | | | | Signed-off-by: Rafal Mielniczuk <[email protected]> [imirkin: move to GL/GL_CORE section] Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: enable enums for OES_geometry_shaderMarta Lofstedt2016-02-011-15/+67
| | | | | | | | | | | | | Enable GL_OES_geometry_shader enums for OpenGL ES 3.1. V4: EXTRA tokens updated according to comments from Ilia Mirkin. V5: Account for check_extra does not evaluate "or" lazy. Fix issues with EXTRA_EXT_FB_NO_ATTACH_CS. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* Revert "mesa: enable enums for OES_geometry_shader"Marek Olšák2016-01-241-55/+9
| | | | | | | This reverts commit 67e30987031d189d606125d4b712a575f619ab44. It breaks a bunch of geometry shader tests, such as "spec@!opengl 3.2@minmax" and others depending on the glGet queries.
* mesa: enable enums for OES_geometry_shaderMarta Lofstedt2016-01-221-9/+55
| | | | | | | | | | Enable GL_OES_geometry_shader enums for OpenGL ES 3.1. V4: EXTRA tokens updated according to comments from Ilia Mirkin. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: add parameter buffer, used for ARB_indirect_parametersIlia Mirkin2016-01-071-0/+5
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: remove ARB_geometry_shader4Marta Lofstedt2015-11-261-7/+0
| | | | | | | | | | No drivers currently implement ARB_geometry_shader4, nor are there any plans to implement it. We only support the version of geometry shaders that was incorporated into OpenGL 3.2 / GLSL 1.50. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add getters for the GL_ARB_shader_storage_buffer_object max constantsSamuel Iglesias Gonsalvez2015-09-251-0/+7
| | | | | | | | | | | | | | | v2: - Add tessellation shader constants support v3: - Add GLES 3.1 support. v4: - Move the getters to the proper place Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* glsl: fix UNIFORM_BUFFER_START or UNIFORM_BUFFER_SIZE query when no buffer ↵Samuel Iglesias Gonsalvez2015-09-251-2/+4
| | | | | | | | | | | | | | object is bound According to ARB_uniform_buffer_object spec: "If the parameter (starting offset or size) was not specified when the buffer object was bound (e.g. if bound with BindBufferBase), or if no buffer object is bound to <index>, zero is returned." Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* mesa: Add queries for GL_SHADER_STORAGE_BUFFERIago Toral Quiroga2015-09-251-0/+31
| | | | | | | | These handle querying the buffer name attached to a giving binding point as well as the start offset and size of that buffer. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* mesa/cs: Support GL_DISPATCH_INDIRECT_BUFFERJordan Justen2015-09-241-0/+4
| | | | | | | | v2: * Use _mesa_has_compute_shaders (Ilia) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* mesa/es3.1: Allow query of Vertex bindings for GLES 3.1Marta Lofstedt2015-09-221-3/+4
| | | | Signed-off-by: Marta Lofstedt <[email protected]>
* mesa: Allow query of GL_VERTEX_BINDING_BUFFERMarta Lofstedt2015-09-091-0/+8
| | | | | | | | | | According to OpenGL ES 3.1 specification table : 20.2 and OpenGL specification 4.4 table 23.4. The glGetIntegeri_v functions should report the name of the buffer bound when called with GL_VERTEX_BINDING_BUFFER. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: return old name for deleted samplers for SAMPLER_BINDING queriesDaniel Scharrer2015-08-281-10/+1
| | | | | | | | | | | | | If the sampler object has been deleted in the same context the binding will have been cleared. If it has been deleted in another context, the spec does not say what should returned. None of the other binding point queries check for deletion in another context. Also, as names of deleted objects are free for reuse, the current code didn't even work reliably. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* mesa: add missing queries for ARB_direct_state_accessDaniel Scharrer2015-08-281-0/+86
| | | | | | | | | | | This adds index queries (glGet*i_v) for GL_TEXTURE_BINDING_* and GL_SAMPLER_BINDING, as well as textue queries (glGetTex{,ture}Parameter*) for GL_TEXTURE_TARGET. CC: "10.6 11.0" <[email protected]> Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* mesa: remove pointless es31 checks, fix indirect to only be in es31Ilia Mirkin2015-08-261-36/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa/es3.1: Enable getting MAX_COMPUTE_WORK_GROUP_ values for OpenGL ES 3.1Marta Lofstedt2015-08-261-2/+2
| | | | | | | | | According to the OpenGL ES 3.1 specification chapter 17, the MAX_COMPUTE_WORK_GROUP_COUNT and MAX_COMPUTE_WORK_GROUP_SIZE is available for glGetIntegeri_v. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: Avoid double promotion.Matt Turner2015-07-291-1/+1
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa/es3.1: enable GL_ARB_explicit_uniform_location for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* mesa/es3.1: enable GL_ARB_compute_shader for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* mesa/es3.1: enable GL_ARB_texture_gather for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | | Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa/es3.1: enable GL_ARB_texture_multisample for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | | Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa/es3.1: enable GL_ARB_shader_atomic_counters for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* mesa/es3.1: enable GL_ARB_shader_image_load_store for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | | Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa/es3.1: Add ES 3.1 handling to get.c and get_hash_generator.pyMarta Lofstedt2015-07-291-1/+4
| | | | | Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* mesa: Add glGet support for ARB_shader_subroutine implementation limitsChris Forbes2015-07-231-0/+1
| | | | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add tessellation shader getters (v3)Fabian Bieler2015-07-231-0/+23
| | | | | | | | Tessellation dependencies added by Marek. v2: require tessellation in addition to atomics/images for some glGet queries Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Rename _mesa_lookup_enum_by_nr() to _mesa_enum_to_string().Kenneth Graunke2015-07-201-4/+4
| | | | | | | Generated by sed; no manual changes. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Constants and functions for ARB_framebuffer_no_attachmentsKevin Rogovin2015-06-171-0/+1
| | | | | | | | Define the enumeration constants, function entry points and glGet for the GL_ARB_framebuffer_no_attachments. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Kevin Rogovin <[email protected]>
* mesa/es3.1: enable DRAW_INDIRECT_BUFFER_BINDING for gles3.1Tapani Pälli2015-06-111-0/+12
| | | | | | | | | | (increases ES31-CTS.draw_indirect.basic.* passing tests) v2: only expose DRAW_INDIRECT_BUFFER_BINDING for GL core + ES3.1 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* main: Refactor _mesa_[update|get]_clamp_fragment_color.Laura Ekstrand2015-05-141-4/+4
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: glGetIntegeri_v fails for GL_VERTEX_BINDING_STRIDEMarta Lofstedt2015-05-111-0/+1
| | | | | | | | | | The return type for GL_VERTEX_BINDING_STRIDE is missing, this cause glGetIntegeri_v to fail. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Cc: "10.4 10.5" <[email protected]>
* mesa/main: replace Elements() with ARRAY_SIZE()Brian Paul2015-03-021-7/+7
| | | | | | | | We've been using a mix of these two macros for a while now. Let's just use the later everywhere. It seems to be the convention used by other open-source projects. Acked-by: Ilia Mirkin <[email protected]>
* mesa: Use assert() instead of ASSERT wrapper.Matt Turner2015-02-231-1/+1
| | | | Acked-by: Eric Anholt <[email protected]>
* mesa: add support for GL_EXT_polygon_offset_clampIlia Mirkin2015-02-021-0/+1
| | | | | | | | | | Nothing enables the extension yet, but the values are now available. The spec calls for it to only be exposed for GL 3.3+, which is core-only in mesa. Instead we allow any driver to enable it, including in a compat context for any GL version. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Glenn Kennard <[email protected]>
* mesa: Implement ARB_clip_control.Mathias Fröhlich2014-10-241-0/+1
| | | | | | | | | | | | | | | Implement the mesa parts of ARB_clip_control. So far no driver enables this. v3: Restrict getting clip control state to the availability of ARB_clip_control. Move to transformation state. Handle clip control state with the GL_TRANSFORM_BIT. Move _FrontBit update into state.c. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: Remove unused extra_EXT_texture_integer.Matt Turner2014-06-171-5/+0
| | | | | | | | Unused since commit b6475f94. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add new enum MAX_UNIFORM_LOCATIONSTapani Pälli2014-06-161-0/+1
| | | | | | | | | | | | | Patch adds new implementation dependent value required by the GL_ARB_explicit_uniform_location extension. Default value for user assignable locations is calculated as sum of MaxUniformComponents for each stage. v2: fix descriptor in get_hash_params.py (Petri) v3: simpler formula for calculating initial value (Ian) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/main: Prevent sefgault on glGetIntegerv(GL_ATOMIC_COUNTER_BUFFER_BINDING).José Fonseca2014-06-081-1/+5
| | | | | | | | | | | A recent ApiTrace change, that tries to dump more buffer state causes Mesa from my distro (10.1.4) to segfaults here. I haven't actually confirm this fixes it (I can't repro on master), but it seems a good idea to be defensive here anyway. Cc: "10.1 10.2" <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Make glGetIntegerv(GL_*_ARRAY_SIZE) return GL_BGRA.José Fonseca2014-06-031-0/+10
| | | | | | | | | | | | | | | | | | | | | Same as b026b6bbfe3f15c8a7296ac107dc3d31f74e401e, but COLOR_ARRAY_SIZE/SECONDARY_COLOR_ARRAY_SIZE. Ideally we wouldn't munge the incoming state, so that we wouldn't need to unmunge it back on glGet*. But the array size state is copied and referred in many places, many of which couldn't take an GLenum like GL_BGRA instead of a plain integer. So just hack around on glGet*, to ensure there is no risk of introducing regressions elsewhere. This bug causes problems to Apitrace, resulting in wrong traces. See https://github.com/apitrace/apitrace/issues/261 for details. Tested with piglit arb_vertex_array_bgra-get, which was created for this purpose. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: "10.1 10.2" <[email protected]>
* mesa: Add core support for the GL_INTEL_performance_query extension.Petri Latvala2014-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | Like AMD_performance_monitor, this extension provides an interface for applications (and OpenGL-based tools) to access GPU performance counters. Since the exact performance counters available vary between vendors and hardware generations, the extension provides an API the application can use to get the names, types, and minimum/maximum values of all available counters. Applications create performance queries based on available query types, and begin/end measurement collection. Multiple queries can be measuring simultaneously. v2: Whitespace changes v3: src/mapi/glapi/gen/gl_API.xml: Also expose the functions to GLES2. v4: Whitespace changes, static_dispatch="false" for all functions, fix dispatch_sanity test for GLES2 functions Signed-off-by: Petri Latvala <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/sso: Enable GL_ARB_separate_shader_objects by defaultIan Romanick2014-05-021-1/+0
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: use accessors for struct gl_debug_stateChia-I Wu2014-04-271-15/+1
| | | | | | | | | | | | | | | | When GL_DEBUG_OUTPUT_SYNCHRONOUS is GL_TRUE, drivers are allowed to log debug messages from other threads. That requires gl_debug_state to be protected by a mutex, even when it is a context state. While we do not spawn threads in Mesa yet, this commit makes it easier to do when we want to. Since the definition of struct gl_debug_state is no longer needed by the rest of the driver, move it to main/errors.c. This should make it even harder to use the struct incorrectly. v2: add comments for the accessors Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/sso: Implement GL_PROGRAM_PIPELINE_BINDING for glGetGregory Hainaut2014-03-251-0/+9
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>