Commit graph

161852 commits

Author SHA1 Message Date
Gert Wollny
7b4bf219cc r600: Account for color and clipvertex when evaluating LDS space
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6926

Fixes: 3340c7ce35
   r600/sfn: lower CLIPVERTEX to clip planes

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
2022-10-26 06:57:11 +00:00
Gert Wollny
d380551544 r600/sfn: elimiate dead registers too
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
2022-10-26 06:57:11 +00:00
Gert Wollny
952b385b96 r600/sfn: Increase scheduling priority on uniform reads and non-ssa writes
* Non-ssa values are pre-allocated, so assigning values to these is
  unlikely to increase register pressure.

* Uniforms are often used early in the shader to evaluate dependend
  values so, don't penalize their scheduling priority like literal

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
2022-10-26 06:57:11 +00:00
Gert Wollny
a73b51c187 r600/sfn: improve scheduling of tex sources
Let tex sources switch the channel to unused channels.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
2022-10-26 06:57:11 +00:00
Gert Wollny
8f7100e48f r600/sfn: Trigger TEX CF based on max TEX CF size
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
2022-10-26 06:57:11 +00:00
Gert Wollny
4189ea373a r600/sfn: Allow copy-prop of group dest into origin
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
2022-10-26 06:57:11 +00:00
Gert Wollny
5ab6ebefa4 r600/sfn: Add test for channel changes in TEX source from opt
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
2022-10-26 06:57:11 +00:00
Gert Wollny
23c7e4d590 r600: Fix printing t-channel in diss-assambly
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
2022-10-26 06:57:11 +00:00
Gert Wollny
7bd1084ef5 r600/sfn: Handle nir_op_seq and nir_op_sne
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
2022-10-26 06:57:11 +00:00
Gert Wollny
e8e420568d r600/sfn: Unify the handling of resource IDs in instruction
Fetch, GDS, Texture, and RAT instructions all use resources
with a possible offset defined by the index register. Unify
the handling of resource ID and the offset register for these
instruction types.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19300>
2022-10-26 06:57:11 +00:00
Vinson Lee
da1477a934 v3d: Fix initializer-overrides warning.
../src/gallium/drivers/v3d/v3d_screen.c:733:27: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
        .lower_mul_high = true,
                          ^~~~
/usr/lib/llvm-14/lib/clang/14.0.0/include/stdbool.h:16:14: note: expanded from macro 'true'
             ^
../src/gallium/drivers/v3d/v3d_screen.c:726:27: note: previous initialization is here
        .lower_mul_high = true,
                          ^~~~
/usr/lib/llvm-14/lib/clang/14.0.0/include/stdbool.h:16:14: note: expanded from macro 'true'
             ^

Fixes: 73e8fc3efb ("broadcom/compiler: don't use imprecise_32bit_lowering for idiv lowering")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19262>
2022-10-26 04:37:39 +00:00
Yonggang Luo
61342ea1a5 xlib: Remove the usage of global constructor in xlib.c, so the xm_public.h are removed
The usage of global constructor should be limited, only in absolutely needed case.
The call style of xlib_create_screen referenced to osmesa_create_screen

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19258>
2022-10-26 02:16:35 +00:00
Yonggang Luo
4117710ec1 xlib: Getting xmesa_strict_invalidate to be function
So that doesn't be called in global constructor

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19258>
2022-10-26 02:16:35 +00:00
Yonggang Luo
adcdfe66fc ci: Getting debian-clang-release to building with glx=xlib
Because this is just building, didn't not used by CTS runner,
So enable glx=xlib in this build variant

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19258>
2022-10-26 02:16:35 +00:00
Yonggang Luo
64f848b048 ci/macOS: Getting the installed binary to be artifacts
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19258>
2022-10-26 02:16:35 +00:00
Yonggang Luo
9a6777c7ab xlib: Indent with space and trim trailing spaces of xlib files
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Ack-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19258>
2022-10-26 02:16:35 +00:00
Yonggang Luo
b7d25dca98 gallium: Remove mgl* prefix in linker script osmesa.sym and libgl-xlib.sym
Seeing no mgl prefixed function in codebase, so removed it

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Ack-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19258>
2022-10-26 02:16:35 +00:00
Yonggang Luo
882400b1f4 xlib: Remove the linkage hack in lib.c by use meson link_whole option
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Ack-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19258>
2022-10-26 02:16:35 +00:00
Yonggang Luo
1cf6b4f205 xlib: Fixes compiling on linux
configure command line:
meson ../.. -Dglx=xlib -Dosmesa=true

link error:
virgl_screen.c.o: in function `virgl_is_video_format_supported':
/mnt/c/work/xemu/mesa/build/windows-wsl2/../../src/gallium/drivers/virgl/virgl_screen.c:885: undefined reference to `vl_video_buffer_is_format_supported'

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

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Ack-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19258>
2022-10-26 02:16:35 +00:00
Alyssa Rosenzweig
4b49241f7d panfrost: Use proper formats for pntc varying
The formats of special attributes are supposed to match their architectural
definitions, and point coordinates are architecturally defined as RGBA32F. In
practice this doesn't seem to fix anything.

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19237>
2022-10-26 01:56:08 +00:00
Alyssa Rosenzweig
21a4dbb720 panfrost: Don't use lower_wpos_pntc on Midgard
gl_PointCoord is implemented via a special attribute descriptor on Midgard. This
descriptor has an orientation bit, the orientation is driver-controlled. That
means we can map rast->sprite_coord_mode to this bit, rather than lowering in
the shader.

This is a bug fix for point sprites, which are implemented natively on Midgard
for dubious reasons and need to be flipped this way. It is also an optimization
for apps reading gl_PointCoord, removing the extra arithmetic to flip, although
the value of this is somewhat dubious.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19237>
2022-10-26 01:56:08 +00:00
Emma Anholt
8901787bad ci/freedreno: Update known flakes/timeouts.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19304>
2022-10-25 23:55:43 +00:00
Emma Anholt
4fc7c4d6b2 ci/freedreno: Update CivV trace expectation.
Rendered scene still looks good, just a few pixels changed a bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19304>
2022-10-25 23:55:43 +00:00
Karol Herbst
d28d1ead9c aux/trace: add set_global_binding
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19214>
2022-10-25 23:32:58 +00:00
Mike Blumenkrantz
6d2a0b3b8d zink: elide a buffer samplerview update conditional
this is really part of the previous conditional blocks

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19306>
2022-10-25 22:40:43 +00:00
Mike Blumenkrantz
17f9a3830c zink: rescope/simplify some push descriptor code
this is only used in the push descriptor block, so move it there and
simplify redundant cases

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19306>
2022-10-25 22:40:43 +00:00
Mike Blumenkrantz
cec19b58d5 zink: flag push state changed in batch changed conditional
this will matter after future refactoring

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19306>
2022-10-25 22:40:43 +00:00
Mike Blumenkrantz
2b40170d63 zink: split out uniform decriptor bindings in shader data
this is both more usable and fixes some descriptor util functionality

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19306>
2022-10-25 22:40:43 +00:00
Mike Blumenkrantz
9b420f7704 zink: simplify some program descriptor helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19306>
2022-10-25 22:40:43 +00:00
Karol Herbst
3128a8cada zink: fix spirv_builder_spec_const_uint
We need to create the type upfront otherwise the spir-v binary gets
corrupted.

Fixes: c305a2c962 ("zink: move spec constant emission to the types/consts block")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19310>
2022-10-26 00:02:37 +02:00
Danylo Piliaiev
0c4676a3aa freedreno: Add 'replay' tool which allows to replay cmdstreams
Replay command stream obtained from:
- /sys/kernel/debug/dri/0/rd
- /sys/kernel/debug/dri/0/hangrd
!!! Command stream capture should be done with ALL buffers:
- echo 1 > /sys/module/msm/parameters/rd_full

Requires kernel with MSM_INFO_SET_IOVA support.

This tool is intended for reproduction of various GPU issues:
- GPU hangs, note that command stream obtained from hangrd
  may not reproduce (rarely) the hang, since the buffers are
  snapshotted at the moment of the hang and not at the start
  of the hanging command stream.
- TODO: Misrendering, would require marking framebuffer images
  at each renderpass in order to fetch and decode them.

Code from Freedreno/Turnip is not re-used here since the relevant
pieces may introduce additional allocations which cannot be allowed
during the replay.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19171>
2022-10-25 20:26:49 +00:00
Samuel Pitoiset
db573f7362 aco: add support for device clock on GFX11
According to LLVM, s_sendmsg_rtn(GET_REALTIME) should be used instead
of s_memrealtime.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19267>
2022-10-25 20:23:08 +02:00
Samuel Pitoiset
c481978ac2 aco: split the sendmsg enumeration into sendmsg_rtn
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19267>
2022-10-25 20:23:07 +02:00
Samuel Pitoiset
6630b6e2aa aco: add support for s_sendmsg_rtn_b{32,64}
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19267>
2022-10-25 20:23:05 +02:00
Samuel Pitoiset
3a3df9acda ac/llvm: add support for device clock on GFX11
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/19267>
2022-10-25 20:22:48 +02:00
Rhys Perry
1c005e72f4 ac/nir: add legacy streamout and GS copy shader helpers
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19302>
2022-10-25 17:35:08 +00:00
Rhys Perry
382831c986 radv,nir: add intrinsics for streamout and GS copy shaders
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19302>
2022-10-25 17:35:08 +00:00
Emma Anholt
1ac42912cc turnip: Enable LRZ testing (not writing) in the presence of discards.
We can LRZ test to not rasterize maybe-discarded pixels, as long as we
don't LRZ write a Z that may be discarded.  We can drop this check,
because LRZ writes are already disabled by TU_LRZ_FORCE_DISABLE_WRITE, and
tu_6_build_depth_plane_z_mode() uses has_kill to choose EARLY_LRZ_LATE_Z
(or just LATE_Z if LRZ isn't enabled).

gfxbench aztec ruins:    +7.93104% +/- 0.117845% (n=4)
ANGLE trex_200:          +11.7208% +/- 0.476166% (n=3)
ANGLE aztec_ruins_high:  +11.9138% +/- 0.147586% (n=3)

Fixes: #6327 (now vk-5-normal is +0.712724% +/- 0.0655751% to gl-5-normal)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19286>
2022-10-25 16:55:59 +00:00
Eric Engestrom
bdfdc40a25 vc4: mark piglit copypixels-(draw-)sync as flaky
They sometimes fail when running all the tests together, but never when
running just them; not sure how to diagnose this, but for now jusk mark
them as flaky.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19295>
2022-10-25 16:24:59 +00:00
Eric Engestrom
938e13c57d vc4: send shaderdb output through KHR_debug
This allows us to see the file names for the shaders.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18599>
2022-10-25 16:07:57 +00:00
Jose Maria Casanova Crespo
cc22016d71 vc4: consolidate shader-db output
[Eric: update output string format for new shaderdb]

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18599>
2022-10-25 16:07:57 +00:00
Eric Engestrom
8ed00732cd vc4: use PIPE_MASK_RGBA name instead of its value 0xf
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18599>
2022-10-25 16:07:57 +00:00
Eric Engestrom
daaced111a vc4: pre-compile shaders to make up for the lack of draw calls in shader-db
This means we don't have the variant keys, and need to make up one
variant and pre-compile it.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18599>
2022-10-25 16:07:57 +00:00
Brian Paul
11275ce2ee llvmpipe: improve some if/switch code in llvmpipe_get_shader_param()
Move the PIPE_SHADER_CAP_PREFERRED_IR case into the switch statement.

Signed-off-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19289>
2022-10-25 15:27:13 +00:00
Brian Paul
68f507d126 llvmpipe: asst. clean-ups in lp_texture.[ch]
Signed-off-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19289>
2022-10-25 15:27:13 +00:00
Brian Paul
857cdd61e3 llvmpipe: asst. clean-ups in lp_tex_sample.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19289>
2022-10-25 15:27:13 +00:00
Brian Paul
5adb219e7c llvmpipe: asst. clean-ups in lp_test_main.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19289>
2022-10-25 15:27:13 +00:00
Brian Paul
5384293479 llvmpipe: asst. clean-ups in lp_test_format.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19289>
2022-10-25 15:27:13 +00:00
Brian Paul
03b62d81cc llvmpipe: asst. clean-ups in lp_test_conv.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19289>
2022-10-25 15:27:13 +00:00
Brian Paul
4fa266063c llvmpipe: asst. clean-ups in lp_test_blend.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19289>
2022-10-25 15:27:13 +00:00