summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2015-11-03i965/skl: PCI ID cleanup and brand stringsBen Widawsky1-15/+19
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-03i965/skl: Add GT4 PCI IDsBen Widawsky1-0/+4
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-10-31gallium/swrast: fix front buffer blitting. (v2)Dave Airlie1-1/+10
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-23radeonsi: add Stoney pci idsSamuel Li1-0/+2
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-08c11/threads: initialize timeout structureJan Vesely1-0/+6
Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-09-25c11/threads: Assert that mtx is non-NULL and check return values.Matt Turner1-25/+23
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-08-20GL: update glext to svn 31811Dave Airlie1-9/+285
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-14radeonsi: add all new VI PCI IDs including FijiMarek Olšák1-0/+24
2015-08-10radeonsi: add new OLAND pci idAlex Deucher1-0/+1
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-04egl/dri: Add error info needed for EGL_EXT_image_dma_buf_import extensionFrank Binns1-2/+6
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-01includes/GL: remove duplicated extension declarations from glx.hEmil Velikov1-92/+0
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-07-29c99_math: (trivial) implement exp2 for MSVC tooRoland Scheidegger1-0/+6
Unsurprisingly doesn't build otherwise with old msvc.
2015-07-29c99_math: Implement exp2f for MSVC.Matt Turner1-0/+6
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-07-28i965: Support importing R8 and GR88 dma_bufsChad Versace1-2/+7
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-22egl,dri_interface: use DRI2rendererQueryExtension to enable 3D textures & sRGBMarek Olšák1-0/+5
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-22dri_interface: drop __NOT_HAVE_DRM_H magicEmil Velikov1-8/+1
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-08egl: use unix defines on osx with clangJulien Isorce1-2/+2
I also created an bug in Khronos 's bugzilla as you suggested: https://www.khronos.org/bugzilla/show_bug.cgi?id=1356 I'll let you know if I get feedback from this bug or else where. Patch with updated error messages: [PATCH] eglplatform: treat __APPLE__ the same way as __unix__ to handle X11 types CC eglapi.lo ./egldisplay.h:258:19: error: unknown type name 'Display' _eglGetX11Display(Display *native_display, const EGLint *attrib_list); eglapi.c:290:4: error: array size is negative STATIC_ASSERT(sizeof(void*) == sizeof(nativeDisplay)); eglapi.c:291:25: warning: cast to 'void *' from smaller integer type 'EGLNativeDisplayType' (aka 'int') [-Wint-to-void-pointer-cast] native_display_ptr = (void*) nativeDisplay; eglapi.c:307:32: error: use of undeclared identifier 'Display' dpy = _eglGetX11Display((Display*) native_display, attrib_list); eglapi.c:776:35: error: use of undeclared identifier 'Window' native_window = (void*) (* (Window*) native_window); eglapi.c:847:35: error: use of undeclared identifier 'Pixmap' native_pixmap = (void*) (* (Pixmap*) native_pixmap); Bugzilla Mesa: https://bugs.freedesktop.org/show_bug.cgi?id=90249 Bugzilla Khronos: https://www.khronos.org/bugzilla/show_bug.cgi?id=1356 Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-08darwin: Suppress type conversion warnings for GLhandleARBJulien Isorce1-0/+5
This patch and its description are inspired from Jose Fonseca explanations and suggestions. With this patch the following logic applies and only if __APPLE__: When building mesa, GLhandleARB is defined as unsigned long and at some point casted to GLuint in gl fuction implementations. These exact points are where these errors and warnings appear. When building an application GLhandleARB is defined as void*. Later when calling a gl function, for example glBindAttribLocationARB, it will be dispatched to _mesa_BindAttribLocation. So internally void* will be treated as unsigned long which has the same size. So the same truncation happens when casting it to GLuint. Same when GLhandleARB appears as return value. For mesa it will be GLuint -> unsigned long. For an application it will be GLuint -> unsigned long -> void*. Note that the value will be preserved when casting back to GLuint. When GLhandleARB appears as a pointer there are also separate entry-points, i.e. _mesa_FuncNameARB. So the same logic can be applied. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66346 Signed-off-by: Julien Isorce <julien.isorce@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-24i965/bxt: Add basic Broxton infrastructureBen Widawsky1-0/+3
The thread counts and URB information are all speculative numbers that were based on some CHV numbers at the time. v2: Originally this patch had PCI IDs. I've moved that to a new patch at the end of the series. Remove is_cherryview hack. Add PCI ids. These match the ones defined in the kernel. The only one tested by us is 0x0a84. Capitalize the hex string (Mark) Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Tested-by: "Lecluse, Philippe" <Philippe.Lecluse@intel.com> Reviewed-by: Mark Janes <mark.a.janes@intel.com>
2015-06-05egl: import platform headers from registry (v2)Marek Olšák2-13/+25
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-05egl: import eglext.h from registry and cleanup eglmesaext.h (v2)Marek Olšák2-44/+247
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-05egl: import egl.h from registry (v2)Marek Olšák1-294/+268
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-05-14egl: remove remaining EGL_MESA_copy_context skeletonEmil Velikov1-11/+0
With earlier commit (7a58262e58d 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-14egl: fix the EGL_MESA_image_dma_buf_export header declarationsEmil Velikov1-0/+6
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-12radeonsi: add new bonaire pci idAlex Deucher1-0/+1
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-11egl: Remove skeleton implementation of EGL_MESA_screen_surfaceAdam Jackson1-46/+0
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-05egl: image_dma_buf_export - use KHR 64-bit typeDave Airlie1-2/+1
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-04-30dri_interface: add an interface for fencesMarek Olšák1-0/+60
2015-04-16i965: Add marketing names for CHVVille Syrjälä1-4/+4
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-03gallium: fix gcc compile errors when using _XOPEN_SOURCE=600 but not std=c99Jose Fonseca1-1/+6
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-01configure: nuke --with-max-{width,height}Emil Velikov1-4/+2
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-01egl: add initial EGL_MESA_image_dma_buf_export v2.4Dave Airlie2-1/+11
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-03-25c99_math: Don't reimplement lrint and friends on MSVC 2013.Jose Fonseca1-1/+2
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-22include: Ensure float.h is included for DBL_MAX.Jose Fonseca1-0/+1
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-16c11/threads: Use PTHREAD_MUTEX_RECURSIVE by defaultFelix Janda1-6/+1
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-12mesa: move fpclassify work-arounds into c99_math.hBrian Paul1-0/+44
v2: Use #error in the #else clause, per Jose. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-03-07c99_alloca.h: Also use <alloca.h> for cygwinJon TURNEY1-1/+1
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Brian Paul <brianp@vmware.com>
2015-03-06include: Add helper header to help trap includes inside extern C.José Fonseca2-0/+50
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-04st/vega: Remove.Jose Fonseca4-1202/+0
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-04windows/gdi: Remove.Jose Fonseca1-140/+0
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-03c99_alloca.h: add case for __sunBrian Paul1-0/+4
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-03-02c99_alloca.h: Include stdlib.h on all non-Windows.Vinson Lee1-5/+1
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-02-28mesa: move FLT_MAX_EXP to c99_math.hBrian Paul1-0/+4
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-27c99_alloca.h: fix #include for MinGWBrian Paul1-0/+4
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-27nir: Use alloca instead of variable length arrays.Jose Fonseca1-0/+45
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-27c99_math.h: add defines for M_PI, M_E, M_LOG2EBrian Paul1-0/+13
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89342 Signed-off-by: Brian Paul <brianp@vmware.com>
2015-02-26c99: in c99_math.h check that _USE_MATH_DEFINES is defined with MSVCBrian Paul1-0/+5
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-02-26include,auxiliary: Remove support for MSVC older then 2008.Jose Fonseca2-76/+6
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-24mesa: move signbit() macro to c99_math.hBrian Paul1-0/+8
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-24mesa: replace LOGF, EXPF with logf, expfBrian Paul1-0/+10
Reviewed-by: Matt Turner <mattst88@gmail.com>