summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* util: move os_time.[ch] to src/utilNicolai Hähnle2017-11-091-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: use simple mtx in core mesaTimothy Arceri2017-11-091-11/+11
| | | | | | | | | Results from x11perf -copywinwin10 on Eric's SKL: 4.33338% ± 0.905054% (n=40) Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Yogesh Marathe <[email protected]>
* clover: use the unified check for c++11 instead of the gcc version numberGert Wollny2017-11-081-3/+3
| | | | | | | | So far clover based its test for compiler support on the version of gcc, while in reality support for c++11 is required. This patch replaces the version check by the check unified for all modules that require c++11. Reviewed-by: Emil Velikov <[email protected]>
* drisw: Enable flush control for llvmpipe and softpipeAdam Jackson2017-11-061-0/+1
| | | | | | | | | | | | | | | | Hilariously this is a fairly big win. Neil's multi-context-test improves from ~24 to ~36 fps with llvmpipe on a Core i5-3317U. softpipe also improves, from about 2.25 to 3.09 fps (when it's that slow, you're allowed to be that precise). I'd have added it to swrast classic, but the testcase wants GL 3.0 and shaders, and that's not a thing classic has, so I figured making it work on softpipe was crime enough. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* gallium: Wire up flush controlAdam Jackson2017-11-061-1/+5
| | | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* dri: Change __DriverApiRec::CreateContext to take a struct for attribsNeil Roberts2017-11-062-28/+24
| | | | | | | | | | | | | | | | | | | | Previously the CreateContext method of __DriverApiRec took a set of arguments to describe the attribute values from the window system API's CreateContextAttribs function. As more attributes get added this could quickly get unworkable and every new attribute needs a modification for every driver. To fix that, pass the attribute values in a struct instead. The struct has a bitmask to specify which members are used. The first three members (two for the GL version and one for the flags) are always set. If the bit is not set in the attribute mask then it can be assumed the attribute has the default value. Drivers will error if unknown bits in the mask are set. Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Neil Roberts <[email protected]>
* meson: build gallium based osmesaDylan Baker2017-10-271-0/+28
| | | | | | | | | | This has been tested with the osdemo from mesa-demos v2: - Add SELinux dependency - fix typo GALLIUM_LLVM -> GALLIUM_LLVMPIPE Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* clover: Fix compilation after clang r315871Jan Vesely2017-10-252-5/+12
| | | | | | | | | | v2: use a more generic compat function v3: rename and formatting cleanup Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103388 Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> CC: <[email protected]>
* egl,dri: Propagate context priority hint to driver->CreateContextChris Wilson2017-10-202-0/+2
| | | | | | | | | | | | | | | | | | | | Jump through the layers of abstraction between egl and dri in order to feed the context priority attribute through to the backend. This requires us to read the value from the base _egl_context, convert it to a DRI attribute, parse it again in the generic context creator before passing it to the driver as a function parameter. In order to not require us to pass back the actual value of the context priority after creation, we impose that drivers should report the available set of priorities during screen setup (and then they may chose to fail if given an invalid value as that should have been checked at the user boundary.) Signed-off-by: Chris Wilson <[email protected]> Acked-by: Ben Widawsky <[email protected]> # i915/i965 Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/osmesa: include u_inlines.h for pipe_resource_referenceMichel Dänzer2017-10-181-0/+1
| | | | | | | | | Fixes build failure due to unresolved symbol. Fixes: 7561da367bae "st/mesa: Initialize textures array in st_framebuffer_validate" Trivial.
* st/mesa: Initialize textures array in st_framebuffer_validateMichel Dänzer2017-10-185-12/+5
| | | | | | | | | | | | | | | | And just reference pipe_resources to it in the validate callbacks. Avoids pipe_resource leaks when st_framebuffer_validate ends up calling the validate callback multiple times, e.g. when a window is resized. v2: * Use generic stable tag instead of Fixes: tag, since the problem could already happen before the commit referenced in v1 (Thomas Hellstrom) * Use memset to initialize the array on the stack instead of allocating the array with os_calloc. Cc: [email protected] Reviewed-by: Thomas Hellstrom <[email protected]>
* st/va: Return correct width and height for encode/decode supportMark Thompson2017-10-171-10/+30
| | | | | | | | | | Previously this would return the largest possible buffer size, which is much larger than the codecs themselves support. This caused confusion when client applications attempted to decode 8K video thinking it was supported when it isn't. Signed-off-by: Mark Thompson <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: Fix config entrypoint handlingMark Thompson2017-10-171-6/+12
| | | | | | | | | Consistently use it as a PIPE_VIDEO_ENTRYPOINT. v2: Return an error if the entrypoint is not set (Christian). Signed-off-by: Mark Thompson <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: Disable vaExportSurfaceHandle()Mark Thompson2017-10-172-2/+2
| | | | | | | This is not in libva 2.0, so it shouldn't be enabled yet. Signed-off-by: Mark Thompson <[email protected]> Acked-by: Christian König <[email protected]>
* meson: Build gallium dri state trackerDylan Baker2017-10-161-0/+57
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <eric at anholt.net>
* st/dri: Add definitions to allow importing 16-bit surfacesMark Thompson2017-10-131-0/+14
| | | | | | | Necessary to support P010/P016 surfaces for video. Signed-off-by: Mark Thompson <[email protected]> Acked-by: Leo Liu <[email protected]>
* st/dri: implement __DRIimageExtension::validateUsage properlyMarek Olšák2017-10-121-8/+22
| | | | | Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/dri: implement createImageFromRenderbuffer(2)Nicolai Hähnle2017-10-103-7/+71
| | | | | | Tested with dEQP-EGL.functional.image.*renderbuffer* tests. Reviewed-by: Eric Anholt <[email protected]>
* st/va: Implement vaExportSurfaceHandle()Mark Thompson2017-10-073-1/+153
| | | | | | | | | | | | | | | This is a new interface in libva2 to support wider use-cases of passing surfaces to external APIs. In particular, this allows export of NV12 and P010 surfaces. v2: Convert surfaces to progressive before exporting them (Christian). v3: Set destination rectangle to match source when converting (Leo). Add guards to allow building with libva1. Signed-off-by: Mark Thompson <[email protected]> Acked-by: Christian König <[email protected]> Acked-and-Tested-by: Leo Liu <[email protected]>
* st/va: add RGB support to vlVaPutSurfaceLeo Liu2017-10-041-1/+13
| | | | | Tested-by: Andy Furniss <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: don't re-allocate interlaced buffer with pakced formatLeo Liu2017-10-041-4/+6
| | | | | | | | | | | It caused corruption, when vlVaPutImage putting raw data to the fields v2: add RGB formats since it got uploaded here as well Cc: [email protected] Cc: Andy Furniss <[email protected]> Tested-by: Andy Furniss <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/vdpau: don't re-allocate interlaced buffer with packed YUV formatLeo Liu2017-10-041-0/+2
| | | | | | | | | It caused corruption, when vlVdpVideoSurfacePutBitsYCbCr putting YUV to the fields Cc: [email protected] Cc: Andy Furniss <[email protected]> Tested-by: Andy Furniss <[email protected]> Reviewed-by: Christian König <[email protected]>
* mesa: Remove force_s3tc_enable driconf variableMatt Turner2017-10-022-3/+0
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: Remove util_format_s3tc_enabledMatt Turner2017-10-021-13/+0
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/va: add dst rect to avoid scale on deintLeo Liu2017-09-291-6/+6
| | | | | | | | | | | For 1080p video transcode, the height will be scaled to 1088 when deint to progressive buffer. Set dst rect to make sure no scale. Fixes: 3ad8687 "st/va: use new vl_compositor_yuv_deint_full() to deint" Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Acked-by: Andy Furniss <[email protected]>
* st/va: use pipe transfer_map to map upload bufferLeo Liu2017-09-281-3/+9
| | | | | | | | | | The function pipe_buffer_map() is only for linear pipe buffer, with height as 0, and it's not for any 2D textures. Signed-off-by: Leo Liu <[email protected]> Cc: [email protected] Cc: Mark Thompson <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/dri: don't expose modifiers in EGL if the driver doesn't implement themMarek Olšák2017-09-271-3/+5
| | | | | | | | This unbreaks waffle/gbm (piglit/gbm) which fails initialization. v2: also don't set queryDmaBufFormats Reviewed-by: Daniel Stone <[email protected]>
* clover: Query and export int64 atomicsJan Vesely2017-09-273-2/+11
| | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* st/va/postproc: implement the DRM prime grabberLeo Liu2017-09-251-2/+16
| | | | Acked-by: Christian König <[email protected]>
* st/va/postproc: use progressive target buffer for scalingLeo Liu2017-09-251-0/+18
| | | | | | | | | Scaling between interlaced buffers, esp. for scale-up, because blit will scale up top filed and bottom field separately. it'll result in the weaving for these buffer with lack of accuracy. So use shader deint for the case. Acked-by: Christian König <[email protected]>
* st/va: make internal func vlVaHandleSurfaceAllocate() call simplerLeo Liu2017-09-253-7/+4
| | | | Acked-by: Christian König <[email protected]>
* st/va/postproc: add a full NV12 deint support from buffer I to PLeo Liu2017-09-251-1/+21
| | | | | | | | | | | Before it's impossible to transcode an interlaced video, becasue if in order for encoder to work, we have to force buffer to progessive, but the deint with buffer from I to P is missing. Now along With the new YUV deint full function, it works with weave and bob deint. Also this will benefit transcoding video with scaling parameters. Acked-by: Christian König <[email protected]>
* st/va: use new vl_compositor_yuv_deint_full() to deintLeo Liu2017-09-251-3/+11
| | | | | | | We also set src rectangle explicitly just in case of the mismatch of size between interlaced buffer and progressive buffer Acked-by: Christian König <[email protected]>
* st/omx: use new vl_compositor_yuv_deint_full() to deintLeo Liu2017-09-251-2/+9
| | | | | | v2: add dst rect to make sure no scale Acked-by: Christian König <[email protected]>
* st/va/postproc: use video original size for postprocessingLeo Liu2017-09-251-6/+8
| | | | | | | Otherwise the aligned size will make video scaled Cc: [email protected] Reviewed-by: Christian König <[email protected]>
* clover: Wait for requested operation if blocking flag is setJan Vesely2017-09-201-2/+28
| | | | | | | | | | v2: wait in map_buffer and map_image as well v3: use event::wait instead of wait (skips fence wait for hard_event) v4: use wait_signalled() Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Aaron Watry <[email protected]>
* clover: Run the associated action before an event is signalled.Francisco Jerez2017-09-202-11/+12
| | | | | | | | | | | | | | | | And define a method for other threads to wait until the action function associated with an event has been executed to completion. For hard events, this will mean waiting until the corresponding command has been submitted to the pipe driver, without necessarily flushing the pipe_context and waiting for the actual command to be processed by the GPU (which is what hard_event::wait() already does). This weaker kind of event wait will allow implementing blocking memory transfers efficiently. Acked-by: Aaron Watry <[email protected]> Reviewed-by: Jan Vesely <[email protected]>
* clover: Wrap event::wait_count in a method taking care of the required locking.Francisco Jerez2017-09-202-8/+14
| | | | | Acked-by: Aaron Watry <[email protected]> Reviewed-by: Jan Vesely <[email protected]>
* clover: add missing include to compat.hJan Vesely2017-09-181-0/+1
| | | | | | | | | | Fixes build issues with llvm-3.6 Fixes: 3115687f9b9830417c408228db2bc679e346bba6 (clover: Fix build after LLVM r313390) Signed-off-by: Jan Vesely <[email protected]> Tested-by: Gert Wollny <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* clover: Query and export half precision supportJan Vesely2017-09-183-3/+18
| | | | | | | | v2: PIPE_CAP_HALFS -> PIPE_SHADER_CAP_FP16 has_halfs -> has_halves Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* clover: Fix build after LLVM r313390Jan Vesely2017-09-152-1/+11
| | | | | | | v2: pass llvm context reference instead of a pointer Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* st/omx_bellagio: Rename state tracker and optionGurkirpal Singh2017-09-1511-1/+1
| | | | | | | | Changes --enable-omx option to --enable-omx-bellagio Signed-off-by: Gurkirpal Singh <[email protected]> Reviewed-and-Tested-by: Julien Isorce <[email protected]> Acked-by: Christian König <[email protected]>
* Revert "st/va: add enviromental variable to disable interlace"Leo Liu2017-09-071-4/+0
| | | | | | | | This reverts commit 10dec2de2d9f568675d66d736b48701fa26f7b50. The environment variable is no longer needed with the previous change Reviewed-by: Christian König <[email protected]>
* st/va: move YUV content to deinterlaced buffer when reallocated for encoderLeo Liu2017-09-071-1/+10
| | | | | | | | v2: use deinterlace common function v3: make sure deinterlace only Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: reallocate the buffer if the layout isn't supportedLeo Liu2017-09-071-9/+12
| | | | | | | | So that it makes more clear for buffer reallocation based on buffers layout for both decoder and encoder. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/omx: use vl/compositor helper function for YUV deinterlacingLeo Liu2017-09-071-30/+2
| | | | | | | v2: separate helper function in different patch Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* nine: always generate two-dimensional constant file accessesNicolai Hähnle2017-09-042-7/+5
| | | | | | Acked-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* st/va: exclude the buffer reallocation for encode caseLeo Liu2017-08-231-1/+1
| | | | | | | | | Since encoder only support de-interlaced buffers. v2: move to parameter call to tell dec/enc Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: enable P016 format i.e. reallocate buffer if format changedLeo Liu2017-08-221-0/+12
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium: remove TGSI opcode SCSMarek Olšák2017-08-221-4/+8
| | | | | | | use COS+SIN instead. Reviewed-by: Roland Scheidegger <[email protected]> Acked-by: Jose Fonseca <[email protected]>