summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add GL_OES_shader_multisample_interpolation supportIlia Mirkin2016-03-301-0/+5
| | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: add OES_texture_buffer and EXT_texture_buffer supportIlia Mirkin2016-03-281-2/+2
| | | | | | | | Allow ES 3.1 contexts to access the texture buffer functionality. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* get: reconcile aliasing enums for MaxCombinedShaderOutputResourcesNicolai Hähnle2016-03-141-0/+7
| | | | | | | | | | | The enums MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS and MAX_COMBINED_SHADER_OUTPUT_RESOURCES are equal and should therefore only appear once. Noticed while implementing ARB_shader_image_load_store without previously implementing SSBO. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Make glGetInteger64v convert float/doubles to 32-bit integers.Kenneth Graunke2016-03-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | According to the GL 4.4 core specification, section 2.2.2 ("Data Conversions For State Query Commands"): "If a command returning integer data is called, such as GetIntegerv or GetInteger64v, a boolean value of TRUE or FALSE is interpreted as one or zero, respectively. A floating-point value is rounded to the nearest integer, unless the value is an RGBA color component, a DepthRange value, or a depth buffer clear value. In these cases, the query command converts the floating-point value to an integer according to the INT entry of table 18.2; a value not in [−1, 1] converts to an undefined value." The INT entry of table 18.2 shows that b = 32, meaning the expectation is to convert it to a 32-bit integer value. Fixes: dEQP-GLES3.functional.state_query.floats.blend_color_getinteger64 dEQP-GLES3.functional.state_query.floats.color_clear_value_getinteger64 dEQP-GLES3.functional.state_query.floats.depth_clear_value_getinteger64 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94456 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Dave Airlie <airlied@redhat.com>
* mesa: Allow Get*() of several forgotten IsEnabled() pnames.Kenneth Graunke2016-03-031-0/+2
| | | | | | | | | | | | | | | | | | | | From section 6.2 ("State Tables") of the GL 2.1 specification (the text also appears in the GL 3.0 and ES 3.1 specifications): "However, state variables for which IsEnabled is listed as the query command can also be obtained using GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev." GL_DEBUG_OUTPUT, GL_DEBUG_OUTPUT_SYNCHRONOUS, and GL_FRAGMENT_SHADER_ATI were missing from the glGet*() functions. All other IsEnabled() pnames look to be present, as far as I can tell. Fixes 8 dEQP-GLES31.functional.debug.state_query subtests: debug_output[_synchronous]_get{boolean,float,integer,integer64}. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* 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 <sroland@vmware.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
* 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 <timothy.arceri@collabora.com>
* 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 <imirkin@alum.mit.edu> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* 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 <imirkin@alum.mit.edu> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* 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 <imirkin@alum.mit.edu>
* 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 <imirkin@alum.mit.edu>
* mesa: Handle QUERY_BUFFER_BINDING in GetIntegervRafal Mielniczuk2016-02-041-0/+5
| | | | | | | Signed-off-by: Rafal Mielniczuk <rafal.mielniczuk2@gmail.com> [imirkin: move to GL/GL_CORE section] Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* 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 <marta.lofstedt@linux.intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* 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 <marta.lofstedt@linux.intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* mesa: add parameter buffer, used for ARB_indirect_parametersIlia Mirkin2016-01-071-0/+5
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* 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 <marta.lofstedt@linux.intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* 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 <siglesias@igalia.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* 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 <siglesias@igalia.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* 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 <tapani.palli@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* mesa/cs: Support GL_DISPATCH_INDIRECT_BUFFERJordan Justen2015-09-241-0/+4
| | | | | | | | v2: * Use _mesa_has_compute_shaders (Ilia) Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* mesa/es3.1: Allow query of Vertex bindings for GLES 3.1Marta Lofstedt2015-09-221-3/+4
| | | | Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com>
* 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 <marta.lofstedt@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* 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 <fredrik@kde.org> Signed-off-by: Fredrik Höglund <fredrik@kde.org>
* 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" <mesa-stable@lists.freedesktop.org> Reviewed-by: Fredrik Höglund <fredrik@kde.org> Signed-off-by: Fredrik Höglund <fredrik@kde.org>
* mesa: remove pointless es31 checks, fix indirect to only be in es31Ilia Mirkin2015-08-261-36/+1
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* 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 <marta.lofstedt@linux.intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* mesa: Avoid double promotion.Matt Turner2015-07-291-1/+1
| | | | Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
* mesa/es3.1: enable GL_ARB_explicit_uniform_location for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
* mesa/es3.1: enable GL_ARB_compute_shader for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
* mesa/es3.1: enable GL_ARB_texture_gather for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | | Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* mesa/es3.1: enable GL_ARB_texture_multisample for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | | Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* mesa/es3.1: enable GL_ARB_shader_atomic_counters for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
* mesa/es3.1: enable GL_ARB_shader_image_load_store for GLES 3.1Marta Lofstedt2015-07-291-0/+6
| | | | | | Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* 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 <marta.lofstedt@linux.intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
* mesa: Add glGet support for ARB_shader_subroutine implementation limitsChris Forbes2015-07-231-0/+1
| | | | | | | Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Signed-off-by: Dave Airlie <airlied@redhat.com>
* 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 <kenneth@whitecape.org>
* 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 <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <ian.d.romanick@intel.com> Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
* 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 <tapani.palli@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* main: Refactor _mesa_[update|get]_clamp_fragment_color.Laura Ekstrand2015-05-141-4/+4
| | | | | Reviewed-by: Fredrik Höglund <fredrik@kde.org> Signed-off-by: Fredrik Höglund <fredrik@kde.org>
* 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 <marta.lofstedt@linux.intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
* 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 <imirkin@alum.mit.edu>
* mesa: Use assert() instead of ASSERT wrapper.Matt Turner2015-02-231-1/+1
| | | | Acked-by: Eric Anholt <eric@anholt.net>
* 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 <imirkin@alum.mit.edu> Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
* 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 <brianp@vmware.com> Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
* mesa: Remove unused extra_EXT_texture_integer.Matt Turner2014-06-171-5/+0
| | | | | | | | Unused since commit b6475f94. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* 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 <tapani.palli@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* 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" <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>