summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* st/xa: Fix performance regression introduced by commit "Cache render target ↵Thomas Hellstrom2014-05-091-1/+1
| | | | | | | | | | | | surface" The mentioned commit has the nasty side-effect of turning off accelerated copies. Cc: "10.1 10.2" <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* clover: Destory pipe_screen when device does not support compute v2Tom Stellard2014-05-091-1/+4
| | | | | | | | v2: - Make sure screen was successfully created before destroying it. Cc: "10.2" <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* st/wgl: Advertise WGL_ARB_create_context(_profile).José Fonseca2014-05-071-0/+2
| | | | | | | | We added wglCreateContextAttribsARB but not the extension strings. This allows creation of GL 3.x contexts. Reviewed-by: Brian Paul <[email protected]>
* st/wgl: Honour request of 3.1 contexts through core profile where available.José Fonseca2014-05-071-2/+15
| | | | | | Port 5f493eed69f6fb11239c04119d602f1c23a68cbd from GLX. Reviewed-by: Brian Paul <[email protected]>
* st/egl: Flush resources before presentation (android - bug 77966)Paulo Sergio Travaglia2014-05-051-0/+7
| | | | | | | | | | [olv: Use the real name provided by the patch author. Ideally this could be moved to somewhere higher level so that we would not need to create a pipe context to flush resources. Plus, it is not clear if flushing resources for another context is valid.] Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* xa: fix segfaultRob Clark2014-05-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Fixes: Program received signal SIGSEGV, Segmentation fault. bind_samplers (comp=0x21b054, comp=0x21b054, ctx=0x211430) at ../../../../../src/gallium/state_trackers/xa/xa_composite.c:445 445 mask_pic->srf->tex->format); (gdb) bt #0 bind_samplers (comp=0x21b054, comp=0x21b054, ctx=0x211430) at ../../../../../src/gallium/state_trackers/xa/xa_composite.c:445 #1 xa_composite_prepare (ctx=0x211430, comp=comp@entry=0x21b054) at ../../../../../src/gallium/state_trackers/xa/xa_composite.c:488 #2 0xb6f454b4 in XAPrepareComposite (op=<optimized out>, pSrcPicture=<optimized out>, pMaskPicture=<optimized out>, pDstPicture=<optimized out>, pSrc=0x5b3ad8, pMask=0x0, pDst=0x5923b8) at msm-exa-xa.c:533 We can't yet handle solid fill mask, so explicitly reject that, rather than segfaulting. Otherwise DDX would need to check XA version to see if solid fill mask were supported. Signed-off-by: Rob Clark <[email protected]>
* st/vega: Prevent signed/unsigned comparisons.José Fonseca2014-05-021-5/+5
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* targets/dri: use a single version script to restict exported symbolsEmil Velikov2014-05-021-5/+0
| | | | | | | | | Rather than having multiple (almost) identical version scripts use a single one. Cc: Christian König <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* clover: Add a stub implementation of clCreateImage() v3Tom Stellard2014-05-024-2/+21
| | | | | | | | | | | | | | | | | Now that we are uisng the OpenCL 1.2 headers, applications expect all the OpenCL 1.2 functions to be implemented. This fixes linking errors with the piglit CL tests. v2: - Use c++ features - Fix error code handling v3: - Move <iostream> into api/util.hpp - Fix indentation Reviewed-by: Francisco Jerez <[email protected]>
* clover: Query drivers for max clock frequencyTom Stellard2014-04-293-1/+8
| | | | | | | | | | | | | | Igor Gnatenko: v2: PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY instead of PIPE_COMPUTE_MAX_CLOCK_FREQUENCY Bruno Jiménez: v3: Drivers report clock in Mhz Signed-off-by: Igor Gnatenko <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* clover: Stub implementation of CL 1.2 sub-devices.EdB2014-04-293-4/+66
| | | | | | | | | | | The implementation is basically a NOP but it conforms with OpenCL 1.2. [ Francisco Jerez: Initialize property return buffer for CL_DEVICE_PARTITION_PROPERTIES, CL_DEVICE_PARTITION_TYPE, CL_DEVICE_PARTITION_AFFINITY_DOMAIN, and make the latter a scalar rather than a vector. Some clean-up and code style fixes. ] Reviewed-by: Francisco Jerez <[email protected]>
* clover: Add clEnqueue{Marker, Barrier}WithWaitList.EdB2014-04-292-7/+43
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* clover: Align kernel argument sizes to nearest power of 2Jan Vesely2014-04-291-7/+16
| | | | | | | | | | | v2: use a new variable for aligned size add comment make both vars const only use the aligned value in argument constructors fix comment typo Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* clover: Avoid warnings from references to deprecated CL 1.1 APIs.Francisco Jerez2014-04-291-0/+2
| | | | Acked-by: Tom Stellard <[email protected]>
* clover: Update OpenCL headers to version 1.2 from Khronos.Francisco Jerez2014-04-291-2/+6
| | | | | | | The C++ headers are *not* updated because they rely on CL 1.2 APIs that we do not implement yet when the core CL 1.2 headers are present. Acked-by: Tom Stellard <[email protected]>
* st/dri: cleanup dri extension handlingEmil Velikov2014-04-282-25/+30
| | | | | | | | | | | | | | | Explicitly set the version that is implemented, as that may differ from the one defined in dri_interface.h. Use designated initialisers and constify whereever possible. Note: __DRIimageExtension should not be made const as it's modified at runtime. This patch should have no side effects on compilers that do not support designated initialisers, as the existing code in dri/common already uses them. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* st/xlib: Do minimal version checking in glXCreateContextAttribsARB.José Fonseca2014-04-241-19/+1
| | | | | | | | | | The current version checking is wrongly refusing to create 3.3 contexts; unsupported version are checked elsewhere; and the DRI path doesn't do this sort of checking neither. This enables piglit glsl 3.30 tests to run without skipping. Reviewed-by: Brian Paul <[email protected]>
* st/xlib: Honour request of 3.1 contexts through core profile where available.José Fonseca2014-04-241-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | The GLX_ARB_create_context_profile spec says: "If version 3.1 is requested, the context returned may implement any of the following versions: * Version 3.1. The GL_ARB_compatibility extension may or may not be implemented, as determined by the implementation. * The core profile of version 3.2 or greater." Mesa does not support GL_ARB_compatibility, and there are no plans to ever support it, therefore the only chance to honour a 3.1 context is through core profile, i.e, the 2nd alternative from the spec. This change does that. And with it piglit tests that require 3.1 contexts no longer skip. Assuming there is no objection with this change, src/glx/dri_common.c and src/gallium/state_trackers/wgl/stw_context.c should also be updated accordingly, given they have the same logic. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* st/omx/enc: implement frame reordering and B-framesChristian König2014-04-222-23/+87
| | | | Signed-off-by: Christian König <[email protected]>
* st/omx/enc: replace omx buffer with texture bufferLeo Liu2014-04-221-29/+185
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/xa: Cache render target surfaceThomas Hellstrom2014-04-171-3/+15
| | | | | | | | | | | | | | | | Otherwise it will trick the gallium driver into thinking that the render target has actually changed (due to different pipe_surface pointing to same underlying pipe_resource). This is really badness for tiling GPUs like adreno. This also appears to fix a rendering error with Motif on vmwgfx. Why that is is still under investigation. Based on an idea by Rob Clark. Cc: "10.0 10.1" <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* st/xa: scissor to help tilersRob Clark2014-04-174-0/+48
| | | | | | | | | | | | | | Keep track of the maximal bounds of all the operations and set scissor accordingly. For tiling GPU's this can be a big win by reducing the memory bandwidth spent moving pixels from system memory to tile buffer and back. You could imagine being more sophisticated and splitting up disjoint operations. But this simplistic approach is good enough for the common cases. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]>
* st/xa: remove unneeded argsRob Clark2014-04-175-12/+8
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]>
* st/omx/enc: separate input buffer private and task structureChristian König2014-04-112-59/+127
| | | | | | | Keep tasks as linked list, this way we can associate more than one encoding task with each buffer. Signed-off-by: Christian König <[email protected]>
* vl: add interface for H264 B-frame encodingChristian König2014-04-111-1/+7
| | | | Signed-off-by: Christian König <[email protected]>
* Partially revert "st/xa: Fix advertized version number and try to avoid ↵Emil Velikov2014-04-091-3/+3
| | | | | | | | | | | | | | | | future discrepancies" This reverts commit 61bedc3d6b08943f015f9d590c07a6af36c2a92c. As the header is the one defining the API/ABI and is distributed during installation, we should be using it rather than re-defining the XA version in configure.ac. Bump the version in the header to 2.2.0, to reflect what was the original intent of commit 42158926c6d7d3ddbe61b9a04d60544ff1b50a96. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]>
* st/omx/enc: cleanup omx/vid_enc.cLeo Liu2014-04-081-102/+118
| | | | | | | cleanup by moving each step into a separate function Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/omx/enc: allocate input buffer private on demandChristian König2014-04-081-82/+42
| | | | | | | | v2: move allocation to a function as first step to clean vid_enc_EncodeFrame Signed-off-by: Christian König <[email protected]> Signed-off-by: Leo Liu <[email protected]>
* st/xa: Make sure unused samplers are set to NULLThomas Hellstrom2014-04-071-2/+3
| | | | | | | | | renderer_copy_prepare was setting the first sampler but never telling the cso code how many samplers were actually used. Fix this. Cc: "10.1" <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/xa: Bind destination before setting new stateThomas Hellstrom2014-04-071-3/+3
| | | | | | | | | | | | | | | | | | Binding a new destination may cause the svga driver to emit draw calls while propagating the surface. Make sure this doesn't happen in the middle of sampler state setup where state may be incosistent. In practice, surface propagation should never happen here and even if it did, it wouldn't be a valid reason for the svga driver to emit partially set up state, but to avoid future uncertainties, make sure this doesn't happen anyway. Found while auditing the state tracker for inconsistent sampler state / sampler view setup. Cc: "10.1" <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* clover: Document that the *obj*() helpers already take care of object ↵Francisco Jerez2014-04-051-4/+6
| | | | validation.
* st/xa: Fix advertized version number and try to avoid future discrepanciesThomas Hellstrom2014-04-041-3/+3
| | | | | | | | | | The xa version number had to be set in two places. In configure.ac and in xa_tracker.h. Furthermore, xa_tracker.h is an installed header so we can't use mesa internal defines. So therefore, at configure time, modify the xa_tracker.h header to use the version given by configure.ac Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* st/wgl: Remove wgl*Gallium*MESA().José Fonseca2014-04-034-103/+0
| | | | | | | These were only used by the Python state tracker, which was removed, hence they have no practical use. Reviewed-by: Brian Paul <[email protected]>
* st/omx/dec: fix possible segfault at eosChristian König2014-03-261-1/+1
| | | | Signed-off-by: Christian König <[email protected]>
* clover: Fix typo in validate_object()Tom Stellard2014-03-211-1/+1
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* clover: Fix region size error checking in some buffer transfer commands.Francisco Jerez2014-03-181-5/+16
| | | | Tested-by: Tom Stellard <[email protected]>
* egl/main: Stop using EGLNative types internallyChad Versace2014-03-171-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internally, much of the EGL code uses EGLNativeDisplayType, EGLNativeWindowType, and EGLPixmapType. However, the EGLNative type often does not match the variable's actual type. The concept of EGLNative types are a bad match for Linux, as explained below. And the EGL platform extensions don't use EGLNative types at all. Those extensions attempt to solve cross-platform issues by moving the EGL API away from the EGLNative types. The core of the problem is that eglplatform.h can define each EGLNative type once only, but Linux supports multiple EGL platforms. To work around the problem, Mesa's eglplatform.h contains multiple definitions of each EGLNative type, selected by feature macros. Mesa expects EGL clients to set the feature macro approrpiately. But the feature macros don't work when a single codebase must be built with support for multiple EGL platforms, *such as Mesa itself*. When building libEGL, autotools chooses the EGLNative typedefs based on the first element of '--with-egl-platforms'. For example, '--with-egl-platforms=x11,drm,wayland' defines the following: typedef Display* EGLNativeDisplayType; typedef Window EGLNativeWindowType; typedef Pixmap EGLNativePixmapType; Clearly, this doesn't work well for Wayland and GBM. Mesa works around the problem by casting the EGLNative types to different things in different files. For sanity's sake, and to prepare for the EGL platform extensions, this patch removes from egl/main and egl/dri2 all internal use of the EGLNative types. It replaces them with 'void*' and checks each explicit cast with a static assertion. Also, the patch touches egl_gallium the minimal amount to keep it compatible with eglapi.h. Signed-off-by: Chad Versace <[email protected]>
* st/dri: flush drawable textures before unreferencingMarek Olšák2014-03-111-0/+8
| | | | | | This fixes piglit/fbo-sys-blit with fast clear on radeonsi. Reviewed-by: Michel Dänzer <[email protected]>
* st/dri: build the drm backend when libdrm is presentEmil Velikov2014-03-111-1/+5
| | | | | | | Prevent build issues on systems lacking libdrm. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jon TURNEY <[email protected]>
* gallium: rename R4A4 and A4R4 formats to match their swizzleMarek Olšák2014-03-072-5/+5
| | | | | | Like L4A4. Reviewed-by: Brian Paul <[email protected]>
* st/vdpau: Add rotation v2Kusanagi Kouichi2014-03-071-0/+6
| | | | | | | v2: add static asserts Signed-off-by: Kusanagi Kouichi <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/omx/enc: fix crash on destructionChristian König2014-03-071-8/+15
| | | | Signed-off-by: Christian König <[email protected]>
* clover: Fix build against LLVM SVN r203065 or newerMichel Dänzer2014-03-071-0/+4
| | | | | | llvm/Linker.h was moved to llvm/Linker/Linker.h. Reviewed-by: Tom Stellard <[email protected]>
* clover: Use correct LLVM version in #if for DataLayout constructionTom Stellard2014-03-041-1/+1
| | | | Spotted by Michel Dänzer.
* st/osmesa: check buffer size when searching for buffersBrian Paul2014-03-041-4/+7
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75543 Cc: "10.1" <[email protected]>
* st/vdpau: fix possible NULL dereferenceGrigori Goronzy2014-03-031-4/+4
| | | | Reviewed-by: Christian König <[email protected]>
* st/omx: always advertise all componentsChristian König2014-03-032-33/+23
| | | | | | | | | | omx_component_library_Setup should return all entrypoints the library implements, independent of what is available on the current hardware. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74944 Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* clover: Fix building with latest llvmBruno Jiménez2014-03-031-3/+2
| | | | | Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* st/dri: add support for dma-buf importer (DRIimage v8)Dave Airlie2014-03-032-1/+57
| | | | | | | | This is just a simple implementation that stores the extra values into the DRIimage struct and just uses the fd importer. I haven't looked into what is required to import YUV or deal with the extra parameters. Signed-off-by: Dave Airlie <[email protected]>
* st/dri: move fourcc->format conversion to a common placeDave Airlie2014-03-031-46/+35
| | | | | | Before I cut-n-paste this a 3rd time lets consolidate it. Signed-off-by: Dave Airlie <[email protected]>