summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* clover: Calculate the serialized size of a module efficiently.Francisco Jerez2014-06-193-4/+34
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Optimize module serialization for vectors of fundamental types.Francisco Jerez2014-06-191-1/+22
| | | | Tested-by: Tom Stellard <[email protected]>
* clover: Don't use llvm's global contextTom Stellard2014-06-191-6/+9
| | | | | | | | | | An LLVMContext should only be accessed by a single and using the global context was causing crashes in multi-threaded environments. Now we use a separate context for each compile. Reviewed-by: Francisco Jerez <[email protected]> CC: "10.1 10.2" <[email protected]>
* clover: Prevent Clang from printing number of errors and warnings to stderr.Tom Stellard2014-06-191-0/+5
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=78581 CC: "10.1 10.2" <[email protected]>
* st/omx/enc: implement h264 level supportLeo Liu2014-06-181-0/+39
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/st/omx: fix switch-case indentation in vid_enc.cLeo Liu2014-06-181-16/+16
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* clover: query driver for the max number of compute unitsBruno Jiménez2014-06-123-1/+8
| | | | | Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* egl/gallium: Set defines for supported APIs when using automakeNiels Ole Salscheider2014-06-121-0/+20
| | | | | | | | | | | | This fixes automake builds which are broken since b52a530ce2aada1967bc8fefa83ab53e6a737dae. v2: This patch also adds the FEATURE_* defines back to targets/egl-static for Android and Scons that have been removed in the mentioned commit. Signed-off-by: Niels Ole Salscheider <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79885 Reviewed-by: Emil Velikov <[email protected]>
* gbm: Remove 64x64 restriction from GBM_BO_USE_CURSORMichel Dänzer2014-06-121-1/+1
| | | | | | | | | | GBM_BO_USE_CURSOR_64X64 is kept so that existing users of GBM continue to build, but it no longer rejects widths or heights other than 64. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79809 Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* st/omx/enc: enable b framesLeo Liu2014-06-042-3/+5
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/omx/enc: implement h264 profile supportLeo Liu2014-06-042-2/+49
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* wgl: Disable CRT message boxes when Windows system error messages boxes are ↵José Fonseca2014-06-041-0/+2
| | | | | | | | | | disabled. At least on MSVC we statically link against the CRT, so we must disable the CRT message boxes if we want unattended testing. The messages are convenient when running manually, so let them be if the system error message boxes are not disabled.
* st/wgl: use _debug_printf() instead of fprintf()Brian Paul2014-05-301-7/+3
| | | | | | | | This should print output both for debug and release builds. Suggested by Jose. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: formatting fixes in stw_framebuffer.cBrian Paul2014-05-301-82/+70
| | | | | | And remove some unneeded #includes and INLINE qualifiers. Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: make stw_lookup_context_locked() an inline functionBrian Paul2014-05-302-15/+9
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: fix implementation of wglCreateContextAttribsARB()Brian Paul2014-05-303-22/+136
| | | | | | | | | | | | | | | | | | | | wglCreateContextAttribsARB() didn't work previously since it returned a context ID that wasn't allocated by OPENGL32.DLL. So if that context ID was later passed to wglMakeCurrent(), etc. it was rejected. Now when wglCreateContextAttribsARB() is called we actually call wglCreateContext() in order to get a valid context ID. Then we replace the context data which was created with new context data which reflects the arguments passed to wglCreateContextAttribsARB(). If there were a DrvCreateContextAttribs() function in the ICD this work-around wouldn't be necessary. Reviewed-by: Charmaine Lee <[email protected]> Conflicts: src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c src/gallium/state_trackers/wgl/stw_getprocaddress.c
* st/wgl: add debug code to check that pixel format initialization workedBrian Paul2014-05-301-3/+9
| | | | | | | If the assertion fails, it means something is really broken. Before, if this happened we reverted to the GDI renderer without any warning. Reviewed-by: Matthew McClure <[email protected]>
* st/wgl: change PFD_SWAP_COPY to PFD_SWAP_EXCHANGE.Brian Paul2014-05-301-1/+1
| | | | | | | | To reflect our actual SwapBuffers implementation. See stw_st_swap_framebuffer_locked(). This fixes various rendering issues with SolidEdge. Reviewed-by: Jose Fonseca <[email protected]>
* st/egl: do not link against libloaderEmil Velikov2014-05-291-1/+0
| | | | | | | | | | | | | | | | | Move the link to the final targets, like any other place in mesa/gallium. This allows better visibilty and will prevent us from including the library archive twice. Resolves multiple definition of `loader_get_pci_id_for_fd' multiple definition of `loader_get_pci_id_for_fd' Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79263 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79382 Cc: Chia-I Wu <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chia-I Wu <[email protected]> Tested-by: Michel Dänzer <[email protected]>
* st/omx/enc: implement restricted b frames patternLeo Liu2014-05-272-2/+10
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium/egl: st_profiles are build time decision, treat them as suchEmil Velikov2014-05-254-10/+28
| | | | | | | | | | | The profiles are present depending on the defines at build time. Drop the extra functions and feed the defines directly into the state-tracker at build time. v2: Drop unused variable i. Acked-by: Chia-I Wu <[email protected]> (v1) Signed-off-by: Emil Velikov <[email protected]>
* Make DRI dependencies and build depend on the targetJon TURNEY2014-05-232-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't require xcb-dri[23] etc. if we aren't building for a target with DRM, as we won't be using dri[23] - Enable a more fine-grained control of what DRI code is built, so that a libGL using direct swrast can be built on targets which don't have DRM. The HAVE_DRI automake conditional is retired in favour of a number of other conditionals: HAVE_DRI2 enables building of code using the DRI2 interface (and possibly DRI3 with HAVE_DRI3) HAVE_DRISW enables building of DRI swrast HAVE_DRICOMMON enables building of target-independent DRI code, and also enables some makefile cases where a more detailled decision is made at a lower level. HAVE_APPLEDRI enables building of an Apple-specific direct rendering interface, still which requires additional fixing up to build properly. v2: Place xfont.c and drisw_glx.c into correct categories. Update 'make check' as well Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* 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]>