Timothy Arceri [Tue, 7 Sep 2021 05:00:58 +0000 (15:00 +1000)]
util/cache: run basic cache tests on the single file cache
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12745>
Marek Vasut [Wed, 15 Sep 2021 22:31:44 +0000 (00:31 +0200)]
freedreno: Handle timeout == PIPE_TIMEOUT_INFINITE and rollover
The fd_fence_finish() may be passed a special timeout value PIPE_TIMEOUT_INFINITE.
This gets propagated all the way to get_abs_timeout(), where it gets converted to
a huge timeout value and passed down to the kernel. At least on iMX53, the kernel
may complain about this value being too large and emit a backtrace. The relevant
piece of information there is the following:
schedule_timeout: wrong timeout value
bf94984b
Per suggestion by Rob Clark, fix this in get_abs_timeout() by picking the same
rollover implementation present in etnaviv. This fixes one part of the problem
where the tv_nsec becomes larger than NSEC_PER_SEC, which is invalid.
However, the PIPE_TIMEOUT_INFINITE is sufficiently large to make tv_secs larger
than KTIME_SEC_MAX, which makes kernel-side ktime_set() return KTIME_MAX and
that in turn triggers the above "wrong timeout value N" message. Fix this by
setting the timeout to large enough value in case of PIPE_TIMEOUT_INFINITE.
While the timeout is not truly infinite, the timeout is long enough as anything
longer than a few seconds means the GPU got hung.
The "util/timespec.h" is added so we can use NSEC_PER_SEC instead of ad-hoc
constant
1000000000 . The "pipe/p_defines.h" is needed for PIPE_TIMEOUT_INFINITE.
This problem can be reliably triggered on iMX53 using Qt5 with EGLFS support,
using the qtbase examples, as follows:
/usr/share/examples/opengl/qopenglwidget/qopenglwidget -platform eglfs
Fixes:
f3cc0d27475 ("freedreno: import libdrm_freedreno + redesign submit")
Signed-off-by: Marek Vasut <marex@denx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12886>
Mike Blumenkrantz [Thu, 16 Sep 2021 13:57:47 +0000 (09:57 -0400)]
zink: zero VkImageCreateInfo::queueFamilyIndexCount on creation
this explodes gfxreconstruct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12905>
Emma Anholt [Thu, 16 Sep 2021 22:35:38 +0000 (15:35 -0700)]
ci/freedreno: Drop minetest from a3xx trace testing.
It's been flaking approximately weekly since the end of June.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12906>
Neha Bhende [Wed, 15 Sep 2021 00:43:16 +0000 (17:43 -0700)]
auxiliary/indices: convert primitive type PIPE_PRIM_PATCHES
Few tessellation related piglit test are crashing. This patch
fixes unhandled case
Tested with piglit
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
(cherry picked from commit
0e1c962cc105a9330caf22266e1962b049c13454)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12882>
Dave Airlie [Thu, 16 Sep 2021 04:48:15 +0000 (14:48 +1000)]
lavapipe: enable KHR_spirv_1_4
One test fails but I think it's a missing barrier in the test
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12888>
Marijn Suijten [Tue, 11 Aug 2020 22:01:45 +0000 (00:01 +0200)]
freedreno: Enable Adreno 508, 509 and 512
These GPUs attained kernel support in:
https://git.kernel.org/torvalds/c/
1d832ab30ce64abe30571bc12931a296a8a27c4d
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12874>
Nanley Chery [Wed, 8 Sep 2021 14:08:17 +0000 (07:08 -0700)]
iris: Finish aux import in iris_resource_from_handle
This allows us to delete iris_resource_unfinished_aux_import, which
incorrectly assumed that a CCS-enabled resource needs an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795>
Nanley Chery [Wed, 8 Sep 2021 13:41:12 +0000 (06:41 -0700)]
iris: Add and use get_num_planes
This function counts the number of objects in a pipe_resource linked list.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795>
Nanley Chery [Wed, 8 Sep 2021 13:48:15 +0000 (06:48 -0700)]
iris: Don't add a clear color BO for MC_CCS
It's unusable because ISL_AUX_USAGE_MC doesn't support fast clears.
Instead of performing this change in the if-ladder, replace the
if-ladder with a switch statement to make it clear what's going on.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795>
Nanley Chery [Thu, 2 Sep 2021 22:11:47 +0000 (15:11 -0700)]
iris: Allow NULL aux BOs in aux-state functions
XeHP can use CCS_E without an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795>
Nanley Chery [Fri, 3 Sep 2021 21:01:36 +0000 (14:01 -0700)]
iris: Simplify an iris_use_pinned_bo call
Avoid using a helper function to get the resource BO. This fits in
better with the previous iris_use_pinned_bo calls.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795>
Nanley Chery [Fri, 3 Sep 2021 20:53:40 +0000 (13:53 -0700)]
iris: Split clear color and aux BO checks
CCS_E-enabled resources on XeHP have a clear color without an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795>
Nanley Chery [Tue, 7 Sep 2021 15:26:31 +0000 (08:26 -0700)]
iris: Support NULL aux BOs in fill_surface_state
XeHP can use CCS_E without an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795>
Nanley Chery [Tue, 7 Sep 2021 15:45:05 +0000 (08:45 -0700)]
iris: Delete iris_resource_get_clear_color
This helper simply is a wrapper to the clear color fields in the
iris_resource struct. We choose to delete it for two reasons:
1) It incorrectly asserts that the resource argument has an aux BO.
This doesn't hold for CCS_E on XeHP.
2) The majority of functions ignore the helper anyway and access these
fields directly.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795>
Jesse Natalie [Wed, 15 Sep 2021 21:53:36 +0000 (14:53 -0700)]
CI/windows: Build shared-glapi, EGL, gles2
Acked-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881>
Jesse Natalie [Sun, 8 Aug 2021 15:45:34 +0000 (08:45 -0700)]
meson: Set /Zc:__cplusplus for MSVC
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881>
Jesse Natalie [Wed, 15 Sep 2021 21:49:09 +0000 (14:49 -0700)]
egl: Update Windows .def to include missing exports
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881>
Jesse Natalie [Wed, 15 Sep 2021 21:41:34 +0000 (14:41 -0700)]
symbols-check: Fix symbol demangling for Windows
Only strip leading underscores if there's also a trailing @
Fixes shared-glapi symbol check for x64
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881>
Mike Blumenkrantz [Tue, 14 Sep 2021 17:45:42 +0000 (13:45 -0400)]
zink: pass all modifiers through to image creation
let the driver figure these out after zink guarantees that at least one of them
will work
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12857>
Mike Blumenkrantz [Tue, 14 Sep 2021 17:44:58 +0000 (13:44 -0400)]
zink: pre-filter multi-plane modifiers
only single plane modifiers are supported now
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12857>
Mike Blumenkrantz [Tue, 14 Sep 2021 17:01:59 +0000 (13:01 -0400)]
zink: unbreak dmabuf handling
this does need kms handling to do literally anything.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12857>
Mike Blumenkrantz [Wed, 21 Apr 2021 12:45:10 +0000 (08:45 -0400)]
zink: store drm fd to screen
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12857>
Jason Ekstrand [Wed, 15 Sep 2021 22:59:52 +0000 (17:59 -0500)]
nir: Stop sweeping indirects
They're no longer ralloc'd.
Fixes:
879a569884b1 "nir: Switch from ralloc to malloc for NIR instructions."
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12884>
Jason Ekstrand [Wed, 15 Sep 2021 22:57:03 +0000 (17:57 -0500)]
nir: Properly clean up nir_src/dest indirects
Now that they're no longer ralloc'd, we have to be much more careful
about indirects. We have to make sure every time a source or
destination is overwritten, its indirect (if any) is freed. We also
have to choose a memory ownership convention for the rewrite functions.
Assuming that they will be called with the source from some other
instruction, we choose to always make a copy of the indirect (if any).
It's the responsibility of the caller to ensure its copy of the indirect
is freed.
Unfortunately, all this extra logic is going to make
nir_instr_rewrite/move_src/dest more expensive because they now have
all the logic of nir_src/dest_copy instead of a simple struct
assignment. Fortunately, the vast majority of rewrite calls are done by
nir_ssa_def_rewrite_uses which is an SSA-only fast-path.
Fixes:
879a569884b1 "nir: Switch from ralloc to malloc for NIR instructions."
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12884>
Timur Kristóf [Mon, 10 May 2021 11:15:12 +0000 (13:15 +0200)]
radv: Remove PSIZ output when it isn't needed.
PSIZ output is only needed when:
1. There is a next stage and it reads it.
2. Primitive topology is point list, in the last vertex pipeline stage.
Zink always adds this output in its vertex (and other) shaders,
because it helps Zink avoid recompiling shader variants.
However, this has a performance impact for RADV because
it needs a scalar memory load. That becomes noticeable
at high primitive rates.
The Fossil stats are unremarkable because our DB doesn't include any
shaders from Zink or D9VK, but there are a few affected shaders.
Note that there may be an increase in LDS use in some GS. This is
because with PSIZ removed the ES per-vertex LDS size is smaller, so
we can squeeze more GS threads in the same workgroup.
Fossil DB stats on Sienna Cichlid:
Totals from 14 (0.01% of 128647) affected shaders:
CodeSize: 119884 -> 119732 (-0.13%)
LDS: 235008 -> 228864 (-2.61%); split: -2.83%, +0.22%
Instrs: 23076 -> 23048 (-0.12%)
Latency: 71667 -> 71625 (-0.06%)
InvThroughput: 19155 -> 18870 (-1.49%)
Copies: 1586 -> 1572 (-0.88%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10725>
Dave Airlie [Tue, 7 Sep 2021 05:22:34 +0000 (15:22 +1000)]
docs: update docs for new llvmpipe/lavapipe features
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Tue, 7 Sep 2021 04:01:15 +0000 (14:01 +1000)]
lavapipe: enable KHR_shader_subgroup_extended_types
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Tue, 7 Sep 2021 04:51:48 +0000 (14:51 +1000)]
gallivm/nir: handle subgroup reduction across all types
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Mon, 6 Sep 2021 00:30:40 +0000 (10:30 +1000)]
lavapipe: enable KHR_shader_float16_int8
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Mon, 6 Sep 2021 00:00:16 +0000 (10:00 +1000)]
llvmpipe: enable FP16 and update CL + traces piglit results.
The fails will be addressed later.
This adds a fail in GLSL compiler that is due to a workaround
that fails when fp16 constants are lowered
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Tue, 7 Sep 2021 01:17:39 +0000 (11:17 +1000)]
gallivm: use llvm intrinsics for 16-bit round/trunc/roundeven
Otherwise the inf translations don't seem to work, and the VK CTS
fails
Fixes VK CTS dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic*
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Mon, 6 Sep 2021 04:33:06 +0000 (14:33 +1000)]
gallivm: increase tgsi nesting call stack size
Some VK CTS tests are topping this out around 76, increase it to 80 for now.
Fixes:
dEQP-VK.spirv_assembly.instruction.graphics.float16.opvectorshuffle.*44*
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Thu, 22 Jul 2021 06:14:57 +0000 (16:14 +1000)]
gallivm/nir: pass the correct float builder to ddx/y
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Thu, 22 Jul 2021 05:59:34 +0000 (15:59 +1000)]
gallivm/nir: call pow with correct flt builder
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Thu, 22 Jul 2021 05:36:59 +0000 (15:36 +1000)]
gallivm/nir: handle 16-bit exp/lod using intrinsics.
This just passes the 16-bit float versions to the llvm intrinsics
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Tue, 9 Mar 2021 03:15:59 +0000 (13:15 +1000)]
llvmpipe: lower_flrp16
fixes a bunch of spir-v 16-bit tests
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Mon, 19 Jul 2021 02:49:00 +0000 (12:49 +1000)]
gallivm: add 16-bit sin/cos via llvm intrinsic
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Thu, 22 Jul 2021 04:08:31 +0000 (14:08 +1000)]
gallivvm/nir: handle non-32bit mask scatter stores
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Thu, 22 Jul 2021 03:40:49 +0000 (13:40 +1000)]
gallivm/nir: fix f2b32
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Thu, 22 Jul 2021 03:20:29 +0000 (13:20 +1000)]
gallivm/nir: handle conversion to 16-bit texel fetch
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Dave Airlie [Sun, 11 Jul 2021 21:24:54 +0000 (07:24 +1000)]
gallivm: add initial support for 16-bit float builder.
This is an initial patch that is needed for OpenCL and Vulkan
support for proper 16-bit floats.
This doesn't enable the cap bit yet
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
Mike Blumenkrantz [Wed, 1 Sep 2021 20:56:52 +0000 (16:56 -0400)]
zink: cap max shader variants with inlined uniforms
avoid making a new shader for every frame forever
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Fri, 3 Sep 2021 14:06:22 +0000 (10:06 -0400)]
zink: simplify shader variant update loop
a single continue makes this much easier to read
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 20:55:32 +0000 (16:55 -0400)]
zink: split out inlined uniform shader variants into separate cache
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 20:52:12 +0000 (16:52 -0400)]
zink: remove default_variants storage in program struct
these should naturally be the first entry in the list when it matters
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 20:46:27 +0000 (16:46 -0400)]
zink: replace shader module hash table with a list
this should be significantly more performant for the majority of cases
since it's rare that shaders have multiple variants outside of unit tests,
so now there can just be a list of shaders being iterated instead where the
first entry is the last used
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 20:16:39 +0000 (16:16 -0400)]
zink: move shader cache to gfx program struct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 20:15:50 +0000 (16:15 -0400)]
zink: stop using hash table for compute programs
this is pointless since there's no variants yet
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 20:12:54 +0000 (16:12 -0400)]
zink: store shader key to shader module
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 20:09:22 +0000 (16:09 -0400)]
zink: move uniform size calc for shader keys into keybox
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 19:44:34 +0000 (15:44 -0400)]
zink: move shader keys to be persistent on pipeline state
save a cycle or two zeroing and populating this on every recalc
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Thu, 16 Sep 2021 03:47:30 +0000 (23:47 -0400)]
zink: move xfb updates to just before draw
it's illegal to bind the pipeline after xfb has begun
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 19:35:55 +0000 (15:35 -0400)]
zink: simplify flagging last vertex stage for updating
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 17:58:31 +0000 (13:58 -0400)]
zink: only update gfx pipeline cache after creating a real pipeline
async pipelines may not require updates here
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 17:58:05 +0000 (13:58 -0400)]
zink: remove some ctx references from shader/pipeline compile
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 17:57:32 +0000 (13:57 -0400)]
zink: remove ctx references from shader compile path
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 17:56:02 +0000 (13:56 -0400)]
zink: make tcs shader generation take screen param
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Mike Blumenkrantz [Wed, 1 Sep 2021 17:51:14 +0000 (13:51 -0400)]
zink: move pending prim type to gfx pipeline struct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12842>
Dave Airlie [Tue, 17 Aug 2021 18:38:58 +0000 (04:38 +1000)]
llvmpipe/cs: rework coroutine context handling (v2)
Get comfy.
llvmpipe coroutines have a stack frame. This is created by hooking
in malloc and coro.alloc and coro.size intrinsics.
LLVM has an CoroElide pass that is meant to allow that stack frame
to be done as an alloca in the caller instead of using the malloc path.
The CoroElide pass relies on the coroutine being inlined (fixed that).
The CoroElide pass relies on there being a direct connect between
coro.destroy(i8 *arg) and arg = coro.begin(id). However due to the
way the compute shaders are launched, there is no way to ensure that
link. Fixing the CoroElide pass seems quite difficult, I considered
having a force CoroElide always flag to make it dtrt, however I'm not
sure how ugly that would end up.
My first attempt tried to preallocate the stacks at a fixed size,
this turned out to be naive as the stack frame size was not sized
like I expected. Instead the first coro to run allocs enough for
everyone, so avoid the massive amounts of small allocations.
This remove coro malloc from a lot of profiles and shaves another 30s
or so from OpenCL ./conversions/test_conversions uchar_uin
(from 4.40m to just under 4m on my ryzen 7 1800x)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432>
Dave Airlie [Tue, 17 Aug 2021 19:57:31 +0000 (05:57 +1000)]
llvmpipe: shorten hold time on the screen mutex
There is no requirement to hold this mutex over the wait. I doubt
it matters much in practice.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432>
Dave Airlie [Tue, 17 Aug 2021 06:10:24 +0000 (16:10 +1000)]
gallivm/coro: use a phi instead of alloca
this just matches what the docs recommend
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432>
Dave Airlie [Mon, 16 Aug 2021 01:18:15 +0000 (11:18 +1000)]
llvmpipe/cs: rework thread pool for avoid mtx locking
This helps reduced the mtx lock/unlock overheads for the threadpool
if the work evenly distributes across the number of threads.
The CL CTS conversions tests really hit this, and this takes maybe 10-20s
off a 5min test run.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432>
Mike Blumenkrantz [Wed, 15 Sep 2021 14:50:03 +0000 (10:50 -0400)]
zink: fix enabled vertex buffer mask calculation
the mask can't entirely be calculated based on the integer parameters,
as it's possible for some of the "bind" slots to actually be unbinds,
so remove bits as necessary to fix this
also add some debug asserts to ensure I don't break this again for the
tenth time
Fixes:
6dd02a5139a ("zink: stop using util_set_vertex_buffers_mask()")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12871>
Icecream95 [Tue, 17 Aug 2021 22:49:54 +0000 (10:49 +1200)]
pan/bi: Don't set dependencies for +BLEND in blend shaders
The dependency wait should already have been done in the fragment
shader.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12461>
Dave Airlie [Thu, 2 Sep 2021 01:27:06 +0000 (11:27 +1000)]
lavapipe: enable dynamic index ubo/ssbo
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12689>
Dave Airlie [Thu, 2 Sep 2021 01:57:06 +0000 (11:57 +1000)]
gallivm/ssbo: cast ssbo index to int type.
Since these can be loaded from ubos or other places now.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12689>
Dave Airlie [Thu, 2 Sep 2021 00:49:05 +0000 (10:49 +1000)]
gallivm/ssbo: fix up dynamic indexed ssbo load/stores/atomics
Although the index has to be dynamically uniform, if we don't ever
execute a few lanes then we'll have 0, so it important to read the
ssbo index from the first active lane.
Just loop over them all.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12689>
Eric Engestrom [Mon, 16 Aug 2021 21:24:14 +0000 (22:24 +0100)]
docs: shorten "last release" note to fit on the website without horizontal scrolling
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12798>
Eric Engestrom [Mon, 16 Aug 2021 21:07:48 +0000 (22:07 +0100)]
docs: add plan for 21.3.x release cycle
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12397>
Jesse Natalie [Sat, 4 Sep 2021 14:46:49 +0000 (07:46 -0700)]
egl: Add a basic Windows driver
This is enough to run wglgears ported to EGL (desktop GL)
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Wed, 8 Sep 2021 19:54:17 +0000 (12:54 -0700)]
egl: Detect Windows platform using GDI
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Wed, 8 Sep 2021 19:51:53 +0000 (12:51 -0700)]
egl: Don't try to dereference native displays unless there's a detectable platform
Not all native displays are pointers to dereferenceable memory, e.g.
DCs on Windows. Don't bother dereferencing if no platforms are available
that can be detected that way.
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Sat, 4 Sep 2021 15:09:50 +0000 (08:09 -0700)]
egl: Use the .def file for Windows
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Wed, 1 Sep 2021 16:31:35 +0000 (09:31 -0700)]
egl: Add wgl/gallium dependencies for Windows platform
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Wed, 1 Sep 2021 15:54:13 +0000 (08:54 -0700)]
meson, egl: Support building for the Windows platform
Add a stub EGL driver for Windows
Fix compiler issues in egl/main
Ensure Windows build produces libEGL.dll
Default EGL to enabled for Windows when building a Gallium driver
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Wed, 1 Sep 2021 16:31:04 +0000 (09:31 -0700)]
meson: Include EGL after gallium
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Sat, 4 Sep 2021 14:46:38 +0000 (07:46 -0700)]
wgl: Add stw_* DLL exports for EGL support
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Sat, 4 Sep 2021 15:02:57 +0000 (08:02 -0700)]
wgl: Swap buffers via pointer instead of HDC
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Sat, 4 Sep 2021 15:07:45 +0000 (08:07 -0700)]
wgl: Add a stw_dev getter
Data imports need to be marked __declspec(dllimport), so
just export a function instead of data.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Sat, 4 Sep 2021 15:06:48 +0000 (08:06 -0700)]
wgl: Use HWND instead of HDC as primary framebuffer handle
EGL's native window is an HWND, so this removes the need to
GetDC from the creation path there.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Sat, 4 Sep 2021 15:00:07 +0000 (08:00 -0700)]
wgl: Add an explicit iPixelFormat for context creation
If it's 0, then it's looked up from the framebuffer for the specified HDC
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Sat, 4 Sep 2021 14:58:51 +0000 (07:58 -0700)]
wgl: Un-inline helpers which use stw_own_mutex
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Sat, 4 Sep 2021 14:58:17 +0000 (07:58 -0700)]
wgl: Add iPixelFormat to stw_pixelformat_info
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Sat, 4 Sep 2021 14:56:23 +0000 (07:56 -0700)]
wgl: Split DrvReleaseContext to support unbind via pointer
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Thu, 2 Sep 2021 18:20:54 +0000 (11:20 -0700)]
wgl: Make contexts current with framebuffers instead of HDCs
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Sat, 4 Sep 2021 14:54:00 +0000 (07:54 -0700)]
wgl: Allow creating framebuffers that aren't in the global window list
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Sat, 4 Sep 2021 14:51:59 +0000 (07:51 -0700)]
wgl: Make contexts current with pointer instead of DHGLRC
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Thu, 2 Sep 2021 15:51:34 +0000 (08:51 -0700)]
wgl: Pass share context as pointer instead of DHGLRC
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Jesse Natalie [Thu, 2 Sep 2021 15:44:57 +0000 (08:44 -0700)]
wgl: Create contexts and DHGLRCs separately
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Mike Blumenkrantz [Wed, 15 Sep 2021 19:05:36 +0000 (15:05 -0400)]
zink: stop setting nr_samples for null surfaces
this is a special value that shouldn't be set
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12875>
Mike Blumenkrantz [Wed, 15 Sep 2021 19:04:47 +0000 (15:04 -0400)]
zink: don't copy inner surface refcount
this leaks surfaces. lots of surfaces.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12875>
Dave Airlie [Wed, 15 Sep 2021 03:07:46 +0000 (13:07 +1000)]
intel/decode/gfx6: add support for gfx6 CC/VIEWPORT pointers.
These have 3 sub states encoded and valid fields on SNB.
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12864>
Samuel Pitoiset [Wed, 15 Sep 2021 16:12:03 +0000 (18:12 +0200)]
radv/ci: add a list of expected failures for VanGogh
Empty means 100% passrate like Sienna Cichlid.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12872>
Guilherme Gallo [Wed, 15 Sep 2021 14:03:16 +0000 (11:03 -0300)]
gitlab-ci: refactor timeout constants and tweak timeout values
* Refactor timeouts and retry attempts constants to variables in the top
of the python script.
* Increase LAVA job timeout value from 1 minute to 5 minutes, since the
timeout detection is just a heuristic based on the log silence in LAVA
devices. If we keep 1 minute timeout, maybe we could cancel jobs that
have tasks which may take too long to respond. Also, one minute
timeout is prone to misdetect scenarios when some network errors or
slowness may happen.
* Increase polling rate to check if the job has started from 1 check
every 30 seconds to 1 check every 10 seconds. Since it was taking 30
seconds in the worst case to start to get the log output from a LAVA
job. It is important to note that some LAVA jobs take less than 2
minutes to finish, so a 10 second wait would be more suitable in those
cases.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12870>
Filip Gawin [Tue, 14 Sep 2021 21:14:51 +0000 (23:14 +0200)]
r300: make global variables const (if possible)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12860>
Filip Gawin [Tue, 14 Sep 2021 21:39:02 +0000 (23:39 +0200)]
r300: fix usage of COVERED_PTR_MASKING_ENABLE for r500
http://developer.amd.com/wordpress/media/2013/10/
R5xx_Acceleration_v1.5.pdf
On page 281 you can see that register ZB:ZB_BW_CNTL
is using 19th bit for enabling this feature on r500.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12861>
Samuel Pitoiset [Fri, 3 Sep 2021 07:22:03 +0000 (09:22 +0200)]
radv: advertise EXT_shader_atomic_float2 with LLVM 14+
The intrinsics aren't exposed on earlier LLVM versions.
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/12716>
Samuel Pitoiset [Fri, 3 Sep 2021 08:35:51 +0000 (10:35 +0200)]
ac/llvm: implement nir_intrinsic_global_atomic_{fmin,fmax}
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/12716>
Samuel Pitoiset [Fri, 3 Sep 2021 08:19:39 +0000 (10:19 +0200)]
ac/llvm: implement nir_intrinsic_shared_atomic_{fmin,fmax}
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/12716>