summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: silence MinGW 'may be unused uninitialized' warning in get.cBrian Paul2018-01-261-1/+1
| | | | | | | | The warning happens on line 2114 for the memcpy(data, p, size) call. I'm not sure why that generates the warning but not the earlier use of p in the code. Reviewed-by: Neha Bhende <[email protected]>
* mesa: GL_EXT_disjoint_timer_query extension API bitsTapani Pälli2017-12-151-0/+17
| | | | | | | | | | | Patch adds GL_GPU_DISJOINT_EXT and enables to use timer queries when EXT_disjoint_timer_query is enabled. v2: enable extension only when EXT_disjoint_timer_query set Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> (v1) Reviewed-by: Ian Romanick <[email protected]>
* main: Support 1 Mesa format with get for GL_PROGRAM_BINARY_FORMATSJordan Justen2017-12-081-0/+9
| | | | | | | | | Mesa supports either 0 or 1 formats. If 1 format is supported, it is GL_PROGRAM_BINARY_FORMAT_MESA as defined in the GL_MESA_program_binary_formats extension spec. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: enable ARB_texture_buffer_* extensions in the Compatibility profileMarek Olšák2017-11-091-2/+0
| | | | | | | | | | | | | | We already have piglit tests testing alpha, luminance, and intensity formats. They were skipped by piglit until now. Additionally, I'm enabling one ARB_texture_buffer_range piglit test to run with the compat profile. i965 behavior is unchanged except that it doesn't expose TBOs in the Compat profile. Not sure how that affects the GL version override. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/bufferobj: fix atomic offset/size getDave Airlie2017-10-131-2/+4
| | | | | | | | | | | When I realigned the bufferobj code, I didn't see the getters were different, realign the getters to work the same as ssbo. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103214 Fixes: 65d3ef7cd (mesa: align atomic buffer handling code with ubo/ssbo (v1.1)) Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Mark Janes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Implement GL_ARB_polygon_offset_clampAdam Jackson2017-08-251-1/+1
| | | | | | | | | | | Semantically identical to the EXT version (whose string is still valid for GLES), so rename the bit but expose both extension strings. (Suggested by Ilia Mirkin and Ian Romanick.) v3: Fix the entrypoint alias in GL4x.xml (Ilia) Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: only expose EXT_memory_object functions if the ext is supportedSamuel Pitoiset2017-08-221-0/+10
| | | | | | | | | They should not be exposed when the extension is unsupported. Note that ARB_direct_state_access is always exposed and EXT_semaphore is not supported at all. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: hook up UUID queries for driver and deviceAndres Rodriguez2017-08-061-0/+17
| | | | | | | | | v2: respective changes for new gallium interface v3: fix UUID size asserts Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: implement glGetUnsignedByte{v|i_v}Andres Rodriguez2017-08-061-0/+174
| | | | | | | | | | | | | | These are used by EXT_external_objects to present UUIDs for the device and the driver. v2 (Timothy Arceri): - remove extra break - use _mesa_problem() rather the _mesa_error() for unimplemented support for value types Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mapi: add EXT_external_objects and EXT_external_objects_fdAndres Rodriguez2017-08-061-0/+12
| | | | | | | | Includes implementation stubs. Signed-off-by: Andres Rodriguez <[email protected]> Acked-by: Timothy Arceri <[email protected]> Acked-by: Samuel Pitoiset <[email protected]>
* mesa: check API profile for GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTIONBrian Paul2017-07-191-1/+1
| | | | | | | | If we have a compat profile context, it means that GL_QUADS[_STRIP] are supported so this query makes sense. It's also legal for 3.2 core profile because of a spec bug. Reviewed-by: Ian Romanick <[email protected]>
* mesa: whitespace fixes in get.cBrian Paul2017-07-181-110/+110
| | | | | | Remove trailing whitespace. Replace tabs with spaces. Trivial.
* mesa: fix GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT queryBrian Paul2017-07-181-0/+12
| | | | | | | | This query is not allowed in GL core profile 3.3 and later (since GL_QUADS and GL_QUAD_STRIP are disallowed). The query was (mistakenly) supported in GL 3.2. This fixes the glGet error test accordingly. Reviewed-by: Neha Bhende<[email protected]>
* mesa: GL_ARB_shader_subroutine is not optional in core profileIan Romanick2017-05-221-1/+0
| | | | | | | | | | | text data bss dec hex filename 7038459 235248 37280 7310987 6f8e8b 32-bit i965_dri.so before 7038227 235248 37280 7310755 6f8da3 32-bit i965_dri.so after 6681438 303400 50608 7035446 6b5a36 64-bit i965_dri.so before 6681254 303400 50608 7035262 6b597e 64-bit i965_dri.so after Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: implement SPARSE_BUFFER_PAGE_SIZE_ARBNicolai Hähnle2017-04-051-0/+1
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* main/framebuffer: refactor _mesa_get_color_read_format/typeAlejandro Piñeiro2017-02-061-2/+2
| | | | | | | | | | | | | | | | | | Current implementation returns the value for the currently bound read framebuffer. GetNamedFramebufferParameteriv allows to get it for any given framebuffer. GetFramebufferParameteriv would be also interested on that method It was refactored by allowing to pass a given framebuffer. If NULL is passed, it used the currently bound framebuffer. It also adds a call to _mesa_update_state. When used only by GetIntegerv, this one was called as part of the extra checks defined at get_hash. But now that the method is used by more methods, and the update is needed, it makes sense (and it is safer) just calling it on the method itself, instead of rely on the caller. Reviewed-by: Anuj Phogat <[email protected]>
* mesa/get: Remove unused extra_ARB_viewport_arrayBoyan Ding2017-01-131-1/+0
| | | | | | | | Unused since 0a7691ee (mesa: Enable enums for OES_viewport_array). Silence a warning of unused variable. Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa/get: Add TYPE_UINT for casting through a GLuint.Kenneth Graunke2016-12-191-0/+80
| | | | | | | | | | | | | | | | | The "State Tables" section of the OpenGL specification lists many values as belonging to Z+ (non-negative integers), not Z (all integers). For ordinary glGetInteger queries, this doesn't matter. However, when accessing Z+ values via glGetFloat or glGetInteger64, we need to treat the source value as an unsigned value. Otherwise, we'll produce a negative number when bit 31 is set. This commit merely adds the plumbing. It doesn't convert any values. v2: Gotta catch 'em all (add missing cases caught by Ilia) Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa/get: Make GetFloat/GetDouble of TYPE_INT_N not normalize things.Kenneth Graunke2016-12-191-3/+3
| | | | | | | | | | | | | | | | | GetFloat of integer valued things is supposed to perform a simple int -> float conversion. INT_TO_FLOAT is not that. Instead, it converts [-2147483648, 2147483647] to a normalized [-1.0, 1.0] float. This is only used for COMPRESSED_TEXTURE_FORMATS, which nobody in their right mind would try and access via glGetFloat(), but we may as well fix it. Found by inspection. v2: Gotta catch 'em all (fix another case of this caught by Ilia) Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* main: add INTEL_conservative_rasterization enum query supportLionel Landwerlin2016-12-131-0/+5
| | | | | | | v2: add extra parameter (Ilia) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: rename gl_vertex_array_object::VertexBinding to BufferBindingBrian Paul2016-10-281-6/+6
| | | | | | To be a little more understandable. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: add missing CONTEXT_ROBUST_ACCESS enumTapani Pälli2016-10-271-0/+1
| | | | | | | | commit 85008db1d51f923113832394d7f8d6b1868be882 missed this enum for GL_KHR_robustness implementation Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mesa: rename gl_vertex_attrib_array gl_array_attributesBrian Paul2016-10-131-1/+1
| | | | | | | The structure contains the attributes of a vertex array. The old name was kind of confusing. Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: replace gl_framebuffer::_IntegerColor wih _IntegerBuffersBrian Paul2016-10-131-0/+4
| | | | | | | | | | | Use a bitmask to indicate which color buffers are integer-valued, rather than a bool. Also, the old field was mis-computed. If an integer buffer was followed by a non-integer buffer, the _IntegerColor field was wrongly set to false. This fixes the new piglit gl-3.1-mixed-int-float-fbo test. Reviewed-by: Marek Olšák <[email protected]>
* mesa/main: add support for ARB_compute_variable_groups_sizeSamuel Pitoiset2016-10-071-0/+10
| | | | | | | | | | | | | v5: - replace fixed_local_size by !LocalSizeVariable (Nicolai) v4: - slightly indent spec quotes (Nicolai) - drop useless _mesa_has_compute_shaders() check (Nicolai) - move the fixed local size outside of the loop (Nicolai) - add missing check for invalid use of work group count v2: - update formatting spec quotations (Ian) - move the total_invocations check outside of the loop (Ian) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: Enable enums for OES_viewport_arrayAnuj Phogat2016-10-041-0/+6
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: Expose RESET_NOTIFICATION_STRATEGY with KHR_robustness.Kenneth Graunke2016-09-151-0/+7
| | | | | | | | | | | | | | | This is supposed to be exposed with the GL_KHR_robustness extension, which we support on ES 2.0 and later. On desktop GL, it's also exposed by GL_ARB_robustness, which is supported by all drivers ("dummy_true"). so we also allow desktop GL. Fixes: - ES32-CTS.robust.robustness.noResetNotification - ES32-CTS.robust.robustness.loseContextOnReset Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: add a GLES3.2 enums section, and expose new MS line width paramsIlia Mirkin2016-09-131-6/+20
| | | | | | | | | | | | | | This also exposes them for ARB_ES3_2_compatibility. While both specs refer to the new MS line width parameters being separate from the existing AA line widths, reality begs to differ. It's the same on all hardware currently supported by mesa. Should hardware come along that wants these to be different, they're easy enough to separate out. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add support for GL_PRIMITIVE_BOUNDING_BOX storage and queryIlia Mirkin2016-08-301-0/+28
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* main: add missing EXTRA_END in OES_sample_variables get checkIlia Mirkin2016-08-281-0/+1
| | | | | | | Fixes: 3002296cb68 (mesa: add GL_OES_shader_multisample_interpolation support) Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: <[email protected]>
* mesa: Add support for OES_texture_cube_map_arrayIan Romanick2016-08-261-2/+2
| | | | | | | | | | | This has a separate enable flag because this extension also requires OES_geometry_shader. It is possible that some drivers may support OpenGL ES 3.1 and ARB_texture_cube_map but not support OES_geometry_shader. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Use _mesa_has_ARB_texture_cube_map_array instead of open-coding itIan Romanick2016-08-261-1/+1
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Implement GL_KHR_blend_equation_advanced_coherent.Kenneth Graunke2016-08-251-0/+1
| | | | | | | | | This adds the extension enable (so drivers can advertise it) and the extra boolean state flag, GL_BLEND_ADVANCED_COHERENT_KHR, which can be set to request coherent blending. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* mesa: Add support for querying GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT.Francisco Jerez2016-08-241-0/+7
| | | | | | | | | | | This can currently only give true as result since the only way you can expose EXT_shader_framebuffer_fetch right now is by flipping the MESA_shader_framebuffer_fetch bit, but that could potentially change in the future, see [1] for an explanation. [1] https://lists.freedesktop.org/archives/mesa-dev/2016-July/124028.html Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add GL_EXT_window_rectangles state storage/retrieval functionalityIlia Mirkin2016-06-181-0/+12
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove _mesa_init_get_hash()Emil Velikov2016-06-131-65/+0
| | | | | | | | | | | | | | The actual code of the function print_table_stats() is guarded by a ifdef GET_DEBUG, which was not been defined in years. The last fix in 2013 (7db6b5aa91a) indicates that it's rarely used/tested. Since the issue has gone unnoticed for a whole year (broken with 2ad4a475474). Let's remove it for now. We can always revive it at a later stage. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/get: drop unused extension checks.Dave Airlie2016-05-281-3/+0
| | | | | | | These all show up as unused warnings here, so drop them for now. Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa/main: Add support for GL_ARB_cull_distance (v2)Tobias Klausmann2016-05-141-0/+1
| | | | | | | | | | | | airlied: v2: rename LowerClipDistance to LowerCombinedClipCullDistnace. I don't think we want any other behaviour with any current hw. Signed-off-by: Tobias Klausmann <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add GL_OES_shader_multisample_interpolation supportIlia Mirkin2016-03-301-0/+5
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* 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 <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* 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: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* 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]>