summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* st/omx: add DRI3 supportEmil Velikov2017-05-191-1/+3
| | | | | | Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-and-Tested-by: Leo Liu <[email protected]>
* st/omx: fix building against X11-less setupsEmil Velikov2017-05-191-0/+6
| | | | | | | | | | The vl_*_screen_create API properly falls back to a NOP when we're building without specific platforms. So the only thing we need is to handle the lack of X11/Xlib.h and provide a dummy Display define. Cc: <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* st/omx: remove unneeded X11 includeEmil Velikov2017-05-191-2/+0
| | | | | | | | | En route to a X11-less builds Cc: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/omx: remove unused drm_driver.h includesEmil Velikov2017-05-192-2/+0
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: check if vl_*_screen_create has failed only onceEmil Velikov2017-05-191-4/+3
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: fix misplaced closing bracketEmil Velikov2017-05-191-1/+1
| | | | | | | | | | | It's been like this since the code was introduced. Fixes: 86eb4131a90 (st/va: add headless support, i.e. VA_DISPLAY_DRM) Cc: <[email protected]> Cc: Julien Isorce <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: move variable declaration to where its usedEmil Velikov2017-05-191-2/+1
| | | | | | | | ... and make it const, since we shouldn't tinker with it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* auxiliary/vl: use vl_*_screen_create stubs when building w/o platformEmil Velikov2017-05-192-4/+0
| | | | | | | | | | | | | | | | | | | | Provide a dummy stub when the user has opted w/o said platform, thus we can build the binaries without unnecessarily requiring X11/other headers. In order to avoid build and link-time issues, we remove the HAVE_DRI3 guards in the VA and VDPAU state-trackers. With this change st/va will return VA_STATUS_ERROR_ALLOCATION_FAILED instead of VA_STATUS_ERROR_UNIMPLEMENTED. That is fine since upstream users of libva such as vlc and mpv do little error checking, let alone distinguish between the two. Cc: Leo Liu <[email protected]> Cc: Guttula, Suresh <[email protected]> Cc: [email protected] Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* configure: check once for DRI3 dependenciesEmil Velikov2017-05-194-1/+5
| | | | | | | | | | | | | | | | Currently we are having the XCB_DRI3 dependencies duplicated, partially. Just do a once-off check and add all of the respective CFLAGS/LIBS where needed. As a nice side effect this helps us solve a couple of FIXMEs. DRI3 is not a thing w/o X11 so disable it in such cases. Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* Android: push driver build details to driver makefilesRob Herring2017-05-111-1/+1
| | | | | | | | | | | | | src/gallium/targets/dri/Android.mk contains lots of conditional for individual drivers. Let's move these details into the individual driver makefiles. In the process, align the make driver conditionals with automake (i.e. HAVE_GALLIUM_*). Signed-off-by: Rob Herring <[email protected]> [Emil Velikov: add the radeon winsys for radeonsi] Signed-off-by: Emil Velikov <[email protected]>
* Android: Fix swrast only buildRob Herring2017-05-111-5/+3
| | | | | | | | | | | | | A build of only swrast is broken as the Android EGL now depends on libdrm as does GBM. While we could make EGL conditionally depend on libdrm, we probably want to enable kms_dri winsys as well and that will need libdrm enabled. So just always enable libdrm and simplify the Android makefiles a bit. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Chih-Wei Huang <[email protected]> [Emil Velikov: drop related inline comment] Signed-off-by: Emil Velikov <[email protected]>
* gallium: remove pipe_index_buffer and set_index_bufferMarek Olšák2017-05-105-58/+56
| | | | | | | | | | | | | | pipe_draw_info::indexed is replaced with index_size. index_size == 0 means non-indexed. Instead of pipe_index_buffer::offset, pipe_draw_info::start is used. For indexed indirect draws, pipe_draw_info::start is added to the indirect start. This is the only case when "start" affects indirect draws. pipe_draw_info::index is a union. Use either index::resource or index::user depending on the value of pipe_draw_info::has_user_indices. v2: fixes for nine, svga
* gallium: separate indirect stuff from pipe_draw_info - 80 -> 56 bytesMarek Olšák2017-05-102-2/+0
| | | | For faster initialization of non-indirect draws.
* gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytesMarek Olšák2017-05-103-32/+48
|
* st/wgl: whitespace, formatting fixes in stw_pixelformat.cBrian Paul2017-04-281-72/+62
| | | | Trivial.
* st/wgl: allow WGL_BIND_TO_TEXTURE_RGB_ARB for RGBA visualsCharmaine Lee2017-04-281-2/+2
| | | | | | | | | | | We do not need to restrict WGL_BIND_TO_TEXTURE_RGB_ARB to RGB visuals only. It can be supported with RGBA visuals as well. This fixes the early exit of cinebench-r15-test trace. Tested with cinebench-r15, piglit, glretrace. Reviewed-by: Brian Paul <[email protected]>
* st/wgl: use ARRAY_SIZE() macro in wglChoosePixelFormatARB()Brian Paul2017-04-281-1/+1
| | | | Trivial.
* st/wgl: whitespace/formatting fixes in stw_ext_pixelformat.cBrian Paul2017-04-281-59/+52
| | | | Trivial.
* clover: Fix build since clang r301442Jan Vesely2017-04-272-1/+3
| | | | | | | v2: rename default_ik -> ik_opencl Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>