Jason Ekstrand
61d2badbf4
nir/deref: Fix a typo
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3754
Fixes: df51518dc5 "nir/opt_deref: Add a deref mode specialization..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7459 >
2020-11-05 16:31:25 +00:00
Tomeu Vizoso
60c5729d16
ci: Distribute ADMGPU driver to LAVA as a module
...
As it needs firmware to probe, and we cannot bundle it within the kernel
image because it is incompatible with the GPL.
Currently we rebind the driver after boot but that's slow and fragile,
as unloads of DRM drivers aren't generally tested.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7420 >
2020-11-05 17:09:58 +01:00
Tomeu Vizoso
bb41acf96a
ci: Update dEQP skips and fails for Bifrost on G52
...
Runs are much more stable now with the new kernel, and lots of tests
do pass now.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7420 >
2020-11-05 17:09:53 +01:00
Tomeu Vizoso
80cbb32443
ci: Update kernel for LAVA to 5.10-rc2 plus patches
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7420 >
2020-11-05 17:08:40 +01:00
Mike Blumenkrantz
092186d985
util/threaded_context: use driver's buffer alignment for staging transfers
...
this coincidentally worked because radeonsi has a hardcoded value of 64, but
other drivers do not use this value and then things are subtly broken
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7452 >
2020-11-05 13:50:13 +00:00
Juan A. Suarez Romero
60b9c00afd
v3d: Add GL_ARB_vertex_array_bgra support
...
This is done by adding support to PIPE_FORMAT_B8G8R8A8_UNORM, and
relying on the R/B swapping for vertex attributes implemented in the
compiler.
v2:
- Simplify the loop (Iago)
v3:
- Assert before derreferencing variable (Iago).
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3078
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7196 >
2020-11-05 12:15:29 +00:00
Juan A. Suarez Romero
9648bfba56
v3dv: mark the right bit to swap R/B vertex attributes
...
Now that the R/B swap mask for vertex attributes handles all the
attributes, ensure the right generic vertex attribute is marked.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7196 >
2020-11-05 12:15:28 +00:00
Juan A. Suarez Romero
1e723745dd
v3d/compiler: extend swapping R/B support to all vertex attributes
...
So far the support for R/B swapping in vertex attributes were for the
generic attributes.
But there are cases like glSecondaryColorPointer() supporting BGRA
formats that require the R/B swapping to be also allowed in the
non-generic vertex attributes (in this case, in the COLOR1 attribute).
v2:
- Don't split line (Iago)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7196 >
2020-11-05 12:15:28 +00:00
Marcin Ślusarz
44925a8a55
intel/tools: add missing new lines to few remaining fail_if users
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449 >
2020-11-05 12:07:51 +00:00
Marcin Ślusarz
c323d7c2a7
intel/tools: refactor logging to be easier to follow by static analyzers
...
Refactor out the part of fail_if function that never returns into
NORETURN function and put the condition check outside.
Addresses many false positive warnings by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449 >
2020-11-05 12:07:51 +00:00
Marcin Ślusarz
f0061277c0
intel/tools: handle some failures
...
Addresses "Dereference null return value" issues reported by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449 >
2020-11-05 12:07:51 +00:00
Marcin Ślusarz
cd9907e7d3
anv: remove dead code from anv_create_cmd_buffer
...
pool can't be NULL at this point, because it was already
dereferenced earlier.
Addresses "Dereference before null check" issue reported by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449 >
2020-11-05 12:07:51 +00:00
Marcin Ślusarz
d13b7d6591
intel/tools: allow --color option to be used without arg
...
There's already code handling that case and help text also says
it's possible.
Found, because Coverity complained about optarg NULL check,
suggesting optarg can be NULL for other options, where it's not
possible. IOW, false positive lead me to finding an unrelated issue.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449 >
2020-11-05 12:07:51 +00:00
Iago Toral Quiroga
0dad1a7c72
v3dv: expose more features
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7456 >
2020-11-05 11:38:02 +01:00
Arcady Goldmints-Orlov
0b30336906
broadcom/compiler: Handle non-SSA destinations for tex instructions
...
The NIR that is given to the VIR compiler is not in SSA form, and so
the v3d*_vir_emit_tex() functions must be able to handle both SSA and
register destinations.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7318 >
2020-11-05 09:03:46 +00:00
Khem Raj
e331fd7fc4
vc4: use intmax_t for formatted output of timespec members
...
32bit architectures which have 64bit time_t does not fit the assumption
of time_t being same as system long int
Fixes
error: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat]
time.tv_sec);
^~~~~~~~~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2966 >
2020-11-05 07:07:39 +00:00
Vinson Lee
c8630fd114
amd/addrlib: Add missing va_end.
...
Fix defect reported by Coverity Scan.
Missing varargs init or cleanup (VARARGS)
missing_va_end: va_end was not called for debugPrintInput.ap.
Fixes: 69ea473eeb ("amd/addrlib: update to the latest version")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7299 >
2020-11-04 19:05:00 -08:00
Adam Jackson
fe52efaa98
loader: Print dlerror() output in the failure message
...
This just captures the last failure, but that's better than nothing.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7429 >
2020-11-04 21:45:37 +00:00
Caio Marcelo de Oliveira Filho
5d5f3e3a47
intel/fs: Implement nir_intrinsic_{load,store}_shared_block_intel
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
9fe158e1d1
intel/fs: Implement nir_intrinsic_{load,store}_ssbo_block_intel
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
d372abe397
intel/fs: Add surface OWORD BLOCK opcodes
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
296137df53
intel/fs: Implement nir_intrinsic_{load,store}_global_block_intel
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
d3d2b73fa3
intel/fs: Add A64 OWORD BLOCK opcodes
...
Based on a patch for OWORD BLOCK READ from Jason Ekstrand.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
eb03f29655
spirv: Implement SpvCapabilitySubgroupBufferBlockIOINTEL
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
dd39e311b3
nir: Add nir_intrinsic_{load,store}_deref_block_intel
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
b86ce274f9
spirv: Implement SpvCapabilitySubgroupShuffleINTEL from SPV_INTEL_subgroups
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Nanley Chery
5194cbc766
iris: Flush dmabufs during context flushes
...
Currently, every modifier that uses CCS also lacks support for
fast-clears. On gen9+, dmabufs may gain fast-cleared blocks through
clear calls. On gen12, fast-clearing can occur during any rendering
operation. Mark when dmabufs gain fast-cleared blocks and flush them
during a context flush operation.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3425
Tested-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7384 >
2020-11-04 19:42:43 +00:00
Nanley Chery
c488fb6dfe
iris: Fix fast-clears of swizzled alpha formats
...
Resources with alpha formats that are mapped to R are fast-cleared with
the wrong clear color.
When such resources with are cleared via iris_clear_texture,
isl_color_value_unpack places channel data in the R channel.
convert_fast_clear_color then overwrites the channel with 0.
To avoid zeroing the clear color, move convert_fast_clear_color to the
other callers of clear_color: iris_clear and iris_clear_render_target.
Enables iris to pass the "A" case of the fcc-clear-tex piglit test.
v2. Rename convert_fast_clear_color to convert_clear_color. (Ken)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3670
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7345 >
2020-11-04 19:06:48 +00:00
Nanley Chery
60336cac60
iris: Fix SINT assert in convert_fast_clear_color
...
Don't assert that the size of every channel is greater than zero. This
assert doesn't work for integer formats with less than 4 channels.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7345 >
2020-11-04 19:06:48 +00:00
Nanley Chery
4cb9b5db2c
iris: Fix fast-clears of swizzled LA formats
...
Resources with luminance alpha formats that are mapped to RG are
fast-cleared with the wrong clear color.
When such resources with are cleared via iris_clear_texture,
isl_color_value_unpack places channel data in the R and G channels.
convert_fast_clear_color then overwrites the G channel with R.
Delete the clear color override that's specific to luminance alpha
formats.
Enables iris to pass the "LA" case of the fcc-clear-tex piglit test.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7345 >
2020-11-04 19:06:48 +00:00
Kenneth Graunke
382451ff9d
iris: fix source/destination layers for 3D blits
...
See commit ea32691257 for the
corresponding fix in anv.
Fixes Piglit's fbo-generatemipmap-3d.
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7321 >
2020-11-04 10:41:43 -08:00
Eric Anholt
61ce544d07
st/nir: Drop setting interp mode on system values in builtins.
...
It's initialized to INTERP_MODE_NONE on creation, which makes more sense
for sysvals than FLAT, and is also the interp mode that GLSL IR sets up
for sysvals.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7320 >
2020-11-04 09:33:05 -08:00
Eric Anholt
9143c08125
st/nir: Fix the st->pbo.use_gs case.
...
This case hadn't been ported to NIR before, and I missed that when
removing the TGSI path and replacing it with NIR -> NTT for TGSI drivers.
This caused breakage in nv50 on piglit's pbo-teximage.
In the process, the !use_gs gets its layer output fixed to be an int
instead of a vec4, which I suspect would fix validation in that path.
Fixes: 57effa342b ("st/mesa: Drop the TGSI paths for PBOs and use nir-to-tgsi if needed.")
Closes : #3680
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7320 >
2020-11-04 09:33:05 -08:00
Alyssa Rosenzweig
f8c1d79f69
pan/bi: Correctly calculate render target index
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:29 -05:00
Alyssa Rosenzweig
9a6dad18d8
pan/bi: Lower depth/stencil stores
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:29 -05:00
Alyssa Rosenzweig
6433fedcf1
pan/bi: Emit +ZS_EMIT as needed
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:28 -05:00
Alyssa Rosenzweig
0c889e7611
pan/bi: Stub handling for nir_intrinsic_store_combined_output_pan
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:28 -05:00
Alyssa Rosenzweig
f67b49d512
pan/bi: Factor out bi_emit_blend
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:28 -05:00
Alyssa Rosenzweig
928f2bc0d5
pan/bi: Factor out bi_emit_atest
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:28 -05:00
Alyssa Rosenzweig
f14beeb4ce
pan/bi: Infer z/stencil flags from sources passed
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:28 -05:00
Alyssa Rosenzweig
2b1db3662f
pan/bi: Add +ZS_EMIT instruction to IR
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:28 -05:00
Alyssa Rosenzweig
cd66aa712d
panfrost: Deduplicate shader properties
...
Between Midgard and Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:28 -05:00
Alyssa Rosenzweig
4a2ecc72d3
panfrost: Pass through src_type
...
Needed since Bifrost blends are typed well.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:28 -05:00
Alyssa Rosenzweig
42319c5626
pan/mdg: Move writeout lowering to common panfrost
...
These will be used in the Bifrost compiler, albeit for a slightly
different purpose.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:28 -05:00
Alyssa Rosenzweig
dfaa4c51fb
pan/mdg: Deduplicate nir_find_variable_with_driver_location
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:28 -05:00
Alyssa Rosenzweig
a05921b9f2
nir: Add SRC_TYPE to store_combined_output_pan
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7446 >
2020-11-04 11:21:08 -05:00
Iago Toral Quiroga
fa869fb9b4
v3dv: add a v3dv_bo_init helper
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7440 >
2020-11-04 13:56:51 +01:00
Tony Wasserka
456beb40b8
aco/ra: Fix counting of subdword variables in get_reg_create_vector
...
The loop variable "k" shadowed another variable in the outer scope, so
this loop had no actual effect.
Fixes: 52cc1f8237 ("aco: improve p_create_vector RA for sub-dword operands")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7427 >
2020-11-04 12:08:49 +00:00
Rhys Perry
786828131a
aco: implement 8/16-bit instructions which can be trivially widened
...
When nir_lower_bit_size becomes more capable, we might want to revert some
of this.
fossil-db (parallel-rdp, Navi):
Totals from 217 (31.77% of 683) affected shaders:
SGPRs: 11320 -> 10200 (-9.89%)
VGPRs: 7156 -> 7364 (+2.91%)
CodeSize: 1453948 -> 1430136 (-1.64%); split: -1.66%, +0.02%
Instrs: 258530 -> 254840 (-1.43%); split: -1.44%, +0.01%
Cycles: 37334360 -> 37247936 (-0.23%); split: -0.26%, +0.03%
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/4791 >
2020-11-04 11:50:37 +00:00
Rhys Perry
ef95ba8cdd
aco: implement some 16-bit arithmetic instead of lowering
...
fossil-db (parallel-rdp, Navi):
Totals from 210 (30.75% of 683) affected shaders:
SGPRs: 9704 -> 10248 (+5.61%)
VGPRs: 5884 -> 5368 (-8.77%)
CodeSize: 1155564 -> 1098752 (-4.92%)
Instrs: 199927 -> 189940 (-5.00%)
Cycles: 20438392 -> 19860124 (-2.83%)
v2: use divergence analysis to determine which instructions to lower.
Co-Authored-by: Daniel Schürmann <daniel@schuermann.dev >
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/4791 >
2020-11-04 11:50:37 +00:00