summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'mesa/13.0' into nougat-x86Chih-Wei Huang2016-11-161-1/+1
|\
| * Revert "st/vdpau: use linear layout for output surfaces"Dave Airlie2016-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d180de35320eafa3df3d76f0e82b332656530126. This is a radeon specific hack that causes problems on nouveau when combined with the SHARED flag later. If radeonsi needs a fix for this, please fix it in the driver. [chk] Using linear surfaces for this makes sense because tilling isn't beneficial and the surfaces can potentially be shared with other GPUs using the VDPAU OpenGL interop. [airlied] I think we need a flag that isn't SHARED/LINEAR that is more SHARED_OTHER_GPU. [mareko] Does radeonsi need PIPE_BIND_VIDEO_DECODE_OUTPUT that it would translate into linear ? [mareko] My only concern is decoding performance. If the decoder works in 64x1 blocks, tiling will hurt. That's the theory. I don't know how the decoder works. Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Tested-by: Ilia Mirkin <imirkin@alum.mit.edu> Tested-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> (I+A) (cherry picked from commit d0d5f7600c2e8ab8d0c153787185f7a534753edd)
* | st/dri: remove trailing whitespaceMauro Rossi2016-11-011-1/+1
| |
* | android: more fixes for llvmpipe software renderingChih-Wei Huang2016-11-012-2/+11
| | | | | | | | | | * add dri2_create_from_texture to driswImageExtension * add dri2FenceExtension to drisw_screen_extensions
* | android: support swrastWuZhen2016-11-012-3/+49
| | | | | | | | | | | | | | | | | | | | System boots up with gles_mesa/softpipe/llvmpipe. NO_REF_TASK Tested: local run Change-Id: I629ed0ca9fad12e32270eb8e8bfa9f7681b68474 Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
* | st/dri: fix double free of dri_drawableWuZhen2016-11-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the callchain destroy_surface->destroyDrawable->dri_put_drawable-> dri_put_drawable->DestroyBuffer By the semantic of it, dri_destroy_buffer should not free drawable struct, all vendor specific and legacy swrast version of the function do not. wonder why no body else ran into this. NO_REF_TASK Tested: local run Change-Id: Ibe82d82d2e34b162e64bf0b8805f8a4553d362d5 Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
* | gallium: introduce load_pipe_screen()Rob Herring2016-11-011-3/+1
|/ | | | | | | | | | | | Introduce load_pipe_screen() public entry point for other code which dlopen()'s gralloc_dri.so for purposes of loading a pipe_screen. This way drm_gralloc can avoid static linking of each gallium winsys and driver, and avoid duplicated logic to figure out which pipe driver to load. This is based on Rob Clark's work. I moved it into pipe_loader which seems to be a better spot. Signed-off-by: Rob Herring <robh@kernel.org>
* st/omx/dec: disable tunnel for size different caseLeo Liu2016-11-013-1/+11
| | | | | | | | | | | When the video coded size is different from frame size, we need the result buffers are same as coded size, which are not size compatible with encode required size, so that simply use no tunnel for this case instead of frame by frame converting. Signed-off-by: Leo Liu <leo.liu@amd.com> Cc: 13.0 <mesa-stable@lists.freedesktop.org> (cherry picked from commit 06e3cd6a45ae2ad19f77e0f283c46d5f85112847)
* st/omx/dec: result buffers size should match codec decoder sizeLeo Liu2016-11-013-19/+18
| | | | | | | | | Otherwise fails the check of matching between decoder size and buffers size in kernel. Signed-off-by: Leo Liu <leo.liu@amd.com> Cc: 13.0 <mesa-stable@lists.freedesktop.org> (cherry picked from commit d9b2c4048d55011bb04bd9848a3b47af7216389f)
* st/nine: Fix locking CubeTexture surfaces.Axel Davy2016-10-271-0/+1
| | | | | | | | | | | Only one face of Cubetextures was locked when in DEFAULT Pool. Fixes: https://github.com/iXit/Mesa-3D/issues/129 CC: "12.0 13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Axel Davy <axel.davy@ens.fr> (cherry picked from commit eed605a473554575305e1bf10c3641761a85feb9)
* st/nine: Fix mistake in Volume9 UnlockBoxAxel Davy2016-10-271-1/+1
| | | | | | | | | | In the format fallback path, the height was used instead of the depth. CC: "12.0 13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Axel Davy <axel.davy@ens.fr> (cherry picked from commit fe7bb46134162c9a9a18832f1746991aa78121e8)
* st/nine: Fix leak with integer and boolean constantsAxel Davy2016-10-271-21/+18
| | | | | | | | | | | | | | | | Leak introduced by: a83dce01284f220b1bf932774730e13fca6cdd20 The patch also moves the part to release changed.vs_const_i and changed.vs_const_b before the if (!cb.buffer_size) check, to avoid reuploading every draw call if integer or boolean constants are dirty, but the shaders use no constants. Signed-off-by: Axel Davy <axel.davy@ens.fr> CC: "13.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 25beccb379731b0e6fc728982190779da47aa6fd)
* st/va: force to flush the last p frame in idr periodBoyuan Zhang2016-10-181-0/+3
| | | | | | | | | | | | | | During dual instance encoding submission, if the second encode task and first encode task have no reference dependency, e.g. p following with idr-frame, there is a chance the second task will use for its reconstructed picture buffer the same buffer used by first task for its reference/reconstructed picture. In this case, buffer corruption may occur depending on encoding speed. Fix is to force flush these two tasks separately to avoid race condition Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98005 Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: set default rt formats when calling vaCreateConfigJulien Isorce2016-10-182-2/+12
| | | | | | | | As specified in va.h, default value should be set on attributes not present in the input list. Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Mark Thompson <sw@jkqxz.net>
* st/nine: Fix multisample limit checkAxel Davy2016-10-171-1/+1
| | | | | | | | | Fixes regression introduced by b5603056872708fdd82f1224854097805a01d4c0 The regression prevents some apps to start. Signed-off-by: Axel Davy <axel.davy@ens.fr>
* st/va: Fix H.264 PicOrderCnt valueMark Thompson2016-10-141-1/+1
| | | | | | | TopFieldPicOrderCnt is exactly the PicOrderCnt value for a frame - see H.264 section 8.2.1. Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: Baseline profile is not supportedMark Thompson2016-10-141-2/+2
| | | | | | | | Constrained baseline profile is supported, so use that instead. This matches what the encoder already does (constraint_set1_flag is always set in the output bitstream). Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: Return surface formats depending on config chroma formatMark Thompson2016-10-141-2/+10
| | | | | | | | | This makes the supported format actually match the configuration, and allows the user to observe that NV12 is supported for video processing where previously they couldn't (though it did always work if they blindly tried to use it anyway). Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: Save surface chroma format in configMark Thompson2016-10-142-1/+20
| | | | | | | Both YUV420 and RGB32 configurations are supported, so we need to be able to distinguish which is being used. Reviewed-by: Christian König <christian.koenig@amd.com>
* st/va: Return more useful config attributesMark Thompson2016-10-141-9/+38
| | | | | | | The encoder attributes are needed for a user of the encoder to be able to configure it sensibly without internal knowledge. Reviewed-by: Christian König <christian.koenig@amd.com>
* st/nine: Fix possible segfault in surface ctorAxel Davy2016-10-131-2/+2
| | | | | | | | | | | | | | | | Regression introduced by ba0274c7d6c3b77a36bbe1b444f427b0c873e2f3 Check the resource exists before assigning it a flag (and use This->base.resource instead of pResource, since the former may have a newly allocate resource, while the latter would be NULL). This should reintroduce the behaviour of previous code. Signed-off-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Remove useless code in nine_shaderAxel Davy2016-10-131-5/+0
| | | | | | | | | | | | | Since 1604efa6fda9b780e8537a131ad77f3e83e5a67a, lconsti and lconstb don't need to be initialized. Remove some leftovers from the previous code (which has now invalid use of ARRAY_SIZE on a pointer instead of an array). Reported by Coverity. Signed-off-by: Axel Davy <axel.davy@ens.fr>
* st/nine: More checks for GetRenderTargetDataAxel Davy2016-10-101-0/+2
| | | | | | | Fixes a wine test crash Signed-off-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
* st/nine: Add debug output for lost devicesPatrick Rudolph2016-10-101-0/+2
| | | | | | | Add debug output to ease debugging. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Prevent crash in GetRenderTargetDataPatrick Rudolph2016-10-101-0/+2
| | | | | | | | | | | | Return error instead of crashing on source surfaces with format D3DFMT_NULL. Fix for issue #236. Tested on Windows 7. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Set CLAMP_TO_EDGE on cubetexturesPatrick Rudolph2016-10-103-5/+22
| | | | | | | | | | | Wine tests show that cubetextures always use PIPE_TEX_WRAP_CLAMP_TO_EDGE regardless of set sampler states. Fixes failing d3d9 wine test test_cube_wrap. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: handle possible failure of D3DWindowBuffer_createPatrick Rudolph2016-10-101-0/+8
| | | | | | | Check for errors and pass them to the callers. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Assert on buffer creation failurePatrick Rudolph2016-10-101-8/+18
| | | | | | | | Add an assert to make sure buffer creation doesn't fail. Add error handling in calling functions. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Use NineDevice9_CreateDepthStencilSurface in swapchain9Patrick Rudolph2016-10-101-13/+17
| | | | | Replace custom code with NineDevice9_CreateDepthStencilSurface. All functionality is given now.
* st/nine: Fix check and remove useless code in swapchain9Axel Davy2016-10-102-17/+5
| | | | | | | | | | | | | | | | | | | | | The removed code was there for two reasons: 1) Allow DF16, DF24, INTZ to be used as depth buffer for swapchain, if the driver doesn't support PIPE_BIND_SAMPLER_VIEW for the underlying format 2) Set PIPE_BIND_SAMPLER_VIEW if possible, such that if StretchRect is called on the depth texture, it is happy. 1) The reason these formats needed a workaround is because the check flags for them in CheckDeviceFormat were incorrect, which led applications to think the formats were valid for swapchains, even if they weren't supported. 2) StretchRect limitations for depth buffers force the resource_copy_region path, which should be fine without PIPE_BIND_SAMPLER_VIEW. Thus fix the check for 1), and remove the code. Signed-off-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Implement MSAA quality levelsPatrick Rudolph2016-10-107-12/+125
| | | | | | | | | | | | | | | | Advertise quality levels: Each supported multisample count matches to one quality level. The application doesn't know how much samples each quality level has. For that reason it's not possible to set the multisample mask. Return errors on quality level missmatch. Fixes several old games not having multisample support until now. Fix for issue #73. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Signed-off-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Prepare update_framebuffer for MS quality levelsPatrick Rudolph2016-10-101-4/+4
| | | | | | | | Compare resource's nr_samples instead of D3D multisample level. Required for multisample quality levels to work correct. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Add additional error handling in CheckDeviceMultiSampleTypePatrick Rudolph2016-10-101-0/+6
| | | | | | | | | | Return one supported quality level in error cases. Return error on invalid multisample count. Fixes failing wine tests. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Fix compiler warningPatrick Rudolph2016-10-102-7/+11
| | | | | | | | | Use strict aliasing in SetPrivateData and struct pheader. Casting char[1] to IUnknown** isn't allowed in strict aliasing. Compute pointer to body by adding size of header to header pointer. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Remove resource9 {Set/Get/Free}PrivateData functionsPatrick Rudolph2016-10-102-134/+1
| | | | | | | | Remove {Set/Get/Free}PrivateData in resource9. Functionality has been implement in IUnknown interface. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Remove volume9 {Set/Get/Free}PrivateData functionsPatrick Rudolph2016-10-103-159/+0
| | | | | | | | Remove {Set/Get/Free}PrivateData in volume9. Functionality has been implement in IUnknown interface. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Switch {Set/Get/Free}PrivateData functionsPatrick Rudolph2016-10-108-61/+61
| | | | | | | Switch {Set/Get/Free}PrivateData function to introduced IUnknown functions. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Implement {Set/Get/Free}PrivateData in iunknownPatrick Rudolph2016-10-102-0/+134
| | | | | | | | Implement {Set/Get/Free}PrivateData in iunknown to get rid of duplicated code in resource9 and volume9. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Return device in NineSurface9_GetContainerPatrick Rudolph2016-10-101-2/+10
| | | | | | | | | | | | | According to MSDN the device is returned for surfaces that do not have a regular container. Such surfaces are: OffscreenPlainSurface, DepthStencilSurface and RenderTarget Tested and verified on Windows. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Allocate surface resources in surface ctorPatrick Rudolph2016-10-102-68/+44
| | | | | | | | | | Allocate resources in surface ctor. Allows to use statetracker internal memory accounting. Fix for issue #231. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Signed-off-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Fix D3DFMT_NULL sizeAxel Davy2016-10-101-0/+2
| | | | | | | | | D3DFMT_NULL is mapped to PIPE_FORMAT_NONE. Instead of relying on PIPE_FORMAT_NONE to return a size, pick one. The one picked is the same than Wine. Signed-off-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Add debugging outputPatrick Rudolph2016-10-101-0/+4
| | | | | | | | Add DBG calls to NineTexture9_GetLevelDesc and NineTexture9_GetSurfaceLevel to ease debugging. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Fix assert in NineUnknown_QueryInterfacePatrick Rudolph2016-10-101-1/+4
| | | | | | | | | Tests showed that is allowed to call this method on object that have a zero refcount. Required for issue #230. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Print interface id in NineVolume9_GetContainerPatrick Rudolph2016-10-101-0/+5
| | | | | | | To ease debugging print interface id. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Print interface id in NineSurface9_GetContainerPatrick Rudolph2016-10-101-0/+5
| | | | | | | To ease debugging print interface id. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Print interface id in NineUnknown_QueryInterfacePatrick Rudolph2016-10-101-1/+3
| | | | | | | To ease debugging print interface id. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Move assert in NineSurface9_ctorPatrick Rudolph2016-10-101-2/+2
| | | | | | | Move assert to function entry. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Properly declare sampler states for ffAxel Davy2016-10-101-1/+6
| | | | | | | Fixes a softpipe assertion failure with wine tests Signed-off-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
* st/nine: Handle user clipping planes properly for ffAxel Davy2016-10-101-4/+17
| | | | | | Found reading msdn and checking Wine. Signed-off-by: Axel Davy <axel.davy@ens.fr>
* st/nine: Fix the calculation of the number of vs inputsAxel Davy2016-10-101-1/+1
| | | | | | | | Fixes hangs on radeonsi, and assert on llvmpipe. Signed-off-by: Axel Davy <axel.davy@ens.fr> Cc: "12.0" <mesa-stable@lists.freedesktop.org>