Dave Airlie
f47858b837
nvk: fix dri options leak.
...
Noticed in valgrind.
Fixes: edb5229538 ("nvk: Hook up driconf for nvk_instance")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27712 >
2024-02-21 05:23:09 +00:00
Dave Airlie
fd04c14306
nouveau/winsys: fix bda heap leak.
...
found with valgrind.
Fixes: b4cfac64c8 ("nvk: Add a separate VMA heap for BDA capture/replay")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27712 >
2024-02-21 05:23:09 +00:00
Mike Blumenkrantz
2ad0146179
zink: use KHR_dynamic_rendering_local_read
...
no more renderpasses!
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27299 >
2024-02-21 04:24:36 +00:00
Mike Blumenkrantz
19789aeeb1
zink: hook up KHR_dynamic_rendering_local_read
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27299 >
2024-02-21 04:24:36 +00:00
Faith Ekstrand
3b658028dd
nvk: Invalidate the texture cache before MSAA resolves
...
Fixes: 4bd2ba31fc ("nvk: Use meta for MSAA resolves")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27710 >
2024-02-21 04:07:18 +00:00
Jesse Natalie
705e646e38
microsoft/compiler: Fix SM6.6 non-bindless handle annotation for UAV counter
...
Counter bool is 8, not 6.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27708 >
2024-02-21 03:39:22 +00:00
Mike Blumenkrantz
ccbf9b0ea7
zink: force host-visible allocations for MAP_COHERENT resources
...
this fixes persistent maps for systems without any BAR
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27707 >
2024-02-21 02:57:06 +00:00
Mike Blumenkrantz
fb2ae7736f
zink: add a second fence disambiguation case
...
this is the case where:
* a batch A is submitted
* a no-op flush occurs
* the frontend gets the fence from already-flushed batch A
* zink recycles batch A
* the frontend waits on fence A
fixes #10598
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27623 >
2024-02-21 02:28:48 +00:00
Dave Airlie
6a688e65a0
loader: handle picking zink for nouveau for certain GPUs.
...
This adds NOUVEAU_USE_ZINK env var, but also has commented out
code to pick it for turing+ if mesa is built with nvk and zink.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27628 >
2024-02-21 11:16:25 +10:00
Dave Airlie
caf99133ec
glx/dri3: handle zink fallback if loader picks it.
...
if we get a zink driver selected for the fd then don't bind it to dri3
return a special error and this should stop dri2 binding it.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27628 >
2024-02-21 11:16:22 +10:00
Dave Airlie
b907eb4750
egl: don't bind zink under dri2/3
...
If we are in dri2/3 paths and the loader picks zink for this fd
don't bind it here, let the fallbacks work.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27628 >
2024-02-21 11:15:38 +10:00
Caio Oliveira
ccbccfff91
iris: Include brw_compiler.h only when needed
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Caio Oliveira
376296a8c9
iris: Move iris_get_compiler_options to iris_program.c
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Caio Oliveira
880e452abf
iris: Add helper for indirect_ubos_use_sampler
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Caio Oliveira
947ef049df
iris: Add helper to access use_tcs_multi_patch
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Caio Oliveira
634a8ece67
iris: Add IRIS_MAX_* constants to replace BRW_MAX_* usage
...
They are still the same, but we don't rely on the BRW compiler
specific symbols. STATIC_ASSERT catches at compile time if they
change independently. At some point we might revisit the need
for them to match.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Caio Oliveira
875aa527b8
iris: Move compiler creation to iris_program.c
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Caio Oliveira
19574a8156
iris: Use uint32_t instead of brw_param_builtin
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Caio Oliveira
0b135c9f80
iris: Take ownership of prog_data when applying it
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Caio Oliveira
04364768f2
iris: Reduce dependency on brw_*_prog_data structs
...
Once the brw_*_prog_data are available, copy down all the relevant
fields to iris_compiled_shader (and iris_*_data corresponding structs)
so that most of Iris code will be independent of brw types.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Caio Oliveira
9fd4b7460f
iris: Don't use prog_data to guard 3DSTATE_CONSTANT_* code
...
At this point in the code, the prog_data is always non-NULL (and was
already used before by setup_constant_buffers() to fill push_bos.
Suggested by Ken.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Caio Oliveira
be13c3ef9f
iris: Add stage to iris_compiled_shader
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Caio Oliveira
8ae528331c
intel/compiler: Use "intel" prefix for walk_order enum
...
Will be used later in non-brw specific code in Iris.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646 >
2024-02-21 00:38:35 +00:00
Timothy Arceri
74534397ac
glsl: split var copies before lowering named interfaces
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10593
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27669 >
2024-02-20 23:29:17 +00:00
Timothy Arceri
4c11119825
glsl: support array wildcards in lower named interface blocks
...
Will be required with the change in the following patch.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27669 >
2024-02-20 23:29:17 +00:00
Timothy Arceri
ec240e2cd8
nir: allow gather info to handle nir_deref_type_array_wildcard
...
Needed for some changes to the glsl nir linker in the following
patches.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27669 >
2024-02-20 23:29:17 +00:00
Kenneth Graunke
1497f4e0c2
intel/fs: Don't include sync.nop in instruction count statistics
...
With the advent of software scoreboarding, we emit sync instructions
in various places to synchronize the execution pipelines. This results
in assembly being littered with a bunch of sync.nop instructions. That
means that when you reorder anything in the program, the scoreboarding
changes, and the number of sync.nops can vary wildly - even if the code
isn't really materially better or worse. This makes it hard to use
tools like shader-db or fossil-db on post-Icelake platforms.
For now, exclude sync.nops from the instruction count statistic. One
day we may want to consider improving the software scoreboarding pass
to emit fewer redundant sync.nop instructions, at which point tracking
this as a separate stat might be useful. For now though, it's simply
cluttering and confusing our results.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27701 >
2024-02-20 22:26:09 +00:00
Mike Blumenkrantz
83d1241cf5
zink: add checks/compat for low-spec descriptor buffer implementations
...
for implementations that can only support 1 descriptor buffer:
* prefer templates
* allow db if explicitly requested, but disable bindless (for testing)
fix #10640
Fixes: b8b51d96b0 ("zink: delete maxDescriptorBufferBindings checks")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27696 >
2024-02-20 21:43:15 +00:00
Caio Oliveira
60cf1ede4f
iris: Remove no-ops from storage image lowering
...
The atomics lowering only applies to Gfx <= 7.5.
The get_size lowering only applies to Gfx <= 8.
Note: the lower_store still applies for Gfx9+, to perform color
conversion.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27638 >
2024-02-20 19:47:07 +00:00
Caio Oliveira
078dbc4d33
anv: Remove lower_atomics from storage image lowering opts
...
The code only applies to Gfx <= 7.5, so it is a no-op.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27638 >
2024-02-20 19:47:07 +00:00
Mike Blumenkrantz
1ab94ca17b
mesa: add more driver support checks for more format queries
...
fixes #10641
cc: mesa-stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27698 >
2024-02-20 18:27:10 +00:00
Mike Blumenkrantz
1e849b12f5
vk/wsi/x11/sw: use swapchain depth for putimage
...
this is otherwise broken for 32bit depth windows
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27605 >
2024-02-20 15:47:45 +00:00
Mike Blumenkrantz
198719e80e
drisw/egl: delete unused buffer age handling
...
age is never used here
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27554 >
2024-02-20 15:12:38 +00:00
Mike Blumenkrantz
81ecb21d50
drisw: hook up EXT_buffer_age
...
drisw only has a single drawable, which means the buffer age is always 1
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27554 >
2024-02-20 15:12:38 +00:00
Mike Blumenkrantz
9eb4b86e76
egl/x11/swrast: deduplicate ANGLE_sync_control_rate enablement
...
no functional changes
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27554 >
2024-02-20 15:12:37 +00:00
Lionel Landwerlin
0eb3c850c6
intel/clc: workaround LLVM17 opaque pointers
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: b52e25d3a8 ("anv: rewrite internal shaders using OpenCL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27637 >
2024-02-20 14:41:43 +00:00
Lionel Landwerlin
62baa4df5f
intel/clc: lower temp function/shader variables together
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 4fd7495c69 ("intel/clc: add ability to output NIR")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27637 >
2024-02-20 14:41:43 +00:00
Lionel Landwerlin
19aeb274e6
genxml: generate opencl temporary variables with private qualifier
...
To avoid generic pointers, makes the NIR prints a bit more readable.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 41b2ed65 ("genxml: generate opencl packing headers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27637 >
2024-02-20 14:41:43 +00:00
Gert Wollny
a95a2e4d3f
zink/nir_to_spirv: emit ViewportIndex cap also for inputs
...
This fixes validation error VUID-VkShaderModuleCreateInfo-pCode-08737 for
piglits:
spec@oes_viewport_array@viewport-gs-write-simple
spec@oes_viewport_array@viewport-gs-writes-in-range
spec@arb_fragment_layer_viewport@viewport-gs-no-write
spec@arb_fragment_layer_viewport@viewport-gs-write-simple
spec@arb_fragment_layer_viewport@viewport-gs-writes-in-range
spec@arb_fragment_layer_viewport@viewport-no-gs
spec@arb_fragment_layer_viewport@viewport-vs-write-gs-no-write-simple
spec@arb_fragment_layer_viewport@viewport-vs-write-simple
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27694 >
2024-02-20 13:39:34 +00:00
Lionel Landwerlin
96ab1d65cc
anv: fix emission of Wa_14015055625
...
When moving the static part, I missed that the
pipeline->primitive_id_override field isn't set yet when we check it
to emit 3DSTATE_TE.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 1e081bd680 ("anv: split 3DSTATE_TE packing between static & dynamic parts")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27692 >
2024-02-20 09:49:00 +00:00
Oskar Viljasaar
68f80f9b0f
vulkan/properties: Start looping from the next member in GPDP2
...
We don't need to start iterating from `pProperties`, as the first member
is already handled in vk_common_GetPhysicalDeviceProperties2. Eliminate
this iteration by starting from pProperties->pNext.
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27671 >
2024-02-20 09:16:23 +00:00
Samuel Pitoiset
a5bdc4b19a
radv: fix a compilation warning in radv_bind_graphics_shaders()
...
../src/amd/vulkan/radv_cmd_buffer.c: In function ‘radv_bind_graphics_shaders’:
../src/amd/vulkan/radv_cmd_buffer.c:9366:65: warning: array subscript -1 is below array bounds of ‘struct radv_shader *[14]’ [-Warray-bounds=]
9366 | cmd_buffer->state.last_vgt_shader = cmd_buffer->state.shaders[last_vgt_api_stage];
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27670 >
2024-02-20 08:47:18 +00:00
Guilherme Gallo
41cd32d10e
ci/lava: Broader R8152 error handling
...
The r8152 error detection is now considering any order of the known
patterns to detect variations of the r8152 issues during the test phase.
This includes a small refactoring for eventual new issues.
Additionally, adjusted the timing for setting the `start_time` in
`test_lava_job_submitter.py` to ensure consistency and reliability in
test execution, aligning the start time closer to the job submission
process.
With this fix, the bad state shown in the following job will be
detected:
https://gitlab.freedesktop.org/drm/msm/-/jobs/55033953
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27688 >
2024-02-20 00:48:24 +00:00
Mike Blumenkrantz
c6635c09d0
zink: avoid infinite recursion on (very) small BAR systems in bo alloc
...
this should only try a full reclaim if possible, not unconditionally
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606 >
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
817ca5147e
zink: compute bo unique_id on use, not creation
...
this avoids wasting ids in suballocated slabs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606 >
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
8c3adf749d
zink: add an assert for dummy fb surface creation
...
add some info in the improbable case that this fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606 >
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
8bad4205c6
zink: validate sample count on image create
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606 >
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
386450b10e
zink: pre-check formats for samplecount support
...
this should allow frontends to accurately detect unsupported format+sample
combinations instead of just failing at resource creation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606 >
2024-02-19 19:27:15 +00:00
Mike Blumenkrantz
f827055cb4
zink: flag the use_img as unsync access with buf2img copies, not the swapchain
...
these are not the same
Fixes: a0510b23f6f ("zink: add automatic swapchain readback using heuristics")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606 >
2024-02-19 19:27:15 +00:00
Mike Blumenkrantz
b8b51d96b0
zink: delete maxDescriptorBufferBindings checks
...
only one descriptor buffer is used now
Fixes: 13c6ad0038 ("zink: use a single descriptor buffer for all non-bindless types")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27685 >
2024-02-19 17:12:37 +00:00