Commit Graph

192676 Commits

Author SHA1 Message Date
Jianxun Zhang
49c91a4ea0 anv: Fix assertion failures on BMG (xe2)
Fixes: beb0ea2469 ("anv: Disable tracking fast clear and aux state (xe2)")

crucible run func.first

dEQP-VK.api.copy_and_blit.core.image_to_image.
all_formats.color.2d_to_2d.a1r5g5b5_unorm_pack16.
r16_uint.optimal_optimal

dEQP-VK.pipeline.monolithic.multisample.misc.clear_attachments.
r8g8b8a8_unorm_r16g16b16a16_sfloat_r16g16b16a16_sint_d32_sfloat_
s8_uint.16x.ds_resolve_sample_zero.whole_framebuffer

src/intel/vulkan/anv_private.h:5491:
anv_image_get_compression_state_addr: Assertion
`device->info->ver < 20' failed.

Backport-to: 24.2
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30111>
2024-07-29 01:42:26 +00:00
Timothy Arceri
a629d829dc glsl: make use of new tex src deref intrinsic
The bindless spec has no language requiring functions params to be
defined as bindless so we need to be able to look at the values being
passed to functions to decide if they are bindless or not. This
intrinsic allows us to wait until function inlining is complete to make
this assessment.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11535
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30315>
2024-07-29 00:06:10 +00:00
Timothy Arceri
017770ff14 nir: add nir_tex_src_{sampler,texture}_deref_intrinsic
To be used as a placeholder until after function inlining so we can
replace function params with bindless handles if needed.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30315>
2024-07-29 00:06:10 +00:00
Timothy Arceri
ef13ff00d1 nir: create validate_tex_src_texture_deref() helper
Will be used in a following patch.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30315>
2024-07-29 00:06:10 +00:00
Faith Ekstrand
3631196414 nvk: Disable sparse D32S8 cubes pre-Turing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
ec7924ab90 nvk: Default to NAK on Maxwell+
We're now at parity with the old compiler and better.  We also support
way more features on NAK than with codegen.  No reason not to use NAK
by default at this point.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
13cc4e48d1 nak/sm50: Set f2f.high
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
7b84319ec4 nak: Manually flush denorms for nir_op_fquantize2f16 pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
315e8d6faa nak: Disallow isetp.x pre-Volta
Fixes: a33507d621 ("nak/sm50: Set the .x bit for isetp")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
c695fd7cd2 nak: Rework isetp64 on sm50 again
Unlike on Volta, isetp.x on Maxwell seems to take the accumulator into
account and I don't know exactly how.  Fortunately, we can avoid it by
emitting a different 3 instructions.  The result is actually a good bit
simpler.

Fixes: efd86d6daa ("nak/builder: Fix isetp64 for pre-Volta")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
3d4a4a68a0 nak: Non-constant offsets are allowed on patch loads
Fixes: 37a38f6744 ("nak/sm50: Add support for OpAL2P")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
72eb0b6c13 nak: Add tests for OpPSetP
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
29f909513b nak: Add a PredSetOp::eval() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
76e66beb5a nak: pre-Volta uses r0 to output the final GS handle
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
63db105014 nak: Rename OpFSOut to OpRegOut
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
0b4bfefd6f nak/nir: Preserve rounding modes in split_64bit_conversions()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
ec84d7ce74 nak: Add tests for OpPopC and enable SrcMod::BNot
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
27ee9027da nak: Use OpFoldData::get_u32_bnot_src() more places
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
1a6ca8e601 nak/sm50: Set the not bit for OpLop2::srcs[0]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
61076b04a7 nak: Add tests for OpIAdd2 and OpIAdd2X
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
aa87c9c96d nak/hw_tests: Use better test values for iadd tests
This new helper makes sure we return some particularly interesting
numbers which may hit edge cases in the hardware and/or folding code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
6291440ee7 nak/hw_tests: Respect src_mod and src_swizzle in op auto-tests
Instead of replacing the whole source, just replace the src_ref so we
maintain the modifier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
f557423467 nak: Add source and destination types for carry values
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
eb5f333606 nak: Assert no overflow when legalizing iadd with too many ineg modifiers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
96812f6b72 nak: Add tests for OpFlo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
10701ac331 nak/hw_tests: Explicitly test equal cases in test_isetp64
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
957e7b3451 nak: Lower iadd64(x, -y) to isub64(x, y) in NIR
This is easier than optimizing in the back-end and lets us use 2
instructions for an isub64 rather than 4.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
8646ae7e23 nak/builder: Allow source modifiers in ineg64()
This lets us implement ineg64(x) as iadd64(0, -x, 0) and also reduces
the number of cases in iadd64() itself.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
7f0b8a82d0 nak: Add tests for nak_builder::ineg64
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
73384c626d nak: SrcMod::INeg cannot be folded
The only reason why this hasn't been causing us problems before is
because the only use of ineg in an iadd with a carry-out is ineg64 and
that's basically guaranteed to be folded in NIR because it's unary.
However, if we want to be able to use SrcMod::INeg more, we need to be
more careful about it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
c2b5d7ca41 nak/sm50: Add execution delays for more ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
ce91e8875a nak: OpKill also needs a delay on Maxwell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
c8eb8f946a nak: Add an optimization for CRS ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
1cf945a5d1 nak: Add target labels to CRS pop instructions
This makes them easier to read.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
9bbc692064 nak/nir: Rework CRS handling
THe new code tracks the whole call/return stack.  This means we know the
size of the stack at all times.  It also means that we can detect a
bunch of potential error cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
cb5e10d0aa nak/nir: Add a few more NIR helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
f66ca6edc3 nak/nir: Fix the reverse execlist iterator
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
d19ea8524b nvk: Take CRS into account when allocating the SLM area
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
b78f7d208b nak: Plumb through the call/return stack size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
3e935df2b0 nak: Move the runner into the main nak crate
This makes the meson a bit simpler since we can just conditionally build
it based on #[cfg(test)] instead of breaking it into a separate library.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Rob Clark
ad90bf0500 freedreno/a6xx: Initial a7xx support
Passing all of deqp-gles*

LRZ is still causing some artifacts in games so it is disabled for now.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
e6be78c703 freedreno/a6xx: Rework CCU_CNTL emit for a7xx
Regs are different, and a750+ gets new configuration for VPC cache in
GMEM.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
1f41d59059 freedreno/a6xx: Refactor CP_EVENT_WRITE emit
Consolidate the various uses of CP_EVENT_WRITE into helpers, and use use
fd_gpu_event to manage the differences between a6xx and a7xx.  This is a
bit churny as it spreading a fair bit of the CHIP template param around.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
b1937f76ff freedreno/a6xx: Allocate lrcfc when needed for direction tracking
On later GPUs this buffer is also used for direction tracking, etc.
Meaning that it is not optional.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
679e9093e1 freedreno: Extract out shared LRZFC layout helpers
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
beb5577e12 freedreno: Extract out common UBWC helper
And re-use in gallium driver.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
5c34a5e59a freedreno: Move GENX/CALLX magic to common
And re-use them in the gallium driver

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
a6c9f152cc freedreno/drm: Handle a7xx case
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
31302ca107 tu/drm/virtio: Add missing a7xx case
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:17 +00:00
Rob Clark
8ff33a756d freedreno/cffdec: Fix a7xx CP_EVENT_WRITE decoding
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:17 +00:00