Commit Graph

956 Commits

Author SHA1 Message Date
Marek Olšák 20249d3559 egl: import platform headers from registry (v2)
v2: don't remove local Mesa changes

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05 19:44:33 +02:00
Marek Olšák 6b31f22338 egl: import eglext.h from registry and cleanup eglmesaext.h (v2)
v2: include mesa and chromium extensions in eglext.h so as not to break
    existing users
v3: keep PFNEGLSWAPBUFFERSREGIONNOK because piglit uses it

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05 19:44:32 +02:00
Marek Olšák 49ae822183 egl: import egl.h from registry (v2)
v2: split the commit into 3 patches

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05 19:44:32 +02:00
Emil Velikov 0c4eef6a2c egl: remove remaining EGL_MESA_copy_context skeleton
With earlier commit (7a58262e58 egl: Remove skeleton implementation of
EGL_MESA_screen_surface) we've removed the skeleton implementation of
eglCopyContextMESA(). Just like EGL_MESA_screen_surface this extension
was never implemented in mesa.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2015-05-14 21:05:16 +00:00
Emil Velikov f9bf9133cc egl: fix the EGL_MESA_image_dma_buf_export header declarations
Similar to other EGL extensions - guard the function prototypes by
EGL_EGLEXT_PROTOTYPES as the libEGL library does (should) not provide
the symbols statically.

Instead users should call eglGetProcAddress, which returns the function
pointer. The latter of which was missing the type declaration (typedef).

Cc: Dave Airlie <airlied@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-05-14 21:00:04 +00:00
Alex Deucher 71ba30f778 radeonsi: add new bonaire pci id
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: mesa-stable@lists.freedesktop.org
2015-05-12 14:46:42 -04:00
Adam Jackson 7a58262e58 egl: Remove skeleton implementation of EGL_MESA_screen_surface
No backend wires this up to anything, and the extension spec has been
marked obsolete for 4+ years.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-05-11 14:19:37 -04:00
Dave Airlie b5045e2991 egl: image_dma_buf_export - use KHR 64-bit type
After talking to Jon Leech he suggested this should be fine.

update spec to the version in the registry.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-05-05 12:19:40 +10:00
Marek Olšák b02a5bf3ba dri_interface: add an interface for fences 2015-04-30 14:38:38 +02:00
Ville Syrjälä 4fc645aed1 i965: Add marketing names for CHV
All CHV devices will be branded as "Intel(r) HD Graphics".

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-04-16 21:32:41 +03:00
Jose Fonseca 328375d274 gallium: fix gcc compile errors when using _XOPEN_SOURCE=600 but not std=c99
The fpclassify stuff either needs std=c99 or _XOPEN_SOURCE=600 passed
to gcc, but when using the latter the lrint family of function will be defined
too.
2015-04-03 19:22:09 +02:00
Emil Velikov d99135b2e9 configure: nuke --with-max-{width,height}
Unused as of commit 630ab0d27ba(mesa: remove last of MAX_WIDTH,
MAX_HEIGHT). Update all the remaining references to the defines.

v2: Use the correct variable name in the comments

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-04-01 19:43:34 +00:00
Dave Airlie 8f7338f284 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>
2015-04-01 14:10:04 +10:00
Jose Fonseca fdb507e3d6 c99_math: Don't reimplement lrint and friends on MSVC 2013.
MSVC 2013 declares these functions, both for C and C++ source files.

This was caught with MSVC in analyze mode.

Reviewed-by: Brian Paul <brianp@vmware.com>
2015-03-25 10:42:41 +00:00
Jose Fonseca 8d5c303ab9 include: Ensure float.h is included for DBL_MAX.
I didn't actually hit the issue in practice, but just happen to notice
while looking at the code.

Reviewed-by: Brian Paul <brianp@vmware.com>
2015-03-22 08:23:24 +00:00
Felix Janda aead7fe2e2 c11/threads: Use PTHREAD_MUTEX_RECURSIVE by default
Previously PTHREAD_MUTEX_RECURSIVE_NP had been used on linux for
compatibility with old glibc. Since mesa defines __GNU_SOURCE__
on linux PTHREAD_MUTEX_RECURSIVE is also available since at least
1998. So we can unconditionally use the portable version
PTHREAD_MUTEX_RECURSIVE.

Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88534
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-16 20:41:39 +00:00
Brian Paul be4e198be0 mesa: move fpclassify work-arounds into c99_math.h
v2: Use #error in the #else clause, per Jose.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-03-12 07:52:35 -06:00
Jon TURNEY 72d4f6c67f c99_alloca.h: Also use <alloca.h> for cygwin
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-03-07 18:18:32 +00:00
José Fonseca bfb4db83b6 include: Add helper header to help trap includes inside extern C.
This is just to help repro and fixing these issues with any C++ compiler --

Commiting this will of course wait until all issues are addressed.

$ scons src/glsl/
scons: Reading SConscript files ...
Checking for GCC ...  yes
Checking for Clang ...  no
Checking for X11 (x11 xext xdamage xfixes glproto >= 1.4.13)... yes
Checking for XCB (x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8)... yes
Checking for XF86VIDMODE (xxf86vm)... yes
Checking for DRM (libdrm >= 2.4.38)... yes
Checking for UDEV (libudev >= 151)... yes
warning: LLVM disabled: not building llvmpipe
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/linux-x86_64-debug/glsl
  Compiling src/glsl/ast_array_index.cpp ...
  Compiling src/glsl/ast_expr.cpp ...
  Compiling src/glsl/ast_function.cpp ...
  Compiling src/glsl/ast_to_hir.cpp ...
  Compiling src/glsl/ast_type.cpp ...
  Compiling src/glsl/builtin_functions.cpp ...
In file included from include/c99_compat.h:28:0,
                 from src/mapi/u_compiler.h:4,
                 from src/mapi/u_thread.h:47,
                 from src/mapi/glapi/glapi.h:47,
                 from src/mesa/main/mtypes.h:42,
                 from src/mesa/main/errors.h:47,
                 from src/mesa/main/imports.h:41,
                 from src/mesa/main/core.h:44,
                 from src/glsl/builtin_functions.cpp:58:
include/no_extern_c.h:48:1: error: template with C linkage
 template<class T> class _IncludeInsideExternCNotPortable;
 ^
In file included from include/c99_compat.h:28:0,
                 from include/c11/threads.h:38,
                 from src/mapi/u_thread.h:49,
                 from src/mapi/glapi/glapi.h:47,
                 from src/mesa/main/mtypes.h:42,
                 from src/mesa/main/errors.h:47,
                 from src/mesa/main/imports.h:41,
                 from src/mesa/main/core.h:44,
                 from src/glsl/builtin_functions.cpp:58:
include/no_extern_c.h:48:1: error: template with C linkage
 template<class T> class _IncludeInsideExternCNotPortable;
 ^
  Compiling src/glsl/builtin_types.cpp ...
  Compiling src/glsl/builtin_variables.cpp ...
scons: *** [build/linux-x86_64-debug/glsl/builtin_functions.os] Error 1
scons: building terminated because of errors.

Reviewed-by: Mark Janes <mark.a.janes@intel.com>
2015-03-06 12:38:55 +00:00
Jose Fonseca 3acd7a34ab st/vega: Remove.
OpenVG API seems to have dwindled away.  The code
would still be interesting if we wanted to implement NV_path_rendering
but given the trend of the next gen graphics APIs, it seems
unlikely that this becomes ARB or core.

v2: Remove a few "openvg" references left, per Emil Velikov.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

v3: Update release notes.
2015-03-04 11:01:45 +00:00
Jose Fonseca 17b2825d76 windows/gdi: Remove.
This classic driver is so far behind Gallium softpipe/llvmpipe based
one, that's hard to imagine ever being useful.

v2: Drop drivers/windows from src/mesa/Makefile.am:EXTRA_DIST per Emil
Velikov.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

v3: Update release notes.
2015-03-04 11:01:38 +00:00
Brian Paul 5ece288876 c99_alloca.h: add case for __sun
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-03-03 08:40:13 -07:00
Vinson Lee 3de01d2fe4 c99_alloca.h: Include stdlib.h on all non-Windows.
Fix build on FreeBSD.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89364
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Tested-by: Brian Paul <brianp@vmware.com>
2015-03-02 09:26:36 -07:00
Brian Paul 61d344ebba mesa: move FLT_MAX_EXP to c99_math.h
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-28 13:39:57 -07:00
Brian Paul 098e5bf3b3 c99_alloca.h: fix #include for MinGW
As with MSVC, include malloc.h but don't redefine alloca.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89364
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2015-02-27 15:22:24 -07:00
Jose Fonseca f320ecf218 nir: Use alloca instead of variable length arrays.
This is to enable the code to build with -Werror=vla in the short term,
and enable the code to build with MSVC2013 soon after.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-02-27 14:30:36 +00:00
Brian Paul 06ed81044f c99_math.h: add defines for M_PI, M_E, M_LOG2E
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89342
Signed-off-by: Brian Paul <brianp@vmware.com>
2015-02-27 07:04:49 -07:00
Brian Paul 688d7656c5 c99: in c99_math.h check that _USE_MATH_DEFINES is defined with MSVC
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-02-26 12:21:30 -07:00
Jose Fonseca 46110c5d56 include,auxiliary: Remove support for MSVC older then 2008.
MSVC 2008 (shipped with Windows SDK 7.0.7600) is the oldest we
need to support.  At least on llvmpipe, gallium/auxiliary, and util
modules.  For the remaining modules (particular all OpenGL specific
code) can be built with MSVC 2013.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-26 16:53:16 +00:00
Brian Paul f847ddb64d mesa: move signbit() macro to c99_math.h
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-24 17:10:28 -07:00
Brian Paul 79b480ccc0 mesa: replace LOGF, EXPF with logf, expf
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-24 14:44:19 -07:00
Brian Paul e25f7772ca mesa: replace FREXPF, LDEXPF with frexpf, ldexpf
Start getting rid of some imports.h macros.  Use the c99 functions instead.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-24 14:44:19 -07:00
Brian Paul cbd287f094 mesa: move math-related function into new c99_math.h file
The alternative would be to include math.h in c99_compat.h but that
seems heavy-handed.

This patch also replaces INLINE with inline in the c99 math function
wrappers.

Fixes MSVC build.

Acked-by: Matt Turner <mattst88@gmail.com>
2015-02-23 14:45:14 -07:00
Matt Turner 5a191f49ad mesa: Move C99 MSVC compatibility code from u_math.h to c99_compat.h.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-02-23 10:41:21 -08:00
Adam Jackson b290330e3b i915: For the love of all that is holy, stop saying "IGD"
a001 and a011 are pineview chips.  Say so.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-02-18 14:51:16 -05:00
Tiziano Bacocco 1c1d26cd97 st/nine: D3DRS_FILLMODE set to 0 is D3DFILL_SOLID
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
2015-02-06 00:07:19 +01:00
Tiziano Bacocco 50f0e011da st/nine: Setting D3DRS_ALPHAFUNC to 0 means D3DCMP_NEVER
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
2015-02-06 00:07:19 +01:00
Patrick Rudolph 33617ef296 st/nine: Return E_FAIL for unused vertexdeclaration type
Add returncode E_FAIL.
Return E_FAIL for any vertexdeclaration element with type unused.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
2015-02-06 00:07:19 +01:00
Axel Davy 75676886e4 st/nine: Implement ATOC hack
ATOC is an hack for Alpha to coverage
that is supported by NV and Intel.

You need to check the support for it
with CheckDeviceFormat.

Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-02-06 00:07:19 +01:00
Axel Davy 42ac71a4e2 st/nine: Implement RESZ hack
This D3D hack allows to resolve a multisampled
depth buffer into a single sampled one.

Note that the implementation is slightly incorrect.
When querying the content of D3DRS_POINTSIZE,
it should return the resz code if it has been set.
This behaviour will be implemented when state changes
will be reworked. For now the current behaviour is ok,
since apps use the D3DCREATE_PUREDEVICE flag when creating
the device, which means they won't read states and in exchange
get better performance.

Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
2015-02-06 00:07:18 +01:00
Laura Ekstrand 77cc799853 GL: Update glext.h to Revision 29735 (20150202).
Khronos modified glext.h to get rid of GL_TEXTURE_BINDING, a special enum
added for ARB_direct_state_access.  This enum was ruled unimplementable.

Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Laura Ekstrand <laura@jlekstrand.net>
2015-02-05 11:41:26 -08:00
Laura Ekstrand ad2c64abbd GL: Update glext.h to Khronos Revision 29537.
Khronos Revision 29537 fixes ARB_direct_state_access function prototypes that
had GLsizei where they should have had GLsizeiptr. The mainly affects
functions related to buffer objects.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-02 10:39:55 -08:00
Axel Davy d2f2a550cf st/nine: Add new texture format strings
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Axel Davy <axel.davy@ens.fr>

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
2015-01-22 22:16:17 +00:00
Xavier Bouchoux 072e2ba8e1 st/nine: Add missing c++ declaration for IDirect3DVolumeTexture9
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
2015-01-22 22:16:17 +00:00
Xavier Bouchoux 8bb550b958 st/nine: Additional defines to d3dtypes.h
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
2015-01-22 22:16:17 +00:00
Eric Anholt 70e8ccc459 egl: Inform the client API when ancillary buffers may become undefined.
This is part of the EGL spec, and is useful for a tiled renderer to avoid
the memory bandwidth cost of storing the depth/stencil buffers.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-01-06 15:40:40 -08:00
Alexander von Gluck IV 400b833592 egl: Add Haiku code and support
* This is the cleaned up work of the Haiku GCI student
  Adrián Arroyo Calle adrian.arroyocalle@gmail.com
* Several patches were consolidated to prevent
  unnecessary touching of non-related code
2014-12-23 09:07:57 -05:00
Timothy Arceri 5eec7c8ab8 mesa: remove support for GCC older than 3.3.0
GCC >=3.3 has been required since 9aa3aa7138

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-By: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-12-17 08:37:05 +11:00
Kristian Høgsberg cae7a2a031 i965/skl: Add Skylake PCI IDs
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2014-12-08 16:33:59 -08:00
Brian Paul cd8a7258b8 mesa: update glext.h to version 20141118 2014-12-01 15:22:20 -07:00