Corentin Noël [Thu, 15 Sep 2022 12:49:22 +0000 (14:49 +0200)]
mesa/main: do not copy the exact size of the string
This fixes a compiler warning with stringop-truncation:
```
error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
286 | strncpy(s, msg, MAX_DEBUG_MESSAGE_LENGTH);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18613>
Rhys Perry [Fri, 26 Aug 2022 10:46:06 +0000 (11:46 +0100)]
aco: add VMEMtoScalarWriteHazard tests
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/18270>
Rhys Perry [Thu, 21 Jul 2022 14:13:57 +0000 (15:13 +0100)]
aco: improve printing of s_waitcnt_depctr
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/18270>
Rhys Perry [Thu, 21 Jul 2022 14:13:46 +0000 (15:13 +0100)]
aco: improve printing of sgpr_null
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/18270>
Rhys Perry [Thu, 25 Aug 2022 19:07:41 +0000 (20:07 +0100)]
aco: use some helpers in GFX10 hazard workarounds
No fossil-db changes.
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/18270>
Rhys Perry [Thu, 25 Aug 2022 19:40:31 +0000 (20:40 +0100)]
aco: improve VMEMtoScalarWriteHazard s_waitcnt mitigation
fossil-db (navi10):
Totals from 171 (0.13% of 134563) affected shaders:
Instrs: 69348 -> 69144 (-0.29%)
CodeSize: 381112 -> 380296 (-0.21%)
Latency: 451534 -> 451387 (-0.03%)
InvThroughput: 88692 -> 88686 (-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/18270>
Rhys Perry [Thu, 25 Aug 2022 19:04:01 +0000 (20:04 +0100)]
aco: fix VMEMtoScalarWriteHazard s_waitcnt mitigation
It doesn't make sense for a "s_waitcnt vmcnt(0)" to affect a store or DS
instruction.
LLVM checks for "s_waitcnt vmcnt(0) lgkmcnt(0) expcnt(0)" but ignores
s_waitcnt_vscnt (which I assume is a bug).
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes:
bcf94bb933e ("aco: properly recognize that s_waitcnt mitigates VMEMtoScalarWriteHazard")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18270>
Georg Lehmann [Mon, 12 Sep 2022 11:12:18 +0000 (13:12 +0200)]
nir/opt_algebraic: Optimize more (a cmp b ? a : b) to min/max.
Foz-DB Navi21:
Totals from 112 (0.08% of 134913) affected shaders:
CodeSize: 1618384 -> 1618172 (-0.01%); split: -0.06%, +0.04%
Instrs: 307695 -> 307535 (-0.05%); split: -0.05%, +0.00%
Latency: 3590228 -> 3589658 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 563692 -> 563447 (-0.04%); split: -0.05%, +0.01%
Copies: 24541 -> 24519 (-0.09%); split: -0.10%, +0.01%
Branches: 13480 -> 13468 (-0.09%)
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18548>
Rajnesh Kanwal [Thu, 22 Sep 2022 11:08:00 +0000 (12:08 +0100)]
pvr: Implement vkGetEventStatus API.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18864>
Rajnesh Kanwal [Sun, 25 Sep 2022 19:36:41 +0000 (20:36 +0100)]
pvr: Add assert to check for non-NULL binding_desc.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 19:25:18 +0000 (20:25 +0100)]
pvr: Call VALGRIND_FREELIKE_BLOCK before unmapping to avoid use after free.
Fixes: CID 1503261.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 19:11:53 +0000 (20:11 +0100)]
pvr: Fix Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) errors.
Fixes: CID 1503255, 1503258, 1503265, 1503268, 1504078, 1507509.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:52:10 +0000 (19:52 +0100)]
pvr: Zero init pbe_cs_words to avoid passing on garbage.
In case if the surface->resolve_type is not PVR_RESOLVE_TYPE_PBE
then we do not setup pbe_cs_words in which case we might end up
using garbage values.
Fixes: CID 1515466.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:47:43 +0000 (19:47 +0100)]
pvr: Remove dead code from pvr_perform_start_of_render_clears.
Logically the hw_render would never be NULL so the if block is
never used and can be removed.
Fixes: CID1503270.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:43:47 +0000 (19:43 +0100)]
pvr: Remove framebuffer NULL check from pvr_CmdBeginRenderPass2.
Framebuffer can not be NULL in pvr_CmdBeginRenderPass2.
Fixes: CID 1503259.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:39:31 +0000 (19:39 +0100)]
pvr: Remove redundant assignment error.instruction.
Fixes: CID 1503256.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:38:37 +0000 (19:38 +0100)]
pvr: Remove redundant instruction buffer check.
Fixes: CID 1503273.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:20:22 +0000 (19:20 +0100)]
pvr: Convert attachment indexes to unsigned.
This commit converts attachment indexes used in renderpass to unsigned
and uses VK_ATTACHMENT_UNUSED for unused attachments instead of -1.
Also fixes some signed to unsigned comparisons.
Fixed: CID 1515587, 1515590, 1515597, 1515604.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Tapani Pälli [Tue, 27 Sep 2022 05:42:13 +0000 (08:42 +0300)]
anv: limit to default fast clear color when image used for transfer
v2: use vk_image_layout_to_usage_flags for detecting
transfer usage (Nanley)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7189
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18836>
Rajnesh Kanwal [Thu, 22 Sep 2022 14:39:32 +0000 (15:39 +0100)]
pvr: Handle indirect buffer address in pvr_setup_descriptor_mappings.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18872>
Rajnesh Kanwal [Thu, 22 Sep 2022 13:36:02 +0000 (14:36 +0100)]
pvr: implement vkcmddispatchindirect api.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18872>
Samuel Pitoiset [Thu, 29 Sep 2022 12:49:34 +0000 (14:49 +0200)]
radv: enable the unified heap on APUs for Red Dead Redemption 2
This seems to resolve the memory explosion without hurting performance.
This workaround is only applied for native Vulkan.
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/18884>
Samuel Pitoiset [Tue, 27 Sep 2022 17:46:53 +0000 (19:46 +0200)]
radv: add a new drirc option to enable a unified heap on APUs
This option (radv_enable_unified_heap_on_apu) allows to force the
driver to expose only one heap of VRAM because some games seem to
perform better with that.
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/18884>
Mike Blumenkrantz [Tue, 27 Sep 2022 20:11:01 +0000 (16:11 -0400)]
zink: enable glthread by default
huge perf gains.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18858>
Mike Blumenkrantz [Tue, 27 Sep 2022 21:06:28 +0000 (17:06 -0400)]
pipe-loader: fix zink driinfo header path
this feels like a compiler bug, but somehow just specifying the
shorter path ends up with a broken/partial header include
Fixes:
d760a9151b7 ("gallium: Learn about kopper")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18858>
Mike Blumenkrantz [Tue, 27 Sep 2022 20:04:49 +0000 (16:04 -0400)]
zink: export PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18858>
Mike Blumenkrantz [Tue, 27 Sep 2022 20:04:39 +0000 (16:04 -0400)]
zink: export PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18858>
Mike Blumenkrantz [Tue, 20 Sep 2022 15:42:41 +0000 (11:42 -0400)]
zink: fix/improve handling for multi-component bitfield ops
the original improvement for this correctly handled cases where
the offset/count values were swizzled with .xxxx, but it was broken
for any other swizzling
this adds a nir pass to more easily manipulate the swizzles and rewrite
the multi-component ops as multiple ops with the swizzled params
fixes #6697
Fixes:
8e97f51c676 ("zink: handle swizzled offset/count values for shader bitfield ops")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18706>
Dave Airlie [Wed, 28 Sep 2022 22:26:01 +0000 (08:26 +1000)]
llvmpipe/fs: convert outputs handling to explicit api
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
Dave Airlie [Wed, 28 Sep 2022 22:25:42 +0000 (08:25 +1000)]
llvmpipe/fs: cleanup some remaining mask handling and reuse types
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
Dave Airlie [Wed, 28 Sep 2022 22:24:44 +0000 (08:24 +1000)]
llvmpipe/fs: handle explicit types around blending and c/zs bufs calcs
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
Dave Airlie [Wed, 28 Sep 2022 22:20:25 +0000 (08:20 +1000)]
llvmpipe/fs: use explicit api in viewport code.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
Dave Airlie [Wed, 28 Sep 2022 22:19:44 +0000 (08:19 +1000)]
llvmpipe/fs: pass mask type to alpha to coverage handler
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
Dave Airlie [Wed, 28 Sep 2022 22:17:35 +0000 (08:17 +1000)]
llvmpipe/fs: add sample position type to the interp interface
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
Dave Airlie [Wed, 28 Sep 2022 22:15:28 +0000 (08:15 +1000)]
llvmpipe/fs: port depth code to opaque pointer api
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
Dave Airlie [Mon, 26 Sep 2022 07:36:58 +0000 (17:36 +1000)]
llvmpipe/fs: pass explicit mask_type into interp code.
This is so it is known for explicit pointer support
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
Dave Airlie [Mon, 26 Sep 2022 03:55:57 +0000 (13:55 +1000)]
llvmpipe/fs: add mask_type for mask_store accesses.
This adds and passes around the type for mask stores.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
Dave Airlie [Mon, 26 Sep 2022 03:47:15 +0000 (13:47 +1000)]
gallivm/struct: add opaque ptr friendly pointer accessors.
These just add explicit types.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
Kenneth Graunke [Fri, 30 Sep 2022 00:39:18 +0000 (17:39 -0700)]
Revert "intel/compiler: Vectorize gl_TessLevelInner/Outer[] writes"
This reverts commit
abba55382f5588e3b9dfbc517d5fe940b2917c7c.
The assertions I added late in the process broke shader-db, and my
quick fix broke CI, so let's just revert it for now and I'll resubmit
this later when it's working better.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7385
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18895>
Eric Anholt [Tue, 8 Sep 2020 21:39:51 +0000 (14:39 -0700)]
freedreno/ir3: Validate our scheduling DAGs after construction.
This gives us some better explanation of a stack overflow in ir3_postsched
with shader-db:
IR3_SHADER_DEBUG=nouboopt ./run shaders/nexuiz/46.shader_test
DAG validation failed at:
0x55f6570e8460: 0079:0107:002: _meta:collect r1.w (wrmask=0xff), r1.w, r2.x, r2.y, r2.z, r2.w, r3.x, r3.y, r3.z, false-deps:_[0098:0126:000: mov.u32u32], _[0112:0143:000: mov.u32u32], _[0087:0113:000: mov.u32u32], _[0113:0144:000: mov.u32u32], _[0099:0127:000: mov.u32u32], _[0088:0114:000: mov.u32u32]
Nodes in stack:
0x55f657102050: 0079:0103:009: mov.u32u32 r1.w, r0.x, right=_[0080:0104:009: mov.u32u32]
0x55f6570e8460: 0079:0107:002: _meta:collect r1.w (wrmask=0xff), r1.w, r2.x, r2.y, r2.z, r2.w, r3.x, r3.y, r3.z, false-deps:_[0098:0126:000: mov.u32u32], _[0112:0143:000: mov.u32u32], _[0087:0113:000: mov.u32u32], _[0113:0144:000: mov.u32u32], _[0099:0127:000: mov.u32u32], _[0088:0114:000: mov.u32u32]
0x55f657075f80: 0083:0108:007: samgq (f32)(xyz)r0.z (wrmask=0x7), r1.w (wrmask=0xff), s#3, t#3
0x55f657051b60: 0104:0134:008: ldc.offset0 r3.x (wrmask=0xf), imm[0.000000,0,0x0], r9.w
0x55f657103040: 0112:0143:000: mov.u32u32 r9.w, r0.x, right=_[0113:0144:000: mov.u32u32]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6656>
Eric Anholt [Tue, 8 Sep 2020 21:25:42 +0000 (14:25 -0700)]
util/dag: Add a validation function.
I experienced a circular dag in freedreno, and wanted a way to see what
was going wrong.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6656>
Eric Anholt [Tue, 8 Sep 2020 21:16:05 +0000 (14:16 -0700)]
util/dag: Move the callback function pointer to the state.
No sense passing it as a recursive argument when we have this storage
right there.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6656>
Mike Blumenkrantz [Wed, 28 Sep 2022 01:42:49 +0000 (21:42 -0400)]
glthread: handle DeleteBuffers(n=-1) gracefully
this is a valid error condition
cc: mesa-stable
fixes:
GTF-GL46.gtf21.GL2FixedTests.buffer_objects.buffer_objects
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18856>
Mike Blumenkrantz [Tue, 27 Sep 2022 22:26:49 +0000 (18:26 -0400)]
glthread: use signed vertex buffer offsets when available, don't require them
this is a great memory-saving optimization for drivers that support it,
but for drivesr that can't, it ends up taking slower paths instead
of just consuming more memory
but the year is 2022. we have all the memory. so use more memory if signed
offsets aren't supported
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18856>
Sil Vilerino [Wed, 28 Sep 2022 21:38:47 +0000 (17:38 -0400)]
d3d12: Style variable fix in d3d12_video_decoder_prepare_dxva_slices_control_av1
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>
Sil Vilerino [Wed, 28 Sep 2022 21:38:04 +0000 (17:38 -0400)]
d3d12: Fix aliased usage of m_SliceControlBuffer in d3d12_video_decoder_prepare_dxva_slices_control_XXXX
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>
Sil Vilerino [Fri, 23 Sep 2022 04:17:33 +0000 (00:17 -0400)]
d3d12: Support more video formats
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Adds support for P010 Encoding and Decoding
Also adds support for RGBA/RGBX UNORM/UINT in the video processor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>
Sil Vilerino [Thu, 15 Sep 2022 17:41:10 +0000 (13:41 -0400)]
d3d12: Add support for AV1 Video Decode
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>
Sil Vilerino [Thu, 29 Sep 2022 15:52:45 +0000 (11:52 -0400)]
frontends/va: Fix AV1 decode qm_* parameters reading from VADecPictureParameterBufferAV1
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Those are being read with | 0xF, but instead should be & 0xF to clear the bits above 4 (the field is 4 bits in size)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>
Sil Vilerino [Fri, 23 Sep 2022 04:18:07 +0000 (00:18 -0400)]
frontends/va: Use is_video_format_supported in vlVaVidEngineBlit instead of format list
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>
Sil Vilerino [Fri, 16 Sep 2022 14:29:13 +0000 (10:29 -0400)]
frontends/va: Support AV1 Decode with multiple tiles (num_elements > 1) in a single VASliceParameterBufferAV1 buffer
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>
Sil Vilerino [Wed, 28 Sep 2022 13:45:15 +0000 (09:45 -0400)]
frontends/va: Add more params from VADecPictureParameterBufferAV1 and VASliceParameterBufferAV1 to pipe_av1_picture_desc
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>
Marcin Ślusarz [Thu, 29 Sep 2022 14:47:32 +0000 (16:47 +0200)]
intel/compiler: fix loading of draw_id from task & mesh payload
Previously both destination and source were floats, so no casting was
performed, but with
7664c85b1da source register was reinterpreted as
unsigned integer, so MOV started casting that integer to float.
Fixes:
7664c85b1da ("intel/compiler: Create and use struct for TASK and MESH thread payloads")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18886>
Dmitry Osipenko [Fri, 23 Sep 2022 14:29:57 +0000 (17:29 +0300)]
ci/virgl: Enable virgl-iris-traces
All virgl-iris-traces tests are passing now after the crosvm revup that
fixed crosvm crash and after updating test checksums. Enable auto-testing
for the virgl-iris-traces pipeline stage.
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18693>
Dmitry Osipenko [Fri, 23 Sep 2022 14:10:36 +0000 (17:10 +0300)]
ci: Update virgl-iris-traces checksums
Few virgl-iris-traces tests fail because resultant images now have few
pixels that changed. The actual reason of the change is unknown, we
assume it happened due to a new optimizations. Update the virgl-iris-traces
checksums.
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18693>
Dmitry Osipenko [Tue, 20 Sep 2022 00:16:23 +0000 (03:16 +0300)]
ci: Bump crosvm version
Recent crosvm contains a fix for the unmapping memory on a wrong thread
that crashes crosvm. Bump the crosvm version.
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Link: https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/282
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18693>
Yiwei Zhang [Thu, 22 Sep 2022 06:06:22 +0000 (06:06 +0000)]
venus/ci: remove redundant crosvm patch
VirglRenderer::export_blob doesn't need to handle opaque fd. That will
let rutabaga's export_blob to fail and fallback directly to the external
mapping path desired.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18693>
Samuel Pitoiset [Wed, 28 Sep 2022 15:35:30 +0000 (17:35 +0200)]
radv: ignore shader stages that don't need to be imported with GPL
Fixes an assertion with vkoverhead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18869>
Samuel Pitoiset [Wed, 28 Sep 2022 15:11:08 +0000 (17:11 +0200)]
radv: fix initializing the blend state for NULL render pass with GPL
If a library with only the vertex input interface is created, this
would crash.
This fixes segfault with vkoverhead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18869>
Samuel Pitoiset [Wed, 28 Sep 2022 12:13:17 +0000 (14:13 +0200)]
radv: fix initializing the attribute mask for VS input state and GPL
attribute_mask was unused when I first introduced this but now it's
used again.
This fixes a bunch of GPL regressions.
Fixes:
0feab7b9cfa ("radv: prepare the VS input state for prologs created with GPL")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18862>
Mike Blumenkrantz [Wed, 28 Sep 2022 16:13:42 +0000 (12:13 -0400)]
zink: replace mixed_zs with zs feedback loops
this is the more technically correct way to handle such things
SoroushIMG <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18855>
Mike Blumenkrantz [Wed, 28 Sep 2022 02:51:50 +0000 (22:51 -0400)]
zink: add a draw barrier when unbinding a sampler-bound fb surface
this is guaranteed to need some kind of layout change, so ensure the
barrier actually happens
cc: mesa-stable
SoroushIMG <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18855>
Corentin Noël [Thu, 22 Sep 2022 15:14:42 +0000 (17:14 +0200)]
virgl: Add nir_lower_tex pass
In GLES hosts that do not support EXT_texture_shadow_lod we need to lower
the shadow texture calls with offset.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18296>
Corentin Noël [Mon, 29 Aug 2022 14:44:12 +0000 (16:44 +0200)]
virgl: Add TEXTURE_SHADOW_LOD capability support
Bind PIPE_CAP_TEXTURE_SHADOW_LOD with its value so that we are not using
non-existing GLSL on host side.
Rename VIRGL_CAP_FAKE_FP64 into VIRGL_CAP_HOST_IS_GLES
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18296>
Samuel Pitoiset [Wed, 28 Sep 2022 16:19:19 +0000 (18:19 +0200)]
radv: remove NULL checks when binding a graphics pipeline
The driver no longer bind NULL graphics pipelines, so these checks
are useless.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18873>
Connor Abbott [Wed, 28 Sep 2022 11:53:09 +0000 (13:53 +0200)]
tu: Fix setting RB_DEPTH_CNTL::Z_CLAMP_ENABLE
I missed this when enabling pipeline libraries, and we were also setting
this to the wrong thing. Previously we were using rasterization state
when parsing depth/stencil indirectly via builder->depth_clip_disable,
which is not allowed with pipeline libraries. Fixing this is a bit
painful because now RB_DEPTH_CNTL can depend on state from both the
fragment shader library and the pre-rasterization library, in addition
to being disabled via output interface state.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18861>
Connor Abbott [Wed, 28 Sep 2022 10:47:38 +0000 (12:47 +0200)]
freedreno/a6xx, tu: GRAS_CL_CNTL::UNK5 is Z_CLAMP_ENABLE
This changes the behavior for freedreno but it should ultimately be the
same for GL/GLES, given what mesa/st does.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18861>
Connor Abbott [Wed, 28 Sep 2022 10:32:42 +0000 (12:32 +0200)]
Revert "freedreno,ir3: rename Z_CLAMP_ENABLE to Z_CLIP_DISABLE"
This reverts commit
6cb41c51884c2488194f74e2ce637b950c835620. It was
incorrect and the issue it was trying to fix was actually a zink bug.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18861>
Mike Blumenkrantz [Mon, 13 Jun 2022 16:24:27 +0000 (12:24 -0400)]
lavapipe: dynamic state3
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
Jason Ekstrand [Thu, 21 Jul 2022 22:18:27 +0000 (17:18 -0500)]
vulkan: Add more dynamic color blend states
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
Jason Ekstrand [Thu, 21 Jul 2022 19:55:51 +0000 (14:55 -0500)]
vulkan: Add more dynamic multisample states
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
Jason Ekstrand [Thu, 21 Jul 2022 19:29:16 +0000 (14:29 -0500)]
vulkan: Add dynamic state for tessellation domain origin
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
Jason Ekstrand [Thu, 21 Jul 2022 19:19:30 +0000 (14:19 -0500)]
vulkan: Add more dynamic rasterizer state
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
Jason Ekstrand [Thu, 21 Jul 2022 19:01:02 +0000 (14:01 -0500)]
vulkan: Add a dynamic state for vp.depth_clip_negative_one_to_one
This is the last bit of viewport state that's not dynamic. Making it
dynamic will help ANV out a bit.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
Jason Ekstrand [Thu, 21 Jul 2022 18:54:16 +0000 (13:54 -0500)]
vulkan: Rename viewport_state::negative_one_to_one
This makes it a bit clearer what it's for.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
Mike Blumenkrantz [Thu, 29 Sep 2022 04:34:44 +0000 (00:34 -0400)]
vulkan: Update the XML and headers to 1.3.230
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
Jason Ekstrand [Thu, 21 Jul 2022 21:27:44 +0000 (16:27 -0500)]
vulkan: Use altlen when available for array lengths
When the array length is a calculation, the C version of the calculation
is provided in altlen while len often contains LaTeX that we can't do
anything with. Use altlen when available. Also, while we're here, wrap
array lengths in parentheses in case they contain math.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
Filip Gawin [Mon, 16 Aug 2021 20:41:24 +0000 (22:41 +0200)]
gallium: avoid using float based conditions in loops
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12996>
Mike Blumenkrantz [Tue, 27 Sep 2022 21:35:00 +0000 (17:35 -0400)]
zink: pass actual screen->threaded to zink_tc_context_unwrap()
using the ctx->screen pointer may not actually yield a zink_screen object
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18868>
Mike Blumenkrantz [Tue, 27 Sep 2022 18:42:08 +0000 (14:42 -0400)]
zink: hook up VK_EXT_depth_clamp_zero_one
this is required for GL since the allowable depth range is always [0,1]
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18868>
Mike Blumenkrantz [Thu, 22 Sep 2022 20:41:52 +0000 (16:41 -0400)]
zink: move create_pipeline_lib to zink_program.c
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18868>
Mike Blumenkrantz [Thu, 22 Sep 2022 21:01:42 +0000 (17:01 -0400)]
zink: rework ZINK_PIPELINE_LIBRARY_FORCE into ZINK_DEBUG flag
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18868>
Mike Blumenkrantz [Thu, 22 Sep 2022 21:03:17 +0000 (17:03 -0400)]
zink: move zink_screen_get_pipeline_cache() calls out to callers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18868>
Jason Ekstrand [Mon, 26 Sep 2022 15:48:08 +0000 (10:48 -0500)]
vulkan/wsi: Add a supports_scanout flag
This flag indicates whether or not the legacy scanout flag is supported.
It defaults to true since that has been the default assumption for the
WSI code up until now.
On NVIDIA hardware, we can't render to linear so, if we don't have
modifiers, we want to automatically fall back to the blit path. In
theory, we could do this inside the driver but it's a giant pain and
much harder to ensure that the blit only happens as part of
vkQueuePresent().
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
Jason Ekstrand [Mon, 26 Sep 2022 15:53:53 +0000 (10:53 -0500)]
vulkan/wsi: Add a typedef for memory type select callbacks
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
Jason Ekstrand [Mon, 26 Sep 2022 18:13:33 +0000 (13:13 -0500)]
vulkan/wsi: Don't expose as many image configure helpers
Now that everything is going through the params-based ones, we don't
need to expose the individual ones.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
Jason Ekstrand [Mon, 26 Sep 2022 18:06:48 +0000 (13:06 -0500)]
vulkan/wsi: Always configure images in wsi_swapchain_init()
Now that all the back-ends are converted, we can drop all the extra code
we had for supporting both paths.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
Jason Ekstrand [Mon, 26 Sep 2022 18:04:24 +0000 (13:04 -0500)]
vulkan/wsi/win32: Configure images via params passed to wsi_swapchain_init()
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
Jason Ekstrand [Mon, 26 Sep 2022 18:02:46 +0000 (13:02 -0500)]
vulkan/wsi/display: Configure images via params passed to wsi_swapchain_init()
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
Jason Ekstrand [Mon, 26 Sep 2022 17:58:38 +0000 (12:58 -0500)]
vulkan/wsi/wayland: Configure images via params passed to wsi_swapchain_init()
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
Jason Ekstrand [Mon, 26 Sep 2022 17:17:55 +0000 (12:17 -0500)]
vulkan/wsi/x11: Configure images via params passed to wsi_swapchain_init()
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
Jason Ekstrand [Mon, 26 Sep 2022 17:03:28 +0000 (12:03 -0500)]
vulkan/wsi: Support configuring swapchain images as part of swapchain init
The eventual goal here is to move as much of the prime and blit logic
out of the individual window-system back-ends as possible.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
Dave Airlie [Mon, 26 Sep 2022 06:49:06 +0000 (16:49 +1000)]
llvmpipe/cs: move compute code to explicit pointer types
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
Dave Airlie [Mon, 26 Sep 2022 06:42:17 +0000 (16:42 +1000)]
llvmpipe/setup: move setup code to explicit pointers.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
Dave Airlie [Mon, 26 Sep 2022 03:52:21 +0000 (13:52 +1000)]
llvmpipe/fs: fix invocations access for opaque ptrs.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
Dave Airlie [Mon, 26 Sep 2022 03:00:11 +0000 (13:00 +1000)]
llvmpipe/cs: convert cs thread data to opaque friendly api
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
Dave Airlie [Mon, 26 Sep 2022 02:59:05 +0000 (12:59 +1000)]
llvmpipe/cs: convert cs context to opaque friendly api
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
Dave Airlie [Mon, 26 Sep 2022 02:56:23 +0000 (12:56 +1000)]
llvmpipe/fs: convert linear context to opaque pointers friendly
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
Dave Airlie [Mon, 26 Sep 2022 02:51:30 +0000 (12:51 +1000)]
llvmpipe/fs: convert thread data ptr to opaque ptr friendly apis
this converts the thread data code.
The cache code still isn't fixed but needs future API changes
to sampling code.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
Dave Airlie [Mon, 26 Sep 2022 02:44:53 +0000 (12:44 +1000)]
llvmpipe/fs: start passing explicit context pointer type.
In order to support opaque pointers in the future, we need to be
more explicit with the pointer types here.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>