Rob Clark [Fri, 22 Jan 2021 17:16:58 +0000 (09:16 -0800)]
freedreno/a6xx: Add helper to check if UBWC is supported
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8659>
Rob Clark [Fri, 22 Jan 2021 16:42:29 +0000 (08:42 -0800)]
freedreno: Add fmt/args macros for pipe_resource
Deduplicate some long debug prints before adding more.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8659>
Rob Clark [Fri, 22 Jan 2021 16:18:07 +0000 (08:18 -0800)]
freedreno: Add perf_warn() trace helper
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8659>
Keith Packard [Thu, 21 Jan 2021 20:19:12 +0000 (12:19 -0800)]
glx: Provide glvnd wrapper for glXSwapIntervalEXT
When using glvnd, this function needs to be exposed through
getDispatchAddress or libglvnd will not find it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fixes:
60ebeb4608a8 "glx: Implement GLX_EXT_swap_control for DRI2 and DRI3"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8621>
Juan A. Suarez Romero [Thu, 7 Jan 2021 09:33:03 +0000 (10:33 +0100)]
vc4/ci: Replace expect script by python script
Replace the expect-based script to turn on/off the Raspberry Pi devices
using a python-based script.
v2:
- Fix small nitpicks (Juan)
- Limit line length (Andres)
v3:
- Bump image tags (Eric, Andres)
v4:
- Bump image tags (Eric)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Acked-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8362>
Mike Blumenkrantz [Wed, 29 Jul 2020 14:06:46 +0000 (10:06 -0400)]
spirv: handle NoContraction in GLSL450 alu ops
we were dropping this when it was set, leading to incorrect algebraic
optimizations that broke various types of tests, e.g., running
spec@arb_gpu_shader5@execution@precise@fs-fract-of-nan in zink
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6116>
Mike Blumenkrantz [Tue, 11 Aug 2020 22:36:52 +0000 (18:36 -0400)]
zink: don't force a renderpass start when setting framebuffer state
this breaks compute and isn't strictly necessary since we'll be starting
a renderpass during draw anyway; we just need to flush here to update the
state
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8662>
Mike Blumenkrantz [Tue, 11 Aug 2020 22:38:11 +0000 (18:38 -0400)]
zink: add function for waiting on a specific batch's fence
previously we only had zink_fence_wait(), which just waits on the
current batch to finish, but it may be the case that we don't want to
wait on all batches up to that point, so we can optimize a bit by only
waiting as long as we have to
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8662>
Mike Blumenkrantz [Wed, 9 Sep 2020 18:35:23 +0000 (14:35 -0400)]
gallium/u_inlines: add helper for simplifying pipe_context::resource_copy_region
this hook has too many params, and I only need like half of them
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8624>
Mike Blumenkrantz [Mon, 10 Aug 2020 14:17:10 +0000 (10:17 -0400)]
zink: enable PIPE_CAP_SAMPLER_VIEW_TARGET
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8629>
Chia-I Wu [Thu, 24 Dec 2020 23:37:15 +0000 (15:37 -0800)]
virgl: add support for VIRGL_CAP_V2_UNTYPED_RESOURCE
An untyped resource is a blob resource that contains only raw bytes
without type information (e.g., width, height, format, etc.). virgl
supports only typed resources, and when it encounters untyped resources,
it fails silently in the host.
This cap enables virgl to assign type information to untyped resources.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-By: Isaac Bosompem <mrisaacb@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8584>
Chia-I Wu [Thu, 24 Dec 2020 07:04:48 +0000 (23:04 -0800)]
virgl: update headers
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-By: Isaac Bosompem <mrisaacb@google.com>
Acked-By: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8584>
Erik Faye-Lund [Fri, 22 Jan 2021 11:15:33 +0000 (12:15 +0100)]
docs/zink: add GL 4.2 requirements
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>
Erik Faye-Lund [Fri, 22 Jan 2021 10:24:53 +0000 (11:24 +0100)]
docs/zink: add GL 4.1 requirements
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>
Erik Faye-Lund [Fri, 22 Jan 2021 10:04:33 +0000 (11:04 +0100)]
docs/zink: add GL 4.0 requirements
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>
Erik Faye-Lund [Fri, 22 Jan 2021 09:57:32 +0000 (10:57 +0100)]
docs/zink: fix phrasing of GL 3.3 requirements
These requirements aren't all about VkPhysicalDeviceFeatures, so let's
make the text reflect that.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>
Erik Faye-Lund [Fri, 22 Jan 2021 09:45:20 +0000 (10:45 +0100)]
docs/zink: document the independentBlend requirement for GL3
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>
Erik Faye-Lund [Fri, 22 Jan 2021 08:49:36 +0000 (09:49 +0100)]
docs/zink: add two missing required features
If these features aren't supported, we'll start doing illegal stuff, so
let's document it.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>
Erik Faye-Lund [Fri, 22 Jan 2021 19:37:57 +0000 (20:37 +0100)]
docs/zink: add missing colon
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>
Vinson Lee [Tue, 19 Jan 2021 02:20:21 +0000 (18:20 -0800)]
nv50/ir: Initialize RegAlloc member func in constructor.
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member func is not initialized in
this constructor nor in any functions that it calls.
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/8568>
Erik Faye-Lund [Fri, 22 Jan 2021 15:14:32 +0000 (16:14 +0100)]
zink: clone shader before lowering clip_halfz
If we don't clone the shader before lowering clip_halfz, we risk ending
up performing the same lowering multiple times, each time we compile a
new variant.
This fixes rendering in Neverball.
Fixes:
15f478fe840 ("zink: only run nir_lower_clip_halfz for last vertex processing stage")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4147
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8652>
Mike Blumenkrantz [Fri, 22 Jan 2021 18:19:53 +0000 (13:19 -0500)]
zink: check correct caps for PIPE_CAP_IMAGE_LOAD_FORMATTED
we actually need more features here than just the one which was checked to
enabled this
Fixes:
2f6f4b613c3 ("zink: export shader image caps using features")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8656>
Michel Dänzer [Wed, 20 Jan 2021 08:49:35 +0000 (09:49 +0100)]
ci: Enable process isolation for softpipe & freedreno piglit jobs
Disabling process isolation causes a random set of tests to be
spuriously skipped. The set of skipped tests can change when piglit is
rebuilt (even from the same Git commit), which can make docker image
rebuilds painful. (Not to mention the reduced testing coverage due to
the skipped tests)
One downside of this change is that the arm64_a630_piglit_shader job
now takes almost 10 minutes.
v2:
* Change arm64_a530_piglit_shader job as well, but make it run manually
on branches of forked repositories only, since it takes almost 20
minutes now. (Eric Anholt)
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8611>
Jason Ekstrand [Mon, 26 Oct 2020 23:48:29 +0000 (18:48 -0500)]
anv: Advertise shaderInt64 on Gen11+
On Gen11, they took away our hardware int64 support. We have lowering
for all of it in NIR except for subgroup ops. Now that all the subgroup
ops are implemented, we can enable the feature.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Mon, 26 Oct 2020 23:48:12 +0000 (18:48 -0500)]
intel/fs: Implement umin/umax shuffle
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Mon, 26 Oct 2020 16:58:32 +0000 (11:58 -0500)]
intel/fs: Refactor our shuffle emit code
This adds an emit_scan_step helper which gives us a place to do
something a bit more interesting than emitting a single op.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Tue, 27 Oct 2020 07:24:30 +0000 (02:24 -0500)]
intel/fs: Properly lower 64-bit MUL on 64-bit-incapable platforms
There are two problems this commit solves: First, is that the 64x64 MUL
lowering generates a Q MOV which, because of how late it runs in the
compile pipeline, it never gets removed. Second, it generates 32x32
MULs and we have to run it a second time to lower those.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Tue, 27 Oct 2020 05:31:22 +0000 (00:31 -0500)]
intel/fs: Support 64-bit CLUSTER_BROADCAST on Gen11+
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Tue, 27 Oct 2020 05:02:43 +0000 (00:02 -0500)]
intel/fs: Support 64-bit SHUFFLE on Gen11+
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Mon, 26 Oct 2020 18:34:04 +0000 (13:34 -0500)]
intel/fs: Support 64-bit SEL_EXEC on Gen11+
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Tue, 27 Oct 2020 05:36:53 +0000 (00:36 -0500)]
intel/fs: QUAD_SWIZZLE requires packed data
We could probably support some strides if we tried hard enough but the
whole point of this opcode is to accelerate things with crazy Align16 or
crazy regions. It's ok if we have to emit an extra MOV to get a packed
source.
Fixes:
8b4a5e641bc3 "intel/fs: Add support for subgroup quad operations"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Mon, 26 Oct 2020 18:27:43 +0000 (13:27 -0500)]
intel/reg,fs: Handle immediates properly in subscript()
Just returning the original type isn't what we want in basically any
case. Mask and shift the immediate as needed.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Mon, 26 Oct 2020 17:22:20 +0000 (12:22 -0500)]
intel/compiler: Move brw_reg_type_for_bit_size to brw_reg_type.h
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Tue, 27 Oct 2020 01:53:37 +0000 (20:53 -0500)]
intel/compiler: Return 1 for immediates in regs_read
Previously, we were returning 2 whenever the source was a Q type. As
far as I can tell, the only reason why this hasn't blown up before is
that it was only ever used for VGRFs until the SWSB pass landed which
uses it for everything. This wasn't a problem because Q types generally
aren't a thing on TGL. However, they are for a small handful of
instructions.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Tue, 27 Oct 2020 04:08:26 +0000 (23:08 -0500)]
nir/lower_int64: Lower 64-bit vote_ieq
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Mon, 26 Oct 2020 17:41:08 +0000 (12:41 -0500)]
nir/lower_int64: Add lowering for 64-bit iadd shuffle/reduce
Lowering iadd is a bit trickier because we have to deal with potential
overflow but it's still not bad to do in NIR.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Mon, 26 Oct 2020 15:50:35 +0000 (10:50 -0500)]
nir/lower_int64: Add lowering for some 64-bit subgroup ops
These are all pretty trivial because we can just split the op into one
subgroup op per half of the value. There's some question as to whether
these belong in lower_int64 or lower_subgroups but, on Intel, they key
decider of whether or not we need the lowering is based on whether or
not we have hardware int64 support.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Tue, 27 Oct 2020 04:09:04 +0000 (23:09 -0500)]
nir/lower_int64: Fix lowering of f2[ui]64 for 16-bit float
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Jason Ekstrand [Mon, 26 Oct 2020 15:41:41 +0000 (10:41 -0500)]
nir/lower_int64: Add a level of wrapper functions
We're about to start lowering a few intrinsics so we need support more
than just ALU.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>
Samuel Pitoiset [Mon, 18 Jan 2021 14:46:06 +0000 (15:46 +0100)]
radv: only decompress the depth/stencil aspect that needs to be resolved
For depth/stencil images, the driver was decompressing both aspects
while it should be enough to only decompress the one that's going
to be resolved.
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/8561>
Ben Niu [Thu, 21 Jan 2021 17:56:17 +0000 (09:56 -0800)]
util: When building 'ARM64EC', don't use x64 intrinsics which need to be emulated
ARM64EC is a new build target for Windows ARM64 devices for x64 support.
These binaries can be loaded in x64 processes, but don't need to be emulated. For
code that's heavily used, avoiding the emulation can be a huge perf win.
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8619>
Jesse Natalie [Wed, 13 Jan 2021 22:42:08 +0000 (14:42 -0800)]
main: Undefine MemoryBarrier for Windows
In winnt.h, MemoryBarrier can be defined in one of 4 ways, depending
on which architecture is being targeted.
- For x86, it's an inline function.
- For x64, it's an object-like macro, which means that the MemoryBarrier
function in the table actually ends up being called __faststorefence.
- For arm and arm64, it's a function-like macro, and the preprocessor fails
because the function table entry doesn't call it.
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8485>
Jason Ekstrand [Wed, 20 Jan 2021 17:36:54 +0000 (11:36 -0600)]
anv: Early-exit from cmd_buffer_flush_state
If we don't have any dynamic state, pipeline, or descriptor changes,
we can do a very quick early-exit instead of checking for a bunch of
stuff bit-by-bit.
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594>
Jason Ekstrand [Wed, 20 Jan 2021 17:35:17 +0000 (11:35 -0600)]
anv: Only flush descriptors used by the pipeline
Previously, if we had a pipeline transition from something which used,
say, tessellation to something which didn't and we ended up with
tessellation descriptors dirty, we could end up re-emitting far more
than necessary. With this commit, we mask off unused stages so we only
update when necessary.
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594>
Jason Ekstrand [Wed, 20 Jan 2021 17:29:53 +0000 (11:29 -0600)]
anv: Take the set of stages to flush in flush_descriptor_sets
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594>
Jason Ekstrand [Wed, 20 Jan 2021 16:35:51 +0000 (10:35 -0600)]
anv: Exit early from cmd_buffer_apply_pipe_flushes
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594>
Samuel Pitoiset [Fri, 22 Jan 2021 09:42:11 +0000 (10:42 +0100)]
radv: use a workgroup size of 8x8 for FMASK color expand
Probably better for access patterns.
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/8642>
Samuel Pitoiset [Fri, 22 Jan 2021 09:43:19 +0000 (10:43 +0100)]
radv: use the range aspect mask in FMASK color expand
Instead of harcoding it.
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/8642>
Samuel Pitoiset [Fri, 22 Jan 2021 09:40:44 +0000 (10:40 +0100)]
radv: add multi-layer support to FMASK color expand
For better performance for layered MSAA images.
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/8642>
Marek Olšák [Sun, 17 Jan 2021 23:48:09 +0000 (18:48 -0500)]
radeonsi: iterate from draw 1 for total/min_direct_count computation
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Thu, 14 Jan 2021 13:23:04 +0000 (08:23 -0500)]
radeonsi: enable accidentally disabled fast launch with non-indexed tri strips
Only *indexed* triangle strips hang.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Thu, 14 Jan 2021 05:03:23 +0000 (00:03 -0500)]
radeonsi: skip some code for ALLOW_PRIM_DISCARD_CS if tess or GS is enabled
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Tue, 12 Jan 2021 04:07:50 +0000 (23:07 -0500)]
radeonsi: rename SI_SGPR_RW_BUFFERS to SI_SGPR_INTERNAL_BINDINGS
They are just internal buffers and images.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Mon, 11 Jan 2021 19:52:00 +0000 (14:52 -0500)]
radeonsi: move if (sctx->vertex_buffers_dirty) into the upload function
This looks unnecessary, but the next commit will build upon it and add
more stuff into the function.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Mon, 11 Jan 2021 19:42:50 +0000 (14:42 -0500)]
radeonsi: don't set vertex buffer dirty flags when they don't do anything
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Sun, 10 Jan 2021 07:00:58 +0000 (02:00 -0500)]
radeonsi: move y_inverted out of si_viewports
for better packing
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Sun, 10 Jan 2021 06:58:31 +0000 (01:58 -0500)]
radeonsi: inline si_blend_color and si_clip_state structures
better packing
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Sun, 10 Jan 2021 05:45:22 +0000 (00:45 -0500)]
radeonsi: simplify determining whether render condition is enabled at draw time
Read one bool instead of reading one bool and one pointer.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Sun, 10 Jan 2021 03:58:40 +0000 (22:58 -0500)]
radeonsi: add internal blitter_running flag
to skip the indirection in si_decompress_textures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Sun, 10 Jan 2021 02:08:48 +0000 (21:08 -0500)]
radeonsi: don't use rasterizer_discard to validate draws, only check ps_shader
Let's just say that PS can never be NULL here.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Sat, 9 Jan 2021 13:58:11 +0000 (08:58 -0500)]
radeonsi: optimize translating index_size to index_type
gcc generated a lookup table for the switch. This replaces it with
arithmetics.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Sat, 9 Jan 2021 13:10:13 +0000 (08:10 -0500)]
radeonsi: don't mark NULL states as dirty in si_pm4_reset_emitted
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Sat, 9 Jan 2021 12:59:11 +0000 (07:59 -0500)]
radeonsi: clear dirty_states if si_pm4_bind_state is unbinding or no-op
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Marek Olšák [Sat, 9 Jan 2021 20:14:22 +0000 (15:14 -0500)]
radeonsi: add new possibly faster command submission helpers
This decreases the release libgallium_dri.so size without debug symbols
by 16384 bytes. The CPU time spent in si_emit_draw_packets decreased
from 4.5% to 4.1% in viewperf13/catia/plane01.
The previous code did:
cs->current.buf[cs->current.cdw++] = ...;
cs->current.buf[cs->current.cdw++] = ...;
cs->current.buf[cs->current.cdw++] = ...;
cs->current.buf[cs->current.cdw++] = ...;
The new code does:
unsigned num = cs->current.cdw;
uint32_t *buf = cs->current.buf;
buf[num++] = ...;
buf[num++] = ...;
buf[num++] = ...;
buf[num++] = ...;
cs->current.cdw = num;
The code is the same (radeon_emit is redefined as a macro) except that
all set and emit functions must be surrounded by radeon_begin(cs) and
radeon_end().
radeon_packets_added() returns whether there has been any new packets added
since radeon_begin.
radeon_end_update_context_roll(sctx) sets sctx->context_roll = true
if there has been any new packets added since radeon_begin.
For now, the "cs" parameter is intentionally unused in radeon_emit and
radeon_emit_array.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653>
Samuel Pitoiset [Mon, 18 Jan 2021 07:59:29 +0000 (08:59 +0100)]
radv: fix separate depth/stencil layout in render pass
We used to select the stencil layout even if we should have selected
the depth/stencil one.
Fixes:
e4c8491bdf8 ("radv: implement VK_KHR_separate_depth_stencil_layouts")
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/8552>
Erik Faye-Lund [Fri, 22 Jan 2021 10:42:18 +0000 (11:42 +0100)]
zink: respect fragment-shader depth-layout
This is required by GLSL 1.30 and later, so we should also respect the
setting.
Fixes:
6785d8c4601 ("zink: expose GLSL 1.30")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8644>
Erik Faye-Lund [Fri, 22 Jan 2021 11:41:42 +0000 (12:41 +0100)]
zink: make all xfb caps depend on extension
Without this, we'll expose GL_ARB_transform_feedback2 and
GL_ARB_transform_feedback3 even without VK_EXT_transform_feedback,
because these caps are directly wired up without checking the pervious
extensions.
Fixes:
e8ad52f7b0c ("zink: enable xfb extension in screen creation")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>
Erik Faye-Lund [Fri, 22 Jan 2021 11:23:10 +0000 (12:23 +0100)]
zink: require vulkan memory model for tesselation
We enable the KHR_vulkan_memory_model extension whenever we use
tesselation, so right now this is a defacto requirement. So let's make
this requirement explicit.
Fixes:
f815b87e188 ("zink: export tess shader pipe caps")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>
Erik Faye-Lund [Fri, 22 Jan 2021 08:22:12 +0000 (09:22 +0100)]
zink: check for extension instead of function
This shouldn't change any behavior, it just seems a bit more to the
point to check for the extension that decides if these are NULL or not
than to check both of them.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>
Erik Faye-Lund [Fri, 22 Jan 2021 08:15:10 +0000 (09:15 +0100)]
zink: respect feature-cap for multi-draw indirect
Even in the presence of VK_KHR_draw_indirect_count, we still technically
need to respect the feature-cap when using a Vk 1.0 core-function.
Fixes:
cef876910a0 ("zink: enable PIPE_CAP_MULTI_DRAW_INDIRECT(_PARAMS) caps")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>
Erik Faye-Lund [Fri, 22 Jan 2021 08:11:51 +0000 (09:11 +0100)]
zink: respect feature-cap for sample-shading
Vulkan has a cap to enable this, we should check that one rather than
always claiming support.
Fixes:
0c70268ff73 ("zink: mark ARB_sample_shading as supported")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>
Erik Faye-Lund [Fri, 22 Jan 2021 08:09:03 +0000 (09:09 +0100)]
zink: respect feature-cap for independent blending
Vulkan has a cap to enable this, we should check that one rather than
always claiming support.
Fixes:
8d46e35d16e ("zink: introduce opengl over vulkan")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>
Erik Faye-Lund [Fri, 22 Jan 2021 08:07:12 +0000 (09:07 +0100)]
zink: respect feature-cap for robust buffer access
Vulkan has a cap to enable this, we should check that one rather than
always claiming support.
Fixes:
61720098fa4 ("zink: set PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>
Erik Faye-Lund [Fri, 22 Jan 2021 08:00:48 +0000 (09:00 +0100)]
zink: always expose linear float textures
This is not an optional feature in Vulkan, so we can rely on this being
supported. This has the nice benefit of enabling OpenGL ES 3.0 support
on ANV.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>
Boyuan Zhang [Tue, 19 Jan 2021 00:21:35 +0000 (19:21 -0500)]
frontend/va/image: add pipe flush for vlVaPutImage
To fix synchronization issue between multimedia queue and gfx queue.
Adding flush call will let multimedia queue to wait for the content of gfx
command buffer to be executed, for the case where there is dependency
between these two queues.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8567>
Samuel Pitoiset [Fri, 11 Dec 2020 14:54:20 +0000 (15:54 +0100)]
radv: enable SQTT support on GFX10.3
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/8616>
Samuel Pitoiset [Fri, 11 Dec 2020 14:54:05 +0000 (15:54 +0100)]
ac,radv: add SQTT support on GFX10.3
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/8616>
Samuel Pitoiset [Thu, 21 Jan 2021 09:03:46 +0000 (10:03 +0100)]
ac/rgp: add support for GFX10.3
According to AMDVLK, GFX10.3 uses SQTT version 2.4.
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/8616>
Samuel Pitoiset [Thu, 21 Jan 2021 09:14:48 +0000 (10:14 +0100)]
radv: inhibit clock gating when tracing with SQTT
Cc: <mesa-stable@lists.freedesktop.org>
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/8616>
Samuel Pitoiset [Thu, 21 Jan 2021 12:39:27 +0000 (13:39 +0100)]
radv: fix overflow when computing the SQTT buffer size
With RADV_THREAD_TRACE_BUFFER_SIZE=
1073741824, the computed size
will overflow and be 4096 instead of
4294967296.
Cc: <mesa-stable@lists.freedesktop.org>
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/8616>
Rhys Perry [Thu, 21 Jan 2021 16:13:34 +0000 (16:13 +0000)]
aco: return references in instruction cast methods
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8595>
Rhys Perry [Wed, 20 Jan 2021 15:27:16 +0000 (15:27 +0000)]
aco: use format-check methods
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8595>
Rhys Perry [Wed, 20 Jan 2021 14:49:08 +0000 (14:49 +0000)]
aco: use instruction cast methods
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8595>
Rhys Perry [Wed, 20 Jan 2021 13:46:01 +0000 (13:46 +0000)]
aco: add instruction cast and format-check methods
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8595>
Rhys Perry [Wed, 20 Jan 2021 13:50:45 +0000 (13:50 +0000)]
aco: remove Format::{VOP3A,VOP3B}
These are really the same as Format::VOP3.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8595>
Víctor Manuel Jáquez Leal [Sun, 6 Dec 2020 13:56:58 +0000 (14:56 +0100)]
frontends/va/context: don't set max_references with num_render_targets
For HEVC and VP9 template's max_references are tied to the number of
surfaces associated with context. Later, the decoder is created if
max_references is different to zero.
But vaCreateContext() doesn't really need an array of VASurfaceIDs (see
https://lists.01.org/pipermail/intel-vaapi-media/2017-July/000052.html and
https://github.com/intel/libva/issues/251).
This patch removes the validation of the max_references at decoder
creation and also remove the assignation of num_render_targets to
max_references.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7949>
Rhys Perry [Fri, 22 Jan 2021 10:47:19 +0000 (10:47 +0000)]
aco: don't consider a phi trivial if same's register doesn't match the def
For example:
s2: %688:s[32-33] = p_linear_phi %3:s[10-11], %688:s[32-33]
would have been considered trivial.
This might happen due to parallelcopies when assigning phi registers.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes:
69b6069dd28 ("aco: refactor try_remove_trivial_phi() in RA")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8645>
Erik Faye-Lund [Fri, 22 Jan 2021 07:50:23 +0000 (08:50 +0100)]
docs/features: remove a few redundant zink mentions
GL 4.1 and 4.2 is listed as done for Zink anyway, so we don't need to
single out these features as supported any longer.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8639>
Erik Faye-Lund [Fri, 22 Jan 2021 07:03:59 +0000 (08:03 +0100)]
docs/features: add missing features for zink
Zink implements more features than currently maked off in features.txt,
so let's fill those bits in!
This is based on the output of glxinfo on ANV.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8639>
Alejandro Piñeiro [Fri, 15 Jan 2021 22:07:45 +0000 (23:07 +0100)]
v3dv: properly handle two different binding points for cmd_buffers
From vkCmdBindPipeline spec:
"pipelineBindPoint is a VkPipelineBindPoint value specifying to
which bind point the pipeline is bound. Binding one does not disturb
the others."
But internally we were only handling one pipeline per command buffer,
so binding a pipeline of one type would override an alredy bound
pipeline of other type.
Note that for push constants, in the same way that we were keeping one
client array and one bo for the values, for all stages, independently
of the stageFlags specified by vkCmdPushConstants, we are keeping the
same idea here, so such client array and bo is still tied to the
command buffer, and used by the two pipeline bind points. That makes
far easier tracking the push constants. We could revisit in the future
if we want a more fine grained tracking.
Fixes the following crashes:
dEQP-VK.pipeline.push_constant.lifetime.pipeline_change_diff_range_bind_push_vert_and_comp
dEQP-VK.pipeline.push_constant.lifetime.pipeline_change_same_range_bind_push_vert_and_comp
v2 (from Iago review)
* Move removal of v3dv_resource definition to a different commit.
* Use the new v3dv_cmd_pipeline_state on the cmd buffer meta
sub-struct, call it gfx for consistency
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8613>
Alejandro Piñeiro [Thu, 21 Jan 2021 13:18:14 +0000 (14:18 +0100)]
v3dv: drop v3dv_resource definition
In the end it became a v3dv_bo+offset combination, and for that we
already have v3dv_cl_reloc, so it became redundant.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8613>
Icecream95 [Thu, 21 Jan 2021 03:22:35 +0000 (16:22 +1300)]
panfrost: Add support for INTEL_blackhole_render
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8607>
Mike Blumenkrantz [Mon, 10 Aug 2020 18:46:23 +0000 (14:46 -0400)]
zink: support PIPE_FORMAT_X24S8_UINT
enables ARB_texture_view
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8630>
Mike Blumenkrantz [Mon, 10 Aug 2020 18:41:36 +0000 (14:41 -0400)]
zink: add layout member to barrier setup in draw
this lets us track different layouts
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8630>
Mike Blumenkrantz [Mon, 10 Aug 2020 18:40:34 +0000 (14:40 -0400)]
zink: support VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL usage
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8630>
Hoe Hao Cheng [Thu, 21 Jan 2021 16:09:55 +0000 (00:09 +0800)]
zink: expose PIPE_CAP_ANISOTROPIC_FILTER
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Fabio Pedretti <fabio.ped@libero.it>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8617>
Kenneth Graunke [Tue, 17 Nov 2020 21:38:03 +0000 (13:38 -0800)]
iris: Refactor iris_debug_recompile interface to take a shader.
This simplifies each call site slightly and will save some interface
churn in the next rework.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8634>
Kenneth Graunke [Tue, 17 Nov 2020 21:39:57 +0000 (13:39 -0800)]
iris: Drop iris_print_program_cache().
I have never used this to debug anything in iris, and it's been years
since I even thought about using i965's similar functionality. I'm
planning to move a bunch of shaders out of the global hash table, at
which point it'll be much less useful. So, just drop it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8634>
Kenneth Graunke [Sat, 19 Oct 2019 19:21:17 +0000 (12:21 -0700)]
iris: Drop find_existing_assembly optimization from program cache
This tried to de-duplicate identical copies of the same shader
assembly, but in the least efficient way possible: it did a linear
walk through every shader in the entire context memcmp'ing the
final assembly (after going through the effort to compile it).
In the end, all it saved was space and number of BOs, not even
state changes.
This optimization has been mostly replaced by st/mesa's cache
mechanism, which looks for multiple shaders that compile to the
same NIR and go further than this did, and actually reuse the
same pipe shader state. That's even more efficient than this.
This seems to still trigger some times, because the NIR that
st/mesa hashes hasn't quite been finalized and stripped. But
it would be better to improve that, not this.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8634>
Dylan Baker [Wed, 13 Jan 2021 18:29:39 +0000 (10:29 -0800)]
bin/post_version: convert the csv.reader into a concrete list
which is necessary to be able to index into it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8477>