Commit Graph

155849 Commits

Author SHA1 Message Date
Daniel Schürmann
481f78ab93 radv/rt: place any-hit scratch vars after intersection scratch vars
If both, any-hit and intersection shader, use scratch vars,
it could happen that they end up in the same location and
overwrite each other.
Found by inspection.

Fixes: c3d82a9622 ('radv: Add pass to lower anyhit shader into an intersection shader.')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21863>
2023-03-13 11:45:26 +00:00
Jordan Justen
48ff68820e intel/dev: Enable MTL PCI ids
Ref: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/drm/i915_pciids.h?h=v6.0-rc4#n736
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18481>
2023-03-13 10:17:51 +00:00
Mike Blumenkrantz
e28b982db8 radv: avoid a huge memset in radv_graphics_pipeline_compile()
this has a noticeable impact on pipeline creation

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20947>
2023-03-13 08:11:10 +01:00
Samuel Pitoiset
1c286db14e radv: zero-initialize radv_shader_info earlier for graphics pipeline
This should allow us to remove a big memset when compiling a
graphics pipeline. This is mostly for imported NIR stages which
don't go through radv_pipeline_stage_init().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20947>
2023-03-13 08:11:10 +01:00
Samuel Pitoiset
67635bb3e3 radv: zero-initialize radv_shader_args right before declaring them
This should allow us to remove a big memset when compiling a
graphics pipeline. This is mostly for imported NIR stages which
don't go through radv_pipeline_stage_init().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20947>
2023-03-13 08:11:10 +01:00
Mike Blumenkrantz
c505f892d4 radv: delete radv_graphics_pipeline_compile() asserts
validation should catch these by now

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20947>
2023-03-13 08:11:10 +01:00
Vinson Lee
29c6a09887 pps: Fix build errors.
In file included from ../src/tool/pps/pps_device.cc:10:
../src/tool/pps/pps_device.h:23:11: error: ‘uint32_t’ does not name a type
   23 |    static uint32_t device_count();
      |           ^~~~~~~~

In file included from ../src/tool/pps/pps_counter.cc:10:
../src/tool/pps/pps_counter.h:22:4: error: ‘uint32_t’ does not name a type
   22 |    uint32_t id;
      |    ^~~~~~~~

Fixes: 1cc72b2aef ("pps: Gfx-pps v0.3.0")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8186
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21714>
2023-03-13 01:22:46 +00:00
Marek Olšák
c455ea6144 glthread: qualify the *cmd unmarshal parameter with restrict
This seems like a logical thing to do. Clearly the memory can't be
accessed with any other pointer.

Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21777>
2023-03-12 17:56:18 -04:00
Marek Olšák
862b00b795 mesa: put dispatch table initialization into one place
We have 3 new/changed functions with this commit:
1. _mesa_alloc_dispatch_tables creates all dispatch tables that are not
   created on demand and sets them to nop. This operates on gl_dispatch,
   so it's reusable (e.g. glthread will want to use it)
2. _mesa_free_dispatch_tables frees everything
3. _mesa_initialize_dispatch_tables initializes gl_dispatch for GL
   (not glthread)

Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21777>
2023-03-12 17:56:16 -04:00
Marek Olšák
dae902e11e mesa: rename CurrentClientDispatch to GLApi
I like this more. The name self-documents itself. It's always equal
to the dispatch set in glapi.

GLAPI is a definition, so can't use that.

Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21777>
2023-03-12 17:56:15 -04:00
Marek Olšák
6b22642e21 mesa: move ctx->Table -> ctx->Dispatch.Table except Client & MarshalExec
There is a new struct gl_dispatch, which I'd like to reuse in glthread.
This allows building code around gl_dispatch that can be shared between
mesa and glthread. This is only refactoring.

Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21777>
2023-03-12 17:56:11 -04:00
Marek Olšák
ef0e327d9f glapi: inline the meson list files_mapi_util
so that people can easily tell where these files are used by searching
for the file names in the meson files.

Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21777>
2023-03-12 17:56:10 -04:00
Marek Olšák
eed145004b glapi: move files specific to shared-glapi into the shared-glapi subdirectory
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21777>
2023-03-12 17:56:03 -04:00
David Heidelberg
7cf7d497e7 ci/clover: disable the jobs
Prepare for Clover removal; don't waste resources on Clover anymore.

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21865>
2023-03-12 20:50:14 +01:00
Daniel Schürmann
3d4f6a00b8 aco/spill: allow for disconnected CFG
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20853>
2023-03-12 18:07:18 +00:00
Daniel Schürmann
caec48529b aco/insert_exec_mask: allow for disconnected CFG
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20853>
2023-03-12 18:07:18 +00:00
Daniel Schürmann
7f7a70778f aco/dead_code_analysis: don't add artificial uses to p_startpgm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20853>
2023-03-12 18:07:18 +00:00
Daniel Schürmann
fb99bc5f30 aco/value_numbering: clear hashmap between disconnected CFGs
There is no dominance-relationship between two disconnected CFGs,
thus no CSE is possible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20853>
2023-03-12 18:07:18 +00:00
Daniel Schürmann
678aef9f06 aco/dominance: set immediate dominator for any BB without predecessors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20853>
2023-03-12 18:07:18 +00:00
Kai Wasserbäch
bb2db56ffe fix: gallivm: fix LLVM #include of Host.h, moved to TargetParser
Upstream moved Host.h from Support to TargetParser in LLVM 17.

This shouldn't lead to a FTBFS, since there is a forwarding include left
behind. Sadly the added deprecation warning #pragma is invalid and thus
causes a build failure right away. But since we would have to follow the
move anyway in the future, just do it right away.

Reference: d768bf994f
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Closes: #8275
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21263>
2023-03-12 14:02:23 +00:00
Konstantin Seurer
e3aa058317 radv/rt: Properly handle pNext of pipeline library stages
Fixes
dEQP-VK.pipeline.pipeline_library.graphics_library.misc.non_graphics.shader_module_info_rt_lib.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21707>
2023-03-12 13:18:15 +00:00
Konstantin Seurer
ef5cba56a0 vulkan: Add vk_shader_module_init
This will be used for allocating shader modules using ralloc by RADV.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21707>
2023-03-12 13:18:15 +00:00
Konstantin Seurer
0fc8335ccb radv/rt: Use vk_pipeline_hash_shader_stage for RT stages
Fixes
dEQP-VK.pipeline.pipeline_library.graphics_library.misc.non_graphics.shader_module_info_rt.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21707>
2023-03-12 13:18:15 +00:00
David Heidelberg
2b00eaaedc ci/iris: update apl and glk expectations, after enabling Wayland support
After enabling the Wayland platform for x86_64,
multiple new tests were triggered, some of which timed out.

Also wayland-dEQP-EGL.functional.negative_api.create_pixmap_surface now pass.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21786>
2023-03-12 00:11:09 +00:00
Alyssa Rosenzweig
45554a957a agx: Lower discard late
Fixes regression with Dolphin's ubershaders.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21855>
2023-03-11 23:34:56 +00:00
Mike Blumenkrantz
c04a7c9267 zink: ignore renderdoc if ZINK_RENDERDOC isn't in use
this otherwise has some weird side effects

Fixes: 48a0478126 ("zink: add renderdoc handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21816>
2023-03-11 22:10:38 +00:00
Alyssa Rosenzweig
7e908878c1 ail: Restructure generated tests
Currently, the generated tests consist of some boilerplate, generated
test cases, and at the very end the actual test. This is bad for readability,
because the actual code is all the way at the bottom. It's also bad for
clang-format linting: even though the test cases are /* clang-format off */,
they still take an exceptionally long time to parse when linting. I suspect this
is a clang-format bug, but it's easy enough to workaround.

To solve these issues, restructure so that the test cases are in separate files
(containing the actual data), but the manually written test functions are
consolidated into a new family of generated layout tests. This is probably
cleaner.

Parallel clang-format linting is now 10x faster on the M1, which means it's
now practical to lint in my "publish branch" hook.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21854>
2023-03-11 20:45:42 +00:00
José Roberto de Souza
43e21702f6 anv: Integrate gem vm bind and unbind kmd backend functions
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21698>
2023-03-11 17:56:01 +00:00
José Roberto de Souza
37fa2fa30e anv: Add gem VM bind and unbind to backend
Not using it yet, that will be done in the next patch.
Xe only supports submission using VM.
For i915 the backend functions are just a noop.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21698>
2023-03-11 17:56:01 +00:00
José Roberto de Souza
324d22d684 anv: Implement gem close and mmap for Xe backend
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21698>
2023-03-11 17:56:01 +00:00
José Roberto de Souza
149e945ad4 anv: Implement Xe functions to create and destroy VM
Also using the vm_id to create gem buffers.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21698>
2023-03-11 17:56:01 +00:00
José Roberto de Souza
d5f767edf9 anv: Implement gem_create for Xe backend
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21698>
2023-03-11 17:56:01 +00:00
Isabella Basso
59fea8af3a nir/algebraic: remove duplicate bool conversion lowerings
While [1] added some boolean conversion lowering patterns, those were
already dealt with on [2].

[1] - b86305bb ("nir/algebraic: collapse conversion opcodes (many patterns)")
[2] - d7e0d47b ("nir/algebraic: nir: Add a bunch of b2[if] optimizations")

Fixes: b86305bb ("nir/algebraic: collapse conversion opcodes (many patterns)")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Isabella Basso <isabellabdoamaral@usp.br>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20965>
2023-03-11 17:21:38 +00:00
Isabella Basso
a553d3cd29 nir/algebraic: make patterns for float conversion lowerings imprecise
As noted on [1], lowering patterns of the form
floatS -> floatB -> floatS ==> floatS
cannot require precision since this may cause flush denorming.

[1] 3f779013 ("nir: Add an algebraic optimization for float->double->float")

Fixes: b86305bb ("nir/algebraic: collapse conversion opcodes (many patterns)")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Isabella Basso <isabellabdoamaral@usp.br>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20965>
2023-03-11 17:21:37 +00:00
Isabella Basso
79c94ef52e nir/algebraic: extend lowering patterns for conversions on smaller bit sizes
Conversions on smaller bit sizes should also be collapsed when composed.

This also adds more patterns on the
intS -> intB -> floatB ==> intS -> floatB
lowering so as to deal with any int size C > B instead of a fixed intB.

Closes: #7776
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Isabella Basso <isabellabdoamaral@usp.br>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20965>
2023-03-11 17:21:37 +00:00
Isabella Basso
a27bcd63d0 nir/algebraic: extend mediump patterns
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Suggested-by: Italo Nicola <italonicola@collabora.com>
Signed-off-by: Isabella Basso <isabellabdoamaral@usp.br>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20965>
2023-03-11 17:21:37 +00:00
Isabella Basso
b3685f3ba7 nir/algebraic: insert patterns inside optimizations list
Some patterns were outside the list of optimizations.

Fixes: b86305bb ("nir/algebraic: collapse conversion opcodes (many patterns)")

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Isabella Basso <isabellabdoamaral@usp.br>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20965>
2023-03-11 17:21:37 +00:00
Alyssa Rosenzweig
2ba48eea88 nir/lower_point_size: Use shader_instructions_pass
Sleepy code deletion mood.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21750>
2023-03-11 16:42:36 +00:00
Alyssa Rosenzweig
933b5c76f6 agx: Switch to scoped_barrier
Rather than ingesting separate control and memory barriers, ingest only the
combined and optimized scoped_barrier intrinsic. For barriers originating from
GLSL, this makes it easier to ensure correctness. For barriers originating from
SPIR-V, this is required for translation at all, as spirv_to_nir knows only
scoped barriers. So this gets us closer to Vulkan and OpenCL.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21752>
2023-03-11 16:20:06 +00:00
David Heidelberg
84767a5160 ci/lava: every LAVA job doesn't want to run gles2 deqp, drop it
Very annoying when adding new job and not getting failure due to missing
`DEQP_VER: `

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21702>
2023-03-11 14:48:20 +00:00
David Heidelberg
8cdbb894ca ci/panfrost: correct the job name, as it runs on gles2
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21702>
2023-03-11 14:48:20 +00:00
David Heidelberg
e3660c2820 ci/amd: move skqp and va jobs on raven from XOrg to the XWayland
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21702>
2023-03-11 14:48:20 +00:00
David Heidelberg
1e262f129b ci: add and utilize dalboz devices
New 10 devices - asus-CM1400CXA-dalboz hosted on Collabora farm.

1x Move VA-API tests to the dalboz (more resources). One timeout dropped.
9x Run VKCTS on dalboz.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21702>
2023-03-11 14:48:20 +00:00
Sil Vilerino
3067bda0f3 d3d12: Fix video decode for interlaced streams with reference only textures required
Fixes: d8206f6286 ("d3d12: Add video decode implementation of pipe_video_codec")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21832>
2023-03-11 14:31:32 +00:00
Alyssa Rosenzweig
b768a254f7 agx: Use nir_lower_mem_access_bit_sizes
Lowers away 64-bit loads, which we'll create in the sysval lowering for
dynamically indexed UBOs/VBOs. The lowering generates pack_64_2x32 instructions,
so lower those too.

No shader-db changes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21674>
2023-03-11 14:15:50 +00:00
Alyssa Rosenzweig
8a53050d7d agx: Implement extract_[ui]16
Instead of lowering to bitwise ops. Yet another way of subdividing in NIR.
Probably insignificant but makes it easy to check that the pass ordering from the
previous pass is right. It does let us get much better codegen for
unpacksnorm2x16, whatever that's worth.

No shader-db changes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21674>
2023-03-11 14:15:50 +00:00
Alyssa Rosenzweig
706815488e agx: Fix subdivision coalescing
As intended. We can't CSE with partial null destinations in the way, so we
shouldn't eliminate dead destinations until after CSE has run. But we should
still eliminate dead instructions to ensure CSE doesn't move things around
needlessly, hurting register pressure.

Noticed while debugging live range splitting.

No GLES3.0 shader-db changes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21674>
2023-03-11 14:15:50 +00:00
Alyssa Rosenzweig
5ea9c2e634 agx: Make partial DCE optional
Our dead code elimination pass does two things:

1. delete instructions that are entirely unnecessary
2. delete unnecessary destinations of necessary instructions

To deal with pass ordering issues, we sometimes want to do #1 without #2.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21674>
2023-03-11 14:15:50 +00:00
Alyssa Rosenzweig
16f8bfb042 agx: Don't set lower_pack_split
We should handle nir_op_unpack_32_2x16_split_* natively, since we can generate
better code with agx_subdivide (coalescing the ops away) than the bitshift
lowering.

That said, we do need some extra instructions for the floating point
conversions.

No shader-db changes (which makes sense because we're targetting the GLES3.0
shader-db, which doesn't have the packing GLSL functions).

The real motivation of this change isn't optimizing some GLSL pack functions,
though, it's avoiding a code regression from using NIR's memory bit size
lowering in a future MR. That lowering will turn things like "load i16vec4" into
"load i32vec2 + unpack_32_2x16", so we need to be able to coalesce that unpack.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21674>
2023-03-11 14:15:50 +00:00
Daniel Stone
50378f59a7 ci: Actually run Piglit on LAVA
At some point in a refactoring long ago, our 'Piglit' runs on arm64
started actually being dEQP-GLES2 runs. Oh dear.

Surprisingly, there are a number of expectation changes; added every
fail I saw from a long overnight stress test.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21851>
2023-03-11 11:58:30 +00:00
Alyssa Rosenzweig
b190d08a8a pan/mdg: Remove reference to removed macro
This will soon be more confusing than helpful.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20445>
2023-03-11 06:30:02 +00:00
Alyssa Rosenzweig
cc16e7322f panfrost: Remove MALI_POSITIVE macro
Now unused.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20445>
2023-03-11 06:30:02 +00:00
Alyssa Rosenzweig
131845eb84 panfrost: Inline the last MALI_POSITIVE use
Big shrug on this one.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20445>
2023-03-11 06:30:02 +00:00
Alyssa Rosenzweig
14eb964e59 panfrost: Remove FBD tag enum from XML
This was a hack to avoid modelling the full data structure.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20445>
2023-03-11 06:30:02 +00:00
Alyssa Rosenzweig
67cbbf9417 panfrost: Use framebuffer pointer XML
Rather than manipulating the raw pointers. This is cleaner.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20445>
2023-03-11 06:30:02 +00:00
Alyssa Rosenzweig
1a5546293c panfrost: Add XML for framebuffer pointers
We shouldn't have to open-code these. They are real data structures, model them
as such in the architecture XML files.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20445>
2023-03-11 06:30:02 +00:00
Alyssa Rosenzweig
35985be275 panfrost: Handle fixed-point packing in GenXML
Minimum/maximum LOD and LOD bias are unsigned and signed fixed point formats
respectively. They are not unsigned integers. Introduce fixed-point types into
our GenXML and use them in the XML, rather than packing in sidebands. This makes
the XML more correct and fixes pretty-printing of texture and sampler
descriptors.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20445>
2023-03-11 06:30:02 +00:00
Alyssa Rosenzweig
17c55e0d12 panfrost: Don't use DECODE_FIXED16 for sample position
Strictly this is a signed fixed-point, anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20445>
2023-03-11 06:30:02 +00:00
Alyssa Rosenzweig
e0752673be docs/panfrost: Move description of instancing
Connor Abbott wrote a nice explanation of how instance divisors work on Mali.
Let's add it to the driver docs instead of letting it languish in a forgotten
header file.

This is mostly pasted from the existing header in tree, with a few local changes
applied.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20445>
2023-03-11 06:30:02 +00:00
Alyssa Rosenzweig
07b43d6231 panfrost: Remove some unused definitions
Nowadays, formats are defined with GenXML, not the old panfrost-job.h, so most
of the format #defines in panfrost-job.h are unused. That said, a few are still
in use as a backdoor for compressed format queries to avoid a GenXML dependency.
That's not great but cleaning that up isn't the subject of this MR.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20445>
2023-03-11 06:30:02 +00:00
Felix DeGrood
341f1011a6 intel/perf: Hide extended metrics by default
XE architecture enables many more metrics, perhaps too many for
the average user. Reduce reported metrics to smaller subset,
known as non-extended metrics, by default. Can re-enable extended
metrics with env var INTEL_EXTENDED_METRICS=1

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21841>
2023-03-11 05:05:06 +00:00
Alyssa Rosenzweig
6b22a02f90 asahi,agx: Implement buffer textures with gnarly NIR
Implement buffer textures in full generality.  There are a few issues here:

* OpenGL requires buffer textures support a minimum size of 65536 elements,
  however 1D textures in AGX are (at most) 8192 elements.

* OpenGL 4.0 (and OpenGL ES) require buffer textures to support the "RGB32"
  texture formats. These are 3 packed channels of 32-bits each. In general,
  non-power-of-two texel sizes are problematic. AGX does not support any such
  formats and we rely on the GL frontend to lower to a padded format (RGBX) if
  necessary. Such a lowering cannot work for buffer textures, however, so we
  need to find a way to implement RGB32 buffer textures.

We solve these issues in the follow way:

* Use 2D texture descriptors for buffer textures, with a large fixed
  power-of-two size along one axis. Then large texel indices may be accessed at
  a small vec2 texel coordinate, and since the fixed dimension is a
  power-of-two, that vector may be recovered by simply shifting and masking.
  This effectively avoids size restriction. We do need to clamp texel indices to
  the buffer size to avoid faulting on OOB reads, since we may read past the end
  of the buffer (if the app binds a non-page-aligned offset into the buffer).

* Use a general purpose memory load for RGB32 buffer textures. Lower the texture
  load instruction to a memory load from the buffer and some address arithmetic.
  There's no format conversion needed for RGB32, other than maybe filling in a
  format-appropriate alpha, so this is straightforward. Again, we need to clamp
  the texel index for robustness with OOB reads.

Each of these solutions brings its own problem.

* Using 2D textures instead of 1D requires physically rounding up the buffer
  size when packing the descriptor, so we can no longer implement textureSize()
  by reading off the texture descriptor like normal.

* We don't know at compile-time whether a given texture load will read from an
  RGB32 buffer texture or not, so we need to emit code for both. In Vulkan, we
  can't key the shader to this property, either, since it's descriptor set state
  and not pipeline state.

And each of these problems in turn brings its own solution:

* The texture descriptor is linear, so the "compression buffer address" field is
  ignored by the hardware. We stash the real buffer size there so that
  textureSize becomes a load from the texture descriptor like usual, without
  requiring a sideband (which would complicate bindless textures).

* If we determine a texture descriptor contains RGB32 data, then it will never
  be interpreted by the hardware and hence does not need to be a valid texture
  descriptor. So, we extend the hardware's format enum to contain a
  software-defined RGB32 format enum. Then, when lowering texture buffer loads,
  we either read it as a typed RGB32 memory load or as a texture load depending
  on the value of the format field in the texture descriptor.

All of this is accomplished with a big NIR pass generating a pile of strange
looking code. But it should be good enough in practice for this silly feature.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21672>
2023-03-11 02:26:31 +00:00
Alyssa Rosenzweig
826649ba19 asahi, agx: Implement dummy samplers
In NIR, texelFetch (txf) does not use a sampler, but in AGX, it does -- even
though the contents of the sampler are semantically irrelevant. Rather than
requiring the state tracker to bind a sampler anyway (indicated for texture
buffers with PIPE_CAP_TEXTURE_BUFFER_SAMPLER), just add a dummy sampler
ourselves if txf is used and there are otherwise no samplers. This is helpful
because PIPE_CAP_TEXTURE_BUFFER_SAMPLER isn't honoured by Rusticl or seemingly
mesa/st's PBO code, and after implementing this dummy sampler workaround in
Panfrost for Rusticl, I realized this CAP is silly and shouldn't exist in the
first place. (And I regret pushing for its reinclusion.)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21672>
2023-03-11 02:26:31 +00:00
Guilherme Gallo
256e7888fd ci: Fix release build use for performance jobs
This commit ensures that we are using mesa release builds in performance
jobs.

To achieve that, some modifications were made on top of
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21492.

- Append the `BUILDTYPE` variable into the S3 artifact name
  (MINIO_ARTIFACT_NAME environment variable) to allow for better
  artifact management.

- The ./artifacts directory has been added to the list of artifact
  directories for build-common. This ensures that the debian-release and
  debian-arm64-release jobs are the only ones necessary for running
  performance jobs. These jobs only produce artifacts via
  prepare-artifacts.sh when we are under performance workflow.

- Make lava-submit.sh behave similar to baremetal jobs regarding
  MINIO_ARTIFACT_NAME variable. For example, users can now easily
  differentiate between mesa-arm64.tar.zstd and
  mesa-arm64-release.tar.zstd by looking inside the `Downloading
  artifacts from s3` Gitlab section.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21804>
2023-03-10 21:40:23 +00:00
José Roberto de Souza
91a129b44a iris: Move i915 submit_batch() to i915 backend
No changes in behavior intented here.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21700>
2023-03-10 20:13:56 +00:00
José Roberto de Souza
21d5034edb iris: Add batch_check_for_reset() to kmd backend
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21700>
2023-03-10 20:13:56 +00:00
José Roberto de Souza
e0ce31d7cf iris: Add gem_mmap() to kmd backend
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21700>
2023-03-10 20:13:56 +00:00
José Roberto de Souza
757e2dd692 intel/perf: Disable it for Xe KMD
Xe still don't have support for performance metrics.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21773>
2023-03-10 19:41:14 +00:00
José Roberto de Souza
266d961fdc iris: Don't mark protected bo as reusable
The check in alloc_bo_from_cache() was skiping any try to get a bo
from cache but after use a protected bo was still being put in some
cache bucket and could be used for cases that don't require a
protected bo.

Using a protected bo in cases that don't require it can have
performance implications.

So here returning NULL when trying to get a cache bucket for a
protected bo, this will cause bo->real.reusable to be set to false
avoiding the bo to be reused.

Fixes: 9402ac8023 ("iris: handle protected BO creation")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21824>
2023-03-10 18:59:59 +00:00
Alyssa Rosenzweig
e61d6540e6 asahi: Don't allow linear depth/stencil buffers
We don't have a way to tell the ZLS hardware to use linear buffers, so if a
buffer could be used for depth/stencil, we have to twiddle. This isn't a problem
in practice, since depth/stencil buffers can't be shared across processes or
mapped directly as linear.

Fixes faults in depthstencil-render-miplevels, which was picking linear for one
buffer because of a STAGING bind flag. But that won't work :-)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21753>
2023-03-10 18:29:52 +00:00
Ian Romanick
0cadc3830f nir/lower_int64: Optionally lower ufind_msb using uadd_sat
v2: Fix inverted condition for applying the optimization. Noticed by
Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19042>
2023-03-10 15:27:17 +00:00
Ian Romanick
831f9d3f61 nir/algebraic: Optimize some ifind_msb to ufind_msb
On Intel platforms, the uclz lowering if ufind_msb is either one
instruction better (Gfx7 and newer) or two instructions better (all
older platforms) than the ifind_msb implementations.

On platforms that use lower_find_msb_to_reverse, there should be no
difference.

All Haswell and newer Intel platforms had similar results. (Ice Lake shown)
total instructions in shared programs: 19938662 -> 19938634 (<.01%)
instructions in affected programs: 850 -> 822 (-3.29%)
helped: 2 / HURT: 0

total cycles in shared programs: 858467067 -> 858465538 (<.01%)
cycles in affected programs: 10080 -> 8551 (-15.17%)
helped: 2 / HURT: 0

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19042>
2023-03-10 15:27:17 +00:00
Ian Romanick
db6d1edc1b nir: Restrict ufind_msb and ufind_msb_rev to 32- or 64-bit sources
4d802df3aa loosened the type restrictions
on these opcodes to enable support for 64-bit ballot operations.  In
doing so, it enabled 8-bit and 16-bit sizes as well.

It's impossible to get these sizes through GLSL or SPIR-V.  None of the
lowering in nir_opt_algebraic can handle non-32-bit sizes.  Almost no
drivers can handle non-32-bit sizes.

It doesn't seem possible to enforce anything other than "one bit size"
or "all bit sizes" in nir_opcodes.py.  The only way it seems possible to
enforce this is in nir_validate.  This is not ideal, but it be what it
be.

v2: Remove restriction on find_lsb. It is acutally possible to get this
via GLSL by doing findLSB() on a lowp value. findMSB declares its
parameter as highp, so that path is still impossible.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19042>
2023-03-10 15:27:17 +00:00
Ian Romanick
2d6f48f6ef nir/algebraic: Do not generate 8- or 16-bit find_msb
The next commit will add validation to restrict this instruction (and
others) to only 32-bit or 64-bit sources.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19042>
2023-03-10 15:27:17 +00:00
Ian Romanick
2119ab7319 nir/builder: Do not generate 8- or 16-bit find_msb
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19042>
2023-03-10 15:27:17 +00:00
Ian Romanick
28311f9d02 nir: intel/compiler: Move ufind_msb lowering to NIR
Fossil-db results:

All Intel platforms had similar results. (Ice Lake shown)
Cycles in all programs: 9098346105 -> 9098333765 (-0.0%)
Cycles helped: 6

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19042>
2023-03-10 15:27:17 +00:00
Ian Romanick
a4052e70ea nir/algebraic: Only lower ufind_msb with 32-bit sources
The 31-ufind_msb_rev(x) lowering only produces the correct result for
32-bit sources. ufind_msb_rev can also have 64-bit sources, and most
platforms are expected to lower this to 32-bit instructions with extra
logic operations.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19042>
2023-03-10 15:27:17 +00:00
Ian Romanick
08ca862ef8 intel/compiler: Tighter src and dest size bounds checking for some opcodes
Enforce the sizes listed in the Skylake PRM:

BFREV:
    source types: *D
    destination types: *D

CBIT:
    source types: UB, UW, UD
    destination types: UD

FBH:
    source types: D, UD
    destination types: UD

FBL:
    source types: UD
    destination types: UD

LZD:
    source types: D, UD
    destination types: UD

v2: Update BFREV commit message documentation. Suggested by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19042>
2023-03-10 15:27:17 +00:00
Ian Romanick
0cc7bf63b7 nir: intel/compiler: Move ifind_msb lowering to NIR
Unlike ufind_msb, ifind_msb is only defined in NIR for 32-bit values, so
no @32 annotation is required.

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19042>
2023-03-10 15:27:17 +00:00
Ian Romanick
15c6c859cf intel/compiler: Lower find_lsb in NIR
No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19042>
2023-03-10 15:27:17 +00:00
Ian Romanick
66840b98e4 nir: ifind_msb_rev can only have int32 sources
Just like ifind_msb.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19042>
2023-03-10 15:27:17 +00:00
antonino
29be4e9e9b zink: fix stipple pattern in oblique lines
Stipple lines now appear correctly when they are oblique.

Previously the number of steps of the stipple counter between two vertices
was calculated as the euclidian distance between them in screen space, however
the length occupied by pixel along a line is only `1` for lines that are either
vertical or horizontal and will be anywhere between `1` and `sqrt(2)`
for other cases.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21290>
2023-03-10 14:52:01 +00:00
Alyssa Rosenzweig
ee6785309e agx: Handle indirect texture/samplers
Get the texture/sampler index from the texture/sampler_offset source (which
is an offset from 0 thanks to the lower_index_to_offset lowering) and feed it in
as corresponding 16-bit texture instruction sources.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21704>
2023-03-10 14:14:42 +00:00
Alyssa Rosenzweig
e12bf97153 agx: Pack indirect texture/sampler handles
For indirect indexing into the binding table. Note this does not handle packing
the bindless forms, since that's a bit more involved.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21704>
2023-03-10 14:14:42 +00:00
Mike Blumenkrantz
e5b29e6735 Revert "Revert "ci: disable mesa-swrast runner jobs""
This reverts commit 7ae0d9d2e8.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21836>
2023-03-10 12:37:56 +00:00
Eric Engestrom
e29772f134 v3dv: split out broadcom_shader_stage_to_gl() calls to improve readability
This is an inline function with a compile-constant switch, so I expect
the compiler wouldn't produce any better code like this, but for humans
it's easier to read when function calls are not embedded into other
function calls.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21835>
2023-03-10 10:38:43 +00:00
Eric Engestrom
f5d3d1e7ed meson: inline gtest_test_protocol now that it's always 'gtest'
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21485>
2023-03-10 07:20:29 +00:00
Sagar Ghuge
9a34b2ab0e intel/compiler: Add swsb_stall debug option
When enabled, on gfx12 plus, we will add the sync nop instruction after
each instruction to make sure that current instruction depends on the
previous instruction explicitly.

This option will help us to get a hint if something is missing or broken
in software scoreboard pass.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21797>
2023-03-10 06:55:39 +00:00
Alyssa Rosenzweig
cdf63e6dce agx: Fix clang-formatting
Not sure how this one slipped in.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21828>
2023-03-10 06:33:01 +00:00
Emma Anholt
7ae0d9d2e8 Revert "ci: disable mesa-swrast runner jobs"
This reverts commit aef0f3efdf.

We've got a new set of runners now (mesa-swrast-4, 5, and 7 because
counting is hard)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21826>
2023-03-10 04:04:59 +00:00
Lionel Landwerlin
5aec829f97 iris: trace frames with u_trace
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21648>
2023-03-10 00:36:41 +00:00
Kenneth Graunke
dfe652fb03 intel/eu: Simplify brw_F32TO16 and brw_F16TO32
Now that we aren't using them on Gfx8+ we can drop a lot of cruft.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21783>
2023-03-09 23:26:17 +00:00
Kenneth Graunke
c590a3eadf intel/fs: Move packHalf2x16 handling to lower_pack()
This mainly lets the software scoreboarding pass correctly mark the
instructions, without needing to resort to fragile manual handling in
the generator.

We can also make small improvements.  On Gfx 8LP-12.0, we no longer have
the restrictions about DWord alignment, so we can simply write each half
into its intended location, rather than writing it to the low DWord and
then shifting it in place.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21783>
2023-03-09 23:26:17 +00:00
Kenneth Graunke
f5e5705c91 intel/fs: Use F32TO16/F16TO32 helpers in fquantize16 handling
I originally thought that we were intentionally emitting the legacy
opcodes here to make them opaque to the optimizer, so that it wouldn't
eliminate the explicit type conversions, as they're actually required
to do the quantization.  But...we don't actually optimize those away
currently anyway.  So...go ahead and use the helpers for consistency.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21783>
2023-03-09 23:26:17 +00:00
Kenneth Graunke
44c6ccb197 Revert "intel/fs: Fix inferred_sync_pipe for F16TO32 opcodes"
With the previous patch, we no longer need to special case this, as we
emit a MOV with an HF source, rather than F16TO32 with an UW source,
on all platforms that need scoreboarding.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21783>
2023-03-09 23:26:17 +00:00
Kenneth Graunke
309ec3725a intel/fs: Use new F16TO32 helpers for unpack_half_split_* opcodes
This gets us a MOV at the IR level on Gfx8+ which should be more
optimizable than F16TO32.  It also removes confusion about which
pipe which the instruction will run on.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21783>
2023-03-09 23:26:17 +00:00
Kenneth Graunke
78bf53904e intel/fs: Delete a TODO about using brw_F32TO16.
We can just use the new builder helpers to get the optimization
advantages of a MOV on Gfx8+ while also getting the necessary F32TO16
on Gfx7.x and yet not worry too hard about it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21783>
2023-03-09 23:26:17 +00:00
Kenneth Graunke
966995d911 intel/fs: Add builder helpers for F32TO16/F16TO32 that work on Gfx7.x
These take care of emitting the F32TO16/F16TO32 instructions on Gfx7.x
but otherwise just emit a type converting MOV on Gfx8+.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21783>
2023-03-09 23:26:17 +00:00
Kenneth Graunke
3864049184 intel/fs: Fix inferred_sync_pipe for F16TO32 opcodes
For converting half-float to float, we currently emit BRW_OPCODE_F16TO32
with a UW source, to match legacy Gfx7 behavior.  In the generator, this
becomes a MOV with a HF source on Gfx8+.  Unfortunately, this UW source
confuses the scoreboarding pass into thinking it's an integer source,
leading to incorrect SWSB annotations on Alchemist.

We should ultimately fix the IR to stop being so...legacy...here, but
this is the simplest fix for stable branches.

Fixes misrendering in Elden Ring and likely Sekiro: Shadows Die Twice.

Cc: mesa-stable
Tested-by: Chuansheng Liu <chuansheng.liu@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
References: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8018
References: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8375
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21783>
2023-03-09 23:26:17 +00:00
Mark Janes
4978db6b9e intel: use generated workaround helpers for Wa_1409600907
Wa_1409600907 was enabled for gen12+.  It should not be applied for
platforms after gen12.0.  Use generated helpers to ensure application
to all relevant platforms.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21743>
2023-03-09 22:56:51 +00:00
Chia-I Wu
5691b10b0f radv: set RADEON_FLAG_GTT_WC for external mem on vram
We used to set RADEON_FLAG_GTT_WC when wsi_info is set.  This changes it
to set the flag for any external mem on vram, extending the logic for
apps using external memory directly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21803>
2023-03-09 22:21:09 +00:00
Daniel Stone
ae893089e9 ci/radv: Lower stoney CTS load
CTS runs on stoney are currently taking ~20min to complete, which seems
to have begun with the upgrade to CTS 1.3.5.0. This is a bit too long in
and of itself, but it means that - assuming zero contention - a job that
has to be retried because the machine hung can take 40 minutes.

Aim to drop this to 15min turnaround by lowering the overall fraction
from 1/8th of the CTS to 1/11th.

As the jobs we run have been reshuffled, this adds a lot more expected
fails. As most of them categorise easily into patterns, group the
failures together in the file. Non-strict wide lines has passed since we
last ran it; the other failures all group into existing classes seen
for a long time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21791>
2023-03-09 19:34:58 +00:00
Daniel Stone
f07c69d8b6 ci/zink: Add flake seen in the wild
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21820>
2023-03-09 19:15:13 +00:00
David Heidelberg
aef0f3efdf ci: disable mesa-swrast runner jobs
Temporarily.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21815>
2023-03-09 18:01:09 +00:00
Daniel Stone
6f1aa8cfc1 ci/fdno: Add a618 Vulkan flakes
It looks like descriptors are generically a bit broken, which takes out
a massive number of tests periodically.

The pipeline-library tests also have some unknowable issues.

cf. #8219

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21740>
2023-03-09 14:47:57 +00:00
Georg Lehmann
13ff4a5f64 aco: use bitfield_array for temporary neg/abs/opsel
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766>
2023-03-09 14:15:14 +00:00
Georg Lehmann
d0eebb0e8b aco: access neg/abs as int in usesModifiers
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766>
2023-03-09 14:15:14 +00:00
Georg Lehmann
828aff2a2d aco: use array indexing for opsel/opsel_lo/opsel_hi
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766>
2023-03-09 14:15:13 +00:00
Georg Lehmann
a47c3f84fb aco: use integer access for neg_lo/neg_hi
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766>
2023-03-09 14:15:13 +00:00
Georg Lehmann
60cd3ba39f aco: copy abs/neg with assignment
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766>
2023-03-09 14:15:13 +00:00
Tapani Pälli
5fdbc4a23e intel/isl: disable TILE64 for YCRCB formats
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21723>
2023-03-09 13:50:39 +00:00
Daniel Stone
fad9c69e42 ci/radv: Drop raven quick_shader load
It currently takes ~21 minutes to complete. That's not quick.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21793>
2023-03-09 09:56:31 +00:00
Eric Engestrom
a19739f1b0 v3dv/ci: add a test to the known failures
New test since the 1.3.5 update, and running it on older mesa it would
have always failed, so it's not a regression
-> let's just mark it as a known failure

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21792>
2023-03-09 09:19:21 +00:00
Emma Anholt
ec513270e3 zink: Pass the cmdbuf to the end of the marker, too.
Otherwise the end wanders off to some unrelated cmdbuf.

Fixes: 271ebdd735 ("zink: pass cmdbuf to debug marker begin")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21799>
2023-03-09 06:53:37 +00:00
David Heidelberg
11a4e10fe2 ci/zink: fixup the zink-lvp job
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8501
Fixes: 4cc0cec473 ("ci: implement unified sections")

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21796>
2023-03-09 06:27:39 +00:00
antonino
27c8d6ca7b drirc: set zink_emulate_point_smooth for Quake II
Quake II uses GL_POINT_SMOOTH to render particles.
Zink currently requires `zink_emulate_point_smooth` to support that feature.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21731>
2023-03-09 04:38:24 +00:00
antonino
ffe36abf7c zink: handle point_smooth emulation
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21731>
2023-03-09 04:38:24 +00:00
antonino
3a59b2a670 nir: handle output beeing written to deref in nir_lower_point_smooth
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21731>
2023-03-09 04:38:24 +00:00
antonino
4b07182c8c zink/nir_to_spirv: add support for nir_intrinsic_load_point_coord
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21731>
2023-03-09 04:38:24 +00:00
antonino
e121b6d9eb zink: add lower_point_smooth to zink_fs_key
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21731>
2023-03-09 04:38:24 +00:00
antonino
c32a5b8d04 zink: add zink_emulate_point_smooth driconf
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21731>
2023-03-09 04:38:24 +00:00
antonino
e280d6a7c9 zink: fix line smooth lowering
Fixes: 80285db9ef ("zink: lower smooth-lines if not supported")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21731>
2023-03-09 04:38:24 +00:00
Eric Engestrom
c28f144c81 osmesa: add exported symbols check
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1308>
2023-03-09 02:55:49 +00:00
Emma Anholt
8b75b72613 anv+hasvk: Use driconf to disable 16-bit for zink.
The HW can technically execute 16-bit operations, but the restrictions on
16-bit ALU ops are so great that it ends up not being a win for
GLES-on-Vulkan to lower mediump to 16-bit operations, at least with the
current state of the Intel compiler.  This brings zink-on-anv in line with
iris and angle-on-anv for mediump behavior (ANGLE uses RelaxedPrecision,
which we ignore).

Perf on some angle traces on my brya (ADL) and i9-9900K (CFL):

ADL zink pubg_mobile_battle_royale:  +13.4574% +/- 5.2046% (n=5)
CFL zink pubg_mobile_battle_royale:  +29.5332% +/- 0.646585% (n=6)
ADL zink aztec_ruins_high:           +5.78027% +/- 4.80645% (n=4)
CFL zink aztec_ruins_high:           -1.10641% +/- 0.140562% (n=12)
ADL zink trex_200:                   +5.86956% +/- 2.09633% (n=10)
CFL zink trex_200:                   +9.72136% +/- 0.749261% (n=10)

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21775>
2023-03-09 02:27:01 +00:00
Daniel Stone
daa1468b54 intel/isl: Don't scream FINISHME into logs for 3D vs. CCS
This would probably be a nice optimisation to have, but it really does
make the CTS logs awful:
    https://gitlab.freedesktop.org/mesa/mesa/-/jobs/37692447

Just demote this isl_finishme() to a comment; given it's been unfinished
since 2019, we can probably live without it.

Fixes: 126c9562d9 ("isl: Redefine the CCS layout for Gen12")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21788>
2023-03-09 01:36:54 +00:00
Daniel Stone
df7b40d002 ci/anv: Temporarily halve TGL testing load
Our TGL machines are currently slightly oversubscribed (max. 17 jobs in
a pipeline on 15 DUTs). They're also currently suffering from
thermally-induced GPU throttling (being investigated), and a
thundering-herd network load effect: as all 15 jobs start at once, we
end up saturating one of our network links.

The combination of all three of these things means that TGL is often our
long pole in CI runs. Until we can ameliorate the two issues
constraining throughput (and a third where an unreliable hardware UART
sometimes kills jobs when it shouldn't), halve the workload so we at
least have some breathing room to absorb them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21790>
2023-03-09 01:07:36 +00:00
Lionel Landwerlin
b801724352 util: allow align64() to do alignments >= 4Gb
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21757>
2023-03-08 23:32:37 +00:00
Lionel Landwerlin
9a058f6b4c radv: use 1ull for alignment computations
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21757>
2023-03-08 23:32:37 +00:00
Lionel Landwerlin
11bc2bde83 anv: force MEDIA_INTERFACE_DESCRIPTOR_LOAD reemit after 3D->GPGPU switch
Seems to fix a hang in the following titles :
   - Age of Empire 4
   - Monster Hunter Rise

where the HW is hung on a PIPE_CONTROL after a GPGPU_WALKER but no
MEDIA_INTERFACE_DESCRIPTOR_LOAD was emitted since the switch from 3D
to GPGPU.

This would happen in the following case :

   vkCmdBindPipeline(COMPUTE, cs_pipeline);
   vkCmdDispatch(...);
   vkCmdBindPipeline(GRAPHICS, gfx_pipeline);
   vkCmdDraw(...);
   vkCmdDispatch(...);

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17247>
2023-03-08 23:09:36 +00:00
Konstantin Seurer
d17bf881ea radv/rt: Fix updating stack_size if the shader uses scratch
src_vars contains the stack_size of the shader that is about to get inlined.

Fixes: 7fadee9b70 ('radv/rt: only reserve stack_sizes after rt_case insertion')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21768>
2023-03-08 22:17:00 +00:00
Daniel Stone
3af675dfc1 ci/radv: Skip vkCreateInstance memory-fail test
This has been failing a bit ever since CTS 1.3.5.0. Skip it for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21789>
2023-03-08 21:35:27 +00:00
Georg Lehmann
0614c2e8bd aco: don't reallocate fma{mk,ak,_mix} instruction
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21762>
2023-03-08 18:42:21 +00:00
Georg Lehmann
a4873071e6 aco/optimizer: don't reallocate instruction when converting to VOP3
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21762>
2023-03-08 18:42:21 +00:00
Mike Blumenkrantz
7413ce7e0d lavapipe: break out main shader lowering into separate function
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>
2023-03-08 18:25:01 +00:00
Mike Blumenkrantz
f2765cd6d6 lavapipe: move uniform inline functions to shader struct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>
2023-03-08 18:25:01 +00:00
Mike Blumenkrantz
7718d7f31a lavapipe: rename inline uniform function params
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>
2023-03-08 18:25:01 +00:00
Mike Blumenkrantz
990fa82c61 lavapipe: move xfb init to shader struct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>
2023-03-08 18:25:01 +00:00
Mike Blumenkrantz
b221f6c128 lavapipe: more small shader struct usage tweaks
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>
2023-03-08 18:25:01 +00:00
Mike Blumenkrantz
a0c9609e59 lavapipe: pass shader struct and layout to scan_pipeline_info()
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>
2023-03-08 18:25:01 +00:00
Mike Blumenkrantz
6e5fe71599 lavapipe: split out shader struct members into their own struct
kinda gross but simplifies some code

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>
2023-03-08 18:25:01 +00:00
Mike Blumenkrantz
2af3476639 lavapipe: split out spirv compile of shaders
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>
2023-03-08 18:25:01 +00:00
Mike Blumenkrantz
bf1b4ed54e vulkan/wsi: fix crash in failed swapchain creation for wayland
this otherwise calls wsi_wl_swapchain_chain_free() before the wsi
pointer has been set

ref #6578

cc: mesa-stable

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21563>
2023-03-08 17:33:00 +00:00
Daniel Schürmann
41ae2d0725 radv/rt: use terminate() when returning from raygen shaders
Q2RTX stats:
Totals from 7 (0.01% of 134913) affected shaders:

CodeSize: 204712 -> 204744 (+0.02%); split: -0.06%, +0.07%
Instrs: 37526 -> 37522 (-0.01%); split: -0.07%, +0.06%
Latency: 950563 -> 956024 (+0.57%)
InvThroughput: 187915 -> 188977 (+0.57%)
Copies: 4829 -> 4763 (-1.37%)
Branches: 1570 -> 1583 (+0.83%)
PreSGPRs: 407 -> 400 (-1.72%)
PreVGPRs: 614 -> 617 (+0.49%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21736>
2023-03-08 16:59:41 +00:00
Daniel Schürmann
cd1e5b1858 aco: fix NIR infinite loops
The previous solution breaks potential loop header phis.
Move the dummy-break to the bottom of the loop.

Fixes: dEQP-VK.reconvergence.subgroup_uniform_control_flow_ballot.*
Fixes: a9c4a31d8d ('aco: handle NIR loops without breaks')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21736>
2023-03-08 16:59:41 +00:00
Daniel Schürmann
3073810397 nir/gather_info: allow terminate() in non-PS
RADV will use terminate() to end ray-tracing shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21736>
2023-03-08 16:59:41 +00:00
Samuel Pitoiset
842b8f14f4 radv: move device memory related code to radv_device_memory.c
radv_device.c is getting too big.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
4316a64e27 radv: move buffer related code to radv_buffer.c
radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
17c5a91028 radv: move event related code to radv_event.c
radv_device.c is getting too big.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
4de305cb8a radv: move sampler related code to radv_sampler.c
radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
7a157b3a4c radv: move queue related code to radv_queue.c
radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
4e5db63482 radv: move physical device related code to radv_physical_device.c
radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>
2023-03-08 16:21:10 +00:00
Samuel Pitoiset
06fa90e14e radv: move instance related code to radv_instance.c
radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>
2023-03-08 16:21:10 +00:00
Rhys Perry
98cb7e0108 nir: add nir_lower_alu_width_test.fdot_order
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/20812>
2023-03-08 14:38:26 +00:00
Rhys Perry
50f7e21481 nir: make fdph lowering match fdot
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/20812>
2023-03-08 14:38:26 +00:00
Rhys Perry
3668da7c83 nir: use xyzw order for precise fdot
Fixes flickering grass in Immortals Fenyx Rising.

fossil-db (gfx1100):
Totals from 13969 (10.38% of 134574) affected shaders:
MaxWaves: 442794 -> 442878 (+0.02%)
Instrs: 4861105 -> 4901408 (+0.83%); split: -0.02%, +0.85%
CodeSize: 24316100 -> 24396272 (+0.33%); split: -0.03%, +0.35%
VGPRs: 446256 -> 445572 (-0.15%); split: -0.20%, +0.05%
Latency: 28122456 -> 28162233 (+0.14%); split: -0.10%, +0.24%
InvThroughput: 2899673 -> 2904323 (+0.16%); split: -0.07%, +0.23%
VClause: 119599 -> 119631 (+0.03%); split: -0.07%, +0.09%
SClause: 186636 -> 186265 (-0.20%); split: -0.23%, +0.03%
Copies: 301370 -> 300386 (-0.33%); split: -0.75%, +0.42%
Branches: 85066 -> 85047 (-0.02%); split: -0.02%, +0.00%
PreSGPRs: 436167 -> 436137 (-0.01%)
PreVGPRs: 329715 -> 329809 (+0.03%); split: -0.01%, +0.04%

fossil-db (gfx1100, RADV_DEBUG=invariantgeom):
Totals from 43116 (32.04% of 134574) affected shaders:
MaxWaves: 1332938 -> 1333012 (+0.01%); split: +0.01%, -0.00%
Instrs: 16424513 -> 16658021 (+1.42%); split: -0.06%, +1.48%
CodeSize: 81258868 -> 81827860 (+0.70%); split: -0.07%, +0.77%
VGPRs: 1720368 -> 1719648 (-0.04%); split: -0.19%, +0.15%
SpillSGPRs: 1670 -> 1600 (-4.19%); split: -5.27%, +1.08%
Latency: 82063766 -> 82425418 (+0.44%); split: -0.23%, +0.67%
InvThroughput: 9665803 -> 9727810 (+0.64%); split: -0.09%, +0.73%
VClause: 449662 -> 451099 (+0.32%); split: -0.32%, +0.64%
SClause: 498841 -> 498639 (-0.04%); split: -0.24%, +0.20%
Copies: 1001020 -> 1000770 (-0.02%); split: -1.20%, +1.17%
Branches: 237580 -> 239637 (+0.87%); split: -0.01%, +0.88%
PreSGPRs: 1198167 -> 1198024 (-0.01%); split: -0.01%, +0.00%
PreVGPRs: 1225202 -> 1225035 (-0.01%); split: -0.06%, +0.05%

fossil-db (navi10):
Totals from 13969 (10.38% of 134563) affected shaders:
MaxWaves: 474386 -> 474508 (+0.03%); split: +0.05%, -0.03%
Instrs: 3740895 -> 3771566 (+0.82%); split: -0.00%, +0.82%
CodeSize: 19426592 -> 19459916 (+0.17%); split: -0.00%, +0.18%
VGPRs: 389916 -> 389852 (-0.02%); split: -0.09%, +0.07%
Latency: 25452927 -> 25502482 (+0.19%); split: -0.14%, +0.34%
InvThroughput: 3880807 -> 3923144 (+1.09%); split: -0.07%, +1.16%
VClause: 66835 -> 66712 (-0.18%); split: -0.38%, +0.20%
SClause: 178805 -> 178802 (-0.00%); split: -0.01%, +0.01%
Copies: 167601 -> 167625 (+0.01%); split: -0.54%, +0.56%
Branches: 83788 -> 83784 (-0.00%)
PreSGPRs: 388229 -> 388216 (-0.00%)
PreVGPRs: 342984 -> 343062 (+0.02%); split: -0.01%, +0.03%

fossil-db (navi10, RADV_DEBUG=invariantgeom):
Totals from 43116 (32.04% of 134563) affected shaders:
MaxWaves: 1260184 -> 1256414 (-0.30%); split: +0.10%, -0.40%
Instrs: 12804951 -> 12983628 (+1.40%); split: -0.01%, +1.41%
CodeSize: 65813224 -> 66137852 (+0.49%); split: -0.03%, +0.52%
VGPRs: 1556396 -> 1561340 (+0.32%); split: -0.09%, +0.41%
SpillSGPRs: 1377 -> 1395 (+1.31%)
Latency: 76095867 -> 76355111 (+0.34%); split: -0.32%, +0.66%
InvThroughput: 13546863 -> 13788789 (+1.79%); split: -0.05%, +1.84%
VClause: 310910 -> 311283 (+0.12%); split: -0.63%, +0.75%
SClause: 474878 -> 474941 (+0.01%); split: -0.09%, +0.10%
Copies: 639367 -> 637610 (-0.27%); split: -1.03%, +0.76%
Branches: 240178 -> 240185 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1056594 -> 1056590 (-0.00%); split: -0.00%, +0.00%
PreVGPRs: 1247950 -> 1247798 (-0.01%); split: -0.05%, +0.04%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7920
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20812>
2023-03-08 14:38:26 +00:00
Mike Blumenkrantz
6ee5337d94 aux/tc: fix rp info resizing clobbering current info
the recording rp_info may be a pointer to a member of the array being
reallocated, so test for this and re-set it to avoid invalid memory
access

found with this caselist:
KHR-GL46.texture_gather.offset-gather-unorm-2darray
KHR-GL46.texture_view.view_sampling

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21729>
2023-03-08 14:10:01 +00:00
Lionel Landwerlin
10057d19f2 anv: report max register pressure in pipeline properties
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21756>
2023-03-08 13:37:07 +00:00
Lionel Landwerlin
09cdb77a92 intel/fs: report max register pressure in shader stats
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21756>
2023-03-08 13:37:07 +00:00
Lionel Landwerlin
8dd960e056 anv/iris: report counter symbols with debug option
v2: rename to INTEL_DEBUG=perf-symbol-names

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17672>
2023-03-08 12:45:43 +00:00
Samuel Pitoiset
e6735409ee radv: disable DCC with signedness reinterpretation on GFX11
All formats should be compatible on GFX11 but for some weird reasons
DCC with signedness reinterpretation doesn't work as expected, like
R8_UINT<->R8_SINT. Note that RadeonSI also has issues with this.

This might be a hardware bug on RDNA3.

This fixes DCC issues with Cyberpunk and A Plague Tale: Requiem.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8020
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8371
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21755>
2023-03-08 11:53:25 +00:00
Pierre-Eric Pelloux-Prayer
79ab787a8f radeonsi: fix fast depth_clear_value/stencil_clear_value
We need to update the when promoting from non-TC-compatible to
TC-compatible or we'll get incorrect values in the buffer.

Fixes: 9defe8aca9 ("radeonsi: implement fast Z/S clears using clear_buffer on HTILE")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8418
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21726>
2023-03-08 10:56:21 +00:00
Pierre-Eric Pelloux-Prayer
b75acbf88f radeonsi: don't use PKT3_SET_SH_REG_INDEX on gfx9 and older
Fixes: ccaaf8fe04 ("amd: massively simplify how info->spi_cu_en is applied")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8464
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21726>
2023-03-08 10:56:21 +00:00
Pierre-Eric Pelloux-Prayer
49913fa418 radeonsi/test: update test results
Depends on https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/779
to fix glx-make-current GLX errors.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21726>
2023-03-08 10:56:21 +00:00
Pierre-Eric Pelloux-Prayer
9eb05801ad radeonsi/test: use gbm-skips.txt
Use shared skips file to avoid running tests that can't pass on gbm.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21726>
2023-03-08 10:56:21 +00:00
Samuel Pitoiset
f88dbb27d4 radv: enable VK_KHR_fragment_shading_rate on GFX11
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>
2023-03-08 10:30:48 +00:00
Samuel Pitoiset
1fb8e0eff2 radv: advertise attachmentFragmentShadingRate on GFX11
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>
2023-03-08 10:30:48 +00:00
Samuel Pitoiset
d1e724b952 radv: do not emit PA_SC_VRS_OVERRIDE_CNTL from the pipeline on GFX11
PA_SC_VRS_OVERRIDE_CNTL is emitted when a framebuffer is bound because
it controls the VRS surface enable bit. Though, if a pipeline is bound
after the framebuffer is emitted, it can override the state. Remove it
completely since VRS for flat shading and RADV_FORCE_VRS are disabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>
2023-03-08 10:30:48 +00:00
Samuel Pitoiset
c186420b26 radv: add support for VRS attachment on GFX11
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>
2023-03-08 10:30:48 +00:00
Samuel Pitoiset
31d699106d ac/surface: add RADEON_SURF_VRS_RATE for selecting swizzle mode on GFX11
On GFX11, VRS rate images can't use linear tiling and the swizzle mode
must be either SW_Z or SW_R.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>
2023-03-08 10:30:48 +00:00
Samuel Pitoiset
ce4a1b1c3c radv: move disabling DCC for VRS rate images in radv_get_surface_flags()
On GFX11, the VRS rate image needs a specific swizzle mode and a new
flag will be added here.

gned-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>
2023-03-08 10:30:48 +00:00
Lionel Landwerlin
e8793f2a86 anv: enable VK_EXT_pipeline_library_group_handles
A noop for us.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20929>
2023-03-08 08:59:52 +00:00
Marek Olšák
461ccb00e1 radeonsi: increase NGG workgroup size to 256 for VS/TES with streamout and GS
NGG streamout performance is limited by the workgroup size, so make it as
large as possible.

Since this uses si_get_max_workgroup_size() to set the NGG workgroup size,
the side effect is that all GS is also getting an increase to 256, which
is OK.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Marek Olšák
43fd552872 radeonsi: allow using 64K LDS for NGG to allow larger workgroups
This should help with NGG streamout performance, which is limited by
the workgroup size (it should be as large as possible).

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Marek Olšák
e01d505291 radeonsi: other cosmetic changes in si_state_shaders.cpp
VS_W32_EN has no effect on Gfx11, but we better not set it.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Marek Olšák
ef965d5681 radeonsi: reorganize si_shader_ps
To make branching based on gfx_level nicer and the code in a logical order.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Marek Olšák
c9d297fc77 radeonsi: reorganize si_shader_ngg
To make branching based on gfx_level nicer and the code in a logical order.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Marek Olšák
1664aad43c radeonsi: reorganize si_shader_hs
To make branching based on gfx_level nicer and the code in a logical order.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Marek Olšák
b3459eae7a radeonsi: reindent si_shader_ls, si_shader_es, si_shader_gs, si_shader_vs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Marek Olšák
7e0ed2c4f0 radeonsi: set pm4.atom.emit in si_get_shader_pm4_state
except gfx10_shader_ngg, which isn't as trivial

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Marek Olšák
4c1475fc1c radeonsi: lower nir_texop_sampler_descriptor_amd
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Marek Olšák
1417ced72c radeonsi: separate nir_texop_descriptor_amd lowering
This moves the code to a separate branch to make it less intertwined
with the rest to allow sampler descriptor lowering later.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Marek Olšák
54ebd90739 radeonsi: merge si_emit_initial_compute_regs with si_init_cs_preamble_state
It's better to set all immutable registers in one place.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Marek Olšák
ddded6fbb5 radeonsi: emulate VGT_ESGS_RING_ITEMSIZE in the shader on gfx9-11
The hardware uses the register to premultiply GS vertex indices
in input VGPRs.

This changes the behavior as follows:
- VGT_ESGS_RING_ITEMSIZE is always 1 on gfx9-11, set in the preamble.
- The value is passed to the shader via current_gs_state (vs_state_bits).
- The shader does the multiplication.

The reason is that VGT_ESGS_RING_ITEMSIZE will be removed in the future.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Timur Kristóf
fb819fdb13 ac/nir: clear nir_var_shader_out from TCS barriers
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>
2023-03-08 07:29:09 +00:00
Timur Kristóf
87de5b2b9e aco: Don't include headers from radv.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696>
2023-03-08 04:39:18 +00:00
Timur Kristóf
a0141c6308 aco, radv: Don't use radv_shader_args in aco.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696>
2023-03-08 04:39:18 +00:00
Timur Kristóf
e9793331db aco, radv: Move PS epilog and VS prolog args to their info structs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696>
2023-03-08 04:39:18 +00:00
Timur Kristóf
84a2cea596 aco, radv: Rename aco_*_key to aco_*_info.
The naming of aco_*_key didn't make sense because they
were never actually used as cache keys, only radv_*_key
are used as cache keys.

Rename the aco structs to aco_*_info instead.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696>
2023-03-08 04:39:18 +00:00
Qiang Yu
91e68db0e1 aco, radv: Move is_trap_handler_shader to aco info.
v2 by Timur Kristóf:
- Rebase this patch on latest main.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696>
2023-03-08 04:39:18 +00:00
Qiang Yu
978220c99a aco, radv: Add load_grid_size_from_user_sgpr to aco options.
v2 by Timur Kristóf:
- Rebase this patch.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696>
2023-03-08 04:39:18 +00:00
Timur Kristóf
3058ab6090 aco: Generalize vs_inputs to args_pending_vmem.
Handle arguments that need a waitcnt without relying on
RADV specific VS input information.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696>
2023-03-08 04:39:18 +00:00
Timur Kristóf
1583bea9da radv: Set pending_vmem on dynamic VS input args.
These are loaded from VMEM and need a waitcnt before use.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696>
2023-03-08 04:39:18 +00:00
Timur Kristóf
1a7b5979df ac: Add pending_vmem field to args.
This is to indicate when an argument was loaded from VMEM
and needs a waitcnt before it can be used.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696>
2023-03-08 04:39:18 +00:00
Rob Clark
d5376c3feb freedreno: Promote non-drawing batches to sysmem
Sometimes we can end up with a sequence where we need to flush a batch
with no clears and no draws (for ex, to get a fence).  Promote these to
sysmem.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21747>
2023-03-08 04:10:45 +00:00
Mike Blumenkrantz
aaed609e57 zink: hook up buffer TRANSFER_DST barrier optimizing
this should massively optimize e.g., incremental index buffer overwrites

ref #8358

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21779>
2023-03-08 03:50:33 +00:00
Mike Blumenkrantz
fe469a7618 zink: add a driver workaround to disable copy box optimizations
turnip is nonconformant regarding cache access (see noted issue),
meaning that any attempt to omit barriers breaks things

qcom proprietary may also be affected

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21779>
2023-03-08 03:50:33 +00:00
Mike Blumenkrantz
46f98da188 zink: add a mechanism to trigger copy box resets from batch state reset
the resource isn't available during batch state reset, so a new flag
is needed to force a reset the next time the copy boxes would be used

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21779>
2023-03-08 03:50:33 +00:00
Mike Blumenkrantz
aaca91eb79 zink: add a mechanism for managing TRANSFER_DST buffer barriers
this enables successive or unrelated transfer writes to avoid triggering
barriers, and ensuing reads of those writes should trigger their own
barriers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21779>
2023-03-08 03:50:33 +00:00
Mike Blumenkrantz
54f3c589d5 zink: track the last write access for resources
this enables some optimization

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21779>
2023-03-08 03:50:33 +00:00
SureshGuttula
30a89323ad radeonsi: Add support for DPB resize
This patch will add support for dpb resize when low to high resolution
change/ svc use-cases.

With DPB tier1 type,vp9 svc decoder use cases are failed. This
Change will fix this[VCN1/VCN2].

Signed-off-by: SureshGuttula <suresh.guttula@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21548>
2023-03-08 02:19:58 +00:00
Rose Hudson
e54ec96f35 asahi: disable disk cache in debug runs
With debug flags enabled, shaders might get compiled differently and
running compilation might be desired e.g. for logging, so don't try to
cache them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21776>
2023-03-08 02:07:44 +00:00
Rose Hudson
5e9538c12e agx: isolate compiler debug flags
The gallium disk cache is about to depend on these, and I don't want to
create a dependency on agx_opcodes.h.py for that. So, make a new header
for them that doesn't have build dependencies.
Rename them to agx_compiler_* too, to avoid collisions with the other
driver debug flags.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21776>
2023-03-08 02:07:44 +00:00
Väinö Mäkelä
78d742290b intel/ci: Remove skipped float_controls tests from hasvk xfails
These tests are skipped now because preserving denorms isn't supported.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21719>
2023-03-08 01:46:00 +00:00
Väinö Mäkelä
840b4b856e intel/ci: Remove hasvk xfails missing from the CTS
These broken tests no longer exist in the CTS and all dynamic rendering
tests pass now.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21719>
2023-03-08 01:46:00 +00:00
Väinö Mäkelä
82a78b7e9f intel/ci: Remove outdated hasvk copy_and_blit xfails
These were fixed by commit e509afac.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21719>
2023-03-08 01:46:00 +00:00
Patrick Lerda
ff7446ba0c mesa/program: fix memory leak triggered by arb alias
The function _mesa_symbol_table_add_symbol() copies the string with strdup(),
the original string should be freed.

For instance, with "piglit/fp-fragment-position -auto -fbo":
Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0xffff99c59050 in __interceptor_strdup (/usr/lib64/libasan.so.6+0x59050)
    #1 0xffff8f53d24c in handle_ident ../src/mesa/program/program_lexer.l:129
    #2 0xffff8f53d24c in _mesa_program_lexer_lex ../src/mesa/program/program_lexer.l:312
    #3 0xffff8f529d10 in yylex ../src/mesa/program/program_parse.y:289
    #4 0xffff8f529d10 in yyparse src/mesa/program/program_parse.tab.c:2140
    #5 0xffff8f5341a4 in _mesa_parse_arb_program ../src/mesa/program/program_parse.y:2589
    #6 0xffff8f51e96c in _mesa_parse_arb_fragment_program ../src/mesa/program/arbprogparse.c:82
    #7 0xffff8f4d867c in set_program_string ../src/mesa/main/arbprogram.c:402

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21728>
2023-03-07 23:11:29 +00:00
Patrick Lerda
a692fe418e mesa/program: fix memory leak triggered by multiple targets used on one texture image unit
For instance, with "piglit-2000/bin/asmparsertest ARBfp1.0 tests/asmparsertest/shaders/ARBfp1.0/shadow-02.txt":
Direct leak of 192 byte(s) in 2 object(s) allocated from:
    #0 0x7f6e8378f987 in calloc (/usr/lib64/libasan.so.6+0xb1987)
    #1 0x7f6e7769d620 in asm_instruction_copy_ctor ../src/mesa/program/program_parse.y:2146
    #2 0x7f6e7769d620 in yyparse ../src/mesa/program/program_parse.y:439
    #3 0x7f6e776a6725 in _mesa_parse_arb_program ../src/mesa/program/program_parse.y:2590
    #4 0x7f6e77687f69 in _mesa_parse_arb_fragment_program ../src/mesa/program/arbprogparse.c:82
    #5 0x7f6e77630765 in set_program_string ../src/mesa/main/arbprogram.c:402
    #6 0x7f6e76ec3e8a in _mesa_unmarshal_ProgramStringARB src/mapi/glapi/gen/marshal_generated2.c:4152
    #7 0x7f6e76a0e585 in glthread_unmarshal_batch ../src/mesa/main/glthread.c:122
    #8 0x7f6e76a1031d in _mesa_glthread_finish ../src/mesa/main/glthread.c:383
    #9 0x7f6e76a1031d in _mesa_glthread_finish ../src/mesa/main/glthread.c:348
    #10 0x7f6e76e6a062 in _mesa_marshal_GetError src/mapi/glapi/gen/marshal_generated1.c:1809

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21728>
2023-03-07 23:11:29 +00:00
Patrick Lerda
444250a5e7 mesa/program: fix memory leak triggered by invalid extended swizzle selector
For instance, with "piglit/bin/asmparsertest ARBfp1.0 tests/asmparsertest/shaders/ARBfp1.0/swz-04.txt":
Direct leak of 18 byte(s) in 2 object(s) allocated from:
    #0 0x7f97e99050 in __interceptor_strdup (/usr/lib64/libasan.so.6+0x59050)
    #1 0x7f8d4160ac in handle_ident ../src/mesa/program/program_lexer.l:129
    #2 0x7f8d4160ac in _mesa_program_lexer_lex ../src/mesa/program/program_lexer.l:312
    #3 0x7f8d402b50 in yylex ../src/mesa/program/program_parse.y:289
    #4 0x7f8d402b50 in yyparse src/mesa/program/program_parse.tab.c:2140
    #5 0x7f8d40d01c in _mesa_parse_arb_program ../src/mesa/program/program_parse.y:2590
    #6 0x7f8d3f77ac in _mesa_parse_arb_fragment_program ../src/mesa/program/arbprogparse.c:82
    #7 0x7f8d3ad468 in set_program_string ../src/mesa/main/arbprogram.c:402

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21728>
2023-03-07 23:11:29 +00:00
Georg Lehmann
57557e8815 aco/assembler/gfx11: simplify 16bit VOP12C promotion to VOP3
With the shared struct for modifies, this is can be a lot cleaner now.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21761>
2023-03-07 22:38:39 +00:00
Marek Olšák
ae50b66251 radeonsi/gfx11: only allocate GDS OA for streamout, GDS memory is not needed
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21584>
2023-03-07 22:08:47 +00:00
Marek Olšák
61da19a262 amd/llvm,radeonsi/gfx11: switch to using GDS_STRMOUT registers
This is required by register shadowing (required by the new PAIRS packets),
preemption, user queues, and we only have to wait for VS after streamout,
not PS. This is how gfx11 streamout should have been done.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21584>
2023-03-07 22:08:47 +00:00
Marek Olšák
f7076d129d amd: add nir_intrinsic_xfb_counter_sub_amd and fix overflowed streamout offsets
Fixes: 5ec79f9899 - ac/nir/ngg: nogs support streamout

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21584>
2023-03-07 22:08:47 +00:00
Mark Janes
08649e3673 intel/fs: use generated workaround helpers for Wa_14017989577
Wa_14017989577 is a clone of Wa_14015360517, which applies to several
platforms beyond INTEL_PLATFORM_DG2_G10.

Update references to Wa_14017989577, and use the generated workaround
helper to ensure application to the proper platforms.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21744>
2023-03-07 21:43:11 +00:00
Emma Anholt
5fd9abae90 ci/etnaviv: Drop the dEQP-GLES2.functional.uniform_api.random.94 xfail.
This has been consistently passing.  I think I just missed it in my
previous update.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21769>
2023-03-07 21:03:33 +00:00
Emma Anholt
d52cf80bcb ci: Add some xfail updates from VKCTS 1.3.5.0 for the manual jobs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21769>
2023-03-07 21:03:33 +00:00
Mike Blumenkrantz
53da1534b5 llvmpipe: fix LP_PERF=no_depth to ignore depth format
cc: mesa-stable

Reviewed-by: Brian Paul brianp@vmware.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21582>
2023-03-07 20:42:43 +00:00
Juan A. Suarez Romero
baff509924 v3d/v3dv: define performance counters in common
Both OpenGL and Vulkan drivers share the same performance counters.

Let's move them to a common place instead of duplicating.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21420>
2023-03-07 18:57:41 +00:00
Antonio Gomes
161e3f29f4 iris: Add support for 2d images created from buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Antonio Gomes
4f096d0d88 llvmpipe: Add new caps PIPE_CAP_LINEAR_IMAGE_(PITCH_ALIGNMENT|BASE_ADDRESS_ALIGNMENT)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Antonio Gomes
06daa03c5c rusticl: Implement spec for cl_khr_image2d_from_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Antonio Gomes
010c18c443 gallium: Add new caps PIPE_CAP_LINEAR_IMAGE_(PITCH_ALIGNMENT|BASE_ADDRESS_ALIGNMENT)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Antonio Gomes
7839341d8f lvmpipe/cs: Add support for 2d images created from buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Antonio Gomes
9cbdf3673b mesa/st, nine, nouveau: Fix uninitialized pipe_sampler_view structs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Antonio Gomes
cc36fd0f61 gallium, rusticl: Add tex2d_from_buf in image_view and sampler_view
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Antonio Gomes
07270ece45 rusticl: Enable mapImage for images created from buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Antonio Gomes
9dda1e4872 rusticl: Enable copy for images created from buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Antonio Gomes
3c51db3f21 rusticl: Enabling image fill for images created from buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Antonio Gomes
e40fd3bd60 rusticl: Enabling reading/writing for images created from buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
2023-03-07 18:24:56 +00:00
Daniel Schürmann
26f430d6ce radv/rt: move radv_pipeline_key from rt_variables to traversal_data
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21764>
2023-03-07 17:00:50 +00:00
Daniel Schürmann
d87bbee0be radv: remove unused parameters from radv_compute_pipeline_compile()
Also make this function static.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21764>
2023-03-07 17:00:50 +00:00
Daniel Schürmann
d06aa7b71d radv/rt: introduce and use radv_rt_pipeline_compile()
This is essentially a code-duplication of radv_compute_pipeline_compile()
but will later be more specialized for the needs of RT pipelines.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21764>
2023-03-07 17:00:50 +00:00
Daniel Schürmann
f1565de4cc radv: expose radv_pipeline_capture_shaders()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21764>
2023-03-07 17:00:50 +00:00
Daniel Schürmann
2fbd495ce7 radv: expose radv_postprocess_nir()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21764>
2023-03-07 17:00:50 +00:00
Samuel Pitoiset
c87c34bbba radv: fix defining RADV_USE_WSI_PLATFORM
RADV_USE_WSI_PLATFORM was unused in radv_CreateImage().

Fixes: 2a5d7f4926 ("radv: fix missing implementation of creating images from swapchains")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21763>
2023-03-07 16:37:17 +00:00
José Roberto de Souza
a6dcd62f44 iris: Move iris_bo_wait_gem() to i915/iris_bufmgr.c
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21494>
2023-03-07 16:16:10 +00:00
José Roberto de Souza
97becc1b6f iris: Move iris_bo_busy_gem() to i915/iris_bufmgr.c
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21494>
2023-03-07 16:16:10 +00:00
José Roberto de Souza
7553d921f6 iris: Move bo_set_caching to kmd backend
For the platforms that call it, it a function in the hot path so
moving it to kmd backend.

After this patch i915/iris_bufmgr.c is empty but not removing it
as next patch will add functions to it.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21494>
2023-03-07 16:16:10 +00:00
José Roberto de Souza
bdfcc98001 iris: Move bo_madvise to kmd backend
bo_madvise() is on hot path, so moving it to kmd backend.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21494>
2023-03-07 16:16:10 +00:00
José Roberto de Souza
d636e772c0 intel/common: Implement the Xe functions for intel_gem
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21699>
2023-03-07 15:41:36 +00:00
José Roberto de Souza
19aa1fb851 intel/common: Implement the Xe functions for intel_engine
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21699>
2023-03-07 15:41:36 +00:00
Samuel Pitoiset
7b2086d741 radv: fix border color swizzle for stencil-only format on GFX9+
Swizzle of 8-bit stencil format is defined as _x__ but the hw expects
BC_SWIZZLE_XYZW.

Fixes dEQP-VK.pipeline.monolithic.sampler.border_swizzle.*s8_uint*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21482>
2023-03-07 15:10:33 +00:00
Tapani Pälli
889c3ee6b8 anv: fix sends_count_expectation assert on simd32
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21758>
2023-03-07 14:37:31 +00:00
Yogesh Mohan Marimuthu
347a5b79f9 ac/surface: only adjust pitch if surf_pitch was modified
Modifying pitch for all LINEAR surface isn't correct;
the original change that modified surf_pitch was only
intended for YUV textures.

This fixes vkGetImageSubresourceLayout rowPitch return value
for VK_FORMAT_BC3_UNORM_BLOCK + VK_IMAGE_TILING_LINEAR.

Fixes: fcc499d5 (ac/surface: adjust gfx9.pitch[*] based on surf->blk_w)

v2: add check for UYVY format (Pierre-Eric)
v3: move blk_w division to above if check (Pierre-Eric)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21595>
2023-03-07 13:50:31 +00:00
David Heidelberg
f72774f13f ci/lavapipe: fixes typo
Fixes: 5ee724e180 ("ci/lavapipe: add recent occasional flake")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21759>
2023-03-07 13:26:52 +00:00
Georg Lehmann
de4805f25f aco: use bitfield array helpers for valu modifiers
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023>
2023-03-07 11:53:23 +00:00
Georg Lehmann
e7559da757 aco: add bitfield array helper classes
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023>
2023-03-07 11:53:23 +00:00
Georg Lehmann
097a97cc42 aco: remove VOP[123C]P? structs
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023>
2023-03-07 11:53:23 +00:00
Georg Lehmann
08542318e7 aco/optimizer: simplify using VALU instruction
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023>
2023-03-07 11:53:23 +00:00
Georg Lehmann
4591703e79 aco/print_ir: simplify using VALU instruction
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023>
2023-03-07 11:53:23 +00:00
Georg Lehmann
17ff2e8c52 aco: validate VALU modifiers
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023>
2023-03-07 11:53:23 +00:00
Georg Lehmann
fc193ab4db aco/ra: set opsel_hi to zero when converting to VOP2
Otherwise the new modifier validation will fail.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023>
2023-03-07 11:53:23 +00:00
Georg Lehmann
366cf4efaa aco/ir: rework IR to have one common valu instruction struct
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023>
2023-03-07 11:53:23 +00:00
Georg Lehmann
77afe7d960 aco: treat VINTERP_INREG as VALU
It's just v_fma with fixed DPP8 and builtin s_waitcnt_expcnt, so it can mostly
be handled as a pure VALU instruction.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023>
2023-03-07 11:53:23 +00:00
Samuel Pitoiset
c119b19f98 radv: fix incorrect stride for primitives generated query with GDS
When the query pool uses GDS (for NGG), the stride is 40.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8412
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21650>
2023-03-07 10:15:35 +01:00
Lionel Landwerlin
a278eeb719 nir: fix nir_ishl_imm
Both GLSL & SPIRV have undefined values for shift > bitsize. But SM5
says :

   "This instruction performs a component-wise shift of each 32-bit
    value in src0 left by an unsigned integer bit count provided by
    the LSB 5 bits (0-31 range) in src1, inserting 0."

Better to not hard code the wrong behavior in NIR.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e227bb9fd5 ("nir/builder: add ishl_imm helper")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@colllabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21720>
2023-03-07 08:14:34 +00:00
Samuel Pitoiset
5ec80ab37c radv: do not add descriptor BOs on update when the global BO list is used
It's unnecessary and already checked elsewhere like in
vkCmdBindDescriptorSets(). This improves performance of vkoverhead
test #76 (descriptor_1image) by +18%. It's the same performance as
PRO on my Threadripper 1950X now. This should also slightly improve
texel and buffer descriptors.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20699>
2023-03-07 07:30:29 +00:00
Karol Herbst
1aca36815e gallivm: fix lp_vec_add_offset_ptr for 32 bit builds
The function assumed ptrs are always 64 bit sized.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8267
Fixes: 442d1fe5ad ("gallivm: use masked intrinsics for global and scratch access.")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21604>
2023-03-07 04:17:15 +00:00
Karol Herbst
4c24ff0a34 rusticl/kernel: Images arg sizes also have to match the host pointer size
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8267
Fixes: b0d698c532 ("rusticl: correctly check global argument size")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21604>
2023-03-07 04:17:15 +00:00
Alyssa Rosenzweig
66f806d01d agx: Assert that memory index is 32-bit reg
Semantics will be wrong otherwise (reading garbage).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21643>
2023-03-07 02:58:35 +00:00
Alyssa Rosenzweig
2a174f0019 agx/lower_address: Handle 16-bit offsets
These need to be upconverted for correctness.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21643>
2023-03-07 02:58:35 +00:00
Alyssa Rosenzweig
9f5a4a9604 agx/lower_address: Fix handling of 64-bit immediates
We can't add a 64-bit immediate with the hardware iadd, that won't work. What we
can do is add a 32-bit immediate, derived as the low 32-bits of a 64-bit
nir_ssa_def.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21643>
2023-03-07 02:58:35 +00:00
Alyssa Rosenzweig
4bd0e1d097 agx/lower_address: Handle 8-bit load/store
Should work ok with the implicit up-conversion that the backend does.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21643>
2023-03-07 02:58:35 +00:00
Alyssa Rosenzweig
5865e23a07 agx/lower_address: Handle large shifts
If we manage to fold in a left shift that's bigger than the hardware can do, we
should at least avoid generating a useless right shift to feed the hardware
rather bailing completely.

For motivation, this form of address arithmetic is encountered when indexing
into arrays with large power-of-two element sizes (array-of-structs).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21643>
2023-03-07 02:58:35 +00:00
Alyssa Rosenzweig
6203503196 agx/lower_address: Optimize "shift + constant"
Optimize address arithmetic of the form

   base + u2u64((index << shift) + const)

into hardware operands

   base, index << (shift - format_shift) + const'

which (if format_shift = shift) can be simply

   base, index + const'

rather than the current naive translation

   base, ((index << shift) + const) >> format_shift

This saves at least one pointless shift. We can't do this optimization with
nir_opt_algebraic, because explicitly optimizing "(a << #b) >> #b" to "a" isn't
sound due to overflow. But there's no overflow issue here, which is what this
whole pass is designed around.

For motivation, this address arithmetic implements "dynamically indexing into an
array inside of a C structure", where the const is the offset of the array
relative to the structure.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21643>
2023-03-07 02:58:35 +00:00
Alyssa Rosenzweig
dccf6f569b agx/lower_address: Break on match
Once we've matched a summand, commit to it. This avoids needlessly checking the
second source if the first matched, and removes some indentation/funny control
flow.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21643>
2023-03-07 02:58:35 +00:00
Mike Blumenkrantz
b5fc941f2f zink: always set batch usage for descriptors after barrier
this otherwise breaks unordered promotion calc

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>
2023-03-07 01:57:41 +00:00
Mike Blumenkrantz
afb56bad1c zink: set dynamic pcp for unordered cmdbuf
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>
2023-03-07 01:57:41 +00:00
Mike Blumenkrantz
c5f901dbc6 zink: bind descriptor buffers to unordered cmdbuf
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>
2023-03-07 01:57:41 +00:00
Mike Blumenkrantz
20c9cfb30f zink: always set color writes on the unordered cmdbuf
this state has to be set, so ensure it is

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>
2023-03-07 01:57:41 +00:00
Mike Blumenkrantz
8e3ee9aad6 zink: explicitly flush src clears when u_blittering
this otherwise relies on set_framebuffer_state flushing them,
which may or may not be accurate/desired

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>
2023-03-07 01:57:41 +00:00
Mike Blumenkrantz
1aa62912b7 zink: don't unset existing access when adding resource binds
this breaks barrier calcs, but it was fine since there was a pre-barrier

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>
2023-03-07 01:57:41 +00:00
Mike Blumenkrantz
a0f3d171f6 zink: eliminate pre barrier for adding resource binds
this will automatically be handled by the copies below

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>
2023-03-07 01:57:41 +00:00
Mike Blumenkrantz
d133f95084 zink: check for layout updates when unbinding samplerviews
not sure if it's a bug, but it should be consistent with shader image
unbinding, so here it is

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>
2023-03-07 01:57:41 +00:00
Mike Blumenkrantz
a4b1ae1f03 zink: propagate valid_buffer_range when replacing buffer storage
this is otherwise unreliable

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>
2023-03-07 01:57:41 +00:00
Mike Blumenkrantz
7145ccfa05 zink: fix descriptor update flagging on null ssbo set
this could unset the update flag if the last ssbo was null, which would
be a bug if it could ever be triggered

found by inspection

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>
2023-03-07 01:57:41 +00:00
Mike Blumenkrantz
e0dfe058c4 zink: only add deferred barrier on fb unbind when layout needs to change
this otherwise may have been a surface that was never drawn to or
already had its layout corrected, in which case a deferred barrier
is not only unnecessary, it might be broken

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21739>
2023-03-07 01:57:41 +00:00
Mark Janes
bc04e2daca intel/fs: use generated helpers for Wa_1209978020 / Wa_18012201914
Wa_1209978020 is a clone of Wa_18012201914.  Update references to
refer to the originating bug, and use generated helpers to ensure it
is applied to future platforms as needed.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21741>
2023-03-07 01:41:53 +00:00
Caio Oliveira
c92d589597 intel/compiler: Drop non-scoped barrier handling
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21634>
2023-03-07 00:41:13 +00:00
Alyssa Rosenzweig
02eef8ca98 gallivm: Drop non-scoped barrier handling
Now unreachable.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21634>
2023-03-07 00:41:13 +00:00
Alyssa Rosenzweig
c8147e69d3 ir3: Drop non-scoped barrier handling
Now unreachable.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21634>
2023-03-07 00:41:13 +00:00
Alyssa Rosenzweig
fc93e8e537 pan/mdg: Drop control_barrier handling
Now unreachable.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21634>
2023-03-07 00:41:13 +00:00
Alyssa Rosenzweig
cb0f4b8146 pan/bi: Drop control_barrier handling
Now unreachable.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21634>
2023-03-07 00:41:13 +00:00
Alyssa Rosenzweig
f47ea3f992 glsl/nir: Use scoped_barrier for control barrier
Rather than control_barrier. This avoids the need to handle control_barrier at
all for backends that set use_scoped_barrier. This effectively matches what
spirv_to_nir emits, so Vulkan-capable compilers should be ok.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21634>
2023-03-07 00:41:13 +00:00
Caio Oliveira
07de034791 intel/compiler: Drop brw_nir_lower_scoped_barriers
Now that we handle scoped barriers with execution scope during
NIR -> Backend IR translation, this lowering is not needed anymore.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21634>
2023-03-07 00:41:13 +00:00
Caio Oliveira
dfc34b1a65 intel/vec4: Handle scoped barriers with execution scope
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21634>
2023-03-07 00:41:13 +00:00
Caio Oliveira
db0a09c9e2 intel/fs: Handle scoped barriers with execution scope
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21634>
2023-03-07 00:41:13 +00:00
Yiwei Zhang
ae6eb3229e venus: revert back the warn order
This reverts
- commit 4ae4e4362c
- commit f54aa49c14

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21542>
2023-03-07 00:25:07 +00:00
Yiwei Zhang
28bdf8db18 venus: vn_relax to abort on ring fatal status upon warn order
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21542>
2023-03-07 00:25:07 +00:00
Yiwei Zhang
adb51eeba5 venus: propagate vn_ring to vn_relax
This is to prepare for vn_relax to check ring status as well as pinging
renderer.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21542>
2023-03-07 00:25:07 +00:00
Yiwei Zhang
15a55198ec venus: abort ring submit when ring is in fatal status
This change also migrates to use the protocol defined status enums.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21542>
2023-03-07 00:25:07 +00:00
Yiwei Zhang
0b45893823 venus: sync to latest protocol for ring status enum
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21542>
2023-03-07 00:25:07 +00:00
Mark Janes
b96019f82b intel/fs: use generated workaround helpers for Wa_14010017096
This workaround does not apply beyond gen 12.0.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21746>
2023-03-07 00:10:33 +00:00
Mark Collins
66d2ae0386 meson: forcefully disable libdrm when host doesn't have it
Signed-off-by: Mark Collins <mark@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21724>
2023-03-06 22:40:55 +00:00
Alyssa Rosenzweig
952bd63d6d nir/opt_barrier: Generalize to control barriers
For GLSL, we want to optimize code like

   memoryBarrierBuffer();
   controlBarrier();

into a single scoped_barrier intrinsic for the backend to consume. Now that
backends can get scoped_barriers everywhere, what's left is enabling backends to
combine these barriers together. We already have an Intel-specific pass for
combining memory barriers; it just needs a teensy bit of generalization to allow
combining all sorts of barriers together.

This avoids code quality regression on Asahi when switching to purely scoped
barriers. It's probably useful for other backends too.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21661>
2023-03-06 22:09:27 +00:00
Faith Ekstrand
83fd7a5ed1 intel: Use nir_lower_tex_options::lower_index_to_offset
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21546>
2023-03-06 21:38:32 +00:00
Alyssa Rosenzweig
4b6d98a40c ir3: Use lower_index_to_offset
Instead of doing the add ourselves.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21546>
2023-03-06 21:38:32 +00:00
Alyssa Rosenzweig
510d3ab93d pan/bi: Use lower_index_to_offset
Instead of doing the add ourselves.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21546>
2023-03-06 21:38:32 +00:00
Alyssa Rosenzweig
282aeb9b9c nir/lower_tex: Add lower_index_to_offset
Some backends can handle a constant texture index or a dynamic texture index but
not a constant texture index plus a dynamic texture offset. Add a nir_lower_tex
option to lower to one of these options.

v2: Use more straightforward code proposed by Faith.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21546>
2023-03-06 21:38:32 +00:00
Sam Edwards
9de997bde6 nouveau: Fix null dereference in nouveau_pushbuf_destroy
This may happen if the Nouveau device fails to initialize before
the pushbuf is set up; the abort logic will call this either way.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21611>
2023-03-06 20:25:10 +00:00
Daniel Stone
34d45df8ff ci/fdno: Only run full tests on a limited subset of machines
Though not many people run full test runs, it occupies 2/7 a630 slots
for nearly 2 hours. If more than one person does this at a time, it can
be an effective DoS and make merges time out.

Limit full runs to a subset of the runners, such that at least some of
them will always be available for us.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21737>
2023-03-06 19:56:39 +00:00
Rob Clark
399012a911 freedreno/common: Replace or_mask() with BitsetEnum<T>
Use template and operator overloading to make dealing with bitmask enums
shared between C and C++ easier.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21535>
2023-03-06 19:27:19 +00:00
Eric Engestrom
30d469215b v3d/ci: add dEQP-GLES3.functional.texture.specification.teximage2d_pbo.*_cube flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21735>
2023-03-06 19:02:37 +00:00
Mike Blumenkrantz
62f1a8a3a6 zink: unbind fb on context destroy
this ensures that batch refs are added for fb surfaces on unbind, which
prevents stale batch tracking from persisting on resources
after the context is destroyed

fixes:
*EGL.functional.render.multi_context*

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21727>
2023-03-06 18:47:41 +00:00
Italo Nicola
3174cfcaf2 hud: add GALLIUM_HUD_OPACITY envvar
GALLIUM_HUD_OPACITY can be used with a % value from 0 to 100, to specify
the opacity of the gallium hud background.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Tested-by: Chris Healy <healych@amazon.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20339>
2023-03-06 16:50:27 +00:00
Italo Nicola
7ace1bab73 hud: use defines for default scale/rotation/visibility values
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20339>
2023-03-06 16:50:27 +00:00
Ruijing Dong
0f3370eede raseonsi/vcn: fix a h264 decoding issue
reason:
   some h264 streams have some strange pictures, from
   vaapi input these pictures don't have a reference frame,
   however, they are not intra only pictures, in MB layer
   these pictures are looking for some references, if they
   cannot find it. It could cause PF.

   when reference pictures exist, it will need to set used_for
   reference_flags, therefore if that is set, however the
   number of reference frames is zero, which is odd, it
   should be avoided.

solution:
   In the above case,  to scan the ref list so that it will
   make at least one reference available to avoid crash, since
   this is not accurate enough, it could cause some artifacts.
   And in that case, it will need to be checked individually
   for another solution.

closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1462
closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8401
Cc: mesa-stable

Tested-by: llyyr <llyyr.public@gmail.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21732>
2023-03-06 16:38:19 +00:00
Mike Blumenkrantz
340f2d1a25 zink: add frame trace markers on the queue
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21655>
2023-03-06 16:23:21 +00:00
Sonny Jiang
bb796f70a1 radeonsi: Add NV12 support for AV1
8bit av1 decoding cannot use NV12 output, which is caused by missing NV12 RT format.
It's a regression caused by commit [0504a3b0].
Fixes: 0504a3b0  ("radeonsi: correctly declare YUV420_10 RT Format support for AV1")
Cc: mesa-stable

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: David Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21697>
2023-03-06 16:10:40 +00:00
Samuel Pitoiset
0ed28d2715 wsi: move an assertion in wsi_xxx_surface_get_capabilities2()
Hit this with vulkaninfo on X11, probably a vulkaninfo bug. Though
moving the assertion doesn't hurt.

Fixes: be0dcbdfa2 ("wsi/x11: Implement EXT_swapchain_maintenance1.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21722>
2023-03-06 14:40:02 +00:00
Mike Blumenkrantz
c3cc8455d4 zink: when skipping a TRANSFER_DST image barrier, set access tracking
this otherwise breaks subsequent barriers if the first barrier of the batch
is a TRANSFER_DST on an image that can skip such a barrier

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
e650ff4ea0 zink: remove debug markers for u_blitter ops
these don't actually work; it creates the marker for the op, but
then the "end" of the marker is effectively determined to be the end
of the cmdbuf

instead, detect whether a draw is from u_blitter and add a marker there

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
271ebdd735 zink: pass cmdbuf to debug marker begin
this is otherwise broken with cmdbuf reordering

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
60496f6376 zink: reorder some blit debug markers
avoid capturing barrier and other ops in these

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
d677c00f6d zink: be more descriptive with perfetto buffer barriers
this should print some nice info in the graphs now

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
8c037193fb zink: determine whether debug markers are used on screen create
make this easier to reuse

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
8c226ba242 zink: skip buffer barriers if the buffer can be easily proved idle
this should have no pending write hazards, which means this barrier
can just be used for tracking

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
0a7092b285 zink: use split image barriers if the image can be easily proved idle
this should have no pending write hazards, which means this transition
has no dependencies and can occur immediately

also delete some old comments

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
5be506c16e zink: fix zink_resource_access_is_write()
this was accurately returning whether the access had only write flags,
but it was incorrectly returning false for READ|WRITE

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
772d92bfa6 zink: add functions for faster batch-usage completion checks
in cases where only a simple, non-definitive check is needed, these
can be used to eliminate some ioctl overhead

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
5b64d7267b zink: skip attachment barrier for redundant layout-setting if !valid
an invalidated image doesn't need synchronization, so this can be skipped

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
1694678294 zink: avoid unnecessary read-only layout changes for zs attachments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Mike Blumenkrantz
73df715c11 zink: add perfetto tracing for barriers
at least shows where they are

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>
2023-03-06 14:22:01 +00:00
Daniel Schürmann
7fadee9b70 radv/rt: only reserve stack_sizes after rt_case insertion
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21667>
2023-03-06 13:58:54 +00:00
Daniel Schürmann
3e03fe44e7 radv/rt: move stack_sizes into radv_ray_tracing_module
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21667>
2023-03-06 13:58:54 +00:00
Daniel Schürmann
48edcd03c5 radv/rt: introduce struct radv_ray_tracing_module
This is preliminary work for separate shader functions.
The ray_tracing_module is eventually intended as self-contained
pipeline struct per RT group.

For now, these modules only contain the group handles.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21667>
2023-03-06 13:58:54 +00:00
Daniel Schürmann
4dafb69d61 radv/rt: defer library_pipeline allocation
We will need the number of groups at allocation time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21667>
2023-03-06 13:58:54 +00:00
Daniel Schürmann
a62d699664 radv/rt: rename library_pipeline->groups to library_pipeline->group_infos
'groups' will later be used for ray_tracing_modules.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21667>
2023-03-06 13:58:54 +00:00
Błażej Szczygieł
944a3af531 glx: Fix glXGetFBConfigFromVisualSGIX
Get list of configs returned by glXChooseFBConfig, return it's first
element, free memory.

Fixes: 4ccd253588 ("glx: Require GLX 1.3")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8273

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21607>
2023-03-06 11:16:48 +00:00
Erik Faye-Lund
c305f97257 nir: add a print_internal debug-flag
It can sometimes be useful to also print the shaders that are marked as
internal, so let's add a flag that lets us do that.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21681>
2023-03-06 09:13:52 +00:00
Samuel Pitoiset
7c1563aebe radv/ci: update CI lists for CTS 1.3.5.0 on GFX110/POLARIS10/PITCAIRN
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21689>
2023-03-06 08:53:31 +00:00
Samuel Pitoiset
81eaf7b9e4 radv/ci: stop skipping some graphics pipeline library tests
They are fixed in CTS 1.3.5.0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21689>
2023-03-06 08:53:30 +00:00
Mike Blumenkrantz
0d8a54f913 zink: avoid ballooning of copy box tracking
* if the proposed box is smaller than an existing box then don't add it,
* if the proposed box is adjacent to an existing box, expand
* if the proposed box is larger than an existing box, replace

this reduces the chances of having a ton of copy boxes to iterate over

also add a perf warning in case a ton of copy boxes exist

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21665>
2023-03-06 03:47:06 +00:00
Mike Blumenkrantz
d2de2bb9c5 util/box: fix off-by-one calc error in intersection funcs
the "right-most" boundary needs the -1 since it isn't inclusive

oops

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21665>
2023-03-06 03:47:06 +00:00
Mike Blumenkrantz
3c0fad058a zink: eliminate internal qbo copy barrier
the values written here will never overlap, so no barrier is necessary

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21581>
2023-03-06 02:22:39 +00:00
Mike Blumenkrantz
b31c414e28 zink: set predicate_dirty on query creation
ensure this is set when it needs to be

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21581>
2023-03-06 02:22:39 +00:00
Mike Blumenkrantz
5374605ea9 zink: merge qbo update copies when possible
if a single query is being started and stopped frequently, update
the internal qbo with a single copy call instead of one copy per result

not actually that useful in practice because of how query pools are shared,
but could help somewhere in theory

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21581>
2023-03-06 02:22:39 +00:00
Mike Blumenkrantz
7f956435a0 zink: rework xfb queries for drivers with poor primgen support
for drivers lacking one of:
* EXT_color_write_enable
* primitivesGeneratedQueryWithRasterizerDiscard

terrible things must happen. specifically, dummy surfaces have to
be used in a framebuffer with rast-discard enabled for the duration
of the query

now that queries are only started/stopped in renderpasses, however,
there are new hurdles. with tc renderpass optimizing, queries can be
started outside the renderpass, which would trigger recursion when
trying to start a primgen query outside the renderpass if any clears
are enabled, as those must be flushed onto the real surfaces

to solve all of this:
* block tc renderpass optimizing if at least one of the above features is missing
* detect a pending primgen query start during renderpass start
* activate rast-discard and set dummy surfaces before beginning renderpass
  * this recurses and automatically flushes clears
* finally, start the real renderpass

BUT WAIT THERE'S MORE!

because there's also drivers that support EXT_color_write_enable and don't support
primitivesGeneratedQueryWithRasterizerDiscard, which means they do need rast-discard,
but they don't need dummy surfaces, and so the clears still have to be flushed,
so they need an explicit (recursive) renderpass start/stop in advance to
ensure the clears are applied as expected

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21628>
2023-03-06 02:00:06 +00:00
Mike Blumenkrantz
5144c8a858 zink: track whether a primgen query is suspended and needing color write hacks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21628>
2023-03-06 02:00:06 +00:00
Mike Blumenkrantz
9bc871199c zink: only resume queries inside renderpasses from set_active_query_state
match new default query behavior

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21628>
2023-03-06 02:00:06 +00:00
Mike Blumenkrantz
81de7a1c25 zink: resume queries after conditional render and clears are processed
this should have no functional effect other than ensuring primgen queries
don't recurse when detecting clears

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21628>
2023-03-06 02:00:06 +00:00
Mike Blumenkrantz
f7d1fff23f zink: disable queries for clear_texture()
this otherwise can do weird things

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21628>
2023-03-06 02:00:06 +00:00
Friedrich Vock
f5061758be radv: Use LDS for closest-hit hit attributes
Q2RTX: 23.1ms -> 22.9ms

shader-db:
Totals from 19 (0.69% of 2764) affected shaders:

MaxWaves: 197 -> 208 (+5.58%)
Instrs: 87702 -> 87817 (+0.13%); split: -0.03%, +0.16%
CodeSize: 474320 -> 475128 (+0.17%)
VGPRs: 1840 -> 1728 (-6.09%)
Latency: 2771599 -> 2773173 (+0.06%); split: -0.13%, +0.18%
InvThroughput: 561281 -> 533010 (-5.04%); split: -5.16%, +0.12%
VClause: 2782 -> 2788 (+0.22%); split: -0.18%, +0.40%
Copies: 12115 -> 12136 (+0.17%); split: -0.45%, +0.63%
Branches: 4116 -> 4122 (+0.15%)
PreVGPRs: 1665 -> 1638 (-1.62%); split: -1.92%, +0.30%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21635>
2023-03-05 21:53:34 +00:00
Friedrich Vock
c1651a1032 radv: Extend hit attribute lowering for LDS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21635>
2023-03-05 21:53:34 +00:00
Alyssa Rosenzweig
61663859bc asahi: Wire up compute kernels
Now that we have multiple sysval tables, implementing compute kernels --
including with indirect dispatch and load_num_workgroups -- is straightforward.
This patch adds the straightforward launch_grid implementation.

As usual needs UAPI support patches to actually do anything, but the relevant
compute tests are passing downstream.

It's not possible to properly test compute shaders support right now (pending
support for images), so we don't update the CAPs or features.txt here. This is
more about flushing out the piles of downstream patches we have (and getting
reviewed!) in preparation for cutting a downstream release soon.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21703>
2023-03-05 19:40:43 +00:00
Alyssa Rosenzweig
c086f2770b asahi: Rework system value lowering
The previous lowering was insufficient in two areas:

* No support for indirection. This is required for dynamically indexing into
  UBOs, SSBOS, etc in OpenGL ES 3.2

* Only a single table supported. Multiple tables are required to implement
  indirect dispatch/draws efficiently, in order to bind the indirect buffer as
  uniforms.

The first problem is addressed here by reworking the lowering of
system values to happen in NIR, decoupled from the uniform register assignment
details, such that we can handle 1:n lowerings in a straightforward way.
Namely, indirect sysvals are lowered to indirect memory loads relative to the
base address of the sysval table, where the table address is itself pushed as a
(direct) sysval.

The second problem is addressed in this patch by generalizing to multiple
uniform tables.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21703>
2023-03-05 19:40:43 +00:00
Alyssa Rosenzweig
f92738eaaa agx: Handle fragment shader side effects
Fragment shaders with side effects need to be lowered to ensure they execute for
all shaded pixels but no helper threads. Add a lowering pass to handle this.

Fixes dEQP-GLES31.functional.shaders.opaque_type_indexing.atomic_counter.const_literal_fragment

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21712>
2023-03-05 19:12:35 +00:00
Alyssa Rosenzweig
290f3b76f3 agx: Disable tri merging with side effects
As Metal does.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21712>
2023-03-05 19:12:35 +00:00
David Heidelberg
b20c9adb4e crocus/meson: add dependency on libintel_dev also for versioned static libraries
Fixes: a0fa31bcdd ("intel/dev: create a helper dependency for libintel_dev")

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21709>
2023-03-05 18:44:54 +00:00
Rob Clark
8e7511ea7f vk/runtime: Use libdrm shim
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21636>
2023-03-05 16:31:51 +00:00
Rob Clark
44f7ec40ef loader: Use libdrm shim
Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21636>
2023-03-05 16:31:51 +00:00
Rob Clark
5f5ccf4bec turnip: Use libdrm shim
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21636>
2023-03-05 16:31:51 +00:00
Rob Clark
e05abb1345 util: Add a simple no-op libdrm shim
Make it easier to deal with build configs that do not have libdrm.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21636>
2023-03-05 16:31:51 +00:00
David Heidelberg
b73b701579 ci/freedreno: rare flake KHR-GL45.sample_variables.mask.rgba8i.samples_4.mask_3
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21718>
2023-03-05 14:34:33 +00:00
David Heidelberg
5ee724e180 ci/lavapipe: add recent occasional flake
Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8441

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21717>
2023-03-05 14:35:45 +01:00
Gert Wollny
9b09f244f0 r600/sfn: Fix atomic lowering
Fixes: 56dedf052f
  r600/sfn: add r600 specific lowering pass for atomics and use it

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21684>
2023-03-05 09:54:08 +00:00
Gert Wollny
3c3ecdab36 r600/sfn/tests: Add a test for the copy prop into a group
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21684>
2023-03-05 09:54:08 +00:00
Gert Wollny
244cc152d1 r600/sfn: redirect copy propagation to alu parent group
If an ALU instruction was emitted from the get-go as group, then
we have to make sure that replacing a source doesn't violate the
readport configuration in the group.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8374

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21684>
2023-03-05 09:54:08 +00:00
Gert Wollny
2028465bd8 r600/sfn: Add print method to AluReadportValidation
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21684>
2023-03-05 09:54:08 +00:00
Gert Wollny
ee0010213f r600/sfn: Add method to AluGroup to replace sources
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8374

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21684>
2023-03-05 09:54:08 +00:00
Gert Wollny
6180721005 r600/sfn: Split AluInstr replace_source into test and actual replace
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8374

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21684>
2023-03-05 09:54:08 +00:00
Gert Wollny
afa545b926 r600/sfn: Add AluGroup method to update readport validation from scratch
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8374

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21684>
2023-03-05 09:54:08 +00:00
Alyssa Rosenzweig
ed587ae6ac asahi/meta: Use lowered I/O
No point in creating a variable when we can just synthesize the store_output
directly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
2023-03-05 09:27:02 +00:00
Alyssa Rosenzweig
485eddcc85 asahi: Bump shader buffers
No reason to limit it, it's direct access anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
2023-03-05 09:27:02 +00:00
Alyssa Rosenzweig
c7b5f01461 agx: Only lower int64 late
This is required for address arithmetic to be lowered properly for compute
kernels, which may have u2u64 in the source NIR.

No shader-db changes (for GLES3.0).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
2023-03-05 09:27:02 +00:00
Alyssa Rosenzweig
811f8b899d agx: Don't print pre-optimization shader
It's usually too noisy to be useful, especially before DCE. The optimized (but
pre-RA) shader is usually the useful bit.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
2023-03-05 09:27:02 +00:00
Alyssa Rosenzweig
ea37d7f81f agx: Use agx_emit_collect for st_tile
Instead of open coding.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
2023-03-05 09:27:02 +00:00
Alyssa Rosenzweig
7bb8112fd1 agx: Refactor vector creation
agx_vec4 is unused, drop in, and split out the common logic since we'll use it
in a new helper.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
2023-03-05 09:27:02 +00:00
Alyssa Rosenzweig
037609f1dc agx: Constify agx_print
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
2023-03-05 09:27:02 +00:00
Alyssa Rosenzweig
a9c5956f2f agx: Inline 16-bit load/store offsets
Most integer immediates are only 8-bit, but load/store instructions allow their
immediate offsets to be 16-bit instead. Take advantage of this in the optimizer.
This eliminates 36% of the instructions in
dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.36, a fitting
percentage.

Insignificant effect on dEQP-GLES31.functional.ssbo.* performance... Only a
small % of our compile-time pie is actually spent in the backend anyway (as
opposed to NIR passes or GLSL IR).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
2023-03-05 09:27:02 +00:00
Alyssa Rosenzweig
c9728b41d5 agx: Factor out allows_16bit_immediate check
The optimizer needs this information to inline immediates effectively.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
2023-03-05 09:27:02 +00:00
Alyssa Rosenzweig
445ca949cd agx: Clean up after lowering address arithmetic
This avoids creating silly preambles that don't actually do anything except push
a constant that we could've inlined for cheaper anyway, since nir_opt_preamble's
cost model is sensitive to e.g. constant folding.

This avoids a pointless preamble in split-hell.

As a nice bonus, this also improves compile-time on address-heavy shaders. With
a release build, CPU time in dEQP-GLES31.functional.ssbo.* reduces from 12.87s
to 10.77... a 16% improvement is nothing to sneeze at.

shader-db results are mostly noise.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
2023-03-05 09:27:02 +00:00
Alyssa Rosenzweig
4b1f4b86ea agx: Add AGX_MESA_DEBUG=nopreamble option
Useful both for ruling out issues with shader preambles as well as (in some
cases) making for a nicer reading experience of the compiled assembly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21430>
2023-03-05 09:27:02 +00:00
Alyssa Rosenzweig
c22a18c9af agx: Don't write sample mask from preambles
It doesn't make sense, they're basically little compute kernel environments.
Noticed while debugging dEQP-GLES31.functional.fbo.no_attachments.multisample.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21710>
2023-03-05 08:20:09 +00:00
Alyssa Rosenzweig
e9f7d14de6 asahi: Mark PIPE_FORMAT_NONE "supported"
Kinda silly but fixes
dEQP-GLES31.functional.state_query.integer.max_framebuffer_samples_* which
queries the number of samples of a NONE format, required for
ARB_framebuffer_no_attachments to make sense.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21710>
2023-03-05 08:20:09 +00:00
Alyssa Rosenzweig
8bb40ce4ad agx: Fix 2D MSAA array texture register allocation
Sample index and layer index are both 16-bits, even though they are zero
extended for compiler simplicity in some cases. In particular this means that 2D
MSAA arrays consume 6 half-regs for their coordinates, not 8. This is what the
IR translation (actually agx_nir_lower_texture) produces, we just need to fix
the calculation in agx_read_registers to agree.

Fixes validation failure in tests like
dEQP-GLES31.functional.texture.multisample.samples_4.use_texture_color_2d_array

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21708>
2023-03-05 08:06:43 +00:00
Alyssa Rosenzweig
3032e3ad23 agx: Mask shifts in the backend
This gives our shifts SM5 behaviour at the cost of a little extra ALU. That way,
we match NIR's shifts.

This fixes unsoundness of GLSL expressions like "a << (b & 31)", where the &
would mistakenly get optimized away.

Closes: #8181
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reported-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21673>
2023-03-05 07:52:22 +00:00
Alyssa Rosenzweig
f4e2b22646 asahi: Advertise dual-source blending
This is handled entirely in common code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21545>
2023-03-05 07:38:36 +00:00
Yogesh Mohan Marimuthu
af953616a1 wsi/display: check alloc failure in wsi_display_alloc_connector()
vulkancts test dEQP-VK.wsi.direct_drm.surface.create_simulate_oom is failing
because in wsi_display_alloc_connector() function memory allocation for
connector is not checked for return NULL. create_simulate_oom test simulates
out of memory, hence memory allocation fails for connector and later when
tried to dereference connector program will segfault.

This patch fixes the dEQP-VK.wsi.direct_drm.surface.create_simulate_oom test
segfault issue by checking if connector is NULL afer memory allocation.

Cc: mesa-stable
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21701>
2023-03-04 21:20:54 +00:00
Rob Clark
82cc236458 freedreno/a6xx: Fix mirror x/y blits
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21706>
2023-03-04 19:13:40 +00:00
Rob Clark
ec9e03fb39 freedreno/a6xx: Convert blitter to OUT_REG()
We'll need this to add a7xx support, since some of the regs are
different btwn a6xx and a7xx and reg variants are not supported with
the legacy reg builders.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21706>
2023-03-04 19:13:40 +00:00
Rob Clark
149f2a2e81 freedreno/a6xx: Namespace reg/pkt packer vars
Otherwise they could conflict with parameters to the reg/pkt.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21706>
2023-03-04 19:13:40 +00:00
Alyssa Rosenzweig
1d2c1b8bd6 pan/mdg: Use nir_lower_helper_writes
It's now in common code, drop our (buggier) copy.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21413>
2023-03-04 13:31:05 -05:00
Alyssa Rosenzweig
586da7b329 nir: Add nir_lower_helper_writes pass
This NIR pass lowers stores in fragment shaders to:

   if (!gl_HelperInvocaton) {
      store();
   }

This implements the API requirement that helper invocations do not have visible
side effects, and the lowering is required on any hardware that cannot directly
mask helper invocation's side effects. The pass was originally written for
Midgard (which has this issue) but is also needed for Asahi. Let's share the
code, and fix it while we're at it.

Changes from the Midgard pass:

1. Add an option to only lower atomics.

   AGX hardware can mask helper invocations for "plain" stores but not for
   atomics.  Accordingly, the AGX compiler wants this lowering for atomics but
   not store_global. By contrast, Midgard cannot mask any stores and needs the
   lowering for all store intrinsics. Add an option to the common pass to
   accommodate both cases.

   This is an optimization for AGX. It is not required for correctness, this
   lowering is always legal.

2. Fix dominance issues.

   It's invalid to have NIR like

      if ... {
         ssa_1 = ...
      }

      foo ssa_1

   Instead we need to rewrite as

      if ... {
         ssa_1 = ...
      } else {
         ssa_2 = undef
      }
      ssa_3 = phi ssa_1, ssa_2

      foo ssa_3

   By default, neither nir_validate nor the backends check this, so this doesn't
   currently fix a (known) real bug. But it's still invalid and fails validation
   with NIR_DEBUG=validate_ssa_dominance.

   Fix this in lower_helper_writes for intrinsics that return data (atomics).

3. Assert that the pass is run only for fragment shaders. This encourages
   backends to be judicious about which passes they call instead of just
   throwing everything in a giant lower everything spaghetti.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21413>
2023-03-04 13:31:05 -05:00
Asahi Lina
1dd872ec17 asahi: Assert on TIB strides > 64
These just don't seem to work. macOS falls back to eMRT here...

dEQP-GLES3.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.13
from Fail -> Crash. Proper solution will come when we implement eMRT later on.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21705>
2023-03-04 10:58:10 -05:00
Rhys Perry
aa32dc704f nir/range_analysis: fix vectorized phis and intrinsics
Found by inspection.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21288>
2023-03-04 12:58:38 +00:00
Eric Engestrom
a19a37e8d7 vk: be stricter about symbols check between android and other platforms
Don't allow HMI on non-Android, don't allow non-HMI on Android, and
don't allow missing HMI on Android.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21631>
2023-03-04 07:41:10 +00:00
Eric Engestrom
2a6fbc4bb2 android/vk: drop unnecessary symbols
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21631>
2023-03-04 07:41:10 +00:00
Eric Engestrom
4e1eb53b5e vn: add linker script to fix android symbols
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21631>
2023-03-04 07:41:10 +00:00
Eric Engestrom
2b1e9b0fd6 anv: add linker script to fix android symbols
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21631>
2023-03-04 07:41:10 +00:00
Eric Engestrom
6f654d532b tu: add linker script to fix android symbols
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21631>
2023-03-04 07:41:10 +00:00
Eric Engestrom
c4e2400461 v3dv: add linker script to fix android symbols
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21631>
2023-03-04 07:41:10 +00:00
Eric Engestrom
78578a6ddb vk: move radv's linker symbols scripts for use in all drivers
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21631>
2023-03-04 07:41:10 +00:00
Lionel Landwerlin
938f7a48b2 anv: VK_EXT_image_sliced_view_of_3d
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21376>
2023-03-04 06:12:46 +00:00
Faith Ekstrand
7e1b62ea5b isl: Set Depth to array len for 3D storage images
This is necessary for RESINFO to work properly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21376>
2023-03-04 06:12:46 +00:00
Faith Ekstrand
74e6e207fe intel/blorp: Set array_len for 3D images properly
We need to minify the depth so we don't set a size that's out-of-bounds.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21376>
2023-03-04 06:12:46 +00:00
Lionel Landwerlin
4ee1908ab6 vulkan/runtime: only consider slice info with 3D image views
Because we can have 2D views of 3D images, we want to consider the
slice info only with 3D *image views*.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 66e3ccbcac ("vulkan/runtime: store parameters of VK_EXT_sliced_view_of_3d")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21376>
2023-03-04 06:12:46 +00:00
Faith Ekstrand
3384e4f768 vulkan/runtime: Rename and document storage image Z range
This makes it more clear that the fields specifically apply to the Z
range and aren't array slices.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21376>
2023-03-04 06:12:46 +00:00
Juston Li
464cae9497 venus: shader cache fossilize replay fix
venus utilizes the host side shader cache.

This is a WA to generate shader cache files containing headers with
a unique cache id that will change based on host driver identifiers.
This allows fossilize replay to detect if the host side shader cache
is no longer up to date.
The shader cache is destroyed after creating the necessary files and
not utilized by venus.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21664>
2023-03-04 05:56:04 +00:00
David Heidelberg
60ae5b106f ci/zink: add skip for the Single-GL46.enhanced_layouts.ssb_member_align_non_power_of_2
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21668>
2023-03-04 04:02:03 +00:00
Sil Vilerino
fb82371558 d3d12: VP9 Decode - Fix use_prev_in_find_mvs_refs calculation
Fixes: c8e8ce83 ("d3d12: Add VP9 Decode support")

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21694>
2023-03-04 03:22:48 +00:00