summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* st/vdpau: implement luma keyingNayan Deshmukh2016-06-092-12/+39
| | | | | Signed-off-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl: Apply luma key filter before CSC conversionNayan Deshmukh2016-06-095-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply the luma key filter to the YCbCr values during the CSC conversion in video buffer shader. The initial values of max and min luma are set to opposite values to disable the filter initially and will be set when enabling it. Add extra parmeters min and max luma for the luma key filter in vl_compositor_set_csc_matrix in va, xvmc. Setting them to opposite value 1.f and 0.f respectively won't effect the CSC conversion v2: -Squash 1,2 and 3 into one patch to avoid breaking build of other components. (Christian) -use ureg_swizzle. (Christian) -change name of the variables. (Christian) v3: -Squash all patches in one to avoid breaking of build. (Emil) -wrap functions properly. (Emil) -use 0.0f and 1.0f instead of 0.f and 1.f respectively. (Emil) v4: -Divide it in two patches one which introduces the functionality and assigs dummy values to the changed functions and second which implements the lumakey filter. (Christian) -use ureg_scalar instead ureg_swizzle. (Christian) Signed-off-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/osmesa: remove double-write (overwriting)Eric Engestrom2016-06-021-1/+0
| | | | | | | | | | | | These two lines have been here since the file was created. I'm guessing the second one was just for testing during dev, so it's the one that's going away. CoverityID: 1296205 Signed-off-by: Eric Engestrom <[email protected]> Cc: [email protected] Reviewed-by: Brian Paul <[email protected]>
* st/vdpau: check for null pointer in get/put bits.Nayan Deshmukh2016-06-022-0/+12
| | | | | | | | Check for null pointer before accessing arrays in get/put bits native/YCbCr/Indexed in VdpOutputSurface and VdpVideoSurface. Signed-off-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* mesa_glinterop: remove mesa_glinterop typedefsEmil Velikov2016-05-301-3/+3
| | | | | | | | | | | | | | | | As is there are two places that do the typedefs - dri_interface.h and this header. As we cannot include the former in here, just drop the typedefs and use the struct directly (as needed). This is required because typedef redefinition is C11 feature which is not supported on all the versions of GCC used to build mesa. v2: Kill the typedef alltogether, as per Marek. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96236 Cc: Vinson Lee <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: push offset down to driverStanimir Varbanov2016-05-301-5/+2
| | | | | | | | | | | | | Push offset down to drivers when importing dmabuf. This is needed to more fully support EGL_EXT_image_dma_buf_import when a non-zero offset is specified. Tesing has been done for freedreno, and compile tested following gallium drivers: nouveau,svga,virgl,r600,r300,radeonsi,swrast,i915,ilo Signed-off-by: Stanimir Varbanov <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/dri: cleanup image_from_fd/dma_buf pathsStanimir Varbanov2016-05-301-37/+44
| | | | | Signed-off-by: Stanimir Varbanov <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/dri: add handling of R8 and GR88 DRI fourcc formatsStanimir Varbanov2016-05-301-0/+20
| | | | | | | | | This helps to import dmabuf buffers from DRM_FORMAT_R8 and DRM_FORMAT_GR88 used for example by GStreamer for YUV to RGB conversion using shaders. Signed-off-by: Stanimir Varbanov <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* scons: whitespace cleanupGiuseppe Bilotta2016-05-251-1/+1
| | | | | | | | | | This text transformation was done automatically via the following shell command: $ find -name SCons\* -exec sed -i s/\\s\\+$// '{}' \; Signed-off-by: Giuseppe Bilotta <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa_glinterop: make GL interop version field bidirectionalEmil Velikov2016-05-241-1/+8
| | | | | | | | | | | | | | This allows clear and easy communication between the two. Caller: Requesting information (struct vN) Callee: I know how to deal with older version (vN-1) only. Here is your data and the version I support. Caller: Older version ? Sure I'll cap all access to the fields provided by the older version (vN-1) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Tom Stellard <[email protected]>
* mesa_glinterop: drop mesa_glinterop_device_info::interop_versionEmil Velikov2016-05-241-2/+0
| | | | | | | | | | | | One cannot use a single version to control both export_in and export_out versions. Using this forces us to always extend/bump both structs at the same time. An alternative scheme is coming with next patch. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Tom Stellard <[email protected]>
* st/dri: add note about GL interop version checksEmil Velikov2016-05-241-2/+4
| | | | | | | | ... and make them more explicit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Tom Stellard <[email protected]>
* mesa_glinterop: rename MESA_GLINTEROP_INVALID_{VALUE,VERSION}Emil Velikov2016-05-241-2/+2
| | | | | | | | Be more explicit what it actually does. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Tom Stellard <[email protected]>
* mesa_glinterop: s/struct_version/version/Emil Velikov2016-05-241-2/+2
| | | | | | | | OCD polish for consistency with other mesa interfaces. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Tom Stellard <[email protected]>
* mesa_glinterop: use consistent naming scheme for GL interopEmil Velikov2016-05-241-3/+3
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Tom Stellard <[email protected]>
* st/xa: don't call close(-1) in xa_tracker_create error pathEmil Velikov2016-05-231-3/+3
| | | | | | | Analogous to previous commit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/dri: don't call close(-1) in dri{2, kms_}_init_screen error pathEmil Velikov2016-05-231-10/+20
| | | | | | | Add separate labels and jump to the correct one as needed. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* st/dri: Add support for DRIimage extension mapImage/unmapImageRob Herring2016-05-231-1/+42
| | | | | | | | | | Implement support for mapImage/unmapImage functions in version 12 of the DRIimage extension. Signed-off-by: Rob Herring <[email protected]> [Emil Velikov: align/indent the map/unmap vfuncs] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/va: use drm render node for wayland display typeLeo Liu2016-05-191-1/+1
| | | | | | | | | | With xwayland, vainfo use VA_DISPLAY_WAYLAND as default and it fails and fails when specify display with `vainfo --display wayland`. In fact wayland support for libva uses drm path to connect device, and should use drm pipe loader to create screen. Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* st/nine: Minor change to support musl libcWang He2016-05-182-8/+9
| | | | | | | | | | | A few changes to support musl libc as well. In particular fpu_control.h is glibc specific. fenv.h doesn't enable to do exactly what we want either, so instead use assembly directly. Signed-off-by: Wang He <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Enable D3DPMISCCAPS_PERSTAGECONSTANTPatrick Rudolph2016-05-181-1/+1
| | | | | | | | | | Nine already supports the feature. There are no failing WINE tests for per stage constants. Enabling D3DPMISCCAPS_PERSTAGECONSTANT as it fixes https://github.com/iXit/Mesa-3D/issues/205 Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix usage of rasterizer multisample bit.Axel Davy2016-05-184-10/+32
| | | | | | | | | | | pipe_rasterizer multisample bit should be enabled only when really wanting to do multisampling, thus we should disable when not having msaa render target. This fixes some depth calculation precision issues on radeon. Also disable it when depth and stencil tests are disabled, since in that case multisampling is same as not multisampled. Signed-off-by: Axel Davy <[email protected]>
* st/nine: ATOC has effect only with ALPHATESTENABLEAxel Davy2016-05-183-2/+13
| | | | | | | ATOC extension does something only when alpha test is enabled. Use a second bit to encode the difference with ATIATOC. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add debug string for ATOCAxel Davy2016-05-181-0/+1
| | | | | | We were missing a debug string for this format. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add asserts for output/input packingAxel Davy2016-05-181-0/+2
| | | | | | | | | | Nine doesn't support vs output/ps input packing. We haven't found any application requiring that, and implementing it properly is complex. Add asserts for now. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Use correct PIPE_HANDLE_USAGE flag for frontbuffer copyAxel Davy2016-05-181-5/+8
| | | | | | | When taking screenshots we do a copy from the frontbuffer to an allocated buffer (which we then copy to a ram buffer). Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix output shift calculationAxel Davy2016-05-181-2/+2
| | | | | | We were getting it wrong for negative values. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix CheckDeviceFormat advertising for surfacesAxel Davy2016-05-181-0/+12
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Improve buffer placementAxel Davy2016-05-181-4/+30
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix buffer bind flagsAxel Davy2016-05-181-3/+3
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix buffer locking flags handlingAxel Davy2016-05-182-29/+22
| | | | | | | | | Our behaviour was not entirely similar to what the docs and our tests describe. Drop d3dlock_buffer_to_pipe_transfer_usage. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Improve loggingPatrick Rudolph2016-05-186-0/+12
| | | | | | | Add missing DBG calls in dtors. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Use WINE thread for threadpoolPatrick Rudolph2016-05-184-12/+52
| | | | | | | | | Use present interface 1.2 function ID3DPresent_CreateThread to create the thread for threadpool. Creating the thread with WINE prevents some rarely occuring crashes. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Don't present if window is occludedPatrick Rudolph2016-05-181-5/+6
| | | | | | | | | | | | | The problem is that if one d3d present call fails, because of our occlusion check in present method, the next presentation call will send the same pixmap to the Xserver again, without waiting it is released, which is wrong. Move the present call after occlusion check to return and prevent Xpixmaps errors. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Use new function to query for resolution mismatchPatrick Rudolph2016-05-183-1/+18
| | | | | | | | | Any third party app might change the current screen resolution. Poll for resolution mismatch to force a device reset. Required for non ex devices only. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Implement BumpEnvMap for ffAxel Davy2016-05-181-24/+54
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Format conversion for volumes in UpdateTextureAxel Davy2016-05-181-8/+0
| | | | | | | We were doing the conversion for surfaces, but not yet volumes. Now that volumes can do conversion, use it. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Remove one useless function outputAxel Davy2016-05-182-4/+4
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add support for X8L8V8U8Axel Davy2016-05-182-3/+13
| | | | | | | | | | | | | | X8L8V8U8 support should be common. Some more recent cards do support this format, but not L6V5U5. Add fallback for this format to have it alwaus supported. L6V5U5 conversion rule apparently differs a bit from the normal spec, and thus the gallium equivalent format leads to slightly wrong colors. Since some recent cards do not support it, do not support it either. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add format fallback with conversion to volumesAxel Davy2016-05-182-9/+110
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add format fallback with conversion to surfacesAxel Davy2016-05-182-1/+72
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix Pointsize in programmable shaderAxel Davy2016-05-188-68/+48
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix ff pointscale computationAxel Davy2016-05-181-9/+18
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix header of GetIndicesAxel Davy2016-05-181-2/+1
| | | | | | | There is a mistake in the online documentation, the function only has 2 arguments. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Increase minor d3dadapter9drm ABIAxel Davy2016-05-182-1/+4
| | | | | | | | | | | Version 0.1 allows to assume that the second element of the IDirect3D* structures will be a pointer to the internal nine vtable. This is useful if the gallium nine user wants to wrap some interfaces. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix leak after ctor failuresAxel Davy2016-05-181-0/+2
| | | | | | | Previously ctor failures would not unreference the device. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add ColorFill test for compressed texturesAxel Davy2016-05-181-0/+8
| | | | | | | ColorFill should contain alignment checks for compressed textures. Signed-off-by: Axel Davy <[email protected]>
* st/nine: PositionT and Tessfactor are forbidden as PS inputAxel Davy2016-05-181-3/+5
| | | | | | | According to wine tests, they are forbidden as PS input, which makes sense. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix some shader failures not triggering errorAxel Davy2016-05-181-2/+5
| | | | | | | Some failures during shader translation would not raise errors before this patch. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Forbid POSITION0 for PS3.0Axel Davy2016-05-181-0/+5
| | | | | | POSITION0 input is forbidden for PS3.0 apparently. Signed-off-by: Axel Davy <[email protected]>