summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* st/va: disable MPEG4 by default v2Christian König2015-12-071-1/+9
| | | | | | | | | | | | The workarounds are too hacky to enable them by default and otherwise MPEG4 doesn't work reliably. v2: add docs/envvars.html, CC stable and fix typos Signed-off-by: Christian König <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (v1) Reviewed-by: Ilia Mirkin <[email protected]> (v1) Cc: "11.1.0" <[email protected]>
* st/va: move HEVC functions into separate file v2Christian König2015-12-074-168/+215
| | | | | | v2: actually copy all of it Signed-off-by: Christian König <[email protected]>
* xvmc: force assertion in XvMC testsGiuseppe Bilotta2015-12-045-0/+10
| | | | | | | | | | | | | | | This follows the src/util/u_atomic_test.c model of undefining NDEBUG unconditionally throughouth the XvMC tests, to force asserts regardless of debug mode. The comment on u_atomic_test.c is also fixed (read 'debug' where it should have been 'release'). v2: s/debug/release/ in relevant comments Signed-off-by: Giuseppe Bilotta <[email protected]> [Emil Velikov: keep the src/util/ hunk as separate patch] Signed-off-by: Emil Velikov <[email protected]>
* st/wgl: add new stw_ext_rendertexture.c fileBrian Paul2015-12-031-0/+252
| | | | | | This should have been included in the previous commit. Signed-off-by: Brian Paul <[email protected]>
* st/wgl: add support for WGL_ARB_render_textureBrian Paul2015-12-039-10/+118
| | | | | | | | | | | There are a few legacy OpenGL apps on Windows which need this extension. We basically use glCopyTex[Sub]Image to implement wglBindTexImageARB (see the implementation notes for details). v2: refactor code to use st_copy_framebuffer_to_texture() helper function. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* clover: Handle NULL devices returned by pipe_loader_probe() v2Tom Stellard2015-12-011-1/+2
| | | | | | | | | | | | | | | | | | | | | When probing for devices, clover will call pipe_loader_probe() twice. The first time to retrieve the number of devices, and then second time to retrieve the device structures. We currently assume that the return value of both calls will be the same, but this will not be the case if a device happens to disappear between the two calls. When a device disappears, the pipe_loader_probe() will add a NULL device to the device list, so we need to handle this. v2: - Keep range for loop Reviewed-by: Francisco Jerez <[email protected]> Acked-by: Emil Velikov <[email protected]> CC: <[email protected]>
* st/va: also retrieve reference frames info for h264Julien Isorce2015-12-011-0/+52
| | | | | | | | Other hardwares than AMD require to parse: VAPictureParameterBufferH264.ReferenceFrames[16] Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: delay decoder creation until max_references is knownJulien Isorce2015-12-014-34/+68
| | | | | | | | | | | | | | | | | | In general max_references cannot be based on num_render_targets. This patch allows to allocate buffers with an accurate size. I.e. no more than necessary. For other codecs it is a fixed value 2. This is similar behaviour as vaapi/vdpau-driver. For now HEVC case defaults to num_render_targets as before. But it could also benefits this change by setting a more accurate max_references number in handlePictureParameterBuffer. Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/xa: fd management cleanupsEmil Velikov2015-11-291-1/+8
| | | | | | | | | Analogous to previous commit. Spotted by Coverity (CID 1339866) Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]>
* st/dri: fd management cleanupsEmil Velikov2015-11-291-2/+14
| | | | | | | | | | | Add some checks if the original/dup'd fd is valid and ensure that we don't leak it on error. The former is implicitly handled within the pipe_loader, although let's make things explicit and check beforehand. Spotted by Coverity (CID 1339865) Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]>
* st/va: add missing break statementEmil Velikov2015-11-291-0/+1
| | | | | | | | | | | | | | Earlier commit factored out the mpeg4 IQ matrix handling into separate function, although it forgot to add a break in its case statement. Thus the data ended up partially overwritten as the mpeg4 and h265 structs are members of the desc union. Spotted by Coverity (CID 1341052) Fixes: 64761a841db "st/va: move MPEG4 functions into separate file" Cc: Julien Isorce <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Christian König <[email protected]>
* clover: fix tgsi compiler crash with invalid srcSerge Martin2015-11-261-0/+5
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* st/va: add missing profiles in PipeToProfile's switch.Julien Isorce2015-11-261-0/+7
| | | | | | | Otherwise assert is raised from vlVaQueryConfigProfiles's for loop. Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium: remove unused function declarationsEmil Velikov2015-11-251-1/+0
| | | | | | | | Unused as of commit 23fb11455b4 "{st,targets}/dri: use static/dynamic pipe-loader" Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* st/va: fix indentationChristian König2015-11-241-7/+7
| | | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Julien Isorce <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/va: move MPEG4 functions into separate fileChristian König2015-11-244-180/+220
| | | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Julien Isorce <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/va: move VC-1 functions into separate fileChristian König2015-11-244-35/+70
| | | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Julien Isorce <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/va: move H264 functions into separate fileChristian König2015-11-244-72/+121
| | | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Julien Isorce <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/va: move MPEG12 functions into separate fileChristian König2015-11-244-49/+92
| | | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Julien Isorce <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/va: move post processing function into own fileChristian König2015-11-244-57/+100
| | | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Julien Isorce <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/va: fix post process dirty area handlingChristian König2015-11-241-4/+1
| | | | | | | | | | The dirty area in this call isn't related to the screen at all. v2: set clear dirty area to false as well Signed-off-by: Christian König <[email protected]> Reviewed-by: Julien Isorce <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/dri: NULL check the pscreen earlierEmil Velikov2015-11-213-16/+14
| | | | | | | | We delay the null check only to jump through hoops to work around that. Check early to make our lives easier. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* st/dri: Don't close the drm fd on failureEmil Velikov2015-11-211-2/+2
| | | | | | | | | | | | | Ported from an identically named commit in st/xa commit 35cf3831d71770211f29da6608313dc1f6213d7b Author: Thomas Hellstrom <[email protected]> Date: Thu Jul 3 02:07:36 2014 -0700 st/xa: Don't close the drm fd on failure v2 Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* {st,targets}/xa: use static/dynamic pipe-loaderEmil Velikov2015-11-212-19/+2
| | | | | | | Analogous to previous commits. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* {st,targets}/dri: use static/dynamic pipe-loaderEmil Velikov2015-11-216-35/+11
| | | | | | | | | | Covert DRI to use only the pipe-loader interface. With drisw_create_screen and kms_swrast_create_screen replaced by their pipe-loader equivalent, we can now drop them. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* target-helpers: move the DRI specifics to the targetEmil Velikov2015-11-211-0/+3
| | | | | | | | | | Rather than having all targets include the file, with only some defining the relevant guard macro, just move things where they are used. v2: rebase on top of virgl support. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* gallium: remove library_path argument from pipe_loader_create_screen()Emil Velikov2015-11-216-9/+4
| | | | | | | | | | | | | | | Currently the location is determined at configure/build time and consistently copied across gallium. Just remove the extra argument, and use PIPE_SEARCH_DIR where appropriate. This will allow us to remove the duplication in the *configuration and *screen_create APIs by moving util_dl_get_proc_address() and friends to probe time. v2: rebase on top of vl_winsys_drm.c addition Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* automake: use GALLIUM_PIPE_LOADER_DEFINES only where applicableEmil Velikov2015-11-213-3/+0
| | | | | | | | As of last commit we no longer need the defines in order to have the function prototypes. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* st/vdpau: use the vl_screen dispatchEmil Velikov2015-11-202-11/+11
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* st/xvmc: use the vl_screen dispatchEmil Velikov2015-11-202-12/+11
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* st/va: use the vl_screen dispatchEmil Velikov2015-11-203-16/+9
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* st/omx: use the vl_screen dispatchEmil Velikov2015-11-201-6/+5
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl: rename vl_screen_create to vl_dri2_screen_createEmil Velikov2015-11-204-4/+4
| | | | | | | | | | | In a preparation of having proper multi-platform/backend handling in VL. With follow up commits we'll introduce a dispatch within vl_screen similar to the one in pipe_screen. This way any VL state-tracker can operate seamlessly, considering the backend/platform is properly setup. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* st/va: trivial cleanupEmil Velikov2015-11-201-9/+2
| | | | | | | Drop the temporary variable and fold the two conditional. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* st/omx: straighten get/put_screenEmil Velikov2015-11-201-16/+16
| | | | | | | | | | | | | | | | | | | | | The current code is busted in a number of ways. - initially checks for omx_display (rather than omx_screen), which may or may not be around. - blindly feeds the empty env variable string to loader_open_device() - reads the env variable every time get_screen is called - the latter manifests into memory leaks, and other issues as one sets the variable between two get_screen calls. Additionally it cleans up a couple of extra bits - drops unneeded set/check of omx_display. - make the teardown (put_screen) order was not symmetrical to the setup (get_screen) v2: Drop the "is empty string" check (Leo) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/wgl: add a comment about recursive locking in stw_make_current()Brian Paul2015-11-121-0/+4
| | | | | Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: add a lock assertion in stw_framebuffer_from_hwnd_locked()Brian Paul2015-11-121-0/+1
| | | | | Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: add some mutex checking codeJosé Fonseca2015-11-121-0/+26
| | | | | | | | | | | This would have caught the locking bug that was fixed in the earlier "st/wgl: fix locking issue in stw_st_framebuffer_present_locked()" patch. v2: minor coding style changes by Brian. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: rename stw_framebuffer_release() to stw_framebuffer_unlock()Brian Paul2015-11-125-19/+19
| | | | | | | To match the new stw_framebuffer_lock() function. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: reimplement stw_framebuffer::mutex with CRITICAL_SECTIONBrian Paul2015-11-124-29/+32
| | | | | | | | v2: update comments on the stw_framebuffer::mutex field regarding locking order. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: include u_debug.hBrian Paul2015-11-123-0/+6
| | | | | | | | To get declaration for debug_printf() directly instead of getting it indirectly through os_thread.h Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: reimplement stw_device::fb_mutex with CRITICAL_SECTIONBrian Paul2015-11-123-15/+29
| | | | | Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: re-implement stw_device::ctx_mutex with CRITICAL_SECTIONBrian Paul2015-11-123-19/+34
| | | | | | | | | This is Windows-only code so we can use the native Win32 functions for critical sections. This will also allow us to (cleanly) add some mutex check/debug code in subsequent patches. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: clarify code in stw_framebuffer_from_hwnd_locked()Brian Paul2015-11-111-2/+2
| | | | | | | | | Just a minor code change to make it obvious that NULL is returned when we don't find the given HWND. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* st/wgl: improve some function commentsBrian Paul2015-11-111-6/+30
| | | | | | | | | In particular, explain when stw_framebuffer objects are locked/unlocked/etc. Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* st/wgl: whitespace/formatting fixesBrian Paul2015-11-113-63/+48
|
* st/wgl: fix locking issue in stw_st_framebuffer_present_locked()Brian Paul2015-11-111-0/+3
| | | | | | | | | | | | | When stw_st_framebuffer_present_locked() is called, the stw_framebuffer's mutex will already be locked. Normally, the stw_framebuffer_present_locked() function calls stw_framebuffer_release() to unlock the mutex when it's done. But if for some reason the 'resource' pointer in stw_st_framebuffer_present_locked() is null, we'd return without unlocking the stw_framebuffer. This fixes that to avoid potential deadlocks. Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: add null pointer check for HUD textureBrian Paul2015-11-091-1/+3
| | | | | | Fixes crash when using HUD with Nobel Clinician Viewer. Reviewed-by: Jose Fonseca <[email protected]>
* st/wgl: fix double-present on swapbuffers bugBrian Paul2015-11-093-20/+12
| | | | | | | | | | | | | | | | | | The stw_st_framebuffer_present_locked() function was getting called twice per SwapBuffers. First, when st_context_iface::flush() was called from DrvSwapBuffers() because the ST_FLUSH_FRONT flag was given. Second, by stw_st_swap_framebuffer_locked() which does the actual SwapBuffers. Two code changes: 1. Pass ST_FLUSH_END_OF_FRAME, instead of ST_FLUSH_FRONT. 2. Move the implementation of stw_flush_current_locked() into DrvSwapBuffers() since it's not called anywhere else. Not much change in perf for benchmarks like Lightsmark, but some simple Mesa demos are measurably faster. Reviewed-by: José Fonseca <[email protected]>
* st/wgl: reorder pixel formats to put MSAA formats lastBrian Paul2015-11-091-29/+32
| | | | | | | | | | | | | And put 8-bit/channel formats before 5/6/5 formats. The ChoosePixelFormat() function seems to be finicky about format selection. Putting the MSAA formats after the non-MSAA formats means most apps get a low-numbered format. Now we generally get the same pixel format regardless of whether using vgpu9 or 10. VMware bug 1455030 Reviewed-by: José Fonseca <[email protected]>