summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* gallium: move loading of drirc to pipe-loaderNicolai Hähnle2017-08-025-55/+21
| | | | | | v2: rebase compile fix: addition of mesa_no_error Reviewed-by: Marek Olšák <[email protected]> (v1)
* gallium: move driinfo XML to pipe_loaderNicolai Hähnle2017-08-021-39/+1
| | | | | | | | | | | We will switch to the pipe_loader loading the configuration options, so that they can be passed to the driver independently of the state tracker. Put the description into its own file so that it can be merged easily with driver-specific options in future commits. Reviewed-by: Marek Olšák <[email protected]>
* gallium: add pipe_screen_config to screen_create functionsNicolai Hähnle2017-08-024-8/+14
| | | | | | | This allows a more generic mechanism for passing user configurations into drivers by accessing the dri options directly. Reviewed-by: Marek Olšák <[email protected]>
* st/dri: don't set PIPE_BIND_SHARED for privately-allocated renderbuffersMarek Olšák2017-08-011-2/+3
| | | | | | which are MSAA and depth/stencil buffers. Reviewed-by: Eric Anholt <[email protected]>
* xmlconfig: move into src/utilNicolai Hähnle2017-07-313-3/+3
| | | | | | | | v2: attempt to fix Android build (Emil) v3: add missing include path Reviewed-by: Marek Olšák <[email protected]> (v1)
* dri_interface,egl,gallium: only expose RGBA visuals on AndroidMarek Olšák2017-07-311-1/+23
| | | | | | | | | | | | | | X/GLX can't handle them. This removes almost 500 GLX visuals that were incorrectly exposed. Add an optional getCapability callback for querying what the loader can do. I'm not splitting this patch, because it's already too small. v2: also add the callback to __DRIimageLoaderExtension Reviewed-by: Nicolai Hähnle <[email protected]> Cc: 17.2 <[email protected]>
* st/dri2: Return invalid modifier when no driver supportDaniel Stone2017-07-251-0/+6
| | | | | | | | | Always initialise whandle.modifier for DRIImage modifier queries, so if the driver doesn't support it then we return false for the query. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Fixes: d33fe8b84e45 ("st/dri: enable DRIimage modifier queries")
* st/dri: Check get-handle return value in queryImageDaniel Stone2017-07-251-12/+18
| | | | | | | | In the DRIImage queryImage hook, check if resource_get_handle() failed and return FALSE if so. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: create framebuffer iface hash table per st managerCharmaine Lee2017-07-246-0/+12
| | | | | | | | | | | | | | | | With commit 5124bf98239, a framebuffer interface hash table is created in st_gl_api_create(), which is called in dri_init_screen_helper() for each screen. When the hash table is overwritten with multiple calls to st_gl_api_create(), it can cause race condition. This patch fixes the problem by creating a framebuffer interface hash table per state tracker manager. Fixes crash with steam. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101876 Fixes: 5124bf98239 ("st/mesa: add destroy_drawable interface") Tested-by: Christoph Haag <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi: populate preciseKarol Herbst2017-07-211-3/+3
| | | | | | | | | Only implemented for glsl->tgsi. Other converters just set precise to 0. v2: remove precise paramter from ureg_tex_insn and ureg_memory_insn Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: add destroy_drawable interfaceCharmaine Lee2017-07-204-2/+17
| | | | | | | | | | | | | | | With this patch, the st manager will maintain a hash table for the active framebuffer interface objects. A destroy_drawable interface is added to allow the state tracker to notify the st manager to remove the associated framebuffer interface object from the hash table, so the associated framebuffer and its resources can be deleted at framebuffers purge time. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101829 Fixes: 147d7fb772a ("st/mesa: add a winsys buffers list in st_context") Tested-by: Brad King <[email protected]> Tested-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/dri: list __DRI2_FENCE extension only where neededEmil Velikov2017-07-191-1/+0
| | | | | | | | | The extension should be present (if applicable) in the list returned by getExtensions(). AFAICT no loader has ever looked for it in __driDriverExtensions/__driDriverGetExtensions. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* swrast: add dri2ConfigQueryExtension to the correct extension listEmil Velikov2017-07-191-1/+1
| | | | | | | | | | | | The extension should be in the list as returned by getExtensions(). Seems to have gone unnoticed since close to nobody wants to change the vblank mode for the software driver. v2: Rebase Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1)
* st/va: Fix scaling list ordering for H.265Mark Thompson2017-07-171-7/+26
| | | | | | | | | | | | | Mesa here requires the scaling lists in diagonal scan order, but VAAPI passes them in raster scan order. Therefore, rearrange the elements when copying. v2: Move scan tables to vl_zscan.c. Fix type in size assertion. Cc: [email protected] Signed-off-by: Mark Thompson <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/mesa: Add KHR_no_error toggle to driconfGrigori Goronzy2017-07-142-0/+4
| | | | | | | | Allows applications to be whitelisted. v2: Remove misguided DRI common part. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: Add support for KHR_no_error flagGrigori Goronzy2017-07-141-0/+3
| | | | | | | Add a new context flag and plumb it through the various layers of the context creation code to set up dispatch tables for the no-error mode. Reviewed-by: Marek Olšák <[email protected]>
* dri: Add KHR_no_error DRI extensionGrigori Goronzy2017-07-143-1/+5
| | | | | | | | | | This basic extension allows usage of the __DRI_CTX_FLAG_NO_ERROR flag. This includes support code for classic Mesa drivers to switch on the no-error mode if the flag is set. v2: Move to common DRI code. Reviewed-by: Marek Olšák <[email protected]>
* st/dri: add 32-bit RGBX/RGBA formatsMarek Olšák2017-07-132-12/+65
| | | | | | | | | | | | | | | | | | Add support for 32-bit RGBX/RGBA formats which are required for Android. The original patch (commit ccdcf91104a5) was reverted (commit c0c6ca40a25e) in mesa as it broke GLX resulting in swapped colors. Based on further investigation by Chad Versace, moving the RGBX/RGBA configs to the end is enough to prevent breaking GLX. The handling of RGBA/RGBX in dri_fill_st_visual is a fix from Marek Olšák. Cc: Eric Anholt <[email protected]> Cc: Mauro Rossi <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* st/mesa: add a winsys buffers list in st_contextCharmaine Lee2017-07-112-1/+7
| | | | | | | | | | | | | | | | | | | | | Commit a5e733c6b52e93de3000647d075f5ca2f55fcb71 fixes the dangling framebuffer object by unreferencing the window system draw/read buffers when context is released. However this can prematurely destroy the resources associated with these window system buffers. The problem is reproducible with Turbine Demo running with VMware driver. In this case, the depth buffer content was lost when the context is rebound to a drawable. To prevent premature destroy of the resources associated with window system buffers, this patch maintains a list of these buffers in the context, making sure the reference counts of these buffers will not reach zero until the associated framebuffer interface objects no longer exist. This also helps to avoid unnecessary destruction and re-construction of the resources associated with the framebuffer. Fixes VMware bug 1909807. Reviewed-by: Brian Paul <[email protected]>
* st/wgl: Implement wglUseFontBitmaps.Olivier Lauffenburger2017-07-061-16/+49
| | | | | | | | | wglUseFontBitmaps is currently a noop. This patch implements this function for Windows. Misc code clean-ups by Brian. Signed-off-by: Olivier Lauffenburger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/wgl: improve selection of pixel formatOlivier Lauffenburger2017-07-061-7/+29
| | | | | | | | | | | | | | | | | | Current selection of pixel format does not enforce the request of stencil or depth buffer if the color depth is not the same as requested. For instance, GLUT requests a 32-bit color buffer with an 8-bit stencil buffer, but because color buffers are only 24-bit, no priority is given to creating a stencil buffer. This patch gives more priority to the creation of requested buffers and less priority to the difference in bit depth. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101703 Signed-off-by: Olivier Lauffenburger <[email protected]> Tested-by: Brian Paul <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/glthread: add glthread "perf" counters and pass them to gallium HUDMarek Olšák2017-06-261-1/+5
| | | | | | | | | | | for HUD integration in following commits. This valuable profiling data will allow us to see on the HUD how well glthread is able to utilize parallelism. This is better than benchmarking, because you can see exactly what's happening and you don't have to be CPU-bound. u_threaded_context has the same counters. Reviewed-by: Timothy Arceri <[email protected]>
* util: move pipe_thread_is_self from gallium to src/utilMarek Olšák2017-06-261-1/+1
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/dri2: implement image offset queryLucas Stach2017-06-241-0/+6
| | | | | | | | This trivially adds support for the image offset query, which is needed for the zwp_linux_dmabuf based EGL platform wayland implementation. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* st/dri: add a drirc workaround for Rocket LeagueMarek Olšák2017-06-231-0/+5
| | | | | | | | | | | | | | This needs to be passed to gallium drivers. No game fix is planned at this time. The addition of glsl_correct_derivatives_after_discard is generally a good thing for mesa compatibility with the broader GL driver ecosystem. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100070 Reviewed-by: Nicolai Hähnle <[email protected]>
* st/dri: get drirc options before creating pipe_screenMarek Olšák2017-06-234-20/+38
| | | | | | dri_init_options_get_screen_flags will return the flags for create_screen(). Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: allow passing 'unsigned flags' to create_screen()Marek Olšák2017-06-234-5/+5
| | | | | | for drirc options Reviewed-by: Nicolai Hähnle <[email protected]>
* change va max_entrypointsChandu Babu N2017-06-222-1/+3
| | | | | | | | | | | As encode support is added along with decode, increase max_entrypoints to two. vaMaxNumEntrypoints was returning incorrect value and causing memory corruption before this commit v2: assert when max_entrypoints needs to be bigger CC: [email protected] Reviewed-by: Christian König <[email protected]>
* st/va: Fix leak in VAAPI subpicturesChandu Babu N2017-06-221-0/+1
| | | | | | | sampler view allocated in vaAssociateSubpicture is not cleared in vaiDeassociateSubpicture. Reviewed-by: Christian König <[email protected]>
* st/xvmc: deal with drivers wanting different texture formatsIlia Mirkin2017-06-201-36/+115
| | | | | | | | | | Previously, texture formats were being used unconditionally without checking. However nv30 supports neither RGBX8 nor R4A4/A4R4 formats. Add sufficient fallbacks so that the nv30 driver can have working OSD. Tested on a NV44A/PCI. Signed-off-by: Ilia Mirkin <[email protected]>
* clover/device: Get device/host unified memory from pipe driverAaron Watry2017-06-133-1/+7
| | | | | | | clinfo no longer reports my discrete GCN card as unified memory Signed-off-by: Aaron Watry <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* vl,omx,va,vdpau,xvmc: don't set the priv pointer in context_createMarek Olšák2017-06-125-6/+6
| | | | | | Unused and radeonsi ignores it anyway. Acked-by: Nicolai Hähnle <[email protected]>
* gallium/wgl: Allow context creation even if SetPixelFormat() wasn't calledFrank Richter2017-06-091-1/+7
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101326 Reviewed-by: Brian Paul <[email protected]>
* st/dri: support format modifier queriesVarad Gautam2017-06-091-1/+23
| | | | | | | | | | | | | | ask the driver for supported modifiers for a given format. v2: move to __DRIimageExtension v16. v3: fail if the supplied format is not supported by driver. v4: purge PIPE_CAP_QUERY_DMABUF_ATTRIBS. v5: - move to __DRIimageExtension v15, pass external_only to the driver. Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Lucas Stach <[email protected]> (v4) Cc: Lucas Stach <[email protected]>
* st/dri: support format queriesVarad Gautam2017-06-091-0/+118
| | | | | | | | | | | | | | | ask the driver for supported dmabuf formats v2: rebase to master. v3: return false on failure. v4: use pscreen->is_format_supported instead of adding a new query. (Lucas Stach) v5: stylefix to conform to formatting rules (Brian Paul). add fourcc list here instead of using struct image_format from v4. Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Lucas Stach <[email protected]> (v4) Cc: Lucas Stach <[email protected]>
* st/dri: implement DRIimage creation from dmabufs with modifiersVarad Gautam2017-06-091-5/+40
| | | | | | | | | | | support importing dmabufs into DRIimage while taking format modifiers in account, as per DRIimage extension version 15. v2: initialize winsys modifier to DRM_FORMAT_MOD_INVALID (Daniel Stone) v3: do not bump DRIimageExtension version. split out winsys changes. Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* st/dri: implement createImageWithModifiers in DRIimageVarad Gautam2017-06-091-5/+53
| | | | | | | | | | | | | | | adds a pscreen->resource_create_with_modifiers() to create textures with modifier. v2: - stylefixes (Emil Velikov) - don't return selected modifier from resource_create_with_modifiers. we can use the winsys_handle to get this. Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Lucas Stach <[email protected]> (v1) Cc: Lucas Stach <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* st/dri: enable DRIimage modifier queriesVarad Gautam2017-06-091-0/+12
| | | | | | | | | | | | | | return the modifier selected by the driver when creating this image. v2: since we can use winsys_handle->modifier to serve these, remove DRIimage->modifier from v1. use DRM_API_HANDLE_TYPE_KMS instead of DRM_API_HANDLE_TYPE_FD to avoid ownership transfer. (Lucas) Suggested-by: Daniel Stone <[email protected]> Signed-off-by: Varad Gautam <[email protected]> Cc: Lucas Stach <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* gallium/winsys/drm: introduce modifier field to winsys_handleVarad Gautam2017-06-091-0/+7
| | | | | | | | | we use this to import resources with format modifiers, and to support per-resource modifier queries. Signed-off-by: Varad Gautam <[email protected]> Cc: Lucas Stach <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* util: Port nir_array functionality to u_dynarrayThomas Helland2017-06-071-1/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium: Add missing includesThomas Helland2017-06-072-0/+2
| | | | | | | | These will need to be in place to avoid regressions when removing these includes from the u_dynarray Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* st/dri: Allow gallium drivers to turn off two GLX extensionsThomas Hellstrom2017-06-071-0/+2
| | | | | | | | Allow gallium drivers to turn off GLX_EXT_buffer_age and GLX_OML_sync_control if needed, using driconf. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/dri: Allow dri users to query also driver optionsThomas Hellstrom2017-06-071-1/+64
| | | | | | | | | There will be situations where we want to control, for example, the GLX behaviour based on applications and drivers. So allow DRI users access to the driver options. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/dri: Use fence extension in drisw.cGurchetan Singh2017-06-021-0/+2
| | | | | | This is desirable for synchronization in virtual machines. Reviewed-by: Marek Olšák <[email protected]>
* st/dri: move fence implemention into separate fileGurchetan Singh2017-06-024-203/+263
| | | | | | | | | | | Since the fence implementation is not dri2.c specific, put it in a separate file. This way SW implementations can use this extension too. v2: Don't depend on dri2.c for extensions (Emil) v3: Make this patch only move extension into a separate file (Chad). Reviewed-by: Marek Olšák <[email protected]>
* glthread/gallium: require safe_glthread to start glthreadGregory Hainaut2017-05-291-4/+17
| | | | | | | | | | | | | | | | | | Print an error message for the user if the requirement isn't met, or we're not thread safe. v2: based on Nicolai feedbacks Check the DRI extension version v3: based on Emil feedbacks improve commit and error messages. use backgroundCallable variable to improve readability v5: based on Emil feedbacks Properly check the function pointer Signed-off-by: Gregory Hainaut <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/wgl: whitespace, formatting fixes in stw_device.cBrian Paul2017-05-251-12/+9
| | | | Trivial.
* st/nine: Fix a regression and syntax cleanupAxel Davy2017-05-244-19/+16
| | | | | | | | | | | | | A few cleanups and in particular initializing properly the new pipe_draw_info fields. This should fix the regression caused by 330d0607ed60fd3edca192e54b4246310f06652f Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101088 Signed-off-by: Axel Davy <[email protected]> Tested-by: Edmondo Tommasina <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* driconf: Add allow_glsl_builtin_variable_redeclaration optionJohn Brooks2017-05-201-0/+3
| | | | | | | | | | | | | | | This option will allow GLSL builtins to be redeclared verbatim (e.g. redeclaring "in int gl_VertexID" in a vertex shader). This is not strictly valid and would normally fail to compile, but some applications (such as newer Techland ports) do it and need more leniency. v2 (Samuel Pitoiset): - Rename allow_glsl_builtin_redeclaration -> allow_glsl_builtin_variable_redeclaration Signed-off-by: John Brooks <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* st/xvmc: add DRI3 supportEmil Velikov2017-05-191-1/+3
| | | | | Signed-off-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>