Qiang Yu [Tue, 12 Oct 2021 07:23:27 +0000 (15:23 +0800)]
driconf: add executable_regexp application attribute
For matching executable with variable names like Mari which
append version string to its executable like: Mari4.5v2, Mari4.7v4.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13304>
Vinson Lee [Sat, 30 Oct 2021 21:17:10 +0000 (14:17 -0700)]
zink: Remove duplicate variable unsized.
Fix defect reported by Coverity Scan.
Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In unsized = unsized =
glsl_array_type(glsl_uintN_t_type(bit_size), 0U, bit_size / 8U),
unsized is written twice with the same value.
Fixes:
f79a25653b9 ("zink: move all shader bo/sharedmem access to compiler passes")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13607>
Dave Airlie [Sun, 31 Oct 2021 23:21:01 +0000 (09:21 +1000)]
vulkan/wsi: set correct bits for host allocations/exports for images.
Lavapipe was hitting asserts in this area due to incorrect bits being
specified.
Set the handle type depending on the sw flag, and set a correct handle
type for the memory host ptrs.
v2: add image export struct to image creation (Jason)
Fixes:
895d3399f7fb ("lavapipe: add support for KHR_external_memory_fd")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13615>
Bas Nieuwenhuizen [Mon, 1 Nov 2021 15:39:50 +0000 (16:39 +0100)]
radv: Disable coherent L2 optimization on cards with noncoherent L2.
With high likelihood we are forgetting to set the noncoherent bits
somewhere but I don't have the HW to debug. To avoid user pain
disable this optimization on these GPUs.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5505
Fixes:
fd8210f27ed ("radv: Try to do a better job of dealing with L2 coherent images.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13620>
Lorenz Brun [Wed, 9 Jun 2021 15:41:12 +0000 (17:41 +0200)]
frontends/va: Return error in vaRenderPicture if decoder is NULL
This fixes a crash if a data slice is submitted before the decoder
is initialized. A well-behaved application shouldn't encounter this
but returning an error is still better than crashing the entire
process and the rest of the code is similarly defensive.
Signed-off-by: Lorenz Brun <lorenz@brun.one>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11792>
Vadym Shovkoplias [Thu, 21 Oct 2021 20:06:29 +0000 (23:06 +0300)]
intel/fs: Fix a cmod prop bug when cmod is set to inst that doesn't support it
Fixes dEQP-VK.reconvergence.*nesting* tests.
There are cases when cmod is set to an instruction that cannot have
conditional modifier. E.g. following:
find_live_channel(32) vgrf166:UD, NoMask
cmp.z.f0.0(32) null:D, vgrf166+0.0<0>:D, 0d
is optimized to:
find_live_channel.z.f0.0(32) vgrf166:UD, NoMask
v2:
- Add unit test to check cmod is not set to 'find_live_channel' (Matt Turner)
- Update flag_subreg when conditonal_mod is updated (Ian Romanick)
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5431
Fixes:
32b7ba66b01 ("intel/compiler: fix cmod propagation optimisations")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13268>
Emma Anholt [Thu, 28 Oct 2021 17:20:01 +0000 (10:20 -0700)]
i915g: Improve the explanation for the 1D Y swizzle.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13133>
Emma Anholt [Fri, 1 Oct 2021 04:12:00 +0000 (21:12 -0700)]
i915g: Make sure we consider negates/swizzles on bias/shadow coords.
Caught by imirkin while debugging #4986.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13133>
Emma Anholt [Fri, 1 Oct 2021 19:26:59 +0000 (12:26 -0700)]
i915g: Check for negate/swizzle on TGSI_OPCODE_KILL_IF's src.yzw.
Caught by imirkin while debugging #4986.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13133>
Emma Anholt [Tue, 26 Oct 2021 23:34:05 +0000 (16:34 -0700)]
etnaviv: Switch to the NIR compiler by default.
This was the conclusion for the next action in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12889, and I
wanted to get moving on it as part of !8044. I made the change as
mechanical as possible to ease review.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13535>
Samuel Pitoiset [Wed, 27 Oct 2021 11:20:29 +0000 (13:20 +0200)]
radv: rename radv_shader_variant to radv_shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13548>
Samuel Pitoiset [Fri, 22 Oct 2021 07:41:56 +0000 (09:41 +0200)]
docs: document RADV_THREAD_TRACE_* envvars
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13477>
Samuel Pitoiset [Wed, 20 Oct 2021 06:53:07 +0000 (08:53 +0200)]
radv: stop reporting SQTT/RGP support as experimental
It can be considered stable these days. This also now reports the
buffer size and if instruction timing is enabled/disabled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13477>
Samuel Pitoiset [Fri, 22 Oct 2021 07:31:00 +0000 (09:31 +0200)]
radv: enable SQTT instruction timing by default
It seems stable enough to turn it on by default. This replaces
RADV_THREAD_TRACE_PIPELINE by RADV_THREAD_TRACE_INSTRUCTION_TIMING
which is enabled by default.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13477>
Samuel Pitoiset [Wed, 20 Oct 2021 08:15:09 +0000 (10:15 +0200)]
radv: remove useless checks about GFX7 for SQTT
It's only enabled on GFX8+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13477>
Samuel Pitoiset [Wed, 20 Oct 2021 06:43:01 +0000 (08:43 +0200)]
radv: move freeing the trigger SQTT file at a better place
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13477>
Christian Gmeiner [Fri, 1 Oct 2021 10:26:41 +0000 (12:26 +0200)]
ci/etnaviv: add manual piglit testing
Initial work by Christian, polishing by @anholt. Takes ~21 minutes, and
flakes may not be fully classified yet.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13600>
Emma Anholt [Wed, 27 Oct 2021 22:38:30 +0000 (15:38 -0700)]
ci/etnaviv: Add some more deqp flakes I've seen in recent runs.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13600>
Emma Anholt [Thu, 28 Oct 2021 21:59:37 +0000 (14:59 -0700)]
ci/etnaviv: Fix the dependency for the build artifacts.
This is an armhf board, not arm64. Fixes 404s from trying to pull the
artifacts early.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13600>
Jason Ekstrand [Mon, 1 Nov 2021 04:23:37 +0000 (23:23 -0500)]
lavapipe: Don't wrap errors returned from vk_device_init in vk_error
vk_device_init already calls vk_error so this is redundant. Also, it
makes vk_error grumpy to see a VK_ERROR_FEATURE_NOT_PRESENT on an
instance rather than a physical device.
Fixes:
47adb1114376 ("lavapipe: Switch to the new vk_error helpers")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13619>
Mike Blumenkrantz [Wed, 27 Oct 2021 20:58:41 +0000 (16:58 -0400)]
zink: force float dest types on some alu results
these aren't exact matches in spirv, so set the expected result type
to float where necessary
cc: mesa-stable
fixes #5567
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13562>
Mike Blumenkrantz [Wed, 27 Oct 2021 20:58:10 +0000 (16:58 -0400)]
zink: add more int/float types to cast switching in ntv
these come from opcode results, which are not always 32bit
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13562>
Mike Blumenkrantz [Wed, 27 Oct 2021 20:42:32 +0000 (16:42 -0400)]
zink: explicitly enable VK_EXT_shader_subgroup_ballot
this is needed when not creating 1.2 contexts
cc: mesa-stable
ref #5567
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13562>
Mike Blumenkrantz [Thu, 28 Oct 2021 13:49:03 +0000 (09:49 -0400)]
zink: clamp max buffer sizes to smallest buffer heap size
the max driver limit for these is irrelevant if there isn't enough memory
to allocate a buffer of that size
KHR-GL46.texture_buffer.texture_buffer_max_size
cc: mesa-stable
fixes #5568
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13584>
Mike Blumenkrantz [Thu, 28 Oct 2021 13:48:15 +0000 (09:48 -0400)]
zink: error when trying to allocate a bo larger than heap size
this is illegal and would fail anyway
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13584>
Mike Blumenkrantz [Thu, 28 Oct 2021 14:31:40 +0000 (10:31 -0400)]
zink: don't clamp 2D_ARRAY surfaces to 2D
another thing that used to be needed but now isn't
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13586>
Mike Blumenkrantz [Thu, 28 Oct 2021 14:03:22 +0000 (10:03 -0400)]
zink: don't clamp cube array surfacess to cubes
this was probably necessary for some other reason that has since been fixed,
and instead now just creates validation spam
cc: mesa-stable
fixes #5566
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13586>
Mike Blumenkrantz [Thu, 28 Oct 2021 15:30:11 +0000 (11:30 -0400)]
zink: be more spec-compliant for unnormalizedCoordinates samplers
the spec prohibits using most stuff with these, but also they probably
are just texelfetch anyway so it doesn't matter
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13587>
Dave Airlie [Sun, 31 Oct 2021 23:31:08 +0000 (09:31 +1000)]
lavapipe: drop EXT_acquire_xlib_display
This has a requirement on the display extensions.
VK-GL-CTS: dEQP-VK.info.instance_extensions
Fixes:
1d574d486030 ("lavapipe: remove display extension support")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13616>
Rob Clark [Sat, 30 Oct 2021 17:51:59 +0000 (10:51 -0700)]
freedreno/ir3: xfb fix for duplicate outputs
We can't rely on regid to be unique, shaders can have multiple varyings
with the same output value. Normally shader linking deduplicates these,
but we still need to handle the case for xfb. So use slot instead as
the unique identifier.
Fixes KHR-GLES31.core.gpu_shader5.fma_precision_*
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13605>
Rob Clark [Sat, 30 Oct 2021 19:29:01 +0000 (12:29 -0700)]
freedreno/ir3/print: Show end's outidxs
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13605>
Mike Blumenkrantz [Fri, 29 Oct 2021 15:35:01 +0000 (11:35 -0400)]
zink: flag renderpass change when toggling fbfetch
ensure the input attachment gets updated
fixes running
KHR-GL46.blend_equation_advanced.blend_all.GL_MULTIPLY_KHR_all_qualifier
after
KHR-GL46.blend_equation_advanced.BlendEquationSeparate
cc: mesa-stable
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13598>
Jordan Justen [Wed, 27 Oct 2021 20:46:08 +0000 (13:46 -0700)]
Revert "iris: Disable I915_FORMAT_MOD_Y_TILED_GEN12* on adl-p/display 13"
Round and round we go :)
In the "drm/i915/adlp/fb: Remove CCS FB stride restrictions" series,
https://lists.freedesktop.org/archives/intel-gfx/2021-October/281768.html,
it now appears that kernel can allow these modifiers to work with
adl-p.
This reverts commit
d4174f5f052f614a10df2ebc905aec8c4897b057.
Fixes:
d4174f5f052 ("iris: Disable I915_FORMAT_MOD_Y_TILED_GEN12* on adl-p/display 13")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13565>
Connor Abbott [Fri, 29 Oct 2021 17:02:25 +0000 (19:02 +0200)]
ir3: Don't emit barriers for make_available/make_visible
When looking at the output of some CTS tests, I realized that the
barriers vtn currently inserts to emulate coherent memory accesses
were being turned into fences, even though we never needed to do
anything special for coherent accesses before so presumably accesses are
already cache-coherent by default. Ignore make_visible/make_available
semantics to get us back to parity with the old path.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13599>
Jason Ekstrand [Fri, 1 Oct 2021 21:45:44 +0000 (16:45 -0500)]
vulkan: Move all the common object code to runtime/
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
Jason Ekstrand [Fri, 1 Oct 2021 22:26:29 +0000 (17:26 -0500)]
vulkan: Move trampoline code-gen to its own file
This way we sepaprate the raw tables from the code that actively depends
on vk_device and friends.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
Jason Ekstrand [Fri, 1 Oct 2021 22:43:04 +0000 (17:43 -0500)]
vulkan: Break entrypoint parsing into its own file
Instead of having a bunch of stuff depend on vk_dispatch_table_gen to
get the list of entrypoints, pull that into its own vk_entrypoints file.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
Jason Ekstrand [Fri, 29 Oct 2021 17:27:35 +0000 (12:27 -0500)]
vulkan/dispatch_table: EntrypointBase doesn't need to derive from object
We use python3 now and everything derives from object automatically
Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
Jason Ekstrand [Fri, 29 Oct 2021 17:31:32 +0000 (12:31 -0500)]
vulkan: Drop unnecessary [en]coding comments from python generators
Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
Jason Ekstrand [Fri, 29 Oct 2021 17:23:45 +0000 (12:23 -0500)]
vulkan: Rework mako error handling in python generators
Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
Jason Ekstrand [Fri, 1 Oct 2021 22:28:31 +0000 (17:28 -0500)]
lavapipe: Use vk_instance_get_proc_addr_unchecked for WSI
It exists precisely to handle this case without the driver looking up
trampolines itself. This is nearly identical to what ANV does.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
Jason Ekstrand [Fri, 1 Oct 2021 22:25:40 +0000 (17:25 -0500)]
v3dv: Use vk_instance_get_proc_addr_unchecked for WSI
It exists precisely to handle this case without the driver looking up
trampolines itself. This is nearly identical to what ANV does.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
Jason Ekstrand [Fri, 1 Oct 2021 22:07:56 +0000 (17:07 -0500)]
vulkan/vk_extensions_gen: Stop including vk_object.h
All we need from it is vulkan_common.h for VkExtensionProperties.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
Jason Ekstrand [Fri, 1 Oct 2021 22:04:35 +0000 (17:04 -0500)]
vulkan/vk_extensions_gen: Drop support for extra includes
No one is using this anymore.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
Vinson Lee [Sat, 23 Oct 2021 02:04:21 +0000 (19:04 -0700)]
clover: Add constructor for image_rd_argument.
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize st.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13500>
Mike Blumenkrantz [Thu, 28 Oct 2021 14:57:01 +0000 (10:57 -0400)]
zink: inject LOD for sampler version of OpImageQuerySize
this is required by spec
cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13585>
Mike Blumenkrantz [Thu, 28 Oct 2021 13:53:02 +0000 (09:53 -0400)]
zink: be more permissive for injecting LOD into texture() instructions
there's other variants of implicit lod sampling, and none of them are valid
outside fragment stage
Fixes:
3ad06b69490 ("zink: always use explicit lod for texture() when legal in non-fragment stages")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13585>
Connor Abbott [Fri, 29 Oct 2021 13:00:46 +0000 (15:00 +0200)]
ir3: Emit barriers for images again
This was accidentally broken with the nir_var_image work.
Fixes:
e87dbfd3 ("ir3: Check for nir_var_mem_image in shared_barrier handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13593>
Marek Olšák [Fri, 29 Oct 2021 11:33:18 +0000 (07:33 -0400)]
radeonsi: print the border color error message only once
Cc: 21.2 21.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13590>
Marek Olšák [Tue, 26 Oct 2021 01:01:08 +0000 (21:01 -0400)]
mesa: skip strlen when hashing strings for ProgramResourceHash
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13507>
Marek Olšák [Sat, 23 Oct 2021 23:39:12 +0000 (19:39 -0400)]
mesa: add separate hash tables for each GLSL resource type
This removes the malloc for the key, the associated string pointer
indirection, and hopefully the hash table has fewer elements than
the global one.
This decrease overhead of glGetUniformLocation.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13507>
Marek Olšák [Sat, 23 Oct 2021 03:30:06 +0000 (23:30 -0400)]
mesa: handle hash collisions in program resource lookups (e.g. uniforms)
We computed the hash of the name and used it as a key, and then the table
computed the hash of the hash.
Do it properly: Pass the name as a string into the hash table and let
the table handle everything.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13507>
Marek Olšák [Sat, 23 Oct 2021 01:02:42 +0000 (21:02 -0400)]
mesa: preparse [ and [0] in gl_resource_name and use it in shader_query.cpp
strrchr is very expensive here.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13507>
Marek Olšák [Sat, 23 Oct 2021 00:45:13 +0000 (20:45 -0400)]
mesa: rename locals in _mesa_program_resource_find_name for clarity
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13507>
Marek Olšák [Fri, 22 Oct 2021 23:22:53 +0000 (19:22 -0400)]
mesa: precompute strlen in gl_resource_name::length and use it
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13507>
Marek Olšák [Sat, 23 Oct 2021 00:03:59 +0000 (20:03 -0400)]
mesa: don't compute the same strlen up to 3x in _mesa_program_resource_find_name
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13507>
Marek Olšák [Fri, 22 Oct 2021 23:19:48 +0000 (19:19 -0400)]
glsl: add gl_resource_name to precompute "name" properties later
This just adds the structure with a name and its update function.
strlen and others will be added in the following commits. The idea is to
parse and analyze the name in advance to make glGetUniformLocation faster.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13507>
Marek Olšák [Fri, 22 Oct 2021 22:15:43 +0000 (18:15 -0400)]
mesa: use alloca in search_resource_hash
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13507>
Samuel Pitoiset [Thu, 28 Oct 2021 10:08:41 +0000 (12:08 +0200)]
zink: add CI lists and deqp-suite configuration for RADV
This is used by our local CI (ie. vk-cts-image) which is a separate
project outside of Mesa. We use it for testing RADV since a while.
The CI lists have been created against Navi2x (Sienna Cichlid).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13573>
Marek Olšák [Sat, 23 Oct 2021 05:19:23 +0000 (01:19 -0400)]
vbo: restructure vbo_save_vertex_list to get more cache hits
- Move more stuff into the cold structure.
- Reorder fields for better packing.
- Flatten the gallium and merged nested structures.
Since we have tens of thousands of these, decreasing the size improves
performance by 13%.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13506>
Marek Olšák [Sat, 23 Oct 2021 04:55:12 +0000 (00:55 -0400)]
vbo: use int16_t for vbo_save_vertex_list::gallium::private_refcount
We never use more than 16 bits.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13506>
Marek Olšák [Sat, 23 Oct 2021 04:54:09 +0000 (00:54 -0400)]
vbo: return a GL error earlier in vbo_save_playback_vertex_list_gallium
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13506>
Marek Olšák [Sat, 23 Oct 2021 20:14:25 +0000 (16:14 -0400)]
mesa: remove PADDING_64BIT by adding the dlist header into vbo_save_vertex_list
Now we can put useful data where the padding was.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13506>
Marek Olšák [Fri, 22 Oct 2021 20:24:37 +0000 (16:24 -0400)]
mesa: remove display list OPCODE_NOP
This decreases overhead because there are fewer nodes to parse.
There are 2 changes done here:
- If the next node offset is (offset % 8) == 4, pad the last node instead
of inserting NOP. This makes sure that the node offset is aligned.
- The vertex list node will add 4 bytes to the header to make the payload
aligned, so the payload will be at &n[2].
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13506>
Marek Olšák [Fri, 22 Oct 2021 19:15:35 +0000 (15:15 -0400)]
mesa: fix locking when destroying/overwriting/adding display lists
We need to hold the lock when calling destroy_list and doing
_mesa_HashInsertLocked in EndList.
So move the locking out of destroy_list.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13506>
Marek Olšák [Fri, 22 Oct 2021 17:49:00 +0000 (13:49 -0400)]
radeonsi: don't invoke si_decompress_depth if textures are not dirty at binding
This eliminates the overhead of invoking si_decompress_depth.
The complication here is that we need to update needs_depth_decompress_mask
every time we update dirty_level_mask.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13492>
Marek Olšák [Fri, 22 Oct 2021 07:31:36 +0000 (03:31 -0400)]
winsys/amdgpu: optimize looping inefficiencies in add_bo_fence_dependencies
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478>
Marek Olšák [Fri, 22 Oct 2021 07:24:02 +0000 (03:24 -0400)]
winsys/amdgpu: move BO fence array updates to the CS thread
We always wait for num_active_ioctls == 0 before we use the fence,
so we can just add fences to BOs in the CS thread.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478>
Marek Olšák [Fri, 22 Oct 2021 07:19:50 +0000 (03:19 -0400)]
winsys/amdgpu: don't use ip_instance and ring fields of fence and IB structures
They are always 0.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478>
Marek Olšák [Fri, 22 Oct 2021 06:04:18 +0000 (02:04 -0400)]
winsys/amdgpu: increase the BO hash list size
This decreases overhead inside amdgpu_cs_add_buffer by 40%
for viewperf2020/catia.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478>
Marek Olšák [Fri, 22 Oct 2021 04:52:40 +0000 (00:52 -0400)]
winsys/amdgpu: don't clear RADEON_USAGE_SYNCHRONIZED for last_added_bo_usage
It was breaking the early return path.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478>
Marek Olšák [Fri, 22 Oct 2021 04:30:36 +0000 (00:30 -0400)]
winsys/amdgpu: remove an amdgpu_cs dereference from amdgpu_cs_add_buffer
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478>
Marek Olšák [Fri, 22 Oct 2021 04:18:48 +0000 (00:18 -0400)]
winsys/amdgpu: simplify parameter passing and derefs in cs_add_buffer
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478>
Marek Olšák [Fri, 22 Oct 2021 03:17:03 +0000 (23:17 -0400)]
gallium/radeon: merge BO read/write usage flags with priority flags
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478>
Marek Olšák [Fri, 22 Oct 2021 03:15:12 +0000 (23:15 -0400)]
gallium/radeon: remove unused RADEON_DEPENDENCY_START_FENCE
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478>
Marek Olšák [Fri, 22 Oct 2021 03:13:20 +0000 (23:13 -0400)]
gallium/radeon: remove/merge some BO priorities and remove holes
The upper bits will be used by RADEON_USAGE_*
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478>
Marek Olšák [Fri, 22 Oct 2021 02:57:43 +0000 (22:57 -0400)]
gallium/radeon: change the BO priority definitions to bits
This is for the next microoptimization.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13478>
Marek Olšák [Wed, 27 Oct 2021 05:29:42 +0000 (01:29 -0400)]
radeonsi: remove unused parameters in si_emit_draw_packets
This is a leftover from GS fast launch and compute-based culling.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13539>
Marek Olšák [Wed, 27 Oct 2021 05:25:49 +0000 (01:25 -0400)]
radeonsi: enable shader culling for indirect draws
It was mistakenly disabled, decreasing performance a lot.
Only valid for Mesa 21.3.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: 21.3 <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13539>
Greg V [Wed, 8 Apr 2020 22:41:00 +0000 (01:41 +0300)]
util: make util_get_process_exec_path work on FreeBSD w/o procfs
sysctl is the correct way of getting the current executable's path.
procfs is not mounted by default.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598>
Greg V [Wed, 8 Apr 2020 22:43:10 +0000 (01:43 +0300)]
util: __getProgramName: remove check for ancient FreeBSD versions, simplify ifdefs
FreeBSD 5.0 was released in 2003.
We really do not need to check that we're on >= 4.4.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598>
Boyuan Zhang [Sun, 24 Oct 2021 22:54:31 +0000 (18:54 -0400)]
radeon/vcn: combine session init func
Combine the session init function for h.264 and hevc to reduce redundancy.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13511>
Boyuan Zhang [Sun, 24 Oct 2021 22:53:56 +0000 (18:53 -0400)]
radeon/vcn: combine encode params func
Combine the encode params function for h.264 and hevc to reduce redundancy.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13511>
Boyuan Zhang [Sun, 24 Oct 2021 22:09:45 +0000 (18:09 -0400)]
radeon/vcn: remove redundancy for vcn2 enc
Remove redundancy functions for vcn2 encode. Re-using the vcn1 quality params
function as a result.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13511>
Boyuan Zhang [Sun, 24 Oct 2021 22:01:42 +0000 (18:01 -0400)]
radeon/vcn: update vcn2 enc interface
Add missing parameters according to vcn 2 encode interface.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13511>
Boyuan Zhang [Sun, 24 Oct 2021 21:57:51 +0000 (17:57 -0400)]
radeon/vcn: update vcn1 enc interface
Update vcn 1 encode interface, upgrade interface minor version from 2 to 9,
and add necessary parameters accordingly.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13511>
Emma Anholt [Fri, 8 Oct 2021 20:17:27 +0000 (13:17 -0700)]
ci: Enable testing radeonsi's libva using libva-util unit tests.
We've noticed issues with these tests when uprevving Mesa in Chrome OS.
This CI catches some existing failures, and some debug-build assertion
failures as well.
To do this, uprev deqp-runner for its new gtest-runner command. This
runner is not as efficient as I would hope, due to some expensive code in
gtest. I've reported the issue to gtest and it should be easily fixable,
but for now it at least means we get to use the same baseline/skip/flake
handling we have from deqp and piglit runners.
I also fixed build-libdrm for our rootfses to not throw away libdrm's
share directory, which was causing a bunch of test-time spam from radeon's
libdrm when trying to look up its marketing name tables (not that big of a
deal for deqp-runner, but really noisy for piglit and libva-utils which
make gallium screens approximatly per-test).
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13419>
Connor Abbott [Thu, 28 Oct 2021 16:59:33 +0000 (18:59 +0200)]
freedreno/a6xx: Emit GRAS_LRZ_MRT_BUF_INFO_0
Analogous to the previous commit, this fixes the case where turnip sets
this reg to a media (yuv) format and then a gallium job is run next.
Fixes:
9c895e13 ("tu: Emit GRAS_LRZ_MRT_BUF_INFO_0")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13578>
Connor Abbott [Thu, 28 Oct 2021 16:50:33 +0000 (18:50 +0200)]
tu: Always write GRAS_LRZ_MRT_BUF_INFO_0
This fixes flakes in dEQP-VK.pipeline.stencil.nocolor.format.* when run
after ycbcr tests. Apparently LRZ needs to know if there's a media
format enabled even if there are no color attachments, so we need to
write something here. Presumably any "normal" format would work but 0
seems like a good neutral choice.
Fixes:
9c895e13 ("tu: Emit GRAS_LRZ_MRT_BUF_INFO_0")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13578>
Kenneth Graunke [Fri, 28 Aug 2020 23:12:17 +0000 (16:12 -0700)]
intel/genxml: Add XY_BLOCK_COPY_BLT on Tigerlake and later.
This is a new blitter command introduced on Tigerlake and expanded
substantially on XeHP. XY_BLOCK_COPY_BLT is actually fast, unlike
the legacy blitter commands. iris will use this in the future, and
anv hopefully could use it for a transfer queue someday as well.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13520>
Kenneth Graunke [Fri, 4 Sep 2020 09:38:35 +0000 (02:38 -0700)]
intel/genxml: Allow MI_FLUSH_DW on the blitter
Pretty sure this is how you flush the blitter.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13520>
Kenneth Graunke [Sat, 29 Aug 2020 00:38:45 +0000 (17:38 -0700)]
intel/genxml: Include blitter commands in gen*_pack.h
We're going to want to use the blitter again on newer hardware,
which means we need to be able to use genxml to emit those commands.
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13520>
Kenneth Graunke [Tue, 19 Oct 2021 05:48:14 +0000 (22:48 -0700)]
intel/genxml: Assert that all MOCS fields are non-zero on Gfx7+
Let's try and catch performance problems before we have to do large
painful amounts of analysis to detect a missed field.
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
Kenneth Graunke [Tue, 19 Oct 2021 05:35:33 +0000 (22:35 -0700)]
intel/genxml: Add an field option for nonzero="true"
This asserts that the value supplied is non-zero. Useful for things
like MOCS fields on modern platforms where we really want to avoid
setting it to 0 (uncached).
mbz types cannot be flagged as nonzero.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
Kenneth Graunke [Wed, 27 Oct 2021 19:56:01 +0000 (12:56 -0700)]
i965: Set MOCS for Bindless Surface/Sampler State base addresses
We don't use bindless surface or sampler states today, and are unlikely
to ever implement that in i965, but we can set a MOCS value regardless
to avoid asserts in upcoming patches that assert MOCS isn't zero.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
Kenneth Graunke [Wed, 20 Oct 2021 22:59:40 +0000 (15:59 -0700)]
i965: Port STATE_BASE_ADDRESS to genxml and fix bugs
This largely copies crocus's code for this (but with Gfx9+ handling).
This version also fixes missing MOCS settings on several platforms,
which we hadn't noticed were missing.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
Kenneth Graunke [Wed, 20 Oct 2021 08:08:07 +0000 (01:08 -0700)]
i965: Fix MOCS for BLORP buffer copies
We were passing a MOCS of 0, which is uncached. Yikes.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
Kenneth Graunke [Wed, 20 Oct 2021 07:25:47 +0000 (00:25 -0700)]
i965: Set MOCS for 3DSTATE_INDEX_BUFFER on Gfx6/7 as well.
For some reason we were only setting this on Gfx8+.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
Kenneth Graunke [Wed, 20 Oct 2021 07:13:29 +0000 (00:13 -0700)]
i965: Set MOCS for 3DSTATE_SO_BUFFERS on Gfx7.x too
For some reason we were only setting this on Gfx8+.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
Kenneth Graunke [Tue, 19 Oct 2021 22:24:51 +0000 (15:24 -0700)]
i965: Set MOCS on NULL stream output buffers
We'd like to add safeguards against accidental use of MOCS 0 (uncached),
which can have large performance implications. One case where we use
MOCS of 0 is disabled stream output targets, MOCS shouldn't matter, as
there's no actual buffer to be cached.
That said, it should be harmless to set MOCS for these null stream
output buffers; we can just assume a MOCS for generic internal buffers.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>