Commit Graph

48 Commits

Author SHA1 Message Date
Chia-I Wu
cd893ccba9 gallium: add PIPE_OS_ANDROID support
Android uses Linux kernel and its own C runtime.  It resembles
PIPE_OS_LINUX a lot with some minor exceptions.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-08-21 02:01:48 +08:00
José Fonseca
5858abec6e gallium: Avoid redefinition of likely/unlikely macros on non gcc compilers. 2011-03-25 16:22:28 +00:00
José Fonseca
d40b868db5 gallium: Define __func__ on MSVC. 2011-03-04 11:55:36 +00:00
José Fonseca
6c1aa4fd49 gallium: Define C99 restrict keyword where absent. 2010-10-11 13:05:31 +01:00
Luca Barbieri
a508d2dddc gallium: introduce get_shader_param (ALL DRIVERS CHANGED) (v3)
Changes in v3:
- Also change trace, which I forgot about

Changes in v2:
- No longer adds tessellation shaders

Currently each shader cap has FS and VS versions.

However, we want a version of them for geometry, tessellation control,
and tessellation evaluation shaders, and want to be able to easily
query a given cap type for a given shader stage.

Since having 5 duplicates of each shader cap is unmanageable, add
a new get_shader_param function that takes both a shader cap from a
new enum and a shader stage.

Drivers with non-unified shaders will first switch on the shader
and, within each case, switch on the cap.

Drivers with unified shaders instead first check whether the shader
is supported, and then switch on the cap.

MAX_CONST_BUFFERS is now per-stage.
The geometry shader cap is removed in favor of checking whether the
limit of geometry shader instructions is greater than 0, which is also
used for tessellation shaders.

WARNING: all drivers changed and compiled but only nvfx tested
2010-09-14 06:07:41 +02:00
Luca Barbieri
9960200d5e p_compiler: add replacement va_copy
This might technically not always be correct, because va_copy might
be a function, or a system might not have va_copy, and not work with
assignment.

Hopefully this is never the case.
Without configure tests, it doesn't seem possible to do better.
2010-08-21 00:51:29 +02:00
Luca Barbieri
6f3c4819ec gallium: add ALWAYS_INLINE
Used when we want to be sure the compiler inlines a large function into
an inner loop.
2010-08-11 11:27:46 +02:00
José Fonseca
467928c6e0 gallium: Ensure prototypes are wrapped in extern "C".
Fixes MSVC build failure due to inconsistent _ReadWriteBarrier
prototype.
2010-07-14 16:15:56 +01:00
José Fonseca
c6c62164c3 gallium: Add a macro for memory barriers. 2010-07-14 14:38:02 +01:00
Chia-I Wu
ba26631d0d Define PUBLIC to dllexport on MSVC.
Define PUBLIC to __declspec(dllexport) when _MVC_VER is defined.
2010-05-31 11:31:07 +08:00
Luca Barbieri
5df6c43061 p_compiler: add likely/unlikely macros
Defined like the Linux kernel.

A explanatory comment is included.
2010-04-18 15:29:21 +02:00
José Fonseca
f15469039a util: Remove the half typedef from p_compiler.h.
Unnecessary, and doesn't even guarantee size.
2010-04-07 21:00:05 +01:00
Michal Krol
5a359df219 gallium: Integrate util_half with scons. 2010-04-01 13:33:08 +02:00
George Sapountzis
fe14868d96 drop stray XFree86Server, XGLServer 2010-03-09 22:04:50 +02:00
Ian Romanick
016fc30839 Remove support for GCC older than 3.3.0
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 16:26:32 -08:00
José Fonseca
b7b7ea9532 gallium: Add a define for deprecated function attribute. 2010-02-04 18:24:17 +00:00
José Fonseca
aa8b49c9ca gallium: Move some compiler portability stuff into p_compiler.h 2010-02-02 20:55:08 +00:00
José Fonseca
1776e738fb gallium: Remove unnecessary includes. Add others to compensate. 2010-02-01 16:11:46 +00:00
Alan Hourihane
46f453b298 Check for __USE_MISC for defining uint & ushort 2010-01-26 20:59:11 +00:00
Alan Coopersmith
a7aaf052f9 Sun compilers now support some gcc __attribute__ values
Sun cc 5.9 and later (__SUNPRO_C >= 0x590) support __attribute__ calls
for aligned, always_inline, noinline, pure, const, and malloc.

This commit includes updates to files that were regenerated by gl_XML.py
after adding the __SUNPRO_C checks to it

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-19 10:15:55 -08:00
Jakob Bornecrantz
876a6b4865 gallium: Support swig "compiler" in p_compiler.h 2010-01-17 16:44:39 +00:00
José Fonseca
26c78a4968 gallium: Rename ALIGN_STACK -> PIPE_ALIGN_STACK for consistency. 2010-01-12 12:15:24 +00:00
José Fonseca
5dfd5ed5e7 gallium: Simplify PIPE_ALIGN_VAR.
gcc allows pre-fix variable attributes.

Suggested by Ian Romanick.
2010-01-12 12:11:04 +00:00
José Fonseca
86bfe974b8 gallium: Generalize the alignment macros to other compilers and any alignment. 2010-01-12 12:11:04 +00:00
Chia-I Wu
108c2bf5ab gallium: Add PUBLIC macro for function visibility.
As the default build has -fvisibility=hidden, add a macro to control the
visibility.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-11 10:04:37 -05:00
José Fonseca
74f520861f gallium: Remove dead code. 2010-01-10 10:44:25 +00:00
José Fonseca
dc6bcc92ee gallium: Provide alternative stdint.h and stdbool.h C99 headers, instead of ad-hoc definitions.
Everybody is using the C99's integer types. Everybody except Microsoft,
which in turns means everybody is including their own definitions of C99
integer types for MSVC, causing duplicate definitions when linking two
projects. This is the case of building Gallium and LLVM with MSVC.

Shipping alternative stdint.h and stdbool.h headers for MSVC allows us
to share a single definition. It also removes clutter from the Gallium
headers.
2010-01-10 10:39:29 +00:00
José Fonseca
818fd6b101 gallium: Disable force_align_arg_pointer attribute on x86_64.
Apparently not only unnecessary but also causes gcc to complain.
2009-12-04 21:27:03 +00:00
José Fonseca
68edb4eac5 gallium: New ALIGN_STACK macro to tell gcc to align stack pointer. 2009-10-14 17:24:22 +01:00
aljen
c6c44bf481 gallium: Added HaikuOS platform 2009-09-09 08:24:18 -06:00
Alan Coopersmith
ad11107206 Add #ifdefs needed to compile Gallium on Solaris with gcc or Sun cc
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-03-25 11:07:31 -07:00
José Fonseca
ab3a9f1eed gallium: Replace uint64 by standard uint64_t.
uint64 is not (so?) standard, and often redefined by third parties,
causing name clashes.
2009-01-08 12:41:45 +00:00
José Fonseca
b3b7c757a9 gallium: Don't redefine INLINE.
INLINE is commonly used in third-party headers.
2008-12-30 17:14:48 +00:00
Brian Paul
bac5900a14 cell: align instruction buffers to 8-byte, not 32-byte boundary 2008-09-26 10:15:35 -06:00
Brian Paul
bef3444f41 gallium: added ALIGN32_ATTRIB 2008-09-19 17:56:45 -06:00
José Fonseca
3b5ee3d6de gallium: Allow compilation inside X. 2008-08-12 13:00:18 +01:00
José Fonseca
b3da2a9524 gallium: Use the inline keyword on C++. 2008-07-01 22:04:58 +09:00
José Fonseca
e8b52b3f56 gallium: Drop deprecated __MSC__ macro. 2008-06-24 13:56:41 +09:00
Jonathan White
fe1a2d1fff egl: assorted fixes for Windows
Note that int32_t is typedef'd both in p_compiler.h and eglplatform.h
2008-06-05 15:07:03 -06:00
José Fonseca
e0860518df gallium: Replace XSTDCALL by PIPE_CDECL. 2008-06-02 22:31:02 +09:00
José Fonseca
ae10775b73 gallium: Provide the INT64_C/UINT64_C macros.
"long long" types and 1234LL constants are not supported by eVC.
2008-05-30 03:33:06 +09:00
Jakob Bornecrantz
938d9d5963 Merge branch 'gallium-vertex-linear' into gallium-0.1
Conflicts:

	src/gallium/auxiliary/draw/draw_pt_varray.c
2008-05-28 12:42:42 +02:00
José Fonseca
55d29a8d48 gallium: Windows CE portability fixes. 2008-05-28 16:13:24 +09:00
Keith Whitwell
9343779a8c gallium: define PIPE_CDECL calling convention, which really is cdecl everywhere 2008-05-23 09:16:55 +01:00
José Fonseca
dacfef1589 gallium: New configuration header.
To abstract all those weird #ifdef (__???__) checks.

It should typically be the first included header.
2008-04-25 18:18:48 +09:00
José Fonseca
e8de5c70e3 Bring in several forgotten MSVC fixes. 2008-02-23 14:14:54 +09:00
Michal Krol
6f238275c7 gallium: Define intptr_t for Windows platform. 2008-02-23 00:51:06 +09:00
José Fonseca
b642730be9 Code reorganization: move files into their places.
This is in a separate commit to ensure renames are properly preserved.
2008-02-15 17:45:40 +09:00