History log of /external/mesa3d/src/gallium/state_trackers/dri/dri2.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c0e343f995c1af592eacd2709aa9a4d585a35e68 28-Mar-2017 Michal Srb <msrb@suse.com> st: Add cubeMapFace parameter to st_finalize_texture.

st_finalize_texture always accesses image at face 0, but it may not be
set if we are working with cubemap that had other face set.

This fixes crash in piglit
same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL_ATTACHMENT.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit 52f9ccefcb75a9d42307890d7714b1cd92e864cb)
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
026a7223a6c9dcd7c59b95dbaf5e64b7258f8700 01-Apr-2016 Rob Clark <robclark@freedesktop.org> gallium: support for native fence fd's

This enables gallium support for EGL_ANDROID_native_fence_sync, for
drivers which support PIPE_CAP_NATIVE_FENCE_FD.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
72cc1ca58d12495cc5a72fb9b9c316db94eb66cd 01-Apr-2016 Rob Clark <robclark@freedesktop.org> gallium: wire up server_wait_sync

This will be needed for explicit synchronization with devices outside
the gpu, ie. EGL_ANDROID_native_fence_sync.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
0c060f691c0827b0a66e97a4a7f54385de14cdb8 02-Oct-2016 Matt Whitlock <freedesktop@mattwhitlock.name> st/dri: replace calls to dup(2) with fcntl(F_DUPFD_CLOEXEC)

Without this fix, duplicated file descriptors leak into child processes.
See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance
where the same fix was employed.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Matt Whitlock <freedesktop@mattwhitlock.name>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
aa560e8e6328acd5b8feec1fea54dec06ae21368 22-Sep-2016 Nicholas Bishop <nbishop@neverware.com> st/dri: check pipe_screen->resource_get_handle() return value

Change dri2_query_image to check the return value of resource_get_handle
and return GL_FALSE if an error occurs.

For reference this is an example callstack that should propagate the
error back to the user:

i915_drm_buffer_get_handle
i915_texture_get_handle
u_resource_get_handle_vtbl
dri2_query_image
gbm_dri_bo_get_fd
gbm_bo_get_fd

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Nicholas Bishop <nbishop@neverware.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
[Emil Velikov: Split from larger patch, polish coding style, cc stable]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
ecd6fce2611e88ff8468a354cff8eda39f260a31 31-Aug-2016 Rob Clark <robdclark@gmail.com> mesa/st: support lowering multi-planar YUV

Support multi-planar YUV for external EGLImage's (currently just in the
dma-buf import path) by lowering to multiple texture fetch's for each
plane and CSC in shader.

There was some discussion of alternative approaches for tracking the
additional UV or U/V planes:

https://lists.freedesktop.org/archives/mesa-dev/2016-September/127832.html

They all seemed worse than pipe_resource::next

Signed-off-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
74b1969d717f2428f0b9dcaaea611e95736120a5 16-Aug-2016 Rob Clark <robdclark@gmail.com> gbm: wire up fence extension

v2: make fence extension optional to not break non-i965 classic
drivers, and move __DRI2_FENCE into core extensions, based
on comments from Emil

Signed-off-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
9daaa6f5a66ab6cc99c6f0af37fc1007ab3d09af 21-Aug-2016 Marek Olšák <marek.olsak@amd.com> gallium: add a pipe_context parameter to resource_get_handle

radeonsi needs to do some operations (DCC decompression) for OpenGL-OpenCL
interop and this is the only way to make it coherent with the current
context. It can optionally be set to NULL.

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
54272e18a682c8b82d4a86b2c07b51c303d8cead 06-Aug-2016 Marek Olšák <marek.olsak@amd.com> gallium: add a pipe_context parameter to fence_finish

required by glClientWaitSync (GL 4.5 Core spec) that can optionally flush
the context

Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
9ee3f097b65398250e836785a7e87520eda8298d 09-Jun-2016 Michel Dänzer <michel.daenzer@amd.com> st/dri: Clear drawable texture_mask in dri2_invalidate_drawable

This makes sure that dri_set_tex_buffer2 -> dri_drawable_validate_att
will re-create the front left attachment buffer after the drawable got
invalidated.

Fixes window contents not updating until the window is resized when
using DRI2 PRIME.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
13faddb6b8e30ff0e81e62fb863304a57c712aae 30-May-2016 Emil Velikov <emil.velikov@collabora.com> mesa_glinterop: remove mesa_glinterop typedefs

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 <vlee@freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
e382bc649b95aa2ab6e86d60b0520236b2bf2947 27-May-2016 Stanimir Varbanov <stanimir.varbanov@linaro.org> gallium: push offset down to driver

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 <stanimir.varbanov@linaro.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
30d28d7c3148a7f7f2244b117ac0158930e95966 27-May-2016 Stanimir Varbanov <stanimir.varbanov@linaro.org> st/dri: cleanup image_from_fd/dma_buf paths

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
9d852a1f7501dbca8c0d40ebd7b9055b068bf2f3 27-May-2016 Stanimir Varbanov <stanimir.varbanov@linaro.org> st/dri: add handling of R8 and GR88 DRI fourcc formats

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 <stanimir.varbanov@linaro.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
e384d75b120ce60954c545e8c6edbe98fd01bea7 21-Apr-2016 Emil Velikov <emil.velikov@collabora.com> mesa_glinterop: make GL interop version field bidirectional

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 <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
0e983276b96eee5aa1dd091888bc81e36169a8f1 21-Apr-2016 Emil Velikov <emil.velikov@collabora.com> mesa_glinterop: drop mesa_glinterop_device_info::interop_version

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 <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
f8a114aa5c1141c1a5e4052deeeafd164fb5f1ef 03-May-2016 Emil Velikov <emil.velikov@collabora.com> st/dri: add note about GL interop version checks

... and make them more explicit.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
923bdbf48c4113326773e98c786e4405b2e1838b 03-May-2016 Emil Velikov <emil.velikov@collabora.com> mesa_glinterop: rename MESA_GLINTEROP_INVALID_{VALUE,VERSION}

Be more explicit what it actually does.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
c196de23aece3cea7b30da6d7356b614ee254dae 21-Apr-2016 Emil Velikov <emil.velikov@collabora.com> mesa_glinterop: s/struct_version/version/

OCD polish for consistency with other mesa interfaces.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
cbf29d90bae9ba415b8158afc3a06a1360ec0bc4 21-Apr-2016 Emil Velikov <emil.velikov@collabora.com> mesa_glinterop: use consistent naming scheme for GL interop

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
6e00a1e6cba7b32e575521c7a92aae18761e0a37 14-May-2016 Emil Velikov <emil.l.velikov@gmail.com> st/dri: don't call close(-1) in dri{2, kms_}_init_screen error path

Add separate labels and jump to the correct one as needed.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
e8431a630d64a39c1cf2feda08e0450d4e522d7d 04-May-2016 Rob Herring <robh@kernel.org> st/dri: Add support for DRIimage extension mapImage/unmapImage

Implement support for mapImage/unmapImage functions in version 12 of the
DRIimage extension.

Signed-off-by: Rob Herring <robh@kernel.org>
[Emil Velikov: align/indent the map/unmap vfuncs]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
c0c6ca40a25e47068984155521db8b4aa3e7569c 24-Apr-2016 Marek Olšák <marek.olsak@amd.com> Revert "st/dri: add 32-bit RGBX/RGBA formats"

This reverts commit ccdcf91104a5f07127b5b8d8570b5c4bbcf86647.

It breaks most KDE apps, because DRI doesn't support the RGBA component
ordering.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95071
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
ccdcf91104a5f07127b5b8d8570b5c4bbcf86647 21-Apr-2016 Rob Herring <robh@kernel.org> st/dri: add 32-bit RGBX/RGBA formats

Add support for 32-bit RGBX/RGBA formats which are preferred for Android.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
4fa3d35cc52bc49fd0e2c3e7976d428885bc94ba 29-Feb-2016 Marek Olšák <marek.olsak@amd.com> st/dri: implement the GL interop DRI extension (v2.2)

v2: - set interop_version
- simplify the offset_after macro
v2.1: - use version numbers, remove offset_after
- set "out_driver_data_written"
v2.2: - set buf_offset & buf_size for GL_ARRAY_BUFFER too
- add whandle.offset to buf_offset
- disable the minmax cache for GL_TEXTURE_BUFFER
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
8093990ef4a65c4ba69c79263a508df0ddbecae6 17-Apr-2016 Nicolas Dufresne <nicolas.dufresne@collabora.com> st/dri: Fix RGB565 EGLImage creation

When creating egl images we do a bytes to pixel conversion by deviding
by 4 regardless of the pixel format. This does not work for RGB565. In
this patch, we avoid useless conversion and use proper API when the
conversion cannot be avoided.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
4463f38766061bd058dc668e0ac2820a4cba79e7 17-Apr-2016 Nicolas Dufresne <nicolas.dufresne@collabora.com> st/dri: Factor out DRI2 to PIPE_FORMAT conversion

This code is already duplicated twice and will be useful again. This
will also help when adding formats.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
29d26f1522d7f7be8f7d7791e37c3fcd8ac4544a 12-Jan-2016 Christian König <christian.koenig@amd.com> gallium/winsys/drm: add offset to struct winsys_handle

We are going to need this for EGL_EXT_image_dma_buf_import.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
82db518f1519cec9e3842f23455a105e2006afbd 24-Feb-2016 Marek Olšák <marek.olsak@amd.com> gallium: add external usage flags to resource_from(get)_handle (v2)

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 <axel.davy@ens.fr>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
d90ba57c08dc51579c92224c7eedfc9f88f47853 23-Nov-2015 Emil Velikov <emil.l.velikov@gmail.com> st/dri: fd management cleanups

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: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
e43a771dfa5b99899a4a09cdd2989afc25eef17c 15-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> st/dri: NULL check the pscreen earlier

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 <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
13bccee87d6344ec7932b42de3fe3a2d10d30d96 15-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> st/dri: Don't close the drm fd on failure

Ported from an identically named commit in st/xa

commit 35cf3831d71770211f29da6608313dc1f6213d7b
Author: Thomas Hellstrom <thellstrom@vmware.com>
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 <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
23fb11455b415238fb9e378fa0ab51f4b6cefd7a 15-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> {st,targets}/dri: use static/dynamic pipe-loader

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 <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
74d41a32bc179425e866f8afa33a222488ea7760 14-Oct-2015 Emil Velikov <emil.l.velikov@gmail.com> gallium: remove library_path argument from pipe_loader_create_screen()

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 <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
87c3c9acd29655d6c8778ea732f559eebeddd5f6 10-Aug-2015 Michel Dänzer <michel.daenzer@amd.com> st/dri: Use packed RGB formats

Fixes Gallium based DRI drivers failing to load on big endian hosts
because they can't find any matching fbconfigs.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71789
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
b78336085bce4d1f36c8d9c72fd3fa41643e3cd1 25-Sep-2015 Marek Olšák <marek.olsak@amd.com> st/dri: don't use _ctx in client_wait_sync

Not needed and it can be NULL.

v2: fix dri2_get_fence_from_cl_event - thanks Albert

Cc: 10.6 11.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Albert Freeman <albertwdfreeman@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
0959d7312d37dd9841cbf7a53cb40b3cfa6e5fc9 29-Jun-2015 Emil Velikov <emil.l.velikov@gmail.com> pipe-loader: remove pipe_loader_drm_probe_fd() x_auth argument

No longer used by anyone, as of last commit.

Cc: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
6611f65047575054a38ce83ebfe0331e39e1774f 07-Jul-2015 Marek Olšák <marek.olsak@amd.com> st/dri: don't set PIPE_BIND_SCANOUT for MSAA surfaces

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91231

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
563706c14641fde2ab604d590b5425680354f280 10-Jun-2015 Dave Airlie <airlied@gmail.com> st/dri: check pscreen is valid before querying param

we don't check the validity of pscreen until dri_init_screen_helper

hit this trying to init glamor on a device with no driver (udl).

Acked-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
f1c42475a589531919194c95b97e7558b448eb5c 29-Apr-2015 Marek Olšák <marek.olsak@amd.com> st/dri: add support for create_context_robustness GLX and EGL extensions

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
e70de9b0327009dd9b99ee1f388cfffd1bc93761 10-Apr-2015 Marek Olšák <marek.olsak@amd.com> st/dri: implement the fence interface for CL events
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
7070b0dd66d315b3106803580623df4fb5223473 10-Apr-2015 Marek Olšák <marek.olsak@amd.com> st/dri: implement the fence interface
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
8f7338f284cdb1fef64c85e3293d2200d0cc6387 03-Mar-2014 Dave Airlie <airlied@redhat.com> egl: add initial EGL_MESA_image_dma_buf_export v2.4

At the moment to get an EGL image to a dma-buf file descriptor,
you have to use EGL_MESA_drm_image, and then use libdrm to
convert this to a file descriptor.

This extension just provides an API modelled on EGL_MESA_drm_image,
to return a dma-buf file descriptor.

v2: update spec for new API proposal
add internal queries to get the fourcc back from intel driver.

v2.1: add gallium pieces.

v2.2: add offsets to spec and API, rename fd->fds, stride->strides
in API. rewrite spec a bit more, add some q/a

v2.3:
add modifiers to query interface and 64-bit type for that (Daniel Stone)
specifiy what happens to num fds vs num planes differences. (Chad Versace)

v2.4:
fix grammar (Daniel Stone)

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
935ee6b652a97c1db08d999aa48eba0574e0b23e 11-Feb-2015 Eric Anholt <eric@anholt.net> gallium/dri: Shut up a compiler warning.

The compiler doesn't see that buffers is set in the !image case and used
in the !image case.

Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
6e1f846ce09e93d2a6157da1587b546080e48211 24-Sep-2014 Emil Velikov <emil.l.velikov@gmail.com> targets/pipe-loader: drop unused authentication

The dri, vdpau, omx, xvmc and gbm targets don't need any authentication
even the VL ones never used it. Either the respective loader or the
library itself (vl) is doing its auth prior to calling create_screen()

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
8bcd57a46ce9d4a960253fd89ad21bd3e1776f8b 22-Aug-2014 Andreas Pokorny <andreas.pokorny@canonical.com> kms-swrast: Support Prime fd handling

Allows using prime fds as display target and from display target.
Test for PRIME capability after initializing kms_swrast screen.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
5fe400d82a60eafefda4aedf36aaeac7975e3ae7 14-Aug-2014 Emil Velikov <emil.l.velikov@gmail.com> st/dri: Add __DRI2rendererQueryExtension support

The final step to get GLX_MESA_query_renderer working with gallium
drivers.

v2: Remove __DRI2_RENDERER_PREFERRED_PROFILE handling. It's already
handled in dri/common. Spotted by Marek.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
16873a6e62e2dc7de1f247e8cae1b40bd813a117 13-Aug-2014 Emil Velikov <emil.l.velikov@gmail.com> st/dri: define GALLIUM_SOFTPIPE when building kms_swrast

To avoid unresolved symbols in the DRI modules with earlier commit we
wrapped the innards of dri_kms_init_screen() in a
DRI_TARGET/GALLIUM_SOFTPIPE ifdef.

At the same time we forgot to adds the defines to the st/dri build
systems, breaking kms_swrast and gnome-continuous.

Drop the DRI_TARGET define, we're already in st/DRI.

Reported-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reported-by: Vadim Rutkovsky <vrutkovs@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
47e5039680787d1d7072caffdb767a54ecd63218 02-Aug-2014 Aaron Watry <awatry@gmail.com> st/dri: Fix driver loading if swrast isn't built

If building hardware drivers only, then kms_swrast_create_screen
won't be defined in inline_drm_helper.h and hardware drivers will
fail to dlopen as a result.

Copy the #if guards from inline_drm_helper.h to dri_kms_init_screen
to make the definition/use of the function match.

Fixes radeonsi_dri.so dlopen with the following configure:

./configure --with-dri-drivers= --with-dri-driverdir=/usr/local/lib/dri/ \
--enable-gbm --enable-gallium-gbm --enable-debug --enable-opencl \
--enable-opencl-icd --with-gallium-drivers=radeonsi \
--with-egl-platforms=drm --enable-glx-tls --enable-texture-float \
--enable-omx

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
e57ad3d38cab091ef341838b651dbda16cee007b 23-Jul-2014 Giovanni Campagna <gcampagna@src.gnome.org> dri: Add a new capabilities for drivers that can't share buffers

The kms-dri swrast driver cannot share buffers using the GEM,
so it must tell the loader to disable extensions relying on
that, without disabling the image DRI extension altogether
(which would prevent the loader from working at all).
This requires a new gallium capability (which is queried on
the pipe_screen and for swrast drivers it's forwarded to the
winsys), and requires a new version of the DRI image extension.

[Emil Velikov]
- Rebased on top of gallium-dri megadrivers.
- Drop PIPE_CAP_BUFFER_SHARE and sw_winsys::get_param hook.
The can_share_buffer cap is set at InitScreen. We use a different
InitScreen (and thus value for the cap) function for kms_dri, due to
deeper differences originating from dri megadrivers.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
3b176c441b7ddc5f7d2f891da3f76cf3c1814ce1 23-Jul-2014 Giovanni Campagna <gcampagna@src.gnome.org> gallium: Add a dumb drm/kms winsys backed swrast provider

Add a new winsys and target that can be used with a dri2 state tracker
and loader instead of drisw. This allows to use gbm as a dri2/image
loader and avoid the extra copy from the backbuffer to the shadow
frontbuffer.

The new driver is called "kms_swrast", and is loaded by gbm as a
fallback, because it is only useful with the gbm platform (as no buffer
sharing is possible)

To force select the driver set the environment variable
GBM_ALWAYS_SOFTWARE

[Emil Velikov]
- Rebase on top of gallium megadriver.
- s/text/test/ in configure.ac (Spotted by Andreas Pokorny).
- Add scons support for winsys/sw/kms-dri and fix the build.
- Provide separate DriverAPI, due to different InitScreen hook.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
29ca7d2c9488d13e496ec65b6e1e1bf1d53042c5 17-Jun-2014 Emil Velikov <emil.l.velikov@gmail.com> st/dri: merge dri/drm and dri/sw backends

Move the driver_name to dri2/drisw and remove all the SPLIT_TAGETS
mayhem. In the next step we'll unify the dri and dri-swrast targets,
completing the gallium DRI megadriver.

v2: Remove leftover st/dri Makefiles from CONFIG_FILES. Spotted by
Thomas Helland.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Rob Clark <robclark@freedesktop.org>
Tested-by: Thomas Helland <thomashelland90 at gmail.com>
Acked-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
5b1fc14627ae37c5def70e2d5fe28bf7a4becee6 25-Mar-2010 Jakob Bornecrantz <wallbraker@gmail.com> st/dri: Reshuffle files and make it obvious which files are shared

In short:
git mv ../drisw/Makefile dri/sw
git mv drisw.[c|h] sw
git mv dri2.[c|h] dri1.[c|h] Makefile drm
git rm ../drisw
ln -s <common files> drm/*
ln -s <common files> sw/*
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
8f47f5320f1a8d4750152f7783cf72073d0979bd 25-Mar-2010 Jakob Bornecrantz <wallbraker@gmail.com> st/dri: Add dri2 prefix for all dri2.c functions
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c
6a7bd8eb95e7d304725b09272dc9c40a337182e1 25-Mar-2010 George Sapountzis <gsapountzis@gmail.com> st/dri: split out DRI2 code
/external/mesa3d/src/gallium/state_trackers/dri/dri2.c