summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add support for memory object parametersAndres Rodriguez2017-08-062-1/+53
| | | | | | | | | | | | V2 (Timothy Arceri): - fix copy and paste error with error message V3 (Timothy Arceri): - drop the Protected field for now as its unused Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add support for memory object creation/import/deleteAndres Rodriguez2017-08-065-2/+229
| | | | | | | | | | | | | | | | | | | | | | Used by EXT_external_objects and EXT_external_objects_fd V2 (Timothy Arceri): - Throw GL_OUT_OF_MEMORY error if CreateMemoryObjectsEXT() fails. - C99 tidy ups - remove void cast (Constantine Kharlamov) V3 (Timothy Arceri): - rename mo -> memObj - check that the object is not NULL before initializing - add missing "EXT" in function error message V4 (Timothy Arceri): - remove checks for (memory objecy id == 0) and catch in _mesa_lookup_memory_object() instead. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mapi: add EXT_external_objects and EXT_external_objects_fdAndres Rodriguez2017-08-067-1/+550
| | | | | | | | Includes implementation stubs. Signed-off-by: Andres Rodriguez <[email protected]> Acked-by: Timothy Arceri <[email protected]> Acked-by: Samuel Pitoiset <[email protected]>
* st/mesa: fix handling of NumSamples=1 (v2)Brian Paul2017-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Mesa we use the convention that if gl_renderbuffer::NumSamples or gl_texture_image::NumSamples is zero, it's a non-MSAA surface. Otherwise, it's an MSAA surface. But in gallium nr_samples=1 is a non-MSAA surface. Before, if the user called glRenderbufferStorageMultisample() or glTexImage2DMultisample() with samples=1 we skipped the search for the next higher number of supported samples and asked the gallium driver to create a surface with nr_samples=1. So we got a non-MSAA surface. This failed to meet the expection of the user making those calls. This patch changes the sample count checks in st_AllocTextureStorage() and st_renderbuffer_alloc_storage() to test for samples > 0 instead of > 1. And we now start querying for MSAA support at samples=2 since gallium has no concept of a 1x MSAA surface. A specific example of this problem is the Piglit arb_framebuffer_srgb-blit test. It calls glRenderbufferStorageMultisample() with samples=1 to request an MSAA renderbuffer with the minimum supported number of MSAA samples. Instead of creating a 4x or 8x, etc. MSAA surface, we wound up creating a non-MSAA surface. Finally, add a comment on the gl_renderbuffer::NumSamples field. There is one piglit regression with the VMware driver: ext_framebuffer_multisample-blit-mismatched-formats fails because now we're actually creating 4x MSAA surfaces (the requested sample count is 1) and we're hitting some sort of bug in the blitter code. That will have to be fixed separately. Other drivers may find regressions too now that MSAA surfaces are really being created. v2: start quering for MSAA support with samples=2 instead of 1. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: init more msaa fieldsBrian Paul2017-08-031-0/+2
| | | | | | | | | | | The default values for GL_SAMPLE_SHADING and GL_MIN_SAMPLE_SHADING_VALUE are missing from the state tables in the GL spec, but they're supposed to be GL_FALSE and 0.0, per the GL_ARB_sample_shading spec. Add code for that, just to be explicit. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: only check errors when the state change in glLogicOp()Samuel Pitoiset2017-08-031-27/+29
| | | | | | | When this GL call is a no-op, it should be a little faster. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: only check errors when the state change in glBlendEquationSeparateiARB()Samuel Pitoiset2017-08-031-20/+22
| | | | | | | When this GL call is a no-op, it should be a little faster. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add GLSL 4.60 to shading_language_version()Samuel Pitoiset2017-08-021-0/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add always-false enable for GL 4.6Samuel Pitoiset2017-08-021-2/+18
| | | | | | | I believe this should be enough for now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add KHR_no_error support to glPolygonMode()Samuel Pitoiset2017-08-022-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add polygon_mode() helperSamuel Pitoiset2017-08-021-19/+28
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glClearBufferiv()Samuel Pitoiset2017-08-022-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add clear_bufferiv() helperSamuel Pitoiset2017-08-021-14/+23
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glClearBufferuiv()Samuel Pitoiset2017-08-022-0/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add clear_bufferuiv() helperSamuel Pitoiset2017-08-021-13/+22
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glClearBufferfi()Samuel Pitoiset2017-08-022-0/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add clear_bufferi() helperSamuel Pitoiset2017-08-021-20/+30
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glClearBufferfv()Samuel Pitoiset2017-08-022-0/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add clear_bufferfv() helperSamuel Pitoiset2017-08-021-14/+23
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glClear*Buffer*Data()Samuel Pitoiset2017-08-022-0/+94
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add clear_buffer_sub_data_error() helperSamuel Pitoiset2017-08-021-17/+35
| | | | | | | And make clear_buffer_sub_data() always inline. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: make get_texbuffer_format() globalSamuel Pitoiset2017-08-022-3/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glLinkProgram()Samuel Pitoiset2017-08-022-0/+21
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add link_program() and link_program_error() helpersSamuel Pitoiset2017-08-021-13/+33
| | | | | | | And call link_program_error() from _mesa_link_program(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glShaderSource()Samuel Pitoiset2017-08-022-0/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add shader_source() helperSamuel Pitoiset2017-08-021-11/+23
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: rename shader_source() to set_shader_source()Samuel Pitoiset2017-08-021-2/+2
| | | | | | | | There is already get_shader_source(), and shader_source() will be used for adding KHR_no_error support. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glEndConditionalRender()Samuel Pitoiset2017-08-022-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add end_conditional_render() renderSamuel Pitoiset2017-08-021-7/+14
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glBeginConditionalRender()Samuel Pitoiset2017-08-022-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add begin_conditional_render() helperSamuel Pitoiset2017-08-021-55/+66
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glNamedBufferData() and glBufferData()Samuel Pitoiset2017-08-022-0/+38
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add buffer_data() and buffer_data_error() helpersSamuel Pitoiset2017-08-021-48/+64
| | | | | | | And call buffer_data_error() from _mesa_buffer_data(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glLineWidth()Samuel Pitoiset2017-08-022-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add line_width() helperSamuel Pitoiset2017-08-021-9/+16
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: fix bad cast conversions in viewport()Samuel Pitoiset2017-08-011-3/+4
| | | | | | | | Fixes: ddc32537d6 ("mesa: clamp viewport values only once when using glViewport()") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101981 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101989 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: drop unnecessary GLAPIENTRY to _mesa_init_line()Samuel Pitoiset2017-07-312-2/+2
| | | | | | | Noticed randomly. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: only check errors when the state change in glClipControl()Samuel Pitoiset2017-07-311-14/+16
| | | | | | | | When this GL call is a no-op, it should be a little faster in the errors path only. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: only check errors when the state change in glPointSize()Samuel Pitoiset2017-07-311-10/+9
| | | | | | | | When this GL call is a no-op, it should be a little faster in the errors path only. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: only check errors when the state change in glCullFace()Samuel Pitoiset2017-07-311-9/+10
| | | | | | | | When this GL call is a no-op, it should be a little faster in the errors path only. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: only check errors when the state change in glProvokingVertex()Samuel Pitoiset2017-07-311-3/+3
| | | | | | | When this GL call is a no-op, it should be a little faster. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add KHR_no_error support to glPointSize()Samuel Pitoiset2017-07-312-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add point_size() helperSamuel Pitoiset2017-07-311-8/+15
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glVertexArrayElementBuffer()Samuel Pitoiset2017-07-312-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add vertex_array_element_buffer() helperSamuel Pitoiset2017-07-311-21/+38
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glTextureSubImage*D()Samuel Pitoiset2017-07-312-0/+68
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add texturesubimage_error() helperSamuel Pitoiset2017-07-311-30/+45
| | | | | | | And make texturesubimage() always inline. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glDetachShader() and glDetachObjectARB()Samuel Pitoiset2017-07-312-0/+29
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add detach_shader_error() helperSamuel Pitoiset2017-07-311-9/+21
| | | | | | | And make detach_shader() always inline. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support to glNamedFramebufferDrawBuffers()Samuel Pitoiset2017-07-312-0/+21
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>