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>
Mike Blumenkrantz [Mon, 10 Aug 2020 20:40:24 +0000 (16:40 -0400)]
zink: set PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8631>
Mike Blumenkrantz [Fri, 7 Aug 2020 15:03:39 +0000 (11:03 -0400)]
zink: set PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8631>
Mike Blumenkrantz [Fri, 7 Aug 2020 15:28:37 +0000 (11:28 -0400)]
zink: force per-sample interpolation
this gives us new rasterizer states when multisample stuff changes instead
of new fs states, which is what we want since these correlate to pipeline
flags, not shader-specific things
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8631>
Kenneth Graunke [Wed, 20 Jan 2021 22:10:49 +0000 (14:10 -0800)]
iris: Consider resolves after changing a resource's aux state
The intention of IRIS_DIRTY_{RENDER,COMPUTE}_RESOLVES_AND_FLUSHES
is to avoid considering resolves/flushes on back to back draw calls
where nothing of significance has changed with the resources. When
anything changes that could require a resolve, we must flag those.
Those situations are:
1. Texture/image/framebuffer bindings change
(as the set of images we need to look at is now different)
2. Depth writes are enabled/disabled (the resolve code uses this)
3. The aux state for a currently bound resource changes.
We were missing this last case. In particular, one example where
we missed this was:
1. Bind a texture.
2. Clear that texture (likely blits/copies/teximage would work too)
3. Draw and sample from that texture
Clear-then-Bind would work, as binding would flag resolves as dirty.
But Bind-then-Clear doesn't work, as clear can change the aux state
of the bound texture, but wasn't flagging that anything had changed.
Technically, we could consider whether the resource whose aux state
is changing is bound for compute (and only flag COMPUTE_RESOLVES),
or bound for a 3D stage (and only flag RENDER_RESOLVES), and flag
nothing at all if it isn't bound. But we don't track that well,
and it probably isn't worth bothering. So, flag unconditionally
for now.
This does not appear to impact Piglit's drawoverhead scores.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3994
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4019
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8603>
Mike Blumenkrantz [Fri, 7 Aug 2020 13:42:43 +0000 (09:42 -0400)]
zink: set PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS
ARB_copy_image is already supported
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8625>
Marek Olšák [Mon, 23 Nov 2020 04:30:57 +0000 (23:30 -0500)]
st/mesa: enable state var merging to improve fetch_state performance
The requirement is that drivers must implement finalize_nir for
st_finalize_nir to be invoked at link time and before shader variant
generation. Without that, _mesa_optimize_state_parameters won't be called.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sun, 13 Dec 2020 04:28:06 +0000 (23:28 -0500)]
mesa: merge equivalent switch cases in prog_statevars.c
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 12 Dec 2020 18:20:20 +0000 (13:20 -0500)]
mesa: sort and tightly pack STATE_* enums to generate better switch code
The enums are sorted by their occurence in fetch_state.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 12 Dec 2020 18:19:39 +0000 (13:19 -0500)]
mesa: don't handle STATE_* enums in fetch_state that don't do anything
_mesa_program_state_flags() already reports invalid state flags. fetch_state is
always called after that.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 12 Dec 2020 06:39:29 +0000 (01:39 -0500)]
mesa: compute gl_program_parameter_list::UniformBytes accurately
The previous code didn't do it correctly.
(e.g. _mesa_recompute_parameter_bounds didn't do anything)
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 12 Dec 2020 00:35:16 +0000 (19:35 -0500)]
mesa: add upper bound to limit program state var iterations
State parameters are sometimes not perfectly sorted.
This optimizes the number of iterations we have to do for fetch_state.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 12 Dec 2020 03:17:35 +0000 (22:17 -0500)]
mesa: sort state vars with constant indexing for ARB programs
This enables merging of state variables such as local parameters
for faster constant uploads. For Trine 2, this mainly sorts local
parameters which are in a random order.
Originally, the next pass added state variables (the code after this code).
If we add them before that, _mesa_add_state_reference will be a no-op
later and will return the ones we added.
So add all state parameters (without indirect indexing). After they are
added, sort them within the parameter list. Then fix their offsets to
correspond to their location after sorting.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 12 Dec 2020 02:23:58 +0000 (21:23 -0500)]
mesa: merge local and env program parameters for faster uploads
This reduces CPU overhead for applications using ARB programs.
We can simply memcpy all local and env parameters into a constant buffer
if there are no holes.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 12 Dec 2020 02:00:29 +0000 (21:00 -0500)]
mesa: don't allocate local parameters in fetch_state
It's better to return what the user expects: the initial value.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 12 Dec 2020 01:45:36 +0000 (20:45 -0500)]
mesa: optimize get_local_param_pointer and program_local_parameters4fv
The idea is to:
- eliminate the if statement that selects MaxLocalParams according to
the shader type by moving it into the new on-demand initialization block
- move allocation of local parameters into the on-demand initialization
block
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 12 Dec 2020 06:46:43 +0000 (01:46 -0500)]
mesa: rename STATE_LIGHT_ATTRIBS -> STATE_LIGHT_ARRAY for consistency
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Fri, 11 Dec 2020 21:59:00 +0000 (16:59 -0500)]
mesa: skip memmove in optimize_state_parameters if it's no-op
This doesn't change the behavior. Check if there is at least 1 element
that follows removed parameters.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 5 Dec 2020 14:17:17 +0000 (09:17 -0500)]
glsl: split gl_CurrentAttribFragMESA into elements
This reduces the constant buffer size by eliminating unused elements
because it's no longer a uniform array that the compiler can't split.
This looks silly, but there is no other way because all elements must be
globally declared, which means they can't be generated by a loop.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 5 Dec 2020 13:59:20 +0000 (08:59 -0500)]
glsl: remove unused internal builtin gl_CurrentAttribVertMESA
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 5 Dec 2020 02:02:36 +0000 (21:02 -0500)]
mesa: eliminate the switch statement for STATE_TEXGEN
The memory layout of texgen planes must be adjusted to allow
the elimination of switch statements in fetch_state.
v2: change the static asserts to compile on MSVC
Reviewed-by: Eric Anholt <eric@anholt.net> (v1)
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 5 Dec 2020 01:22:15 +0000 (20:22 -0500)]
mesa: flatten STATE_MATERIAL and STATE_LIGHTPROD tokens
Flattening continue to get optimal code in fetch_state.
This merges the "face" field with the "attrib" field using the combined
MAT_ATTRIB_* enums. The outcome is that the inner switch statements can
be flatten because we can use MAT_ATTRIB_* to index into the attrib array
directly.
With LightSource attributes that don't have two sides, more math is
involved to get the correct index but it works out nicely too.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 5 Dec 2020 00:50:53 +0000 (19:50 -0500)]
mesa: combine STATE_ENV, STATE_LOCAL enums with STATE_xxx_PROGRAM
flattening continues to get optimal code in fetch_state
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Marek Olšák [Sat, 5 Dec 2020 00:19:22 +0000 (19:19 -0500)]
mesa: remove STATE_INTERNAL
Let's flatten the tokens to generate optimal code for fetch_state.
There was only one name conflict: STATE_NORMAL_SCALE was used both as
internal and non-internal.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
Mike Blumenkrantz [Thu, 21 Jan 2021 19:37:57 +0000 (14:37 -0500)]
docs/features: mark off GL 4.2 for zink
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8620>
Mike Blumenkrantz [Thu, 6 Aug 2020 19:24:52 +0000 (15:24 -0400)]
zink: GLSL 420
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8620>
Vinson Lee [Tue, 19 Jan 2021 02:31:04 +0000 (18:31 -0800)]
nv50/ir: Initialize CodeEmitter members in constructor.
Fix defects reported by Coverity Scan.
uninit_member: Non-static class member code is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member codeSize is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member codeSizeLimit is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member relocInfo 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/8569>
Ilia Mirkin [Tue, 19 Jan 2021 10:17:45 +0000 (05:17 -0500)]
nvc0/ir: add fixup to deal with interpolateAtSample with non-MSAA
The spec calls to always use sample 0 in this case, whereas we can do
undefined things for invalid sample id's in the MSAA case.
Fixes
dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.non_multisample_buffer.sample_n_*
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8574>
Andres Gomez [Sat, 16 Jan 2021 00:46:54 +0000 (02:46 +0200)]
ci: correct the trace image URLs in the piglit summary
Fixes:
09429fa85b6 ("ci: add piglit replay jobs and remove tracie ones")
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8531>
Andres Gomez [Fri, 15 Jan 2021 22:04:41 +0000 (00:04 +0200)]
ci: recover tracie dashboard URLs for failing traces
Tracie was including a direct link to the diff page in the resulting
JUnit XML file and the migration to piglit's replayer didn't, causing
a regression.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4027
Fixes:
09429fa85b6 ("ci: add piglit replay jobs and remove tracie ones")
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8531>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:52:54 +0000 (18:52 -0500)]
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/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:52:11 +0000 (18:52 -0500)]
zink: check if multisample support exists for shader image formats
avoid issues later by checking this now while we're here
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:50:35 +0000 (18:50 -0500)]
zink: handle shader image descriptor updates during draw
this is ugly and will be cleaned up later, but the idea is to have identical
handling between samplers and images such that for each type, an array of resources
is processed and it's just setting up variables which fall through to the actual
descriptor struct processing
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:49:10 +0000 (18:49 -0500)]
zink: add a pipe_context::set_shader_images hook
this is sort of a weird mechanism since shader images have no allocated
struct and just hang out on the context
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:48:36 +0000 (18:48 -0500)]
zink: break out bufferview creation into separate function
we'll reuse this for shader images
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:47:33 +0000 (18:47 -0500)]
zink: handle image descriptors during zink_shader creation
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:46:58 +0000 (18:46 -0500)]
zink: enable image caps in ntv when a shader has images
since we don't have the device info we have to emit some caps on the
fly here
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:46:22 +0000 (18:46 -0500)]
zink: enable early frag test execution in ntv when necessary
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:45:17 +0000 (18:45 -0500)]
zink: add handling for all basic image ops in ntv
now that atomic handling is standardized, there's only a few actual ops left
to have proper image support
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:43:54 +0000 (18:43 -0500)]
zink: expand ntv array derefs to track image derefs
this is sort of what we should be moving towards for io as well at some point,
the gist of the change here being that when images are deref'd, we need
to be able to do a lookup on the deref store later on in order to get the
image back
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Fri, 18 Dec 2020 00:45:48 +0000 (19:45 -0500)]
zink: add nir_var_uniform case to get_storage_class()
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:43:10 +0000 (18:43 -0500)]
zink: handle nir_intrinsic_memory_barrier in ntv
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:41:33 +0000 (18:41 -0500)]
zink: handle more atomic ops in ntv
this standardizes and simplifies atomic op dispatch since none of them have
any special handling
it also removes unnecessary (but harmless) memory semantics from a previous commit
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:38:36 +0000 (18:38 -0500)]
zink: handle image variable types in ntv
this just does spirv variable setup
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:37:38 +0000 (18:37 -0500)]
zink: add new 'sampler_types' variable to ntv_context struct
image_types will be used for images in the next commit
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:30:45 +0000 (18:30 -0500)]
zink: add shader image support to zink_binding()
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:27:51 +0000 (18:27 -0500)]
zink: add a pipe_context::memory_barrier hook
I'm not claiming this is 100% correct, but it works
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:29:15 +0000 (18:29 -0500)]
zink: add 'has_draw' flag to batch struct
this tells us if a batch has a draw command pending
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:26:01 +0000 (18:26 -0500)]
zink: verify format caps and add storage image usage when possible in creation
this is a huge perf hog that will be improved on later, but it's necessary for now
in order to correctly determine whether we can use resources as shader images
since gallium gives us no info about usage
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:23:13 +0000 (18:23 -0500)]
zink: add ntv function for emitting variable access decorations
these are used for images
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:20:14 +0000 (18:20 -0500)]
zink: add spirv builder functions for image ops
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:17:41 +0000 (18:17 -0500)]
zink: add spirv_builder function for hexops
these are functions with 6 operands
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Fri, 15 Jan 2021 13:12:27 +0000 (08:12 -0500)]
zink: rewrite image/sampler glsl -> vk type functions for robustness
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 17 Nov 2020 23:17:10 +0000 (18:17 -0500)]
zink: add ntv util function for getting image type
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Mike Blumenkrantz [Tue, 4 Aug 2020 20:36:27 +0000 (16:36 -0400)]
zink: rename zink_context::*image_views -> sampler_views
this is wrongly named and conflicts with things that are actually
image_views (assuming we're using gallium terminology in order to match
the rest of the ecosystem)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
Rhys Perry [Tue, 25 Aug 2020 16:26:35 +0000 (17:26 +0100)]
radv: sink load_ssbo
fossil-db (GFX10.3):
Totals from 11485 (8.24% of 139391) affected shaders:
SGPRs: 1032456 -> 1033696 (+0.12%); split: -0.69%, +0.81%
VGPRs: 815332 -> 807448 (-0.97%); split: -1.04%, +0.07%
SpillSGPRs: 18014 -> 13497 (-25.07%); split: -28.28%, +3.20%
SpillVGPRs: 1821 -> 1749 (-3.95%)
CodeSize:
101194172 ->
101235028 (+0.04%); split: -0.06%, +0.10%
Scratch: 198656 -> 178176 (-10.31%)
MaxWaves: 86703 -> 87219 (+0.60%); split: +0.67%, -0.07%
Instrs:
19224250 ->
19238562 (+0.07%); split: -0.05%, +0.13%
Cycles:
1486045388 ->
1487481292 (+0.10%); split: -0.03%, +0.13%
VMEM: 2040484 -> 2127647 (+4.27%); split: +6.64%, -2.37%
SMEM: 724060 -> 674966 (-6.78%); split: +1.22%, -8.00%
VClause: 312375 -> 314735 (+0.76%); split: -0.26%, +1.02%
SClause: 702274 -> 711991 (+1.38%); split: -0.77%, +2.15%
Copies: 1413440 -> 1422782 (+0.66%); split: -0.45%, +1.11%
Branches: 658696 -> 658838 (+0.02%); split: -0.12%, +0.14%
PreSGPRs: 884666 -> 879736 (-0.56%); split: -1.30%, +0.74%
PreVGPRs: 777374 -> 769947 (-0.96%)
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/6490>
Rhys Perry [Thu, 21 Jan 2021 17:01:07 +0000 (17:01 +0000)]
nir/sink,nir/move: sink/move reorderable load_ssbo
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/6490>
Rhys Perry [Tue, 25 Aug 2020 16:23:36 +0000 (17:23 +0100)]
radv: use nir_opt_access
fossil-db (GFX10.3):
Totals from 3231 (2.32% of 139391) affected shaders:
SGPRs: 168654 -> 167454 (-0.71%); split: -0.72%, +0.00%
VGPRs: 152352 -> 152416 (+0.04%)
CodeSize:
13872836 ->
13806376 (-0.48%); split: -0.50%, +0.02%
MaxWaves: 36640 -> 36634 (-0.02%)
Instrs: 2639959 -> 2626852 (-0.50%); split: -0.52%, +0.03%
Cycles:
77706000 ->
77496792 (-0.27%); split: -0.28%, +0.01%
VMEM: 809496 -> 790847 (-2.30%); split: +2.06%, -4.36%
SMEM: 267843 -> 253187 (-5.47%); split: +0.76%, -6.23%
VClause: 61353 -> 60426 (-1.51%); split: -1.86%, +0.35%
SClause: 95409 -> 92355 (-3.20%); split: -3.24%, +0.04%
Copies: 194951 -> 196702 (+0.90%); split: -0.53%, +1.43%
Branches: 84320 -> 84331 (+0.01%); split: -0.00%, +0.02%
PreSGPRs: 110162 -> 110203 (+0.04%); split: -0.04%, +0.07%
PreVGPRs: 127021 -> 127037 (+0.01%)
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/6490>
Erik Faye-Lund [Thu, 21 Jan 2021 14:16:49 +0000 (15:16 +0100)]
docs: turn non-code into comment
If we want syntax-highlighting to actually work here, we should make
sure the code actually parses.
This fixes a warning during docs build.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8243>
Erik Faye-Lund [Wed, 6 Jan 2021 12:23:35 +0000 (13:23 +0100)]
docs: fix broken link
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8243>
Erik Faye-Lund [Mon, 28 Dec 2020 12:37:13 +0000 (13:37 +0100)]
docs: fix sphinx-warnings due to lacking escaping
There's a few more cases that needs proper quoting for Sphinx. Asterisks
and ticks at the start of words, as well as underscores at the end of
symbols, even when they have trailing escaped characters.
We should really find a way to robustly escape these things when
generating them.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8243>
Alejandro Piñeiro [Tue, 12 Jan 2021 11:09:46 +0000 (12:09 +0100)]
v3dv/descriptor: assert CrateDescriptorPool receives valid count values
Although I assume that this should be caught by the validation layers,
recently while triaging the following tests:
dEQP-VK.ycbcr.query.*r8g8b8a8_unorm*
We found that they were setting a descriptorCount of zero, because it
was not handling correctly the differences between Vulkan 1.0 and
Vulkan 1.1.
So let's just assert, just in case it happens again, as that would
make the bugfixing far easier.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8614>
Arcady Goldmints-Orlov [Tue, 19 Jan 2021 00:16:12 +0000 (18:16 -0600)]
v3dv: Fix uninitialized variable warnings
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8570>
Iago Toral Quiroga [Thu, 21 Jan 2021 10:39:58 +0000 (11:39 +0100)]
v3dv: fix disabling Early Z for the whole frame
The documentation states that if we disable Early Z for the whole
frame in the RCL Tile Rendering Mode packet, then we should not
emit any draw calls with it enabled (which we can do by enabling
it in the CFG_BITS packet).
Since we emit our RCL after recording our draw calls in the BCL
and we were not considering there if any condition for global disable
would be met, it was possible that we end up with an incorrect
configuration when we decide for a global disable in the RCL, which
can cause rendering artifacts. This can be easily observed by simply
forcing the RCL bit to disable early Z in applications that are known
to enable it in CFG_BITS (such as the UE Shooter demo for example).
With this change we keep track of this scenario when we record
draw calls in the BCL and if decide that we need to disable EZ for
the entire job, we make sure we never enable it for any draw calls
in the frame.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589>
Iago Toral Quiroga [Wed, 20 Jan 2021 09:31:01 +0000 (10:31 +0100)]
v3dv: enable early Z/S clears
This is an optimization that should make Z/S clears faster. To enable
this we can't have any Z/S loads or stores in the job. Also, it seems
that enabling early Z/S clearing is independent of whether early Z/S
testing is enabled.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589>
Iago Toral Quiroga [Wed, 20 Jan 2021 08:51:33 +0000 (09:51 +0100)]
v3dv: do not emit full tile buffers clears to handle Z/S clears
There was a misunderstanding regarding the scope of some hardware bugs
that led us to think that:
1. The Clear Tile Buffer Z/S bit was broken
2. The Clear Tile Buffer RTs bit would also clear Z/S.
1) is not really true, what happened was that some other bugs for which
we need workarounds anyway would have that effect. 2) was only true
for V3D 4.1, so it doesn't affect v3dv.
This change makes proper use of the Z/S bit instead of falling back to
clearing all tile buffers every time we have a Z/S clear. This also
allows us to do color clears on the tile store (which is faster) rather
than falling back to the clear all RTs bit every time we have a Z/S clear.
v2: rewrite the original comment about the hardwarebug description to
include recent discussions with Broadcom instead of keeping it as
is and amending it with an update note.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589>
Iago Toral Quiroga [Wed, 20 Jan 2021 08:46:53 +0000 (09:46 +0100)]
v3dv: refactor checks for subpass attachment stores
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589>
Iago Toral Quiroga [Wed, 20 Jan 2021 08:36:06 +0000 (09:36 +0100)]
v3dv: refactor checks for subpass attachment loading
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589>
Iago Toral Quiroga [Tue, 19 Jan 2021 09:01:42 +0000 (10:01 +0100)]
v3dv: refactor checks for subpass attachment clears
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589>
Rhys Perry [Fri, 18 Dec 2020 13:19:50 +0000 (13:19 +0000)]
radv,aco: use deref_buffer_array_length
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3993
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8163>
Rhys Perry [Mon, 7 Dec 2020 14:44:15 +0000 (14:44 +0000)]
nir/lower_io: fix array_length lowering if buffer is smaller than offset
Matches SPIR-V -> NIR implementation of OpArrayLength.
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/8163>
Daniel Schürmann [Thu, 21 Jan 2021 11:13:39 +0000 (12:13 +0100)]
radv: don't vectorize shift operations
Currently, these cannot be vectorized as in NIR
shift operands are 32bit while for 16bit-vectorization
they need to be 16bit.
No fossildb changes.
Fixes:
fcd2ef23e5f1d50008166168e772815c0213e37c ('radv: vectorize 16bit instructions')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8612>
Erik Faye-Lund [Wed, 20 Jan 2021 09:19:32 +0000 (10:19 +0100)]
zink: fix vertex-stride wrangling
Because Gallium and Vulkan disagree on what kind of state strides is, we
need to wrangle this state a bit, and up until now, we've been simply
fixing this up while binding the vertex-buffers.
But this isn't robust, because the vertex element state might be bound
after the vertex-buffer state was bound. We also need to take
binding-map into account, which we're currently missing as well.
Instead, w need to deal with this at a place where we know what's being
used for both of these. So let's do this during draw instead.
Ideally, we'd also do some dirty-tracking to know if this is needed or
not, but I believe Mike has some patches in this areas lined up, so it
might be easier to wait for those.
Fixes:
8d46e35d16e ("zink: introduce opengl over vulkan")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3661
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4125
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8588>
Daniel Schürmann [Fri, 15 Jan 2021 08:23:04 +0000 (09:23 +0100)]
aco/optimizer: convert extract_vector with index 0 into parallelcopies if possible
Totals from 273 (0.20% of 139391) affected shaders (Navi10):
VGPRs: 11600 -> 11792 (+1.66%)
CodeSize: 1389304 -> 1383152 (-0.44%); split: -0.53%, +0.08%
MaxWaves: 3848 -> 3752 (-2.49%)
Instrs: 240228 -> 239478 (-0.31%); split: -0.37%, +0.06%
Cycles:
20637708 ->
20580024 (-0.28%); split: -0.46%, +0.18%
VMEM: 39164 -> 38831 (-0.85%); split: +0.06%, -0.91%
SMEM: 21743 -> 22204 (+2.12%)
VClause: 4787 -> 4783 (-0.08%)
Copies: 39057 -> 38308 (-1.92%); split: -2.28%, +0.37%
Branches: 6556 -> 6557 (+0.02%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260>
Daniel Schürmann [Thu, 31 Dec 2020 11:04:11 +0000 (11:04 +0000)]
aco/optimizer: expand subdword vectors with SGPRs on all generations
No fossildb changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260>
Daniel Schürmann [Thu, 31 Dec 2020 11:01:08 +0000 (11:01 +0000)]
aco: propagate temporaries into PSEUDO instructions if it can take it
This patch relaxes copy-propagation for PSEUDO instructions with
subdword Operands / Definitions:
general:
- only propagate VGPR temps if the Definition is VGPR (or on p_as_uniform)
parallelcopy/create_vector/phis:
- size has to be the same
extract_vector/split_vector:
- propagate SGPR temps on GFX9+ or if the Definitions are not subdword
- split_vector: size must not increase
Totals from 282 (0.20% of 140985) affected shaders (Polaris10):
VGPRs: 14520 -> 14408 (-0.77%)
CodeSize: 2693956 -> 2694316 (+0.01%); split: -0.20%, +0.21%
Instrs: 512874 -> 512864 (-0.00%); split: -0.16%, +0.16%
Cycles:
26338860 ->
26320652 (-0.07%); split: -0.36%, +0.29%
VMEM: 49460 -> 49634 (+0.35%); split: +0.47%, -0.12%
SMEM: 10035 -> 10036 (+0.01%)
VClause: 7675 -> 7674 (-0.01%)
Copies: 66012 -> 65943 (-0.10%); split: -1.31%, +1.20%
Branches: 17265 -> 17281 (+0.09%); split: -0.10%, +0.19%
PreVGPRs: 12211 -> 12124 (-0.71%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260>
Daniel Schürmann [Thu, 31 Dec 2020 10:46:37 +0000 (10:46 +0000)]
aco/validate: relax subdword restrictions
This affects constants/SGPRs on GFX6-8 and
the operand regClass of SDWA instructions.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260>
Daniel Schürmann [Thu, 31 Dec 2020 10:43:43 +0000 (10:43 +0000)]
aco/validate: ensure that Operand and Definition size matches for parallelcopies
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260>
Daniel Schürmann [Wed, 30 Dec 2020 16:38:08 +0000 (16:38 +0000)]
aco/validate: validate that p_create_vector operands are aligned unless they are subdword operands
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260>