OSDN Git Service
Chih-Wei Huang [Fri, 11 Jan 2019 10:00:40 +0000 (18:00 +0800)]
egl/android: determine how to open device at runtime
This allows to build mesa libraries suitable for drm_gralloc and
other grallocs using prime fd.
v3: Handle having hwcomposer case the same as drm_gralloc since
it works better on QEMU virgl.
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Mauro Rossi [Sat, 22 Dec 2018 18:59:06 +0000 (19:59 +0100)]
Merge remote-tracking branch 'mesa/18.3' into oreo-x86
Mauro Rossi [Thu, 6 Dec 2018 19:07:00 +0000 (20:07 +0100)]
android: radv: enable Vulkan 1.1.70
radv_extension.py changes to enable Vulkan 1.1.70 in Android 8.1 (O)
Android 9.0 (P) requires VK_KHR_sampler_ycbcr_conversion, not available yet
Mauro Rossi [Wed, 28 Nov 2018 07:42:49 +0000 (08:42 +0100)]
i915/miptree: fix segfaults due to null pointer
The code seems to assume the pointer mt is always not null,
but there must be some race condition, because applying changes
some Google Play crashes are now fixed.
Mauro Rossi [Sun, 18 Nov 2018 17:11:59 +0000 (18:11 +0100)]
i965/brw_draw: fix stencil_irb->mt null pointer
In brw_postdraw_set_buffers_need_resolve() to avoid the following segfault:
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x188
Cause: null pointer dereference
backtrace:
#00 pc
0003d5ea /system/vendor/lib/dri/i965_dri.so (brw_draw_prims+4954)
addr2line -Cfe out/target/product/x86_64/symbols/system/vendor/lib/dri/i965_dri.so
0003d5ea /system/vendor/lib/dri/i965_dri.so (brw_draw_prims+4954)
brw_postdraw_set_buffers_need_resolve
external/mesa/src/mesa/drivers/dri/i965/brw_draw.c:716
Mauro Rossi [Sat, 10 Nov 2018 16:50:57 +0000 (17:50 +0100)]
i965/brw_draw: fix depth_irb->mt null pointer
Check depth_irb->mt to avoid later null pointer dereference
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x188
Cause: null pointer dereference
eax
00000000 ebx
c7eb0cd8 ecx
c7360f80 edx
00000000
backtrace:
#00 pc
0003d571 /system/vendor/lib/dri/i965_dri.so (brw_draw_prims+4945)
addr2line -Cfe out/target/product/x86_64/symbols/system/vendor/lib/dri/i965_dri.so
0003d571
brw_postdraw_set_buffers_need_resolve
external/mesa/src/mesa/drivers/dri/i965/brw_draw.c:708
Mauro Rossi [Wed, 7 Nov 2018 22:29:51 +0000 (23:29 +0100)]
i965/intel_fbo: fix segfault due to irb->mt null pointer
We bail out for !irb->mt to avoid following segfault:
F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x90
F DEBUG : Cause: null pointer dereference
F DEBUG :
F DEBUG : backtrace:
F DEBUG : #00 pc
00069a4f /system/vendor/lib/dri/i965_dri.so (intel_miptree_level_has_hiz+15)
Mauro Rossi [Sat, 3 Nov 2018 20:13:10 +0000 (21:13 +0100)]
i965/brw_misc_state: fix segfaults due to irb->mt null pointer
We add also !irb->mt check to avoid following segfault:
F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x188
F DEBUG : Cause: null pointer dereference
F DEBUG :
F DEBUG : backtrace:
F DEBUG : #00 pc
00044cb3 /system/vendor/lib/dri/i965_dri.so (brw_emit_depthbuffer+163)
addr2line -Cfe out/target/product/x86_64/symbols/system/vendor/lib/dri/i965_dri.so
00044cb3 /system/vendor/lib/dri/i965_dri.so (brw_emit_depthbuffer+163)
get_stencil_miptree
external/mesa/src/mesa/drivers/dri/i965/brw_misc_state.c:130
Fixes:
fdd6d146d9 ("i965: Use the separate stencil buffer's offsets for stencil setup.")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Emil Velikov [Fri, 28 Sep 2018 13:48:49 +0000 (14:48 +0100)]
nouveau: remove nouveau_screen reuse (v2)
The screen reuse was introduced to handle GL-VDPAU interop.
Since we have a better solution in place, we can drop this workaround
the respective exported symbol and symbol hacks.
As we follow the same approach for other drivers this will allow us to
remove the VL code from the dri modules and the odd hack that arise around
LLVM use.
Mauro, this should effectively fix the nouveau MT issues so you can drop
the following patches:
WIP nouveau: add locking (v6)
nouveau: more locking - make sure that fence work is always done with the push mutex acquired (v2)
nv30 locking fixes (v2)
nv30 additional locking fix in context flush
and
add load_pipe_screen for drm_gralloc (v2)
(v2) Fixes in src/gallium/drivers/nouveau/nouveau_screen.h due to
26ed0f0234
("nvc0: increase NOUVEAU_TRANSFER_PUSHBUF_THRESHOLD to 1024 on Kepler+")
Cc: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Mauro Rossi [Fri, 19 Jan 2018 19:34:39 +0000 (20:34 +0100)]
DO NOT MERGE: android: build mesa with llvm70
The only changes necessary are in main Android.mk
HAVE_LLVM variable is set to 0x0700
and LOCAL_SHARED_LIBRARIES to libLLVM70
elliott10 [Mon, 20 Aug 2018 05:13:21 +0000 (13:13 +0800)]
i965: fix Google Play Service crash further
The caller of intel_miptree_map() expects *out_ptr to be a valid
pointer. However, if mt is null, it just returns without setting
*out_ptr (commit
474937a8). Therefore further use of the pointer
in memcpy results in another crashing.
Fixes:
474937a8 (i965/miptree: fix segfaults due to null pointer)
Chih-Wei Huang [Wed, 28 Mar 2018 03:22:31 +0000 (11:22 +0800)]
i965/miptree: fix segfaults due to null pointer
The code seems to assume the pointer mt is always not null,
but there must be some race condition, because applying changes
the Google Play crashes are now fixed.
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Mauro Rossi [Tue, 26 Dec 2017 17:33:52 +0000 (18:33 +0100)]
Android: i965: add include to get "xmlpool/options.h"
intel_screen.c requires "xmlpool/options.h" generated header
or the following tricky Android building error may appear:
external/mesa/src/mesa/drivers/dri/i965/intel_screen.c:84:7: error: expected '}'
DRI_CONF_ALLOW_GLSL_CROSS_STAGE_INTERPOLATION_MISMATCH("false")
^
external/mesa/src/mesa/drivers/dri/i965/intel_screen.c:46:63: note: to match this '{'
static const __DRIconfigOptionsExtension brw_config_options = {
^
1 error generated.
Mauro Rossi [Sun, 17 Dec 2017 22:34:51 +0000 (23:34 +0100)]
Android: gallium_dri: add include to get "xmlpool/options.h"
target.c requires "xmlpool/options.h" generated header
or the following tricky Android building error may appear:
In file included from external/mesa/src/gallium/targets/dri/target.c:1:
In file included from external/mesa/src/gallium/auxiliary/target-helpers/drm_helper.h:185:
out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_pipe_radeonsi_intermediates/radeonsi/si_driinfo.h:19:7: error: expected '}'
DRI_CONF_RADEONSI_ENABLE_SISCHED("false")
^
external/mesa/src/gallium/auxiliary/target-helpers/drm_helper.h:182:55: note: to match this '{'
static const struct drm_conf_ret xml_options_ret = {
^
1 error generated.
Fixes:
0f8c5de869 ("radeonsi: prepare for driver-specific driconf options")
Cc: "17.3" <mesa-stable@lists.freedesktop.org>
WuZhen [Fri, 6 Jan 2017 17:35:02 +0000 (01:35 +0800)]
android: print debug info to logcat
Redirect logs printed to stderr to logcat.
Change-Id: I58e3966a608af361b86c54b4c95a92561b711968
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Qiang Yu [Mon, 17 Jul 2017 06:40:00 +0000 (14:40 +0800)]
add load_pipe_screen for drm_gralloc (v2)
Conflicts:
src/gallium/auxiliary/pipe-loader/pipe_loader.h
(v2) Removed argument for unsigned flags (now called config)
Yogesh Marathe [Thu, 11 May 2017 10:18:44 +0000 (15:48 +0530)]
AndroidIA: enable O3 for Mesa compilation
Improves performance of graphics tests significantly.
Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Mauro Rossi [Fri, 17 Mar 2017 06:44:38 +0000 (07:44 +0100)]
android: define HAVE_ANDROID_PLATFORM in android build (v3)
Fixes the correct build of android paths for any future case,
by moving definition to top Android.common.mk
(v2) definition in src/egl/Android.mk is removed
(v3) changes due to
a0f6a11944 ("egl: drop unused _EGL_BUILT_IN_DRIVER_DRI2")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Mauro Rossi [Tue, 1 Nov 2016 13:22:54 +0000 (14:22 +0100)]
HACK: i915: enable image external sampling
This hack is the alternative way of enabling GL_OES_EGL_image_external
as opposed to defining mesa environment variable in init.rc
As a reference this hack works on i915 also because of commit
"android: a workaround for GL_INVALID_OPERATION (0x502) error"
which allows for external image being mapped despited not being dma-buf
Mauro Rossi [Tue, 1 Nov 2016 00:03:52 +0000 (01:03 +0100)]
i915: add mock implementation of GL_OES_EGL_image_external (v2)
This is similar to commit
7420c9dab4aaf87e6b840410226c296c4668a48f
but for the i915 driver, as neeeded in android-x86.
In version v2, as per i965 implementation,
the extension GL_OES_EGL_image_external is not enabled by default.
The by-the-book way to enable the extension is mesa environment variable
MESA_EXTENSION_OVERRIDE="+GL_OES_EGL_image_external" to be set in init.rc
Mauro Rossi [Sat, 8 Jul 2017 22:06:40 +0000 (00:06 +0200)]
nv30 additional locking fix in context flush
mtx_lock() and mtx_unlock() are added around PUSH_KICK(push) call
like in nv50 and nvc0 implementations of locking
Mauro Rossi [Wed, 22 Jun 2016 02:59:50 +0000 (22:59 -0400)]
nv30 locking fixes (v2)
(v1) Initial version
(v2) Modified due to
fd33a6b "gallium: Use C11 thread abstractions."
replace pipe_mutex_lock() with mtx_lock()
replace pipe_mutex_unlock() with mtx_unlock()
Mauro Rossi [Tue, 7 Jun 2016 00:30:48 +0000 (20:30 -0400)]
nouveau: more locking - make sure that fence work is always done with the push mutex acquired (v2)
(v1) Initial version
(v2) Modified due to
fd33a6b "gallium: Use C11 thread abstractions."
replace pipe_mutex_lock() with mtx_lock()
replace pipe_mutex_unlock() with mtx_unlock()
Mauro Rossi [Thu, 10 May 2018 20:15:41 +0000 (22:15 +0200)]
WIP nouveau: add locking (v6)
(v1) Initial version
(v2) Modified due to
fd33a6b ("gallium: Use C11 thread abstractions.")
replace pipe_mutex with mtx_t
replace pipe_mutex_init() with mtx_init()
replace pipe_mutex_destroy() with mtx_destroy()
replace pipe_mutex_lock() with mtx_lock()
replace pipe_mutex_unlock() with mtx_unlock()
(v3) Modified due to
c12f830 ("nv50,nvc0: remove IDX from bufctx immediately, to avoid conflicts with clear")
(v4) Modified due to
8eb1214 ("nvc0: add support for bindless textures on kepler+")
(v5) Modified due to
33ce356 ("nvc0: fix writing query results into buffer")
(v6) mtx_unlock() moved after NOUVEAU_DRV_STAT()
Chih-Wei Huang [Sat, 28 May 2016 04:04:54 +0000 (12:04 +0800)]
virgl: fix null pointer exceptions
Chih-Wei Huang [Tue, 16 Feb 2016 21:05:51 +0000 (05:05 +0800)]
android: clean gallium_dri_intermediates
Since BOARD_GPU_DRIVERS is updated, clean up gallium_dri to ensure
it is rebuilt correctly.
Rob Herring [Wed, 10 Feb 2016 18:09:14 +0000 (12:09 -0600)]
Android: enable texture-float
This is required by freedreno at least for GLES3 support.
See docs/patents.txt for information about turning this on for s/w
renderers.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Fri, 8 Jan 2016 15:25:37 +0000 (09:25 -0600)]
HACK: glsl: disable error on non-constant array indexing
DRM HWC has a shader program that hits this error. Work-around it by
ignoring the error.
Signed-off-by: Rob Herring <robh@kernel.org>
Chih-Wei Huang [Fri, 23 Jan 2015 19:53:48 +0000 (03:53 +0800)]
android: a workaround for GL_INVALID_OPERATION (0x502) error
Inspired by the nice work of Paulo Sergio (pstglia):
"Bypass a check for external target enabled only for images
created with EGL_EXT_image_dma_buf_import - this makes
Android graphical components receive a GL_INVALID_OPERATION (0x502)."
Sean V Kelley [Mon, 10 Sep 2012 18:52:35 +0000 (11:52 -0700)]
i915: Support Android RGBX8888 format for EGL generated images
Enabled MESA_FORMAT_R8G8B8X8_UNORM (formerly MESA_FORMAT_RGBX8888_REV)
for RGBX with i915. Android software requires RGBX8888 format to be
supported for software rendering.
Previously had done so for i965 but have requests for i915 support.
Change-Id: I87c3a8e3f206d75d58b63182ed94851749740762
Signed-off-by: Sean V Kelley <sean.v.kelley@linux.intel.com>
Mauro Rossi [Mon, 4 Jan 2016 16:40:44 +0000 (17:40 +0100)]
i915: enable GL_APPLE_texture_2D_limited_npot in mesa 11.1
This is the port of Chia-I Wu commit 79ac0e to mesa 11.1 branch,
where the extensions went to a dedicated file extensions_table.h
Original commit message:
"Enable GL_ARB_texture_non_power_of_two for GLESv1 to advertise
GL_APPLE_texture_2D_limited_npo. The former is actually a superset of
the latter, but we really want to enable NPOT support in some way."
Mauro Rossi [Mon, 4 Jan 2016 16:37:39 +0000 (17:37 +0100)]
android: advertise GL_ARB_texture_non_power_of_two in mesa 11.1
This is the port of Chia-I Wu commit 62873a to mesa 11.1 branch,
where the extensions went to a dedicated file extensions_table.h
Original commit message:
"It maps to DisplayHardware::NPOT_EXTENSION in SurfaceFlinger. Does not
seem to matter when EGL_ANDROID_image_native_buffer is available."
Emil Velikov [Tue, 11 Dec 2018 21:19:03 +0000 (21:19 +0000)]
docs: add sha256 checksums for 18.3.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Tue, 11 Dec 2018 21:12:55 +0000 (21:12 +0000)]
docs: add release notes for 18.3.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Tue, 11 Dec 2018 19:14:22 +0000 (19:14 +0000)]
Update version to 18.3.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Jason Ekstrand [Mon, 10 Dec 2018 16:57:35 +0000 (10:57 -0600)]
anv,radv: Disable VK_EXT_pci_bus_info
The Vulkan working group recently discovered that we made a mistake in
assuming that PCI domains are 16-bit even though they can potentially be
32-bit values. To fix this, the next spec update will change the types
in the VK_EXT_pci_bus_info struct to be 32 bits which will be a
backwards-incompatible change. Normally, Khronos tries very hard to
never make backwards incompatible changes to specs. Hopefully, the
extension is new enough (2 months) that there are no shipping apps which
use the extension so this should be safe.
This commit disables the extension for both anv and radv in mesa and
should be back-ported to 18.3 ASAP so we avoid any potential issues with
new apps running on old drivers. I'll send out a commit (which we can
also back-port to 18.3 if we really care) to re-enable the extension in
both drivers once this week's spec update ships. The one known use of
this extension is internal to mesa and will continue working with the
extension disabled and will naturally update when we get a new header.
Cc: "18.3" <mesa-stable@lists.freedesktop.org>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit
8f401b0ce6e6650e1a85e9bb2be23d5ff08812b8)
[Emil: resolve trivial conflict]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/intel/vulkan/anv_extensions.py
Emil Velikov [Fri, 7 Dec 2018 11:27:49 +0000 (11:27 +0000)]
docs: add sha256 checksums for 18.3.0
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Fri, 7 Dec 2018 11:20:00 +0000 (11:20 +0000)]
docs: update 18.3.0 release notes
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Thu, 6 Dec 2018 18:03:25 +0000 (18:03 +0000)]
Update version to 18.3.0 (final)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Wed, 5 Dec 2018 21:36:54 +0000 (21:36 +0000)]
Update version to 18.3.0-rc6
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Gurchetan Singh [Mon, 26 Nov 2018 17:54:05 +0000 (09:54 -0800)]
virgl: don't mark buffers as unclean after a write
We can mark the buffer unclean if it's ever bound as a TBO,
SSBO, ABO, or image.
This improves
dEQP-GLES3.performance.buffer.data_upload.function_call.map_buffer_range.new_specified_buffer.flag_write_full.stream_draw
from 9.58 MB/s to 451.17 MB/s.
v2: Track buffer cleanliness as a function of bindings (Ilia).
v3: virgl_modify_clean --> virgl_dirty_res (Erik)
Tested-By: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit
89b4798c0619a2ba99046d5ad36f0e6851625f7a)
With this and previous two patches, the performance of virgl on top of
a r600 (AMD 6870 HD) host improves as follows:
| FPS avg | Score
--------------------------------
before | 8.2 | 343
after | 21.9 | 916
| FPS avg | Score
--------------------------------
before | 13.2 | 333
after | 32.3 | 790
Gurchetan Singh [Mon, 26 Nov 2018 17:54:04 +0000 (09:54 -0800)]
virgl: avoid large inline transfers
We flush everytime the command buffer (16 kB) is full, which is
quite costly.
This improves
dEQP-GLES3.performance.buffer.data_upload.function_call.buffer_data.new_buffer.usage_stream_draw
from 111.16 MB/s to 1930.36 MB/s.
In addition, I made the benchmark produce buffers from 0 --> VIRGL_MAX_CMDBUF_DWORDS * 4,
and tried ((VIRGL_MAX_CMDBUF_DWORDS * 4) / 2), ((VIRGL_MAX_CMDBUF_DWORDS * 4) / 4), etc.
I didn't notice any clear differences, so let's just go with the most obvious
heuristic.
Tested-By: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit
d18492c64f0abb4eb638d2b213b4b1ff3d775965)
Gurchetan Singh [Mon, 26 Nov 2018 17:54:03 +0000 (09:54 -0800)]
virgl: quadruple command buffer size
Tested running WebGL aquarium on Nvidia host (10,000 fishes)
This moves us from 7 fps to 9 fps. After quadrupling, performance
gains diminish.
v2: Remove change ID (Erik)
Tested-By: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit
c0773315af76cd735152c322cb7f710b4b053148)
Michal Srb [Fri, 23 Nov 2018 16:03:53 +0000 (17:03 +0100)]
drisw: Use separate drisw_loader_funcs for shm
The original code was modifying the global drisw_lf variable, which is bad
when there are multiple contexts in single process, each initialized with
different loader. One may support put_image_shm and the other not.
Since there are currently only two possible combinations, lets create two
global tables, one for each. Lets make them const, since we won't change them
and they can be shared.
This fixes crash in VLC. It used two GL contexts (each in different thread), one
was initialized by its Qt GUI, the other by its video output plugin. The first
one set the put_image_shm=drisw_put_image_shm, the second did not, but
since the same structure was used, the drisw_put_image_shm was used too. Then
it crashed because the second loader did not have putImageShm set.
Downstream bug:
https://bugzilla.opensuse.org/show_bug.cgi?id=
1113533
v2: Added Fixes and described the VLC bug.
Fixes:
63c427fa71a ("drisw: use putImageShm if available")
Signed-off-by: Michal Srb <msrb@suse.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
63c0916ada7eed7eddc0453dfbfed3cc7f42ca85)
Michal Srb [Fri, 23 Nov 2018 15:02:27 +0000 (16:02 +0100)]
gallium: Constify drisw_loader_funcs struct
The content is not expected to change.
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Michal Srb <msrb@suse.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
c0ac038c97b89a8266375339c297b17b3700dfb0)
Samuel Pitoiset [Wed, 5 Dec 2018 10:45:19 +0000 (11:45 +0100)]
radv: wait on the high 32 bits of timestamp queries
In case we are unlucky if the low part is 0xffffffff.
Fixes:
5d6a560a29 ("radv: do not use the availability bit for timestamp queries")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit
c7ada4901aaf192d7aacd51c3ab0ebbbb0ceeb3e)
[Emil: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/amd/vulkan/radv_query.c
Lionel Landwerlin [Mon, 3 Dec 2018 14:33:35 +0000 (14:33 +0000)]
anv/query: flush render target before copying results
This change tracks render target writes in the pipeline and applies a
render target flush before copying the query results to make sure the
preceding operations have landed in memory before the command streamer
initiates the copy.
v2: Simplify logic in CopyQueryResults (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108909
Fixes:
37f9788e9a8e44 ("anv: flush pipeline before query result copies")
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit
9a7b3199037ac4b798974f561067cb3d66be8010)
Alex Smith [Wed, 5 Dec 2018 09:45:26 +0000 (09:45 +0000)]
radv: Flush before vkCmdWriteTimestamp() if needed
As done for vkCmdBeginQuery() already. Prevents timestamps from being
overwritten by previous vkCmdResetQueryPool() calls if the shader path
was used to do the reset.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108925
Fixes:
a41e2e9cf5 ("radv: allow to use a compute shader for resetting the query pool")
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit
c1b6cb068c4dfe49c309624610e8610b3f0b27c3)
Samuel Pitoiset [Mon, 3 Dec 2018 21:45:03 +0000 (22:45 +0100)]
radv: rework the TC-compat HTILE hardware bug with COND_EXEC
After investigating on this, it appears that COND_WRITE doesn't
work correctly in some situations. I don't know exactly why does
it fail to update DB_Z_INFO.ZRANGE_PRECISION, but as AMDVLK
also uses COND_EXEC I think there is a reason.
Now the driver stores a new metadata value in order to reflect
the last fast depth clear state. If a TC-compat HTILE is fast cleared
with 0.0f, we have to update ZRANGE_PRECISION to 0 in order to
work around that hardware bug.
This fixes rendering issues with The Forest and DXVK and doesn't
seem to introduce any regressions.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108914
Fixes:
68dead112e7 ("radv: update the ZRANGE_PRECISION value for the TC-compat bug")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit
824cfc1ee5e0aba15b676b9363ff32046d96eb42)
Dave Airlie [Mon, 3 Dec 2018 04:38:28 +0000 (14:38 +1000)]
radv: use 3d shader for gfx9 copies if dst is 3d
This fixes some crucible 3d miptree tests I've been working on
when executed using the compute shader path.
Fixes:
d08f267814 (radv/gfx9: fix 3d image to image transfers on compute queues.)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit
1363a47c9c4f8482fea9e8a2582a1d8e9db0e8a6)
Bas Nieuwenhuizen [Mon, 26 Nov 2018 15:26:36 +0000 (16:26 +0100)]
radv/android: Use buffer metadata to determine scanout compat.
These days we don't always allocate scanout compatible textures anymore.
That does mean we have to fix the radv android WSI though.
Fixes:
b1444c9ccb0 "radv: Implement VK_ANDROID_native_buffer."
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit
3bf48741e128b60f6430b32cc47197f62075b1e9)
Bas Nieuwenhuizen [Mon, 26 Nov 2018 15:26:35 +0000 (16:26 +0100)]
radv/android: Mark android WSI image as shareable.
Fixes:
b1444c9ccb0 "radv: Implement VK_ANDROID_native_buffer."
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit
51091b3e1f212be956f91ac5214191c14e83ac59)
Matt Turner [Tue, 4 Dec 2018 00:20:43 +0000 (16:20 -0800)]
Revert "st/mesa: silenced unhanded enum warning in st_glsl_to_tgsi.cpp"
This reverts commit
198c50f4873758e9f64d89eea262af5dd1644df9.
This needs to be reverted after commit
017199d2d2e4 ("mesa: Revert
INTEL_fragment_shader_ordering support")
(cherry picked from commit
dd53bb7e1f69740a5712decbae79dc79df8ecaa1)
Matt Turner [Thu, 29 Nov 2018 23:46:18 +0000 (15:46 -0800)]
mesa: Revert INTEL_fragment_shader_ordering support
This extension is not properly tested (testing for
GL_ARB_fragment_shader_interlock is not sufficient), and since this was
noted in review on August 28th no tests have been sent.
Revert "i965: Add INTEL_fragment_shader_ordering support."
Revert "mesa: Add GL/GLSL plumbing for INTEL_fragment_shader_ordering"
This reverts commit
03ecec9ed2099f6e2b62994b33dc948dc731e7b8.
This reverts commit
119435c8778dd26cb7c8bcde9f04b3982239fe60.
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
017199d2d2e4c57015bc60edfcc656062c3a7472)
Tobias Klausmann [Sat, 1 Dec 2018 17:30:20 +0000 (18:30 +0100)]
amd/vulkan: meson build - use radv_deps for libvulkan_radeon
Without this the build breaks with:
FAILED: src/amd/vulkan/src@amd@vulkan@@vulkan_radeon@sha/radv_pipeline.c.o
cc -Isrc/amd/vulkan/src@amd@vulkan@@vulkan_radeon@sha -Isrc/amd/vulkan
-I../src/amd/vulkan -Isrc/../include -I../src/../include -Isrc -I../src
-Isrc/mapi -I../src/mapi -Isrc/mesa -I../src/mesa -I../src/gallium/include
-Isrc/gallium/auxiliary -I../src/gallium/auxiliary -Isrc/amd -I../src/amd
-Isrc/amd/common -I../src/amd/common -Isrc/compiler -I../src/compiler
-Isrc/vulkan/util -I../src/vulkan/util -Isrc/vulkan/wsi -I../src/vulkan/wsi
-Isrc/compiler/nir -I../src/compiler/nir -I/usr/include -I/usr/include/libdrm
-fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
-std=c99 -O2 -g '-DVERSION="18.3.0-rc5"' -DPACKAGE_VERSION=VERSION
'-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa"'
-DGLX_USE_TLS -DHAVE_ST_VDPAU -DENABLE_ST_OMX_BELLAGIO=0
-DENABLE_ST_OMX_TIZONIA=0 -DHAVE_X11_PLATFORM -DGLX_INDIRECT_RENDERING
-DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DHAVE_DRM_PLATFORM -DENABLE_SHADER_CACHE
-DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ
-DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT
-DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT
-DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE
-DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN
-DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE
-DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT
-DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT
-DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL
-DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_FUNC_ATTRIBUTE_ALIAS
-DHAVE_FUNC_ATTRIBUTE_NORETURN -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS
-DUSE_X86_64_ASM -DMAJOR_IN_SYSMACROS -DHAVE_SYS_SYSCTL_H -DHAVE_LINUX_FUTEX_H
-DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_STRTOF -DHAVE_MKOSTEMP
-DHAVE_POSIX_MEMALIGN -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_STRTOD_L
-DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_PTHREAD
-DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LLVM=0x0600
-DMESA_LLVM_VERSION_PATCH=1 -DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED
-DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -Werror=implicit-function-declaration
-Werror=missing-prototypes -Werror=return-type -fno-math-errno
-fno-trapping-math -Wno-missing-field-initializers -Wno-format-truncation -O2
-Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables
-fasynchronous-unwind-tables -fstack-clash-protection -DNDEBUG -fPIC -pthread
-D__STDC_FORMAT_MACROS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_LIMIT_MACROS -fvisibility=hidden -Wno-override-init
-DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR
-DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_DISPLAY_KHR
-DVK_USE_PLATFORM_XLIB_XRANDR_EXT -MD -MQ
'src/amd/vulkan/src@amd@vulkan@@vulkan_radeon@sha/radv_pipeline.c.o' -MF
'src/amd/vulkan/src@amd@vulkan@@vulkan_radeon@sha/radv_pipeline.c.o.d' -o
'src/amd/vulkan/src@amd@vulkan@@vulkan_radeon@sha/radv_pipeline.c.o' -c
../src/amd/vulkan/radv_pipeline.c
In file included from ../src/vulkan/util/vk_alloc.h:29,
from ../src/amd/vulkan/radv_private.h:52,
from ../src/amd/vulkan/radv_debug.h:27,
from ../src/amd/vulkan/radv_pipeline.c:30:
../src/../include/vulkan/vulkan.h:54:10: fatal error: wayland-client.h: Datei
oder Verzeichnis nicht gefunden
#include <wayland-client.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
The above command misses the include directory for wayland:
-I/usr/include/wayland
The missing include is contained in the (until now) unused radv_deps:
if with_platform_wayland
radv_deps += dep_wayland_client
radv_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'
libradv_files += files('radv_wsi_wayland.c')
endif
Fixes:
673dda83307 "meson: build "radv" vulkan driver for radeon hardware"
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
(cherry picked from commit
9401a2f2e64bc04401a547d06810adbf0660edb8)
Karol Herbst [Sat, 24 Nov 2018 19:00:00 +0000 (20:00 +0100)]
nv50,nvc0: Fix gallium nine regression regarding sampler bindings
The new approach is that samplers don't get unbound even if they won't be used
in a draw and we should just leave them be as well.
Fixes a regression in multiple windows games using gallium nine and nouveau.
v2: adjust num_samplers to keep track of the highest sampler bound
v3: rework how to set the new value of num_samplers
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106577
Fixes:
4d6fab245eec3880e2a59424a579851f44857ce8
"cso: don't track the number of sampler states bound"
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit
fc0139d28339f58bcbb4946fea7608ecdaff93e7)
Vinson Lee [Mon, 5 Nov 2018 18:50:41 +0000 (10:50 -0800)]
st/xvmc: Add X11 include path.
This patch fixes this build error.
CC tests/xvmc_bench.o
In file included from tests/xvmc_bench.c:35:
tests/testlib.h:38:10: fatal error: 'X11/Xlib.h' file not found
^~~~~~~~~~~~
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
4f74580d3038eca1b751a71e0c098ea9eb9cdb05)
Lionel Landwerlin [Thu, 29 Nov 2018 13:02:03 +0000 (13:02 +0000)]
anv: flush pipeline before query result copies
Pipeline state pending bits should be taken into account when copying
results.
In the particular bug below, the results of the
vkCmdCopyQueryPoolResults() command was being overwritten by the
preceding vkCmdCopyBuffer() with a same destination buffer. This is
because we copy the buffers using the 3D pipeline whereas we copy the
query results using the command streamer. Those pieces of HW work in
parallel and the results are somewhat undefined.
v2: Unconditionally flush the pipeline before copying the results
(Jason)
v3: Wrap & expressions (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108894
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit
37f9788e9a8e443772b5ad6f339567e6ae6a8320)
Thomas Hellstrom [Mon, 26 Nov 2018 18:05:47 +0000 (19:05 +0100)]
winsys/svga: Fix a memory leak
The ioctl.cap_3d member was never freed.
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
058f85d41cbe3534b1a06d321fab9afb8fbadfc0)
Thomas Hellstrom [Mon, 26 Nov 2018 18:02:08 +0000 (19:02 +0100)]
st/xa: Fix a memory leak
Free the context after destruction.
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
7fce3ca3759e2e156e2e3bf1bcc4ee378dc7fa2d)
Dave Airlie [Thu, 11 Oct 2018 03:44:02 +0000 (13:44 +1000)]
r600: make suballocator 256-bytes align
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108311
Cc: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit
2ddd44d941648d49dc0d917e03a579baec3590d9)
Emil Velikov [Thu, 29 Nov 2018 11:56:27 +0000 (11:56 +0000)]
Update version to 18.3.0-rc5
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Wed, 28 Nov 2018 17:52:54 +0000 (17:52 +0000)]
cherry-ignore: egl/wayland: rather obvious build fix
Commit was squashed into the respective offenders
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Tue, 20 Nov 2018 17:35:27 +0000 (17:35 +0000)]
vulkan/wsi: fix s/,/;/ typo
Fixes:
59e58c348e6af16a5f2dd "vulkan/wsi: Only wait on semaphores on the first swapchain"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit
e0f1f74eda6e1bdb3bcee075f6cc5082d4137069)
Emil Velikov [Tue, 27 Nov 2018 11:36:01 +0000 (11:36 +0000)]
egl/wayland: plug memory leak in drm_handle_device()
As we fail to open the node, we leak the node/device name.
v2: Log and then free() (Eric)
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit
ce74a7bb8de7f5b921d53384582de3324290cd60)
Emil Velikov [Fri, 23 Nov 2018 12:55:38 +0000 (12:55 +0000)]
egl/wayland: bail out when drmGetMagic fails
Currently as the function fails, we pass uninitialized data to the
authentication function. Stop doing that and print an warning when
the function fails.
v2: Plug memory leak in error path (Eric)
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (v1)
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit
c59d3aa4b9bc58994e199052171a8119aaa8195c)
Eric Engestrom [Tue, 27 Nov 2018 13:34:37 +0000 (13:34 +0000)]
wsi/display: fix mem leak when freeing swapchains
Fixes:
da997ebec92942193955 "vulkan: Add KHR_display extension using DRM [v10]"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit
9575cd289325ddbfa96291d7886cfc32a0487e79)
Bas Nieuwenhuizen [Mon, 26 Nov 2018 02:28:05 +0000 (03:28 +0100)]
radv: Align large buffers to the fragment size.
Improves performance in Talos by about 15% (and significant improvements
in RotR and possibly other but did not bench with final patch) on
kernel 4.19 and earlier.
On 4.20+ a similar effect comes from
433ca054949a "drm/amdgpu: try allocating VRAM as power of two"
v2: Do not impact the alignment of the physical memory.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
CC: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit
6569644bb6e1f58fd739d83bd4dc42e6af6b6097)
Bas Nieuwenhuizen [Sat, 24 Nov 2018 22:21:05 +0000 (23:21 +0100)]
radv: Clamp gfx9 image view extents to the allocated image extents.
Mirrors AMDVLK. Looks like if we go over the alignment of height
we actually start to change the addressing. Seems like the extra
miplevels actually work with this.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108245
Fixes:
f6cc15dccd5 "radv/gfx9: fix block compression texture views. (v2)"
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit
08ea6b9d9bb047603c249468dfe00d7bb9603d5e)
Eric Engestrom [Fri, 23 Nov 2018 17:08:28 +0000 (17:08 +0000)]
anv: correctly use vulkan 1.0 by default
Per chapter 3.2 "Instances":
> Providing a NULL VkInstanceCreateInfo::pApplicationInfo or providing
> an apiVersion of 0 is equivalent to providing an apiVersion of
> VK_MAKE_VERSION(1,0,0).
Reported-by: Niklas Haas <git@haasn.xyz>
Fixes:
8c048af5890d43578ca4 "anv: Copy the appliation info into the instance"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit
56d126f8fd210dbd2c946bfbc2e3c81b04d27d09)
Erik Faye-Lund [Thu, 22 Nov 2018 10:10:50 +0000 (11:10 +0100)]
mesa/main: fix incorrect depth-error
If glGetTexImage or glGetnTexImage is called with a level that doesn't
exist, we get an error message on this form:
Mesa: User error: GL_INVALID_VALUE in glGetTexImage(depth = 0)
This is clearly nonsensical, because these APIs don't even have a
depth-parameter. The reason is that get_texture_image_dims() return
all-zero dimensions for non-existent texture-images, and we go on to
validate these dimensions as if they were user-input, because
glGetTextureSubImage requires checking.
So let's split this logic in two, so glGetTextureSubImage can have
stricter input-validation. All arguments that are no longer validated
are generated internally by mesa, so there's no use in validating them.
Fixes:
42891dbaa12 "gettextsubimage: verify zoffset and depth are correct"
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
(cherry picked from commit
c120dbfe4d18240315ecec9b43a61aeb9ab239ac)
Erik Faye-Lund [Thu, 22 Nov 2018 16:40:47 +0000 (17:40 +0100)]
mesa/main: check cube-completeness in common code
This check is the only part of dimensions_error_check that isn't about
error-checking the offset and size arguments of
glGet[Compressed]TextureSubImage(), so it doesn't really belong in here.
This doesn't make a difference right now, apart for changing the
presedence of this error. But it will make a difference for the next
patch, where we no longer call this method from the non-sub tex-image
getters.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
(cherry picked from commit
38af69adfaf47019926bfe3a8cf352752068d389)
Erik Faye-Lund [Thu, 22 Nov 2018 11:37:33 +0000 (12:37 +0100)]
mesa/main: factor out common error-checking
This error checking is the same for teximage and texsubimage getters, so
let's factor it out to its own function.
This will be useful when getteximage and gettexsubimage gets their own
error checking routines a bit later.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
(cherry picked from commit
42820c572750c30ae86175ae58bb70439dc2e644)
Erik Faye-Lund [Thu, 22 Nov 2018 11:17:32 +0000 (12:17 +0100)]
mesa/main: factor out tex-image error-checking
This will be useful when we split error-checking for getteximage and
gettexsubimage later.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
(cherry picked from commit
5e0a84f31cac14f1ccc5c74ce2e7cd997f267752)
Erik Faye-Lund [Thu, 22 Nov 2018 14:17:13 +0000 (15:17 +0100)]
mesa/main: remove bogus error for zero-sized images
The explanation quotes the spec on the following wording to justify the
error:
"An INVALID_VALUE error is generated if xoffset + width is greater than
the texture’s width, yoffset + height is greater than the texture’s
height, or zoffset + depth is greater than the texture’s depth."
However, this shouldn't generate an error in the case where *all three*
of width, xoffset and the texture's width are zero. In this case, we end
up generating an unspecified error.
So let's remove this check, and instead make sure that we consider this
as an empty texture.
So let's not generate an error, there's non mandated in the spec in
xoffset/yoffset/zoffset = 0 case. We already avoid doing any work in
this case, because of the final, non-error generating check in this
function.
Fixes:
b37b35a5d26 "getteximage: assume texture image is empty for non defined levels"
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
(cherry picked from commit
38bbb61252aa503571986080afddd98a56bcf2e7)
Gert Wollny [Fri, 16 Nov 2018 18:12:46 +0000 (19:12 +0100)]
glsl: free or reuse memory allocated for TF varying
When a shader program is de-serialized the gl_shader_program passed in
may actually still hold memory allocations for the transform feedback
varyings. If that is the case, free the varying names and reallocate
the new storage for the names array.
This fixes a memory leak:
Direct leak of 48 byte(s) in 6 object(s) allocated from:
in malloc (/usr/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/libasan.so+0xdb880)
in transform_feedback_varyings ../../samba/mesa/src/mesa/main/transformfeedback.c:875
in _mesa_TransformFeedbackVaryings ../../samba/mesa/src/mesa/main/transformfeedback.c:985
...
Indirect leak of 42 byte(s) in 6 object(s) allocated from:
in __interceptor_strdup (/usr/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/libasan.so+0x761c8)
in transform_feedback_varyings ../../samba/mesa/src/mesa/main/transformfeedback.c:887
in _mesa_TransformFeedbackVaryings ../../samba/mesa/src/mesa/main/transformfeedback.c:985
Fixes:
ab2643e4b06f63c93a57624003679903442634a8
glsl: serialize data from glTransformFeedbackVaryings
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit
f5d053702fa976a3112d9c6a2425430365db40f8)
Bas Nieuwenhuizen [Sat, 24 Nov 2018 19:52:20 +0000 (20:52 +0100)]
radv: Fix opaque metadata descriptor last layer.
We used the layer count which results in an off by one error.
Not sure this really affects anything.
Fixes:
f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit
3c96a1e3a97ba89dad803e7be8f9e3d4f6516fa3)
Marek Olšák [Mon, 19 Nov 2018 23:17:40 +0000 (18:17 -0500)]
winsys/amdgpu: fix a device handle leak in amdgpu_winsys_create
Cc: 18.2 18.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit
d4e7d8b7f053db081a4ffdb59dc53f3531b0e60b)
Marek Olšák [Mon, 19 Nov 2018 23:12:12 +0000 (18:12 -0500)]
winsys/amdgpu: fix a buffer leak in amdgpu_bo_from_handle
Cc: 18.2 18.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit
82aa07f81fcc5ed696eea16f48cec7e39c3cd3d1)
Eric Engestrom [Thu, 22 Nov 2018 13:33:28 +0000 (13:33 +0000)]
glapi: add missing visibility args
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108829
Fixes:
3218056e0eb375eeda470 "meson: Build i965 and dri stack"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
896c59d690e38e92682f9bc509b5e3658aba5670)
Jason Ekstrand [Wed, 21 Nov 2018 23:15:37 +0000 (17:15 -0600)]
anv: Put robust buffer access in the pipeline hash
It affects apply_pipeline_layout. Shaders compiled with the wrong value
will work but they may not be robust as requested by the app.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit
617e402b3d1be185f200b1667540096d9a8b2aec)
Emil Velikov [Thu, 22 Nov 2018 12:58:48 +0000 (12:58 +0000)]
Update version to 18.3.0-rc4
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Gert Wollny [Fri, 16 Nov 2018 11:48:08 +0000 (12:48 +0100)]
r600: clean up the GS ring buffers when the context is destroyed
This fixes two memory leaks reported by ASAN:
Direct leak of 248 byte(s) in 1 object(s) allocated from:
in malloc (/usr/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/libasan.so+0xdb880)
in r600_alloc_buffer_struct ../../samba/mesa/src/gallium/drivers/r600/r600_buffer_common.c:578
in r600_buffer_create ../../samba/mesa/src/gallium/drivers/r600/r600_buffer_common.c:600
in r600_resource_create_common ../../samba/mesa/src/gallium/drivers/r600/r600_pipe_common.c:1265
in r600_resource_create ../../samba/mesa/src/gallium/drivers/r600/r600_pipe.c:725
in pipe_buffer_create ../../samba/mesa/src/gallium/auxiliary/util/u_inlines.h:291
in update_gs_block_state ../../samba/mesa/src/gallium/drivers/r600/r600_state_common.c:1482
Direct leak of 248 byte(s) in 1 object(s) allocated from:
in malloc (/usr/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/libasan.so+0xdb880)
in r600_alloc_buffer_struct ../../samba/mesa/src/gallium/drivers/r600/r600_buffer_common.c:578
in r600_buffer_create ../../samba/mesa/src/gallium/drivers/r600/r600_buffer_common.c:600
in r600_resource_create_common ../../samba/mesa/src/gallium/drivers/r600/r600_pipe_common.c:1265
in r600_resource_create ../../samba/mesa/src/gallium/drivers/r600/r600_pipe.c:722
in pipe_buffer_create ../../samba/mesa/src/gallium/auxiliary/util/u_inlines.h:291
in update_gs_block_state ../../samba/mesa/src/gallium/drivers/r600/r600_state_common.c:1489
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Fixes:
1371d65a7fbd695d3516861fe733685569d890d0
r600g: initial support for geometry shaders on evergreen (v2)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
(cherry picked from commit
61b535437e2ea1115d6915fbd62d9b8745071525)
Marek Olšák [Tue, 13 Nov 2018 21:19:42 +0000 (16:19 -0500)]
radeonsi: go back to using bottom-of-pipe for beginning of TIME_ELAPSED
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102597
Cc: 18.3 <mesa-stable@lists.freedesktop.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit
ea9f95e2a67eca90bb84eea24e7b4b804b3b1345)
Andrii Simiklit [Mon, 5 Nov 2018 07:48:26 +0000 (09:48 +0200)]
i965/batch: avoid reverting batch buffer if saved state is an empty
There's no point reverting to the last saved point if that save point is
the empty batch, we will just repeat ourselves.
v2: Merge with new commits, changes was minimized, added the 'fixes' tag
v3: Added in to patch series
v4: Fixed the regression which was introduced by this patch
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108630
Reported-by: Mark Janes <mark.a.janes@intel.com>
The solution provided by: Jordan Justen <jordan.l.justen@intel.com>
CC: Chris Wilson <chris@chris-wilson.co.uk>
Fixes:
3faf56ffbdeb "intel: Add an interface for saving/restoring
the batchbuffer state."
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107626
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108630 (fixed in v4)
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
b787dcf57b7298868ce9b6885a827d57a6127ba1)
Emil Velikov [Fri, 7 Sep 2018 13:58:56 +0000 (14:58 +0100)]
travis: adding missing x11-xcb for meson+vulkan
Required by the x11 WSI
Fixes:
df82012b2cb ("travis: add meson build for vulkan drivers.")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
(cherry picked from commit
982e012b3ac924dab56b41c5407f722bd2a4c359)
Emil Velikov [Fri, 16 Nov 2018 11:15:37 +0000 (11:15 +0000)]
glx: make xf86vidmode mandatory for direct rendering
Currently we detect the module and if missing, the glXGetMsc* API is
effectively a stub, always returning false.
This is what effectively has been happening with our meson build :-(
Thus users have no chance of using it - they cannot even distinguish
if the failure is due to a misconfigured build.
There's no reason for keeping xf86vidmode optional - it has been
available in all distributions for years.
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Fixes:
a47c525f3281a2753180e "meson: build glx"
(cherry picked from commit
5bc509363b6dbc42af72668fe500b6aec988dbf0)
Emil Velikov [Fri, 16 Nov 2018 11:10:57 +0000 (11:10 +0000)]
travis: drop unneeded x11proto-xf86vidmode-dev
The only place where the package is needed is for building the DRI
based libGL library.
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit
84445a86d192c0d7f07bc25a84080458de764149)
Nicolai Hähnle [Fri, 16 Nov 2018 16:20:26 +0000 (17:20 +0100)]
radeonsi: fix an out-of-bounds read reported by ASAN
We read 4 values out of sample_locs_8x, so make sure the array is
big enough.
Fixes:
ac76aeef20 ("radeonsi: switch back to standard DX sample positions")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit
46a59ce0262a44d6520787741085a716c99200ed)
Lionel Landwerlin [Tue, 13 Nov 2018 14:10:45 +0000 (14:10 +0000)]
egl/dri: fix error value with unknown drm format
According to the EGL_EXT_image_dma_buf_import spec, creating an EGL
image with a DRM format not supported should yield the BAD_MATCH
error :
"
* If <target> is EGL_LINUX_DMA_BUF_EXT, and the EGL_LINUX_DRM_FOURCC_EXT
attribute is set to a format not supported by the EGL, EGL_BAD_MATCH
is generated.
"
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
20de7f9f226401 ("egl/dri2: support for creating images out of dma buffers")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
(cherry picked from commit
1c56d211563300e8b837378962dd455d45d7956e)
Emil Velikov [Fri, 16 Nov 2018 11:58:55 +0000 (11:58 +0000)]
Update version to 18.3.0-rc3
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Connor Abbott [Wed, 17 Oct 2018 14:57:01 +0000 (16:57 +0200)]
Revert "radv: disable VK_SUBGROUP_FEATURE_VOTE_BIT"
This reverts commit
647c2b90e96a9ab8571baf958a7c67c1e816911a. There was
one recently-introduced bug in ac for dvec3 loads, but the other test
failures were actually bugs in the tests. See
https://github.com/KhronosGroup/VK-GL-CTS/commit/
9429e621c48848d224e35f30a1ae45a4a079922c
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit
ba94a00c7ce1514372bfe9b35c8e0c7fb8cd710e)
Eric Anholt [Thu, 25 Oct 2018 16:12:50 +0000 (09:12 -0700)]
vc4: Make sure we make ro scanout resources for create_with_modifiers.
The DRI3 create_with_modifiers paths don't set tmpl.bind to SCANOUT or
SHARED, with the theory that given that you've got modifiers, that's all
you need. However, we were looking at the tmpl.bind for setting up the
KMS handle in the renderonly case, so we'd end up trying to use vc4's
handle on the hx8357d fd.
Fixes:
84ed8b67c56b ("vc4: Set shareable BOs as T tiled if possible")
(cherry picked from commit
cc0bc76a382f908b4412ee8ab7a8409766ecf16a)
Danylo Piliaiev [Thu, 15 Nov 2018 10:03:31 +0000 (12:03 +0200)]
i965: Fix calculation of layers array length for isl_view
Handle all cases in calculation of layers count for isl_view
taking into account texture view and image unit.
st_convert_image was taken as a reference.
When u->Layered is true the whole level is taken with respect to
image view. In other case only one layer is taken.
v3: (Józef Kucia and Ilia Mirkin)
- Rewrote patch by taking st_convert_image as a reference
- Removed now unused get_image_num_layers function
- Changed commit message
v4: (Jason Ekstrand)
- Added assert
Fixes:
5a8c8903
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107856
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit
f9fd0cf4790cb2a530e75d1a2206dbb9d8af7cb2)
Jason Ekstrand [Tue, 13 Nov 2018 19:24:34 +0000 (13:24 -0600)]
nir/lower_alu_to_scalar: Don't try to lower unpack_32_2x16
It messes up when trying to lower.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
(cherry picked from commit
4266932c0b301005dcc747fb6c2fef36a3af6ffe)
Eric Engestrom [Wed, 14 Nov 2018 12:51:38 +0000 (12:51 +0000)]
egl: add missing glvnd entrypoint for EGL_ANDROID_blob_cache
Fixes dEQP-EGL.functional.get_proc_address.extension.egl_android_blob_cache
on builds with glvnd enabled.
Fixes:
6f5b57093b3462a54e9c7 "egl: add support for EGL_ANDROID_blob_cache"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
c9733649670243a1a6eb7ca2c376bd27960f8d8a)
Squashed with commit:
egl: fix bad rebase
I screwed up a rebase over a refactor and didn't notice locally because
the uncommitted refactor hid the issue.
Fixes:
c9733649670243a1a6eb "egl: add missing glvnd entrypoint for EGL_ANDROID_blob_cache"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit
2b2f790e594cde3aa0d4dcebafc9a072651cd62a)
Marek Olšák [Tue, 13 Nov 2018 23:37:39 +0000 (18:37 -0500)]
radeonsi: fix video APIs on Raven2
This was missed when I added the new enum.
Cc: 18.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Leo Liu <leo.liu@amd.com>
(cherry picked from commit
9367514524f70faad99c721bac92339c8ff8bad9)
Emil Velikov [Wed, 14 Nov 2018 18:49:54 +0000 (18:49 +0000)]
bin/get-pick-list.sh: handle reverts prior to the branchpoint
Currently we detect when a breaking commit:
- has landed in stable, and
- is referenced by a untagged fix in master
Yet we did not consider the case of breaking commit:
- prior to the branchpoint, and
- is referenced by a untagged fix in master
Addressing the latter is extremely slow, due to the size of the lookup.
That said, we can trivially use the existing is_sha_nomination() helper
to catch reverts.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
adbdfc6666052d604a97009d736b6dee957908a0)
Emil Velikov [Thu, 8 Nov 2018 15:05:21 +0000 (15:05 +0000)]
bin/get-pick-list.sh: use test instead of [ ]
Latter is rather picky wrt surrounding white space. The explicit `test`
doesn't have that problem, plus the statements read a bit easier.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
c0012a07088e86f6d30405d0522a0d72801e2ec7)
Emil Velikov [Thu, 8 Nov 2018 15:05:20 +0000 (15:05 +0000)]
bin/get-pick-list.sh: handle unofficial "broken by" tag
We have a number of cases were devs will use a tag "broken by".
While it's not something officially documented or recommended, checking
for it is trivial enough.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
77ff0bfb5f915bb841623ec181ee359a099f2c52)