summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* TextureStorage1D should return INVALID_OPERATION if target is not a 1D textureIago Toral Quiroga2017-08-091-1/+1
| | | | | | | | | | Previous behavior was inconsistent with other texture targets so this has been fixed in OpenGL 4.6. Fixes: KHR-GL45.direct_state_access.textures_storage_errors Reviewed-by: Jordan Justen <[email protected]>
* Update TextureParameter* error for incompatible texture targetsIago Toral Quiroga2017-08-091-1/+1
| | | | | | | | | | | The OpenGL 4.6 specs have been updated so that GetTextureParameter* with a texture object with an incompatible TEXTURE_TARGET should now report INVALID_OPERATION instead of INVALID_ENUM. Fixes: KHR-GL45.direct_state_access.textures_parameter_errors Reviewed-by: Jordan Justen <[email protected]>
* mesa: don't error check the default buffer objectTimothy Arceri2017-08-081-11/+11
| | | | | | | An allocation check is already done when the buffer is created at context creation. Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: check default buffer object creation was successfulTimothy Arceri2017-08-081-0/+9
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add NULL checking to free_shared_state()Timothy Arceri2017-08-082-31/+65
| | | | | | | | This will allow us to call this function from _mesa_alloc_shared_state() in the case that we run out of memory part way through allocating the state. Reviewed-by: Samuel Pitoiset <[email protected]>
* fix GL_ARB_spirv_extensions nameIlia Mirkin2017-08-061-1/+1
| | | | Trivial. There is no _gl_ in there.
* mesa: hook up queries for NUM_TILING_TYPES and TILING_TYPESAndres Rodriguez2017-08-063-0/+47
| | | | | | | | These are just basic implementations. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: hook up UUID queries for driver and deviceAndres Rodriguez2017-08-064-0/+51
| | | | | | | | | 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]>
* mesa/st: expose EXT_memory_object and EXT_memory_object_fdAndres Rodriguez2017-08-062-0/+4
| | | | | | | | | | | v2: use PIPE_CAP_MEMOBJ to guard the extension v3 (Timothy Arceri): - expose extensions via the cap_mappings array Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: hook up (Named)BufferStorageMem apiTimothy Arceri2017-08-061-20/+65
| | | | | | | | | | | | | | | | | | Include no_error variants as well. v2 (Timothy Arceri): - reduced code churn by squashing some changes into previous commits v3 (Timothy Arceri): - drop unused function declaration v4 (Timothy Arceri): - fix Driver function assert() - add missing GL errors Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa/st: implement memory objects as a backend for buffer objectsAndres Rodriguez2017-08-061-0/+12
| | | | | | | | Use a memory object instead of user memory. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: hook up memory object multisamples tex(ture)storage apiAndres Rodriguez2017-08-063-28/+103
| | | | | | | | V2 (Timothy): - error check memory == 0 before lookup Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: hook up memoryobject tex(ture)storage apiAndres Rodriguez2017-08-064-32/+191
| | | | | | | | | | | V2 (Timothy Arceri): - formating fixes V3 (Timothy): - error check memory == 0 before lookup Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* 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]>