aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* clover: Fix build against LLVM SVN >= r266163Michel Dänzer2016-04-141-0/+14
| | | | | | createInternalizePass now takes a callback instead of a StringSet. Reviewed-by: Francisco Jerez <[email protected]>
* va: check null context in vlVaDestroyContextIurie Salomov2016-04-131-0/+4
| | | | | Signed-off-by: Iurie Salomov <[email protected]> Reviewed-by: Julien Isorce <[email protected]>
* st/va: avoid dereference after free in vlVaDestroyImageThomas Hindoe Paaboel Andersen2016-04-081-1/+3
| | | | | | Cc: "11.1 11.2" <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Julien Isorce <[email protected]>
* Revert "clover: Fix build against clang SVN >= r265359"Michel Dänzer2016-04-071-3/+0
| | | | | | | | This reverts commit 0daab9878d2b96356cf667591a2c877d912be52d. The corresponding clang change was reverted. Trivial.
* clover: Fix build against clang SVN >= r265359Michel Dänzer2016-04-051-0/+3
| | | | | Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* gallium: distinguish between shader IR in get_compute_paramBas Nieuwenhuizen2016-04-021-14/+17
| | | | | | | | | | | | | For radeonsi, native and TGSI use different compilers and this results in different limits for different IR's. The set we strictly need for radeonsi is only the MAX_BLOCK_SIZE and MAX_THREADS_PER_BLOCK params, but I added a few others as shader related that seemed like they would also typically depend on the compiler. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* gallium: add global buffer memory barrier bitBas Nieuwenhuizen2016-04-021-0/+2
| | | | | | | | | Currently radeonsi synchronizes after every dispatch and Clover does nothing to synchronize. This is overzealous, especially with GL compute, so add a barrier for global buffers. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* gallium: add compute shader IR typeBas Nieuwenhuizen2016-04-021-0/+1
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/vdpau: correct null checkThomas Hindoe Paaboel Andersen2016-03-301-4/+4
| | | | | | | The null check of result was the wrong way around. Also, move memset and dereference of result after the null check. Reviewed-by: Christian König <[email protected]>
* st/vdpau: implement the new DMA-buf based interop v2Christian König2016-03-294-3/+116
| | | | | | | | | That should allow us to get away from passing internal structures around. v2: rebased Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/vdpau: move FormatRGBAToPipe into the interopChristian König2016-03-294-28/+8
| | | | | | | We are going to need that in the Mesa state tracker as well. Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/vdpau: use linear layout for output surfacesChristian König2016-03-291-1/+2
| | | | | | | | Works around a bug in radeonsi and tiling is actually not very beneficial in this use case. Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/xa: emit sampler view declarations in shadersBrian Paul2016-03-251-0/+19
| | | | | | | Fixes recent regressions with the VMware gallium driver. Reviewed-by: Charmaine Lee <[email protected]> Tested-by: Charmaine Lee <[email protected]>
* st/omx/dec: Correct the timestampingNishanth Peethambaran2016-03-204-8/+34
| | | | | | | | | Attach the timestamp to the dpb buffer and use that timestamp while pushing buffer from dpb list to the omx client. Reviewed-by: Christian König <[email protected]> Signed-off-by: Nishanth Peethambaran <[email protected]> Cc: "11.1 11.2" <[email protected]>
* st/omx: Remove trailing spacesNishanth Peethambaran2016-03-203-31/+31
| | | | | | Reviewed-by: Christian König <[email protected]> Signed-off-by: Nishanth Peethambaran <[email protected]> Cc: "11.1 11.2" <[email protected]>
* gallium/winsys/drm: add offset to struct winsys_handleChristian König2016-03-171-0/+2
| | | | | | | We are going to need this for EGL_EXT_image_dma_buf_import. Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* clover: Fix pipe_grid_info.indirect not being initialized.Hans de Goede2016-03-141-1/+1
| | | | | | | | | | | | | | After pipe_grid_info.indirect was introduced, clover was not modified to set it causing it to pass uninitialized memory for it to launch_grid. This commit fixes this by zero-ing the entire pipe_grid_info struct when declaring it, to avoid similar problems popping-up in the future. Cc: "11.2" <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> [ Francisco Jerez: Trivial codestyle fix. ] Reviewed-by: Francisco Jerez <[email protected]>
* st/va: add HEVC main 10 profileBoyuan Zhang2016-03-111-1/+4
| | | | | | Signed-off-by: Boyuan Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium: add external usage flags to resource_from(get)_handle (v2)Marek Olšák2016-03-096-12/+30
| | | | | | | | | This will allow drivers to make better decisions about texture sharing for DRI2, DRI3, Wayland, and OpenCL. v2: add read/write flags, take advantage of __DRI_IMAGE_USE_BACKBUFFER Reviewed-by: Axel Davy <[email protected]>
* st/xlib: Don't destroy screen on XCloseDisplay()George Kyriazis2016-03-041-3/+7
| | | | | | | | | screen may still be used by other resources that are not yet freed. To correctly fix this there will be a need to account for resources differently, but this quick fix is not any worse than the original code that leaked screens anyway. Reviewed-by: Brian Paul <[email protected]>
* st/xlib: Hang off screen destructor off main XCloseDisplay() callback.George Kyriazis2016-03-043-35/+27
| | | | | | | | This resolves some order dependencies between the already existing callback the newly created one. Tested-by: Brian Paul <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/xlib: Support unlimited number of display connectionsGeorge Kyriazis2016-03-041-19/+103
| | | | | | | | | | | | | | | There is a limit of 10 display connections, which was a problem for apps/tests that were continuously opening/closing display connections. This fix uses XAddExtension() and XESetCloseDisplay() to keep track of the status of the display connections from the X server, freeing mesa-related data as X displays get destroyed by the X server. Poster child is the VTK "TimingTests" Tested-by: Brian Paul <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/nine: Fix second Multithreading issue with MANAGED buffersAxel Davy2016-02-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | Here is another threading issue with MANAGED buffers: Thread 1: buffer creation Thread 1: buffer lock Thread 2: Draw call Thread 1: writes data Thread 1: Unlock Without this patch, the buffer is initially dirty and in the list of things to upload after its creation. The draw call will then upload the data and unset the dirty flag, and the Unlock won't trigger a second upload. Fixes regression introduced by cc0114f30b587a10766ec212afb3ad356099ef23: "st/nine: Implement Managed vertex/index buffers" Cc: "11.2" <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix Multithreading issue with MANAGED buffersAxel Davy2016-02-291-2/+6
| | | | | | | | | | | | | | | | | | | | d3d calls are protected by mutexes, however if app is doing in two threads: Thread 1: buffer Lock Thread 2: Draw call Thread 1: writes data Thread 1: Unlock Then before this patch, the Draw call would begin to upload the buffer. Solves this by moving the moment we add the buffer to the queue of things to upload (We move it from Lock time to Unlock time). Cc: "11.2" <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Handle READONLY for buffer MANAGED poolAxel Davy2016-02-291-7/+10
| | | | | | | | READONLY won't trigger an upload. Cc: "11.2" <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Use Position input helper for ps3 declared inputsAxel Davy2016-02-291-0/+7
| | | | | | | | | When the semantic is Position (which can happen with index 0 only), use the helper to get Position input. Cc: "11.2" <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Introduce helper for Position shader inputAxel Davy2016-02-291-16/+15
| | | | | | Cc: "11.2" <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/clover: Add libelf cflags to the buildKoop Mast2016-02-291-0/+1
| | | | | | | | | | | | | Otherwise the build will fail, when the library is in a non default location. v2 [Emil Velikov] - drop the unneeded cflags from targets/opencl. Cc: "11.1 11.2" <[email protected]> Fixes: 7f585a6a98d "configure.ac: use pkg-config for libelf" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93524 Signed-off-by: Emil Velikov <[email protected]>
* st/nine: don't forget to bundle the nine_limits.h fileEmil Velikov2016-02-251-0/+1
| | | | | | | | Without this mesa 11.2.0-rc1 ended up busted :-( Cc: "11.2" <[email protected]> Repored-by: Ondřej Súkup <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* clover: fix build failure since bfd695eSerge Martin2016-02-141-3/+3
| | | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* gallium: add a new interface for pipe_context::launch_grid()Samuel Pitoiset2016-02-131-5/+8
| | | | | | | | | | | | | This introduces pipe_grid_info which contains all information to describe a launch_grid call. This will be used to implement indirect compute in the same fashion as indirect draw. Changes from v2: - correctly initialize pipe_grid_info for nv50/nvc0 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* st/nine: Implement Managed vertex/index buffersAxel Davy2016-02-125-9/+121
| | | | | | | | | | | | | | | | | We were implementing those the same way than the default pool, which is sub-optimal. The buffer is supposed to return pointer to a ram copy when user locks, and automatically update the vram copy when needed. v2: Rename NineBuffer9_Validate to NineBuffer9_Upload Rename validate_buffers to update_managed_buffers Initialize NineBuffer9 managed fields after the resource is allocated. In case of allocation failure, when the dtor is executed, This->base.pool is then rightfully set. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Align stack for entry pointsAxel Davy2016-02-1253-687/+703
| | | | | | | | | | For 32 bits, incoming stack is 4-byte aligned. We need to realign the stack to 16-byte at some point, or there are issues later (crash with SSE, llvm, etc). This patch chooses to align the stack at API entry points. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Drop path for ureg_NRM and ureg_CLAMPAxel Davy2016-02-121-24/+4
| | | | | | | | using MIN/MAX is fine instead of CLAMP. NRM doesn't exist anymore. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Remove usage of SQRT in ff codeAxel Davy2016-02-121-1/+3
| | | | | | | SQRT is not supported everywhere, so replace it by RSQ + MUL and handle case <= 0. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix stateblocks crashes with lightsAxel Davy2016-02-121-8/+32
| | | | | | | | We had several issues of crashes with it. This should fix it. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: SCRATCH does support all formatsAxel Davy2016-02-129-22/+35
| | | | | | | | | Add new argument to d3d9_to_pipe_format_checked to be able to bypass format support checks. This argument is set to TRUE when the requested Pool is SCRATCH. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Add format checks to create_zs_or_rt_surfaceAxel Davy2016-02-121-0/+3
| | | | | | | | | | | | | | Returns INVALIDCALL when trying to create a surface of unsupported format. In practice, apps are supposed to check for format support before trying to create a render target of that format. However some bad behaving apps could just try to create the surface and deduce if it failed that it wasn't supported. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Support ATI1/ATI2 for CubeTextureAxel Davy2016-02-123-7/+4
| | | | | | | | | Texture and CubeTexture use common code, and thus ATI1/ATI2 is already implemented for CubeTexture. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Clean pSharedHandle Texture ctors checksAxel Davy2016-02-123-18/+21
| | | | | | | Clarify the behaviour and clean the checks Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Move texture creation checksAxel Davy2016-02-124-13/+13
| | | | | | | | | | We were having checks at both Create*Texture functions and in ctors. Move all Create*Texture checks to ctors. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Clean useless code in texture9.cAxel Davy2016-02-121-7/+1
| | | | | | | | This->base.base.resource is worth NULL for SYSTEMMEM textures. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Do not set SHARED flag for shared textures.Axel Davy2016-02-121-3/+0
| | | | | | | | We do not support shared textures, thus no need to set the shared flag. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Do not set resource usage for SYSTEMMEMAxel Davy2016-02-123-13/+4
| | | | | | | | | | | We do not create a resource for SYSTEMMEM textures, thus we do not need to set resource usage. The only exception is vertexbuffer SYSTEMMEM, since we do use a pipe resource for them. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Use align_free when neededAxel Davy2016-02-044-4/+4
| | | | | | | | Use align_free to free memory allocated with align_malloc. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Disallow non-argb8888 cursorsAxel Davy2016-02-041-0/+1
| | | | | | | Only argb8888 cursors are allowed. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Enforce centroid for color input when multisampling is onAxel Davy2016-02-044-4/+15
| | | | | | | | The color inputs must automatically use centroid whether multisampling is used or not. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Fix centroid flagAxel Davy2016-02-041-1/+4
| | | | | | | | sem.reg.mod & NINED3DSPDM_CENTROID is worth 4 when centroid is requested, whereas TGSI_INTERPOLATE_LOC_CENTROID is worth 1. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Use fast clears more often for MRTsAxel Davy2016-02-044-12/+11
| | | | | | | | | | | | | | | | | | This enables to use fast clears in the following case: pixel shader renders to 1 RT 4 RT bound clear new pixel shader bound that renders to 4 RTs Previously the fast clear path wouldn't be hit, because when trying the fast clear path, the framebuffer state would be configured for 1 RT, instead of 4. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Use linear filtering for shadow mappingAxel Davy2016-02-041-2/+3
| | | | | | | | Some docs say linear filtering is always used when app does shadow mapping. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>