Commit graph

200653 commits

Author SHA1 Message Date
Sil Vilerino
8f696d8d97 d3d12: Enable Warnings C4267, C4996, C4146, C4244, C4389, C4838, C4302, C4018 in src/gallium/drivers/d3d12 subtree
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
585ce7e831 d3d12_video_enc.h/cpp Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
98ebb0b2e9 d3d12_video_dec.h/cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
bb5fb4d75d d3d12_video_enc_hevc.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
33b5df7c39 d3d12_video_enc_h264.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
acefedbb35 d3d12_video_enc_av1.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
a4aedaf783 d3d12_video_proc.h/cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
fa6f1e05f0 d3d12_video_dec_hevc.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
68ac1ed1c5 d3d12_video_dec_vp9.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
b5b08d1ac7 d3d12_video_dec_h264: Fix warning C4244 uint64_t to size_t cast
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
b970b32939 d3d12_resource: Fix warning C4244 for x86 builds assign uint64_t to uintptr_t
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
0e478c3566 d3d12_video_encoder_bitstream_builder_h264: Fix warning C4244 for x86 builds assign uint64_t to size_t
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
8bfe3976d9 util: cpu_detect.c Fix warning C5274: behavior change: _Alignas no longer applies to the type '<unnamed-tag>' (only applies to declared data objects)
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
819558903c d3d12_bufmgr.cpp: Fix warning C4244 for x86 builds assign uint64_t to size_t
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
46ed17cf69 d3d12: Add offset limit check to d3d12_resource_from_memobj
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
73cdb980bf d3d12: Fix warning C4018 signed/unsigned mismatch
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
15dd8cd9a8 d3d12: Fix warning C4389: An == or != operation involved signed and unsigned variables. This could result in a loss of data.
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
56484fd010 d3d12: Fix warning C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
978fd1cebe d3d12: Fix warning C4267 conversion from 'size_t' to 'type', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
e061792e25 src/compiler: Fix warning C4389: An == or != operation involved signed and unsigned variables. This could result in a loss of data.
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
8ecb7bc2a2 src/compiler: Fix warning C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
4d653c7df9 util: Fix warning C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
6a724af20d src/gallium/auxiliary/util/u_draw.h: Fix C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
b5617058e4 u_math.h: Change power of two assert to fix warning C4146: unary minus operator applied to unsigned type, result still unsigned
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
8f8438bd8c u_dynarray.h: Fix warning C4267 conversion from 'size_t' to 'type', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Manuel Dun
9ab62e6452 Gfxstream: Initial mingw "compilable" Windows version of mesa/gfxstream
Initial "compilable" version of mesa/gfxstream on Windows. For now it is
achieved through "#if !DETECT_OS_WINDOWS" directives hence it is NOT
functional. The compilation works with mingw only and the compilation is
tested in a windows host. This commit is intended to only pass the
compilation process without errors.

Also created stub code for a future windows implementation.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32795>
2025-01-15 20:57:18 +00:00
Aleksi Sapon
f4eb6fde8f llvmpipe: LLVM v2f32 trunc/floor/ceil/nearbyint generates optimal x86 code since at least version 8
Based on the tests committed here:
f9afee479f

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32964>
2025-01-15 20:20:34 +00:00
Aleksi Sapon
0b2664635f llvmpipe: fix lp_test_arit on Windows
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32964>
2025-01-15 20:20:34 +00:00
Konstantin Seurer
5de7a7c5a6 gallivm: Take helper invocations into account when skipping branches
if %cond {
   %store_reg (%reg, %val)
}

can be skipped if no invocations are active. This did not take helper
invocations into account, meaning the value of %reg could be garbage for
helper invocations.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31802>
2025-01-15 17:55:38 +00:00
Aaron Ruby
e862bb52bd gfxstream: Remove internal vk_util.h and vk_struct_id.h entirely
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
e9663276f4 vulkan/util: Add c99_compat.h inclusion for cpp 'restrict' compatibility
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
f766c64c3a gfxstream: Fix unused variable warnings in ResourceTracker.cpp
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
6923af6cc4 gfxstream: Remove VK_HOST_CONNECTION macro
Only need the encoder, the rest was replaced by the
SetupInstanceForProcess() routine.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
1e69e910ca gfxstream: Some cleanup in manual entrypoints
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Mike Blumenkrantz
b73d66e0c0 lavapipe: stop using pipeline layouts in some places
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
f6ff8bdf74 lavapipe: unsupport NV_device_generated_commands
this is no longer useful

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
3f90303eeb lavapipe: move workgraph lowering up and delete pipeline param
Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
4d1ed5d66d lavapipe: fix bitmask type for sampler updating
need 32bit to contain all the bits here

cc: mesa-stable

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
e2023474b4 lavapipe: split out bda descriptor function params from struct
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
596efeda33 lavapipe: split out sampler init from create
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
4db07aeb1c vk/sampler: split out sampler init from create
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
caf50d6723 lavapipe: stop storing texture handle for samplers
this is never used

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Nanley Chery
15e23f3781 anv: Limit slow clear heuristic to ACM and prior
It hasn't been tuned for Xe2.

Fixes: 052d7e1a9c ("anv: Slow clear if fast-clear cost is not mitigated")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33035>
2025-01-15 15:43:19 +00:00
Nanley Chery
caf007ff27 anv: Drop can_fast_clear_with_non_zero_color()
This got dropped during a rebase.

Fixes: 35f02d8f36 ("anv: Inline can_fast_clear_with_non_zero_color")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33035>
2025-01-15 15:43:19 +00:00
Lars-Ivar Hesselberg Simonsen
ee4460acf4 panvk: Fix descriptor decode
The expansion of DUMP_CL is missing parenthesis, making the dumping of
descriptors incorrect.

Fixes: 3b69edf825 ("pan/genxml: Enforce explicit packed types on pan_[un]pack")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33040>
2025-01-15 15:05:05 +00:00
Icenowy Zheng
b6c2ea4d99 zink: emit consts as uint only on IMG proprietary drivers
After the SPIR-V generator is optimized to generate multiple constant
types, the shader compiler of Imagination proprietary drivers can no
longer correctly handle these shaders and will bail out.

Handle this as a driver quirk and revert to the old behavior with only
uint constants when IMG proprietary drivers are detected.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32342>
2025-01-15 14:35:59 +00:00
Boris Brezillon
7755c41b3e panvk/csf: Rework the occlusion query logic to avoid draw flushes
Right now, we have a problem when we flush draws inside a render pass
and we don't have enough information to re-emit the framebuffer/tiler
descriptors.

Turns out the only situations where this happens is when an occlusion
query end happens, but we shouldn't really flush the draws in that case.
What we should do instead is record the OQ in our command buffer, so we
can signal OQ availability when the fragment job is done.

In order to solve that, we add an OQ chain to the command buffer to
track OQs ending inside the render pass. We then walk this chain at
fragment job emission time to signal the syncobjs attached to each
query.

This also simplifies the whole occlusion query synchronization model:
instead of waiting for each syncobj individually, we now wait on
the iterators to make sure all OQs have landed. Thanks to this new
synchronization, we can batch OQ reset/copy operations and make the
command stream a lot shorter when big query ranges are copied/reset.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
ae0534c6cc panvk/csf: Use cs_sr_reg64() instead of cs_reg64() when setting the OQ pointer
We have wrappers distinguishing staging registers from sratch registers,
so let's use cs_sr_reg64() here.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
cc517822e5 panvk/csf: Make all sync operations on the CSG scope
The SYSTEM scope triggers CPU interrupts we don't really need, so let's
use the CSG scope to avoid those. Note that the scope doesn't encode
the visibility aspect, meaning changes to the sync object with a CSG
scope will still be instantly visible to the CPU, it's just that the
CPU needs to poll the value to detect a change, which is basically what
we're doing for syncobjs attached to events/queries, so we're good.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
6a7bcff1be pan/cs: cs_{break,continue} are not for_each macros
Let's prevent clang-format from adding the semi-colon on a new line when
we use cs_{continue,break}();

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00