Commit Graph

141853 Commits

Author SHA1 Message Date
Jason Ekstrand dd890f520e iris/bufmgr: Stop changing mapping modes on buffers
With discrete GPUs, we aren't able to change mapping modes after we've
created a buffer.  This is a limitation of TTM.  However, we already
have a buffer cache and it's pretty likely that stuff in any given
memzone will end up with just the one mapping type anyway so this
shouldn't have much of a cost.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11583>
2021-06-29 17:03:25 +00:00
Emma Anholt b18cf54f0d intel: Early exit from inst_is_in_block().
Surely the compiler would sort that out, you would think.  But no, my
debugoptimized build improves
dEQP-GLES31.functional.ubo.random.all_per_block_buffers.13 runtime by 25%
on my SKL from this change.

This was the slowest test in the GLES31 tests on APL in CI, at 22s.  And
yes, we were spending around half of our runtime in this function.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11631>
2021-06-29 16:48:40 +00:00
Gert Wollny 3a9716e6b1 virgl: Enable ASTC formats also for 3D textures
The texture compression can also be used for 2D arrays and
3D textures.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11634>
2021-06-29 16:14:43 +02:00
Rhys Perry 90c14398a3 docs/envvars: fix RADV_TEX_ANISO
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11640>
2021-06-29 13:22:34 +00:00
Gert Wollny d1edf3cdf2 r600/sfn: Lower offset in TXF instructions
Closes: #4960
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11639>
2021-06-29 14:28:51 +02:00
Samuel Pitoiset 4a031a01ba radv: fix RADV_FORCE_VRS for 2x1 and 1x2
The rates were inverted.

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/11578>
2021-06-29 12:47:49 +02:00
Juan A. Suarez Romero 2ce2f09baf ci/vc4: update piglit failures
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11521>
2021-06-29 10:28:34 +00:00
Iago Toral Quiroga 8fada5cb21 broadcom/compiler: use nir_sort_variables_with_modes
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11624>
2021-06-29 10:11:58 +00:00
Rhys Perry ebeda07801 aco/tests: fix 32-bit build
"call of overloaded ‘Operand(long unsigned int)’ is ambiguous"

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11627>
2021-06-29 09:55:32 +00:00
Ishi Tatsuyuki 4f959e368c radv: ignore redundant variable descriptor counts (v2)
The Vulkan specification says: "If VkDescriptorSetAllocateInfo::pSetLayouts[i]
does not include a variable count descriptor binding, then
pDescriptorCounts[i] is ignored". The previous code triggered an assertion
in such cases, and this patch fixes it.

v2: removed the offending assertion that is now always satisfied and
    reworded the commit message with a reference to Vulkan spec.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4992
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11576>
2021-06-29 09:29:40 +00:00
Connor Abbott 42b3d83dd4 ir3/lower_parallelcopy: Use SWZ
shader-db results on a650:

total instructions in shared programs: 1575484 -> 1574866 (-0.04%)
instructions in affected programs: 32579 -> 31961 (-1.90%)
helped: 75
HURT: 0
helped stats (abs) min: 1 max: 98 x̄: 8.24 x̃: 7
helped stats (rel) min: 0.41% max: 30.12% x̄: 2.47% x̃: 1.13%
95% mean confidence interval for instructions value: -10.97 -5.51
95% mean confidence interval for instructions %-change: -3.44% -1.51%
Instructions are helped.

total nops in shared programs: 355742 -> 355628 (-0.03%)
nops in affected programs: 18635 -> 18521 (-0.61%)
helped: 55
HURT: 147
helped stats (abs) min: 1 max: 14 x̄: 4.76 x̃: 6
helped stats (rel) min: 1.41% max: 100.00% x̄: 8.13% x̃: 4.76%
HURT stats (abs)   min: 1 max: 2 x̄: 1.01 x̃: 1
HURT stats (rel)   min: 0.56% max: 25.00% x̄: 2.09% x̃: 1.20%
95% mean confidence interval for nops value: -0.98 -0.15
95% mean confidence interval for nops %-change: -1.93% 0.55%
Inconclusive result (%-change mean confidence interval includes 0).

total non-nops in shared programs: 1219742 -> 1219238 (-0.04%)
non-nops in affected programs: 61125 -> 60621 (-0.82%)
helped: 220
HURT: 0
helped stats (abs) min: 1 max: 99 x̄: 2.29 x̃: 1
helped stats (rel) min: 0.19% max: 29.17% x̄: 0.90% x̃: 0.40%
95% mean confidence interval for non-nops value: -3.26 -1.32
95% mean confidence interval for non-nops %-change: -1.24% -0.56%
Non-nops are helped.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Connor Abbott 92bb37cb59 ir3: Add min gen for multi-mov instructions
swz works on a5xx/a6xx but not a3xx according to CI. I don't have any
access to a4xx HW so I can't tell whether it works there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Connor Abbott 78ab6250b5 ir3: Print multi-mov instructions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Connor Abbott b7f114ea13 ir3/validate: Support multi-mov instructions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Connor Abbott 81812acccc ir3: Use correct flags for movmsk & multi-mov
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Connor Abbott 7036e4fd31 ir3/legalize: Support multi-mov instructions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Connor Abbott 3896de621e ir3/postsched: Support multi-mov instructions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Connor Abbott 95e9a15f03 ir3/delay: Support multi-mov instructions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Connor Abbott ab440d5141 ir3: Support multi-mov instructions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Connor Abbott ea325226d6 ir3: Add foreach_dst/foreach_dst_n
And cleanup a few places I know of that are open-coding it

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Connor Abbott 6b00db0183 ir3: Prepare dest helpers for multi-dst instructions
Assert in dest_regs() that dst_count == 1, since most users of it will
blow up if they encounter multiple destinations, and split out the core
of writes_gpr() so that we can easily make code using it multi-dst
aware.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Connor Abbott 48f5f3be5f ir3: Stop creating dummy dest registers
These were a holdover from before the src/dst split and are no longer
necessary. Just don't create any dest registers for instructions that
never have a destination.

This has the side-effect that it becomes easier to replace uses of
dest_regs() with a per-register thing, once we start adding support for
multiple destinations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11565>
2021-06-29 08:08:12 +00:00
Iago Toral Quiroga 6d84348bb4 v3dv: expose support for basic subgroup operations
Relevant CTS tests (requires Vulkan 1.1):
dEQP-VK.subgroups.builtin_var.compute.*
dEQP-VK.subgroups.basic.compute.*

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
2021-06-29 08:43:06 +02:00
Iago Toral Quiroga b7cbb38222 v3dv: expose correct subgroup size
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
2021-06-29 08:43:06 +02:00
Iago Toral Quiroga bf175fbb6a broadcom/util: don't use compute supergroup packing with subgroups
When using subgroups there are additional restrictions to consider,
so for now we keep it simple and disable supergroup packing in that
scenario.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
2021-06-29 08:43:06 +02:00
Iago Toral Quiroga 10313b03b5 broadcom/compiler: track if a compute shader uses subgroup functionality
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
2021-06-29 08:43:06 +02:00
Iago Toral Quiroga 5081de07f7 broadcom/compiler: add a set_a_flags_for_subgroup helper
We will need this in the future to implement more subgroup operations,
so make this code available in a helper.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
2021-06-29 08:43:06 +02:00
Iago Toral Quiroga b9f510087d broadcom/compiler: add a ntq_emit_cond_to_bool helper
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
2021-06-29 08:43:06 +02:00
Iago Toral Quiroga 53341e44ad broadcom/compiler: implement more subgroup intrinsics
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
2021-06-29 08:43:06 +02:00
Iago Toral Quiroga 87fa5908b3 broadcom/compiler: add FLAFIRST and FLNAFIRST opcodes
We will at least need the former to implement subgroupElect()

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
2021-06-29 08:43:06 +02:00
Iago Toral Quiroga a9ad04f17d broadcom/compiler: lower nir_intrinsic_load_num_subgroups
The number of subgroups is the local workgroup size divided by the
dispatch width.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
2021-06-29 08:43:06 +02:00
Iago Toral Quiroga 30dec8b414 broadcom/compiler: implement nir_intrinsic_load_subgroup_id correctly
For some reason, this was implemented with the bulk of the compute
shader enablement, but this intrinsic is specific to subgroups and
thus was not really used. Also, its implementation was not correct,
since it was returning the element index within the subgroup, not
the subgroup index itself, which is the index of the batch in the
dispatch.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
2021-06-29 08:43:06 +02:00
Lionel Landwerlin 71b7c7b0dc intel/perf: use the right popcount for 64bits
We're currently using the 32bit version which is dropping half the
bits of the 64bits values.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11607>
2021-06-29 06:29:53 +00:00
Timothy Arceri 01fa90b456 util: add some workarounds for the game Luna Sky
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4948

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11602>
2021-06-29 02:59:28 +00:00
Timothy Arceri a73e7305e9 util/driconf: add new ignore_write_to_readonly_var workaround
This forces the GLSL compiler to ignore writes to readonly vars
rather than throwing an error.

Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11602>
2021-06-29 02:59:28 +00:00
Timothy Arceri e607205af0 glsl: force_glsl_version to shaders with no defined version
If a shader has no defined version force_glsl_version was
previous ignored and the shader would default to 110. This updates
the code so that those shaders are forced to a new level also.

We reused the existing code to make sure a sensible value is set
for the version.

Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11602>
2021-06-29 02:59:28 +00:00
Timothy Arceri 02dd03ff3c i965: don't crash on incorrect texture use
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4995

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11603>
2021-06-29 01:38:05 +00:00
Timothy Arceri 328ea8e04a mesa: don't crash on incorrect texture use
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4995

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11603>
2021-06-29 01:38:05 +00:00
Timothy Arceri a917c7433a util/tests: initialise key in cache_test
Fixes: e8495646af ("glsl/tests: changes to test_disk_cache_create test")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2631

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11623>
2021-06-28 23:53:10 +00:00
Yiwei Zhang 58a4ae3b99 venus: resolve AHB external format with DRM format
AHardwareBuffer_Format is lossier than DRM_FORMAT_*, which ends up with
unable to resolve implementation defined format upon creating sampler
ycbcr conversion. So we now use DRM format as AHB external format.

An external format error return in vkCreateSamplerYcbcrConversion is
also removed here since that is already an invalid usage per spec
(partly because there is no proper error code to return here).

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11480>
2021-06-28 22:18:19 +00:00
Yiwei Zhang 0679cffb02 venus: remove unsupported AHB formats
Likely not going to support them either.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11480>
2021-06-28 22:18:19 +00:00
Yiwei Zhang 891cf98a88 venus: use the mesa "drm-uapi/drm_fourcc.h" header
Prepare for later CI integration.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11480>
2021-06-28 22:18:19 +00:00
Emma Anholt 71617c3328 i915g: Fix off-by-one in constant count assertion.
You can have up to C[31].

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11617>
2021-06-28 15:01:37 -07:00
Emma Anholt ccc9418b27 i915g: Mark program errors on setting up temps, constants, and immediates.
We would proceed through the compiler, and usually fail for some other
reason (ALU ops, etc.), but best to be sure.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11617>
2021-06-28 15:01:37 -07:00
Emma Anholt 7ddebb0289 i915g: Remove redundant p->error setting.
i915_program_error() already does it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11617>
2021-06-28 15:01:37 -07:00
Emma Anholt ec646fdd45 i915g: Use stdbool.h instead of custom bools.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11617>
2021-06-28 15:01:37 -07:00
Emma Anholt 247cee92df i915g: replace "uint" with normal uint32_t.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11617>
2021-06-28 15:01:37 -07:00
Emma Anholt c786159186 i915g: Improve logging of unsupported opcodes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11617>
2021-06-28 15:01:37 -07:00
Emma Anholt e65ea05276 i915g: Stop translating the fragment program on the first error.
It would proceed through printing errors for each of the unsupported loop
opcodes in the program.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11617>
2021-06-28 15:01:37 -07:00
Emma Anholt 8259ff0d22 i915g: Log program compile errors to mesa_loge().
Now these major driver failures are no longer hidden under -DDEBUG, and
would also work on android (you know, if you cared).  We do want to
suppress logging for u_blitter shaders that fail to compile during
util_blitter_cache_all_shaders().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11617>
2021-06-28 15:01:37 -07:00