Commit Graph

92510 Commits

Author SHA1 Message Date
Eric Engestrom 845d07978f configure.ac: simplify --enable-libunwind=auto check
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-01 16:56:57 +01:00
Nicolas Dechesne adadadc151 util/rand_xor: add missing include statements
Fixes for:

src/util/rand_xor.c:60:13: error: implicit declaration of function 'open' [-Werror=implicit-function-declaration]
    int fd = open("/dev/urandom", O_RDONLY);
             ^~~~
src/util/rand_xor.c:60:34: error: 'O_RDONLY' undeclared (first use in this function)
    int fd = open("/dev/urandom", O_RDONLY);
                                  ^~~~~~~~

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-01 14:26:12 +01:00
Lucas Stach cab5996c26 etnaviv: always do cpu_fini in transfer_unmap
The cpu_fini() call pushes the buffer back into the GPU domain, which needs
to be done for all buffers, not just the ones with CPU written content. The
etnaviv kernel driver currently doesn't validate this, but may start to do
so at a later point in time. If there is a temporary resource the fini needs
to happen before the RS uses this one as the source for the upload.

Also remove an invalid comment about flushing CPU caches, cpu_fini takes
care of everything involved in this.

Fixes: c9e8b49b88 ("etnaviv: gallium driver for Vivante GPUs")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-By: Wladimir J. van der Laan <laanwj@gmail.com>
2017-06-01 15:20:38 +02:00
Emil Velikov 72011f7a7b docs: update calendar, add news item and link release notes for 17.0.7
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-01 11:46:39 +01:00
Emil Velikov 0fd1715be1 docs: add sha256 checksums for 17.0.7
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit bdfd5658e7cd4c6925afa06bb858c0601865a1ea)
2017-06-01 11:42:46 +01:00
Emil Velikov 29c6a1200b docs: add release notes for 17.0.7
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 46cc7a1746e03b1672c8508af49eb60546d5b61d)
2017-06-01 11:42:45 +01:00
Samuel Pitoiset 1da51ec0f7 glsl: fix a crash in ir_print_visitor() for bindless samplers/images
Bindless samplers/images are represented with 64-bit unsigned
integers and they can be assigned with explicit constructors.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2017-06-01 11:54:06 +02:00
Samuel Pitoiset e4e5562d8a glsl: teach opt_array_splitting about bindless images
Memory/format layout qualifiers shouldn't be lost when arrays
of images are splitted by this pass.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-01 11:54:06 +02:00
Samuel Pitoiset 678e05cc34 glsl: teach opt_structure_splitting about images in structures
GL_ARB_bindless_texture allows images to be declared inside
structures, but when memory/format qualifiers are used, they
should be propagated when structures are splitted.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-01 11:54:06 +02:00
Samuel Pitoiset 71efec290c glsl: fix broken indentation in do_structure_splitting()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-01 11:54:06 +02:00
Samuel Pitoiset ad717102d9 glsl: handle format layout qualifiers for struct with array of images
This handles a situation like:

struct {
   layout (r32f) image2D imgs[6];
} s;

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-01 11:54:06 +02:00
Samuel Pitoiset d9460ad600 glsl: handle memory qualifiers for struct with array of images
This handles a situation like:

struct {
   image2D imgs[6];
} s;

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-01 11:54:06 +02:00
Rhys Kidd e305400443 nvc0: Clean up unnecessary includes from gallium/auxiliary/vl/
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-06-01 10:16:14 +02:00
Kenneth Graunke 6d60121fa0 i965: Simplify SO_DECL handling.
We can initialize structs directly, avoid some temporaries, and cut out
about half of the skip component handling.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
2017-06-01 00:08:29 -07:00
Kenneth Graunke 9a690ada94 i965: Make a local for linked_xfb->Outputs[i], to shorten things.
This seems a bit more readable.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
2017-06-01 00:08:29 -07:00
Kenneth Graunke 65f5f3c85c i965: Move SOL PSIZ hacks from draw time to link time.
We can just update the gl_transform_feedback_info fields at link time
to make the VUE header fields have the right location and component.
Then we don't need to handle them specially at draw time, which is
expensive.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
2017-06-01 00:08:29 -07:00
Iago Toral Quiroga 3d37cf99c8 mesa/main: replace remaining uses of IROUND() in GetUniform*() by round()
These were correct since they were used only in conversions to signed integers,
however this makes the implementation a bit more is more consistent and reduces
chances of propagating use of these macros to unsigned cases in the future, which
would not be correct.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-06-01 08:44:34 +02:00
Iago Toral Quiroga 1356b42284 mesa/main: conversion from float in GetUniformi64v requires rounding to nearest
As we do for all other cases of float/double conversions to integers.

v2: use round() instead of IROUND() macros (Iago)

Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-06-01 08:44:34 +02:00
Iago Toral Quiroga c333082483 mesa/main: Add conversion from double to uint64/int64 in GetUniform*i64v()
v2:
  - need unsigned rounding for double->uint64 conversion (Nicolai)
  - use round() instead of IROUND() macros (Iago)

Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-06-01 08:44:34 +02:00
Iago Toral Quiroga cc972c2845 mesa/main: Clamp GetUniformui64v values to be >= 0
Like we do for the 32-bit case.

v2:
  - need unsigned rounding for float->uint64 conversion (Nicolai)
  - use roundf() instead of IROUND() macros (Iago)

Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-06-01 08:44:34 +02:00
Kenneth Graunke 83e74d7dc1 mesa/main: Clamp GetUniformuiv values to be >= 0
Section 2.2.2 (Data Conversions For State Query Commands) of the
OpenGL 4.5 October 24th 2016 specification says:

"If a command returning unsigned integer data is called, such as
 GetSamplerParameterIuiv, negative values are clamped to zero."

v2: uint to int conversion should clamp to INT_MAX (Nicolai)

v3 (Iago)
  - Add conversions conversions from 64-bit integer paths
  - Rebase on master

v4:
  - need unsigned rounding for float/double->uint conversions (Nicolai)
  - use round{f}() instead of IROUND() macros (Iago)

Fixes:
KHR-GL45.gpu_shader_fp64.state_query

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v2)
Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-06-01 08:44:34 +02:00
Iago Toral Quiroga 1020448700 mesa/main: fix indentation in _mesa_get_uniform()
v2: also change the style of the large conditional in that function
    to follow the style from most other parts of Mesa (Nicolai)

Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-06-01 08:44:34 +02:00
Ian Romanick 779b35bbc6 r100: Silence numerous unused this or that warnings
radeon_fbo.c: In function ‘radeon_map_renderbuffer_s8z24’:
radeon_fbo.c:147:50: warning: unused parameter ‘ctx’ [-Wunused-parameter]
 radeon_map_renderbuffer_s8z24(struct gl_context *ctx,
                                                  ^~~
radeon_fbo.c: In function ‘radeon_map_renderbuffer_z16’:
radeon_fbo.c:186:48: warning: unused parameter ‘ctx’ [-Wunused-parameter]
 radeon_map_renderbuffer_z16(struct gl_context *ctx,
                                                ^~~
radeon_fbo.c: In function ‘radeon_unmap_renderbuffer_s8z24’:
radeon_fbo.c:344:52: warning: unused parameter ‘ctx’ [-Wunused-parameter]
 radeon_unmap_renderbuffer_s8z24(struct gl_context *ctx,
                                                    ^~~
radeon_fbo.c: In function ‘radeon_unmap_renderbuffer_z16’:
radeon_fbo.c:377:50: warning: unused parameter ‘ctx’ [-Wunused-parameter]
 radeon_unmap_renderbuffer_z16(struct gl_context *ctx,
                                                  ^~~
radeon_fbo.c: In function ‘radeon_nop_alloc_storage’:
radeon_fbo.c:624:75: warning: unused parameter ‘rb’ [-Wunused-parameter]
 radeon_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
                                                                           ^~
radeon_fbo.c:625:12: warning: unused parameter ‘internalFormat’ [-Wunused-parameter]
     GLenum internalFormat, GLuint width, GLuint height)
            ^~~~~~~~~~~~~~
radeon_fbo.c:625:35: warning: unused parameter ‘width’ [-Wunused-parameter]
     GLenum internalFormat, GLuint width, GLuint height)
                                   ^~~~~
radeon_fbo.c:625:49: warning: unused parameter ‘height’ [-Wunused-parameter]
     GLenum internalFormat, GLuint width, GLuint height)
                                                 ^~~~~~
radeon_fbo.c: In function ‘radeon_bind_framebuffer’:
radeon_fbo.c:696:74: warning: unused parameter ‘fbread’ [-Wunused-parameter]
                        struct gl_framebuffer *fb, struct gl_framebuffer *fbread)
                                                                          ^~~~~~
radeon_fbo.c: In function ‘radeon_validate_framebuffer’:
radeon_fbo.c:832:19: warning: unused variable ‘radeon’ [-Wunused-variable]
  radeonContextPtr radeon = RADEON_CONTEXT(ctx);
                   ^~~~~~

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-05-31 21:14:44 -07:00
Ian Romanick 303b47f253 r100: Use _mesa_get_format_base_format in radeon_update_wrapper
The wrapper is for a renderbuffer around a texture.  Textures can have
formats (e.g., 3) that aren't valide for API generated renderbuffers.
_mesa_base_fbo_format will return 0, but _mesa_get_format_base_format
will return the base format of RGB.

Fixes a crashes in piglit tests fbo-alphatest-formats (all subtests
pass) and fbo-colormask-formats (some subtests pass, some fail).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-05-31 21:14:44 -07:00
Ian Romanick c24881d39c r100,r200: Don't assume glVisual is non-NULL during context creation
Thanks to EGL_MESA_configless_context, the visual pointer can be NULL.

Fixes a segfault (or assertion failure) in piglit's
egl-configless-context test.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-05-31 21:14:44 -07:00
Ian Romanick 2dcec62075 r100: Don't assume that the base mipmap of a texture exists
Fixes crashes in piglit's gl-1.2-texture-base-level.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-05-31 21:14:44 -07:00
Dave Airlie f42fb0012a r600/eg: add support for tracing IBs after a hang.
This is a poor man's version of radeonsi ddebug stuff, this
should get hooked into that infrastructure, and grow more stuff,
but for now, just create R600_TRACE var that points to a file
that you want to dump the last IB to.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-01 11:20:11 +10:00
Dave Airlie 55d1550d35 glsl/lower_int64: only set progress when something is lowered.
Otherwise we'd get progress continually set if we had non 64-bit
versions of these ops.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-01 08:46:35 +10:00
Bas Nieuwenhuizen af2844116f radv: Revert HTILE reset word to 0xFFFFFFFF.
0x30f regressed mad max.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Fixes: df91abfe5a "radv: Use correct clear words for HTILE."
2017-05-31 23:55:13 +02:00
Rob Herring e8f82bfd52 Android: major/minor/makedev live in <sys/sysmacros.h>
sysmacros.h was getting implicitly included in types.h until recently in
AOSP master. Define MAJOR_IN_SYSMACROS to explicitly include sysmacros.h.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2017-05-31 16:35:25 -05:00
Chad Versace 22d6b08d2d egl/android: Drop unused 'format' param in get_back_bo()
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-05-31 10:45:57 -07:00
Chad Versace 0bcdcebc85 egl/android: Align channel masks in HAL_PIXEL_FORMAT table
Improves readability. No change in behavior.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-05-31 10:45:57 -07:00
Eric Engestrom 11da77e546 egl/drm: remove temporary fd variable
In all codepaths, this var ends up assigned to the struct, except one:
a cleanup codepath, where the `close()` was removed, leading to fd leaks.
Remove the temp fd and assign to the struct field directly instead.

CovID: 1213930
Fixes: 7ec07beedf ("egl/drm: make use of the
                              dri2_display_destroy() helper")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-05-31 18:09:27 +01:00
Samuel Pitoiset c222fa9ada mesa: throw an INVALID_OPERATION error in get_texobj_by_name()
Because get_texobj_by_name() can already throw a INVALID_ENUM
error, it makes more sense to add a check directly there.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-05-31 12:01:19 +02:00
Samuel Pitoiset b9c3ce529f mesa: add new 'name' parameter to get_texobj_by_name()
To display better function names when INVALID_OPERATION is
returned. Requested by Timothy.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-05-31 12:01:08 +02:00
Samuel Pitoiset 30a4e375f5 radeonsi: remove unused si_pm4_state::compute_pkt
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-31 09:20:57 +02:00
Samuel Pitoiset e4b05a50df radeonsi: remove chip_class define from si_pm4.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-31 09:20:55 +02:00
Samuel Pitoiset d90a6c2f23 radeonsi: merge si_pm4_free_state_simple() into si_pm4_free_state()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-31 09:20:53 +02:00
Samuel Pitoiset d8debc6aad mesa/util: fix arithmetic use of 'void *' in u_vector_foreach
u_vector_foreach is currently only used by the Intel Vulkan
driver but when this macro is used in mesa core, GCC reports
a compile-time error. Probably because some compiler options
are different.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-05-31 09:19:54 +02:00
Timothy Arceri 4e93da30f0 mesa: remove _mesa from static function names
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-05-31 11:18:17 +10:00
Timothy Arceri 42fea3622f mesa/st: indentation tidy-up
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-05-31 11:18:17 +10:00
Rob Clark 45e97c994b freedreno/a5xx: drop WFIs in emit_marker5()
Results in always having at least one WFI between draws, which was
slowing stk down by ~5% and ~10% in xonotic.

(also drop bogus assert while we're at it.)

Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-05-30 20:40:58 -04:00
Rob Clark 76214b9919 freedreno/a5xx: timestamp / time-elapsed queries
Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-05-30 20:40:58 -04:00
Rob Clark 5ed9e8fd5d freedreno/a5xx: rename query result struct
Going to want the same thing for timestamp queries.

Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-05-30 20:40:58 -04:00
Rob Clark 8c65f17c3b freedreno: update generated headers
Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-05-30 20:40:58 -04:00
Kenneth Graunke 236ffbc442 i965: Delete dead old-school packing structs.
Trivial.
2017-05-30 16:22:33 -07:00
Tim Rowley c606edb578 swr/rast: code cleanup (no functional change)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-05-30 17:22:18 -05:00
Tim Rowley b10c9507ce swr/rast: whitespace changes
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-05-30 17:22:12 -05:00
Tim Rowley ac9d7c3d33 swr/rast: code cleanup (no functional change)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-05-30 17:22:08 -05:00
Tim Rowley e9e999ae32 swr/rast: allow early-z if shader uses depth value
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-05-30 17:22:02 -05:00