Jason Ekstrand [Thu, 13 Aug 2020 23:10:34 +0000 (18:10 -0500)]
spirv: Implement OpTraceRayKHR and OpExecuteCallableKHR
The old NV version (and the provisional KHR version) specified the data
payload via an integer location. This was quite annoying for the parser
and potentially error-prone. The final KHR version of the SPIR-V
ray-tracing spec replaces these integers with actual pointers. We don't
really need to implement the NV versions but we have the code and
someone might want to parse some NV ray-tracing shaders.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7734>
Jason Ekstrand [Mon, 23 Nov 2020 15:47:03 +0000 (09:47 -0600)]
spirv: Update JSON and headers from Khronos main
This corresponds to
104ecc356c1bea4476320faca64440cd1df655a3 ("Merge
pull request #180 from dneto0/issue-179") in
https://github.com/KhronosGroup/SPIRV-Headers
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7734>
Jason Ekstrand [Thu, 29 Oct 2020 18:14:10 +0000 (13:14 -0500)]
spirv: Rename some ray-tracing intrinsics to NV
For these intrinsics, the NV version and the provisional KHR version
have the same enum value and semantics but the final KHR version is
different on both counts. Re-name them to NV before we update the
header so the header update isn't a functional change.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7734>
Jason Ekstrand [Mon, 23 Nov 2020 15:41:56 +0000 (09:41 -0600)]
vulkan: Update XML and headers to 1.2.162
This brings in the following new extensions:
- VK_KHR_deferred_host_operations
- VK_KHR_pipeline_library
- VK_KHR_acceleration_structure
- VK_KHR_ray_tracing_pipeline
- VK_KHR_ray_query
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7734>
Erik Faye-Lund [Tue, 24 Nov 2020 10:21:07 +0000 (11:21 +0100)]
zink: fall back to util_blitter for scaled resolves
Vulkan can't scale while resolving using vkCmdResolveImage. For this we
need to use util_blitter.
The reason this wasn't a problem in the past, was that glBlitFramebuffer
always set pipe_blit_info::render_condition_enable, and we always used
that to bail out to util_blitter. When the latter changed, this broke.
Fixes:
19906022e22 ("zink: more accurately track supported blits")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7745>
Daniel Schürmann [Fri, 6 Nov 2020 22:44:06 +0000 (23:44 +0100)]
nir/opt_peephole_select: respect selection_control when collapsing ifs
Totals from 34 (0.02% of 138013) affected shaders (RAVEN):
CodeSize: 625888 -> 626336 (+0.07%); split: -0.00%, +0.08%
Instrs: 124121 -> 124229 (+0.09%); split: -0.00%, +0.09%
Cycles: 1403072 -> 1403588 (+0.04%); split: -0.01%, +0.04%
VMEM: 5308 -> 5364 (+1.06%); split: +1.07%, -0.02%
Copies: 12773 -> 12838 (+0.51%); split: -0.08%, +0.59%
Branches: 5758 -> 5801 (+0.75%); split: -0.21%, +0.96%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7478>
Daniel Schürmann [Wed, 4 Nov 2020 17:20:08 +0000 (18:20 +0100)]
nir/opt_peephole_select: collapse nested IFs if applicable
Single-sided nested IFs can sometimes be collapsed
even if they cannot be flattened.
This optimization re-uses block_check_for_allowed_instrs()
to determine if it is beneficial to collapse the IFs.
Additionally, it is required that the phis of the outer IF
become trivial after this optimization, so that no additional
bcsel instructions are added.
This optimization turns
if (cond1) {
<allowed instruction>
if (cond2) {
<any code>
} else {
}
} else {
}
into
<allowed instruction>
if (cond1 && cond2) {
<any code>
} else {
}
Totals from 17044 (12.35% of 138013) affected shaders (RAVEN):
SGPRs: 1246416 -> 1246256 (-0.01%); split: -0.01%, +0.00%
VGPRs: 802752 -> 802736 (-0.00%); split: -0.01%, +0.01%
SpillSGPRs: 45857 -> 45850 (-0.02%); split: -0.07%, +0.05%
CodeSize:
85318240 ->
85208592 (-0.13%); split: -0.15%, +0.02%
Instrs:
16769049 ->
16738195 (-0.18%); split: -0.20%, +0.02%
Cycles:
947328732 ->
947145796 (-0.02%); split: -0.03%, +0.01%
VMEM: 7271539 -> 7274090 (+0.04%); split: +0.05%, -0.01%
SMEM: 925983 -> 927374 (+0.15%); split: +0.19%, -0.04%
VClause: 294334 -> 294340 (+0.00%); split: -0.00%, +0.00%
SClause: 633600 -> 634048 (+0.07%); split: -0.01%, +0.08%
Copies: 1589650 -> 1580573 (-0.57%); split: -0.66%, +0.09%
Branches: 540830 -> 525767 (-2.79%); split: -2.79%, +0.00%
PreSGPRs: 902500 -> 902415 (-0.01%); split: -0.02%, +0.01%
PreVGPRs: 759992 -> 760019 (+0.00%); split: -0.00%, +0.01%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7478>
Iago Toral Quiroga [Mon, 23 Nov 2020 10:57:15 +0000 (11:57 +0100)]
v3dv: fix allocation size for BO handles
We were allocating twice the size we need for this array. This was
probably caused by a copy and paste error from the GL driver which
grows this dynamically as BOs are added to the job.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7733>
Iago Toral Quiroga [Mon, 23 Nov 2020 10:22:09 +0000 (11:22 +0100)]
v3dv: remove obsolete comment
We already check that the feature is present in our kernel when we
initialize the physical device.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7731>
Vinson Lee [Fri, 20 Nov 2020 01:09:28 +0000 (17:09 -0800)]
clover: Fix typo in comment.
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/7702>
Dave Airlie [Tue, 24 Nov 2020 00:52:45 +0000 (10:52 +1000)]
gallium: fix missing bit field in p_state.h
Marek pointed this out, not sure how we missed it.
Fixes:
3dc6da1ac1f5 ("gallium: add a non-multisample sample mask out behaviour flag.")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7741>
Dave Airlie [Fri, 13 Nov 2020 07:06:31 +0000 (17:06 +1000)]
lavapipe: enable pipeline stats queries
These pass CTS, but I think are missing some stuff CTS doesn't test.
This is one of the base Vulkan 1.0 features and I'd like to support
it for conformance.
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
Dave Airlie [Tue, 10 Nov 2020 04:26:53 +0000 (14:26 +1000)]
lavapipe: fixup mipmap precsion bits
8 seems more correct, however it fixes a bunch of explict lod
tests but breaks some lod query tests.
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
Dave Airlie [Tue, 10 Nov 2020 03:52:05 +0000 (13:52 +1000)]
llvmpipe: fix multisample lines.
This also needs another lines fix, but at least align the code
with tri and points
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
Dave Airlie [Mon, 9 Nov 2020 21:28:53 +0000 (07:28 +1000)]
llvmpipe: fix multisample point rendering.
Fixes one case in
dEQP-VK.rasterization.primitives_multisample_4_bit.no_stipple.points
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
Dave Airlie [Sun, 15 Nov 2020 23:48:13 +0000 (09:48 +1000)]
llvmpipe/setup: move point stats collection earlier.
You have to count the stats pre-culling here.
Just like
dc261cdd42380 did for lines.
VK-GL-CTS dEQP-VK.query_pool.statistics_query.clipping_primitives*point_list
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
Dave Airlie [Mon, 16 Nov 2020 00:02:17 +0000 (10:02 +1000)]
lavapipe: fix wsi acquire fences
Fixes:
dEQP-VK.wsi.xcb.swapchain.acquire.too_many
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
Dave Airlie [Sun, 15 Nov 2020 22:55:16 +0000 (08:55 +1000)]
lavapipe: fixup device allocate + enable private data
I'd only half ported private memory support, finish the job.
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
Erik Faye-Lund [Mon, 23 Nov 2020 17:41:29 +0000 (18:41 +0100)]
zink: fix layered resolves
Until recently, we ended up using u_blitter here, because
info->render_condition_enable was always true here. But when we recently
fixed that overly broad check, this broke.
So let's fix layered-resolves, by actually checking if the resource has
layers respect them in that case, similar to what we do in blit_native.
Fixes:
19906022e22 ("zink: more accurately track supported blits")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3843
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7737>
Dylan Baker [Mon, 23 Nov 2020 19:29:01 +0000 (11:29 -0800)]
release-calender: Update 20.3
I've been forgetting to remove completed rc's
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7739>
Dylan Baker [Mon, 23 Nov 2020 19:27:55 +0000 (11:27 -0800)]
docs: update calendar and link releases notes for 20.2.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7739>
Dylan Baker [Mon, 23 Nov 2020 19:20:23 +0000 (11:20 -0800)]
docs: Add relnotes for 20.2.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7739>
Dylan Baker [Mon, 23 Nov 2020 19:02:26 +0000 (11:02 -0800)]
docs: add release notes for 20.2.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7739>
Samuel Pitoiset [Wed, 18 Nov 2020 12:07:57 +0000 (13:07 +0100)]
aco: optimize v_add+v_lshlrev to v_mad_u32_u24 on GFX6-8
This optimizes v_add(c, v_lshlrev(a, b)) to v_mad_u32_u24(b, 1<<a, c)
if 'a' is a constant (less than or equal to 6 to avoid creating
literals) and 'b' known to be a 16-bit or a 24-bit value.
On GFX9+, this is already optimized to v_lshl_add_u32.
No fossils-db changes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7673>
Samuel Pitoiset [Mon, 16 Nov 2020 17:01:32 +0000 (18:01 +0100)]
aco: optimize v_add+s_lshl to v_mad_u32_u24 on GFX6-8
This optimizes v_add(c, s_lshl(a, b)) to v_mad_u32_u24(a, 1<<b, c)
if 'b' is a constant (less than or equal to 6 to avoid creating
literals) and 'a' known to be a 16-bit or a 24-bit value.
On GFX9+, this is already optimized to v_lshl_add_u32.
fossils-db (Polaris10):
Totals from 1916 (1.36% of 140385) affected shaders:
SGPRs: 88322 -> 87780 (-0.61%); split: -0.66%, +0.05%
CodeSize: 7852668 -> 7851800 (-0.01%); split: -0.01%, +0.00%
Instrs: 1533965 -> 1530459 (-0.23%); split: -0.23%, +0.00%
Cycles:
57001852 ->
56983244 (-0.03%); split: -0.03%, +0.00%
VMEM: 372561 -> 371733 (-0.22%); split: +0.03%, -0.25%
SMEM: 108859 -> 103711 (-4.73%); split: +0.23%, -4.96%
VClause: 37231 -> 37204 (-0.07%)
SClause: 58116 -> 58086 (-0.05%); split: -0.06%, +0.01%
Copies: 199953 -> 199931 (-0.01%); split: -0.03%, +0.02%
Branches: 63478 -> 63477 (-0.00%)
PreSGPRs: 61818 -> 61816 (-0.00%)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7673>
Samuel Pitoiset [Mon, 16 Nov 2020 16:58:57 +0000 (17:58 +0100)]
aco: allow to use the range analysis UB in emit_{sop2,vop2}_instruction()
It will allow to combine v_add+s_lshl or v_add+v_lshlrev to
v_mad_u32_u24 on GFX6-8 if operands are known to be 16-bit or 24-bit.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7673>
Samuel Pitoiset [Mon, 16 Nov 2020 16:23:59 +0000 (17:23 +0100)]
aco: add a new Operand flag to indicate that is 24-bit
To indicate that the upper 8-bits are always 0 to optimize more MADs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7673>
Samuel Pitoiset [Wed, 18 Nov 2020 12:15:24 +0000 (13:15 +0100)]
aco/tests: extend the optimize.add_lshl tests to GFX8
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7673>
Samuel Pitoiset [Mon, 16 Nov 2020 07:57:59 +0000 (08:57 +0100)]
ac,radv: use better export formats for 8-bit when RB+ isn't allowed
When RB+ is enabled, R8_UINT/R8_SINT/R8_UNORM should use FP16_ABGR
for 2x exporting performance. Otherwise, use 32_R to remove useless
instructions needed for 16-bit compressed exports.
fossils-db (Vega10):
Totals from 8858 (6.35% of 139517) affected shaders:
SGPRs: 801248 -> 801210 (-0.00%); split: -0.01%, +0.00%
VGPRs: 596224 -> 596120 (-0.02%); split: -0.02%, +0.01%
CodeSize:
71462452 ->
71356684 (-0.15%); split: -0.15%, +0.00%
MaxWaves: 37097 -> 37105 (+0.02%); split: +0.04%, -0.02%
Instrs:
13963177 ->
13950809 (-0.09%); split: -0.09%, +0.00%
Cycles:
1476539360 ->
1476489996 (-0.00%); split: -0.00%, +0.00%
VMEM: 2363008 -> 2361349 (-0.07%); split: +0.04%, -0.11%
SMEM: 550362 -> 549977 (-0.07%); split: +0.01%, -0.08%
VClause: 245704 -> 245727 (+0.01%); split: -0.01%, +0.02%
SClause: 485161 -> 485104 (-0.01%); split: -0.01%, +0.00%
Copies: 1420034 -> 1422310 (+0.16%); split: -0.01%, +0.17%
Branches: 518710 -> 518705 (-0.00%)
PreSGPRs: 706633 -> 706584 (-0.01%)
PreVGPRs: 547163 -> 547007 (-0.03%); split: -0.03%, +0.01%
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/7512>
Samuel Pitoiset [Mon, 16 Nov 2020 07:55:10 +0000 (08:55 +0100)]
radv: add new vk_format_is_*() helpers
I think we should make RADV uses util_format everywhere.
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/7512>
Dylan Baker [Fri, 20 Nov 2020 00:14:54 +0000 (16:14 -0800)]
meson: use a feature option for microsoft-clc
It's less code and makes the configuration easier to fine tune.
Fixes:
ff05da7f8dc4aa531704d48f718514e3b1fff45d
("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7699>
Dylan Baker [Fri, 20 Nov 2020 00:09:22 +0000 (16:09 -0800)]
meson: Don't add extra values to shader-cache
We're trying to move to using a feature here, adding more values breaks
that.
Fixes:
5de56937a3d009659076dc67de6a57379fc7a31b
("disk_cache: build option for disabled-by-default")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7699>
Rob Clark [Sun, 22 Nov 2020 18:30:33 +0000 (10:30 -0800)]
freedreno/ir3: Fix valgrind complaint about streamout state
The warning is a bit misleading about where it shows up.. it complains
about the shader key, due to shader key being calculated from (among
other things) stream_output state that had some uninitialized garbage
in the padding.
==84572== Uninitialised byte(s) found during client check request
==84572== at 0x60548E8: blob_write_bytes (blob.c:163)
==84572== by 0x6534EF7: compute_variant_key (ir3_disk_cache.c:111)
==84572== by 0x6535143: ir3_disk_cache_retrieve (ir3_disk_cache.c:171)
==84572== by 0x654D82F: create_variant (ir3_shader.c:251)
==84572== by 0x654DA2B: ir3_shader_get_variant (ir3_shader.c:301)
==84572== by 0x645B2CB: ir3_shader_variant (ir3_gallium.c:113)
==84572== by 0x645B7EB: ir3_shader_create (ir3_gallium.c:219)
==84572== by 0x645BAA7: ir3_shader_state_create (ir3_gallium.c:285)
==84572== by 0x6506003: fd6_shader_state_create (fd6_program.c:1136)
==84572== by 0x64676C7: assemble_tgsi (freedreno_program.c:105)
==84572== by 0x64679DF: fd_prog_init (freedreno_program.c:188)
==84572== by 0x6506157: fd6_prog_init (fd6_program.c:1172)
==84572== Address 0xeff1588 is 424 bytes inside a block of size 480 alloc'd
==84572== at 0x4866FA4: malloc (vg_replace_malloc.c:307)
==84572== by 0x605D46F: ralloc_size (ralloc.c:133)
==84572== by 0x605D52F: rzalloc_size (ralloc.c:166)
==84572== by 0x654DFF7: ir3_shader_from_nir (ir3_shader.c:473)
==84572== by 0x645B6C7: ir3_shader_create (ir3_gallium.c:182)
==84572== by 0x645BAA7: ir3_shader_state_create (ir3_gallium.c:285)
==84572== by 0x6506003: fd6_shader_state_create (fd6_program.c:1136)
==84572== by 0x64676C7: assemble_tgsi (freedreno_program.c:105)
==84572== by 0x64679DF: fd_prog_init (freedreno_program.c:188)
==84572== by 0x6506157: fd6_prog_init (fd6_program.c:1172)
==84572== by 0x64CB36F: fd6_context_create (fd6_context.c:154)
==84572== by 0x59D93BB: st_api_create_context (st_manager.c:917)
Somehow this was showing up with dEQP-GLES31.info.vendor but not other
things.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7717>
Rob Clark [Sun, 22 Nov 2020 17:07:02 +0000 (09:07 -0800)]
freedreno/drm: Quiet timedout error msg
This isn't terribly interesting, but got more chatty when we converted
to mesa_loge() vs debug_printf()
Fixes:
156d7e45f74 ("freedreno: Convert to mesa_log*()")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7717>
Rob Clark [Thu, 19 Nov 2020 17:48:35 +0000 (09:48 -0800)]
freedreno/a6xx: Clear control mem at context create
We could be getting a recycled bo containing random garbage, which can
confuse check_vsc_overflow().
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7717>
Rob Clark [Wed, 18 Nov 2020 20:33:27 +0000 (12:33 -0800)]
freedreno: Convert one last mtx_t -> simple_mtx_t
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7717>
Rob Clark [Mon, 16 Nov 2020 19:18:32 +0000 (11:18 -0800)]
freedreno: emit_marker() cleanup
1) Propagate the change to only emit markers in debug builds (and add
the WFI that ensures they are synchronized with GPU. We could
consider dropping them entirely, since the GPU devcoredump support
in newer kernels is more useful. But it is still an occasionally
useful fallback.
2) Use p_atomic_inc_return() to placate helgrind
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7717>
Lionel Landwerlin [Mon, 9 Nov 2020 16:45:18 +0000 (18:45 +0200)]
mesa: add an environment variable to default enable INTEL_blackhole
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7640>
Lionel Landwerlin [Mon, 9 Nov 2020 18:59:59 +0000 (20:59 +0200)]
st: trigger noop if the default value is not true
v2: Verify that PIPE_CAP_FRONTEND_NOOP is available before calling vfunc (Icecream95)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7640>
Connor Abbott [Fri, 20 Nov 2020 23:27:34 +0000 (00:27 +0100)]
ir3/ra: Fix array reg liveness in scalar pass
Assigning an array reg removes IR3_REG_ARRAY, which means that
definitions and uses can't be tracked back to the array register's name
and liveness for the components of the array aren't correctly
calculated. To fix this we delay assigning array registers until the
scalar pass.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7711>
Samuel Pitoiset [Mon, 23 Nov 2020 09:39:52 +0000 (10:39 +0100)]
nir: fix gathering cross invocation info
Fixes:
5b77b14448c ("nir: Use src_is_invocation_id in get_deref_info.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7730>
jzielins [Fri, 20 Nov 2020 15:01:39 +0000 (16:01 +0100)]
swr: Pass draw start information to state update mechanism
This fixes crash in many workloads/tests
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7728>
Samuel Pitoiset [Mon, 23 Nov 2020 09:15:05 +0000 (10:15 +0100)]
ci: fix name of the Sienna Cichlid expected failures file
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7729>
Alejandro Piñeiro [Thu, 19 Nov 2020 22:45:57 +0000 (23:45 +0100)]
v3dv/cmd_buffer: missing (uint8_t *) casting when calling memcmp
Caused to return early wrongly on CmdPushConstants with some tests
using several calls to that method. As we are here we are also
replacing the (void *) casting at the memcpy below.
Fixes:
e1c8041cde64 ("v3dv: try harder to skip emission of redundant state")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7718>
Samuel Pitoiset [Sat, 21 Nov 2020 16:58:13 +0000 (17:58 +0100)]
radv: dump BO ranges into bo_ranges.log instead of stderr
Like other dumps during GPU hang detection.
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/7706>
Samuel Pitoiset [Fri, 20 Nov 2020 08:56:59 +0000 (09:56 +0100)]
radv: add RADV_DEBUG=noumr to disable UMR logs during GPU hang detection
Sometimes UMR logs can't be dumped and you would get permission
denied, even if the UMR binary has the setuid bit enabled.
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/7706>
Samuel Pitoiset [Fri, 20 Nov 2020 08:48:13 +0000 (09:48 +0100)]
radv: dump application info in the GPU hang report
Like the name, version, as well as the engine and the API version.
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/7706>
Samuel Pitoiset [Fri, 20 Nov 2020 08:19:55 +0000 (09:19 +0100)]
radv: append a time string to the hang report dump directory
Using the PID only isn't really informative.
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/7706>
Samuel Pitoiset [Fri, 20 Nov 2020 07:58:49 +0000 (08:58 +0100)]
radv: print more debug messages when generating a hang report
If for some reasons the driver can't generate the hang report properly.
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/7706>
Marek Olšák [Sat, 14 Nov 2020 22:45:31 +0000 (17:45 -0500)]
radeonsi: don't allocate LDS for TCS inputs if it's not used
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Sat, 14 Nov 2020 22:33:46 +0000 (17:33 -0500)]
radeonsi: don't insert barrier between VS/TCS if all TCS inputs come from VGPRs
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Sat, 14 Nov 2020 22:24:11 +0000 (17:24 -0500)]
radeonsi: pass VS->TCS IO via VGPRs if VS and TCS have the same thread count
It can only be done if a TCS input is accessed without indirect indexing and
with gl_InvocationID as the vertex index, and the number of VS and TCS threads
is the same.
This eliminates LDS stores and loads for VS->TCS IO, reducing shader lifetime
and LDS traffic.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Sat, 14 Nov 2020 22:20:36 +0000 (17:20 -0500)]
ac/llvm: prepare for passing VS->TCS IO via VGPRs
- bump AC_MAX_ARGS
- add vertex_index_is_invoc_id parameter into load_tess_varyings
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Sat, 14 Nov 2020 21:27:05 +0000 (16:27 -0500)]
radeonsi: remove unnecessary NULL checking in NIR tess functions
param_index is always checked for non-NULL later.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Sat, 14 Nov 2020 06:12:29 +0000 (01:12 -0500)]
radeonsi: if VS and TCS have the same number of threads, merge the conditonals
Instead of:
if (VS) {
VS;
}
if (TCS) {
TCS;
}
Do this if the number of threads is the same in VS and TCS:
exec = enabled_threads;
VS;
TCS;
Skipping declare_vb_descriptor_input_sgprs is needed to match the VS return
values.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Sat, 14 Nov 2020 05:59:56 +0000 (00:59 -0500)]
radeonsi: always return void from si_build_wrapper_function
It's the end of the shader, there are no return values.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Sat, 14 Nov 2020 05:36:51 +0000 (00:36 -0500)]
radeonsi: merge TCS and TCS epilog conditional blocks
Instead of:
if (TCS) {
TCS;
}
if (TCS && epilog) {
epilog;
}
Do:
if (TCS) {
TCS;
if (epilog) {
epilog;
}
Only monolithic shaders can do it.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Sat, 14 Nov 2020 05:05:00 +0000 (00:05 -0500)]
radeonsi: don't generate a dead conditional in si_write_tess_factors on gfx9+
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Fri, 13 Nov 2020 05:38:06 +0000 (00:38 -0500)]
radeonsi: limit HS LDS usage per workgroup to 16K to allow at least 2 WGs/CU
This increases occupancy when the LDS size is e.g. 20K for 3 waves.
If we limit the size to 16K, we can fit 2 workgroups with 2 waves each,
so 4 waves in total.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Fri, 13 Nov 2020 04:24:04 +0000 (23:24 -0500)]
radeonsi: don't allocate LDS for TCS outputs if they are not read
This reduces LDS usage by 50% in Unigine Heaven.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Fri, 13 Nov 2020 03:25:52 +0000 (22:25 -0500)]
radeonsi: don't leave more than 8 unoccupied lanes in HS
Previously it was 16 and bigger patches would always trim the patch count
needlessly.
There are 2 variables to consider:
- lane occupancy
- LDS usage (limiting wave occupancy)
If LDS size is 32 KB (max limit per CU) for 3 waves and we can't maximize
occupancy, it's better to leave some lanes unoccupied because using 2
waves would decrease the LDS size to 21 KB, which is not enough to fit
another workgroup on the CU.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Fri, 13 Nov 2020 03:07:56 +0000 (22:07 -0500)]
radeonsi: adjust tess SGPRs to allow fully occupied 3 HS waves of triangles
With triangles and 3 HS waves, 3 lanes were unoccupied. Adjust the SGPR
encoding to allow 1 more triangle to fit there.
Some of the fields are not large enough, but they weren't large enough
before either.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Marek Olšák [Sat, 14 Nov 2020 04:13:45 +0000 (23:13 -0500)]
ac/nir: fix a typo in ac_are_tessfactors_def_in_all_invocs
I think it only made the pass return false if there was a barrier
Fixes:
2832bc972bf - ac/nir_to_llvm: add ac_are_tessfactors_def_in_all_invocs()
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Gert Wollny [Fri, 16 Oct 2020 15:29:09 +0000 (17:29 +0200)]
r600/sfn: Correctly lower all int64
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7724>
Vinson Lee [Fri, 20 Nov 2020 01:23:08 +0000 (17:23 -0800)]
nv50/ir: Initialize Program members in constructor.
Fix defects reported by Coverity Scan.
uninit_member: Non-static class member tlsSize is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member driver is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member driver_out 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/7703>
Gert Wollny [Mon, 19 Oct 2020 12:23:01 +0000 (14:23 +0200)]
r600/sfn: use a per stream index register in GS
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7714>
Gert Wollny [Sat, 21 Nov 2020 14:59:33 +0000 (15:59 +0100)]
r600/sfn: lower bool to int32 only after common optimizations
Fixes:
f79b7fcf7c7f5db626efdb63f27e8bc64d0aed77
r600/sfn: use 32 bit bools
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7714>
Timur Kristóf [Sat, 21 Nov 2020 15:05:22 +0000 (16:05 +0100)]
nir: Use src_is_invocation_id in get_deref_info.
Signed-off-by: Timur Kristof <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7622>
Marek Olšák [Sun, 15 Nov 2020 01:06:55 +0000 (20:06 -0500)]
nir: fix gathering patch IO usage with lowered IO
Fixes:
17af07024df - nir: gather all IO info from IO intrinsics
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7622>
Marek Olšák [Fri, 13 Nov 2020 05:09:06 +0000 (00:09 -0500)]
nir: fix gathering TCS cross invocation access with lowered IO
Fixes:
abe9588ff04 - nir: gather tess.tcs_cross_invocation info from lowered IO intrinsics
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7622>
Marek Olšák [Sat, 3 Oct 2020 20:52:25 +0000 (16:52 -0400)]
mesa: lock Shared->TexMutex only once for a glthread batch
This removes a lot of locking from the driver thread.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7053>
Marek Olšák [Sat, 3 Oct 2020 20:52:25 +0000 (16:52 -0400)]
mesa: lock Shared->BufferObjects only once for a glthread batch
This removes a lot of locking from the driver thread.
If multiple contexts sharing buffers submit GL calls from multiple threads,
they will be serialized by this mutex. I can add a driconf option to turn
off this optimization if needed, but I currently don't anticipate to see
GL apps that use multiple shared contexts in different threads
simultaneously.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7053>
Marek Olšák [Sat, 3 Oct 2020 20:11:07 +0000 (16:11 -0400)]
glthread: make glGetActiveUniform return without syncing
We just need to track glLinkProgram and glDeleteProgram.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7053>
Marek Olšák [Sat, 3 Oct 2020 20:03:07 +0000 (16:03 -0400)]
mesa: make error handling for glGetActiveUniform glthread-safe
glGetActiveUniform will be called from the app thread directly.
This is safe if a few conditions are met.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7053>
Marek Olšák [Sat, 3 Oct 2020 19:19:19 +0000 (15:19 -0400)]
mesa: add glInternalSetError for glthread
glthread wants to set GL errors, but has to do it by adding the SetError
call into the queue for it to be thread-safe.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7053>
Bas Nieuwenhuizen [Sun, 18 Oct 2020 00:31:38 +0000 (02:31 +0200)]
radv: Dump BO VA ranges on hang.
To make it easier to figure out if a given VA is valid or not.
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3620
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7205>
Vinson Lee [Fri, 20 Nov 2020 01:03:18 +0000 (17:03 -0800)]
clover: Initialize command_queue member _props.
Fix defect reported by Coverity Scan.
Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value this->_props.
_props |= properties[i + 1];
Fixes:
e42a7fa0378 ("clover: add support command queue properties")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7701>
Eric Engestrom [Fri, 10 Jul 2020 14:11:46 +0000 (16:11 +0200)]
meson: drop deprecated EGL platform build options
These two options were deprecated and announced to be removed in 20.3,
so let's drop them now.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: 20.3 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5844>
Eric Engestrom [Fri, 20 Nov 2020 12:08:09 +0000 (13:08 +0100)]
gitlab-ci: drop deprecated platforms that snuck in when nobody was watching
... even though I did review that commit. My bad :]
Fixes:
c56f09124b195c5cbaab ("gitlab-ci: Move classic driver testing to a new meson-classic job")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5844>
Rhys Perry [Fri, 30 Oct 2020 14:08:17 +0000 (14:08 +0000)]
aco/tests: add Builder::v_mul_imm() tests
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/5390>
Rhys Perry [Fri, 5 Jun 2020 16:54:43 +0000 (17:54 +0100)]
aco: use v_mul_imm() for some nir_op_imul
Some of the optimizations v_mul_imm() does are complex and very
target-specific and not suitable to do in ACO's optimizer.
fossil-db (Vega):
Totals from 49135 (35.76% of 137413) affected shaders:
SGPRs: 2698547 -> 2696103 (-0.09%); split: -0.16%, +0.07%
VGPRs: 2301412 -> 2301600 (+0.01%); split: -0.01%, +0.02%
SpillSGPRs: 51520 -> 51519 (-0.00%)
CodeSize:
168798572 ->
169164012 (+0.22%); split: -0.00%, +0.22%
MaxWaves: 306553 -> 306539 (-0.00%); split: +0.00%, -0.01%
Instrs:
33423982 ->
33506598 (+0.25%); split: -0.00%, +0.25%
Cycles:
1807800632 ->
1804101376 (-0.20%); split: -0.20%, +0.00%
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/5390>
Rhys Perry [Fri, 5 Jun 2020 16:52:24 +0000 (17:52 +0100)]
aco: try harder to not create v_mul_lo_u32
fossil-db (Vega):
Totals from 4 (0.00% of 137413) affected shaders:
CodeSize: 13708 -> 13716 (+0.06%)
Instrs: 2742 -> 2744 (+0.07%)
Cycles: 24348 -> 24236 (-0.46%)
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/5390>
Rhys Perry [Fri, 30 Oct 2020 16:47:13 +0000 (16:47 +0000)]
aco: copy constant to sgpr in Builder::v_mul_imm()
No fossil-db changes.
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/5390>
Rhys Perry [Fri, 5 Jun 2020 18:18:32 +0000 (19:18 +0100)]
aco: create vgpr constant copies using v_bfrev_b32
Looks like this worked once but broke at some point.
fossil-db (Vega):
Totals from 577 (0.42% of 137413) affected shaders:
CodeSize: 3822052 -> 3818720 (-0.09%)
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/5390>
Rhys Perry [Fri, 5 Jun 2020 18:19:58 +0000 (19:19 +0100)]
aco: count v_mul_lo_u32 as 16 cycles
There are more, but this is a common one.
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/5390>
Rhys Perry [Fri, 30 Oct 2020 14:08:55 +0000 (14:08 +0000)]
aco: don't create v_mov_b32 in v_mul_imm()
We switched to p_parallelcopy for everything else.
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/5390>
Krunal Patel [Thu, 19 Nov 2020 19:35:46 +0000 (01:05 +0530)]
radeon/vce: Bitrate not updated when changing framerate
Issue: Encoding parameters not updated after changing FrameRate
Root Cause:
In rvce_begin_frame, need_rate_control was enabled if the target_bitrate,
quant_i_frames, quant_p_frames, quant_b_frames or rate_ctrl_method
changes. Due to this the rate_control() was not updating the encoder
parameters with new framerate, peak_bits_per_picture_integer and
avg_target_bits_per_picture
Fix:
Added the condition where we will check if there is a change in
other parameters and enable need_rate_control. Eventually updating the
encoder parameters with new framerate and bitrate.
Signed-off-by: Krunal Patel <krunalkumarmukeshkumar.patel@amd.corp-partner.google.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7696>
Adam Jackson [Thu, 19 Nov 2020 14:54:18 +0000 (09:54 -0500)]
glx, egl: Add LIBGL_DRI2_DISABLE environment variable
For orthogonality with LIBGL_DRI3_DISABLE.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7688>
Bas Nieuwenhuizen [Fri, 20 Nov 2020 00:22:33 +0000 (01:22 +0100)]
gallium/vl: Set modifier field for winsys handle.
Fixes:
c786150d ("radeonsi: Add modifier support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3821
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7700>
Rhys Perry [Tue, 10 Nov 2020 10:26:14 +0000 (10:26 +0000)]
nir/copy_prop_vars: avoid a duplicate lookup if src == vec_src
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/7511>
Rhys Perry [Tue, 10 Nov 2020 10:14:26 +0000 (10:14 +0000)]
nir/copy_prop_vars: use nir_deref_and_path
Instead of recreating paths, create them once when needed using
nir_deref_and_path.
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/7511>
Rhys Perry [Tue, 10 Nov 2020 10:13:04 +0000 (10:13 +0000)]
nir/deref: add helpers to lazily create paths
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/7511>
Rhys Perry [Wed, 4 Nov 2020 13:12:47 +0000 (13:12 +0000)]
nir/search: check for changes before adding uses to worklist
So it doesn't uselessly add instructions to the worklist.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511>
Rhys Perry [Wed, 4 Nov 2020 13:10:25 +0000 (13:10 +0000)]
nir/search: check instr type before adding to worklist
nir_algebraic_instr() ignores non-ALU instructions, so there's no point.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511>
Rhys Perry [Thu, 5 Nov 2020 15:03:15 +0000 (15:03 +0000)]
nir/loop_analyze: initialize loop variables on demand
Zero'ing the allocation and calling initialize_ssa_def() for every
ssa def can be expensive. Since we only use a subset of the allocated
variables, initialize it only when needed.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511>
Rhys Perry [Thu, 5 Nov 2020 17:00:56 +0000 (17:00 +0000)]
nir/copy_prop_vars,nir/dead_write_vars: ignore read-only loads
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511>
Rhys Perry [Mon, 9 Nov 2020 14:41:38 +0000 (14:41 +0000)]
nir: add nir_var_vec_indexable_modes
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511>
Daniel Schürmann [Wed, 11 Nov 2020 15:34:06 +0000 (16:34 +0100)]
nir: add nir_phi_get_src_from_block() helper
Returns the phi_src corresponding to a given nir_block.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2804>
Daniel Schürmann [Tue, 19 Nov 2019 16:24:34 +0000 (17:24 +0100)]
nir: allow for cheap intrinsics in nir_opt_peephole_select()
Also added nir_instr_type_ssa_undef for convenience.
Out of the added intrinsics, it seems that only load_helper_invocation
has an effect on tested games.
Totals from 446 (0.32% of 138013) affected shaders (RAVEN):
SGPRs: 17600 -> 17688 (+0.50%); split: -0.09%, +0.59%
VGPRs: 14140 -> 14312 (+1.22%); split: -0.03%, +1.24%
CodeSize: 1157696 -> 1131208 (-2.29%)
MaxWaves: 3430 -> 3427 (-0.09%)
Instrs: 220402 -> 214200 (-2.81%)
Cycles: 900776 -> 875752 (-2.78%)
VMEM: 160894 -> 180439 (+12.15%); split: +12.19%, -0.04%
SMEM: 19854 -> 20169 (+1.59%); split: +1.74%, -0.16%
VClause: 3597 -> 3604 (+0.19%)
SClause: 7258 -> 7248 (-0.14%); split: -0.15%, +0.01%
Copies: 17060 -> 16336 (-4.24%); split: -4.44%, +0.20%
Branches: 3995 -> 2518 (-36.97%)
PreSGPRs: 11972 -> 12148 (+1.47%); split: -0.13%, +1.60%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2804>
Tony Wasserka [Tue, 3 Nov 2020 16:22:25 +0000 (17:22 +0100)]
radv/winsys: Fix use of nonexisting struct type in sizeof
Since only the pointer size is queried here, this is functionally
equivalent.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7430>