Rob Clark [Thu, 24 Aug 2017 13:16:53 +0000 (09:16 -0400)]
freedreno: pass context flags through to fd_context_init()
Prep work for later patch.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Brian Paul [Mon, 23 Oct 2017 21:25:24 +0000 (15:25 -0600)]
gallium/util: use util_snprintf() in u_socket_connect()
Instead of plain snprintf(). To fix the MSVC build.
snprintf() is used in various places in Mesa/gallium, but apparently,
not in code built with MSVC.
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Benjamin Gordon [Fri, 20 Oct 2017 21:34:57 +0000 (15:34 -0600)]
configure: Allow android as an EGL platform
I'm working on radeonsi support in the Chrome OS Android container
(ARC++). Mesa in ARC++ uses autotools instead of Android.mk, but all
the necessary EGL bits are there, so the existing check is too strict.
Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Marek Olšák [Wed, 4 Oct 2017 03:07:50 +0000 (05:07 +0200)]
radeonsi: postponed KILL isn't postponed anymore, but maintains WQM
This restores performance for the drirc workaround, i.e.
KILL_IF does:
visible = src0 >= 0;
kill_flag &= visible; // accumulate kills
amdgcn_kill(wqm_vote(visible)); // kill fully dead quads only
And all helper pixels are killed at the end of the shader:
amdgcn_kill(kill_flag);
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Wed, 4 Oct 2017 13:37:30 +0000 (15:37 +0200)]
radeonsi: use postponed KILL only when derivatives are used
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Wed, 4 Oct 2017 03:06:57 +0000 (05:06 +0200)]
ac: use llvm.amdgcn.kill with LLVM 6.0
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Wed, 4 Oct 2017 02:51:39 +0000 (04:51 +0200)]
ac: replace ac_build_kill with ac_build_kill_if_false
This will be a new LLVM intrinsic and will also work nicely with
llvm.amdgcn.wqm.vote.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Timothy Arceri [Mon, 23 Oct 2017 22:08:55 +0000 (09:08 +1100)]
radv: move nir print after linking is done
We now have linking optimisations so we want to delay dumping the
nir until after these are complete.
Fixes: 06f05040eb73 (radv: Link shaders)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Dave Airlie [Mon, 23 Oct 2017 00:34:54 +0000 (10:34 +1000)]
mesa/bufferobj: don't double negate the range
This fixes a regression I introduced refactoring this code,
I managed to invert range twice, I moved the inversion into
the common code, but forgot to stop doing it in the callee.
Fixes: GL45-CTS.multi_bind.dispatch_bind_buffers_base
Fixes: 35ac13ed3 (mesa/bufferobj: consolidate some codepaths between ubo/ssbo/atomics.)
Reported-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Timothy Arceri [Mon, 23 Oct 2017 00:10:47 +0000 (11:10 +1100)]
radv: clone meta shaders before linking
The IR is reused in different pipeline combinations so we need
to clone it to avoid link time optimistaions messing up the
original copy.
Fixes: 06f05040eb73 (radv: Link shaders)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Brian Paul [Tue, 17 Oct 2017 19:59:28 +0000 (13:59 -0600)]
gallium/util: don't call close() on Windows in u_tests.c
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Brian Paul [Tue, 17 Oct 2017 19:59:03 +0000 (13:59 -0600)]
mesa: use util_strdup() macro in u_debug_symbol.c
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Brian Paul [Tue, 17 Oct 2017 19:58:47 +0000 (13:58 -0600)]
mesa: use util_strdup() macro in symbol_table.c
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Brian Paul [Tue, 17 Oct 2017 19:57:45 +0000 (13:57 -0600)]
util: add util_strdup() wrapper macro
To work around MSVC warning that strdup() is a deprecated POSIX function.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Brian Paul [Tue, 17 Oct 2017 19:11:03 +0000 (13:11 -0600)]
gallium/util: replace gethostbyname() with getaddrinfo()
Compiling with MSVC options /we4995 /we4996 (a subset of /sdl) generates
a warning that the gethostbyname() function is deprecated in favor of
getaddrinfo() or GetAddrInfoW(). Replace the call with getaddrinfo().
Untested. There are no callers to u_socket_connect() in Gallium.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Alex Smith [Mon, 23 Oct 2017 09:37:42 +0000 (10:37 +0100)]
radv: Update code pointer correctly if a variant is already created
This was the actual cause of GPU hangs fixed by
0fdd531457ec ("radv:
Fix pipeline cache locking issues"), since multiple threads would end
up trying to create the variants for a single entry.
Now that we're locking around the whole of this function, this isn't
really necessary (we either create all or none of the variants), but
fix this anyway in case things change later.
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
CC: 17.3 <mesa-stable@lists.freedesktop.org>
Kenneth Graunke [Thu, 19 Oct 2017 21:38:30 +0000 (14:38 -0700)]
i965: Revert absolute mode for constant buffer pointers.
The kernel doesn't initialize the value of the INSTPM or CS_DEBUG_MODE2
registers at context initialization time. Instead, they're inherited
from whatever happened to be running on the GPU prior to first run of a
new context. So, when we started setting these, other contexts in the
system started inheriting our values. Since this controls whether
3DSTATE_CONSTANT_* takes a pointer or an offset, getting the wrong
setting is fatal for almost any process which isn't expecting this.
Unfortunately, VA-API and Beignet don't initialize this (nor does older
Mesa), so they will die horribly if we start doing this. UXA and SNA
don't use any push constants, so they are unaffected.
Until we have some kind of solution to this problem, I'm going to revert
this patch and abandon using the feature for now. It will lead to fewer
pushed UBO ranges on Broadwell+, which may lead to lower performance,
though I don't have any data on the impact.
Cc: "17.3 17.2" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102774
Dylan Baker [Fri, 20 Oct 2017 22:57:15 +0000 (15:57 -0700)]
meson: build imx driver
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Dylan Baker [Fri, 20 Oct 2017 22:45:22 +0000 (15:45 -0700)]
meson: build etnaviv driver + winsys
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Eric Anholt [Tue, 17 Oct 2017 20:46:50 +0000 (13:46 -0700)]
ac: Silence a compiler warning about results[0].
We know that num_components will be > 0, but it doesn't.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Eric Anholt [Tue, 17 Oct 2017 20:45:09 +0000 (13:45 -0700)]
ac: Fix a compiler warning for possibly undefined "name"
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Dylan Baker [Sat, 21 Oct 2017 00:34:51 +0000 (17:34 -0700)]
meson: fix egl build for meson version < 0.43
Meson 0.43 added the ability to pass nested lists to
include_directories, so the code that we have works for 0.43, but not
for 0.42. This patch changes the include_directories list to be flat so
it works with 0.42
fixes:
108d257a16859898f5c ("meson: build libEGL")
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Nicolai Hähnle [Thu, 12 Oct 2017 09:21:26 +0000 (11:21 +0200)]
amd/common/gfx9: workaround DCC corruption more conservatively
Fixes KHR-GL45.texture_swizzle.smoke and others on Vega.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102809
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Emil Velikov [Mon, 23 Oct 2017 13:30:37 +0000 (14:30 +0100)]
docs/release-calendar: update - 17.3.0-rc1 is out
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Ilia Mirkin [Sat, 21 Oct 2017 19:15:41 +0000 (15:15 -0400)]
glsl: fix derived cs variables
There are two issues with the current implementation. First, it relies
on the layout(local_size_*) happening in the same shader as the main
function, and secondly it doesn't work for variable group sizes.
In both cases, the simplest fix is to move the setup of these derived
values to a later time, similar to how the gl_VertexID workarounds are
done. There already exist system values defined for both of the derived
values, so we use them unconditionally, and lower them after linking is
performed.
While we're at it, we move to using gl_LocalGroupSizeARB instead of
gl_WorkGroupSize for variable group sizes.
Also the dead code elimination avoidance can be removed, since there
can be situations where gl_LocalGroupSizeARB is needed but has not been
inserted for the shader with main function. As a result, the lowering
code has to insert its own copies of the system values if needed.
Reported-by: Stephane Chevigny <stephane.chevigny@polymtl.ca>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103393
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Emil Velikov [Mon, 23 Oct 2017 12:07:06 +0000 (13:07 +0100)]
docs: add 17.4.0-devel release notes template
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Mon, 23 Oct 2017 12:00:43 +0000 (13:00 +0100)]
mesa: bump version to 17.4.0-devel
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Juan A. Suarez Romero [Thu, 19 Oct 2017 10:46:02 +0000 (12:46 +0200)]
radv: automake: include radv_extensions.py in the tarball
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Bas Nieuwenhuizen [Mon, 23 Oct 2017 01:27:28 +0000 (03:27 +0200)]
ac/nir: Only clamp shadow reference on radeonsi.
Vulkan CTS does not expect the value to be clamped (at least for D32),
and it makes a differences even though depth is in [0,1], due
to strict inequalities.
I couldn't find anything in the Vulkan spec about this, but the test
seemed to be copied from GL tests and the GL spec only specifies
clamping for fixed point formats. Hence I expect radeonsi to run into
this at some point as well, but given that they still have a usecase
with the Z16->Z32 promotion, I'll leave that for someone else to clean
up.
This at least fixes radv dEQP-VK.texture.shadow.* on VI.
Fixes: 0f9e32519bb 'ac/nir: clamp shadow texture comparison value on VI'
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sun, 22 Oct 2017 16:43:14 +0000 (18:43 +0200)]
radv: Disallow indirect outputs for GS on GFX9 as well.
Since it also uses the output vector before writing to memory.
Fixes: e38685cc62e 'Revert "radv: disable support for VEGA for now."'
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Bas Nieuwenhuizen [Sun, 22 Oct 2017 16:32:14 +0000 (18:32 +0200)]
ac/nir: Fix nir_texop_lod on GFX for 1D arrays.
Fixes: 1bcb953e166 'radv: handle GFX9 1D textures'
Reviewed-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 22 Oct 2017 20:23:29 +0000 (06:23 +1000)]
radv/ac/nir: only emit tess factors to storage if tes reads them
Otherwise we just need to write them to the tf ring.
this seems to improve the tessellation demo on Bonarie
~2190->~2230 fps
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sat, 21 Oct 2017 22:56:09 +0000 (00:56 +0200)]
radv: Don't use vgpr indexing for outputs on GFX9.
Due to LLVM bugs. Fixes a bunch of dEQP-VK.glsl.indexing.*
tests.
Fixes: e38685cc62e 'Revert "radv: disable support for VEGA for now."'
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sat, 21 Oct 2017 20:00:37 +0000 (22:00 +0200)]
ac/nir: Account for compact array index in GS input load from LDS.
Mirrors the vram path.
Fixes: d4ecc3c9299 'ac/nir: Add loading from LDS for merged GS.'
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sat, 21 Oct 2017 19:14:13 +0000 (21:14 +0200)]
radv: Don't compile shaders when they are cached already.
When the gs_copy_shader is NULL (due to an incomplete cache), but
the main shaders are found, we still do the nir, but we shouldn't
compile the shaders again. For merged shaders we should also account
for the missing shaders.
Fixes: ce03c119ce0 'radv: Add code to compile merged shaders.'
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sat, 21 Oct 2017 18:16:57 +0000 (20:16 +0200)]
radv: Don't check for max GL GS invocations.
We specify 127 instead of 32 as the limit in vulkan.
Fixes: 6bc42855f92 'radv: enable GS on GFX9'
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sat, 21 Oct 2017 16:23:47 +0000 (18:23 +0200)]
radv: Don't explicitly reference vertex shader for draw_id.
With merged shaders the vertex shader may not exist. This got in
because the offending patch was written before merged shaders were
upstream, but committed after.
Fixes: 75dfab24a2c 'radv: refactor indirect draws with radv_draw_info'
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Bas Nieuwenhuizen [Sat, 21 Oct 2017 16:20:24 +0000 (18:20 +0200)]
radv: Don't reset cmd_buffer->state.dirty.
Otherwise for non-indexed draws we set and immediately unset
RADV_CMD_DIRTY_INDEX_BUFFER. As all the set functions should
clear their own bit, this is unnecessary.
Fixes: 341529dbee5 'radv: use optimal packet order for draws'
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Bas Nieuwenhuizen [Sat, 21 Oct 2017 16:16:15 +0000 (18:16 +0200)]
radv: Correctly detect changed shaders for vertex descriptors.
As they were emitted after the new pipeline, the changed pipeline
detection was not working anymore.
Fixes: 341529dbee5 'radv: use optimal packet order for draws'
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Bas Nieuwenhuizen [Sat, 21 Oct 2017 01:07:43 +0000 (03:07 +0200)]
ac/nir: Set larged wrokgroup size for GS on GFX9.
They don't take a single wave anymore and we need the barriers.
Fixes: 6bc42855f92 'radv: enable GS on GFX9'
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sat, 21 Oct 2017 01:04:35 +0000 (03:04 +0200)]
ac/nir: Take the max workgroup size of all provided shaders.
Fixes: ffaf4d608a1 'radv: Enable tessellation shaders for GFX9.'
Reviewed-by: Dave Airlie <airlied@redhat.com>
Alex Smith [Thu, 19 Oct 2017 10:49:39 +0000 (11:49 +0100)]
radv: Fix pipeline cache locking issues
Need to lock around the whole process of retrieving cached shaders, and
around GetPipelineCacheData.
This fixes GPU hangs observed when creating multiple pipelines in
parallel, which appeared to be due to invalid shader code being pulled
from the cache.
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Lionel Landwerlin [Fri, 20 Oct 2017 17:49:30 +0000 (18:49 +0100)]
anv: don't assert on device init on Cannonlake
v2: Warn that support is still in alpha (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Lionel Landwerlin [Fri, 20 Oct 2017 17:28:48 +0000 (18:28 +0100)]
anv: disable stencil pma fix on Gen > 9
This workaround isn't listed on Gen10.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Lionel Landwerlin [Fri, 20 Oct 2017 14:46:48 +0000 (15:46 +0100)]
blorp: enable R32G32B32X32 blorp ccs copies
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Eric Anholt [Sat, 21 Oct 2017 00:14:52 +0000 (17:14 -0700)]
meson: Fix vc5 deps on the XML-generated headers.
I typoed and was depending on v3d_xml.h (the gzipped xml)_, not on the
v3d_packet_v33_pack.h that the compiler and QPU packing actually use.
Eric Anholt [Sat, 21 Oct 2017 00:05:54 +0000 (17:05 -0700)]
broadcom/vc5: Propagate vc4 aliasing fix to vc5.
See
e5fea0d621af2b14cf6c5e364eeaf293db460f2a
Stefan Schake [Fri, 20 Oct 2017 14:16:44 +0000 (16:16 +0200)]
broadcom/vc4: Fix aliasing issue
This was causing Android clang version 3.8.256229 to miscompile,
presumably due to strict aliasing.
Fixes: 14dc281c1332 ("vc4: Enforce one-uniform-per-instruction after optimization.")
Dylan Baker [Wed, 18 Oct 2017 22:11:39 +0000 (15:11 -0700)]
meson: Add support for EGL glvnd
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Tested-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Dylan Baker [Wed, 18 Oct 2017 19:20:43 +0000 (12:20 -0700)]
meson: build libEGL
This is based heavily on Daniel Stone's work for the same, rebased on
master and with a number of TODO's fixed.
This does not implement glvnd (which is coming in a later patch)
Meson builds egl slightly differently than autotools, namely it doesn't
build an intermediate shared library. It doesn't do this because meson
doesn't have problems with the name of the library being dynamically
generated, so the glvnd and non-glvnd code can follow the same path.
v2: - Don't reuse variable (Eric E.)
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Tested-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Dylan Baker [Tue, 17 Oct 2017 22:02:58 +0000 (15:02 -0700)]
meson: move wayland_drm_protocol generation to wayland-drm
These files are needed by both vulkan wayland-wsi and by egl
wayland-wsi, since the XML file is in src/egl/wayland/wayland-drm and we
can include this directory in such a way that it will be loaded before
egl and vulkan this allows us to avoid multiple calls to the same
generator.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-and-Tested-by: Eric Engestrom <eric@engestrom.ch>
Dylan Baker [Wed, 18 Oct 2017 22:47:11 +0000 (15:47 -0700)]
meson: Don't allow glx to be built without platform_x11
Previously this failed to change with_glx to disabled from auto if
platform_x11 was unset or if no opengl apis were being built.
v2: - swap conditional positions
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-and-Tested-by: Eric Engestrom <eric@engestrom.ch>
Dylan Baker [Fri, 20 Oct 2017 23:28:32 +0000 (16:28 -0700)]
meson: bump libdrm_amdgpu requirement to 2.4.85
fixes:
b60372570323243ec73 ("configure.ac: Bump libdrm_amdgpu version to 2.4.85.")
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Eric Anholt [Tue, 17 Oct 2017 17:41:55 +0000 (10:41 -0700)]
nir: Print the components referenced for split or packed shader in/outs.
Having 4 variables all called "gl_in_TexCoord0@n" isn't very informative,
much better to see:
decl_var shader_in INTERP_MODE_NONE float gl_in_TexCoord0 (VARYING_SLOT_VAR0.x, 1, 0)
decl_var shader_in INTERP_MODE_NONE float gl_in_TexCoord0@0 (VARYING_SLOT_VAR0.y, 1, 0)
decl_var shader_in INTERP_MODE_NONE float gl_in_TexCoord0@1 (VARYING_SLOT_VAR0.z, 1, 0)
decl_var shader_in INTERP_MODE_NONE float gl_in_TexCoord0@2 (VARYING_SLOT_VAR0.w, 1, 0)
v2: Handle arrays and structs better (by Timothy)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Eric Anholt [Mon, 16 Oct 2017 22:32:30 +0000 (15:32 -0700)]
nir: Add a safety check that we don't remove dead I/O vars after lowering.
The pass only looks at var load/store intrinsics, not input load/store
intrinsics, so assert that we don't see the other type.
v2: Adjust comment indentation.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Andres Rodriguez [Fri, 20 Oct 2017 22:42:13 +0000 (18:42 -0400)]
radv: disable implicit sync for radv allocated bos v3
Implicit sync kicks in when a buffer is used by two different amdgpu
contexts simultaneously. Jobs that use explicit synchronization
mechanisms end up needlessly waiting to be scheduled for long periods
of time in order to achieve serialized execution.
This patch disables implicit synchronization for all radv allocations
except for wsi bos. The only systems that require implicit
synchronization are DRI2/3 and PRIME.
v2: mark wsi bos as RADV_MEM_IMPLICIT_SYNC
v3: Add drm version check (Bas)
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Andres Rodriguez [Fri, 20 Oct 2017 22:42:12 +0000 (18:42 -0400)]
radv: factor out radv_alloc_memory
This allows us to pass extra parameters to the memory allocation
operation that are not defined in the vulkan spec. This is useful for
internal usage.
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Andres Rodriguez [Fri, 20 Oct 2017 22:02:16 +0000 (18:02 -0400)]
radv: Expose VK_EXT_global_priority
Expose the extension string as supported
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Andres Rodriguez [Fri, 20 Oct 2017 22:02:15 +0000 (18:02 -0400)]
radv: don't skip PS/VS partial flush
This patch helps lower high priority compute latency. Found by
bisecting a perf regression on computeparticles with high priority
compute queues enabled.
Reverting this micro-optimization doesn't seem to have any negative
effect on performance on Dota2 or ssao.
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Andres Rodriguez [Fri, 20 Oct 2017 22:02:14 +0000 (18:02 -0400)]
radv: Implement VK_EXT_global_priority
This extension allows the caller to change a queue's system wide
priority. This is useful for applications with specific
latency constraints.
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Andres Rodriguez [Fri, 20 Oct 2017 22:02:13 +0000 (18:02 -0400)]
radeonsi: hardcode shader WAVE_LIMIT to the maximum value
This is part of a cooperative scheduling approach used by radv. All
drivers in the stack must opt-in to resource arbitration, otherwise GL
based apps will be able to ignore system priorities.
We always hardcode the field to its maximum value, instead of attempting
to calculate an approximate usage. In testing, there were no benefits to
using anything other than the maximum.
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Andres Rodriguez [Fri, 20 Oct 2017 22:02:12 +0000 (18:02 -0400)]
radv: hardcode shader WAVE_LIMIT to the maximum value
When WAVE_LIMIT is set, a submission will opt-in for SPI based resource
scheduling. Because this mechanism is cooperative, we must ensure that
all submissions have this field set, otherwise they will bypass resource
arbitration.
We always hardcode the field to its maximum value, instead of attempting
to calculate an approximate usage. In testing, there were no benefits to
using anything other than the maximum.
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Andres Rodriguez [Fri, 20 Oct 2017 22:02:11 +0000 (18:02 -0400)]
vulkan: update headers & registry to VK 1.0.63
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Bas Nieuwenhuizen [Fri, 20 Oct 2017 22:22:48 +0000 (00:22 +0200)]
configure.ac: Bump libdrm_amdgpu version to 2.4.85.
For VK_EXT_global_priority in radv.
Acked-by: Andres Rodriguez <andresx7@gmail.com>
Eric Anholt [Fri, 20 Oct 2017 21:00:11 +0000 (14:00 -0700)]
broadcom/vc5: Use SETMSF to handle discards.
A bit of spec text suggested that (like vc4) condition codes should be
used for discards, and the simulator was fine with it, but the 7268
disagrees and you have to use SETMSF instead or the color comes through.
Fixes glsl-fs-discard-01 and many of the interpolation-with-clipping
tests.
Eric Anholt [Fri, 20 Oct 2017 19:43:11 +0000 (12:43 -0700)]
broadcom/vc5: Set the snorm/unorm packing functions to be lowered.
We don't have native instructions for them, so set up the lowering. Once
we support the bfi instructions that get generated, they should start
actually working.
Eric Anholt [Fri, 20 Oct 2017 19:32:36 +0000 (12:32 -0700)]
broadcom/vc5: Fix pasteo that broke vertex texturing.
We weren't ever filling in the texture state record, so we'd dereference
NULL from the shader.
Eric Anholt [Thu, 19 Oct 2017 22:22:13 +0000 (15:22 -0700)]
broadcom/vc5: Move default attribute value setup to the CSO and fix them.
I was generating some stub values to bring the driver up, but fill them in
properly now. We now set 1.0 or 1u as appropriate, and thanks to being in
their own BO it fixes piglit failures on the 7268 (where our 4-byte
alignment was insufficient).
Fixes const-packHalf2x16.shader_test
Eric Anholt [Thu, 19 Oct 2017 22:17:41 +0000 (15:17 -0700)]
broadcom/vc5: Move most of the shader state attribute record to the CSO.
This should reduce our draw-time overhead, and puts the code where it
should go long term.
Eric Anholt [Fri, 20 Oct 2017 22:53:18 +0000 (15:53 -0700)]
broadcom/vc5: Fix build failure frm nir_shader::stage removal.
Fixes: 59fb59ad54d3 ("nir: Get rid of nir_shader::stage")
Matt Turner [Wed, 14 Jun 2017 21:48:11 +0000 (14:48 -0700)]
i965/fs: Use align1 mode on ternary instructions on Gen10+
Align1 mode offers some nice features over align16, like access to more
data types and the ability to use a 16-bit immediate. This patch does
not start using any new features. It just emits ternary instructions in
align1 mode.
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Matt Turner [Wed, 14 Jun 2017 21:49:52 +0000 (14:49 -0700)]
i965: Add align1 ternary instruction emission support
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Matt Turner [Wed, 14 Jun 2017 23:04:07 +0000 (16:04 -0700)]
i965: Add align1 ternary instruction disassembler support
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Matt Turner [Tue, 6 Jun 2017 23:15:21 +0000 (16:15 -0700)]
i965: Add align1 ternary instruction-word support
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Matt Turner [Wed, 14 Jun 2017 21:49:31 +0000 (14:49 -0700)]
i965: Add align1 ternary instruction support to conversion functions
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Matt Turner [Thu, 17 Dec 2015 17:33:38 +0000 (12:33 -0500)]
i965: Add align1 ternary instruction field encodings
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Matt Turner [Thu, 24 Aug 2017 23:14:35 +0000 (16:14 -0700)]
i965: Add functions to abstract access to 3src register types
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Matt Turner [Fri, 25 Aug 2017 17:43:38 +0000 (10:43 -0700)]
i965: Rename brw_inst's functions that access the 3src register type
Put hw_ in the name so that it's clear these are the hardware encodings.
Similar to commit
9fb832332868 ("i965: Rename brw_inst's functions that
access the register type")
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Matt Turner [Tue, 6 Jun 2017 22:43:23 +0000 (15:43 -0700)]
i965: Rename brw_inst 3src functions in preparation for align1
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Matt Turner [Wed, 14 Jun 2017 22:05:39 +0000 (15:05 -0700)]
i965: Print subreg in units of type-size on ternary instructions
The instruction word contains SubRegNum[4:2] so it's in units of dwords
(hence the * 4 to get it in terms of bytes). Before this patch, the
subreg would have been wrong for DF arguments.
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Matt Turner [Wed, 14 Jun 2017 21:08:32 +0000 (14:08 -0700)]
i965: Add functions for brw_reg_type <-> hw 3src type
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Matt Turner [Thu, 24 Aug 2017 23:04:26 +0000 (16:04 -0700)]
i965: Move brw_reg_type_is_floating_point to brw_reg_type.h
I'm going to call this from brw_inst.h, and I don't want to have to
include all of brw_reg.h.
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Jason Ekstrand [Fri, 15 Sep 2017 02:52:38 +0000 (19:52 -0700)]
nir: Get rid of nir_shader::stage
It's redundant with nir_shader::info::stage.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Samuel Pitoiset [Tue, 17 Oct 2017 07:47:53 +0000 (09:47 +0200)]
radv: use optimal packet order for draws
Ported from RadeonSI. The time where shaders are idle should
be shorter now. This can give a little boost, like +6% with
the dynamicubo Vulkan demo.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Mon, 16 Oct 2017 15:48:42 +0000 (17:48 +0200)]
radv: add radv_emit_shaders_prefetch()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Mon, 16 Oct 2017 15:34:42 +0000 (17:34 +0200)]
radv: add radv_emit_shader_prefetch()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Fri, 20 Oct 2017 16:55:48 +0000 (18:55 +0200)]
st/mesa: correct a u_vbuf comment
trivial.
Christian Gmeiner [Thu, 19 Oct 2017 21:12:48 +0000 (23:12 +0200)]
etnaviv: fix implicit conversion warning
Galliums query_type used in APIs is unsigned.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
Christian Gmeiner [Thu, 19 Oct 2017 21:12:47 +0000 (23:12 +0200)]
etnaviv: enable occlusion query if GPU supports it
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
Christian Gmeiner [Thu, 19 Oct 2017 21:12:46 +0000 (23:12 +0200)]
etnaviv: add support for occlusion queries
Passes most occlusion query piglits. The following piglits are broken:
- spec@arb_occlusion_query@occlusion_query_meta_fragments
- spec@arb_occlusion_query@occlusion_query_meta_save
- spec@arb_occlusion_query2@render
v1 -> v2:
- use one sample provider for all occlusion queries tyes
- add comment about 'magic' value 0x1DF5E76
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
Christian Gmeiner [Thu, 19 Oct 2017 21:12:45 +0000 (23:12 +0200)]
etnaviv: add basic infrastructure for hw queries
No hardware query is supported yet.
v1 -> v2
- removed query_type from strcut etna_hw_sample_provider
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
Christian Gmeiner [Thu, 19 Oct 2017 21:12:44 +0000 (23:12 +0200)]
etnaviv: update headers from rnndb
Update to etna_viv commit
6c9c706.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
Chris Wilson [Wed, 3 May 2017 14:42:35 +0000 (15:42 +0100)]
relnotes/17.3: EGL_IMG_context_priority is now implemented
Suggested-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chris Wilson [Tue, 11 Apr 2017 15:17:36 +0000 (16:17 +0100)]
i965: Report supported context priorities to EGL/DRI
Hook up the RendererQuery for __DRI2_RENDERER_HAS_CONTEXT_PRIORITY to
report the available DRM_I915_GEM_CONTEXT_SETPARAM options based on the
per-client default context. The kernel will validate the request to change
the property, so we get an accurate reflection of available support
(based on kernel version and privilege) and we should only have to do it
once during screen setup -- although the SETPARAM should be fast, they
are still an ioctl each.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chris Wilson [Tue, 11 Apr 2017 14:24:54 +0000 (15:24 +0100)]
i965: Pass the EGL/DRI context priority through to the kernel
Decode the EGL/DRI priority enum into the [-1023, 1023] range as
interpreted by the kernel and call DRM_I915_GEM_CONTEXT_SETPARAM to
adjust the priority. We use 0 as the default medium priority (also the
kernel default) and so only need adjust up or down. By only doing the
adjustment if not setting to medium, we can faithfully report any error
whilst setting without worrying about kernel version.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chris Wilson [Wed, 27 Sep 2017 15:14:33 +0000 (16:14 +0100)]
i965: Record the presence of the kernel scheduler
Mention to the debug log if the kernel scheduler is enabled; and in
particular if it has preemption enabled.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chris Wilson [Wed, 27 Sep 2017 17:37:07 +0000 (18:37 +0100)]
i965: Sync i915_drm.h from kernel for IMG_context_priority
Pulling in changes up to
kernel commit
ac14fbd460d0ec16e7750e40dcd8199b0ff83d0a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Oct 3 21:34:53 2017 +0100
drm/i915/scheduler: Support user-defined priorities
and including the fixup from
kernel commit
822a4b673284672af697ccd66e8795f8a712a90d
Author: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Date: Fri Oct 6 13:45:59 2017 +0300
drm/i915: Don't use BIT() in UAPI section
for implementing IMG_context_priority.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chris Wilson [Thu, 27 Oct 2016 18:54:49 +0000 (19:54 +0100)]
egl,dri: Propagate context priority hint to driver->CreateContext
Jump through the layers of abstraction between egl and dri in order to
feed the context priority attribute through to the backend. This
requires us to read the value from the base _egl_context, convert it to
a DRI attribute, parse it again in the generic context creator before
passing it to the driver as a function parameter.
In order to not require us to pass back the actual value of the context
priority after creation, we impose that drivers should report the
available set of priorities during screen setup (and then they may chose
to fail if given an invalid value as that should have been checked at
the user boundary.)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Ben Widawsky <ben@bwidawsk.net> # i915/i965
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chris Wilson [Thu, 27 Oct 2016 18:34:46 +0000 (19:34 +0100)]
egl: Support IMG_context_priority
IMG_context_priority
https://www.khronos.org/registry/egl/extensions/IMG/EGL_IMG_context_priority.txt
"This extension allows an EGLContext to be created with a priority
hint. It is possible that an implementation will not honour the
hint, especially if there are constraints on the number of high
priority contexts available in the system, or system policy limits
access to high priority contexts to appropriate system privilege
level. A query is provided to find the real priority level assigned
to the context after creation."
The extension adds a new eglCreateContext attribute for choosing a
priority hint. This stub parses the attribute and copies into the base
struct _egl_context, and hooks up the query similarly.
Since the attribute is purely a hint, I have no qualms about the lack of
implementation before reporting back the value the user gave!
v2: Remember to set the default ContextPriority value to medium.
v3: Use the driRendererQuery interface to probe the backend for
supported priority values and use those to mask the EGL interface.
v4: Treat the priority attrib as a hint and gracefully mask any requests
not supported by the driver, the EGLContext will remain at medium
priority.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rob Clark <robdclark@gmail.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Emil Velikov <emli.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fredrik Höglund [Thu, 19 Oct 2017 18:54:50 +0000 (20:54 +0200)]
radv: don't flush the VS when srcStageMask == TOP_OF_PIPE_BIT
The Vulkan specification says:
"... an execution dependency with only VK_PIPELINE_STAGE_TOP_OF_-
PIPE_BIT in the source stage mask will effectively not wait for
any prior commands to complete."
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>