Commit Graph

159418 Commits

Author SHA1 Message Date
Alyssa Rosenzweig 9542f95864 asahi: Trim garbage at end of set shader
Unfortunately the actual size of this data structure is unclear.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig 279eaec278 asahi: Use util_blitter_clear
To avoid flush, use util_blitter_clear to clear with rectangles when
there is already content in the scene. This ~doubles the performance of
Inochi2D, which does frequent stencil clears in the middle of the screen
to implement masking.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig fb7860ed24 asahi: Handle empty fragment shaders
When an empty fragment shader is used with Metal, the stop command is
still included but this special bit is set, suppressing tilebuffer
access. Failing to do so but using empty shaders for u_blitter depth
clears causes Glitch Lina:

   https://twitter.com/LinaAsahi/status/1537869064793575424

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig f8799c97b2 asahi: Export agx_blitter_save
So we can use it for clears.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig 6b329b16f8 asahi: Make ctx->zs a pointer
When we save ZSA state with u_blitter, u_blitter just records the
pointer for the state. It doesn't copy it. That requires an extra
indirection on the context (as other drivers do) to fix restores of ZSA
state with u_blitter.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig 968bbca578 asahi: Note some more unknowns in the XML
Lot of r/e waiting here...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig 47831969c8 asahi: Split up unk 2b
Seems to be flags.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig 5f57fe0bc9 asahi: Fix Indexed Draw command
Add the missing stub in the decoder for it, so we can decode indexed
draws instead of reading back garbage, and fill in some known unknowns
in the structure.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig 10c9aceadf agx: Plumb through nir_op_txf
nir_op_txf maps to AGX's texture_load, which is encoded like
texture_sample. The one outstanding question with this commit is the
rules for the sample required ... in NIR and APIs (including Metal), txf
is samplerless, but the AGX instruction consumes a sampler. Hopefully
any sampler will do, though?

Passes dEQP-GLES3.functional.shaders.texture_functions.texelfetch.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig 44d79d39b6 agx: Defeature indirect vbufs
vb_mask can include garbage vbufs, we can't rely on it. This will
prevent a regression when switching to u_blitter based clears. This is
also simpler and shrinks the VS shader key so all in all a good thing.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig 0fccd564b6 agx: Don't hardcode uniform enums
Let the compiler number them for us, the numbers are meaningless.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig 18bb64fd3a agx: Add more unit tests for float copyprop
Would have caught the bug fixed by the previous commit.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig 095415cdf7 agx: Fix float copyprop of neg(neg) case
They should cancel each other. Fixes:

   dEQP-GLES2.functional.shaders.random.basic_expression.combined.0

Fixes: 28801b4849 ("agx: Add forward optimizing pass for fmov")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
Alyssa Rosenzweig 9645e46a53 agx: Fix tib access in internal shaders
The only case where tilebuffer access can be specially optimized is the
st_tile used in internal clear (or reload) shaders. However, other
shaders (like those used with u_blitter) may have nir->info.internal
set, so we can't key off that. Instead, add a special key for this
optimization to ensure correctness with other internal shaders.

Fixes flaky tests in dEQP-GLES2.functional.color_clear.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
2022-09-04 18:05:31 +00:00
David Heidelberg a03ce740bb ci: set venus on lavapipe to manual due to flakes
Flakes too often, see https://gitlab.freedesktop.org/mesa/mesa/-/issues/7093

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18405>
2022-09-03 22:27:51 +02:00
Christian Gmeiner 912d0383b4 isaspec: Move isa_decode(..) declaration
The implementation of isa_decode(..) is already part of isaspec. So lets
move the function declaration and some related structs to a src/isaspec.

Also make the header C++ safe.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18403>
2022-09-03 19:26:04 +00:00
Matt Coster c0b891ecca util: Include stddef.h in util/macros.h
This is required for offsetof, used by the container_of macro.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18368>
2022-09-03 17:09:37 +00:00
Thomas H.P. Andersen 714ac455e2 ci: remove missing-braces from no-error
The last warnings for missing-braces were fixed in !18307

Remove it from the no-error list on the clang build to catch regressions

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18404>
2022-09-03 13:58:19 +02:00
Jason Ekstrand 6ffbb1abdb vulkan: Dirty VP_VIEWPORTS/SCISSORS when copying viewports/scissors
The only reason why we didn't notice before is because ANV always
re-emits all scissors and viewports if the count changes.

Fixes: fcedb1250b ("vulkan: Add a common data structure for dynamic states")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18160>
2022-09-03 05:41:50 +00:00
Mihai Preda 136a26f271 gallivm: fixes for LLVM-15 opaque pointers in lp_bld_format_soa.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
2022-09-03 03:31:34 +00:00
Mihai Preda 4ff7e64e81 gallivm: fixes for LLVM-15 opaque pointers in lp_bld_struct.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
2022-09-03 03:31:34 +00:00
Mihai Preda 02b9a8ba12 gallivm: fixes for LLVM-15 opaque pointers in lp_bld_format_s3tc.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
2022-09-03 03:31:34 +00:00
Mihai Preda 1b8c4931df gallivm: fixes for LLVM-15 opaque pointers in lp_bld_jit_types.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
2022-09-03 03:31:34 +00:00
Mihai Preda f30251ef9b gallivm: fixes for LLVM-15 opaque pointers in lp_bld_nir_soa.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
2022-09-03 03:31:34 +00:00
Mihai Preda 8289ac87a4 gallivm: fixes for LLVM-15 opaque pointers in lp_bld_nir_aos.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
2022-09-03 03:31:34 +00:00
Mihai Preda 49c6e2fd70 gallium: drop unused macros in draw_llvm.h
The reason is that these macros use lp_build_struct_get(), which is
being replaced by lp_build_structure_get2() which takes the explicit
pointer type. Rather than attempt to update these unused macros, simply drop
them.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
2022-09-03 03:31:34 +00:00
Mihai Preda 3668ebf8bd gallivm: drop unused "emit_load" in lp_llvm_buffer_member()
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
2022-09-03 03:31:34 +00:00
Mihai Preda adf2895516 gallivm: LLVM-15 opaque pointers: disable LLVMGetElementType(ptr_type)
with opaque pointers, we can't query the element type of a pointer type

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
2022-09-03 03:31:34 +00:00
Roland Scheidegger 08615f2807 llvmpipe: fix front/back face system value in the fs
draw needs to inject the face information for tris in line/point fill
mode since llvmpipe only sees lines and points. But for the new style
face information (which is a system value and not an ordinary input
register) we forgot to tell draw.

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18285>
2022-09-03 03:36:25 +02:00
Lionel Landwerlin 723ae2368f vulkan: fixup 1.3.226 update
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18397>
2022-09-02 23:45:21 +00:00
Lionel Landwerlin 7e282694ed anv: remove non present field in upstream spec
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18397>
2022-09-02 23:45:21 +00:00
Dawn Han 2a2766ce18 Enable .VALVE_mutable_descriptor_type in physical_device
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17505>
2022-09-02 21:15:43 +00:00
Dawn Han de5879447b Track bitset when create descriptor pool
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17505>
2022-09-02 21:15:43 +00:00
Dawn Han d5f116feb5 Update bitset when init descriptor layout.
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17505>
2022-09-02 21:15:43 +00:00
Dawn Han 7039467522 Increase enum type in vn_descriptor_set.
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17505>
2022-09-02 21:15:43 +00:00
David Heidelberg 250c684750 ci: uprev piglit 2022-08-30
Acked-by: Juan A. Suarez <jasuarez@igalia.com>  # for broadcom
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>  # for zink
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18318>
2022-09-02 20:15:28 +00:00
Chia-I Wu c93173fcec util/perf: use ALWAYS_INLINE for tracepoints
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18309>
2022-09-02 19:46:50 +00:00
Chia-I Wu 4d747d5690 util/perf: simplify u_trace_instrument
When ut_perfetto_enabled changes, update _u_trace_instrument as well.
This allows u_trace_instrument to check just a single variable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18309>
2022-09-02 19:46:50 +00:00
Chia-I Wu 18d7cb4abb util/perf: add u_trace_instrument
It is called from tracepoints.  When it returns false, instrumentation
is disabled.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18309>
2022-09-02 19:46:50 +00:00
Chia-I Wu aeb2c5a8da util/perf: remove u_trace::enabled
We can set ut_trace_instrument when either GPU_TRACE or
GPU_TRACE_INSTRUMENT is set.  This results in one less variable to check
in tracepoints.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18309>
2022-09-02 19:46:50 +00:00
Chia-I Wu 8d8d4347e3 util/perf: ignore ut->enabled for iterators
With perfetto, instrumentation can be enabled in the middle of cmd
buffer recording even when ut->enabled is false.  It might be better to
be consistent and ignore ut->enabled for iterators.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18309>
2022-09-02 19:46:50 +00:00
Mike Blumenkrantz 8b15025a2b mesa: add GLSL_SOURCE
many times I just want to dump glsl and not a trillion lines of IR

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18280>
2022-09-02 19:15:44 +00:00
Marcin Ślusarz 9701b9098f anv: enable EXT_mesh_shader
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18371>
2022-09-02 17:40:47 +00:00
Marcin Ślusarz d5dedecfe7 anv: implement draw calls for EXT_mesh_shader
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18371>
2022-09-02 17:40:47 +00:00
Marcin Ślusarz 637063ffc6 anv: implement EXT_mesh_shader
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18371>
2022-09-02 17:40:47 +00:00
Marcin Ślusarz b3354afd89 anv: replace VK_SHADER_STAGE_[TASK|MESH]_BIT_NV with VK_SHADER_STAGE_[TASK|MESH]_BIT_EXT
They have the same numerical values, so nothing changes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18371>
2022-09-02 17:40:47 +00:00
Marcin Ślusarz 9cefaa9b6d anv: check EXT_mesh_shader whenever NV_mesh_shader is checked
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18371>
2022-09-02 17:40:47 +00:00
Marcin Ślusarz 2e1b96bb1b intel/compiler: implement EXT_mesh_shader
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18371>
2022-09-02 17:40:47 +00:00
Emma Anholt 3ef13ef234 turnip: Treating non-d/s-write pipelines as not having d/s feedback loops.
A subpass in gfxbench has the depth buffer present, but not written to,
for a render pass using the depth buffer as an input attachment.  We can
skip single-prim-mode and the associated "oh no don't use sysmem" in that
case.

Improves gfxbench vk-5-normal perf by 1.56193% +/- 0.0743035% (n=14).
Part of #6327.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18241>
2022-09-02 16:47:02 +00:00
Marcin Ślusarz 14911e8f83 spirv, compiler: add "bool nv" to shader_info.mesh
Not knowing whether we deal with the NV or EXT extension
makes implementation difficult for Intel HW.
NV support will be dropped at some point, so
this ugliness will go away eventually.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18366>
2022-09-02 16:18:33 +00:00