Commit Graph

1702 Commits

Author SHA1 Message Date
Matt Turner 4e97084591 egl: Fix inclusion of egl.h+mesa_glinterop.h
Previously clang would warn about redefinition of typedef EGLDisplay. Avoid
this by adding preprocessor guards to mesa_glinterop.h and including it
after EGL.h is indirectly included.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-08-21 14:45:44 -07:00
Dave Airlie b3f87b87f6 vulkan: import 1.0.59 headers and xml.
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-22 07:00:50 +10:00
Gwan-gyeong Mun c87594575b dri: fix typo in comment
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-08-17 09:58:49 +01:00
Jason Ekstrand eb4564bf93 intel/drm: Pull in the i915 fence array API
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-08-15 19:08:26 -07:00
Jason Ekstrand c0e9f80cd6 drm-uapi/forcc: Pull in new modifiers
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2017-08-14 10:43:30 -07:00
Daniel Stone 2eee03b7a1 egl: Update headers from Khronos
Taken from egl-registry 7d68647c4dab.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-08-11 11:16:00 +01:00
Thomas Hellstrom 2437ebd705 dri: Introduce SWAP_METHOD tokens
We shouldn't be using GLX tokens in the dri subsystem, so define dri
SWAP_METHOD tokens and translate when necessary. Unfortunately the X server
uses the dri swap method value untranslated as the GLX fbconfig swapMethod,
so we can't enumerate these tokens arbitrarily, but rather need to make them
have the same values as the corresponding GLX tokens.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2017-08-10 09:15:33 +02:00
Thomas Hellstrom 08bee3e5ac dri: Fix __DRIconfig reporting of __DRI_ATTRIB_SWAP_METHOD
The attribMap had two entries for this attribute, and
driGetConfigAttribIndex didn't return a proper value for this attribute.
Fix this, and also make sure we return SWAP_UNDEFINED for single-buffer
configs as required by the GLX_OML_swap_method spec.

Finally bump the dri core extension version to 2, indicating that we
correctly report __DRI_ATTRIB_SWAP_METHOD.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2017-08-10 09:15:33 +02:00
Ilia Mirkin 76ce7f03e7 include: update GLES gl2ext header to no longer reference bad function
There was a previous error in the gl.xml and generated files that
referenced glMultiDrawElementsBaseVertexOES. This function should not
exist, only the EXT-suffixed version should.

Leaving the other headers alone to avoid conflicts with GL 4.6 work.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-08-07 20:32:32 -04:00
Thomas Hellstrom ae93d534a8 dri: Add a flushSwapBuffers method to the image loader extension
This method may be used by dri drivers to make sure all outstanding
buffer swaps have been flushed to hardware.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-08-03 07:57:27 +02:00
Nicolai Hähnle 9435b9c544 dri: define a version 2 of the DRI_ConfigOptions extension
The new function is defined to return a malloc'ed pointer. In the
following patches, this helps avoid leaking library handles when pipe
drivers are linked dynamically.

It also allows us to generate the XML string on the fly in the future.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-08-02 09:50:56 +02:00
Jason Ekstrand 35338a242b vulkan: Import in the latest 1.0.57 header and XML from Khronos
Acked-by: Dave Airlie <airlied@redhat.com>
2017-08-01 13:27:12 -07:00
Scott D Phillips 3db05ed1d1 gles: Restore some lost typedefs
GLES/gl.h has historically provided some typedefs that are not
used in the API itself. Restore these typedefs that were lost to
avoid breaking applications.

These seem to be the only typedefs removed in the update.

Fixes: 7fd0817 "Update Khronos-supplied headers"

[Eric: added a big warning to revert this patch when pulling the updated header]
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-08-01 18:26:15 +01:00
Marek Olšák 6d37bcdb79 dri_interface: document loaderPrivate for getCapability
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-31 18:30:00 +02:00
Marek Olšák 1bf703e4ea dri_interface,egl,gallium: only expose RGBA visuals on Android
X/GLX can't handle them. This removes almost 500 GLX visuals that were
incorrectly exposed.

Add an optional getCapability callback for querying what the loader can do.

I'm not splitting this patch, because it's already too small.

v2: also add the callback to __DRIimageLoaderExtension

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: 17.2 <mesa-stable@lists.freedesktop.org>
2017-07-31 12:49:30 +02:00
Jason Ekstrand 227debdc92 vulkan: Update to the new 1.0.54 spec XML and headers
There is one small ANV change here because we used the
VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX enum in the BO cache and that had
to be updated to have the _KHR suffix.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-07-15 08:59:38 -07:00
Grigori Goronzy 7299e82fa4 dri: Add KHR_no_error DRI extension
This basic extension allows usage of the __DRI_CTX_FLAG_NO_ERROR flag.
This includes support code for classic Mesa drivers to switch on the
no-error mode if the flag is set.

v2: Move to common DRI code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-14 21:20:31 +02:00
Eric Anholt a2d87a0019 vc4: Switch back to using a local copy of vc4_drm.h.
Needing to get our uapi header from libdrm has only complicated things.
Follow intel's lead and drop our requirement for it.

Generated from the same commit mentioned in the README.

v2: Update Android.mk as well, move vc4_drm.h reference for distcheck.

Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-07-12 10:58:33 -07:00
Eric Anholt 5d6271c6a5 intel: Move the DRM uapi headers to a non-Intel location.
I want to remove vc4's dependency on headers from libdrm as well, but
storing multiple copies of drm_fourcc.h in our tree would be silly.

v2: Update Android.mk as well, move distcheck drm*.h references to
    top-level noinst_HEADERS.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Reviewed-by: Daniel Stone <daniels@collabora.com> (v1)
Reviewed-by: Rob Herring <robh@kernel.org>
2017-07-12 10:58:33 -07:00
Marek Olšák aaee0d1bbf gallium: use "ull" number suffix to keep the QtCreator parser happy
It can't parse "llu".

Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-07-10 22:44:48 +02:00
Nicolai Hähnle 7fd08177a6 Update Khronos-supplied headers
Taken from commit 676834dd529d620ee25090e738d2607dfde003d8
of https://github.com/KhronosGroup/OpenGL-Registry.git

v2:
- keep the BUILDING_MESA bits (Matt)

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-30 15:29:50 +02:00
Johnson Lin 194205cd00 dri: Add UYVY as available format
UYVY is diffrent with YUYV in byte order.
YUYV is already declared in dri_interface.h,
this CL add the difinitions for UYVY.
Drivers can add UYVY as supported format

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2017-06-30 10:16:26 +01:00
Anusha Srivatsa de7ed0ba55 i965/CFL: Add PCI Ids for Coffee Lake.
Coffee Lake has a gen9 graphics following KBL.
From 3D perspective, CFL is a clone of KBL/SKL features.

v2: Change commit message, correct alignment <Anuj Phogat>
v3: Update IDs.
v4: Initialize l3_banks, correct nomenclature <Anuj>

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Acked-by: Benjamin Widawsky <benjamin.widawsky@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2017-06-22 14:28:43 -07:00
Alex Deucher 5c603b902b radeonsi: add new polaris12 pci id
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: 17.0 17.1 <mesa-stable@lists.freedesktop.org>
2017-06-16 16:03:16 -04:00
Ben Widawsky e179a3438a i965/cnl: Add a preliminary device for Cannonlake
v2 (Anuj):
Rebased on master and updated pci ids
Remove redundant initialization of max_wm_threads to 64 * 12.
For gen9+ max_wm_threads are initialized in gen_get_device_info().

v3 (Anuj):
Move the patch to end of series.
Remove unused gt1, gt2, gt3 functions.
Remove l3_banks variable. Variable is now available on master.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2017-06-09 16:03:00 -07:00
Varad Gautam c5929634a0 dri: introduce dmabuf format modifier related handles
these allow dmabuf import with modifiers, and supported format and
modifier queries, which are used to implement
EGL_EXT_image_dma_buf_import_modifiers.

v2:
- squash dmabuf queries into DRIimage version 15 (Jason Ekstrand).
- add external_only param to queryDmaBufModifiers (Emil, Daniel Stone)
- pass a single modifier form createImageFromDmaBufs2 since all planes have
the same modifier (Jason Ekstrand)

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-05-30 13:56:20 +01:00
Gregory Hainaut fa84f6225b dri: Extend __DRIbackgroundCallableExtensionRec to include a callback that checks for thread safety
DRI-drivers could call Xlib functions, for example to allocate a new back
buffer.

When glthread is enabled, the driver runs mostly on a separate thread.
Therefore we need to guarantee the thread safety between libX11 calls
from the applications (not aware of the extra thread) and the ones from
the driver.

See discussion thread:
   https://lists.freedesktop.org/archives/mesa-dev/2017-April/152547.html

Fortunately, Xlib allows to lock display to ensure thread safety but
XInitThreads must be called first by the application to initialize the lock
function pointer. This patch will allow to check XInitThreads was called
to allow glthread on GLX or EGL platform.

Note: a tentative was done to port libX11 code to XCB but it didn't solve fully
thread safety.
See discussion thread:
   https://lists.freedesktop.org/archives/mesa-dev/2017-April/153137.html

Note: Nvidia forces the driver to call XInitThreads. Quoting their manpage:
"The NVIDIA OpenGL driver will automatically attempt to enable Xlib
thread-safe mode if needed. However, it might not be possible in some
situations, such as when the NVIDIA OpenGL driver library is dynamically
loaded after Xlib has been loaded and initialized. If that is the case,
threaded optimizations will stay disabled unless the application is
modified to call XInitThreads() before initializing Xlib or to link
directly against the NVIDIA OpenGL driver library. Alternatively, using
the LD_PRELOAD environment variable to include the NVIDIA OpenGL driver
library should also achieve the desired result."

v2: based on Nicolai and Matt feedback
Use C style comment

v3: based on Emil feedback
split the patch in 3
s/isGlThreadSafe/isThreadSafe/

v5: based on Marek comment
Add a comment that isThreadSafe is supported by extension v2

Signed-off-by: Gregory Hainaut <gregory.hainaut@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-05-29 17:06:37 +01:00
Jason Ekstrand c58f8bb56b vulkan: Update registry and headers to 1.0.49
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2017-05-16 08:38:34 -07:00
Marek Olšák 7622181cad radeonsi/gfx9: add support for Raven
Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-15 13:00:26 +02:00
Alex Deucher 2f0450c627 radeonsi: add new vega10 pci ids
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-05-10 13:41:38 -04:00
Emil Velikov 2c60bf093e dri_interface.h: define __DRI_ATTRIB_MAX
Thus we can use the value to explicitly size arrays, instead of
__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE + 1.

The latter seems magical and is error prone, as we add more dri
attributes.

v2: Fix off by one error (Tomasz)

Cc: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-05-04 18:05:25 +01:00
Emil Velikov c9c8e1c84d c11/threads: rework Windows thrd_current() comment
Drop the misleading "will not match the one returned by thread_create"
hunk and provide more clarity as to what/why GetCurrentThread() isn't
the solution we're looking for.

v2: Places brackets after function names (Eric)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (v1)
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-05-04 18:00:23 +01:00
Alex Deucher d921af62f5 radeonsi: add new polaris10 pci id
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-04-05 10:13:08 -04:00
Jason Ekstrand d6fccb4c09 vulkan: Bump the header and XML to the latest public version 2017-03-31 22:41:43 -07:00
Marek Olšák 675af982e1 radeonsi: add Vega10 PCI IDs
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-03-30 14:44:33 +02:00
Jose Fonseca ecfafdcbf5 c11/threads: Include thr/xtimec.h for xtime definition when building with MSVC.
MSVC has been including a xtime definition in thr/xtimec.h ever since
MSVC 2013 (which is the minimum we require for building Mesa), and
including it prevents duplicate definitions when it gets included by
LLVM.

In fact, it looks that MSVC has been including a partial C11 threads
implementation too for some time, which we should consider migrating to
once we eliminate the use of _MTX_INITIALIZER_NP in our tree.

Thanks to the anonymous helper from
https://bugs.freedesktop.org/show_bug.cgi?id=100201#c4 for spotting
this.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100201
CC: "17.0" <mesa-stable@lists.freedesktop.org>
2017-03-29 11:53:03 +01:00
Alex Deucher c2a97fb7ae radeonsi: add new polaris12 pci id
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-17 14:13:17 -04:00
Paul Berry e043b2a1a0 dri_interface: Add new marshalling interfaces to dri_interface.h
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Marek Olšák <maraeo@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
2017-03-16 14:14:18 +11:00
Ben Widawsky d075cce258 dri: Add an image creation with modifiers
Modifiers will be obtained or guessed by the client and passed in during
image creation/import. In guessing, a client might decide to simply pass
along all known modifiers

This requires bumping the DRIimage version.

As of this patch, the modifiers aren't plumbed all the way down, this
patch simply makes sure the interface level stuff is correct.

v2: Don't allow usage + modifiers

v3: Make NAND actually NAND. Bug introduced in v2. (Jason)

v4:
- s/obtains/obtained (Jason)
- Pull out i965 imlemnentation into a later patch (Emil)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Daniel Stone <daniels@collabora.com>
2017-03-15 10:36:04 -07:00
Ben Widawsky d844d8e4d5 i965: Add Kaby Lake brandstrings
While here, use the spacing defined in Ark.
https://ark.intel.com/products/codename/82879/Kaby-Lake

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2017-03-02 21:00:02 -08:00
Jason Ekstrand 54dd42eb94 vulkan: Update registry and headers to 1.0.42
This brings in a bunch of new extensions
2017-02-27 09:44:45 -08:00
Nicolai Hähnle 8822f4dfb9 eglmesaext: add new enums for EGL_MESA_drm_image_formats
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-02-06 17:41:28 +01:00
Eric Engestrom 87619a1a6a egl: EGL_PLATFORM_SURFACELESS_MESA is now upstream
EGL_PLATFORM_SURFACELESS_MESA is in eglext.h as of last commit.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2017-01-27 16:52:23 +00:00
Eric Engestrom a98b3a0872 egl: update headers from registry
Khronos introduced a new macro (suggested by Google) to avoid using
C-style casts in C++ code, as those generate warnings.

Khronos Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16113
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2017-01-27 16:52:23 +00:00
Dave Airlie e38bee34bf vulkan: bump vulkan.h to 1.0.39 version
This introduces a bunch of new extension defines.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-01-24 08:13:23 +10:00
Rainer Hochecker 09b140abb5 dri: allow 16bit R/GR images to be exported via drm buffers
This allows eglCreateImageKHR to access P010 surfaces created by vaapi

Signed-off-by: Rainer Hochecker <fernetmenta@online.de>
Acked-by: Ben Widawky <ben@bwidawsk.net>
2017-01-23 08:47:15 -08:00
Emil Velikov 52bf10cc4f scons: set HAVE_FUNC_ATTRIBUTE_ALIAS
Analogoust to the previous commit were we did so for autotools

Cc: Jose Fonseca <jfonseca@vmware.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-01-18 16:01:14 +00:00
Lionel Landwerlin 60bc90cea8 include: update Vulkan headers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2017-01-14 19:29:44 +00:00
Chad Versace 98cf089849 vulkan: Update vk_icd.h to interface version 3
Import from commit f2aeefec on branch 'master'
of https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: mesa-stable@lists.freedesktop.org
2017-01-12 09:42:32 -08:00
Chad Versace 9aa6ab0748 dri: Add __DRI_IMAGE_FORMAT_ARGB1555
This allows eglCreateImage() to accept textures of said format.

Patch 1/2 to fix
dEQP-EGL.functional.image.modify.tex_rgb5_a1_tex_subimage_rgba8
on Intel.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99185
Cc: Haixia Shi <hshi@chromium.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
2016-12-27 09:13:43 -08:00
Junwei Zhang 13ae47234a radeonsi: add Polaris12 PCI ID
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-12-21 15:10:54 -05:00
Axel Davy f78cbbdfaa d3dadapter/present: Add precision for WaitBufferReleased
Add precision on the behaviour of WaitBufferReleased.
All implementers and users of the API were expecting
that behaviour.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-12-20 23:44:21 +01:00
Axel Davy 0eef5491d3 d3dadapter/present: Add new API to ID3DPresent
The API will enable better support for the commonly
used DISCARD swapchain parameter.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-12-20 23:44:21 +01:00
Rob Clark 8ca14b04e1 add EGL_TEXTURE_EXTERNAL_WL to WL_bind_wayland_display spec
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-12-05 16:01:21 +00:00
Rob Clark 21b1acfcfe dri: extend fence extension to support native fd fences
Required to implement EGL_ANDROID_native_fence_sync.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Tested-by: Chad Versace <chadversary@chromium.org>
2016-12-01 10:57:35 -08:00
Ben Widawsky 19a01f8139 i965: Fix KBL typo in string
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-11-15 17:34:37 -08:00
Ben Widawsky 2193fb0e1f i965/glk: Add basic Geminilake support
v2: s/bdw/gen; Add the 2x6 config
v3: Add min_ds_entries

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-11-15 17:34:37 -08:00
Dave Airlie 98969808ff vulkan: import latest public vulkan headers + and fix drivers.
I just noticed the new vulkan headers changed a prototype,
so I've decided to import them and fix the drivers to use the
new API.

Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-11-11 12:33:07 +10:00
Ben Widawsky ffd9060b23 i965: Reorder PCI ID list to match release order
I have some OCD...

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-10-20 08:54:03 -07:00
Ben Widawsky b8509c8936 i965: Add some APL and KBL SKU strings
We got a couple for products that exist on ark.intel.com, so let's just
put them in now.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-20 08:54:03 -07:00
Chad Versace a597c8ad5b egl: Implement EGL_MESA_platform_surfaceless
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-14 11:19:40 -07:00
Emil Velikov c85b34ffd0 mesa_glinterop: allow building without X and related headers
This commit effectively reverts c10dcb2ce8
and fixes the typedef redefinition which inspired it.

In order to prevent requiring X packages at build time earlier commit
forward declared the required X/GLX typedefs. Since that approach
introduced typedef redefinition (a C11 feature) it was reverted.

To avoid the redefinition while _not_ mandating X and related headers
forward declare the structs and use those through the header.

As anyone uses the mesa interop header they ensure that the X (or others
in terms of EGL) headers are included, which ensures that everything is
resolved within the compilation unit.

Cc: Vinson Lee <vlee@freedesktop.org>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Cc: Tapani Pälli <tapani.palli@intel.com>
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Fixes: c10dcb2ce8 ("Revert "mesa_glinterop: remove inclusion of GLX
header"")
Fixes: 8472045b16 ("mesa_glinterop: remove inclusion of GLX header")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96770
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2016-10-14 11:08:59 +01:00
Vinson Lee c10dcb2ce8 Revert "mesa_glinterop: remove inclusion of GLX header"
This reverts commit 8472045b16.

Conflicts:

	include/GL/mesa_glinterop.h

This patch fixes this build error with GCC 4.4.

  Compiling src/glx/dri_common_interop.c ...
In file included from src/glx/dri_common_interop.c:33:
include/GL/mesa_glinterop.h:62: error: redefinition of typedef ‘GLXContext’
include/GL/glx.h:165: note: previous declaration of ‘GLXContext’ was here

Fixes: 8472045b16 ("mesa_glinterop: remove inclusion of GLX header")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96770
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2016-10-10 15:09:44 -07:00
Chuanbo Weng 1ceb775d57 dri: add offset attribute and bump version of EGLImage extensions.
Offset is useful for buffer sharing with other components, so add
it to queryImage attributes.

Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-09-21 12:19:19 +01:00
Kyle Brenneman 6e50f12b04 egl: Update eglext.h (v2)
Updated eglext.h to revision 33111 from the Khronos repository.

v2:
- Don't (re)move extension includes from eglext.h (Emil Velikov)
- Bump to revision 33111 (Adam Jackson)

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-09-14 11:45:58 -04:00
Emil Velikov 63faf7de61 Remove GL_GLEXT_PROTOTYPES guards from non-ext headers.
A earlier sync with the Khronos headers added _extension_ prototype
guards to all the GLES2/3/31/32 core entry points. Effectively breaking
all the applications that aim to be portable and do not set the define.

The issue has been reported to Khronos (internal bugzilla #14206) and is
being worked on. Until updated/fixed headers are released locally fix
the issue.

The following report is when building weston.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97773

Cc: Armin Krezović <krezovic.armin@gmail.com>
Cc: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Fixes: 6a5504de2f ("Update Khronos-supplied headers to r33100")
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-09-12 16:52:43 +01:00
Eric Engestrom 3bd885d09c Introduce .editorconfig
A few weeks ago, Jose Fonseca suggested [0] we use .editorconfig files
to try and enforce the formatting of the code, to which Michel Dänzer
suggested [1] we start by importing the existing .dir-locals.el
settings. The first draft was discussed in the RFC [2].

These .editorconfig are a first step, one that has the advantage of
requiring little to no intervention from the devs once the settings
files are in place, but the settings are very limited. This does have
the advantage of applying while the code is being written.
This doesn't replace the need for more comprehensive formatting tools
such as clang-format & clang-tidy, but those reformat the code after
the fact.

[0] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121545.html
[1] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121639.html
[2] https://lists.freedesktop.org/archives/mesa-dev/2016-July/123431.html

Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2016-08-31 17:06:54 -07:00
Ilia Mirkin 6a5504de2f Update Khronos-supplied headers to r33100
As retrieved from opengl.org and khronos.org. Maintained the APPLE hack
in GL/glext.h manually. Added gl32.h.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Dave Airlie <airlied@redhat.com>
2016-08-28 21:41:47 -04:00
Jon Turney c7151401e0 Disable use of weak in threads_posix.h on Cygwin
Weak doesn't work the same on PE/COFF as on ELF, they are only weak
references.  Specifically, since nothing else pulls in the object which
contains pthread_mutexattr_init() (and coming from the C library, that is
the only thing that object contains), means that it ends up as 0

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-07-15 19:46:54 +01:00
Rodrigo Vivi 85ea8deb26 i965: Removing PCI IDs that are no longer listed as Kabylake.
This is unusual. Usually IDs listed on early stages of platform
definition are kept there as reserved for later use.

However these IDs here are not listed anymore in any of steppings
and devices IDs tables for Kabylake on configurations overview
section of BSpec.

So it is better removing them before they become used in any
other future platform.

Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2016-06-29 11:14:19 -07:00
Rodrigo Vivi bdff2e5547 i956: Add more Kabylake PCI IDs.
The spec has been updated adding new PCI IDs.

Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2016-06-29 11:14:19 -07:00
Giuseppe Bilotta 60a27ad122 Remove wrongly repeated words in comments
Clean up misrepetitions ('if if', 'the the' etc) found throughout the
comments. This has been done manually, after grepping
case-insensitively for duplicate if, is, the, then, do, for, an,
plus a few other typos corrected in fly-by

v2:
    * proper commit message and non-joke title;
    * replace two 'as is' followed by 'is' to 'as-is'.
v3:
    * 'a integer' => 'an integer' and similar (originally spotted by
      Jason Ekstrand, I fixed a few other similar ones while at it)

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2016-06-23 13:55:03 -07:00
Jose Fonseca 805dbdf06d include: Require MSVC 2013 Update 4.
Earlier MSVC 2013 releases have troubles compiling some of our C99 code,
so make sure we have Update 4 to avoid confusion.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-06-23 15:07:19 +01:00
Ilia Mirkin 92351a71a8 GL: update glcorearb.h to svn 32433
This brings in the fixed glClearNamedFramebufferfi definition, as well
as a lot of GLsizei -> GLsizeiptr changes.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
2016-06-10 20:31:53 -04:00
Ilia Mirkin f81374fd3e GL: update glext to svn 32957
This brings in defines from GL_EXT_window_rectangles and fixes the
glClearNamedFramebufferfi definition.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
2016-06-10 20:24:53 -04:00
Emil Velikov 13faddb6b8 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>
2016-05-30 17:53:44 +01:00
Ben Widawsky f1fa8b4a1c i965/bxt: Add 2x6 variant
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2016-05-26 14:06:43 -07:00
Emil Velikov e384d75b12 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>
2016-05-24 23:03:00 +01:00
Emil Velikov 0e983276b9 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>
2016-05-24 23:03:00 +01:00
Emil Velikov 923bdbf48c 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>
2016-05-24 23:03:00 +01:00
Emil Velikov c196de23ae 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>
2016-05-24 23:03:00 +01:00
Emil Velikov cb0708c843 mesa_glinterop: fix GL interop *_VERSION comments
Using the macro to set the version is wrong and ill-advised. Please don't
do it.

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>
2016-05-24 23:03:00 +01:00
Emil Velikov a3eb8702fb mesa_glinterop: remove inclusion of EGL header
Analogous to previous commit, but for EGL.

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>
2016-05-24 23:03:00 +01:00
Emil Velikov 8472045b16 mesa_glinterop: remove inclusion of GLX header
Since we only need partial information about the GLX symbols we can
forward declare them and drop the include. Obviously each user of the
said API will needs more than what's provides, so they'll include the
GLX header.

If they don't, the compiler will give us a nice warning ;-)

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>
2016-05-24 23:03:00 +01:00
Emil Velikov b5f9820d90 mesa_glinterop: remove unneeded GLAPI/GLAPIENTRY/APIENTRYP symbols
These come from windows.h, gl.h, glcorearb.h and/or glext.h.

The interop interface is aimed at non-Windows platforms while the macros
are used/derived due to Windows specifics. Thus we can safely remove
them.

Strictly speaking there should be GLXAPIENTRY/EGLAPIENTRY and alike
macros, although a) there is no GLX ones and b) this brings us even
further from decoupling the file from the GLX/EGL header dependency.

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>
2016-05-24 23:03:00 +01:00
Emil Velikov bcf9e47653 mesa_glinterop: replace GL types with their native counterpart.
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>
2016-05-24 23:02:56 +01:00
Emil Velikov 2e726144f9 mesa_glinterop: use generic variable types for the GL interop
Thus we can preserve the ABI, while avoiding the inclusion of some/all
of the following:

  EGL/egl.h
  GL/gl.h
  GL/glcorearb.h
  GLES/gl.h
  GLES2/gl2.h
  GLES3/gl3.h
  GLES3/gl31.h

This will allow us to build/use it alongside any combination of APIs.

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>
2016-05-24 23:02:08 +01:00
Emil Velikov cbf29d90ba 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>
2016-05-24 23:02:08 +01:00
Emil Velikov 0d31bfd71a Revert "mesa: Build EGL without X11 headers after interop patchset"
This reverts commit 4e2c9a0435.

The solution was incomplete and fragile. An alternative one is coming
shortly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
2016-05-24 23:02:05 +01:00
Emil Velikov 7e196cd170 c11/threads: resolve link issues with -O0
Add weak symbol notation for the pthread_mutexattr* symbols, thus making
the linker happy. When building with -O1 or greater the optimiser will
kick in and remove the said functions as they are dead/unreachable code.

Ideally we'll enable the optimisations locally, yet that does not seem
to work atm.

v2: Add the AX_GCC_FUNC_ATTRIBUTE([weak]) hunk in configure.

Cc: Alejandro Piñeiro <apinheiro@igalia.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
2016-05-24 20:21:31 +01:00
Kristian Høgsberg Kristensen 2bb935be2e dri: Add YVU formats
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-05-24 10:14:57 -07:00
Eric Engestrom 7362bb3e21 vk/intel: use negative VK_NO_PROTOTYPES scheme
3d0fac7aca changed all
VK_PROTOTYPES to VK_NO_PROTOTYPES
This brings the Intel header in line with the rest of the Vulkan code.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2016-05-23 12:07:46 +01:00
Rob Herring a0f06f168f DRI: Add DRIimage map and unmap functions
Add mapImage and unmapImage functions to DRIimage extension for mapping
and unmapping DRIimages for CPU access. The caller provides the region of
the image to map and is returned a pointer to the beginning of the region
and the stride (which could be different from the original).

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-05-23 12:07:46 +01:00
Emil Velikov 6ce11e7e2c c11/threads: create mutexattrs only when needed
If the mutexattrs are the default one can just pass NULL to
pthread_mutex_init. As the compiler does not know this detail it
unnecessarily creates/destroys the attrs.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-05-23 12:07:45 +01:00
Youry Metlitsky 4e2c9a0435 mesa: Build EGL without X11 headers after interop patchset
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-05-20 08:44:18 -07:00
Patrick Rudolph dae9a91727 st/nine: Implement IPresent version 1.2
Implement presentation interface version 1.2:
* ID3DPresent_ResolutionMismatch
    Poll for resolution mismatch.
    A third party app might have changed resolution,
    which requires a device reset.
* ID3DPresent_CreateThread
    Create a thread in WINE to allow nine to use Windows API
    functions. Required for multi-threaded presentation.
    In single-threaded presentation mode the calling thread is
    already known to WINE.
* ID3DPresent_WaitForThread
    Wait for a wine thread to terminate.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy c4af309973 st/nine: Fix header of GetIndices
There is a mistake in the online documentation,
the function only has 2 arguments.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Axel Davy 3e9d01ff39 st/nine: Increase minor d3dadapter9drm ABI
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 <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Christian Schmidbauer f5d6ed5702 st/nine: Clean up WINAPI definition
As Emil pointed out, only gcc, clang and MSVC compatibility is required.
Hence the check for GNUC can be skipped, as __i386__ and __x86_64__ are
only defined for gcc/clang, not for MSVC.

Remove the #undef which has been there for historic reasons, when wine
dlls for nine have been built inside mesa. Instead use #ifndef in order
to avoid redefining WINAPI from MSVC's headers.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Axel Davy <axel.davy@ens.fr>
2016-05-18 23:37:14 +02:00
Alex Deucher 86f51d7958 radeonsi: add new polaris11 pci ids
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-05-17 17:49:50 -04:00
Alex Deucher 768320b497 radeonsi: add new polaris10 pci ids
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-05-17 17:49:50 -04:00
Jose Fonseca c068610a7d scons: Move fallback HAVE_* definitions to headers.
These were being defined in SCons, but it's not practical:

- we actually need to include Gallium headers from external source trees, with
completely disjoint build infrastructure, and it's unsustainable to
replicate the HAVE_xxx checks or even hard-coded defines across
everywhere.

- checking compiler version via command line doesn't really work due to
  Clang essentially being like a cameleon which can fake either GCC or
  MSVC

There's no change for autoconf.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-04-26 17:17:00 +01:00
Marek Olšák 5e9ed261ed dri_interface: add interface for GL interop with other APIs (v2)
v2: - use const
2016-04-20 12:18:47 +02:00
Marek Olšák 6eeb729490 include/GL: add mesa_glinterop.h for OpenGL-OpenCL interop (v4.2)
v2: - use "enum" to define stuff
v3: - more comments, define MESA_GLINTEROP_UNSUPPORTED
v4: - add mesa_glinterop_device_info::interop_version
    - more comments
    - remove #define MESA_GLINTEROP_VERSION
    - use const for "in"
v4.1: - use version numbers for structures
      - add "out_driver_data_written"
v4.2: - buf_offset & buf_size affect GL_ARRAY_BUFFER too, this is required
        for sharing suballocations within a larger buffer
2016-04-20 12:15:41 +02:00
Pierre Moreau 649704f1f7 math: Import isinf and others to global namespace
Starting from C++11, several math functions, like isinf, moved into the std
namespace. Since cmath undefines those functions before redefining them inside
the namespace, and glibc 2.23 defines the C variants as macros, the C variants
in global namespace are not accessible any longer.

v2: Move the fix outside of Nouveau, as suggested by Jose Fonseca, since anyone
    might need it when GCC switches to C++14 by default with GCC 6.0.

v3:
*   Put the code directly inside c99_math.h rather than creating a new header
    file, as asked by Jose Fonseca;
*   Guard the code behind glibc version checks, as only glibc > =2.23 defines
    isinf & co. as functions, as suggested by Jose Fonseca.

Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
2016-04-18 11:10:25 +01:00
Jason Ekstrand 6a04968784 Merge remote-tracking branch 'public/master' into vulkan 2016-04-04 13:58:05 -07:00
Christian Schmidbauer 2a529a8ac8 st/nine: specify WINAPI only for i386 and amd64
Currently mesa fails building with the x32 abi as ms_abi is not defined
in such a case.

The patch uses ms_abi only for amd64 targets and stdcall only for i386
targets to be sure that those are defined.

This patch additionally checks for __GNUC__ to guarantee that
__attribute__ is available.

CC: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Christian Schmidbauer <ch.schmidbauer@gmail.com>
Acked-by: Axel Davy <axel.davy@ens.fr>
2016-04-02 23:30:40 +02:00
Jason Ekstrand 95106f6bfb Merge remote-tracking branch 'public/master' into vulkan 2016-04-01 15:16:21 -07:00
Sonny Jiang f00c840578 radeonsi: add Polaris PCI IDs
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Polaris10)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (Polaris11)
2016-03-24 23:08:12 -04:00
Jason Ekstrand 8dd86e8aa7 Update to the latest Vulkan header from Khronos 2016-03-22 16:06:53 -07:00
Jason Ekstrand 7f6a0cb29c Merge remote-tracking branch 'public/master' into vulkan 2016-03-15 14:09:50 -07:00
Ben Widawsky d1ab544bb8 i965/chv: Display proper branding
"Braswell" is a Cherryview based *thing*. It unfortunately requires extra
information to determine its marketing name. Unlike all previous products, and
hopefully all future ones, there is no unique 1:1 mapping of PCI device ID to
brand string.

I put up a fight about adding any complexity to our GL renderer string code for
a very long time. However, a wise man made a comment to me that I couldn't argue
with: if a user installs Windows on their hardware, the brand string should be
the same as what we display in Linux. The Windows driver apparently does this
check, so we should too.

Note that I did manage to find a good use for this info anyway in the compute
shader thread counts.

v2: memcpy instead of strncpy, and some minor changes (Matt)

Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com
2016-03-11 11:17:28 -08:00
Emil Velikov f3e23ead53 egl: remove remnants of MESA_drm_display
Last set in st/egl, unused in mesa-demos and superseded by
EGL_KHR_platform_gbm.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-03-09 17:16:51 +00:00
Axel Davy d943ac432d dri: add backbuffer use flag
This will be used by the next commit.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-03-09 15:02:25 +01:00
Kenneth Graunke 89e421369c Merge remote-tracking branch 'origin/master' into vulkan 2016-03-01 17:11:29 -08:00
Marc-André Lureau f1d12e7392 virtio_gpu: Add virtio 1.0 PCI ID to driver map
Add the virtio-gpu PCI ID for virtio 1.0 (according to the
specification, "the PCI Device ID is calculated by adding 0x1040 to the
Virtio Device ID")

Support for virtio 1.0 was added in qemu 2.4 (same time virtio-gpu
landed).

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-02-29 11:31:36 +00:00
Kristian Høgsberg Kristensen 59f5728995 Merge remote-tracking branch 'origin/master' into vulkan 2016-02-24 13:04:54 -08:00
Ben Widawsky 20e8ee3662 i965/skl: Update Skylake renderer strings
Also adds some of the Iris/Pro parts which we previously didn't have named.

v2: 0x192d is gt3, not gt4
Adding some 'e' tags for eDRAM parts

Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Acked-by: Michał Winiarski <michal.winiarski@intel.com>
2016-02-17 16:50:59 -08:00
Ben Widawsky 644c8a5151 i965/skl: Add two missing device IDs
The Iris part is left unbranded because we did not have these with original SKL.

v2: 0x192d is gt3, not gt4

v3: Forgot to update the temporary brand string when I did v2.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Acked-by: Michał Winiarski <michal.winiarski@intel.com>
2016-02-17 16:50:59 -08:00
Jason Ekstrand ff8895ba56 Merge remote-tracking branch 'mesa-public/master' into vulkan 2016-02-11 15:09:30 -08:00
Jose Fonseca 0d4898ae80 include,gallium: Remove pre-MSVC 2013 compatibility.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-02-11 21:36:00 +00:00
Jason Ekstrand 9401516113 Merge remote-tracking branch 'mesa-public/master' into vulkan 2016-02-05 15:21:11 -08:00
Jason Ekstrand 9645b8eb1f Merge branch mesa-public/master into vulkan 2016-02-05 14:21:13 -08:00
Patrick Rudolph a961ec335d st/nine: Handle Window Occlusion
Apps can know if the window is occluded by checking for
specific error messages. The behaviour is different
for Device9 and Device9Ex.

This allow games to release the mouse and stop rendering
until the focus is restored.

In case of multiple swapchain we do care only of the device one.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2016-02-04 22:12:17 +01:00
Jason Ekstrand c7f26bbed9 vulkan: Bump the header to 1.0.3 2016-02-02 13:08:47 -08:00
Jason Ekstrand d4953fb340 vulkan: Import vk_icd.h 2016-01-29 20:37:45 -08:00
Jason Ekstrand ac75746448 vulkan.h: Update to 1.0.2 2016-01-27 21:59:00 -08:00
Rob Herring 657dc4f533 virtio_gpu: Add PCI ID to driver map
Add the virtio-gpu PCI ID so the driver probing works.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-23 12:35:24 +10:00
Jason Ekstrand 3d0fac7aca vulkan.h: Pull in 1.0.1 header 2016-01-14 08:37:54 -08:00
Jason Ekstrand 24a6fcba77 vulkan-1.0.0: Bump the version to 1.0.0 2016-01-14 08:26:37 -08:00
Jason Ekstrand c310fb032d vulkan-1.0.0: Rework memory barriers 2016-01-14 08:09:39 -08:00
Jason Ekstrand b14a78cfb8 vulkan-1.0.0: No-op WSI changes 2016-01-14 08:02:44 -08:00
Jason Ekstrand 6d3322d0e5 vulkan-1.0.0: Make extents unsigned 2016-01-14 08:00:18 -08:00
Jason Ekstrand b57c72d964 vulkan-1.0.0: Rework blits to use four offsets 2016-01-14 07:59:37 -08:00
Jason Ekstrand f6cae99294 vulkan-1.0.0: Split out command buffer inheritance info 2016-01-14 07:45:15 -08:00
Jason Ekstrand f99f847412 vulkan-1.0.0: Re-order some structs in the header 2016-01-14 07:43:05 -08:00
Jason Ekstrand aab9517f3d vulkan-1.0.0: Misc. field and argument renames 2016-01-14 07:41:45 -08:00
Jason Ekstrand d877095e66 vulkan-1.0.0: Get rid of MIPMAP_MODE_BASE 2016-01-14 07:32:16 -08:00
Jason Ekstrand 7b81637762 vulkan-1.0.0: Convert pPreserveAttachments to a uint32_t 2016-01-14 07:30:46 -08:00
BogDan Vatra 102c74277f WIP: Partially upgrade to vulkan v0.221.0
TODO, make use of:
- VkPhysicalDeviceFeatures.drawIndirectFirstInstance,
- VkPhysicalDeviceFeatures.inheritedQueries
- VkPhysicalDeviceLimits.timestampComputeAndGraphics
- VkSubmitInfo.pWaitDstStageMask
- VkSubresourceLayout.arrayPitch
- VkSamplerCreateInfo.anisotropyEnable
2016-01-14 07:30:46 -08:00
Kristian Høgsberg Kristensen f0993f81c7 Merge ../mesa into vulkan 2016-01-08 22:16:43 -08:00
Sarah Sharp 39c41be50d mesa: Add KBL PCI IDs and platform information.
Add PCI IDs for the Intel Kabylake platforms.  The IDs are taken
directly from the Linux kernel patches, which are under review:

http://lists.freedesktop.org/archives/intel-gfx/2015-October/078967.html
http://cgit.freedesktop.org/~vivijim/drm-intel/log/?h=kbl-upstream-v2

The Kabylake PCI IDs taken from the kernel are rearranged to be in order
of GT type, then PCI ID.

Please note that if this patch is backported, the following fixes will
need to be added before this patch:

commit 28ed1e08e8 "i965/skl: Remove early platform support"
commit c1e38ad370 "i965/skl: Use larger URB size where available."

Thanks to Ben for fixing a bug around setting urb.size, and being
patient with my questions about what the various fields mean.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Suggested-by: Ben Widawsky <benjamin.widawsky@intel.com>
Tested-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (KBL-GT2)
Cc: "11.1" <mesa-stable@lists.freedesktop.org>
2016-01-06 15:11:00 -08:00
Jason Ekstrand ea77b384e8 Merge remote-tracking branch 'mesa-public/master' into vulkan
This pulls in tessellation and the store_var changes that go with it.
2015-12-27 23:23:05 -08:00
Brian Paul a34e7612dc osmesa: add new OSMesaCreateContextAttribs function
This allows specifying a GL profile and version so one can get a core-
profile context.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-12-16 19:38:51 -07:00
Jason Ekstrand d5c9955d3e Merge remote-tracking branch 'mesa-public/master' into vulkan
This pulls in nir_intrinsic_load/store changes and the switch of all
uniforms in i965 to bytes.  This accounts for the Vulkan changes.
2015-12-10 18:29:36 -08:00
Jason Ekstrand 46bcf9d777 vulkan: Pull in the 0.210.1 vk_platform header
Somehow this got missed in the API update.
2015-12-09 11:55:38 -08:00
Jason Ekstrand d666487dc6 vk: Add new WSI support and bump the API to 0.210.1 2015-12-03 15:15:29 -08:00
Jason Ekstrand 4c19243562 vk/0.210.0: Advertise version 0.210.0 2015-12-03 13:44:02 -08:00
Jason Ekstrand 888744cabf vk/0.210.0: Update queries to the new API 2015-12-03 13:44:02 -08:00
Jason Ekstrand fa2435de3c vk/0.210.0: Update the VkFormat enum 2015-12-03 13:44:02 -08:00
Jason Ekstrand 4e904a0310 vk/0.210.0: Rework vkQueueSubmit 2015-12-03 13:44:02 -08:00
Jason Ekstrand 5757ad2959 vk/0.210.0: Remove depth clip and add depth clamp 2015-12-03 13:43:59 -08:00
Jason Ekstrand d689745303 vk/0.210.0: Rework device features and limits 2015-12-03 13:43:54 -08:00
Jason Ekstrand 74c4c4acb6 vk/0.210.0: Rework QueueFamilyProperties 2015-12-03 13:43:54 -08:00
Jason Ekstrand fed3586f34 vk/0.210.0: Rework result and structure type enums
By and large, this is just moving enum values around.  However, it also
removed VK_UNSUPPORTED which we were returning a number of places.  Those
places now return VK_ERROR_INCOMPATABLE_DRIVER.
2015-12-03 13:43:54 -08:00
Jason Ekstrand a5f19f64c3 vk/0.210.0: Remove the VkShaderStage enum
This made for an unfortunately large amount of work since we were using it
fairly heavily internally.  However, gl_shader_stage does basically the
same things, so it's not too bad.
2015-12-03 13:43:54 -08:00
Jason Ekstrand e10dc002e9 vk/0.210.0: Remove VkShader 2015-12-03 13:43:54 -08:00
Jason Ekstrand e6ab06ae7f vk/0.210.0: Rework memory property flags 2015-12-03 13:43:54 -08:00
Jason Ekstrand 93071482f9 vk/0.210.0: Remove some unused enum values 2015-12-03 13:43:54 -08:00
Jason Ekstrand b264012fcf vk/0.210.0: Update VkPipelineStageFlagBits 2015-12-03 13:43:54 -08:00
Jason Ekstrand 1aaf15bf19 vk/0.210.0: Trivial function argument name change 2015-12-03 13:43:53 -08:00
Jason Ekstrand 938a2939c8 vk/0.210.0: We now allocate command buffers; not create them 2015-12-03 13:43:53 -08:00
Jason Ekstrand 5a02441789 vk/0.210.0: Rename a parameter to GetImageSparseMemoryRequirements 2015-12-03 13:43:53 -08:00
Jason Ekstrand a9fc0ce0e3 vk/0.210.0: Delete three no longer existant entrypoints 2015-12-03 13:43:53 -08:00
Jason Ekstrand fcfb404a58 vk/0.210.0: Rework allocation to use the new pAllocator's 2015-12-03 13:43:53 -08:00
Jason Ekstrand d3547e7334 vk/0.210.0: Use VkSampleCountFlagBits for sample counts 2015-12-03 13:43:53 -08:00
Jason Ekstrand 9349625d60 vk/0.210.0: Rework VkInstanceCreateInfo 2015-12-03 13:43:53 -08:00
Jason Ekstrand c30a021820 vk/0.210.0: More function argument renaming 2015-12-03 13:43:53 -08:00
Jason Ekstrand b1cd025b88 vk/0.210.0: Replace MemoryInput/OutputFlags with AccessFlags 2015-12-03 13:43:53 -08:00
Jason Ekstrand 43f3e92348 vk/0.210.0: Rework render pass description structures 2015-12-03 13:43:53 -08:00
Jason Ekstrand 299f8f1511 vk/0.210.0: More structure field renaming 2015-12-03 13:43:53 -08:00
Jason Ekstrand 407b8cc5e0 vk/0.210.0: Get rid of VkImageAspect 2015-12-03 13:43:53 -08:00
Jason Ekstrand 3f6abd0161 vk/0.210.0: Rework descriptor sets 2015-12-03 13:43:52 -08:00
Jason Ekstrand 6a6da54ccb vk/0.210.0: Rename parameters to memory binding/mapping functions 2015-12-03 13:43:52 -08:00
Jason Ekstrand aadb7dce9b vk/0.210.0: Update to the new instance/device create structs 2015-12-03 13:43:52 -08:00
Jason Ekstrand 607fe31598 vk/0.210.0: More trivial struct/enum changes 2015-12-03 13:43:52 -08:00
Jason Ekstrand dde7172a8a vk/0.210.0: Trivial flag enum updates 2015-12-03 13:43:52 -08:00
Jason Ekstrand 4cf0b57bbf vk/0.210.0: Rename ChannelFlags to ColorComponentFlags 2015-12-03 13:43:52 -08:00
Jason Ekstrand 7f2284063d vk/0.210.0: s/raster/rasterization/ 2015-12-03 13:43:52 -08:00
Jason Ekstrand 1ab9f843bc vk/0.210.0: Don't allow chaining of description structs 2015-12-03 13:43:52 -08:00
Jason Ekstrand 17486b8664 vk/0.210.0: More fun with flags fields 2015-12-03 13:43:52 -08:00
Jason Ekstrand f5ba1f994a vk/0.210.0: Make pCode a uint32_t pointer 2015-12-03 13:43:52 -08:00
Jason Ekstrand 5f348bd0e5 vk/0.210.0: Rename origin fields of VkViewport 2015-12-03 13:43:52 -08:00
Jason Ekstrand 9fa6e328eb vk/0.210.0: Move alphaToOne and alphaToCoverate to multisample state 2015-12-03 13:43:52 -08:00
Jason Ekstrand f97c3b6d58 vk/0.210.0: Add flags fields to various pipeline create structs 2015-12-03 13:43:51 -08:00
Jason Ekstrand e673d64209 vk/0.210.0: Change field names in vertex input structs 2015-12-03 13:43:51 -08:00
Jason Ekstrand fd53603e42 vk/0.210.0: Misc. no-op structure changes
The only non-trivial change is to sparse resources that we don't handle
anyway.
2015-12-03 13:43:51 -08:00
Jason Ekstrand fe644721aa vk/0.210.0: Rename property pCount parameters 2015-12-03 13:43:51 -08:00
Jason Ekstrand e8f2294cd2 vk/0.210.0: Rework sampler filtering and mode enums 2015-12-03 13:43:51 -08:00
Jason Ekstrand 2e10ca5748 vk/0.210.0: Misc. function argument renames 2015-12-03 13:43:51 -08:00
Jason Ekstrand 569f70be56 vk/0.210.0: Rework copy/clear/blit API 2015-12-03 13:43:47 -08:00
Jose Fonseca 56aff6bb4e Remove Sun CC specific code.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-12-02 07:51:04 +00:00
Jason Ekstrand 4ab9391fbb vk/0.210.0: Rework dynamic states 2015-11-30 14:19:41 -08:00
Jason Ekstrand 73ef7d47d2 vk/0.210.0: Rework color blending enums 2015-11-30 13:49:28 -08:00
Jason Ekstrand 9b1cb8fdbc vk/0.210.0: Rework a few raster/input enums 2015-11-30 13:28:17 -08:00
Jason Ekstrand a53f23d93f vk/0.210.0: Rework texture view component mapping 2015-11-30 13:06:12 -08:00
Jason Ekstrand f1a7c7841f vk/0.210.0: Switch to the new VKAPI function decorations
While we're at it, we do a bunch of the VkResult -> void updates
2015-11-30 12:46:30 -08:00
Jason Ekstrand a89a485e79 vk/0.210.0: Rename CmdBuffer to CommandBuffer 2015-11-30 11:48:08 -08:00
Jason Ekstrand 6a8a542610 vk/0.210.0: A pile of minor enum updates 2015-11-30 11:12:44 -08:00
Jason Ekstrand 3db43e8f3e vk/0.210.0: Switch to the new-style handle declarations 2015-11-30 10:58:02 -08:00
Jason Ekstrand 5cb57806b2 vk: Add connonical 0.170.2 and 0.210.0 headers
This is in preparation for the API update
2015-11-30 10:24:35 -08:00
Marta Lofstedt 1d5b88e33b gles2: Update gl2ext.h to revision: 32120
This is needed to be able to implement the accepted OES
extensions.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Marta Lofstedt <marta.lofstedt@linux.intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-11-30 10:46:15 +01:00
Jason Ekstrand b00e3f221b Merge remote-tracking branch 'mesa-public/master' into vulkan 2015-11-03 15:45:04 -08:00
Ben Widawsky dde33fc23c i965/skl: PCI ID cleanup and brand strings
A few new PCI ids are added here, and one is removed (0x190B) because it no
longer seems to exist anywhere.

v2-4:
Only use ascii characters (Ilia)
0x1921 is no longer marked as f

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2015-11-03 10:00:17 -08:00
Ben Widawsky 7cbd6608f5 i965/skl: Add GT4 PCI IDs
Like other gen8+ hardware, the hardware automatically scales up thread counts.
We must be careful about the URB sizes since GT4 adds another slice.

One of the existing PCI IDs is actually mislabeled as GT3. Arguably this is a
real bug since the URB size will be wrong. Because this patch is simply meant to
add the missing IDs, that will be fixed in a later patch.

v2: No longer relevant.

v3: Update the wm thread count to support GT4. The WM thread count is used to
determine the maximum scratch space required. Currently the code always
allocates the maximum amount even though lower GT SKUs require less. The formula
is threads_per_psd * subslices_per_slice * slices

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2015-11-03 09:45:04 -08:00
Dave Airlie 2b67657096 gallium/swrast: fix front buffer blitting. (v2)
So I've known this was broken before, cogl has a workaround
for it from what I know, but with the gallium based swrast
drivers BlitFramebuffer from back to front or vice-versa
was pretty broken.

The legacy swrast driver tracks when a front buffer is used
and does the get/put images when it is mapped/unmapped,
so this patch attempts to add the same functionality to the
gallium drivers.

It creates a new context interface to denote when a front
buffer is being created, and passes a private pointer to it,
this pointer is then used to decide on map/unmap if the
contents should be updated from the real frontbuffer using
get/put image.

This is primarily to make gtk's gl code work, the only
thing I've tested so far is the glarea test from
https://github.com/ebassi/glarea-example.git

v2: bump extension version,
check extension version before calling get image. (Ian)

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

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-10-31 16:04:36 +10:00
Samuel Li 98546bfd03 radeonsi: add Stoney pci ids
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Samuel Li <samuel.li@amd.com>
Cc: mesa-stable@lists.freedesktop.org
2015-10-23 17:53:48 -04:00
Kristian Høgsberg Kristensen fc2a66cfcd Merge ../mesa into vulkan 2015-10-08 17:20:24 -07:00
Jason Ekstrand 8984559892 vk/0.170.2: Update to the new VK_EXT_KHR_swapchain extensions 2015-10-08 12:11:18 -07:00
Jan Vesely c8031a879a c11/threads: initialize timeout structure
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-10-08 14:05:57 +01:00
Chad Versace 7fa98ab182 vk: Remove temporary vulkan headers
Remove vulkan-0.138.2.h and vulkan-0.170.2.h. Their purpose was to aid
the header update to 0.170.2.
2015-10-07 11:45:48 -07:00
Chad Versace 2f1ca71360 vk/0.170.2: Bump header version
The header is now fully updated.
2015-10-07 11:44:44 -07:00
Chad Versace c2f94e3a0d vk/0.170.2: Update C++ errata and typedefs 2015-10-07 11:44:33 -07:00
Chad Versace 0ca3c8480d vk/0.170.2: Update remaining enums 2015-10-07 11:39:49 -07:00
Chad Versace f9c948ed00 vk/0.170.2: Update VkResult
Version 0.170.2 removes most of the error enums. In many cases, I had to
replace an error with a less accurate (or even incorrect) one.
In other cases, the error path is replaced with an assertion.
2015-10-07 11:36:51 -07:00
Chad Versace 8dee32e71f vk/0.170: Update VkDescriptorInfo
Ignore the new bufferInfo field with a anv_finishme.
2015-10-07 10:58:55 -07:00
Chad Versace 92e7bd3610 vk/0.170.2: Update vkCreateDescriptorPool
Nothing to do. In Mesa the pool is a stub.
2015-10-07 10:47:55 -07:00
Chad Versace a3bc07c23b vk/0.170.2: Update VkAttachmentDescription 2015-10-07 10:44:40 -07:00
Chad Versace 82259f88dd vk/0.170.2: Update VkImageViewCreateInfo 2015-10-07 10:43:44 -07:00
Chad Versace f4295b3cca vk/0.170.2: Update VkImageCreateInfo 2015-10-07 10:43:17 -07:00
Chad Versace d48e71ce55 vk/0.170.2: Update VkPhysicalDeviceProperties 2015-10-07 10:36:46 -07:00
Chad Versace 81e1dcc42c vk/0.170.2: Update VkImageFormatProperties 2015-10-07 10:28:30 -07:00
Chad Versace 98c2bb6917 vk/0.170.2: Update VkFormatProperties 2015-10-07 10:15:59 -07:00
Chad Versace 545f5cc6e1 vk/0.170.2: Update VkPhysicalDeviceFeatures 2015-10-07 10:09:39 -07:00
Chad Versace 033a37f591 vk/0.170.2: Update VkPhysicalDeviceLimits 2015-10-07 10:09:31 -07:00
Jason Ekstrand 010c6efd65 vk/0.170.2: Make vkUpdateDescriptorSets return void 2015-10-07 09:44:53 -07:00
Jason Ekstrand daf68a9465 vk/0.170.2: Switch to the new dynamic state model 2015-10-07 09:40:49 -07:00
Chad Versace 6dea1a9ba1 vk/0.170.2: Merge VkAttachmentView into VkImageView 2015-10-07 09:10:25 -07:00
Jason Ekstrand 89eebd889c vk/0.170.2: Fairly trivial enum shuffling 2015-10-06 14:08:08 -07:00
Jason Ekstrand 1e4263b7d2 vk/0.170.2: s/baseArraySlice/baseArrayLayer/ 2015-10-06 14:08:08 -07:00
Jason Ekstrand 19018c9f13 vk/0.170.2: Add a stage field to ShaderCreateInfo 2015-10-06 10:20:10 -07:00
Jason Ekstrand cc389b1482 vk/0.170.2: Rename cs to stage in ComputePipelineCreateInfo 2015-10-06 10:11:50 -07:00
Jason Ekstrand 588d40e97a vk/0.170.2: Use ImageSubresourceCopy in ImageResolve 2015-10-06 10:09:47 -07:00
Jason Ekstrand bd4cde708a vk/0.170.2: Rename fields in VkClearColorValue 2015-10-06 10:07:47 -07:00
Jason Ekstrand 81c7fa8772 vk/0.170.2: Rework blits to use ImageSubresourceCopy 2015-10-06 10:04:04 -07:00
Jason Ekstrand ba2254aa79 vulkan.h: Move stuff around
This has no functional change but substantially decreases the diff with the
0.170.2 header.
2015-10-06 09:50:04 -07:00
Jason Ekstrand d1908d2c33 vk/0.170.2: Rework parameters to CmdClearDepthStencil functions 2015-10-06 09:40:39 -07:00
Jason Ekstrand 02a9be31d6 vk/0.170.2: Add the flags parameter to GetPhysicalDeviceImageFormatProperties 2015-10-06 09:37:21 -07:00
Jason Ekstrand a145acd812 vk/0.170.2: Remove the pCount parameter from AllocDescriptorSets 2015-10-06 09:32:01 -07:00
Jason Ekstrand 8ba684cbad vk/0.170.2: Rename extension and layer query functions 2015-10-06 09:25:03 -07:00
Jason Ekstrand a6eba403e2 vk/0.170.2: Update to the new queue family properties query 2015-10-05 21:17:12 -07:00
Jason Ekstrand 65964cd49b vk/0.170.2: Re-arrange parameters of vkCmdDraw[Indexed] 2015-10-05 21:10:20 -07:00
Jason Ekstrand 05a26a60c8 vk/0.170.2: Make destructors return void 2015-10-05 20:50:51 -07:00
Jason Ekstrand 460676122f vk/0.170.2: Rename VkClearValue.ds to depthStencil 2015-10-05 20:35:08 -07:00
Jason Ekstrand 8e1ef639b6 vk/0.170.2: Add the subpass field to VkCmdBufferBeginInfo 2015-10-05 20:30:53 -07:00
Jason Ekstrand 757166592e vk/0.170.2: Rename pointer parameters of VkSubpassDescription 2015-10-05 20:26:21 -07:00
Jason Ekstrand 57f500324b vk/0.170.2: Add unnormalizedCoordinates to VkSamplerCreateInfo 2015-10-05 20:17:24 -07:00
Jason Ekstrand f7c3519aaf vk/0.170.2: Rename VkTexAddress to VkTexAddressMode 2015-10-05 20:15:06 -07:00
Jason Ekstrand 39a19e88a3 vulkan.h: Various cosmetic changes
These don't affect the driver in any way.
2015-10-05 20:06:30 -07:00
Chad Versace 6317c3144d vk/0.170.2: Drop VK_BUFFER_USAGE_GENERAL 2015-10-05 08:12:59 -07:00
Chad Versace 4744f60e79 vk/0.170.2: Drop enum VkBufferViewType 2015-10-05 08:12:58 -07:00
Chad Versace 7a089bd1a6 vk/0.170.2: Update VkImageSubresourceRange
Replace 'aspect' with 'aspectMask'.
2015-10-05 08:10:57 -07:00
Chad Versace 568654d606 vk/0.170.2: Drop VK_IMAGE_USAGE_GENERAL 2015-10-05 08:09:33 -07:00
Chad Versace 6a40af1b08 vk/0.170.2: Update VkPipelineMultisampleStateCreateInfo 2015-10-04 10:00:25 -07:00
Chad Versace dd04be491d vk/0.170.2: Update Vk VkPipelineDepthStencilStateCreateInfo
Rename member depthBoundsEnable -> depthBoundsTestEnable.
2015-10-04 09:41:46 -07:00
Chad Versace 8cb2e27c62 vk/0.170.2: Update VkRenderPassBeginInfo
Rename members:
    attachmentCount -> clearValueCount
    pAttachmentClearValues -> pClearValues
2015-10-04 09:26:25 -07:00
Chad Versace 3694518be5 vk/0.170.2: Drop VkBufferViewCreateInfo::viewType 2015-10-04 09:14:57 -07:00
Chad Versace 216d9f248d vk: Copy current header to vulkan-0.138.2.h
While upgrading Mesa to the new 0.170.2 API, it's convenient to have all
three headers available in the tree:
    - vulkan-0.138.2.h, the old one
    - vulkan-0.170.2.h, the new one
    - vulkan.h, the one in transition
2015-10-04 09:09:35 -07:00
Chad Versace 7f18ed4b9f vk: Import header 0.170.2 header LunarG SDK
From the LunarG SDK at tag sdk-0.9.1, import vulkan.h as
vulkan-0.170.2.h. This header is the first provisional header with the
addition of minor fixes.
2015-10-04 09:09:31 -07:00
Kristian Høgsberg Kristensen 005c8e0106 Merge branch 'master' of ../mesa into vulkan 2015-10-01 14:24:29 -07:00
Matt Turner c8dc04d4c0 c11/threads: Assert that mtx is non-NULL and check return values.
Passing NULL to C11 threads functions isn't safe, so there's no need for
our implementation to handle it. Cuts about 1k of .text.

   text     data      bss      dec      hex  filename
5009514   198440    26328  5234282   4fde6a  i965_dri.so before
5008346   198440    26328  5233114   4fd9da  i965_dri.so after

Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-09-25 14:08:31 -07:00
Jason Ekstrand 1bee19e023 vk: Add the WSI header files 2015-09-08 10:33:46 -07:00
Jason Ekstrand ca3cfbf6f1 vk: Add an initial implementation of the actual Khronos WSI extension
Unfortunately, this is a very large commit and removes the old LunarG WSI
extension.  This is because there are a couple of entrypoints that have the
same name between the two extensions so implementing them both is
impractiacl.

Support is still incomplete, but this is enough to get vkcube up and going
again.
2015-09-04 17:55:42 -07:00
Jason Ekstrand 2a8d1ac958 vk: Update to API version 0.138.2 2015-08-27 11:41:04 -07:00
Jason Ekstrand 9b387b5d3f Merge remote-tracking branch 'mesa-public/master' into vulkan 2015-08-25 18:41:21 -07:00
Dave Airlie 3547d9855c GL: update glext to svn 31811
This brings in the new ARB extensions.

Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-08-20 18:42:03 +10:00
Jason Ekstrand 6a7ca4ef2c Merge remote-tracking branch 'mesa-public/master' into vulkan 2015-08-17 11:25:03 -07:00
Marek Olšák 7bfb9ee5ee radeonsi: add all new VI PCI IDs including Fiji 2015-08-14 15:02:31 +02:00
Alex Deucher 87cea61b9e radeonsi: add new OLAND pci id
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: mesa-stable@lists.freedesktop.org
2015-08-10 22:44:55 -04:00
Frank Binns cfc3200a35 egl/dri: Add error info needed for EGL_EXT_image_dma_buf_import extension
Update the DRI image interface error codes to reflect the needs of the
EGL_EXT_image_dma_buf_import extension. This means updating the existing error
code documentation and adding a new __DRI_IMAGE_ERROR_BAD_ACCESS error code
so that drivers can correctly reject unsupported pitches and offsets. Hook
the new error code up in EGL to return EGL_BAD_ACCESS.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2015-08-04 20:03:16 -07:00
Emil Velikov 2b831334e9 includes/GL: remove duplicated extension declarations from glx.h
All three of GLX_NV_float_buffer, GLX_EXT_texture_from_pixmap and
GLX_MESA_query_renderer have been in glxext.h for a while now.

As such we can drop this workaround/hack from the header.

v2: Remove the comment about GLX_NV_float_buffer.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2015-08-01 15:47:55 +01:00
Roland Scheidegger 2b916c6e47 c99_math: (trivial) implement exp2 for MSVC too
Unsurprisingly doesn't build otherwise with old msvc.
2015-07-29 22:20:04 +02:00
Matt Turner ecc559218d c99_math: Implement exp2f for MSVC.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-07-29 09:34:51 -07:00
Chad Versace 56f1f47eda i965: Support importing R8 and GR88 dma_bufs
EGL_EXT_image_dma_buf_import now supports those formats.

Tests:
  - Tested by Piglit ext_image_dma_buf_import-transcode-nv12-as-r8-gr88.
  - Tested by Peter in Kodi/XBMC to obtain 60fps NV12 transcode at 4K.

Tested-by: Peter Frühberger <peter.fruehberger@gmail.com>
Signed-off-by: Chad Versace <chad.versace@intel.com>
2015-07-28 11:45:46 -07:00
Jason Ekstrand f884b500d0 vk/vulkan.h: Bump to the version 0.138.1 header
This doesn't actually require any implementation changes but it does change
an enum so it is ABI-incompatable with 0.138.0.
2015-07-23 10:38:22 -07:00
Jason Ekstrand 867f6cb90c vk: Add a FreeDescriptorSets function 2015-07-22 17:33:09 -07:00
Marek Olšák 4f57ccd02d egl,dri_interface: use DRI2rendererQueryExtension to enable 3D textures & sRGB
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-22 23:56:00 +02:00
Emil Velikov 0efd773f71 dri_interface: drop __NOT_HAVE_DRM_H magic
v2: use HAVE_LIBDRM macro.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-07-22 16:33:11 +01:00
Chad Versace 5520221118 vk: Remove unneeded vulkan-138.h 2015-07-15 17:16:07 -07:00
Chad Versace 73a8f9543a vk: Bump vulkan.h version to 0.138 2015-07-15 17:16:07 -07:00
Chad Versace 55781f8d02 vk/0.138: Update VkResult values 2015-07-15 17:16:07 -07:00
Chad Versace 756d8064c1 vk/0.132: Do type-safety 2015-07-15 17:16:07 -07:00
Jason Ekstrand 2b5a4dc5f3 vk: Add vulkan-138 and remove vulkan-0.132
Now, 138 is the target and not 132.  Once object destruction is finished,
we can delete 138 as it will be identical to vulkan.h
2015-07-14 17:54:13 -07:00
Jason Ekstrand 1f658bed70 vk/device: Add stub support for command pools
Real support isn't really that far away.  We just need a data structure
with a linked list and a few tests.
2015-07-14 17:40:00 -07:00
Jason Ekstrand ca7243b54e vk/vulkan.h: Add the stuff for cross-queue resource sharing
We only have one queue, so this is currently a no-op on our implementation.
2015-07-14 17:20:50 -07:00
Jason Ekstrand 553b4434ca vk/vulkan.h: Add a couple of size fields for specialization constants 2015-07-14 17:12:39 -07:00
Jason Ekstrand e5db209d54 vk/vulkan.h: Move around buffer image granularities 2015-07-14 17:10:37 -07:00
Jason Ekstrand c7fcfebd5b vk: Add stubs for all the sparse resource stuff 2015-07-14 17:06:11 -07:00
Jason Ekstrand 2a9136feb4 vk/image: Add a stub for the new ImageFormatProperties function
This lets the client query about things like multisample.  We don't do
multisample right now, so I'll let Chad deal with that when he gets to it.
2015-07-14 17:05:30 -07:00
Jason Ekstrand 2c4dc92f40 vk/vulkan.h: Rename FormatInfo to FormatProperties 2015-07-14 17:04:46 -07:00
Jason Ekstrand d7f44852be vk/vulkan.h: Re-order some #define's 2015-07-14 16:41:39 -07:00
Jason Ekstrand 1fd3bc818a vk/vulkan.h: Rename a function parameter 2015-07-14 16:39:01 -07:00
Jason Ekstrand 2e2f48f840 vk: Remove abreviations 2015-07-14 16:34:31 -07:00
Jason Ekstrand 02db21ae11 vk: Add the new extension/layer enumeration entrypoints 2015-07-14 16:11:21 -07:00
Jason Ekstrand a463eacb8f vk/vulkan.h: Change maxAnisotropy to a float 2015-07-14 15:04:11 -07:00
Jason Ekstrand 98957b18d2 vk/vulkan.h: Add the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT flag 2015-07-14 15:03:39 -07:00
Jason Ekstrand a35811d086 vk/vulkan.h: Rename a couple of function parameters
No functional change.
2015-07-14 15:03:01 -07:00
Jason Ekstrand 55723e97f1 vk: Split the memory requirements/binding functions 2015-07-14 14:59:39 -07:00
Jason Ekstrand ccb2e5cd62 vk: Make barriers more precise (rev. 133) 2015-07-14 14:50:35 -07:00
Jason Ekstrand 30445f8f7a vk: Split the dynamic state binding function into one per state 2015-07-14 14:26:10 -07:00
Jason Ekstrand d2c0870ff3 vk/vulkan.h: Rename a function parameter to match 132 2015-07-14 14:11:04 -07:00
Jason Ekstrand 8478350992 vk: Implement Multipass 2015-07-14 11:37:14 -07:00
Jason Ekstrand 68768c40be vk/vulkan.h: Re-arrange some enums and definitions in preparation for 131 2015-07-14 11:32:15 -07:00
Chad Versace 66cbb7f76d vk/0.132: Add vkDestroyRenderPass() 2015-07-14 11:21:31 -07:00
Chad Versace 6d0ed38db5 vk/0.132: Add vkDestroy*View()
vkDestroyColorAttachmentView
vkDestroyDepthStencilView

These functions are not in the 0.132 header, but adding them will help
us attain the type-safety API updates more quickly.
2015-07-14 11:19:22 -07:00
Chad Versace 1ca611cbad vk/0.132: Add vkDestroyCommandBuffer() 2015-07-14 11:11:41 -07:00
Chad Versace 6eec0b186c vk/0.132: Add vkDestroyImageView()
Just declare it in vulkan.h. Jason defined the function earlier
in image.c.
2015-07-14 11:09:14 -07:00
Chad Versace 4b2c5a98f0 vk/0.132: Add vkDestroyBufferView()
Just declare it in vulkan.h. Jason already defined the function
earlier in vulkan.c.
2015-07-14 11:06:57 -07:00
Chad Versace 08f7731f67 vk/0.132: Add vkDestroyFramebuffer() 2015-07-14 10:59:30 -07:00
Chad Versace 0c8456ef1e vk/0.132: Add vkDestroyDynamicDepthStencilState() 2015-07-14 10:54:51 -07:00
Chad Versace b29c929e8e vk/0.132: Add vkDestroyDynamicColorBlendState() 2015-07-14 10:52:45 -07:00
Chad Versace 5e1737c42f vk/0.132: Add vkDestroyDynamicRasterState() 2015-07-14 10:51:08 -07:00
Chad Versace d80fea1af6 vk/0.132: Add vkDestroyDynamicViewportState() 2015-07-14 10:42:45 -07:00
Chad Versace 9250e1e9e5 vk/0.132: Add vkDestroyDescriptorPool() 2015-07-14 10:38:22 -07:00
Chad Versace f925ea31e7 vk/0.132: Add vkDestroyDescriptorSetLayout() 2015-07-14 10:36:49 -07:00
Chad Versace ec5e2f4992 vk/0.132: Add vkDestroySampler() 2015-07-14 10:34:00 -07:00
Chad Versace a684198935 vk/0.132: Add vkDestroyPipelineLayout() 2015-07-14 10:29:47 -07:00
Chad Versace 6e5ab5cf1b vk/0.132: Add vkDestroyPipeline() 2015-07-14 10:26:17 -07:00
Chad Versace 114015321e vk/0.132: Add vkDestroyPipelineCache() 2015-07-14 10:19:27 -07:00
Chad Versace cb57bff36c vk/0.132: Add vkDestroyShader() 2015-07-14 10:16:22 -07:00
Chad Versace 8ae8e14ba7 vk/0.132: Add vkDestroyShaderModule() 2015-07-14 10:13:09 -07:00
Chad Versace dd67c134ad vk/0.132: Add vkDestroyImage()
We only need to add it to vulkan.h because Jason defined the function
earlier in image.c.
2015-07-14 10:13:00 -07:00
Chad Versace e93b6d8eb1 vk/0.132: Add vkDestroyBuffer() 2015-07-14 09:47:45 -07:00
Chad Versace 584cb7a16f vk/0.132: Add vkDestroyQueryPool() 2015-07-14 09:44:58 -07:00
Chad Versace 68c7ef502d vk/0.132: Add vkDestroyEvent() 2015-07-14 09:33:47 -07:00
Chad Versace 549070b18c vk/0.132: Add vkDestroySemaphore() 2015-07-14 09:31:34 -07:00
Chad Versace ebb191f145 vk/0.132: Add vkDestroyFence() 2015-07-14 09:29:35 -07:00
Chad Versace 435ccf4056 vk/0.132: Rename VkDynamic*State types
sed -i -e 's/VkDynamicVpState/VkDynamicViewportState/g' \
       -e 's/VkDynamicRsState/VkDynamicRasterState/g' \
       -e 's/VkDynamicCbState/VkDynamicColorBlendState/g' \
       -e 's/VkDynamicDsState/VkDynamicDepthStencilState/g' \
       $(git ls-files include/vulkan src/vulkan)
2015-07-13 16:19:28 -07:00
Chad Versace 45f8723f44 vk/0.132: Move VkQueryControlFlags 2015-07-13 13:09:32 -07:00
Chad Versace 180c07ee50 vk/0.132: Move VkImageAspectFlags 2015-07-13 13:08:56 -07:00
Chad Versace 4b05a8cd31 vk/0.132: Move VkCmdBufferOptimizeFlags 2015-07-13 13:08:07 -07:00
Chad Versace f1cf55fae6 vk/0.132: Move VkWaitEvent 2015-07-13 13:06:53 -07:00
Chad Versace 3112098776 vk/0.132: Move VkCmdBufferLevel 2015-07-13 13:06:33 -07:00
Chad Versace c633ab5822 vk/0.132: Drop VK_ATTACHMENT_STORE_OP_RESOLVE_MSAA 2015-07-13 13:05:24 -07:00
Chad Versace 8f3b2187e1 vk/0.132: Rename bool32_t -> VkBool32
sed -i 's/bool32_t/VkBool32/g' \
  $(git ls-files src/vulkan include/vulkan)
2015-07-13 13:03:36 -07:00
Chad Versace 77dcfe3c70 vk/0.132: Remove stray typedef 2015-07-13 12:58:17 -07:00
Chad Versace 601d0891a6 vk/0.132: Move VKImageUsageFlags 2015-07-13 12:48:44 -07:00
Chad Versace 829810fa27 vk/0.132: Move VkImageType and VkImageTiling 2015-07-13 11:49:56 -07:00
Chad Versace 17c8232ecf vk/0.132: Import the 0.132 header
Import it as vulkan-0.132.h.
2015-07-13 11:47:12 -07:00
Chad Versace a158ff55f0 vk/vulkan.h: Remove headers for old API versions
Remove the temporary headers for 0.90 and 0.130.
2015-07-13 11:46:30 -07:00
Chad Versace 1c4238a8e5 vk/0.130: Bump header version to 0.130
All APIs have been updated. This eliminates the diff between the
work-in-progress header and the 0.130 header.
2015-07-10 20:06:09 -07:00
Chad Versace f43a304dc6 vk/0.130: Update vkAllocMemory to use VkMemoryType 2015-07-10 17:35:52 -07:00
Chad Versace df2a013881 vk/0.130: Implement vkGetPhysicalDeviceMemoryProperties() 2015-07-10 17:35:52 -07:00
Jason Ekstrand 335e88c8ee vk/vulkan.h: Add the pEnabledFeatures field to DeviceCreateInfo 2015-07-09 16:21:31 -07:00
Jason Ekstrand 34871cf7f3 vk/vulkan.h: Change the MsCreateInfo structure to the 130 version
We do nothing with it at the moment, so this is a no-op.
2015-07-09 16:19:54 -07:00
Jason Ekstrand 8c2c37fae7 vk: Remove the old GetPhysicalDeviceInfo call 2015-07-09 16:14:37 -07:00
Jason Ekstrand 1f907011a3 vk: Add the new PhysicalDeviceQueue queries 2015-07-09 16:14:37 -07:00
Jason Ekstrand 977a469bce vk: Support GetPhysicalDeviceProperties 2015-07-09 16:14:37 -07:00
Jason Ekstrand 65e0b304b6 vk: Add support for GetPhysicalDeviceLimits 2015-07-09 16:14:37 -07:00
Jason Ekstrand f6d51f3fd3 vk: Add GetPhysicalDeviceFeatures 2015-07-09 16:14:37 -07:00