summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* stash: Expose api to configure outputswip/outputsRobert Bragg2013-10-1320-156/+1840
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously it was only possible to read the state of outputs. This patch introduces apis for configuring outputs including setting new modes and setting up hardware overlays. This notably has a different style to the XRandR/KMS apis that expose a model of components that can be assembled into a display pipeline. For example the KMS api lets you make a pipeline like this: framebuffers -> crtc [+planes] -> encoder -> connector This Cogl api instead exposes an object (CoglOutput) that represents a full display/output pipeline and then lets you hook sources into that pipeline via CoglOverlay objects whereby a source may be scaled and positioned relative to the full output resolution and multiple overlays may be stacked to be composed before display. With this api all output changes are batched up until cogl_renderer_commit_outputs() is called and on failure we will role back to the previous state. This is also unlike the KMS api where errors can be reported while you may only be part way through configuring the outputs as desired and there is no role back mechanism. With this api we also hope to cover more capabilities with a portable api whereas the portable KMS api is very minimal and depends on device specific ioctls for more complete control.
* drm: support authenticating a drm fd via XRobert Bragg2013-10-131-0/+67
| | | | | | | This adds support for authenticating a DRM file descriptor via an X server using the DRI2 protocol. This allows us to probe kms for information without necessarily being drm master (which requires root privileges)
* kms: set EGL_PLATFORM environment variableRobert Bragg2013-10-131-0/+6
| | | | | | | | Although EGL doesn't currently have a standard way of supporting multiple platforms and being able explicitly select a platform, Mesa at least lets you explicitly select a platform via the EGL_PLATFORM environment variable. This makes the egl-kms winsys set EGL_PLATFORM to "gbm".
* stash: cogl-output don't guard config.h includeRobert Bragg2013-10-131-3/+1
|
* stash: cogl-kms-hello exampleRobert Bragg2013-10-132-0/+279
|
* stash: Adds _USES_KMS constraintRobert Bragg2013-10-132-1/+5
|
* Adds CoglOutput support to KMS winsysRobert Bragg2013-10-133-6/+251
|
* Adds cogl udev api for discovering a drm deviceRobert Bragg2013-10-136-27/+618
| | | | | This adds udev based probing of drm devices that can be used by the KMS winsys and also support for monitoring hotplug events.
* Add libvts (Virtual Terminal Session) apiRobert Bragg2013-10-136-0/+2050
| | | | | | | | | | | | | | | | | | | This adds a small library - libvts - to the cogl repo for safely handling the privileged operations involved in opening a tty, opening a pam session (optional), claiming drmMaster() mode for using KMS and opening evdev input devices for the session-seat. This was written to support the launching of Wayland based compositors but there is nothing Wayland specific about the code so it can be used to launch any kind of full screen application that wants to run on a Linux virtual console via KMS. The code has very minimal dependencies (no glib usage for example) and could be factored out into a standalone project. This would enable weston-launch to share the same code. In the meantime we will maintain this code in Cogl so that applications using the KMS backend can take advantage of it.
* Build a .xz file on release instead of a .bzip2 fileNeil Roberts2013-09-232-2/+2
| | | | | | | | | | | Previously when we released a .bzip2 file the Gnome release scripts will just convert this to a .xz file and generate its own checksum. The .bzip2 is never actually available on the FTP server. This isn't ideal because we were listing the checksum of the .bzip2 file in the release message but that is useless information. This patch changes it to generate a .xz file instead which is also what Clutter does. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* egl: don't bind the wayland display if the extension is not availableGiovanni Campagna2013-09-161-2/+3
| | | | | | | | | | When running in a purely swrast environment (such as with LIBGL_ALWAYS_SOFTWARE), the extension is not exposed by mesa, but wayland is still possible with wl_shm. https://bugzilla.gnome.org/show_bug.cgi?id=704750 Reviewed-by: Neil Roberts <neil@linux.intel.com>
* glib-source: fix argument descriptionLionel Landwerlin2013-09-061-1/+1
| | | | | | Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit f3c930ceb71a141ac34c857b0adfbe498b876fe9)
* attribute: fix argument descriptionLionel Landwerlin2013-09-061-9/+9
| | | | | | Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 31246d418f09989fda57c1511c91349fb0840b9c)
* atlas-texture: fix argument descriptionLionel Landwerlin2013-09-061-1/+1
| | | | | | Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 4e11b784f07eeeb5a5c576915315637a2f09ae34)
* texture-rectangle: fix argument descriptionLionel Landwerlin2013-09-061-1/+1
| | | | | | Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 58a52518680d57df18e7c896904d72d3bce21a11)
* texture-2d-sliced: fix argument descriptionLionel Landwerlin2013-09-061-1/+2
| | | | | | Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 015d928be5a791bbaf7385bac1cd07c900c41bbf)
* pipeline: fix method descriptionLionel Landwerlin2013-09-061-1/+1
| | | | | | Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit cf3a12f28232389cdc11dd4fff23448071fa4b51)
* quaternion: fix structure introspection annotationLionel Landwerlin2013-09-061-7/+7
| | | | | | Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 9cbf1e8a08fe0984f124f7447c5398e78a9019b4)
* cogl: add missing colon in headersLionel Landwerlin2013-09-062-2/+2
| | | | | | Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit fa2f47059cb94f7ff4601f7d5d8692f71abb0c21)
* tests: use 'FIXME' instead of 'fail' for expected failuresRobert Bragg2013-09-061-2/+2
| | | | | | | | | | | Seeing 'fail' in the test reports and the explanation that it means "Test failed, but it was an expected failure" somewhat gives the impression that these failures are ok. Actually these failures represent known bugs/issues that we haven't yet fixed but we don't want them to result in 'make check' ailing. To try and better reflect the severity of these issues we now report them as 'FIXME'. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* atlas-texture: use COGL_TEXTURE_DEFINE macroRobert Bragg2013-09-062-1/+16
| | | | | | | | | | It was an oversight when making the CoglAtlasTexture api public that we continued to use the COGL_TEXTURE_INTERNAL_DEFINE macro. This updates the code to now use COGL_TEXTURE_DEFINE which means the cogl_is_atlas_texture() function will now be exported in the public api. Reviewed-by: Neil Roberts <neil@linux.intel.com> Reviewed-by: Lionel Landwerlin <llandwerlin@gmail.com>
* Update Visual Studio Project FilesChun-wei Fan2013-09-034-72/+80
| | | | | The solution files which are updated due to the split of Cogl-Path need to be pushed as well.
* Add unit test to verify that modifying uniforms doesn't create chainNeil Roberts2013-09-021-0/+71
| | | | | | | | | | | | | | | | | | | The recommended usage model for rendering pipelines with minor changes is to make a copy of a base pipeline just before rendering and then modify that. The new pipeline can then be used as the base pipeline for the next paint. Currently this has a known problem when modifying uniform values in that Cogl won't prune the redundant ancestry and instead it will end up with an ever-growing chain of pipelines. This is particularly bad for something like CoglGST where it could also end up leaking textures for the video frames if the pipelines are used to render video. The patch adds a test case for that situation so that we won't forget about the problem. The test is maked as a known failure. Additionally the patch adds a similar test for setting the blend constant to constrast the test with some state that does work correctly. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Fix generating the unit test wrappers when building with MingW32Neil Roberts2013-09-021-1/+1
| | | | | | | | | | | | For some reason the unit test symbols end up in the read-only data section when building on windows rather than the initialised data section so they have a different letter in the list generated by nm. They also begin with an underscore because windows likes to add underscores to symbols for some reason. This patch changes the regular expressions in the code to generate the wrapper list so that it accepts either way. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Fix building the conformance and unit tests on mingw32Neil Roberts2013-09-022-3/+1
| | | | | | | | | | | | | The unit tests were failing to build with mingw32 because the libtest-fixtures was being included both by libcogl and the test-conformance and test-unit executables. That meant that the symbols were defined twice and it wouldn't link. The rule which depends on test-unit being built needs to be called test-unit.exe on Windows so this patch fixes it to use the $(EXEEXT) variable to get the right name. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Update .gitignoreJasper St. Pierre2013-09-021-1/+2
| | | | | | | | | (cherry picked from commit d749a28cb0293a6676b7c7e2dce34562ffdc1425) Conflicts: .gitignore Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Add Autotools Items to Complete the Cogl-Path MSVC ProjectsChun-wei Fan2013-09-024-2/+76
| | | | | | | | | | | | This adds a centralized autotools Makefile to be used in the completion of the project files for Cogl-Path for now, which can be used also in Cogl, Cogl-Pango and possibly Cogl-Gst so that we could have less clutter in the autotools files. This patch set will also allow the Cogl-Path project files to be filled in during 'make dist' and make them distributed during a tarball release. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Add a conformance test for using cogl_point_coord in a shaderNeil Roberts2013-09-022-19/+66
| | | | | | | | | This adds a modification to the test-point-sprite test which uses a shader snippet which directly references cogl_point_coord instead of relying on cogl_pipeline_set_layer_point_sprite_coords_enabled to replace the texture coordinates with the point coords. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Add the cogl_point_coord snippet builtinNeil Roberts2013-09-023-2/+17
| | | | | | | This adds a #define for gl_PointCoord to all shaders so that it can be accessed with a name in the Cogl namespace. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Always add the #version pragma to shadersNeil Roberts2013-09-027-24/+25
| | | | | | | | | | | | | | | | Previously we would only add the #version pragma to shaders when point sprite texture coordinates are enabled for a layer so that we can access the gl_PointCoord builtin. However I don't think there's any good reason not to just always request GLSL version 1.2 if it's available. That way applications can always use gl_PointCoord without having to enable point sprite texture coordinates. This adds a glsl_version_to_use member to CoglContext which is used to generate the #version pragma as part of the shader boilerplate. On desktop GL this is set to 120 if version 1.2 is available, otherwise it is left at 110. On GLES it is always left as 100. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Remove unused tex_coord_declarations variableNeil Roberts2013-09-021-3/+0
| | | | | | | | This variable was a leftover from before commit e55b64a9cdc93 where the texture coord varyings were declared as an array as part of the shader boilerplate. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* docs: Fix the documentation for texture coordinates in snippetsNeil Roberts2013-09-021-11/+15
| | | | | | | | | | | | | | The documentation for the builtin varyings for the texture coordinates was wrongly claiming that the varyings are stored in an array. This was changed in e55b64a9cdc9 so that each layer gets its own independent varying. The documentation was also referring to texture units instead of layer numbers. The texture units are no longer publicly exposed in the shaders and instead everything should in theory be expressed in terms of layer numbers. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Visual Studio Projects: Use Custom Build RulesChun-wei Fan2013-08-316-130/+381
| | | | | | | | | Use custom build rules to generate the enumeration sources and the .def files so that the IDE will regenerate those files upon change and clean them when a clean up request is requested. Also make the projects reflect more closely the file layout in the current source tree
* Update Visual Studio Property SheetsChun-wei Fan2013-08-312-175/+331
| | | | | | | -Add items to generate the enumeration sources -Add items to build the CoglPath library, which was split out -Make the header installation up to date, especially due to the split out of Cogl-Path
* MSVC Projects: Add project templates for cogl-pathChun-wei Fan2013-08-313-0/+817
| | | | | | | This adds template project files that is used to build cogl-path, where the source files can be filled in using autotools. Note that although cogl-path is built as a static library, items to build DLLs for this is intentionally left in there as this is intended to be a shared library later.
* cogl-path: Add a symbols fileChun-wei Fan2013-08-302-0/+56
| | | | | | | | | This is used for exporting symbols when Cogl-Path becomes a DLL (.so) of its own, so one can use and process this file with a preprocessor for e.g. and generate a .def file that can be used for this purpose. Dist the symbols file as well. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl/cogl-bitmap-conversion.c: Include missed headerChun-wei Fan2013-08-301-0/+1
| | | | | | | | The cogl-texture-private.h needs to be included as _cogl_texture_needs_premult_conversion, so that we can avoid implicit declaration warnings of that symbol (aka C4013 on MSVC). Reviewed-by: Neil Roberts <neil@linux.intel.com>
* texture-rectangle: Initialize is_foreignDamien Lespiau2013-08-261-0/+1
| | | | | | | | | | | | | So we don't read an initializes value later on. Caught by valgrind: Conditional jump or move depends on uninitialised value(s) _cogl_object_texture_rectangle_indirect_free (cogl-texture-rectangle.c:105) _cogl_object_context_indirect_free (cogl-context.c:453) ... main (text.c:149) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Neil Roberts <neil@linux.intel.com>
* gles2: Use GL_ES instead of __VERSION__ for setting precisionNeil Roberts2013-08-251-1/+1
| | | | | | | | | | | | | | | | | Mesa has started getting picky about specifying the precision for floating types in the fragment shader. We already have a default precision specifier in all the fragment shaders but apparently this wasn't working because it is only used when the __VERSION__ define is 100 and Mesa is reporting 110. Regardless of whether Mesa is doing the right thing or not I think it makes sense to use GL_ES instead of __VERSION__ because we will also need the precision specifier if we start requesting GLSL 3.0. The GLES specification explictly states that GL_ES will only be defined for GLES and this is similar to what the internal meta shaders do in Mesa. http://cgit.freedesktop.org/mesa/mesa/commit/?id=cabd45773b58d6aa482 Reviewed-by: Robert Bragg <robert@linux.intel.com>
* kms: add public API to override the default configuration of outputsGiovanni Campagna2013-08-232-33/+238
| | | | | | | | | | Add API to allow complex applications using the KMS backend to go almost straight to direct configuration (which is not possible because Cogl needs to be in charge of buffers and FB objects). https://bugzilla.gnome.org/show_bug.cgi?id=705837 Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Update the RELEASING notesRobert Bragg2013-08-221-2/+5
|
* cogl-path: Generate the primitive before using it for clippingNeil Roberts2013-08-211-1/+3
| | | | | | | | The data->fill_primitive member is meant to be generated on demand in an accessor function. However when using it for clipping the code was trying to directly use it without calling the accessor so it would crash if nothing else caused the primitive to be generated. This was making the texture-fbo test in Clutter crash.
* Add a cogl-point-sprites exampleNeil Roberts2013-08-212-1/+328
| | | | | This updates the old point sprites interactive test from Clutter to be a standalone Cogl example using the 2.0 API.
* cogl-gpu-info.c: Avoid using named initializersChun-wei Fan2013-08-191-3/+4
| | | | | | | Unfortunately named initializers is a feature that is not supported by all compilers (such as pre-2013 Visual Studio) so avoid using that. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* cogl-texture-gl.c: Don't include strings.h unconditionallyChun-wei Fan2013-08-191-0/+2
| | | | | | | Use the HAVE_STRINGS_H check before we include strings.h, as it is not universally available. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* MSVC builds: Update pre-defined cogl-define.hChun-wei Fan2013-08-192-0/+2
| | | | | | | | ...For both the regular WGL winsys and SDL winsys builds, that COGL_HAS_GTYPE_SUPPORT is defined, so that the builds won't break as Visual Studio builds do assume an existing installation of GLib. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* cogl-gst: emit ready signal on sink only after the first frame is uploadedLionel Landwerlin2013-08-191-6/+10
| | | | | | | | | Developers listening to the 'ready' signal on CoglGstVideoSink might call process the current frame once the signal is triggered. We need to ensure the first frame has been uploaded before letting people know that the sink is ready. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Fix the documented default value for --enable-cogl-pathNeil Roberts2013-08-191-1/+1
| | | | | | | As far as I can tell --enable-cogl-path is enabled by default but the help string for it was suggesting otherwise. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Fix the help string for --enable-standaloneNeil Roberts2013-08-191-1/+1
| | | | | | | | The help string had the wrong name presumably resulting from a cut and paste error of the --enable-debug option. Reviewed-by: Robert Bragg <robert@linux.intel.com> Reviewed-by: Damien Lespiau <damien.lespiau at intel.com>
* wayland: Call eglTerminate before destroying wl_display, not afterNeil Roberts2013-08-191-3/+3
| | | | | | | | | | | The eglTerminate code in Mesa will try to destroy the wl_drm object which involves using data structures in the wl_display. Cogl was disconnecting the display before calling eglTerminate which meant that this would end up accessing potentially garbage data. https://bugzilla.gnome.org/show_bug.cgi?id=705591 Reviewed-by: Robert Bragg <robert@linux.intel.com>