History log of /external/mesa3d/src/util/macros.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c32318073385dc461b91e407394e57fb76748da8 09-Nov-2016 George Kyriazis <george.kyriazis@intel.com> mesa: removed redundant #else

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/util/macros.h
ed6694d5114e81cf1c413aec8265ddc8a5c52599 14-Nov-2016 Vinson Lee <vlee@freedesktop.org> util: Fix Clang trivial destructor check.

Check for Clang before GCC.

Clang defines __GNUC__ == 4 and __GNUC_MINOR__ == 2 and matches the GCC
check but not the GCC version for trivial destructor.

Fixes: 98ab905af0e0 ("mesa: Define introspection macro to determine
whether a type is trivially destructible.")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98526
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
/external/mesa3d/src/util/macros.h
5b92008ae279962dc09bcf98c9e5511a325a2bd9 09-Nov-2016 Brian Paul <brianp@vmware.com> util: add MSVC HAS_TRIVIAL_DESTRUCTOR implementation

Based on a patch by George Kyriazis but changed to test for
_MSC_VER >= 1800 (Visual Studio 2015).

This fixes the failed CANARY assertion in src/util/ralloc.c:get_header()
on Windows.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98595
Tested-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/util/macros.h
78bce52f9a57ea020ef7b9386216efe151be9542 14-Oct-2016 Dave Airlie <airlied@redhat.com> util: move min/max/clamp macros to util macros.h

Although the vulkan drivers include mesa macros.h, for
radv I'd like to move away from that.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/util/macros.h
4eb0e90c6b59f9c5b789b33078afdec1975838af 07-Sep-2016 Timothy Arceri <timothy.arceri@collabora.com> util: remove Sun C Compiler support

Support for this compiler was dropped in 51564f04b77e6

Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
/external/mesa3d/src/util/macros.h
377ab2f2d781aef9408f26b24bb8b17426be6606 13-May-2016 Matt Turner <mattst88@gmail.com> util: Add ATTRIBUTE_RETURNS_NONNULL.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/util/macros.h
98c348d26b28a662d093543ecb7ca839e7883e8e 26-Apr-2016 Nicolai Hähnle <nicolai.haehnle@amd.com> st/glsl_to_tgsi: reduce stack explosion in recursive expression visitor

In optimized builds, visit(ir_expression *) experiences inlining with gcc that
leads the function to have a roughly 32KB stack frame. This is a problem given
that the function is called recursively. In non-optimized builds, the stack
frame is much smaller, hence one gets crashes that happen only in optimized
builds.

Arguably there is a compiler bug or at least severe misfeature here. In any
case, the easy thing to do for now seems to be moving the bulk of the
non-recursive code into a separate function. This is sufficient to convince my
version of gcc not to blow up the stack frame of the recursive part. Just to be
sure, add the gcc-specific noinline attribute to prevent this bug from
reoccuring if inliner heuristics change.

v2: put ATTRIBUTE_NOINLINE into macros.h

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95133
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95026
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92850
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/util/macros.h
c068610a7df370af94fd6177598a35c4425a75f9 18-Apr-2016 Jose Fonseca <jfonseca@vmware.com> 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>
/external/mesa3d/src/util/macros.h
e4fc06a2f8be2de3a08d4adfa4a26df2ae0b5cae 16-Apr-2016 Grazvydas Ignotas <notasas@gmail.com> util: add MAYBE_UNUSED for config dependent variables

This is mostly for variables that are only used in asserts and cause
unused-but-set-variable warnings in release builds. Could just use
UNUSED directly, but MAYBE_UNUSED should be less confusing and is
similar to what the Linux kernel has.

And yes __attribute__((unused)) can be used on variables on both GCC 4.2
(oldest supported by mesa) and clang 3.0 (just some random old version,
not sure what's the minimum for mesa).

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/util/macros.h
56aff6bb4eafe35ba301f5d60027377abc4cfd9f 02-Dec-2015 Jose Fonseca <jfonseca@vmware.com> Remove Sun CC specific code.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
/external/mesa3d/src/util/macros.h
d956335a0b533351edb547c974c601e3529c2037 23-Nov-2015 Matt Turner <mattst88@gmail.com> util: Include assert.h in macros.h.
/external/mesa3d/src/util/macros.h
512aa0647f328fff69b3ce328b6466f2da8b7c4d 07-Aug-2015 Jose Fonseca <jfonseca@vmware.com> util: Rename PURE to ATTRIBUTE_PURE.

To avoid collission with windows.h's PURE macro.

We could consider eventually renaming to __pure, but that would require
further care, so it's left to the future.

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/util/macros.h
be1f49bda90425b7fd009ac177b307e61da0f994 11-Jul-2015 Eric Anholt <eric@anholt.net> mesa: Detect and provide macros for function attributes pure and const.

These are really useful hints to the compiler in the absence of link-time
optimization, and I'm going to use them in VC4.

I've made the const attribute be ATTRIBUTE_CONST unlike other function
attributes, because we have other things in the tree #defining CONST for
their own unrelated purposes.

v2: Alphabetize.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
/external/mesa3d/src/util/macros.h
128de6f6d7cd0eb5386dcc622afc6e28a8512e7f 06-Jul-2015 Kenneth Graunke <kenneth@whitecape.org> mesa: Add a MUST_CHECK macro for __attribute__((warn_unused_result)).

In the kernel, this is called __must_check; all our attribute macros in
Mesa appear to be uppercase, so I went with that.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/util/macros.h
64880d073ab21ae1abad0c049ea2d6a1169a3cfa 26-Apr-2015 Axel Davy <axel.davy@ens.fr> util/macros: Move DIV_ROUND_UP to util/macros.h

Move DIV_ROUND_UP to a shared location accessible everywhere

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
/external/mesa3d/src/util/macros.h
5f759836ad75360a2f4581083043a86f7a8c1e09 07-Mar-2015 Vinson Lee <vlee@freedesktop.org> Add macro for unused function attribute.

Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/util/macros.h
3f167516399c8e20478bb0081a24ab7ac155b093 06-Mar-2015 Emil Velikov <emil.l.velikov@gmail.com> util: rework _MSC_VER >= 1200 checks

Replace the _MSC_VER >= 1200 with defined (_MSC_VER) and compact if/else
statements. We require MSVC 2008 or later with commit 46110c5d564.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/util/macros.h
5bebd7099ab22c6f1498cd928170561718d6ff36 03-Mar-2015 Brian Paul <brianp@vmware.com> mesa: consolidate PUBLIC macro definition

Define the macro in src/util/macros.h rather than in two different
places. Note that USED isn't actually used anywhere at this time.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/util/macros.h
7ac79eea1a621f5cd27c3b052aeea3df1aa4cd99 28-Jan-2015 Jason Ekstrand <jason.ekstrand@intel.com> Revert "util: Move the alternate fpclassify implementation to util"

This reverts commits d6eb572905e39c36168b8f5da240af961f9dde0a and
58e8468d113c7d3d4a59ea4a8d70fd45b78e85e6.

This is no longer necessary as we aren't using it in NIR anymore. Also, it
broke the build on some strange systems so let's put it back in querymatrix
where it came from.

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

Acked-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/util/macros.h
58e8468d113c7d3d4a59ea4a8d70fd45b78e85e6 28-Jan-2015 Jason Ekstrand <jason.ekstrand@intel.com> util: Predicate the fpclassify fallback on !defined(__cplusplus)

The problem is that the fallbacks we have at the moment don't work in C++.
While we could theoretically fix the fallbacks it would also raise the
issue of correctly detecting the fpclassify function. So, for now, we'll
just disable it until we actually have a C++ user.

Reported-by: Tom Stellard <thomas.stellard@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Tested-by: EdB <edb+mesa@sigluy.net>
/external/mesa3d/src/util/macros.h
d6eb572905e39c36168b8f5da240af961f9dde0a 26-Jan-2015 Jason Ekstrand <jason.ekstrand@intel.com> util: Move the alternate fpclassify implementation to util

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/util/macros.h
62d5b4b03aa63582cf0801d306d7ca055cca40a0 05-Dec-2014 Carl Worth <cworth@cworth.org> util: Make unreachable at least be an assert

Previously, if __builtin_unreachable() was unavailable, the
unreachable macro was defined to do nothing. We do better here, by at
least still making it an assert.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/util/macros.h
99cebffda9cd2d42edd6c1cbeceb994e6b320c5a 21-Nov-2014 Matt Turner <mattst88@gmail.com> util: Implement assume() for clang.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/util/macros.h
6f3b8bb747f8c95d21c98bb583c043e432f928a8 23-Oct-2014 Ian Romanick <ian.d.romanick@intel.com> util: Implement unreachable for MSVC using __assume

Based on the description of __assume at:

http://msdn.microsoft.com/en-us/library/1b3fsfxw.aspx

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/util/macros.h
2695891088d5b910edd9ec4d3ad81f0e3469205c 01-Oct-2014 Matt Turner <mattst88@gmail.com> util: Add assume() macro.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/util/macros.h
e4be17fd04adb5404207bcd260cdd26cbd931c3f 21-Sep-2014 Matt Turner <mattst88@gmail.com> ralloc: Mark ralloc functions with gcc's malloc attribute.

Cuts a few hundred bytes from the DRI drivers, so it must give gcc some
extra information.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/util/macros.h
976464c210816ff0c90e2e24e766dda81193fc79 22-Sep-2014 Matt Turner <mattst88@gmail.com> mesa: Replace a priori knowledge of gcc attributes with configure tests.

Note that I had to add support for testing the packed attribute to
m4/ax_gcc_func_attribute.m4.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> [C bits]
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/util/macros.h
4a96df73e770bcca6396d3c8ffe3fd1693c73e50 22-Sep-2014 Matt Turner <mattst88@gmail.com> mesa: Replace a priori knowledge of gcc builtins with configure tests.

Presumbly this will let clang and other compilers use the built-ins as
well.

Notice two changes specifically:
- in _mesa_next_pow_two_64(), always use __builtin_clzll and add a
static assertion that this is safe.
- in macros.h, remove the clang-specific definition since it should
be able to detect __builtin_unreachable in configure.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> [C bits]
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/util/macros.h
efa0aa8ffc63e8fdd23335e67ca76eb358cfd1ac 23-Jul-2014 Jason Ekstrand <jason.ekstrand@intel.com> util: Gather some common macros

This gathers macros that have been included across components into util so
that the include chain can be more vertical. In particular, this makes
util stand on its own without any dependence whatsoever on the rest of
mesa.

Signed-off-by: "Jason Ekstrand" <jason.ekstrand@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/util/macros.h