Mike Blumenkrantz
180f0090e5
lavapipe: create a desc set for immutable sampler layouts
...
this is necessary in order to bind an all-immutable set as a buffer
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:35 +00:00
Konstantin Seurer
12a7fc51c7
lavapipe: Rework descriptor handling
...
Instead of using gallium binding slots for binding descriptors,
descriptor sets have UBOs that contain the llvmpipe descriptors.
Descriptor sets are bound by binding their UBO to the corresponding
slot.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:35 +00:00
Konstantin Seurer
9b12e0ec02
lavapipe: Make pipeline_lock generic for accessing the queue
...
Since we must not access the pipe_context concurrently, it makes sense
to add a lock for all kinds of quere related operations. This way, we
can safely create pipe resources inside Vulkan entry points that can be
used concurrently.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:35 +00:00
Konstantin Seurer
001a3769a6
lavapipe: Lower more texture OPs
...
Tries to reduce the number of textures we need to pre-compile.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:35 +00:00
Konstantin Seurer
a8adbaf965
lavapipe: Include llvmpipe
...
Will be used to initialize llvmpipe descriptors.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:35 +00:00
Konstantin Seurer
d361a0be28
llvmpipe: Disable the linear path when running vulkan
...
It doesn't implement vulkan style resources.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:35 +00:00
Konstantin Seurer
61d94f243c
gallivm: Implement vulkan images
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:35 +00:00
Konstantin Seurer
573b8f23c2
gallivm: Implement vulkan textures
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:35 +00:00
Konstantin Seurer
eb140fa936
gallivm: Implement vulkan SSBOs
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:35 +00:00
Konstantin Seurer
3f5f807125
gallivm: Implement vulkan UBOs
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:35 +00:00
Konstantin Seurer
62b4eb9d74
gallivm: Add a function for loading vulkan descriptors
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
f675e4ee82
llvmpipe: Pre compile sample functions
...
With vulkan, we can not know details about texture and sampler resources
so we pre compile all possible combinations.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
7d4135ac10
gallivm: Clamp the texel buffer size
...
Fixes arb_texture_buffer_object-texture-buffer-size-clamp.
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
1448600171
gallivm: Propagate vulkan resources
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
9aa28ae09d
gallivm: Expose lp_build_texel_type
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
7ee32d636a
llvmpipe: Add LP_TOTAL_IMAGE_OP_COUNT
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
b7e85f838a
gallivm: Expose LP_MAX_TEX_FUNC_ARGS
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
0814f54779
gallivm: Add LP_IMG_OP_COUNT
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
12bd6242e5
llvmpipe: Add lp_build_image_soa_dynamic_state
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
4654a99497
llvmpipe: Add lp_build_sampler_soa_dynamic_state
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
e1f603b092
gallivm: Expose lp_build_sample_soa_code
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
e11e8289dd
gallivm: Add lp_descriptor struct
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
0ab04247dc
gallivm: Add missing includes
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Konstantin Seurer
c2e639e74b
llvmpipe: Add BDA jit type helpers
...
lavapipe will use them to implement descriptor buffers.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:34 +00:00
Timur Kristóf
d63549a642
ac/nir/ngg: Follow tex sources when analyzing before culling.
...
Helps find more possible reusable uniforms variables.
Also prepares the code for more improvements to the analysis.
Fossil DB stats on GFX10.3:
Totals from 6745 (5.00% of 134913) affected shaders:
VGPRs: 304824 -> 304632 (-0.06%)
SpillSGPRs: 228 -> 231 (+1.32%)
CodeSize: 24975152 -> 24863684 (-0.45%); split: -0.56%, +0.11%
Instrs: 4774357 -> 4760913 (-0.28%); split: -0.42%, +0.13%
Latency: 22381084 -> 22218421 (-0.73%); split: -0.88%, +0.15%
InvThroughput: 3984765 -> 3981677 (-0.08%); split: -0.10%, +0.02%
VClause: 110036 -> 110265 (+0.21%); split: -0.67%, +0.88%
SClause: 116296 -> 104576 (-10.08%); split: -10.89%, +0.81%
Copies: 366923 -> 377370 (+2.85%); split: -0.78%, +3.63%
Branches: 119882 -> 119891 (+0.01%); split: -0.00%, +0.01%
PreSGPRs: 314591 -> 350697 (+11.48%); split: -0.36%, +11.83%
PreVGPRs: 252279 -> 252267 (-0.00%); split: -0.02%, +0.01%
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23946 >
2023-06-30 11:47:03 +00:00
Timur Kristóf
411f69b9c5
ac/nir/ngg: Follow intrinsic sources when analyzing before culling.
...
Helps find more possible reusable uniforms variables.
Also prepares the code for more improvements to the analysis.
Fossil DB stats on GFX10.3:
Totals from 54578 (40.45% of 134913) affected shaders:
VGPRs: 1950536 -> 1950328 (-0.01%); split: -0.02%, +0.01%
SpillSGPRs: 483 -> 1324 (+174.12%); split: -8.90%, +183.02%
CodeSize: 148017620 -> 146549576 (-0.99%); split: -1.10%, +0.11%
MaxWaves: 1533710 -> 1533716 (+0.00%); split: +0.00%, -0.00%
Instrs: 28137479 -> 27909113 (-0.81%); split: -0.94%, +0.13%
Latency: 134454624 -> 130909188 (-2.64%); split: -2.72%, +0.09%
InvThroughput: 20664192 -> 20646525 (-0.09%); split: -0.15%, +0.06%
VClause: 540374 -> 540986 (+0.11%); split: -0.76%, +0.88%
SClause: 720823 -> 636209 (-11.74%); split: -12.46%, +0.72%
Copies: 2287330 -> 2326140 (+1.70%); split: -1.71%, +3.41%
Branches: 844769 -> 844848 (+0.01%); split: -0.00%, +0.01%
PreSGPRs: 1987505 -> 2416965 (+21.61%); split: -0.12%, +21.73%
PreVGPRs: 1582704 -> 1581579 (-0.07%); split: -0.07%, +0.00%
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23946 >
2023-06-30 11:47:03 +00:00
Timur Kristóf
91b28fc621
ac/nir/ngg: Add upper limit to reusable uniforms.
...
This is a heuristic to try to reduce SGPR spilling.
While the stats changes on this commit are not impressive,
this is mainly meant to reduce the regressions from the
next few commits which will find more of these
reusable uniforms.
Fossil DB stats on GFX10.3:
Totals from 567 (0.42% of 134913) affected shaders:
VGPRs: 32528 -> 32608 (+0.25%)
SpillSGPRs: 291 -> 247 (-15.12%); split: -49.14%, +34.02%
CodeSize: 3956896 -> 4006552 (+1.25%); split: -0.07%, +1.33%
MaxWaves: 10508 -> 10486 (-0.21%)
Instrs: 756092 -> 764613 (+1.13%); split: -0.09%, +1.22%
Latency: 2533679 -> 2544752 (+0.44%); split: -0.09%, +0.52%
InvThroughput: 733729 -> 733690 (-0.01%); split: -0.06%, +0.06%
VClause: 4853 -> 4861 (+0.16%); split: -1.36%, +1.52%
SClause: 15627 -> 17485 (+11.89%); split: -0.01%, +11.90%
Copies: 62584 -> 65345 (+4.41%); split: -1.61%, +6.02%
Branches: 17356 -> 17405 (+0.28%); split: -0.10%, +0.39%
PreSGPRs: 46758 -> 43465 (-7.04%); split: -8.37%, +1.33%
PreVGPRs: 28944 -> 28931 (-0.04%); split: -0.08%, +0.04%
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23946 >
2023-06-30 11:47:03 +00:00
Timur Kristóf
ddeabcc19b
ac/nir/ngg: Call nir_convert_to_lcssa before divergence analysis.
...
I've recently learned that this is necessary to get
correct results from divergence analysis.
No Fossil DB stats changes on GFX10.3.
Note, when backporting this patch to stable, make sure
the call to nir_convert_to_lcssa is before nir_divergence_analysis,
which may be located in a different place in the stable branch.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23946 >
2023-06-30 11:47:03 +00:00
Gert Wollny
ac61162e2a
r600/sfn: Fix filling FS output gaps
...
in `a << b` with gcc 13 the shift count c is masked by the
bit count, and a value larger than 32 will result in shifts
by (c & 0x1f), which will add empty instructions if all
color outputs are written and this will eventually
result in an OOM error.
Fixes: 201b46e487
r600/sfn: on R600/R700 write a dummy pixel output if there is a gap
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23945 >
2023-06-30 11:12:12 +00:00
Karol Herbst
48737626c8
docs/cl: timer sync is implemented
...
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23944 >
2023-06-30 12:02:41 +02:00
Karol Herbst
2df3515625
docs/cl: move vec3 support under OpenCL C 1.1
...
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23944 >
2023-06-30 12:02:40 +02:00
Karol Herbst
9784b52579
docs/cl: remove cl_khr_byte_addressable_store from extension list.
...
It's a CL core 1.1 feature.
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23944 >
2023-06-30 12:02:39 +02:00
Rohan Garg
c3110ef1e9
intel/compiler: reuse previously computed bitsize
...
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23933 >
2023-06-30 09:19:57 +00:00
Rohan Garg
7f48c70bab
intel/compiler: construct masks instead of using magic values
...
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23933 >
2023-06-30 09:19:57 +00:00
Luigi Santivetti
0925b07f4f
pvr: fixup transfer primary sub-command list
...
When we allocate a new primary sub-command of type
PVR_SUB_CMD_TYPE_TRANSFER we need to make sure the list backing
transfer sub-commands can be shared and managed by both the
secondary and primary sub-command. Do this by always using a
pointer to maintain the list.
Found with:
dEQP-VK.memory.pipeline_barrier.host_write_transfer_src.8192
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reported-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23918 >
2023-06-30 08:33:08 +00:00
Samuel Pitoiset
b544a6d6c3
radv: emit PA_SC_SCREEN_SCISSOR_BR with the actual fb extent
...
For some reasons, this register is needed for RGP to report actual
render/depth targets size instead of 0 for both width/height. It
doesn't seem to have any other effects.
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9169
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23921 >
2023-06-30 06:38:53 +00:00
Timothy Arceri
c881e4167e
glsl: remove old lower_blend_equation_advanced() code
...
We now have a NIR based replacement.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22711 >
2023-06-30 04:08:18 +00:00
Timothy Arceri
c02252950c
glsl: call nir version of lower_blend_equation_advanced()
...
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22711 >
2023-06-30 04:08:18 +00:00
Timothy Arceri
7f3f429308
glsl: port lower_blend_equation_advanced() to nir
...
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22711 >
2023-06-30 04:08:18 +00:00
Yonggang Luo
34072923a9
util: Remove redundant #if !defined(XF86_LIBC_H) in u_string.h
...
This is added in 3b5ee3d6de but then dropped
in fe14868d96
So this is not needed anymore
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23897 >
2023-06-30 03:33:11 +00:00
Yonggang Luo
2aafd9d7e2
util: Remove redundant defined(_WIN32) in u_string.h
...
This defined(_WIN32) is nested in an "#ifdef _WIN32",
so it's duplicated
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23897 >
2023-06-30 03:33:10 +00:00
Dave Airlie
e385913c21
lavapipe: check sampler pointer before deref
...
This fixes the vulkan samples deferred demo from crashing in here.
Cc: mesa-stable
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23542 >
2023-06-30 03:14:48 +00:00
Mike Blumenkrantz
d2a7ddf066
zink: get new bda when rebinding invalidated buffers
...
this otherwise yields a broken descriptor
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23803 >
2023-06-30 00:48:07 +00:00
Mike Blumenkrantz
041591d972
zink: fix unbinding generated gs on real gs bind
...
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23803 >
2023-06-30 00:48:07 +00:00
Mike Blumenkrantz
a30379488e
zink: fix assert for inline uniform invalidation with generated gs bound
...
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23803 >
2023-06-30 00:48:07 +00:00
Paulo Zanoni
eeb6515096
intel/isl: tile 64 calculations work with 1D surfaces
...
Depth/stencil surfaces cannot be linear but they can be 1D, so they
end up being tile64 when sparse (as we force every sparse resource to
be either tile64 or linear).
According to the "1D surfaces" page from BSpec, our driver treats 1D
surfaces as 2D surfaces with a height of 1 texel, since we don't
enable the corresponding bit from HAS_SLICE_CHICKEN7. And since we
support 2D surfaces, we should also support 1D.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22974 >
2023-06-29 23:30:05 +00:00
Paulo Zanoni
7c43c2ac49
iris: also avoid isl_memcpy_linear_to_tiled for Tile64
...
Just like we avoid it for Tile4, avoid it for Tile64.
We can't easily notice this problem since Tile4 is preferred over
Tile64, but if we patch isl_surf_choose_tiling() to choose Tile64 over
Tile4, then we start getting more than 1600 failures in CI.
These are the two most common error messages:
../src/gallium/drivers/iris/iris_resource.c:2168: get_image_offset_el: Assertion `z0_el == 0 && a0_el == 0' failed.
../src/intel/isl/isl_tiled_memcpy.c:857: linear_to_tiled: Assertion `!"" "unsupported tiling"' failed.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22974 >
2023-06-29 23:30:05 +00:00
Alyssa Rosenzweig
a64f860acb
broadcom/compiler: Use nir_steal_tex_src
...
It's great for passes like these. Noticed while in the area.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23895 >
2023-06-29 22:36:50 +00:00
Alyssa Rosenzweig
5623f6571b
broadcom/compiler: Remove unused #define
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23895 >
2023-06-29 22:36:50 +00:00
Alyssa Rosenzweig
4601517f54
broadcom/compiler: Remove v3d_nir_lower_robust_access
...
Now unused.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23895 >
2023-06-29 22:36:50 +00:00