Commit Graph

68651 Commits

Author SHA1 Message Date
Matt Turner
87109acbed mesa: Free memory allocated for luminance in readpixels.
Cc: "10.4, 10.5" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-03-02 10:24:18 -08:00
Matt Turner
2b2fa18652 mesa: Indent break statements and add a missing one.
Always indenting break statements makes spotting missing ones easier.

Cc: "10.4, 10.5" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-03-02 10:24:16 -08: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
6f0e9c2e39 mesa: remove extra definition of ARRAY_SIZE in src/mesa/main/macros.h
Already defined in src/util/macros.h

Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-03-02 08:55:31 -07:00
Brian Paul
e1437d6c0a mesa: remove the Elements() macro definition
No longer used.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:31 -07:00
Brian Paul
692bd4a1ab util: replace Elements() with ARRAY_SIZE()
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-03-02 08:55:31 -07:00
Brian Paul
6633271159 radeon: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:31 -07:00
Brian Paul
9775dbc335 r200: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
ea760c2090 nouveau: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
49a7f8c919 i965: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
b565771003 i915: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
0a77ffcd5a mapi: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
c16c719647 glsl: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
70b401029c st/dri: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
2f0143ca96 st/mesa: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
c7136ff646 mesa/program: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
16f7b77275 mesa/swrast: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
766f5cf8f8 mesa/vbo: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
c2e130f820 mesa/main: replace Elements() with ARRAY_SIZE()
We've been using a mix of these two macros for a while now.  Let's
just use the later everywhere.  It seems to be the convention used
by other open-source projects.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul
cd6db1989a mesa: trim down #includes in api_loopback.h
Acked-by: Matt Turner <mattst88@gmail.com>
2015-03-02 08:55:30 -07:00
Brian Paul
775049b6ad mesa: trim down includes of compiler.h
In some cases, glheader.h is the right #include.
Also remove some instances of struct _glapi_table declarations.

Acked-by: Matt Turner <mattst88@gmail.com>
2015-03-02 08:55:30 -07:00
Jose Fonseca
fa5140bb18 scons: Fix HAVE___* definition.
These definitions must be moved before `cppdefines` is used to have effect.

Trivial.
2015-03-02 14:23:51 +00:00
Jose Fonseca
9a07435ff8 identity: Remove.
It's unmaintained, and most likely broken: I use trace driver every now
and then, and everytime I do I need to fix it up.

It's also unused: identity_screen_create is never called.

Above all, it's dead weight: if identity driver had the infrastructure
for other pass-through drivers (like trace and rbug), then it would make
sense on its own right.  But as it is implemmented, it's just another
driver to (forget) to update whenever there is a gallium interface
change.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-03-02 14:12:46 +00:00
Francisco Jerez
7bfbaf4a5a i965: Remove the create_raw_surface vtbl hook.
It's a wrapper around emit_buffer_surface_state with format=RAW, pitch=1,
rw=true and the remaining arguments ordered differently.  There's no point in
having a separate vtbl pointer for that.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2015-03-02 14:33:13 +02:00
Francisco Jerez
65f9b83e05 i965: Add missing defines for render cache messages.
And remove duplicated definition of OWORD_DUAL_BLOCK_WRITE.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
2015-03-02 14:33:13 +02:00
Neil Roberts
cf67ca9ffa i965/skl: Lay out a 1D miptree horizontally
On Gen9+ the 1D miptree is laid out with all of the mipmap levels in a
horizontal line.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2015-03-02 11:57:37 +00:00
Neil Roberts
0f1e86afd6 i965/skl: Lay out 3D textures the same as array textures
On Gen9+ the 3D textures use the same mipmap layout as 2D array
textures.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2015-03-02 11:57:37 +00:00
Neil Roberts
aef8a48979 i965/skl: Fix the maximum thread count format for the PS
According to the bspec for some reason the format of the maximum
number of threads field has changed from U8-2 to U8-1 for the PS.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2015-03-02 11:57:37 +00:00
Marek Olšák
27a34f62ba draw: fix division-by-zero for empty geometry shaders
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89372

Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-03-02 12:46:36 +01:00
Chris Forbes
b51ff50a76 i965/gs: Check newly-generated GS-out VUE map against correct stage
Previously, we compared our new GS-out VUE map to the existing *VS*-out
VUE map, which is bogus.

This would mostly manifest as redundant dirty flagging where the GS is
in use but the VS and GS output layouts differ; but there is a scary
case where we would fail to flag a GS-out layout change if it happened
to match the VS-out layout.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Cc: "10.5, 10.4" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88885
2015-03-01 11:13:35 +13:00
Brian Paul
213c41bf5d i965: add GLSL_TYPE_DOUBLE switch case to silence warning
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-28 13:39:58 -07:00
Brian Paul
7783131a51 mesa: include macros.h in stencil.h
Since it uses the CLAMP macro.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-28 13:39:58 -07:00
Brian Paul
8a25e73df3 mesa: move finite macro to imports.h
Move it to the only place it's used.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-28 13:39:57 -07:00
Brian Paul
977c56df09 mesa: remove _NORMAPI, _NORMAPIP macros
Was only used in one place.  Use equivalent _XFORMAPIP there instead.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-28 13:39:57 -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
20dc94ba3c mesa: move ONE_DIV_SQRT_LN2 to prog_statevars.c
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-28 13:39:57 -07:00
Brian Paul
cbf788a348 mesa: remove unused uninitialized_var() macro
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-28 13:39:57 -07:00
Matt Turner
e71a7f8013 mesa: Check return value of __get_cpuid().
The use of the uninitialized_var() macro was to silence an uninitialized
variable warning that I assumed stemmed from gcc being unable to see
inside __get_cpuid() or understand its inline assembly.

In fact, it was because the __get_cpuid() function can fail, and not
initialize its arguments. Instead, check for failure and return early.

Reviewed-by: Brian Paul <brianp@vmware.com>
2015-02-28 12:20:31 -08:00
Matt Turner
5666d9266f i965/fs/nir: Mark fallthrough. 2015-02-28 10:46:41 -08:00
Matt Turner
54cd2f7c96 i965/fs/nir: Mark fallthrough. 2015-02-28 10:38:21 -08:00
Matt Turner
d528907fd2 i965: Avoid applying negate to wrong MAD source.
For some given GLSL IR like (+ (neg x) (* 1.2 x)), the try_emit_mad
function would see that one of the +'s sources was a negate expression
and set mul_negate = true without confirming that it was actually a
multiply.

Cc: 10.5 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89315
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89095
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-27 20:24:12 -08:00
Matt Turner
43ef2657a0 i965/vec4: Fix implementation of i2b.
I broke this in commit 2881b123d. I must have misread i2b as b2i.

Cc: 10.5 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88246
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-02-27 20:24:12 -08:00
Ian Romanick
b8a1637119 i965/fs/nir: Use emit_math for nir_op_fpow
It appears that all the other instructions that need it already use it.
This one just got missed.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Cc: "10.5" <mesa-stable@lists.freedesktop.org>
2015-02-27 18:47:04 -08:00
Matt Turner
76cd0f00f4 mapi: Don't rely on GNU void pointer arithmetic.
Commit 79daa510c added -Werror=pointer-arith to CFLAGS, which makes
arithmetic on void pointers an error.

See https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html

Reviewed-by: Brian Paul <brianp@vmware.com>
2015-02-27 16:57:10 -08:00
Kenneth Graunke
982723dfa2 Revert "configure: Leverage gcc warn options to enable safe use of C99 features where possible."
This reverts commit 79daa510c7.

I apparently hadn't done a clean build when testing this; it broke the
build for Tom, Ben, and myself.  We like the idea; let's try a v2.
2015-02-27 16:13:10 -08:00
Jonathan Gray
7983a3d2e0 auxilary/os: correct sysctl use in os_get_total_physical_memory()
The length argument passed to sysctl was the size of the pointer
not the type.  The result of this is sysctl calls would fail on
32 bit BSD/Mac OS X.

Additionally the wrong pointer was passed as an argument to store
the result of the sysctl call.

Cc: "10.4, 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-27 23:17:22 +00:00
Brian Paul
667dac9d40 glsl: silence uninitialized var warning on MinGW
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2015-02-27 15:22:25 -07:00
Brian Paul
bf8d049488 mesa: silence unused var warning in get_tex_rgba_uncompressed()
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2015-02-27 15:22:25 -07:00
Brian Paul
48f229d759 mesa: move declaration before code
To fix MinGW warning.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2015-02-27 15:22:24 -07:00
Brian Paul
5b089e5f15 meta: silence declaration after code warning on MinGW
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2015-02-27 15:22:24 -07:00