Bas Nieuwenhuizen [Fri, 17 Mar 2017 00:25:00 +0000 (01:25 +0100)]
ac/debug: Support multiple trace ids for nested IBs.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Fri, 17 Mar 2017 00:04:03 +0000 (01:04 +0100)]
radv/amdgpu: Enable dumping of all IBs with RADV_DEBUG=allbos.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Emil Velikov [Sun, 27 Aug 2017 10:20:35 +0000 (11:20 +0100)]
egl/wayland: make sure HAS_$FORMAT is set for wl_dmabuf
Otherwise eglCreateWaylandBufferFromImageWL will fail, since we
have no "supported" format.
Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Emil Velikov [Sun, 27 Aug 2017 10:20:34 +0000 (11:20 +0100)]
egl/wayland: group wl_win specific code together
Make the code a bit easier to follow. There should be no functional
change since none of the bits set are accessible until the
eglCreateWindowSurface call is complete.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Emil Velikov [Sun, 27 Aug 2017 10:20:33 +0000 (11:20 +0100)]
egl/wayland: remove dri2_surf width/height double init.
The dimensions are already set [to 0 or the value provided by the
attributes list] by the _eglInitSurface() call further up.
The values are updated, as the DRI driver calls the DRI2/IMAGE_LOADER'
get_buffers, shortly before making use of the values.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Emil Velikov [Sun, 27 Aug 2017 10:20:32 +0000 (11:20 +0100)]
egl/wayland: set correct format with wl_dmabuf as wl_drm is missing
For most/all cases today, we have wl_drm available alongside wl_dmabuf.
Yet in the long run, we want to make sure the latter can operate without
any traces of the former.
Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Emil Velikov [Sun, 27 Aug 2017 10:20:30 +0000 (11:20 +0100)]
egl/wayland: update comment to reflect wl_dmabuf presence
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Emil Velikov [Sun, 27 Aug 2017 10:20:28 +0000 (11:20 +0100)]
egl/wayland: polish object teardown in dri2_wl_destroy_surface
The wl_drm wrapper is created before the wl display/surface ones.
Thus make sure we destroy it after them. In reality it should not make
any difference either way.
Fixes: 03dd9a88b0b ("egl/wayland: Use per-surface event queues")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Emil Velikov [Sun, 27 Aug 2017 10:20:27 +0000 (11:20 +0100)]
egl/wayland: plug leaks in dri2_wl_create_window_surface() error path
We forgot to teardown the wl display/surface wrappers.
Fixes: 03dd9a88b0b ("egl/wayland: Use per-surface event queues")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Emil Velikov [Sun, 27 Aug 2017 10:20:26 +0000 (11:20 +0100)]
egl: simplify refcounting after screen creation
If the specific initialize was successfull, dri2_egl_display() will
return a non NULL pointer. Thus we can drop the check and flatten the
codeflow.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Emil Velikov [Sat, 26 Aug 2017 01:37:11 +0000 (02:37 +0100)]
util: move string_to_uint_map to glsl
The functionality is used by glsl and mesa. With the latter already
depending on the former.
With this in place the src/util/ static library libmesautil.la no longer
has a C++ dependency. Thus objects which use it (like libEGL) don't need
the C++ link.
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101851
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Tested-by: James Harvey <lothmordor@gmail.com>
Marek Olšák [Mon, 28 Aug 2017 21:28:33 +0000 (23:28 +0200)]
st/mesa: fix XPD lowering - don't read dst
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102461
Reviewed-by: Brian Paul <brianp@vmware.com>
Jason Ekstrand [Tue, 8 Aug 2017 22:17:31 +0000 (15:17 -0700)]
anv: Add support for the SYNC_FD handle type for fences
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Tue, 8 Aug 2017 19:25:38 +0000 (12:25 -0700)]
anv: Implement VK_KHR_external_fence
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Fri, 4 Aug 2017 20:08:35 +0000 (13:08 -0700)]
anv: Use DRM sync objects to back fences whenever possible
In order to implement VK_KHR_external_fence, we need to back our fences
with something that's shareable. Since the kernel wait interface for
sync objects already supports waiting for multiple fences in one go, it
makes anv_WaitForFences much simpler if we only have one type of fence.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Tue, 8 Aug 2017 19:23:37 +0000 (12:23 -0700)]
anv/gem: Add support for syncobj wait and reset
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Fri, 25 Aug 2017 18:35:27 +0000 (11:35 -0700)]
anv/gem: Add a flags parameter to syncobj_create
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Fri, 4 Aug 2017 19:52:46 +0000 (12:52 -0700)]
drm-uapi: Update headers from drm-next
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Tue, 8 Aug 2017 19:25:26 +0000 (12:25 -0700)]
vulkan/util: Add a vk_zalloc helper
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Fri, 4 Aug 2017 19:59:45 +0000 (12:59 -0700)]
anv: Rename anv_fence_state to anv_bo_fence_state
It only applies to legacy BO fences.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Thu, 3 Aug 2017 21:19:44 +0000 (14:19 -0700)]
anv: Pull the guts of anv_fence into anv_fence_impl
This is just a refactor, similar to what we did for semaphores, in
preparation for handling VK_KHR_external_fence.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Thu, 3 Aug 2017 21:18:19 +0000 (14:18 -0700)]
anv/wsi: Use QueueSubmit to trigger the fence in AcquireNextImage
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Thu, 3 Aug 2017 18:46:09 +0000 (11:46 -0700)]
anv: Rework fences to work more like BO semaphores
This commit changes fences to work a bit more like BO semaphores.
Instead of the fence being a batch, it's simply a BO that gets added
to the validation list for the last execbuf call in the QueueSubmit
operation. It's a bit annoying finding the last submit in the execbuf
but this allows us to avoid the dummy execbuf.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Fri, 25 Aug 2017 18:27:15 +0000 (11:27 -0700)]
anv/queue: Allow temporary import of SYNC_FD semaphores
We didn't allow them before because it didn't look like the spec allowed
it. It certainly doesn't make much sense. However, there are CTS tests
that apparently hit this. What the spec actually says is:
"Importing a payload using handle types with copy transference
creates a duplicate copy of the payload at the time of import, but
makes no further reference to it. Fence signaling, waiting, and
resetting operations performed on the target of copy imports must
not affect any other fence or payload."
A SYNC_FD has copy transference but the import may be temporary or
permanent. If you do a permanent import of something with copy
transference, I guess it's supposed to work and end up resetting the
permanent state. In any case, there seems to be no real harm in
allowing it, so why not.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Kenneth Graunke [Tue, 29 Aug 2017 00:07:57 +0000 (17:07 -0700)]
i965: Fix whitespace issues in intel_buffer_objects.c.
Convert tabs to spaces and rewrap one long line.
Timothy Arceri [Mon, 28 Aug 2017 05:02:49 +0000 (15:02 +1000)]
radeonsi: stop leaking nir
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Grazvydas Ignotas [Mon, 28 Aug 2017 22:36:57 +0000 (01:36 +0300)]
ac/nir: remove misleading condition
location is never set to INTERP_SAMPLE, and Nicolai comments:
"... that part is misleading. location refers to the base location, not
the final location of the sample, and it can never be INTERP_SAMPLE."
Suggested-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Grazvydas Ignotas [Sun, 27 Aug 2017 19:54:56 +0000 (22:54 +0300)]
ac/nir: silence maybe-uninitialized warnings
These are likely false positives, but are also annoying because they
show up on every "make install", which causes ac_nir_to_llvm to be
rebuilt here. Initializing those variables to NULL should be harmless
even when unnecessary.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Grazvydas Ignotas [Sun, 27 Aug 2017 23:01:21 +0000 (02:01 +0300)]
radv: clear dynamic_shader_stages on create
Valgrind reports it's being used uninitialized.
Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Grazvydas Ignotas [Sun, 27 Aug 2017 21:21:41 +0000 (00:21 +0300)]
amd: add .editorconfig
amd/common/ and amd/vulkan/ are using tabs for indent, which doesn't
match the settings in root .editorconfig, so let's override.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Thu, 24 Aug 2017 23:48:50 +0000 (01:48 +0200)]
radeonsi: rewrite late alloc VS limit computation
This is still very simple, but it's better than before.
Loosely ported from Vulkan.
Marek Olšák [Thu, 24 Aug 2017 21:46:46 +0000 (23:46 +0200)]
gallium/radeon: set EVENT_WRITE_EOP.INT_SEL = wait for write confirmation
Ported from Vulkan.
Not sure what this is good for.. maybe write confirmation from L2 flushes?
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Fri, 25 Aug 2017 13:39:52 +0000 (15:39 +0200)]
gallium/u_threaded: rename IGNORE_VALID_RANGE -> NO_INFER_UNSYNCHRONIZED
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Fri, 25 Aug 2017 13:34:17 +0000 (15:34 +0200)]
gallium/u_threaded: disallow discard_range if map_buffer is unsynchronized
The discard range codepath takes precedence, so if we get both
unsynchronized and discard_range, choose unsynchronized.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Jason Ekstrand [Mon, 21 Aug 2017 23:05:20 +0000 (16:05 -0700)]
nir: Fix system_value_from_intrinsic for subgroups
A couple of the cases were backwards
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Jason Ekstrand [Mon, 21 Aug 2017 23:04:53 +0000 (16:04 -0700)]
nir: Fix some whatespace
Somehow tabs got in there...
Reviewed-by: Matt Turner <mattst88@gmail.com>
Marek Olšák [Wed, 23 Aug 2017 11:47:13 +0000 (13:47 +0200)]
radeonsi: correct maximum wave count per SIMD
v2: don't special-case Tonga and Iceland.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Andres Gomez [Mon, 28 Aug 2017 13:31:13 +0000 (16:31 +0300)]
docs: update calendar, add news item and link release notes for 17.1.8
Signed-off-by: Andres Gomez <agomez@igalia.com>
Andres Gomez [Mon, 28 Aug 2017 13:27:22 +0000 (16:27 +0300)]
docs: add sha256 checksums for 17.1.8
Signed-off-by: Andres Gomez <agomez@igalia.com>
(cherry picked from commit
44e008e85efe141087d8ebe52e273e0020029481)
Andres Gomez [Mon, 28 Aug 2017 13:17:02 +0000 (16:17 +0300)]
docs: add release notes for 17.1.8
Signed-off-by: Andres Gomez <agomez@igalia.com>
(cherry picked from commit
e644f9996b36598e4b24a359343096886b2333d0)
Ilia Mirkin [Sun, 27 Aug 2017 04:41:05 +0000 (00:41 -0400)]
st/mesa: fix handling of vertex array double inputs
The is_double_vertex_input needs to be set for arrays of doubles as
well.
Fixes KHR-GL45.enhanced_layouts.varying_array_locations
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
Ilia Mirkin [Sun, 27 Aug 2017 04:09:31 +0000 (00:09 -0400)]
glsl: fix counting of vertex shader output slots used by explicit vars
The argument to count_attribute_slots should only be set to true for
vertex inputs, not for all vertex shader varyings.
Fixes KHR-GL45.enhanced_layouts.varying_locations
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: mesa-stable@lists.freedesktop.org
Topi Pohjolainen [Fri, 25 Aug 2017 18:32:27 +0000 (21:32 +0300)]
intel/compiler: Cast reg types explicitly
Makes coverity happier.
CID:
1416799
Fixes: c1ac1a3d25 (i965: Add a brw_hw_type_to_reg_type() function)
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Gwan-gyeong Mun [Wed, 23 Aug 2017 16:54:18 +0000 (01:54 +0900)]
gallium/docs: Fix an inequality sign of TGSI_SEMANTIC_SUBGROUP_LT_MASK
A previous expression presents same as TGSI_SEMANTIC_SUBGROUP_GT_MASK.
It fixes a direction of an inequality for TGSI_SEMANTIC_SUBGROUP_LT_MASK.
before:
bit index > TGSI_SEMANTIC_SUBGROUP_INVOCATION
after:
bit index < TGSI_SEMANTIC_SUBGROUP_INVOCATION
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Fri, 25 Aug 2017 14:29:48 +0000 (16:29 +0200)]
radv: propagate VK_ERROR_OUT_OF_HOST_MEMORY to vk{Begin,End}CommandBuffer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Fri, 25 Aug 2017 14:10:30 +0000 (16:10 +0200)]
radv: rename record_fail to record_result and use VkResult
This will allow to propagate VK_ERROR_OUT_OF_HOST_MEMORY to
vkEndCommandBuffer() when necessary.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Gwan-gyeong Mun [Sat, 26 Aug 2017 08:39:04 +0000 (17:39 +0900)]
gallium/docs: fix a typo
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Eduardo Lima Mitev [Fri, 25 Aug 2017 06:55:04 +0000 (08:55 +0200)]
i915g: Remove a few unused variables
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Timothy Arceri [Fri, 25 Aug 2017 04:04:19 +0000 (14:04 +1000)]
disk_cache: assert if a cache entries keys don't match mesa
In
ef42423e7be9 I enabled the check for release builds however we
still want to assert in debug builds in case of collisions or
just general bugs with the key building/compare code. Otherwise
it will just fail silently effectively disabling the cache.
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Marek Olšák [Sun, 27 Aug 2017 20:27:01 +0000 (22:27 +0200)]
Revert "radeonsi: get the raster config from AMDGPU on SI"
This reverts commit
fc99cb3c9edee3af773700cf7ebdc60dc02fcaba.
"The performance went down from 64.7 to 51.4 fps in Valley and from 30.8 to
25.1 fps in Heaven on Radeon HD 7970. Other games seem to have also a 10-25%
performance decrease."
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102429
It looks like we can't use the raster config values from the kernel.
Dave Airlie [Tue, 15 Aug 2017 05:35:52 +0000 (15:35 +1000)]
radv/wsi: Compute correct row_pitch for GFX9.
(commit split out by Bas Nieuwenhuizen)
Fixes: 65477bae9cf "radv: enable GFX9 on radv"
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Christian Gmeiner [Fri, 25 Aug 2017 11:39:05 +0000 (13:39 +0200)]
etnaviv: use correct param for etna_compatible_rs_format(..)
Found by code inspection.
Fixes: c9e8b49b885 ("etnaviv: gallium driver for Vivante GPUs")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Mon, 7 Aug 2017 16:23:19 +0000 (17:23 +0100)]
egl: don't NULL deref the .get_capabilities function pointer
One could easily introduce version 3 of the DRI2fenceExtension,
extending the struct, while not implementing the above function.
Thus we'll end up with NULL pointer, and dereferencing it won't fare
too well.
Fixes: 0201f01dc4e ("egl: add EGL_ANDROID_native_fence_sync")
Cc: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Emil Velikov [Tue, 22 Aug 2017 10:39:37 +0000 (11:39 +0100)]
mapi/gen: remove shebang from the marshal generator scripts
The scripts are invoked with the correct version of python and are
missing the execute bit.
Follow the rest of Mesa and drop the shebang line.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Emil Velikov [Tue, 22 Aug 2017 10:39:36 +0000 (11:39 +0100)]
dri_interface.h: add missing stdint.h include
Required for uint32_t and friends.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Emil Velikov [Tue, 22 Aug 2017 10:39:35 +0000 (11:39 +0100)]
xmlconfig: use the portable __VA_ARGS__
Follow the example used through mesa and use "..." + "__VA_ARGS__".
The former tends to be more common and portable.
v2: use ##__VA_ARGS__ (Eric)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Brian Paul [Thu, 24 Aug 2017 16:40:28 +0000 (10:40 -0600)]
gallium/vbuf: fix buffer reference bugs
In two places we called pipe_resource_reference() to remove a reference
to a vertex buffer resource. But we neglected to check if the buffer was
a user buffer and not a pipe_resource. This caused us to pass an invalid
pipe_resource pointer to pipe_resource_reference().
Instead of calling pipe_resource_reference(&vbuf->resource, NULL), use
pipe_vertex_buffer_unreference(&vbuf) which checks the is_user_buffer
field and does the right thing.
Also, explicity set the is_user_buffer field to false after setting the
vbuf->resource pointer to out_buffer.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102377
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Bruce Cherniak <bruce.cherniak@intel.com>
Andres Gomez [Fri, 25 Aug 2017 11:40:26 +0000 (14:40 +0300)]
docs: add an additional final cycle for 17.1
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Andres Gomez [Fri, 25 Aug 2017 11:40:25 +0000 (14:40 +0300)]
docs: remove released and extend the calendar until the end of 2017
Completed the 17.2 cycle and added the beginning of the 17.3 one.
v2: Add 17.2-rc6 as tentative final version to be promoted to 17.2.0
final (Eric).
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Bas Nieuwenhuizen [Fri, 25 Aug 2017 20:18:24 +0000 (22:18 +0200)]
radv: Fix sparse BO mapping merging.
If we merge a mapping with the mapping before it, we also need
to not only change the offset, but also the bo offset.
Fixes: 715df30a4e2 "radv/amdgpu: Add winsys implementation of virtual buffers."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Fri, 25 Aug 2017 12:14:12 +0000 (14:14 +0200)]
radv: Fix off by one in MAX_VBS assert.
e.g. 0 + 32 <= 32 should be valid.
Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Thu, 24 Aug 2017 22:29:03 +0000 (00:29 +0200)]
radv: Don't set a new subpass on compute resolve.
We don't use the render path so totally unneeded.
Fixes: 19be95f71e6 "radv: add subpass resolve compute path"
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Thu, 24 Aug 2017 22:26:44 +0000 (00:26 +0200)]
radv: Remove some intel comments from the resolve code.
These are clearly not applicable to radv.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Adam Jackson [Thu, 24 Aug 2017 18:52:14 +0000 (14:52 -0400)]
egl/drm: Don't "fall back" to /dev/dri/card0 if the first open fails
The snprintf stuff here already constructs the right name for the device
node, and if it doesn't, you configured Mesa wrong, don't do that.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Kenneth Graunke [Thu, 24 Aug 2017 07:25:21 +0000 (00:25 -0700)]
i965: Use GEN_GEN and GEN_IS_HASWELL in genX_state_upload.c code.
We were using brw->gen, brw->is_haswell, and devinfo->gen in a few
places, when we could just use GEN_GEN and GEN_IS_HASWELL, which are
evaluated at compile time.
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Rafael Antognolli [Wed, 23 Aug 2017 21:13:05 +0000 (14:13 -0700)]
i965: Do not store SRC after 0 on component control.
The PRM SKL-Vol 2b-05.16 says:
"Within a VERTEX_ELEMENT_STATE structure, if a Component Control
field is set to something other than VFCOMP_STORE_SRC, no
higher-numbered Component Control fields may be set to
VFCOMP_STORE_SRC. In other words, only trailing components can be set
to something other than VFCOMP_STORE_SRC."
Since we set the component 1 to VFCOMP_STORE_0 on gen8+, and
VFCOMP_STORE_IID on gen5+, and we are not using components 2 and 3,
let's also set them to VFCOMP_STORE_0.
Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Adam Jackson [Thu, 24 Aug 2017 21:00:43 +0000 (17:00 -0400)]
mesa: Implement GL_ARB_polygon_offset_clamp
Semantically identical to the EXT version (whose string is still valid
for GLES), so rename the bit but expose both extension strings.
(Suggested by Ilia Mirkin and Ian Romanick.)
v3: Fix the entrypoint alias in GL4x.xml (Ilia)
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Adam Jackson [Thu, 24 Aug 2017 18:40:32 +0000 (14:40 -0400)]
mesa: Implement GL_ARB_texture_filter_anisotropic
The only difference from the EXT version is bumping the minmax to 16, so
just hit all the drivers at once.
v2: Fix driver names, add to 17.3 release notes (Ilia Mirkin)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Fri, 25 Aug 2017 13:34:00 +0000 (15:34 +0200)]
gallium/u_threaded: fix a typo
Eric Engestrom [Thu, 24 Aug 2017 12:31:09 +0000 (13:31 +0100)]
khronos/egl: remove dependency on Android NDK header
Khronos: https://github.com/KhronosGroup/EGL-Registry/pull/22
Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Eric Engestrom [Fri, 25 Aug 2017 13:03:48 +0000 (14:03 +0100)]
Revert "egl/android: add missing include"
This reverts commit
688d866eca8943f09cd846ffb045e18f6ec0677c.
The include I added in
688d866eca isn't actually useful, as it only
declares the opaque struct ANativeWindow.
However, this caused build issues for android-x86 [1] due to the header
being moved in Android O.
[1] https://lists.freedesktop.org/archives/mesa-dev/2017-August/167626.html
Fixes: 688d866eca8943f09cd8 "egl/android: add missing include"
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Samuel Pitoiset [Thu, 24 Aug 2017 09:36:45 +0000 (11:36 +0200)]
mesa: add KHR_no_error support to glBindBufferOffsetEXT()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 09:34:38 +0000 (11:34 +0200)]
mesa: add bind_buffer_offset() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 12:50:11 +0000 (14:50 +0200)]
mesa: add KHR_no_error support to glTransformFeedbackVaryings()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 12:47:15 +0000 (14:47 +0200)]
mesa: add transform_feedback_varyings() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 10:10:57 +0000 (12:10 +0200)]
mesa: add KHR_no_error support to glResumeTransformFeedback()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 10:09:23 +0000 (12:09 +0200)]
mesa: add resume_transform_feedback() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 10:06:26 +0000 (12:06 +0200)]
mesa: add KHR_no_error support to glPauseTransformFeedback()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 10:29:50 +0000 (12:29 +0200)]
mesa: add pause_transform_feedback() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 10:02:40 +0000 (12:02 +0200)]
mesa: add KHR_no_error support to glEndTransformFeedback()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 10:01:27 +0000 (12:01 +0200)]
mesa: add end_transform_feedback() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 09:57:55 +0000 (11:57 +0200)]
mesa: add KHR_no_error support to glBeginTransformFeedback()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 09:55:44 +0000 (11:55 +0200)]
mesa: add begin_transform_feedback() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 09:41:15 +0000 (11:41 +0200)]
mesa: add KHR_no_error support to glBindTransformFeedback()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 09:39:59 +0000 (11:39 +0200)]
mesa: add bind_transform_feedback() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 13:53:34 +0000 (15:53 +0200)]
mesa: port the LastLookedUpVAO optimisation to _mesa_lookup_vao()
It was only used in the errors path.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 11:44:21 +0000 (13:44 +0200)]
mesa: don't error check the default buffer object in glBindBufferOffsetEXT()
An allocation check is already done when the buffer is created at
context creation.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 11:43:21 +0000 (13:43 +0200)]
mesa: add _fallback suffix to the default transform feedback functions
In preparation for KHR_no_error support.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 11:43:20 +0000 (13:43 +0200)]
mesa: remove unnecessary check in _mesa_init_transform_feedback_object()
All callers already check that, and the common behaviour is to
check in the _mesa_new_XXX() helpers anyway.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 11:43:19 +0000 (13:43 +0200)]
mesa: check allocation failures in new_transform_feedback()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Samuel Pitoiset [Thu, 24 Aug 2017 11:43:18 +0000 (13:43 +0200)]
mesa: remove unused _mesa_validate_transform_feedback_buffers()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Kai Chen [Mon, 7 Aug 2017 15:34:51 +0000 (08:34 -0700)]
egl/wayland: Use roundtrips when awaiting buffer release
In get_back_bo, we use wl_display_dispatch_queue() to block and wait for
a buffer release event. However, not all Wayland compositors flush the
client socket on posting a buffer-release event, so by only blocking
client-side, we may block indefinitely, or at least need to wait for an
input event / frame completion to arrive for the compositor to flush.
We now use dispatch_queue as a first pass, but if our entire buffer pool
is exhausted, use a roundtrip (an immediately-triggered wl_callback) to
ensure that the compositor flushes out our release event immediately.
[daniels: Modified comment and commit message.]
Signed-off-by: Kai Chen <kai.chen@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
CC: <mesa-stable@lists.freedesktop.org>
Nicolai Hähnle [Thu, 24 Aug 2017 13:41:08 +0000 (15:41 +0200)]
glsl: fix glsl_struct_field size calculations for shader cache
Found by address sanitizer:
==22621==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61400000cbd8 at pc 0x7f561610a4ff bp 0x7ffca85f9d50 sp 0x7ffca85f94f8
READ of size 344 at 0x61400000cbd8 thread T0
#0 0x7f561610a4fe (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x5f4fe)
#1 0x7f560bb305a5 in memcpy /usr/include/x86_64-linux-gnu/bits/string3.h:53
#2 0x7f560bb305a5 in blob_write_bytes ../../../mesa-src/src/compiler/glsl/blob.c:136
#3 0x7f560be7d7ff in encode_type_to_blob ../../../mesa-src/src/compiler/glsl/shader_cache.cpp:153
#4 0x7f560be81222 in write_program_resource_data ../../../mesa-src/src/compiler/glsl/shader_cache.cpp:950
#5 0x7f560be81222 in write_program_resource_list ../../../mesa-src/src/compiler/glsl/shader_cache.cpp:1118
#6 0x7f560be81222 in shader_cache_write_program_metadata(gl_context*, gl_shader_program*) ../../../mesa-src/src/compiler/glsl/shader_cache.cpp:1407
#7 0x7f560b825fdb in link_program ../../../mesa-src/src/mesa/main/shaderapi.c:1163
Fixes: 073a84ff60db ("glsl: stop adding pointers from glsl_struct_field to the cache")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Ilia Mirkin [Fri, 25 Aug 2017 04:13:32 +0000 (00:13 -0400)]
a2xx: fix DST_ALPHA blending for non-alpha formats
If we're rendering to a format without alpha, convert DST_ALPHA blend to
a ONE so that factors are properly computed. This same workaround is
done on a3xx+ as well.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Ilia Mirkin [Fri, 25 Aug 2017 04:03:46 +0000 (00:03 -0400)]
a2xx: set constant blend color
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Timothy Arceri [Thu, 24 Aug 2017 12:46:57 +0000 (22:46 +1000)]
radeonsi: set IF_THRESHOLD to 4
In
74e39de9324d it was set to 3 and it was reported that 4 caused
tesseract to start spilling VGPRs. This no longer seems to be the
case.
Totals:
SGPRS:
2787844 ->
2787764 (-0.00 %)
VGPRS:
1713121 ->
1712717 (-0.02 %)
Spilled SGPRs: 7532 -> 7532 (0.00 %)
Spilled VGPRs: 49 -> 33 (-32.65 %)
Private memory VGPRs: 2060 -> 2060 (0.00 %)
Scratch size: 2200 -> 2180 (-0.91 %) dwords per thread
Code Size:
79265520 ->
79248360 (-0.02 %) bytes
LDS: 436 -> 436 (0.00 %) blocks
Max Waves: 670535 -> 670608 (0.01 %)
Wait states: 0 -> 0 (0.00 %)
Before:
VGPR SPILLING APPS Shaders SpillVGPR PrivVGPR ScratchSize
EffectsCaveDemo 301 0 256 264
ReflectionsSubwayDemo 264 0 256 264
VehicleGame 295 0 128 132
bioshock-infinite 1140 0 448 516
dirt-showdown 453 33 0 28
gang-beasts 364 0 500 496
kerbal-space-program 1228 0 472 480
tomb-raider-ultra 1199 16 0 20
After:
VGPR SPILLING APPS Shaders SpillVGPR PrivVGPR ScratchSize
EffectsCaveDemo 301 0 256 264
ReflectionsSubwayDemo 264 0 256 264
VehicleGame 295 0 128 132
bioshock-infinite 1140 0 448 516
dirt-showdown 453 33 0 28
gang-beasts 364 0 500 496
kerbal-space-program 1228 0 472 480
The only change in VGPR spills is the elimination of all spills
in Tomb Raider at Ultra settings. Closer examination shows that
the shaders go over the limit because they contain three
expressions a mul, rcp and ubo load. The ubo load is actually
used elsewhere and is therefore stored in a temp already in IR
such as tgsi but glsl ir counts it agaist the if cost.
Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Mon, 31 Jul 2017 03:00:35 +0000 (13:00 +1000)]
util/disk_cache: write cache item metadata to disk
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Timothy Arceri [Wed, 23 Aug 2017 06:33:00 +0000 (16:33 +1000)]
glsl: pass shader source keys to the disk cache
We don't actually write them to disk here. That will happen in the
following commit.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Timothy Arceri [Wed, 23 Aug 2017 06:32:59 +0000 (16:32 +1000)]
util/disk_cache: add struct cache_item_metadata
This will be used to store more information about the cache item
in it's header. This information is intended for 3rd party and
cache analysis use but can also be used for detecting the unlikely
scenario of cache collisions.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Timothy Arceri [Wed, 23 Aug 2017 06:32:58 +0000 (16:32 +1000)]
disk_cache: enable limited hash collision detection in release builds
It really doesn't cost us much and will stop strange crashes should
the stars align.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>