Compare commits

...

5221 Commits

Author SHA1 Message Date
Marek Olšák
c3fc214a98 radeonsi: implement user_data_amd for 5, 6, and 7 components correctly
NIR can't handle those component counts, so we have to split it into 2
SGPR vectors where each has max 4 components.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
882ee264a6 radeonsi: use ip_type in debug code instead of hardcoding GFX
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
e7000c02e4 radeonsi: always run nir_opt_16bit_tex_image
It optimizes constants in srcs to 16 bits.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
18bcdbb634 radeonsi: only expose 8 EQAA samples due to shader limitations
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
256cc77f84 radeonsi: don't add whether NIR is used into the shader key
This is from when we had TGSI and NIR was a debug option.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
e5c8f0781c radeonsi: make clear_render_target clear DCC directly instead of via pipe->clear()
This extracts the relevant parts from si_fast_clear.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
eccaba9dfa radeonsi: enable fast FB clears for conditional rendering
They use compute shaders, which always support the render condition.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
9a47fbecd7 radeonsi: don't flush CB and DB if there have been no draw calls
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
f0160443a2 radeonsi: don't flush CB in si_launch_grid_internal_images if not needed
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
708f57e681 radeonsi: don't use si_get_flush_flags() for flushing images
si_make_{CB/DB}_shader_coherent are more correct.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
38f74d6277 radeonsi: disable VRS flat shading for selected 8xMSAA and thick tiling cases
for better slow clear performance

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
86131c25a1 radeonsi/gfx11: implement DCC clear to "single" for fast non-0/1 clears
If the clear color isn't 0 or 1, we used a slow clear. This adds a new
DCC clear where the DCC buffer is cleared to a special value and the clear
color is stored at the beginning of each 256B block in the image.

It can be very fast, but it's not always faster than a slow clear.
There is a heuristic that determines whether this new fast clear is
better.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
10ec468983 radeonsi: don't call resource_copy_region in pipe->blit
It's slower because it forces preservation of NaNs.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
26a5955821 radeonsi: change allow_flat_shading to make it a single condition
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
494cad56c4 radeonsi: remove si_use_compute_copy_for_float_formats
Gfx blits preserve NaNs now, so this is no longer needed.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
18b7b2c806 radeonsi: use simpler UINT fallback formats for draw-based resource_copy_region
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
8235d3aa19 radeonsi: preserve NaNs in draw-based resource_copy_region
Gfx copies are faster sometimes, so they should be able to copy anything.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
a03df53d3b radeonsi: move blitter clear_render_target impl into si_gfx_clear_render_target
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
82e63db91f radeonsi: move blitter resource_copy_region implementation to si_gfx_copy_image
for a new performance test.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
e94813204a radeonsi: allow input NIR to use descriptors in image opcodes
Skip lowering because there is nothing to lower.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
30fab15f39 radeonsi: don't expose samples_identical and don't lower FMASK if it's disabled
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
dab4295cd5 radeonsi: fix initialization of occlusion query buffers for disabled RBs
GFX9+ should assume the enabled RB results are packed (no holes).
Same as PAL.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
aad2302cf5 radeonsi: move TCS epilog key bits to the key->ge.opt section
Since the TCS epilog is no more, this is required to apply those bits
to monolithic shaders.

tessfactors_are_def_in_all_invocs was unused.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
d29d215df7 radeonsi: check has_stable_pstate in the winsys
so that we don't duplicate the condition everywhere

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
a094339d64 radeonsi: add the radeonsi_optimize_io option into the shader cache key
otherwise the options would be ignored if the shader cache had already
cached the same shader with the option inverted.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
3630c11c3b radeonsi: use the same nir_lower_subgroups_options as RADV
Some FREE calls are removed because nir_options is always NULL there.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
adde1dbae5 radeonsi/gfx11: enable DCC fast clears for 8-bit and 16-bit formats
They seem to work fine.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
d478693dc6 radeonsi/gfx11: don't prefetch constants in binaries into the instruction cache
Only prefetch shader instructions. There will be more GFX versions
in that list.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
71ae7b85ed radeonsi/ci: update gfx11 failures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:10 +00:00
Marek Olšák
665df08af4 ac/surface: constify and reindent NIR meta address-from-coord function params
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:09 +00:00
Marek Olšák
cce1aa4766 ac/llvm: always trim components of texture instructions, trim DMASK
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:09 +00:00
Marek Olšák
83a601d420 ac/llvm: fix assertions for texture instructions with 16-bit LOD bias
A16 dictates the type.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28725>
2024-04-24 19:17:09 +00:00
José Roberto de Souza
708b0a7c23 intel/dev: Read GFX IP version during runtime
Starting from MTL there is registers in HW to read the IP version of
graphics, media and display IPs, those registers are called GMD.

IPs can be used in any combination to form a SOC/platform and each IP
has it own stepping/revision, making complex to track each IP stepping
using just PCI revision.

Since MTL will be supported by default by i915 KMD that don't have
a uAPI fetch IP versions, this feature will only be supported in LNL
and newer that are backed by Xe KMD.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26908>
2024-04-24 18:06:04 +00:00
José Roberto de Souza
4d3fee0b40 intel: Sync xe_drm.h
Sync xe_drm.h with 31ced035ecde ("drm/xe/uapi: Restore flags VM_BIND_FLAG_READONLY and VM_BIND_FLAG_IMMEDIATE").

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26908>
2024-04-24 18:06:04 +00:00
Tomeu Vizoso
a78e98f18e etnaviv/nn: Keep track of the sign bit when decrementing to zero
To avoid underflow.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28879>
2024-04-24 17:47:44 +00:00
Tomeu Vizoso
9bac40b796 etnaviv/nn: Don't shortcut ZRL bits calculation
In some (probably malformed) cases, even weights BOs for strided or depthwise
convolutions can become bigger when using ZRL compression.

To avoid running out of space in the BO, play safe and calculate the
actual optimum ZRL bit count. This does slow compilation for quite a
bit, though (2x slower for MobileNetV1).

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28879>
2024-04-24 17:47:44 +00:00
Tomeu Vizoso
d46e68c89a etnaviv/nn: Enable image cache
By using the on-chip SRAM to cache the input image we can save some more
bandwidth and increase the utilization of the NN cores, with the
following improvements:

MobileNetV1: 9.991ms -> 6.2ms
SSDLite MobileDet: 27ms -> 24.3ms

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28879>
2024-04-24 17:47:44 +00:00
Tomeu Vizoso
d6045ca502 etnaviv/nn: Move unused field to its right place in the struct
The blob sets it in some cases, but doesn't seem to make any difference.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28879>
2024-04-24 17:47:44 +00:00
Tomeu Vizoso
c75b512673 etnaviv/nn: Fix calculation of remaining out channels
We were wrongly counting the remaining number of output channels in the
last superblock, when the former isn't divisible by the latter.

MobileNetV1: 9.991ms -> 9.991ms
SSDLite MobileDet: 32.692ms -> 27ms

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28879>
2024-04-24 17:47:44 +00:00
Tomeu Vizoso
baebd6f43d etnaviv/nn: Ensure tile_y is > 0
A zero tile dimension doesn't make sense.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28879>
2024-04-24 17:47:44 +00:00
Tomeu Vizoso
e70ea63a17 teflon: Enable convolutions with number of output channels not divisible by 8
This was an old restriction during initial development which isn't
needed any more, and gives us a speed bump.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28879>
2024-04-24 17:47:44 +00:00
José Roberto de Souza
b143823727 intel/tools: Parse INSTDONE registers in Xe KMD error dump
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28722>
2024-04-24 17:07:50 +00:00
José Roberto de Souza
c221ba6f75 intel/decoder: Add intel_print_group_custom_spacing()
This function has 2 additional parameters to set spacing before
printing register group dword or individual registers.

intel_print_group() is keept with the same spacing as before so no
changes on decoder output is expected here.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28722>
2024-04-24 17:07:50 +00:00
José Roberto de Souza
94deb24e2b intel/tools/aubinator_error_decode: Move definition of option_color to header
Xe parser will also need to use the option_color parameter.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28722>
2024-04-24 17:07:50 +00:00
Rohan Garg
7e5628749c anv: use u_foreach_bit to iterate over the the view mask like we do for transition_clear_color
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28629>
2024-04-24 16:42:07 +00:00
Rohan Garg
5efecc9782 anv: Enable HiZ on multi-LOD depth buffers.
Initial work by Rafael Antognolli <rafael.antognolli@intel.com>

Reworks
 - Rebase to main
 - Emit the right hiz op for higher mip levels when transitioning the
   depth buffer

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28629>
2024-04-24 16:42:06 +00:00
Martin Roukala (né Peres)
599e8bf921 ci/valve: remove the traces runner
This script is severely outdated and has had no use in literal years.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28902>
2024-04-24 15:46:32 +00:00
Martin Roukala (né Peres)
a589225827 ci/b2c: allow setting the DTB to be used
This will be used by upcoming new CI jobs.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28902>
2024-04-24 15:46:32 +00:00
Martin Roukala (né Peres)
2d442fc014 ci/b2c: rename .deqp-test-valve into .b2c-deqp-test
Let's remove the mention of Valve and instead focus on the b2c/ci-tron
origin.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28902>
2024-04-24 15:46:32 +00:00
Martin Roukala (né Peres)
b084dbd44f ci/b2c: rename .b2c-test-{vk,gl} to .b2c-x86_64-test-{vk,gl}
This will allow us to introduce non-x86_64 testing using CI-tron.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28902>
2024-04-24 15:46:32 +00:00
Philipp Zabel
e2444ad6c1 etnaviv/nn: Extend post-multiplier for v8 architecture
The post-multiplier was extended by 8 bits for improved precision.
The shift offset appears to have changed as well.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28878>
2024-04-24 15:26:37 +00:00
Philipp Zabel
c2290843df etnaviv: Add nn_core_version field to etna_specs
Use the NN_XYDP0 and NN_VIP7 feature flags to determine the NN core
version [1] and store it in etna_specs.

[1] https://github.com/nxp-imx/linux-imx/blob/lf-6.1.36-2.1.0/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware_func.c#L5464-L5465

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28878>
2024-04-24 15:26:37 +00:00
Philipp Zabel
db2d5a0103 etnaviv: hwdb: Add VIP_V7 and NN_XYDP0 feature bits
These can be used to detect the NN core architecture version [1].

[1] https://github.com/nxp-imx/linux-imx/blob/lf-6.1.36-2.1.0/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware_func.c#L5464-L5465

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28878>
2024-04-24 15:26:37 +00:00
Mike Blumenkrantz
588c762936 zink: preserve/merge variable names when generating new variables
in the case where multiple variables get merged into one, try to use
all the names when creating new vars

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28814>
2024-04-24 12:36:00 +00:00
Mike Blumenkrantz
cb597cb85e nir/print: print io instr->name if available
this will always be more accurate than trying to find the name from
a variable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28814>
2024-04-24 12:35:59 +00:00
Mike Blumenkrantz
948126368a nir/clone: preserve intrinsic name field across clones
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28814>
2024-04-24 12:35:59 +00:00
Mike Blumenkrantz
5303785bb9 nir/lower_io_to_scalar: preserve variable names when splitting io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28814>
2024-04-24 12:35:59 +00:00
Mike Blumenkrantz
3541ed8502 nir: store variable names to io instrs during io lowering
this creates a reference between variables and their access instrs
before the variables are deleted, which improves debugging

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28814>
2024-04-24 12:35:59 +00:00
Philipp Zabel
dbe2927472 etnaviv: Avoid duplicate query of ETNA_GPU_FEATURES_0 parameter
With the new hwdb, ETNA_GPU_FEATURES_0 were already queried inside
etna_gpu_new(). Use the stored PIPE_3D feature bit to determine
compatible cores.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28877>
2024-04-24 12:13:49 +00:00
Philipp Zabel
4f123a7951 etnaviv: common: Add PIPE_3D feature bit
With this, we can drop the duplicated ETNA_GPU_FEATURES_0 query in
screen_create().

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28877>
2024-04-24 12:13:49 +00:00
Connor Abbott
ff155f46a3 freedreno/a7xx: Register updates from kgsl
Will be necessary for kernel changes to match kgsl.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28883>
2024-04-24 11:29:01 +00:00
Samuel Pitoiset
59d3a8ea07 ci: uprev CTS to 1.3.8.2
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28871>
2024-04-24 10:48:11 +00:00
Karol Herbst
cd5c9870ea rusticl/program: handle -cl-no-subgroup-ifp
As per spec we don't have to do anything with that flag.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28873>
2024-04-24 10:25:41 +00:00
Corentin Noël
ca861e8f75 ci: Add zink-venus-lvp job
Test Zink on Venus on Lavapipe.

Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27790>
2024-04-24 09:01:15 +00:00
Corentin Noël
e9dacca3f7 ci: Allow to pass LIBGL_ALWAYS_SOFTWARE to the guest environment
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27790>
2024-04-24 09:01:15 +00:00
Iago Toral Quiroga
708a635902 broadcom/ci: document external causes for some CTS 1.3.8 failures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28891>
2024-04-24 06:59:53 +00:00
Yonggang Luo
1de805e986 nouveau: Fixes error: unused import: crate::nvh_classes_cl906f::*
Full error message:
error: unused import: `crate::nvh_classes_cl906f::*`
   --> src/nouveau/headers/lib.rs:184:9
    |
184 | pub use crate::nvh_classes_cl906f::*;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D unused-imports` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unused_imports)]`

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28855>
2024-04-24 06:37:39 +00:00
Yiwei Zhang
4fc3f11545 venus: fix VkDeviceGroupSubmitInfo::deviceMask for feedback cmds
Unlike sync2, a legacy deviceMask of zero is indeed to skip.

Fixes: 80f532a636 ("venus: fix VkDeviceGroupSubmitInfo cmd counts from feedback")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28888>
2024-04-24 02:43:46 +00:00
Sagar Ghuge
46e4354940 intel/compiler: Disassemble mlen/rlen/ex_mlen in units of registers
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28637>
2024-04-23 23:46:26 +00:00
Caio Oliveira
ff89e83178 intel/brw: Lower VGRFs to FIXED_GRFs earlier
Moves the lowering of VGRFs into FIXED_GRFs from the code generation
to (almost) right after the register allocation.

This will allow: (1) later passes not worry about VGRFs (and what they
mean in a post reg alloc phase) and (2) make easier to add certain
types of validation post reg alloc phase using the backend IR.

Note that a couple of passes still take advantage of seeing "allocated
VGRFs", so perform lowering after they run.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28604>
2024-04-23 23:17:57 +00:00
Caio Oliveira
5b3d4c757d intel/brw: Support FIXED_GRF when generating code for CLUSTER_BROADCAST
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28604>
2024-04-23 23:17:57 +00:00
Pierre-Eric Pelloux-Prayer
b926cd3dd9 radv: don't use python 3.9 feature in radv_annotate_layer_gen.py
This commit adds an implementation of removesuffix so we don't
need the 'str' one which was added in 3.9.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28831>
2024-04-23 22:45:51 +00:00
Pierre-Eric Pelloux-Prayer
27a3880ada aco: don't use python 3.7+ feature in aco_opcodes.py
Use the suggestion from https://stackoverflow.com/questions/11351032/named-tuple-and-default-values-for-optional-keyword-arguments
so the script works on older Python.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28831>
2024-04-23 22:45:51 +00:00
Sagar Ghuge
fe4f6dd18f isl: Update shader channel select for missing components
Bspec 57023: RENDER_SURFACE_STATE::Shader Channel Select Red

   "For channels not present in the surface format, the corresponding
   Surface Channel Select is either SCS_ZERO or SCS_ONE."

This restriction applies to alpha channel as well if an associated
resource is not used as a render target.

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/28791>
2024-04-23 22:08:30 +00:00
Sagar Ghuge
2d8686ccd5 isl: Update isl_swizzle_supports_rendering comment
Bspec 57023: RENDER_SURFACE_STATE:: Shader Channel Select Red

   "Render Target messages do not support swapping of colors with
   alpha. The Red, Green, or Blue Shader Channel Selects do not
   support SCS_ALPHA. The Shader Channel Select Alpha does not support
   SCS_RED, SCS_GREEN, or SCS_BLUE."

Cc: mesa-stable
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/28791>
2024-04-23 22:08:30 +00:00
Mike Blumenkrantz
3a868970a2 zink: disable command reordering for compute-only contexts
this is pointless

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28880>
2024-04-23 21:45:40 +00:00
Mike Blumenkrantz
ffb082f811 zink: make NOREORDER mode context-based
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28880>
2024-04-23 21:45:40 +00:00
Mike Blumenkrantz
ef0c9231a7 mesa/st: don't use serialized_nir for cached shaders
serialized_nir doesn't exist here, so just use the cached nir

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

Fixes: 5eb0136a3c ("mesa/st: when creating draw shader variants, use the base nir and skip driver opts")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28857>
2024-04-23 21:06:31 +00:00
Leo Liu
dc85832c35 ac/gpu_info: Fix broken UVD firmware query
UVD and VCE are separated engines, and not co-exist with VCNs

Fixes: c34cfc1a3b (ac/gpu_info: update multimedia info)

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28863>
2024-04-23 20:26:14 +00:00
Job Noorman
f0ddba819f freedreno/drm-shim: remove duplicate entry for a630
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28459>
2024-04-23 20:03:51 +00:00
Job Noorman
1ffae320a8 freedreno/drm-shim: add a730, a740, and a750
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28459>
2024-04-23 20:03:50 +00:00
Job Noorman
39088571f0 ir3: add support for predication
Use predication instead of branching whenever possible and profitable:
all divergent leaf branches are replaced with predication. Non-divergent
branches are kept since for those a branch might be more performant when
it jumps over all instructions. Although it might be possible to support
a limited form of nested predication, this is more difficult to
implement so we only support leaf branches for now.

When translating from NIR to ir3, predication is emitted just like
normal branches except that the branch is replaced with pred[tf] and the
opposite (pred[ft]) is inserted at the end of the then-block. This
pattern is then recognized during legalization at which point the
closing prede is inserted. We don't insert this right away to allow
opt_jump to optimize jumps out of the else-block. Since the branches we
support for predication always have exactly one block in each arm, the
then-block is emitted first, and blocks are never reordered, this way of
emitting predicated branches ensures they have the correct memory
layout.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27982>
2024-04-23 19:18:29 +00:00
Job Noorman
bbc78e92ff ir3: add support for precolored sources in predicate RA
To support predt/predf which always read from p0.x, we need to support
precolored sources for the predicates RA.

This patch implements this as follows: whenever a precolored source is
encountered whose def isn't live in the correct register, reload it into
the correct one. To make sure we don't reload too often, two precautions
are made. First, we precolor all defs of precolored sources and try do
use that register when allocating one for a def. Second, since currently
only p0.x is used for precoloring, we try not to allocate it whenever
there are outstanding precolored defs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27982>
2024-04-23 19:18:29 +00:00
Job Noorman
2288ef916c ir3: model predt/predf without sources
We used to model predt/predf as taking a predicate register source. The
blob disassembler shows them taking a label argument. However, it seems
that both are incorrect: the condition is always taken from p0.x and I
have not been able to construct a test case were the label makes any
difference.

This patch changes predt/predf to not take any arguments and adds
documentation about how predicated execution works.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27982>
2024-04-23 19:18:29 +00:00
Job Noorman
d56f1abd72 ir3: remove unnecessary tessellation epilogue
The tessellation epilogue was emitted as an empty predt/prede pair which
has no functional use so can be removed.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27982>
2024-04-23 19:18:29 +00:00
David Heidelberg
44b080af07 meson: implement split-debug
split-debug uses C args `--gsplit-dwarf` and linker args `--gdb-index`
to achieve split debug, speed up the CI linking, and allow us to
distribute debug symbols standalone.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28576>
2024-04-23 18:31:39 +00:00
Juan A. Suarez Romero
9d5af35318 nir/lower_clip: update inputs/ouputs read/written bitmask
Set the proper bit when adding clipdist load/store.

It also sets the variable name to match with the CLIPDISTn created.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28798>
2024-04-23 17:52:09 +00:00
Samuel Pitoiset
2e79234f9d ac: allow to use 64K of LDS for tessellation on GFX9+
This is the hardware limit and it's supposed to be working. GFX7-8 also
support 64KiB but Stoney used to hang in the past and using 32KiB was
the only known solution.

fossils-db (NAVI21):
Totals from 326 (0.41% of 79395) affected shaders:
MaxWaves: 6352 -> 6378 (+0.41%); split: +0.50%, -0.09%
Instrs: 232575 -> 232827 (+0.11%); split: -0.04%, +0.15%
CodeSize: 1256940 -> 1258744 (+0.14%); split: -0.04%, +0.18%
VGPRs: 17552 -> 17384 (-0.96%); split: -1.09%, +0.14%
LDS: 2828800 -> 3899392 (+37.85%)
Latency: 2937650 -> 2934667 (-0.10%); split: -0.30%, +0.20%
InvThroughput: 704214 -> 700854 (-0.48%); split: -0.51%, +0.04%
VClause: 4398 -> 4442 (+1.00%); split: -0.20%, +1.21%
SClause: 5297 -> 5292 (-0.09%); split: -0.32%, +0.23%
Copies: 14892 -> 14921 (+0.19%); split: -0.44%, +0.63%
PreVGPRs: 13294 -> 13293 (-0.01%); split: -0.06%, +0.05%
VALU: 156536 -> 156793 (+0.16%); split: -0.03%, +0.20%
SALU: 21806 -> 21795 (-0.05%)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28015>
2024-04-23 17:20:40 +00:00
Samuel Pitoiset
fb323ae46b radv: rework the number of tess patches computation
This uses the same helper as RadeonSI which seems more robust and more
optimal (eg. it reduces the number of patches to increase occupancy).

fossils-db (NAVI21):
Totals from 638 (0.80% of 79395) affected shaders:
MaxWaves: 13182 -> 13142 (-0.30%)
Instrs: 419446 -> 419322 (-0.03%); split: -0.08%, +0.05%
CodeSize: 2261408 -> 2261200 (-0.01%); split: -0.06%, +0.05%
VGPRs: 32560 -> 32600 (+0.12%)
LDS: 4648960 -> 5343232 (+14.93%); split: -1.67%, +16.61%
Latency: 4812105 -> 4811141 (-0.02%); split: -0.04%, +0.02%
InvThroughput: 1159924 -> 1153998 (-0.51%); split: -0.60%, +0.09%
VClause: 7837 -> 7871 (+0.43%); split: -0.36%, +0.79%
SClause: 9378 -> 9381 (+0.03%); split: -0.21%, +0.25%
Copies: 28451 -> 28211 (-0.84%); split: -0.97%, +0.13%
PreVGPRs: 25404 -> 25411 (+0.03%); split: -0.06%, +0.09%
VALU: 278086 -> 277975 (-0.04%); split: -0.11%, +0.07%
SALU: 43657 -> 43617 (-0.09%)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28015>
2024-04-23 17:20:40 +00:00
Samuel Pitoiset
758e6d9005 ac,radeonsi: add helpers to compute the number of tess patches/lds size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28015>
2024-04-23 17:20:40 +00:00
Samuel Pitoiset
8b8d194bfb radv: advertise VK_EXT_nested_command_buffer
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28826>
2024-04-23 16:41:57 +00:00
Samuel Pitoiset
7de95e7742 radv: track if nested command buffers uses indirect draws
IB2 packets should be avoided when a cmdbuf executes nested cmdbufs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28826>
2024-04-23 16:41:57 +00:00
Samuel Pitoiset
0d18a2f4fb radv/amdgpu: do not use IB2 for nested command buffers
This should be enough to support executing nested command buffers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28826>
2024-04-23 16:41:56 +00:00
José Roberto de Souza
1763d1aab1 iris: Avoid allocation of not needed iris_bucket_cache
Following the previous patch and allocating just the number of
iris_bucket_cache that will be used by giving platform.

While at it also adding util_vma_heap_finish() call in the
iris_bufmgr_create() error path.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28864>
2024-04-23 15:59:01 +00:00
José Roberto de Souza
c473a156dc iris: Avoid creation of slabs and cache buckets of lmem heaps in integrated gpus
It was allocating slabs and cache buckets data structs of lmem heaps
but those will never be used in integrated gpus, so lets avoid waste
cpu time and memory with those.

This will also remove slabs and cache buckets for
IRIS_HEAP_DEVICE_LOCAL_CPU_VISIBLE_SMALL_BAR for
discrete GPUs in systems with resizeble bar enabled.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28864>
2024-04-23 15:59:01 +00:00
José Roberto de Souza
a51c64ac5c iris: Add comments to BO_ALLOC flags
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28864>
2024-04-23 15:59:01 +00:00
Connor Abbott
7a1779edc7 ir3: Don't pack FS inlocs
Thanks to transform feedback, we don't know which varying components
will be used when compiling the FS. The VS could use additional
components for xfb, and packing the inlocs per-component would result in
overlapping varyings. In order to do this properly, we'd need to create
a variant for the FS when used with xfb.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28626>
2024-04-23 15:22:19 +00:00
Connor Abbott
56607fafc2 ir3: Don't use non-contiguous component masks for FS
I think this isn't necessary, and when we disable packing inlocs we will
start actually using the compmask computed here tests like
KHR-Single-GL46.enhanced_layouts.varying_components on zink will fail
unless we add the extra unused components at the beginning.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28626>
2024-04-23 15:22:19 +00:00
Bas Nieuwenhuizen
d0c4b9144a radv: Fix differing aspect masks for multiplane image copies.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11050
CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28867>
2024-04-23 13:11:49 +00:00
Rhys Perry
37e9e8b06c aco: split vop3p results
Removes copies in the case of:
a = fmul
b = fmul
c = vec4(a.x, a.y, b.x, b.y)

fossil-db (navi31):
Totals from 21 (0.03% of 79395) affected shaders:
Instrs: 96481 -> 96338 (-0.15%)
CodeSize: 548452 -> 548196 (-0.05%); split: -0.13%, +0.09%
Latency: 1514460 -> 1514238 (-0.01%); split: -0.02%, +0.00%
InvThroughput: 683048 -> 682942 (-0.02%); split: -0.02%, +0.00%
VClause: 1611 -> 1613 (+0.12%)
Copies: 21326 -> 21190 (-0.64%)
Branches: 2427 -> 2426 (-0.04%)
PreVGPRs: 2289 -> 2298 (+0.39%)
VALU: 59090 -> 58954 (-0.23%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28763>
2024-04-23 12:31:59 +00:00
Rhys Perry
88e03feb27 aco: schedule LDS instructions
fossil-db (navi31):
Totals from 1823 (2.30% of 79395) affected shaders:
MaxWaves: 53845 -> 53827 (-0.03%); split: +0.02%, -0.05%
Instrs: 1736317 -> 1731200 (-0.29%); split: -0.38%, +0.09%
CodeSize: 8876760 -> 8857908 (-0.21%); split: -0.29%, +0.08%
VGPRs: 91688 -> 92276 (+0.64%); split: -0.03%, +0.67%
Latency: 11743095 -> 11698872 (-0.38%); split: -0.42%, +0.04%
InvThroughput: 2070526 -> 2067440 (-0.15%); split: -0.17%, +0.02%
VClause: 39048 -> 39058 (+0.03%); split: -0.01%, +0.03%
SClause: 35371 -> 35406 (+0.10%); split: -0.02%, +0.12%
Copies: 104335 -> 104384 (+0.05%); split: -0.21%, +0.26%
Branches: 29769 -> 29794 (+0.08%); split: -0.00%, +0.09%
VALU: 970925 -> 970974 (+0.01%); split: -0.01%, +0.02%
SALU: 146222 -> 146345 (+0.08%); split: -0.01%, +0.09%
VOPD: 1119 -> 1162 (+3.84%); split: +4.29%, -0.45%

fossil-db (navi21):
Totals from 37078 (46.70% of 79395) affected shaders:
MaxWaves: 990093 -> 990025 (-0.01%)
Instrs: 21130662 -> 21182543 (+0.25%); split: -0.01%, +0.26%
CodeSize: 110205364 -> 110415032 (+0.19%); split: -0.01%, +0.20%
VGPRs: 1407168 -> 1410768 (+0.26%)
Latency: 90024839 -> 89929196 (-0.11%); split: -0.11%, +0.01%
InvThroughput: 17170356 -> 17167412 (-0.02%); split: -0.02%, +0.00%
VClause: 392830 -> 392825 (-0.00%); split: -0.01%, +0.01%
SClause: 463150 -> 463188 (+0.01%); split: -0.00%, +0.01%
Copies: 1768433 -> 1768483 (+0.00%); split: -0.02%, +0.02%
Branches: 605989 -> 606011 (+0.00%); split: -0.00%, +0.00%
VALU: 11614810 -> 11614912 (+0.00%); split: -0.00%, +0.00%
SALU: 3794531 -> 3794655 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28763>
2024-04-23 12:31:59 +00:00
Rhys Perry
0ee4fa33bc aco: schedule LDSDIR instructions
fossil-db (navi31):
Totals from 33850 (42.63% of 79395) affected shaders:
MaxWaves: 1011236 -> 1011204 (-0.00%)
Instrs: 23589117 -> 23559185 (-0.13%); split: -0.21%, +0.08%
CodeSize: 126099716 -> 125968376 (-0.10%); split: -0.17%, +0.07%
VGPRs: 1348632 -> 1356012 (+0.55%); split: -0.09%, +0.63%
Latency: 183233795 -> 180997751 (-1.22%); split: -1.33%, +0.11%
InvThroughput: 27081576 -> 27056383 (-0.09%); split: -0.15%, +0.06%
VClause: 386453 -> 386551 (+0.03%); split: -0.11%, +0.13%
SClause: 811941 -> 813023 (+0.13%); split: -0.38%, +0.52%
Copies: 1279706 -> 1280051 (+0.03%); split: -0.46%, +0.49%
Branches: 416940 -> 416938 (-0.00%); split: -0.02%, +0.02%
VALU: 13566410 -> 13567367 (+0.01%); split: -0.04%, +0.04%
SALU: 1835804 -> 1835652 (-0.01%); split: -0.02%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11013
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28763>
2024-04-23 12:31:59 +00:00
Rhys Perry
0bc8a9be67 aco: make store clauses more aggressively
Apparently this significantly improves performance of a radeonsi resolve
shader.

fossil-db (navi31):
Totals from 2372 (2.99% of 79395) affected shaders:
MaxWaves: 59903 -> 59863 (-0.07%)
Instrs: 3508838 -> 3506178 (-0.08%); split: -0.10%, +0.02%
CodeSize: 18516272 -> 18505956 (-0.06%); split: -0.07%, +0.02%
VGPRs: 152708 -> 154604 (+1.24%)
Latency: 27881253 -> 27861445 (-0.07%); split: -0.07%, +0.00%
InvThroughput: 4076649 -> 4076220 (-0.01%); split: -0.03%, +0.02%
VClause: 92696 -> 89409 (-3.55%); split: -3.55%, +0.01%
Copies: 310787 -> 311697 (+0.29%); split: -0.03%, +0.32%
VALU: 1891048 -> 1891933 (+0.05%); split: -0.01%, +0.05%
VOPD: 2534 -> 2559 (+0.99%); split: +1.07%, -0.08%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11014
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28763>
2024-04-23 12:31:59 +00:00
Rhys Perry
1bce498bbf aco: include LDSDIR in latency/etc stats
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28763>
2024-04-23 12:31:59 +00:00
Iago Toral Quiroga
6c73c9bb16 v3d/simulator: size counter_values array correctly on V3D 7.x
sim_state.perfcnt_total provides the total number of counters
supported by the underlying simulated platform and is what we
use when we create a perform to validate that the counters
requested are valid, so we should use this.

V3D_PERFCNT_NUM is a fixed enum value that is only valid for
V3D 4.2 at present and is not sufficiently large for all the
counters available in V3D 7.x.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28870>
2024-04-23 11:20:08 +00:00
Tomeu Vizoso
0c0d62ba70 etnaviv/nn: Implement zero run length encoding of weights
Check how much smaller can the weight+bias buffers be with different
amount of bits to encode runs of zeroes and choose the smallest one.

This reduces the bandwidth considerably, which is at present the
bottleneck with useful models.

On a Libre Computer Alta AML-A311D-CC, I see these improvements:

MobileNetV1: 15.650ms -> 9.991ms
SSDLite MobileDet: 56.149ms -> 32.692ms

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27513>
2024-04-23 10:55:24 +02:00
Erik Faye-Lund
1e78d9aaca panfrost: use util_debug_message for perf_debug
This way, applications can get to know about performance issues when
they happen, using the debug callback mechanism.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28693>
2024-04-23 10:09:41 +02:00
Erik Faye-Lund
ef4c6e9345 panfrost: perf_debug_ctx -> perf_debug
Now that we only call one of these, the other one is superfluous. So
let's combine them and use the shorter name for the result.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28693>
2024-04-23 10:09:37 +02:00
Erik Faye-Lund
7655257c82 panfrost: use perf_debug_ctx instead of perf_debug
This allows us to use perf_debug_ctx() instead of perf_debug(), which
will help make things a bit cleaner down the line.

In order to do this, we also need to make sure we always have access to
the context, so let's also pass ctx to panfrost_should_linear_convert
while we're at it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28693>
2024-04-23 10:09:32 +02:00
Samuel Pitoiset
e4f945cd4a vulkan: pass cmdbuf level to vk_command_buffer_ops::create()
RADV needs to know the command buffer level in the create() helper.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28861>
2024-04-23 06:33:31 +00:00
Christian Gmeiner
1fb9e67f7e etnaviv: drm: Drop NPU-related params
All of the NPU related DRM_ETNAVIV_GET_PARAM values, which got introduced in
6.9-rc1 of the kernel got removed before the 6.9 release. Clean-up our code base.

NPU support _NEEDS_ hwdb support and a recent stable kernel.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28837>
2024-04-23 05:39:57 +00:00
Francisco Jerez
62aab1437e intel/fs/gfx20+: Handle subdword integer regioning restrictions in copy propagation.
This makes sure that copy propagation doesn't undo the lowering of
restricted sub-dword integer regions done by brw_fs_lower_regioning().

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28698>
2024-04-22 18:02:32 -07:00
Francisco Jerez
217d412360 intel/fs/gfx20+: Implement sub-dword integer regioning restrictions.
This patch introduces code to enforce the pages-long regioning
restrictions introduced by Xe2 that apply to sub-dword integer
datatypes (See BSpec page 56640).  They impose a number of
restrictions on what the regioning parameters of a source can be
depending on the source and destination datatypes as well as the
alignment of the destination.  The tricky cases are when the
destination stride is smaller than 32 bits and the source stride is at
least 32 bits, since such cases require the destination and source
offsets to be in agreement based on an equation determined by the
source and destination strides.  The second source of instructions
with multiple sources is even more restricted, and due to the
existence of hardware bug HSDES#16012383669 it basically requires the
source data to be packed in the GRF if the destination stride isn't
dword-aligned.

In order to address those restrictions this patch leverages the
existing infrastructure from brw_fs_lower_regioning.cpp.  The same
general approach can be used to handle this restriction we were using
to handle restrictions of the floating-point pipeline in previous
generations: Unsupported source regions are lowered by emitting an
additional copy before the instruction that shuffles the data in a way
that allows using a valid region in the original instruction.  The
main difficulty that wasn't encountered in previous platforms is that
it is non-trivial to come up with a copy instruction that doesn't
break the regioning restrictions itself, since on previous platforms
we could just bitcast floating-point data and use integer copies in
order to implement arbitrary regioning, which is unfortunately no
longer a choice lacking a magic third pipeline able to do the
regioning modes the integer pipeline is no longer able to do.

The required_src_byte_stride() and required_src_byte_offset() helpers
introduced here try to calculate parameters for both regions that
avoid that situation, but it isn't always possible, and actually in
some cases that involve the second source of ALU instructions a chain
of multiple copy instructions will be required, so the
lower_instruction() routine needs to be applied recursively to the
instructions emitted to lower the original instruction.

XXX - Allow more flexible regioning for the second source of an
      instruction if bug HSDES#16012383669 is fixed in a future
      hardware platform.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28698>
2024-04-22 18:02:07 -07:00
Mike Blumenkrantz
4cc975c6e9 glx: silence more implicit-load zink errors
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139>
2024-04-22 23:25:58 +00:00
Mike Blumenkrantz
e3ea55fef2 zink: don't print error messages when failing an implicit driver load
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139>
2024-04-22 23:25:58 +00:00
Mike Blumenkrantz
b53a402edc pipe-loader: plumb a flag for implicit driver load through screen creation
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139>
2024-04-22 23:25:58 +00:00
Mike Blumenkrantz
744307289c frontends/dri: plumb an 'implicit' param through screen init
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139>
2024-04-22 23:25:58 +00:00
Mike Blumenkrantz
4742d9bc1a gbm: plumb an 'implicit' param through device creation
this is always true except in the software fallback

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139>
2024-04-22 23:25:58 +00:00
Mike Blumenkrantz
14c44aacff dri: plumb a 'implicit' param through createNewScreen interfaces
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139>
2024-04-22 23:25:58 +00:00
Mike Blumenkrantz
014bbae4bf glx: pass implicit load param through allocation
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139>
2024-04-22 23:25:58 +00:00
Mike Blumenkrantz
91c757bda1 glx: add an 'implicit' param to createScreen
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139>
2024-04-22 23:25:58 +00:00
Mike Blumenkrantz
1b9ee76369 glx: fix some indentation
ifdefs are hard

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139>
2024-04-22 23:25:58 +00:00
Mike Blumenkrantz
0e8202cc24 loader: delete unused param from pipe_loader_vk_probe_dri()
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139>
2024-04-22 23:25:58 +00:00
Guilherme Gallo
4b81ee6418 ci/lava: Fix how exception entry in structured log
Improves the error logging in the LAVA job submitter by capturing and
logging the exception message rather than just the exception type when a
job fails to run.

Additionally, introduces a clearer script interruption
message to aid in debugging and immediate understanding of job
submission failures.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28778>
2024-04-22 21:20:07 +00:00
Guilherme Gallo
e96e25f323 ci/lava: Don't run jobs if the remaining execution time is too short
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28778>
2024-04-22 21:20:07 +00:00
Guilherme Gallo
3e33171471 ci/lava: Introduce unretriable exception handling
This commit refactors the exception hierarchy to differentiate between
retriable and fatal errors in the CI pipeline, specifically within the
LAVA job submission process.

A new base class, `MesaCIRetriableException`, is introduced for
exceptions that should trigger a retry of the CI job, while
`MesaCIFatalException` is added for non-recoverable errors that halt the
process immediately.

Additionally, the logic for deciding whether a job should be retried or
not is updated to check for instances of `MesaCIRetriableException`,
improving the robustness and reliability of the CI job execution
strategy.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28778>
2024-04-22 21:20:07 +00:00
Guilherme Gallo
5363874676 ci/lava: A few formatting cleanups
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28778>
2024-04-22 21:20:07 +00:00
Caio Oliveira
13093ceb3c intel/brw: Move validate out of fs_visitor
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28534>
2024-04-22 13:38:41 -07:00
Caio Oliveira
671d216f39 intel/brw: Remove two duplicated validate calls in optimizer
The OPT macro will call validate() after each pass, so both cases
removed by this patch are just redundant calls.  Will only affect
Debug builds since in Release builds validation is a no-op.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28534>
2024-04-22 13:38:41 -07:00
Caio Oliveira
8a6fe54409 intel/brw: Refactor FS validation macros
Use `a` and `b` (already identified as that in the output message)
instead of `f` and `s` for the two values being compared, since in
a later patch `s` will be used to hold the fs_visitor shader.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28534>
2024-04-22 13:38:41 -07:00
Echo J
d184808124 nvk: Don't advertise residencyAlignedMipSize on MaxwellB+
DXVK/vkd3d-proton require this feature to be advertised as VK_FALSE for FL12 support:
https://github.com/doitsujin/dxvk/blob/v2.3.1/src/d3d11/d3d11_features.cpp#L305
https://github.com/HansKristian-Work/vkd3d-proton/blob/v2.12/libs/vkd3d/device.c#L7426

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28850>
2024-04-22 20:11:49 +00:00
Echo J
be940a7dc6 nvk: Use implicit pipeline cache
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28851>
2024-04-22 14:37:59 -05:00
Faith Ekstrand
59bba821ef nvk: Hash ycbcr conversions in the descriptor set layout hash
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28851>
2024-04-22 14:37:59 -05:00
Echo J
0f46e279ba vulkan: Add implicit pipeline caching support
This mirrors RADV's pipeline behavior (which is more performant
when programs like DXVK don't use the pipeline cache functionality)

Drivers need to set the implicit cache variable to use this though
(the next patch will enable this for NVK)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28851>
2024-04-22 14:37:59 -05:00
Eric R. Smith
dae6b6a23d panfrost: fix an incorrect stencil clear optimization
We track stencil clears and writes to optimize them. Unfortunately, the
code for doing this tracks the whole resource, not individual layers or
levels within the resource, which can result in incorrect output when
different levels or layers are accessed. Modified to optimize only the first
layer/level; this will handle the common case of a single stencil texture
while allowing arrays or mipmaps to still work (albeit slightly slower).

The original optimization was introduced in a2463ec271 ("panfrost:
Constant stencil buffer tracking") but the code has been reformatted
since then, so this change won't apply as-is that far back (although it's
fairly obvious how to apply it by hand).

Fixes: a2463ec271 ("panfrost: Constant stencil value tracking")
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28832>
2024-04-22 16:43:51 +00:00
Mike Blumenkrantz
e89123ec73 zink: prune some piglit cts fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28859>
2024-04-22 16:16:59 +00:00
Yonggang Luo
bf2df78575 broadcom/common: Now "util/box.h" is under src, so remove the FIXME
Remove the redundant inc_gallium_aux and inc_gallium

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28854>
2024-04-22 15:01:34 +00:00
Tomeu Vizoso
ef111f5f07 etnaviv: Don't init the blitter in compute-only contexts
Otherwise, we hit this assertion:

etna_vertex_elements_state_create: Assertion `buffer_idx < screen->specs.stream_count' failed.

As specs.stream_count can be zero in GPUs that are compute only.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28848>
2024-04-22 14:28:46 +00:00
Samuel Pitoiset
095e3af2b0 radv: add RADV_DEBUG=psocachestats to report per-pipeline cache hits/misses
This can be useful to make sure precompilation works as expected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28829>
2024-04-22 13:54:05 +00:00
Samuel Pitoiset
1f4ee45914 radv: rework pipeline cache search helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28829>
2024-04-22 13:54:05 +00:00
Samuel Pitoiset
bbe52934b6 radv: use radv_pipeline::sha1 for graphics/compute pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28829>
2024-04-22 13:54:05 +00:00
Samuel Pitoiset
6e24da3ad4 radv/rt: move radv_ray_tracing_pipeline::sha1 to radv_pipeline
To re-use it for graphics/compute pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28829>
2024-04-22 13:54:05 +00:00
Samuel Pitoiset
862d53f00a radv/rt: remove unnecessary param to radv_ray_tracing_pipeline_cache_insert()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28829>
2024-04-22 13:54:05 +00:00
Robert Mader
6bbf8a08a4 panfrost: Use pipe resource helper
Like we already do in panfrost_resource_get_param().
While on it, update the later to use pan_resource() again for
consistency. No functional changes intended.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28362>
2024-04-22 13:28:41 +00:00
Rhys Perry
e0db4b458b radv: cache RT stage info
If a RT pipeline misses the cache but it's imported stages hit the cache,
then can_inline might be false when it should be true.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28788>
2024-04-22 11:55:26 +00:00
Joshua Ashton
122455b686 radv: Properly initialize imageCreateFlags in GetPhysicalDeviceVideoFormatPropertiesKHR
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28841>
2024-04-22 11:33:39 +00:00
Eric Engestrom
ba32ea6da3 llvmpipe/ci: update expectations after piglit uprev
Fixes: ec45e8294c ("Uprev Piglit to f7ece74a107a2f99b2f494d978c84f8d51faa703")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28853>
2024-04-22 10:56:45 +00:00
Eric Engestrom
dc387e000c radeonsi/ci: update vangogh expectations after piglit uprev
Fixes: ec45e8294c ("Uprev Piglit to f7ece74a107a2f99b2f494d978c84f8d51faa703")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28852>
2024-04-22 12:14:44 +02:00
M Henning
6b22fff658 nvk: Don't use a descriptor cbuf if it's too large
This fixes a test on vkd3d-proton commit 836446ce25
VKD3D_TEST_FILTER=test_typed_buffers_many_objects_dxil build/tests/d3d12

Fixes: f1c909edd5 ("nvk/nir: Add cbuf analysis to nvi_nir_lower_descriptors()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28844>
2024-04-22 08:45:37 +00:00
M Henning
f6301a7727 nak: Count GLOBAL_SIZE_OFFSET in bytes, not words
This matches what nvk_mme_dispatch_indirect expects

Fixes: 16f2249a ("nvk: Use the NAK helpers to fill QMDs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28844>
2024-04-22 08:45:37 +00:00
Boris Brezillon
34ffa4cd10 nir/lower_blend: Fix nir_blend_logicop() for 8/16-bit integer formats
src and dst can be integer types, and doing an f2f on such types
messes up with the original value. Make sure we keep the original type
when {up,down}sizing the src, dst and out values.

Fixes: f3de2bd6c2 ("nir: Add blend lowering pass")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28839>
2024-04-22 09:58:41 +02:00
Marek Olšák
e5f133ccc4 util: import pipe_box and its helpers
We'll use them. There are also new helpers that we'll use.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28733>
2024-04-22 01:42:52 +00:00
Marek Olšák
959891e33f util: add new format helpers
we'll use them

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28733>
2024-04-22 01:42:52 +00:00
Gert Wollny
2bb102f020 r600/sfn: Don't put b2f64 conversion into ALU group
There is no need to pin the ops into channels because
these are 32 bit ops that can be executed independent
from each other.

Fixes: 79ca456b48
     r600/sfn: rewrite NIR backend

v2: grammar fixes (lorn10)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28840>
2024-04-21 19:06:02 +00:00
Gert Wollny
07995b98a8 r600/sfn: when emitting fp64 op2 groups pre-load values
Since the group is created from the onset, we have to make
sure that four or eight src values don't have a readport
conflict, so force a pre-loading of the values to registers
evenly distributed over the channels and let copy-propagation
take care of cleaning up un-neccesary moves.

Fixes: 79ca456b48
   r600/sfn: rewrite NIR backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28840>
2024-04-21 19:06:02 +00:00
Gert Wollny
36c81b5e88 r600/sfn: call nir_lower_doubles explicitely
Fixes: 5218cff34b
    nir/algebraic: avoid double lowering of some fp64 operations

v2: grammar fixes (lorn10)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28840>
2024-04-21 19:06:02 +00:00
Gert Wollny
bf44ce61bb r600/sfn: Use dependecies to order barriers and LDS/RAT instructions
This gives more freedom to schedule the group barrier and removes
the need to add blocks around a barrier to keep the scheduler in
check. This should avoid emitting some CF instructions.

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

Fixes: fe881bf097
    r600/sfn: move kill handling fully to scheduling

v2: grammar fixes (lorn10)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28840>
2024-04-21 19:06:02 +00:00
Gert Wollny
a61b658d5f r600/sfn: Add array element parent also to array
This is probably overdoing debendencies in many cases,
but it fixes a bug where scheduling goes wrong.

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

Fixes: ddb167e81a
  r600/sfn: Handle indirect array load/store dependencies better

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28840>
2024-04-21 19:06:02 +00:00
Manuel Stoeckl
04f232ed99 util/disk_cache: try getenv(HOME) before getpwuid->pw_dir
getenv("HOME") is significantly faster than getpwuid_r(...)->pw_dir,
because the latter may require loading NSS libraries, reading
/etc/passwd, etc.

Furthermore, the Linux man pages for getpwuid_r recommend using
getenv("HOME") instead of getpwuid_r, because the user may wish to
change the value of HOME after logging in.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13614>
2024-04-20 13:43:50 +00:00
Konstantin
c2b1555a57 ac/parse_ib: Always print the value of the whole register
ac_dump_reg is used by radv for dumping descriptors when writing a hang
report. Including the hex-value of the whole register help correlating
descriptors with SGPR values in the UMR wave dump.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:23 +00:00
Konstantin
f4c6664d4b radv/debug: Dump descriptor binding information
Can be useful for correlating offsets with descriptors.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:23 +00:00
Konstantin
e27deed2ab radv/debug: Try to find unbound shaders
Use radv_find_shader to correlate shaders to PCs.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:23 +00:00
Konstantin
23c167f826 radv: Canonicalize addresses in radv_find_shader
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:23 +00:00
Konstantin
48b79a18c5 radv/debug: Canonicalize shader addr
The most significant bits of the PC are cleared.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:23 +00:00
Konstantin
9778e1b9a0 ac/debug: Handle the output of recent umr versions
umr was changed to always display the human readable format.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10127
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:22 +00:00
Timur Kristóf
65f5f1559f ac/nir/ngg: Fix packing 16-bit MS outputs.
Fixes: 9f36fba9be

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28765>
2024-04-20 09:30:34 +02:00
Timur Kristóf
c6c9da0336 ac/nir/lower_legacy_gs: Implement packed 16-bit GS outputs in non-dedicated slots.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28765>
2024-04-20 09:30:32 +02:00
Timur Kristóf
abfce64880 ac/nir/lower_legacy_vs: Implement packed 16-bit VS/TES outputs in non-dedicated slots.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28765>
2024-04-20 09:30:30 +02:00
Timur Kristóf
4a11323513 ac/nir/ngg: Implement packed 16-bit GS outputs in non-dedicated slots.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28765>
2024-04-20 09:30:28 +02:00
Timur Kristóf
0f85f9060b ac/nir/ngg: Implement packed 16-bit VS/TES outputs in non-dedicated slots.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28765>
2024-04-20 09:30:10 +02:00
Robin Kertels
d097a60d57 nvk: Advertise VK_KHR_shader_subgroup_rotate.
Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27863>
2024-04-19 21:05:14 +00:00
Robin Kertels
714acf7d21 nak: Enable lowering rotate to shuffle.
Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27863>
2024-04-19 21:05:14 +00:00
Faith Ekstrand
42b85780c6 nil: Advertise S8_UINT on MaxwellB+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 15:43:14 -05:00
Faith Ekstrand
58b5f6b678 nil: Be more speicific about Maxwell in the format table
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 15:43:14 -05:00
Faith Ekstrand
4821c49ca7 nil: add s8 pte kind
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 15:43:14 -05:00
Faith Ekstrand
208f8ed429 nil: Use the enums from the hwref headers for PTE kinds
This isn't an exact translation.  It's identical to the previous values
for all uncompressed items but I fixed some of the compressed ones
(which we don't currently use) based on the enum names.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 15:43:14 -05:00
Faith Ekstrand
51ffb45b5c nouveau/headers: Add the MMU headers to the Rust crate
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 15:43:14 -05:00
Faith Ekstrand
3bd8a2568d nouveau: Import the hwref headers from Nvidia OGK
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 14:20:35 -05:00
Faith Ekstrand
16f2249a80 nvk: Use the NAK helpers to fill QMDs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:03 +00:00
Faith Ekstrand
9ace83603d nvk: QMDs are 64 dwords
All the QMD structs are 2048 bits which, unless I'm doing my math wrong,
is 64 dwords, not 128.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:03 +00:00
Faith Ekstrand
b9c0e3c1ab nak: Add helpers for filling QMDs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:03 +00:00
Faith Ekstrand
64f02ac16d nouveau/headers: Generate Rust for QMDs
This also involves adding array support to the struct parser.
Fortunately, the header files for QMDs are really consistent here and we
can make lots of assumptions like that i is always the index variable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:02 +00:00
Faith Ekstrand
20c1a69125 nouveau/headers: Move the classes into a submodule for Rust
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:02 +00:00
Faith Ekstrand
7e87f3ccde nvk: Restrict shaderFloat16 to Ampere+ for now
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:02 +00:00
Valentine Burley
4850aebcaf tu: Replace TU_FROM_HANDLE with VK_FROM_HANDLE
It was exactly the same thing.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28571>
2024-04-19 18:00:12 +00:00
Ian Romanick
a5adbae6f6 nir: intel/brw: Remove cmat_signed_mask from dpas_intel intrinsic
It is not used. The signedness is inferred from src_type and dest_type.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28822>
2024-04-19 09:53:29 -07:00
Ian Romanick
2ce558d928 intel/brw: Fix handling of cmat_signed_mask
For integer types, the signedness is determined by flags on the muladd
instruction. The types of the sources play no role. Previously we were
using the signedness of the type and ignoring the mask.

Adjust the types passed to the dpas_intel intrinsic to match.

Fixes various
dEQP-VK.compute.*.cooperative_matrix.khr_*.matrixmuladd_cross.* tests on
different Intel platforms. Some platforms had failing tests, and some
platforms failed EU validation before the tests could fail.

Fixes: 6b14da33ad ("intel/fs: nir: Add nir_intrinsic_dpas_intel")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28822>
2024-04-19 09:53:27 -07:00
Mike Blumenkrantz
ce05a7c3a2 zink: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28723>
2024-04-19 14:47:10 +00:00
Mike Blumenkrantz
6fe0cfdc09 zink: vectorize io loads/stores when possible
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28723>
2024-04-19 14:47:10 +00:00
Mike Blumenkrantz
3c673919c3 zink: run nir_lower_io_to_scalar (mostly) unconditionally and earlier
this fixes some cases with separate shaders where an output component
store was eliminated early but the input component load was not also
eliminated

some outputs can't yet be scalarized without exploding everything

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28723>
2024-04-19 14:47:10 +00:00
Mike Blumenkrantz
4b2fe347b1 zink: copy shader name when copying shader info
this needs a separate allocation

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28723>
2024-04-19 14:47:10 +00:00
Samuel Pitoiset
390479e948 zink/ci: update CI lists since piglit uprev
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28830>
2024-04-19 14:25:08 +00:00
José Roberto de Souza
18d8c3ca33 anv: Add missing ANV_BO_ALLOC_INTERNAL
Some places doing driver internal allocations was not setting
ANV_BO_ALLOC_INTERNAL, so adding the flag in those places here.

This will increase the accuracy of the RMV report.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28677>
2024-04-19 13:15:01 +00:00
Connor Abbott
bfa189b6e8 docs/android: Improve instructions for replacing driver
"adb remount -R" doesn't actually remount partitions read/write, it just
enables the overlayfs and it needs to be followed by "adb remount" after
rebooting to actually remount.

Also, patchelf seems to work for changing the soname and is probably
better than hacking meson.build.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28812>
2024-04-19 12:39:31 +00:00
Connor Abbott
57abef5af1 docs/android: Fix example meson cross file
The system needs to be android, or else we run into the libarchive build
error fixed in 735fe243a7:

In file included from ../subprojects/libarchive-3.7.2/libarchive/archive_write_open_memory.c:33: ../subprojects/libarchive-3.7.2/libarchive/archive.h:101:10: fatal error: 'android_lf.h' file not found

Also, it uses the aarch64 clang but "cpu = 'armv8'", which doesn't
work (armv8 is the 32-bit version). Use aarch64 as presumably intended.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28812>
2024-04-19 12:39:31 +00:00
Connor Abbott
61b2bd861f ir3: Rewrite nop insertion
Don't try to chase across blocks to find a matching destination for a
given source. This can be prone to exponential blowup when there is a
complicated series of if-ladders and we have to crawl through every
possible path. With scalar ALU, this was causing timeouts on one test
when we stopped counting scalar ALU. Rather than adding yet more
band-aids, just switch to a different approach that most other backends
are using where we have a scoreboard of outstanding registers and we
keep track of the cycle when each register becomes "ready". This
integrates nicely into the pre-existing ir3 legalize infrastructure for
(ss) and (sy), although it does require duplicating the logic in
ir3_delayslots() in a different form.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28750>
2024-04-19 12:02:59 +00:00
Connor Abbott
9df3323564 ir3/legalize: Fix intra-block state propagation with loops
At the beginning of each block we were taking the state for the current
block, which after traversing the block already will contain the state
at the *end* of the block, and combining it with the predecessors to get
the state for the *start* of the block. This will cause
over-synchronization.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28750>
2024-04-19 12:02:58 +00:00
Sergi Blanch Torne
ec45e8294c Uprev Piglit to f7ece74a107a2f99b2f494d978c84f8d51faa703
dd6f7eaf82...f7ece74a10

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28820>
2024-04-19 11:25:20 +00:00
Mary Guillemard
6c00441bfa panvk: Advertise VK_KHR_driver_properties
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28715>
2024-04-19 11:03:22 +00:00
Mary Guillemard
f7f9b3d170 panvk: Move to vk_properties
This remove GetPhysicalDeviceProperties2 in favor of vk_properties.

This report the same values as previous on vulkaninfo.

In case some missing values, the same values as the ARM proprietary
driver were used.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28715>
2024-04-19 11:03:22 +00:00
Mary Guillemard
a9f170f613 panvk: Fix driver UUID not being filled
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28715>
2024-04-19 11:03:22 +00:00
Mary Guillemard
a0f80774ce panvk: Return os_page_size for minMemoryMapAlignment
The spec says "When mapping a memory allocation with vkMapMemory,
subtracting offset bytes from the returned pointer will always produce
an integer multiple of this limit", meaning the OS page size.

As the page size depends on the kernel configuration, this should be
queried at runtime.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28715>
2024-04-19 11:03:22 +00:00
Boris Brezillon
c040283e7a panvk: Dissociate UBO and push_constant emission
Now that push constants are pushed to the FAU buffer, we can dissociate
UBO preparation from push constant preparation, and have
panvk_cmd_prepare_push_constants() called explicitly from
panvk_cmd_draw()/panvk_CmdDispatch().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28397>
2024-04-19 10:41:51 +00:00
Boris Brezillon
0721de3bb9 panvk: Stop lowering push constant loads to UBO loads
Now that we populate the push constant array properly, and the bifrost
compiler lowers dynamic push constant indexing, we can kill the push
constant lowering pass we had in panvk.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28397>
2024-04-19 10:41:51 +00:00
Boris Brezillon
46e764c5e1 panvk: Pass the push constant array to draw/dispatch calls
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28397>
2024-04-19 10:41:51 +00:00
Boris Brezillon
04d7b9c396 panvk: Stop declaring one push constant array per graphics stage
The push constant array is shared by all stages anyway, so let's just
declare one array. While at it, change the name into push_uniforms to
be consistent with the name we have in panvk_dispatch.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28397>
2024-04-19 10:41:51 +00:00
Eric Engestrom
fac41af93c rpi4/ci: add new flakes from last night's run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28827>
2024-04-19 10:14:35 +00:00
Eric Engestrom
2d24561da9 rpi4/ci: sort flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28827>
2024-04-19 10:14:35 +00:00
Eric Engestrom
3432abd611 rpi5/ci: add flakes from last night's run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28827>
2024-04-19 10:14:35 +00:00
Eric Engestrom
e34850ea23 rpi5/ci: sort flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28827>
2024-04-19 10:14:35 +00:00
David Rosca
9bfb07586c radv/video: Implement per picture type min/max QP
Bump required FW version for VCN 1 and 2.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28727>
2024-04-19 09:51:07 +00:00
David Rosca
694cc4728d radv/video: Avoid resetting rate control every frame
begin() resets rate control state, calling it every frame will cause
issues such as not reaching the desired target bitrate.
Rate control only has to be reset when changing rate control mode,
otherwise it's enough to update the parameters.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28727>
2024-04-19 09:51:06 +00:00
David Rosca
1000260ed8 radv/video: Set maxSublayerCount to 4 for H265
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28727>
2024-04-19 09:51:06 +00:00
Eric Engestrom
b65341fd3a docs/ci: explain how gitlab considers "changes" when pushing on a fork branch
And add a workaround for people hitting this unexpected behaviour.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28809>
2024-04-19 09:42:42 +00:00
Juan A. Suarez Romero
ea1f09a5f2 v3dv/ci: update expected list
Add new failures due CTS upgrade.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28824>
2024-04-19 09:19:09 +00:00
Timur Kristóf
b3c6b48493 ac/nir/tess: Use LDS IO mapping when loading tess levels from LDS.
By accident, the VRAM mapping was used. This doesn't cause issues
in practice because the offsets are really the same, but it's still
better to fix this.

Fixes: c61eb54806
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28739>
2024-04-19 08:54:24 +00:00
Timur Kristóf
0fdb388698 ac/nir/tess: Split I/O mapping to two functions.
No functional changes, just improves code clarity.

Fixes: c61eb54806
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28739>
2024-04-19 08:54:24 +00:00
Timur Kristóf
2d9e38dbe5 radv: Calculate VRAM tess patch size independently of LDS size.
We recently made some effort to reduce the LDS use of TCS:
The lowering no longer uses the same output location mapping when
storing TCS outputs to LDS and VRAM. This means that the same
patch will use a different amount of LDS and VRAM.

Therefore, we need to properly calculate the patch size in VRAM
when determining the number of output patches.

Fixes: 0e481a4adc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28739>
2024-04-19 08:54:23 +00:00
Timur Kristóf
8190a65c78 radv: Rename LDS related variables in get_tcs_num_patches.
No functional changes, just improves code clarity.

Fixes: 0e481a4adc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28739>
2024-04-19 08:54:23 +00:00
Samuel Pitoiset
54b08d6bbf radv: return per plane requirements for disjoint images
Returning the whole image size/alignment isn't wrong but it's wasteful
for disjoint images which requires a separate bound memory object per
plane.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10997
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28808>
2024-04-19 08:17:55 +00:00
Samuel Pitoiset
e18cc3b39b radv: fix waiting for occlusion queries on GFX6-8
Occlusion queries don't go through L2 on GFX6-8, and waiting properly
in shaders is more complicated to implement. Use the previous
WAIT_REG_MEM logic on these GPUs to fix this.

This fixes flickering on many games on GFX8.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8954
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9415
Fixes: d44651bfc3 ("radv: wait for occlusion queries in the resolve query shader")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28796>
2024-04-19 07:36:37 +00:00
Mary Guillemard
fe1aa98ab9 nak: Allow SHF to use immediate encoding for shift
This is pretty common and avoid using a register for nothing in most
cases.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28819>
2024-04-19 07:18:22 +00:00
Eric Engestrom
f008f6a33b util/futex: replace double-cast check with a simple sign check
We want to know whether the signed int can be represented by an unsigned int
of the same size (no down-cast); for that, all we need is for it to be `>= 0`,
so let's check that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28804>
2024-04-19 06:38:58 +00:00
Mike Blumenkrantz
042b8a65d3 brw/lower_a2c: fix for scalarized fs outputs
it's legal for a fs to write xyzw components separately,
and this pass should handle such cases

cc: mesa-stable

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28752>
2024-04-18 23:27:22 +00:00
Jordan Justen
4e5ed7ebd5 intel/brw: Avoid getting a stride of 0 for nir_intrinsic_exclusive_scan
Ref: 671745b616 ("intel/fs: Don't allow 0 stride on MOV destination")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28821>
2024-04-18 23:03:57 +00:00
Ian Romanick
90e12ed843 intel/brw/xe2+: Only apply Wa 22016140776 to math instructions
The check in has_invalid_src_region incorrectly omitted inst->is_math()
from the condition.

Fixes: 0e817ba548 ("intel/brw/xe2+: Implement Wa 22016140776")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28821>
2024-04-18 23:03:57 +00:00
Lucas Fryzek
112063a060 llvmpipe: Only use udmabuf if header is found
Fixes #11032

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28810>
2024-04-18 22:20:58 +00:00
Lucas Fryzek
053b5f3e0c llvmpipe: Only return null resource handle when dt is not mapped
Fixes #10995

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28810>
2024-04-18 22:20:57 +00:00
Robin Kertels
639fe038ce nvk: Enable EXT_nested_command_buffer.
Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27856>
2024-04-18 21:40:18 +00:00
Faith Ekstrand
8d56c89b55 nvk: Improve the unsupported handle type error
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28714>
2024-04-18 20:25:07 +00:00
Arthur Huillet
9542449397 nvk: remove useless MME scratch 26 usage
The blob uses MME shadow scratch 26 to indicate whether or not it is running in
a simulated environment (not real hardware).  If true, the SET_FALCON04
firmware method used to modify PRI registers isn't used.

As Nouveau only runs on real hardware, this is useless and can be removed.

Tested by running dEQP-VK.subgroups.vote.frag_helper.subgroupallequal_bvec2_fragment,
which exposes the original issue with a ~50% failure rate on RTX3080
(when disabling the register write altogether). With this change, the
success rate remains at 100%.

Signed-off-by: Arthur Huillet <ahuillet@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28714>
2024-04-18 20:25:07 +00:00
Iván Briano
164c0951a0 anv, hasvk: check requirements for USAGE_INPUT_ATTACHMENT properly
If the format doesn't support the COLOR_ATTACHMENT or DEPTH_STENCIL
features, it can't be used as an input attachment.

Fixes future CTS tests: dEQP-VK.api.info.unsupported_image_usage.*

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28818>
2024-04-18 20:04:39 +00:00
Paulo Zanoni
f3e97d30d9 anv: const-correct anv_{image,buffer}_is_sparse()
I had to do this in a debugging session when I wrote some extra code
to debug sparse issues. I also have a pending patch that will require
this.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni
1cca5e8b32 anv/sparse: fail the right way in anv_GetDeviceImageSparseMemoryRequirements()
If an application tries to call
vkGetDeviceImageSparseMemoryRequirements() for an image that's not
supported by Sparse, then anv_image_init_from_create_info() will fail
and we will either hit the assertion in case of a debug build or just
pretend everything works in case of a release build. Properly return
no properties to signal the image is not supported.

The spec is not clear in specifying that this is what should be done
in this case, but this behavior should match the other
query-properties-from-sparse-images-we-didn't-create-yet functions
such as vkGetPhysicalDeviceSparseImageFormatProperties().

No known application outside my computer is tripping on this failure.
I discovered it when writing my own micro test cases for MSAA sparse.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni
10ee2a510a anv/xe: rename and refactor xe_exec_fill_sync()
While it lived inside anv_batch_chain.c it made sense to call this
function xe_exec_fill_sync() because, well, the function was used to
fill the sync objects for the xe execbuf ioctl. Now that the function
is exported to the .h file and accessible to the rest of the driver,
let's give it a name that reflects what it does instead of what it was
used for when it was static: call it vk_sync_to_drm_xe_sync() because
it converts a vk_sync to a drm_xe_sync.

Also let's bikeshed the implementation so that it returns the struct
it builds: this should make callers cleaner and easier to understand.

No functional changes, only bikeshedding.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni
1c9b13119e anv/xe: de-duplicate xe_exec_fill_sync()
I had accidentally hardcoded an alternative implementation in
xe_vm_bind_op().

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni
5346442e74 anv/xe: assert we're using drm_syncobjs only once
Everything on our xe.ko backend is built on top of this assertion.
Assert it during driver initialization and just don't bother with it
anymore later.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni
045182092e anv/xe: slightly improve error handling for the vm_bind ioctl
The reason we made the vm_bind ioctl return DEVICE_LOST on error is
that we thought there wasn't anything we could do if the ioctl failed.

Thomas Hellstrom pointed us that in case the system is under memory
pressure ENOMEM will be returned and there are things we can try to do
to make it work: either free memory or do fewer bind operations per
ioctl. For now let's just return the appropriate error for the case
(OUT_OF_HOST_MEMORY) so that maybe applications can try to something
about it. In the next patch we'll implement an additional strategy to
try to make things work.

Due to an unrleated failure, our CI system has also pointed out that
we were submitting invalid arguments, so we were getting an EINVAL.
Although we fixed that, these situations really shouldn't happen and
they should be easy to detect, so just put an assertion there, which
will make it easier for us developers to spot any issues.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni
f17d7655fe anv/xe: add a 'flags' parameter to the vm_bind() kmd_backend function
For now there's only one flag, but we're about to add another.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni
15b6f321af anv/xe: extract anv_vm_bind_to_drm_xe_vm_bind()
The xe_vm_bind_op() function is already way too big for my tiny little
brain. Make it 42 lines shorter.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
José Roberto de Souza
461794554a intel/tools/error2hangdump: Add Xe KMD support
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28720>
2024-04-18 19:12:41 +00:00
José Roberto de Souza
0db081f096 intel/tools/error2hangdump: Move i915 parser to a function
This is needed so we can run i915 or xe function depending on
the error dump.

No changes in behavior expected here.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28720>
2024-04-18 19:12:41 +00:00
José Roberto de Souza
52d2d4ae2c intel/tools/error2hangdump: Move code that will be shared with Xe parser to error2hangdump_lib
No changes in behavior expected here.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28720>
2024-04-18 19:12:41 +00:00
José Roberto de Souza
a7651d8337 intel/tools: Move more Xe KMD error decode functions to error_decode_xe_lib
More code tha now is used by aubinator_error_decode but in next
patches will also be used by error2hangdump.

No changes in behavior expected here.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28720>
2024-04-18 19:12:41 +00:00
José Roberto de Souza
9b58301766 intel/tools: Move ascii85_decode_char() to error_decode_lib
This was re-implemented in several places, so lets share it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28720>
2024-04-18 19:12:41 +00:00
José Roberto de Souza
33bc079050 intel/tools: Move Xe KMD error decode functions to a separated file
This functions are now used by aubinator_error_decode but will
also be used by error2hangdump tool.
More functions will be moved in the next patches.

No changes in behavior expected here.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28720>
2024-04-18 19:12:41 +00:00
José Roberto de Souza
80b8deaabb intel/tools/error2hangdump: Replace drm_i915_gem_engine_class by intel_engine_class
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28720>
2024-04-18 19:12:41 +00:00
José Roberto de Souza
3c3fd352b1 intel/tools/error2hangdump: Print out_filename when failed to open it
It was printing the in_filename.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28720>
2024-04-18 19:12:40 +00:00
Timur Kristóf
3279abd494 radv: Rename per_vertex_shaded_mask to explicit_strict_shaded_mask.
This better describes what it actually is.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28764>
2024-04-18 18:35:07 +00:00
Timur Kristóf
3dd758f72c radv: Allow using high 16 bits of PS input slots.
Add a new float16_hi_shaded_mask to keep track of which PS input
slots use their high 16 bits, based on the high_16bits of the
NIR IO semantics. Then, set ATTR1_VALID accordingly.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28764>
2024-04-18 18:35:07 +00:00
Timur Kristóf
12c0c20ed1 radv: Remove superfluous bool arg from slot_to_ps_input.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28764>
2024-04-18 18:35:07 +00:00
Timur Kristóf
a4cf36998f radv: Refactor emitting PS input types.
Instead of taking a lot of booleans, refactor offset_to_ps_input
to take an enum which represents the PS input type. This helps
code readability as we keep adding more and more input types.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28764>
2024-04-18 18:35:07 +00:00
Timur Kristóf
c471aed748 radv: Only consider interpolated inputs as 16-bit float.
Enabling FP16_INTERP_MODE makes no sense for other types of inputs.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28764>
2024-04-18 18:35:07 +00:00
Timur Kristóf
afb08ee244 radv: Run DCE before deleting I/O variables.
Apparently, nir_lower_io leaves dead code in shaders, which
prevented us from deleting the IO variables properly.

Fixes: dbfb96f08f
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28764>
2024-04-18 18:35:07 +00:00
Boris Brezillon
0c1cf20e83 panvk/ci: Re-enable copy_and_blit tests
Apparently something fixed the copy tests that were failing.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28811>
2024-04-18 18:09:58 +00:00
Boris Brezillon
21775a459f panvk: Add support for KHR_push_descriptor
Most of the panvk_descriptor_set logic can be re-used, we just need
to provide intermediate helpers that can be used for both the push set
and regular set population logic (which implies passing our own storage
for the SW descriptor UBO instead of assuming it's always backed by a
BO).

Once this is done, we add temporary storage to the panvk_cmd_buffer
object, and populate the push sets at draw time.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28178>
2024-04-18 17:26:49 +00:00
Mike Blumenkrantz
160dd5bf2b zink: add VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR for shaderdb
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28815>
2024-04-18 16:34:37 +00:00
Mike Blumenkrantz
fd6468a5ae zink: destroy shaderdb pipelines
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28815>
2024-04-18 16:34:37 +00:00
Mike Blumenkrantz
b7b51295bf zink: add ZINK_DEBUG=nopc to completely disable precompilation
I hack this in all the time for debugging anyway

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28766>
2024-04-18 16:07:07 +00:00
Mike Blumenkrantz
a83fd26d0e nir/print: stop trying to match i/o vars using base/driver_location
this is broken

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28552>
2024-04-18 15:30:47 +00:00
Boris Brezillon
52cc12b8d2 panvk/ci: Enable dEQP-VK.pipeline.monolithic.*
We regressed a pipeline.monolithic test when switching to dynamic
rendering and this went unnoticed because
dEQP-VK.pipeline.monolithic.* is not run.

With this addition, execution time is too long to fit in a single job,
so we split VK tests in 2 and only run half of the tests, which should
be okay as long as we keep the tests manual.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
a8a0051086 panvk/ci: Make sure we catch GPU faults
PAN_MESA_DEBUG=sync allows us to abort on faults.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
d49ca71554 panvk: Abort on fault when PANVK_DEBUG=sync
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
9a8dae1bf8 panvk: Make sure we use the proper format for views of depth+stencil images
The view format doesn't take into account the internal image format
layout when only one aspect is selected. We need to patch the pipe_format
manually in that case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
7d8bfe405d panvk: Skip tiler jobs when the vertex shader doesn't write the position
Fixes the dEQP-VK.pipeline.monolithic.no_position.* tests.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Erik Faye-Lund
d5c2d152a5 panfrost: implement a driver-specific max-miplevel
The previous define was common for all panfrost code, but for Vulkan we
should probably use the real hardware-limits. So let's introduce a
GL-driver specific define here, and use that instead. This lets us
change the other define to the real HW limitation.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
2b1db3de7b panvk: Fill maxCustomBorderColorSamplers
dEQP-VK doesn't seem to test it, but the validation layer complains.
Pick a randomly high value, since there's no physical limit on the
custom border color (this is part of the sampler descriptor).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
10a631f767 panvk: Re-order things in panvk_physical_device_init()
We need to know the GPU architecture when we initialize the physical
device properties/features. This implies creating the kmod device and
querying its properties early.

While at it, simplify the error path so we just have one entry point.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
a261e6c4ea panvk: Swizzle the border color on v7 when the format is BGR
pan_texture.c tweaks the texture swizzle for BGR formats on v7 to
support AFBC(BGR). We need to take that into account when preparing
the border color.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
5e07edd4f6 panvk: Don't advertize vertex_buffer cap on sRGB formats
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
294406bba2 panvk: Make sure we have a decode context created when we need one
The sync and dump options also need a valid decode context.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
0eec8b0ff6 panvk: Fix depth/stencil image views
Vulkan wants an R001 pattern, where the depth/stencil is stored in
the red component, but the pan_format/texture logic gives us RRRR.
Tweak the swizzle so we get what Vulkan wants.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
b40dad1d59 panvk: Make sure we pick a valid wrap_mode_r value for unnormalizedCoordinates
When unnormalizedCoordinates is true, we can only use CLAMP_TO_EDGE or
CLAMP_TO_BORDER. This also puts a constraint on the viewType (1D or 2D),
which means we should ignore addressModeW and pick a default that works
fine with the unnormalizedCoordinates case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
b9fe15e47f panvk: Fix has_non_vs_attribute() test in panvk_draw_prepare_vs_attribs()
attrib_count should be checked against pipeline->attribs.attrib_count
not pipeline->attribs.buf_count.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
58a5ae3f72 panvk: Fix img2buf copies with image X offset not aligned on 16 pixels
There are probably better ways of handling copies, but the whole thing
will disappear with the transition to vk_meta. The only reason we fix
it now is so we can enable more tests in CI and catch potential
regressions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
7b06393257 panvk: Don't assume pViewportState != NULL
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
f1d8a65d7f pan/bi: Extend bi_emit_texc() to support wider direct tex/sampler idx
The current code was doing some assumptions on the maximum
texture/sampler sizes which no longer stand with panvk. Add explicit
range checks on the direct texture/sampler_index.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
feffe7fd2a panvk: We don't support resolve operations yet
Make sure we crash when resolveMode != VK_RESOLVE_MODE_NONE in the
vkCmdBeginRendering() path instead of silently ignoring resolve
arguments.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
3b6c2cf0f0 panvk: Make sure the sample_pattern is set in the tiler descriptor
This field should match the one defined in the framebuffer descriptor.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:57 +00:00
Boris Brezillon
47a98bbe34 panvk: Fill pan_tls_info::wls::instances
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:56 +00:00
Boris Brezillon
3c3476bae8 panvk: Fix input attachment support
Lower input attachments to texture operations as it was meant to be
according to the set layout accounting, and fix the descriptor set
logic to fill texture descriptors instead of image descriptors.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:56 +00:00
Boris Brezillon
502a1ca300 pan/bi: Allow subpass sampler dims
Those are just regular 2D[MS] textures.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:56 +00:00
Boris Brezillon
51ab0a4c25 panvk: Don't assume VkGraphicsPipelineCreateInfo::pColorBlendState != NULL
When the subpass being associated to a graphics pipeline has no color
attachment, pColorBlendState can be NULL.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:56 +00:00
Boris Brezillon
303f04d346 pan/bi: Support fragment store_output() with a non-zero offset
Fragment color outputs can be defined as a vec4 array. As long as the
indexing is not dynamic, we can add the constant offset passed to
the store_output() intrinsic to the RT index we extracted from the
location.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:56 +00:00
Boris Brezillon
df4e3e4777 panvk: Fix the colorAttachmentCount check in begin_rendering_init_fbinfo()
colorAttachmentCount should be less that or equal the number of RT slots,
not strictly less than.

Fixes: 595d362d4b ("panvk: Implement dynamic rendering entry points")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:56 +00:00
Boris Brezillon
cb9ad5e44b panvk: Fix attach-less rendering
VkRenderingInfo without any attachment is a perfectly valid use case.
Make sure we don't end up asserting on fbinfo width/height being zero
in that case.

Fixes: 595d362d4b panvk: Implement dynamic rendering entry points
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
2024-04-18 15:04:56 +00:00
Eric Engestrom
b3e6ef964f util: simplify loop logic in util_format_get_first_non_void_channel()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28800>
2024-04-18 14:26:37 +00:00
Eric Engestrom
71b93f63dd radv: initialize a couple of variables
Because musl will lose (in the next commit) the ability to see that they are initialized...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28800>
2024-04-18 14:26:37 +00:00
Eric Engestrom
05c4c17f91 wsi/x11: drop unused param in x11_present_to_x11_sw()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28806>
2024-04-18 13:51:48 +00:00
Eric Engestrom
8b53127e9f docs/rusticl: add an intro explaining what Rusticl is
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28807>
2024-04-18 13:32:45 +00:00
Eric Engestrom
ae5231a0de vk/overlay-layer: simplify print and make it more readable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28805>
2024-04-18 12:56:39 +00:00
Eric Engestrom
0e61560266 vk/overlay-layer: fix None checks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28805>
2024-04-18 12:56:39 +00:00
Eric Engestrom
fc5fa08d89 vk/overlay-layer: drop unused imports
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28805>
2024-04-18 12:56:39 +00:00
Eric Engestrom
acf1c7dc73 lavapipe: add 1 new failure and 1 new timeout since CTS uprev to 1.3.8.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28803>
2024-04-18 12:22:19 +00:00
Eric Engestrom
aeab27cc24 egl: drop dead dri2_dpy param in dri2_wl_visual_idx_from_config()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28528>
2024-04-18 11:22:49 +00:00
Eric Engestrom
7350b65669 etnaviv: avoid re-defining prog_python
It's already defined to the exact same thing in the root `meson.build`

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28801>
2024-04-18 10:03:08 +00:00
Samuel Pitoiset
b67f9b4d0d radV/ci: reduce the parallelism of navi21 to 3
With CTS 1.3.8.0 the execution time has been reduced a lot.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28795>
2024-04-18 09:24:22 +00:00
Samuel Pitoiset
6ee39b1870 radv/ci: update lists for TAHITI and Zink/Polaris10
1f4662cc4e introduced regressions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28795>
2024-04-18 09:24:22 +00:00
Samuel Pitoiset
e85b2641a1 radv/ci: add one more flake since CTS 1.3.8.0 for RENOIR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28795>
2024-04-18 09:24:22 +00:00
Iago Toral Quiroga
1070c9b0e7 broadcom/compiler: enable perquad with uses_wide_subgroup_intrinsics
This fixes a number of regressions in Vulkan subgroups tests in CTS.

Fixes: 97f5721bfc ('broadcom/compiler: needs_quad_helper_invocation enable PER_QUAD TMU access')
cc: mesa-stable

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28797>
2024-04-18 09:00:56 +00:00
Vignesh Raman
fbd6da9bcd ci: handle missing dri libraries during listing
Upreving mesa in drm-ci causes the below error,
ls -1 '/install/lib/dri/*_dri.so'
ls: cannot access '/install/lib/dri/*_dri.so': No such file or directory
trap_err 2

Allow the script to continue execution even if listing dri
libraries command fails.

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28782>
2024-04-18 07:47:12 +00:00
Faith Ekstrand
e297fb1bd5 nil: cbindgen is required
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28794>
2024-04-17 23:16:31 -05:00
Samuel Pitoiset
40f39482e1 ci: uprev CTS to vulkan-cts-1.3.8.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27459>
2024-04-17 21:22:36 +00:00
Mike Blumenkrantz
974b3ab964 zink: disable buffer reordering correctly on shader image binds
the unordered flags must be set after the barrier to avoid the
scenario where the barrier checks buffer usage and resets the flags

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28787>
2024-04-17 20:59:40 +00:00
Yiwei Zhang
737bae4267 venus: fix swapchain image memory bind
Fixed dEQP-VK.wsi.*.swapchain.simulate_oom.image_swapchain_create_info

Fixes: 36f639375b ("venus: use STACK_ARRAY to simplify BindImageMemory2")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28790>
2024-04-17 18:32:42 +00:00
Mike Blumenkrantz
dd02ea3769 egl: use os_get_option for MESA_LOADER_DRIVER_OVERRIDE
this is better for android

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28570>
2024-04-17 17:19:27 +00:00
Mike Blumenkrantz
6f13b201ad egl/android: fix zink loading
should be as simple as checking whether zink is being used

cc: mesa-stable

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28570>
2024-04-17 17:19:27 +00:00
Mike Blumenkrantz
ff37271ea7 egl: fix defines for zink's dri3 check
if mesa is built without dri3 then dri3 should/can not be checked

cc: mesa-stable

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28570>
2024-04-17 17:19:27 +00:00
Nanley Chery
e3a5ade9ee intel/isl: Disable miptails to align LODs for CCS WA
For HSD 22015614752, we enabled Tile64 to ensure image subresources are
64K aligned. However, we neglected to disable miptails so some image
miplevels actually did not achieve the desired image alignment. Do that
now.

Fixes: c6686fda28 ("intel/isl: Use Tile64 to align images for CCS WA")
Reported-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28703>
2024-04-17 16:52:11 +00:00
Derek Foreman
e2260b8152 vulkan/wsi/wayland: Remove unused get_min_image_count_for_mode_group
This function has no callers.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28786>
2024-04-17 11:04:05 -05:00
Patrick Lerda
4f5e9a21c5 panfrost: remove panfrost_create_shader_state() related dead code
The pointer "xfb" is allocated with a clone of "so->nir" and lost
without further processing.

The function panfrost_shader_compile() was the one processing "xfb".
The call of this function was removed with the commit 40372bd720.
This makes "xfb" not required anymore.

For instance, this issue is triggered on a Mali-T820 with
"piglit/bin/arb_transform_feedback2-change-objects-while-paused -auto":
Indirect leak of 32776 byte(s) in 1 object(s) allocated from:
    #0 0xf78f30a6 in malloc (/usr/lib/libasan.so.6+0x840a6)
    #1 0xee9cd4ee in ralloc_size ../src/util/ralloc.c:118
    #2 0xee9cf7ae in create_slab ../src/util/ralloc.c:801
    #3 0xee9cf7ae in gc_alloc_size ../src/util/ralloc.c:840
    #4 0xef74ab82 in nir_undef_instr_create ../src/compiler/nir/nir.c:888
    #5 0xef76212c in clone_ssa_undef ../src/compiler/nir/nir_clone.c:328
    #6 0xef76212c in clone_instr ../src/compiler/nir/nir_clone.c:438
    #7 0xef7642d8 in clone_block ../src/compiler/nir/nir_clone.c:501
    #8 0xef7642d8 in clone_cf_list ../src/compiler/nir/nir_clone.c:555
    #9 0xef7657dc in clone_function_impl ../src/compiler/nir/nir_clone.c:632
    #10 0xef766cb8 in nir_shader_clone ../src/compiler/nir/nir_clone.c:743
    #11 0xf007673e in panfrost_create_shader_state ../src/gallium/drivers/panfrost/pan_shader.c:434
    #12 0xeeb6766c in st_create_common_variant ../src/mesa/state_tracker/st_program.c:781
    #13 0xeeb71d1c in st_get_common_variant ../src/mesa/state_tracker/st_program.c:834
    #14 0xeeb72ea2 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1320
    #15 0xeeb72ea2 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1421
    #16 0xef3806ec in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:748
    #17 0xef3806ec in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:984
    #18 0xef2992f6 in link_program ../src/mesa/main/shaderapi.c:1336
    #19 0xef2992f6 in link_program_error ../src/mesa/main/shaderapi.c:1445

Fixes: 40372bd720 ("panfrost: Implement a disk cache")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28743>
2024-04-17 15:20:10 +00:00
Derek Foreman
642d32045f vulkan/wsi/wayland: Fix use after free
In 7eaceb0392 I called pthread_mutex_unlock() with a member of a freed
structure.

We can unlock as soon as this element is removed from the list it was in,
so just move the unlock to before the free.

Fixes 7eaceb0392

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28432>
2024-04-17 14:43:18 +00:00
Samuel Pitoiset
74615bb704 radv: clear color attachments without exports before compaction
For PS epilogs, this isn't necessary because spi_shader_col_format is
already cleared. This will help for implementing color attachment
remapping because colors_written is always the original mapping.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28781>
2024-04-17 13:58:37 +00:00
José Roberto de Souza
68a91242dc anv: Remove protected memory types from default_buffer_mem_types
Without this application could allocate protected memory buffers
and use it in non-protected queues.

Fixes: c6a91f1695 ("anv: add new heap/pool for descriptor buffers")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28769>
2024-04-17 13:33:29 +00:00
Mike Blumenkrantz
fc691d9f37 lavapipe: disable stencil test if no stencil attachment
stencil test must not be enabled if there is no stencil attachment

fixes dEQP-VK.pipeline.*.stencil.no_stencil_att.dynamic_rendering.*

fixes #10990

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28772>
2024-04-17 12:50:13 +00:00
Connor Abbott
5363f7cce5 freedreno,tu: Disable UBWC for storage images on a750
Fixes: a80a23dc49 ("tu: Enable UBWC for storage images on a7xx")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28749>
2024-04-17 09:55:13 +00:00
Connor Abbott
c234c502aa freedreno: Make has_ibo_ubwc a7xx specific
It's not supported on a6xx, and the next commit will disable it on a750.

Fixes: a80a23dc49 ("tu: Enable UBWC for storage images on a7xx")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28749>
2024-04-17 09:55:13 +00:00
Eric Engestrom
5c842d95aa ci: delete mistaken duplicate llvmpipe-{fails,skips}.txt
These were added, likely by mistake, in 54050d8844, and never used, but
they are causing problems because they overwrite the proper files from
src/gallium/drivers/llvmpipe/ci/, causing CI failures because the wrong
file is used.

Fixes: 54050d8844 ("svga/ci: land vmware mesa-ci lava farm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28773>
2024-04-17 09:06:36 +00:00
Samuel Pitoiset
26d9e9bdb5 radv/rt: add radv_rt_pipeline_compile()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28760>
2024-04-17 06:54:36 +00:00
Samuel Pitoiset
07f3b9aaed radv/rt: insert shaders to cache right after they are compiled
No need postpone this.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28760>
2024-04-17 06:54:36 +00:00
Samuel Pitoiset
6dc5b6ee60 radv/rt: rework handle_from_stages to pass hashes directly
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28760>
2024-04-17 06:54:36 +00:00
Samuel Pitoiset
6979b1ea3d radv/rt: initialize shader group capture/replay in a separate function
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28760>
2024-04-17 06:54:36 +00:00
Samuel Pitoiset
3738331afe radv/rt: remove unnecessary pipeline parameter to radv_generate_rt_shaders_key()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28760>
2024-04-17 06:54:36 +00:00
Samuel Pitoiset
29338d85a0 radv/rt: remove unnecessary pipeline parameter to radv_rt_fill_group_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28760>
2024-04-17 06:54:36 +00:00
Joshua Ashton
763b4e992c radv: Enable KHR_video_queue if encode is enabled
KHR_video_encode_queue is dependent on KHR_video_queue.

Not exposing this makes encode-only usecases not functional,
eg. SteamVR Link.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28779>
2024-04-17 04:18:49 +01:00
Stéphane Cerveau
363a90d0c4 vulkan/video: hevc: b-frames can be reference or not
b-frames can be considered as reference, so the NAL type
should refer to reference type and either RASL or TRAIL
depending on the irap_pic_flag.

Fixes: 72f52329c ("vulkan/video: add a nal_unit lookup for hevc")

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28657>
2024-04-17 01:45:54 +00:00
Jose Maria Casanova Crespo
eb4dbe59b3 ci: re-enable Igalia farm
Re-enable the farm after detecting that job failures were caused
by a new CI host to be deployed announcing rpi4 devices from other
host.

Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28776>
2024-04-17 01:23:25 +00:00
Mike Blumenkrantz
6ae2147dd6 nir: print i/o variables in location order
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25036>
2024-04-17 00:46:40 +00:00
Constantine Shablia
cdcb2ab538 mesa: fix typo
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28695>
2024-04-16 23:56:19 +00:00
Constantine Shablia
6b04843537 vulkan/runtime: fix typo
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28695>
2024-04-16 23:56:19 +00:00
Guilherme Gallo
69eac6dd15 ci/a618: Add zink-tu-a618-full
We needed to halve the number of tests in `zink-tu-a618` due to the
reduced number of a618-limozeen in Collabora's farm, let's create a job
in the nightly pipeline to keep track of zink tests.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28770>
2024-04-16 23:33:38 +00:00
Guilherme Gallo
659f5d3271 ci/a618: Rebalance a618-limozeen jobs
Recently, `sc7180-trogdor-lazor-limozeen-cbg-2` was retired from the
farm, so we need to rebalance the jobs again. The current flow is
causing the job queue to be huge.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28770>
2024-04-16 23:33:38 +00:00
Rob Clark
453e9a24fd ci: Add deqp fix for pipeline_statistics_3 tests
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28701>
2024-04-16 22:44:24 +00:00
Rob Clark
7688d5a062 freedreno: Update a618 xfails
I'm not sure why deqp-runner isn't tagging things as UnexpectedPass.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28701>
2024-04-16 22:44:24 +00:00
David Heidelberg
f56fc16824 ci: disable Igalia farm
Multiple jobs failing.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28775>
2024-04-16 22:41:31 +00:00
Surafel Assefa
eaf8c56a11 radeonsi: Adds return on failure to get plane info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27456>
2024-04-16 22:14:49 +00:00
Iván Briano
53e130e333 nir/lower_doubles: preserve NaN when asked to do so
v2: avoid generating unnecessary bcsel (Caio)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28702>
2024-04-16 13:34:48 -07:00
Iván Briano
c6c52113a0 nir/lower_doubles: preserve sign of zero if we are asked to
v2: avoid generating unused instructions (Caio)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28702>
2024-04-16 13:34:46 -07:00
Iván Briano
5218cff34b nir/algebraic: avoid double lowering of some fp64 operations
The ffloor@64 case, which lowers to use ffract, is already ignored if
nir_lower_dfract is set. Do the same thing for ftrunc@64 and ffract@64
and let nir_lower_doubles take care of them directly instead.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28702>
2024-04-16 13:34:36 -07:00
Mike Blumenkrantz
73bf648f04 ci: kill piano trace globally
fixes #11016

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28767>
2024-04-16 15:28:42 -04:00
Rhys Perry
8eb2743b1f aco/tests: remove LLVM 11 code
RADV requires LLVM 15+.

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/28748>
2024-04-16 15:46:19 +00:00
Rhys Perry
13faa231c2 aco/tests: don't assume constructor order
"tests" might not be initialized when this constructor is called. Just use
a pointer instead.

Fixes aco_tests with LTO enabled.

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/11009
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28748>
2024-04-16 15:46:19 +00:00
Hans-Kristian Arntzen
71fdc67682 radv: Store range rather than bo_size in VkBuffer/VkImage.
For purposes of address reports, it makes far more sense to report the
actually bound range rather than the full bo_size. RMV code used
effective size, so reproduce that here.

No other code looks at bo_size, so this should be quite safe.

Also fixes a theoretical correctness issue where plane aspect for
DISJOINT image was not passed to GetImageMemoryRequirements2 in internal
code.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10996
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28718>
2024-04-16 16:29:57 +02:00
Eric R. Smith
c939111f3f panfrost: mark separate_stencil as valid when surface is valid
panfrost_initialize_surface is called when a surface is written to,
and marks that surface as valid. If the surface is a depth buffer
with a separate stencil, that separate stencil should also be marked
as valid; otherwise, readpixel will skip reading it (and hence the
stencil data will be read as uninitialized). This only affects
DEPTH32F_STENCIL8 formats.

Cc: mesa-stable
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28738>
2024-04-16 12:58:09 +00:00
Timur Kristóf
9f36fba9be ac/nir/ngg: Enable packing 16-bit mesh shader outputs.
This prepares ac_nir_lower_ngg_ms for the possibility of packing
two 16-bit outputs into the same 32-bit output slot, by handling
the high_16bits flag in NIR IO semantics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28704>
2024-04-16 14:08:31 +02:00
Timur Kristóf
07cedd6486 ac/nir/ngg: Split 16-bit MS output stores by components.
This is to prevent overwriting the high 16 bits.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28704>
2024-04-16 14:08:31 +02:00
Timur Kristóf
c0c04d244c ac/nir/ngg: Refactor MS output store into two functions.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28704>
2024-04-16 14:08:31 +02:00
Timur Kristóf
10a71984d6 ac/nir/ngg: Refactor update_ms_output_info.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28704>
2024-04-16 14:08:31 +02:00
Timur Kristóf
238c7f0ea2 ac/nir/ngg: Use just one IO semantics variable in MS output store.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28704>
2024-04-16 14:08:31 +02:00
Timur Kristóf
d0018901f9 ac/nir/ngg: Slightly refactor mesh shader cull flag stores.
No functional changes, just improve code readability a little.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28704>
2024-04-16 14:08:31 +02:00
Timur Kristóf
8e24d3426d ac/nir/ngg: Refactor MS primitive indices for scalarized IO.
Previously, it would hit an assertion when used with scalarized
IO, because the scalarization will split the primitive indices
store into smaller, per-component stores.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28704>
2024-04-16 14:08:30 +02:00
Timur Kristóf
76c90f929f ac/nir/ngg: Remove support for loading mesh shader outputs.
This was an NV_mesh_shader-only feature and we should have already
removed it. We don't want to carry it forward anymore, because it
would needlessly complicate implementing new features.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28704>
2024-04-16 14:08:30 +02:00
Juan A. Suarez Romero
bc32ca929c broadcom/ci: update expected results
Add comments explaining some of the failing tests.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28758>
2024-04-16 10:54:47 +00:00
Lucas Stach
7ffd85d85c etnaviv: flip the switch on MSAA support
Enable MSAA by default and update CI expectation.

The spec@ext_framebuffer_multisample test is buggy and switches from fail
to skip once we actually expose multisample capabilities, while it should
also have skipped before.

Some of the *copyteximage and spec@!opengl 1.1@depthstencil-default_fb*
tests require multisample resolve blits with parameters that can not be
supported natively with the RS engine and can also not be emulated by
u_blitter without texture multisampling, which is not available in the
GC2000 hardware. Accept those failures on this HW generation.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22439>
2024-04-16 10:35:41 +00:00
Joshua Ashton
62903b2d75 tu: Expose VK_EXT_surface/swapchain_maintenance1
This was missing, this is implemented in common code.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28307>
2024-04-16 10:03:48 +00:00
Valentine Burley
4408aff896 tu: Fix missing implementation of creating images from swapchains
These pNext structs are part of VK_KHR_swapchain which is core Vulkan
1.1 but they were missing. Based on ANV, RADV and NVK.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28307>
2024-04-16 10:03:48 +00:00
Valentine Burley
9e4c7dee3b tu: Replace TU_HAS_SURFACE with TU_USE_WSI_PLATFORM
This matches the naming and formatting convention used by other drivers.
Additionally move it to tu_wsi.h.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28307>
2024-04-16 10:03:48 +00:00
Valentine Burley
06d277c1bd tu: Move tu_BindImageMemory2() to tu_image.cc
To match ANV, RADV and NVK.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28307>
2024-04-16 10:03:48 +00:00
Christian Gmeiner
295fa01db8 etnaviv: Fix disabling of features
We must disable features before we fill our internal etna_specs
struct with etna_get_specs(..).

Fixes: d600b45ccc ("etnaviv: Switch to etna_core APIs")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28757>
2024-04-16 09:37:31 +00:00
Christian Gmeiner
518d365d06 etnaviv: Switch to etna_core_disable_feature(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28757>
2024-04-16 09:37:31 +00:00
Jose Maria Casanova Crespo
97f5721bfc broadcom/compiler: needs_quad_helper_invocation enable PER_QUAD TMU access
We take advantage of the needs_quad_helper_invocation information to
only enable the PER_QUAD TMU access on Fragment Shaders when it is needed.

PER_QUAD access is also disabled on stages different to fragment shader.
Being enabled was causing MMU errors when TMU was doing indexed by vertexid
reads on disabled lanes on vertex stage. This problem was exercised by some
shaders from the GTK new GSK_RENDERER=ngl that were accessing a constant buffer
offset[6], but having PER_QUAD enabled on the TMU access by VertexID was
doing hidden incorrect access to not existing vertex 6 and 7 as TMU was
accessing the full quad.

cc: mesa-stable

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28740>
2024-04-16 08:20:54 +00:00
Samuel Pitoiset
d2b9e21689 radv: simplify the check for exporting multiview in the last VGT stage
Checking for the lib flags is unnecessary because in this case
next_stage is NONE and it's already handled correctly by the helper.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28672>
2024-04-16 07:37:32 +00:00
Samuel Pitoiset
c9c51a93e5 radv: remove unused parameter in radv_skip_graphics_pipeline_compile()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28672>
2024-04-16 07:37:32 +00:00
Samuel Pitoiset
2d18645b1f radv: simplify checking for PS epilogs in radv_pipeline_init_blend_state()
This is equivalent.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28672>
2024-04-16 07:37:32 +00:00
Samuel Pitoiset
575111e15a radv: return early when PS is NULL in radv_pipeline_init_blend_state()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28672>
2024-04-16 07:37:32 +00:00
Samuel Pitoiset
5e78c2d08b radv: simplify importing pipeline layout with GPL
Store the pipeline layout in radv_graphics_pipeline to simplify the
import. This will also allow us to generate a graphics pipeline key
from pCreateInfo more easily.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28672>
2024-04-16 07:37:32 +00:00
Lionel Landwerlin
70b613926d anv: enable capture/replay with descriptor buffers
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/28708>
2024-04-16 06:50:43 +00:00
Lionel Landwerlin
4dad2a4a6f anv: enable shader border color capture/replay
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/28708>
2024-04-16 06:50:43 +00:00
Lionel Landwerlin
806281f61f anv: add a new reserved pool for capture/release
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28708>
2024-04-16 06:50:43 +00:00
Lionel Landwerlin
67d772b112 anv: add capture/replay support for buffer with descriptor buffers
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28708>
2024-04-16 06:50:43 +00:00
Lionel Landwerlin
43b57ee8a5 anv: add capture/replay support for image with descriptor buffers
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/28708>
2024-04-16 06:50:43 +00:00
Lionel Landwerlin
4fadc2edb7 anv: remove useless dynamic state allocation for samplers
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/28708>
2024-04-16 06:50:43 +00:00
Lionel Landwerlin
772c8ccada anv: disable capture replay with descriptor buffer
This is not functional atm.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: fe037dec6e ("anv: expose VK_EXT_descriptor_buffer")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28708>
2024-04-16 06:50:43 +00:00
Lionel Landwerlin
c94cd1235f anv: implement VK_EXT_image_compression_control
Limited to vkd3d right now, there are specific use cases there.

We don't want any app to disable compression, it should be mostly
transparent and we better be aware of potential bugs.

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/28632>
2024-04-16 05:56:12 +00:00
Lionel Landwerlin
db6ee2e1bb vulkan: track compression control flags on vk_image
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/28632>
2024-04-16 05:56:12 +00:00
Lionel Landwerlin
0e5c44a609 drirc: rename hasvk only option
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/28632>
2024-04-16 05:56:12 +00:00
Lionel Landwerlin
73c31e9483 anv: move all format props checks to anv_get_image_format_properties()
We can remove anv_GetPhysicalDeviceImageFormatProperties() to reuse
the runtime entry point.

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/28632>
2024-04-16 05:56:12 +00:00
Lionel Landwerlin
d83aaf4e05 anv: reuse vk_common_GetImageSubresourceLayout
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/28632>
2024-04-16 05:56:12 +00:00
Tapani Pälli
62d96a6546 anv: add dirty tracking for push constant data
This allows us to skip allocating state if it exists already. There are
different scenarios where this can help: when updating only descriptors
(not push constant data) and after blorp or simple shader run.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10898
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/28689>
2024-04-16 07:23:52 +03:00
Erik Kurzinger
899263ecfc wsi/x11: support explicit sync
This adds support to the X11 WSI for explicit synchronization using DRM
syncobjs. It relies on versions 1.4 of the DRI3 and Present extensions.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27226>
2024-04-16 02:40:01 +00:00
Kenneth Graunke
e637c63239 intel/brw: Make an fs_builder::SYNC helper
We always want a null destination, so this saves some typing.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28705>
2024-04-16 02:14:49 +00:00
Kenneth Graunke
d5b8cec7a2 intel/brw: Replace FS_OPCODE_LINTERP with BRW_OPCODE_PLN
We no longer support the old LINE+MAC lowering, and we already lower
this to MAD in NIR on Gfx11+, so the LINTERP virtual opcode always
corresponds the PLN.  The only catch is that LINTERP's operands are
reversed from PLN, so we have to switch them.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28705>
2024-04-16 02:14:49 +00:00
Kenneth Graunke
12b0e03bd2 intel/brw: Use SHADER_OPCODE_SEND for coherent framebuffer reads
We already have a logical opcode and lower to what is basically a send
instruction.  We just weren't using SHADER_OPCODE_SEND, instead having
extra redundant infrastructure for no real gain.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28705>
2024-04-16 02:14:49 +00:00
Kenneth Graunke
46a7ee772e intel/brw: Drop default size of 1 from bld.vgrf() calls
This isn't necessary as 1 is the default value for the parameter.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28705>
2024-04-16 02:14:49 +00:00
Kenneth Graunke
217d56e9b1 intel/brw: Delete fs_visitor::vgrf helper
Just use fs_builder::vgrf instead of the older glsl_type-based one.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28705>
2024-04-16 02:14:49 +00:00
Kenneth Graunke
f29a56a4ac intel/brw: Delete if_depth_in_loop
This was only used prior to Sandybridge.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28705>
2024-04-16 02:14:49 +00:00
Kenneth Graunke
bd6a430c94 intel/brw: Drop gfx7 scratch message setup code
Nothing uses this.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28705>
2024-04-16 02:14:49 +00:00
Paulo Zanoni
a791805d10 anv/sparse: rework anv_free_sparse_bindings() error handling
None of the callers of anv_free_sparse_bindings() check for its return
result, and they also don't have a way to propagate it up the stack.
So just don't return error codes that won't be checked. Instead,
add an assertion so at least we can detect failures in our CI or
development runs.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28724>
2024-04-16 01:52:28 +00:00
Paulo Zanoni
95dc34cd97 anv/sparse: replace device->using_sparse with device->num_sparse_resources
The device->using_sparse variable is only used at cmd_buffer_barrier()
to decide if we need to apply the heavier-weight flushes that are only
applicable to sparse resources. The big problem here is that we need
to apply the flushes to the non-image and non-buffer memory barriers,
so we were trying to limit those only to applications that ever submit
a sparse resource to the sparse queue.

The reason why we were applying this only to devices that ever
submitted sparse resources is that dxvk games have this thing where
during startup they create and then delete tiny sparse resources, so
switching device->using_sparse to true at resource creation would make
basically every dxvk game start applying the heavier-weight
workaround.

The problem with all that is that even if an application creates a
sparse resource but doesn't ever bind them, the resource should still
behave as an unbound resource (because they are bound with a NULL
bind), so the flushes affecting them should happen. This case is
exercised by vkd3d-proton/test_buffer_feedback_instructions_sm51.

In order to satisfy all the above cases and only really apply the
heavier-weight flushes to applications actually using sparse
resources, let's just count the number of sparse resources that
currently exist and then apply the workaround only if it's not zero.
That covers the dxvk case since dxvk deletes the resources as soon as
they create, so num_sparse_resources goes back to 0.

Testcase: vkd3d-proton/test_buffer_feedback_instructions_sm51
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10960
Fixes: 6368c1445f ("anv/sparse: add the initial code for Sparse Resources")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28724>
2024-04-16 01:52:28 +00:00
Paulo Zanoni
0c1dbfe899 anv/sparse: remove unused dump_vk_sparse_memory_bind()
This went unused a while ago. If we decide we want it again we can
just add it back.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28724>
2024-04-16 01:52:28 +00:00
Paulo Zanoni
ba3b1c2d12 anv/sparse: adjust sparse_bind_image_memory debug messages
Since we moved the dump_anv_vm_bind() call to anv_sparse_bind(), that
BEGIN/END block stopped making sense, so just keep the first set of
messages.

Also wrap everything around a single INTEL_DEBUG() check so we'll only
run this check once when debug is disabled (we don't care about
running the check multiple times if it's enabled).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28724>
2024-04-16 01:52:28 +00:00
Paulo Zanoni
f73385f8ff anv/sparse: remove unnecessary popcount assertions
In both cases we end up calling anv_image_aspect_to_plane(), which
already includes the same assertion.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28724>
2024-04-16 01:52:28 +00:00
Paulo Zanoni
2f5638cf2e anv/sparse: remove useless isl_surf_get_tile_info() call
If isl_surf_get_tile_info() returned the struct instead of having it
passed as a pointer, gcc would have detected this. I can write patches
for that if we want it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28724>
2024-04-16 01:52:28 +00:00
Yiwei Zhang
831da93d76 venus: clean up legacy descriptor update template bits
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:42 +00:00
Yiwei Zhang
5223cf2b11 venus: use STACK_ARRAY to simplify set template update and push
No regression in related vkoverhead benches.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:42 +00:00
Yiwei Zhang
7e01ffe733 venus: simplify need and ignore rules for desc image info
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:41 +00:00
Yiwei Zhang
378db530ae venus: optimize set update template data population
also avoids not-always-valid void * ptr arithmatic

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:41 +00:00
Yiwei Zhang
498f1d7eb1 venus: simplify push descriptor update with template
No need to track is_push_descriptor in templ. No need to conditionally
decide to use set or NULL handle since we pass NULL handle from the cmd
side. Also fixed the arg type mismatch in the template helper.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:41 +00:00
Yiwei Zhang
4c6b9e2fbe venus: fix to drop an extra ;
Fixes: 32283b9703 ("Refactor and add template support for iub")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:41 +00:00
Yiwei Zhang
be84424738 venus: avoid the redundant template entry
offset to count would give count number of entries

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28686>
2024-04-16 01:30:41 +00:00
Dylan Baker
706691a715 nouveau: require cbindgen >= 0.25
So we can use the --depfile option, and not have to worry about new
files. Since it's Rust, the expectation is that you're going to have up
to date dependencies anyway.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28754>
2024-04-16 01:10:13 +00:00
Georg Lehmann
2543f5a594 radv: use ac_nir_opt_pack_half
Foz-DB Navi21:
Totals from 20425 (25.73% of 79395) affected shaders:
MaxWaves: 525608 -> 525690 (+0.02%); split: +0.02%, -0.00%
Instrs: 13570442 -> 13531690 (-0.29%); split: -0.29%, +0.00%
CodeSize: 74246928 -> 74312000 (+0.09%); split: -0.03%, +0.12%
VGPRs: 814736 -> 813384 (-0.17%); split: -0.18%, +0.02%
Latency: 103675193 -> 103574328 (-0.10%); split: -0.12%, +0.02%
InvThroughput: 25189130 -> 25114931 (-0.29%); split: -0.30%, +0.00%
VClause: 314579 -> 314573 (-0.00%); split: -0.00%, +0.00%
SClause: 526551 -> 526548 (-0.00%); split: -0.00%, +0.00%
Copies: 772147 -> 772999 (+0.11%); split: -0.01%, +0.12%
PreVGPRs: 661914 -> 661923 (+0.00%)
VALU: 9612901 -> 9574094 (-0.40%); split: -0.40%, +0.00%
SALU: 1244130 -> 1244176 (+0.00%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28670>
2024-04-15 23:34:22 +00:00
Georg Lehmann
2b346cc639 ac/nir: add ac_nir_opt_pack_half
Try to use v_fma_mix{lo,hi}_f16 if possible instead of v_cvt_pkrtz_f16_f32.
To ensure correct rounding we have to make sure that the fp16 rounding mode
can be rtz first.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28670>
2024-04-15 23:34:22 +00:00
Marek Olšák
c15498afbe nir/use_dominance: set the root as post-dominator of unmovable instructions
Some uses don't have any post-dominator. An example is an atomic that
feeds itself in a loop. No instruction immediately post-dominates
the result of such an atomic because no instruction can strictly
post-dominate itself. This handles that case generally by setting
the root node as the post-dominator for instructions that can't be
reordered.

Fixes: ba54099dce - nir: add a utility computing post-dominance of SSA uses

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28436>
2024-04-15 22:50:26 +00:00
Paulo Zanoni
edf07649f4 vulkan: reduce struct vk_object_base by 8 bytes
I know that, in the grand scheme of things, this isn't significant.
The problem is: now that I know the hole is there, my OCD won't allow
me to sleep until it's fixed.

We went from:

struct vk_object_base {
	VK_LOADER_DATA             _loader_data;         /*     0     8 */
	VkObjectType               type;                 /*     8     4 */

	/* XXX 4 bytes hole, try to pack */

	struct vk_device *         device;               /*    16     8 */
	struct vk_instance *       instance;             /*    24     8 */
	_Bool                      client_visible;       /*    32     1 */

	/* XXX 7 bytes hole, try to pack */

	struct util_sparse_array   private_data;         /*    40    24 */
	/* --- cacheline 1 boundary (64 bytes) --- */
	char *                     object_name;          /*    64     8 */

	/* size: 72, cachelines: 2, members: 7 */
	/* sum members: 61, holes: 2, sum holes: 11 */
	/* last cacheline: 8 bytes */
};

to:

struct vk_object_base {
	VK_LOADER_DATA             _loader_data;         /*     0     8 */
	VkObjectType               type;                 /*     8     4 */
	_Bool                      client_visible;       /*    12     1 */

	/* XXX 3 bytes hole, try to pack */

	struct vk_device *         device;               /*    16     8 */
	struct vk_instance *       instance;             /*    24     8 */
	struct util_sparse_array   private_data;         /*    32    24 */
	char *                     object_name;          /*    56     8 */

	/* size: 64, cachelines: 1, members: 7 */
	/* sum members: 61, holes: 1, sum holes: 3 */
};

which is cool because now the struct nicely fits in a cacheline.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28699>
2024-04-15 22:12:52 +00:00
Amber Harmonia
13aea0fb30 freedreno/common: Fix register stomper ranges for A7XX
REG_A6XX_HLSQ_VS_CNTL ... REG_A6XX_HLSQ_GS_CNTL are not contiguous
on A7XX, and based on CTS runs with the stomper we cannot stomp
REG_A6XX_SP_VS_OBJ_START safely.

Signed-off-by: Amber Harmonia <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28732>
2024-04-15 20:57:37 +00:00
Mike Blumenkrantz
98ce4a98ae nir/remove_unused_io_vars: check all components to determine variable liveness
this otherwise only checked the first component

cc: mesa-stable

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28751>
2024-04-15 20:07:30 +00:00
Christian Gmeiner
7d33bab3b4 meson: Add missing newline at eof
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28747>
2024-04-15 19:28:40 +00:00
Paulo Zanoni
ad4d13f184 anv: reduce struct anv_image_memory_range from 32 to 24 bytes
Reorder its members to fill the current padding hole, reducing the
struct size from 32 to 24.

This struct appears multiple times inside struct anv_image and its
members, so this change brings down sizeof(struct anv_image) from
1744 to 1600.

We went from:

struct anv_image_memory_range {
	enum anv_image_memory_binding binding;           /*     0     4 */

	/* XXX 4 bytes hole, try to pack */

	uint64_t                   offset;               /*     8     8 */
	uint64_t                   size;                 /*    16     8 */
	uint32_t                   alignment;            /*    24     4 */

	/* size: 32, cachelines: 1, members: 4 */
	/* sum members: 24, holes: 1, sum holes: 4 */
	/* padding: 4 */
	/* last cacheline: 32 bytes */
};

to:

struct anv_image_memory_range {
	enum anv_image_memory_binding binding;           /*     0     4 */
	uint32_t                   alignment;            /*     4     4 */
	uint64_t                   size;                 /*     8     8 */
	uint64_t                   offset;               /*    16     8 */

	/* size: 24, cachelines: 1, members: 4 */
	/* last cacheline: 24 bytes */
};

Considering we can have tens of thousands of anv_image structs
allocated at the same time on gaming workloads, this can save us a few
MB of memory. It ain't much but it's honest work.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28700>
2024-04-15 18:18:12 +00:00
Samuel Pitoiset
7f608fc206 radv: use canonicalized VA for VM fault reports
Otherwise, the returned VA from vkGetBufferDeviceAddress() or via
VK_EXT_device_address_binding_report doesn't match and applications
would have to mask out.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28652>
2024-04-15 17:38:44 +00:00
Christian Gmeiner
b06e237363 nvk: Remove duplicate DRM_NODE_RENDER check
This check happens at the top of nvk_create_drm_physical_device(..).

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28741>
2024-04-15 17:18:31 +00:00
Christian Gmeiner
8d2f83ce98 etnaviv: hwdb: Drop stdint.h dependency
This seems to cause some troubles for distro builds.

Fixes: 394652e5a0 ("etnaviv: hwdb: Generate hwdb.h")
Closes: #11012
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28745>
2024-04-15 16:57:29 +00:00
Erik Faye-Lund
13dffdec60 panvk: wire up version-overriding
Not a whole lot of applications supports Vulkan 1.0, so let's wire up
support for MESA_VK_VERSION_OVERRIDE so we can easily override the
version to when testing.

While we're at it, let's switch to VK_MAKE_API_VERSION, as
VK_MAKE_VERSION is deprecated now.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28694>
2024-04-15 16:09:51 +00:00
Lucas Stach
83c40aa3f4 ci/etnaviv: update expectation after piglit uprev
7e82c59fa4 ("Uprev Piglit to dd6f7eaf82e8dd442da28b346c236141cbcce0b1") pulled
in fixes to the testsuite, which makes two more tests pass on GC2000.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28744>
2024-04-15 14:08:00 +02:00
Eric R. Smith
e3d123b7a6 panfrost: fix a GPU/CPU synchronization problem
Remove a premature optimization. When PIPE_MAP_DISCARD_WHOLE_RESOURCE
is set we were setting create_new_bo, and then if that was set we skipped
a set of tests which if passed would cause a panfrost_flush_writer.

In fact we need that flush in some cases (e.g. when any batch is
reading the resource). Moreover, we should sometimes copy the resource
(set the copy_resource flag) and that again was being skipped if
create_new_bo was initially true due to PIPE_MAP_DISCARD_WHOLE_RESOURCE
being set.

Cc: mesa-stable
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28406>
2024-04-15 10:52:52 +00:00
Lucas Stach
87bfad9efa etnaviv: rs: treat depth-only clear to X8Z24 surfaces as full clear
X8Z24 surfaces have a don't care stencil channel, which is okay to be
cleared together with the depth channel. Set the depth clear bits
accordingly to allow those clears to use the fast-clear path when
only depth is to be cleared. This change aligns the RS with the BLT
ZS clear path.

Fixes: df63f188e8 ("etnaviv: fix separate depth/stencil clears")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28696>
2024-04-15 10:24:22 +00:00
Lucas Stach
fc0d65e54f etnaviv: ci: update expectation with fixed depth/stencil clears
Now that we properly switch between fast/regular clears for depth/stencil
surfaces as needed and fixed the resulting corner-case issues, there are
two more passing dEQP tests.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28696>
2024-04-15 10:24:22 +00:00
Lucas Stach
f69794b503 etnaviv: split TS and non-TS RS clear commands
Currently both TS and non-TS paths use the same place to store the compiled
RS commands to clear the surface. In the TS case the commands only initialize
the TS buffer, while the non-TS commands clear the whole buffer. The
assumption here is that a TS enabled surface will only ever be fast cleared,
which doesn't hold anymore, now that we can fall back to slow clears on TS
enabled depth/stencil buffers.

The fallback to a slow clear will overwrite the stored RS commands with a
full buffer clear. If we can transition to a fast clear later, the commands
to initialize the TS buffer will not be regenerated and a full buffer clear
will be submitted instead. In addition to the performance degradation, it
will also leave TS in an inconsistent state, as the TS buffer will not be
initialized, but the TS state still gets marked as valid.

To avoid this confusion and not introduce any more state tracking to remember
the target of the clear commands and regenerate TS clears if needed, simply
split the storage for compiled TS and non-TS clear commands.

Fixes: df63f188e8 ("etnaviv: fix separate depth/stencil clears")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28696>
2024-04-15 10:24:22 +00:00
Lucas Stach
06ce243a73 etnaviv: trigger TS derivation after slow clear
Now that we switch dynamically between fast (TS) and slow (regular)
clears on TS enabled surfaces, we must trigger reevaluation of the
current TS state also after a slow clear, as otherwise the PE might
continue to use the invalidated TS state.

Fixes: df63f188e8 ("etnaviv: fix separate depth/stencil clears")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28696>
2024-04-15 10:24:22 +00:00
Martin Krastev
f2f486a7eb svga/ci: disable vmware farm
Farm is going down for network maintenance.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28737>
2024-04-15 09:18:00 +00:00
Samuel Pitoiset
502f0091de radv/rt: stop computing unused hash for the traversal shader
This isn't used at all.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28711>
2024-04-15 08:49:21 +00:00
Samuel Pitoiset
9a5016d54d radv/rt: use radv_pipeline_hash_shader_stage()
It should be equivalent.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28711>
2024-04-15 08:49:21 +00:00
Christian Gmeiner
12059eedfe etnaviv: Drop not needed check if seamless cube map is supported
With commit f2506780c8 ("mesa/st: Only set seamless for GLES3") ss->seamless_cube_map
should behave as wanted. For GLES2 it can only be set when PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE
is supported.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28669>
2024-04-15 08:29:02 +00:00
Konstantin Seurer
429f953d8f Revert "gallivm/ssbo: mask offset with exec_mask instead of building the 'if'"
mem_access_base_pointer loads memory (the descriptor) and therefore
needs to be guarded. Fixes
dEQP-VK.spirv_assembly.instruction.terminate_invocation.terminate.no_null_pointer_load.

Fixes: fc8a83c ("gallivm/ssbo: mask offset with exec_mask instead of building the 'if'")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28614>
2024-04-15 07:53:39 +00:00
Samuel Pitoiset
4586451b2d radv: add missing SQTT markers when an indirect indexed draw is used with DGC
Since DGC preprocessing for IBO is supported, the driver generates
an indexed indirect draw but SQTT markers were missing and this
introduced complete non-sense in RGP captures.

Fixes: e59a16bbb8 ("radv: use an indirect draw when IBO isn't updated as part of DGC")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28710>
2024-04-15 07:22:49 +00:00
David Rosca
4a19047d32 radv/video: Select temporal layer when encoding each frame
This makes the rate control per temporal layer work.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28734>
2024-04-15 09:58:19 +10:00
David Rosca
3393e56373 radv/video: Set VBV buffer size and level
Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28734>
2024-04-15 09:58:17 +10:00
David Rosca
8875a79513 radv/video: Set correct bitstream buffer size
Fixes
  dEQP-VK.video.encode.h264_i_p_not_matching_order
  dEQP-VK.video.encode.h265_i_p_not_matching_order

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28734>
2024-04-15 09:58:14 +10:00
David Rosca
5df45c0f99 radv/video: Fix setting slice QP
constantQp will be 0 according to spec for any rate control method
other than NONE, so it should only be used with NONE rate control and
not when default rate control (which is internally NONE) is used.
Also it shouldn't override min/max QP.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28734>
2024-04-15 09:57:49 +10:00
Timur Kristóf
2b1031ec10 nir/opt_varyings: Add workaround for RADV mesh shader multiview.
The layer output is added in ac_nir_lower_ngg which is called
later than this pass; prevent deleting layer input from FS here.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:12 +00:00
Timur Kristóf
91dd9c35be nir/opt_varyings: Fix relocate_slot so it doesn't mix up 32-bit and 16-bit I/O.
Previously, nir_opt_varyings was unable to distinguish between
a fully occupied 32-bit flat input and the low part of a 16-bit
flat input, and would assign them the same slot, thereby messing
up both I/O slots in the process.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:12 +00:00
Timur Kristóf
7e43c2d08f nir/opt_varyings: Debug print during relocate_slot.
VERY useful when debugging issues with this pass.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:11 +00:00
Timur Kristóf
bf2227d0d0 nir/opt_varyings: Only propagate constant MS outputs, not other uniforms.
Due to how mesh shaders work, we'll need a workgroup divergence
pass in order to really prove that an output is uniform.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:11 +00:00
Timur Kristóf
5dd1461ca4 nir/opt_varyings: Add early return when producer stage is task.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:11 +00:00
Timur Kristóf
a083a25a80 nir/opt_varyings: Fix explicit and per-vertex FS inputs.
Fixes: 772149b15a
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:11 +00:00
Timur Kristóf
586acb47c8 nir/opt_varyings: Support per-primitive I/O.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:11 +00:00
Timur Kristóf
21ff2907c7 nir/opt_varyings: Allow optimizing primitive ID for MS -> FS.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:11 +00:00
Timur Kristóf
8792098772 nir/lower_io_to_scalar: Support per-primitive outputs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:11 +00:00
Timur Kristóf
38bd578029 nir/lower_io_to_scalar: Support explicit (and per-vertex) FS inputs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:11 +00:00
Timur Kristóf
433fe2022c nir/gather_info: Clear per-primitive I/O masks at the beginning.
Fixes: b085248819
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:11 +00:00
Timur Kristóf
28c0f6f369 nir/recompute_io_bases: Fix per-primitive inputs.
This was a mistake, the decision shouldn't be based on shader info.

Fixes: 8a24610477
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:11 +00:00
Timur Kristóf
723b3d354e nir/print: Print per-primitive and explicit strict IO info.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
2024-04-14 19:51:11 +00:00
Konstantin Seurer
566174785c lavapipe: Explicitely support ycbcr formats
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28697>
2024-04-14 17:32:56 +00:00
Konstantin Seurer
8f5fb4e095 lavapipe: Handle multiple planes in GetDescriptorEXT
Fixes: a13a07d ("lavapipe: add descriptor sets bindings for planar images")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28697>
2024-04-14 17:32:56 +00:00
Konstantin Seurer
c48d6097cd lavapipe: Do nort use NIR_PASS during lowering
NIR_DEBUG=clone,serialize replaces the whole shader which invalidates
the build state.

Fixes: d99e95e ("lavapipe: Implement VK_KHR_ray_tracing_pipeline")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28716>
2024-04-14 16:58:52 +00:00
Konstantin Seurer
4335d006a7 lavapipe: Implement ray_tracing_maintenance1 queries
Fixes: 1f729d9 ("lavapipe: Implement KHR_ray_tracing_maintenance1")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28716>
2024-04-14 16:58:52 +00:00
Konstantin Seurer
a26f96ed3d lavapipe: Handle accel struct queries in handle_copy_query_pool_results
Fixes: 897ccbd ("lavapipe: Implement VK_KHR_acceleration_structure")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28716>
2024-04-14 16:58:52 +00:00
Pavel Ondračka
6cc780173a r300/ci: failures list update
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28726>
2024-04-13 17:22:56 +00:00
Marek Olšák
fe35a8b00e nir: change "user_data_amd" sysval from 4 to 8 components
so that we can pass more fast constants to compute shaders (without
reading memory in the shader).

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28606>
2024-04-13 16:45:08 +00:00
Marek Olšák
c1f750eed9 nir: add nir_intrinsic_optimization_barrier_sgpr_amd
for radeonsi

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28606>
2024-04-13 16:45:08 +00:00
Marek Olšák
6426f6de6a nir: allow FP16 in nir_format_linear_to_srgb
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28606>
2024-04-13 16:45:08 +00:00
Marek Olšák
281e08714e nir: add more build helpers
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28606>
2024-04-13 16:45:08 +00:00
M Henning
b681677f7d nak: Rewrite union_find and use it in repair_ssa
The new UnionFind is safe code, is generic over the element type, and
uses constant stack space.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27454>
2024-04-13 15:55:44 +00:00
M Henning
b5f4c54d0d nak: Remove old union_find implementation
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27454>
2024-04-13 15:55:44 +00:00
David Heidelberg
7101ed7f88 ci: temporarily disable Android test builds
We need to figure out:
a) how to download the images
b) where to host them (1G+)

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
b9c80ee59e etnaviv: drm: Remove fallback value for ETNA_GPU_NUM_CONSTANTS
The kernel commit a8c21a5451d8 ("drm/etnaviv: add initial etnaviv DRM driver") has this
fallback logic already.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
57a662fc4c etnaviv: Copy values from etna_core_info
There is no need to query them again.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
e60e045b89 etnaviv: drm: Fill limits
Note: etna_gpu_get_param(..) will only fail if a wrong enum etna_param_id
param value is passed.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
def32f8668 etnaviv: hwdb: Fill limits
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
b68e868d31 etnaviv: common: Add some limit values
These are loosely based on struct etna_specs.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
ef19966e38 etnaviv: common: Add enum etna_core_type
We support the following two core types: GPU and NPU.

Both are using the 3d pipe to submit work so the only way to
differentiate is the nn core count.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
aaccc25a4d etnaviv: drm: Make use of hwdb
If the kernel provides correct ID values query the hwdb.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
2192e620bb etnaviv: hwdb: Add etna_query_feature_db(..)
This function is used to
 - find a database entry
 - fill our etna_device_info struct

If no database entry is found we just return false.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
394652e5a0 etnaviv: hwdb: Generate hwdb.h
This python script does the following work:
 - For all gc_feature_database.h files
   - Translate the C Struct to Python
   - Store database entries
 - Create a merged struct
 - Transform all entires to the merged struct
 - Write a header that contains the merged struct and all entries

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
a07d1864db ci: Install python3-pycparser in build container
pycparse will be used for etnaviv to parse C header files and generate a new one.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
d9e490c2f4 etnaviv: hwdb: Import gc_feature_database from ST
This commit imports the gc_feature_database.h file from
https://github.com/STMicroelectronics/gcnano-binaries/blob/gcnano-6.4.13-binaries/gcnano-driver-stm32mp/hal/kernel/inc/gc_feature_database.h

git commit: 5d02efd5cb4cfa85307633891f3cf87550a8bc1d

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
5c5dc646ed etnaviv: hwdb: Import gc_feature_database from Amlogic
This commit imports the gc_feature_database.h from
https://github.com/khadas/android_vendor_amlogic_common_npu/blob/khadas-vim4-r-64bit/hal/kernel/inc/gc_feature_database.h

git commit: 9d81096a001af8a099ca767855d548983d037dd8

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
775eff3046 etnaviv: hwdb: Import gc_feature_database from NXP
This commit imports the gc_feature_database.h file from
https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/drivers/mxc/gpu-viv/hal/kernel/inc/gc_feature_database.h

git commit: ccf0a99701a701fb48a04e31ffe3f9d585a8374a

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
e1c6748cf4 etnaviv: drm: Query some id values in etna_gpu_new(..)
We want to fully initialise etna_device_info. We only query the kernel
for these values if the drm driver is recent enough.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
d600b45ccc etnaviv: Switch to etna_core APIs
This removes the in-driver feature handling and switches to the one from
common.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
358e1f10c5 etnaviv: drm: Initialize etna_core_info based on kernel features
Query all the gpu features in etna_gpu_new(..) and update the feature
bitset in etna_core_info accordingly.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
8639367f55 etnaviv: common: Add feature bitset
Extend struct etna_core_info with a feature bitset and some helper
functions.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
df198d21f9 etnaviv: Introduce etna_feature enum
This etna_feature enum will be used as abstraction layer. We will add
support for a hardware database - borrowed from the binary blob.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
9eede9ba0b etnaviv: Move hw header to common place
I am planning to make use of these headers outside of the gallium
driver.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
f4c90d4316 etnaviv: Switch to etna_core_info
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
d3f8e3ee42 etnaviv: drm: Add etna_gpu_get_core_info(..)
Makes it possible to access etna_core_info.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
ad4b6cce30 etnaviv: drm: Make use of etna_core_info
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
3b150bcba8 etnaviv: Introduce common etna_core_info
This struct will be used in different places outside of the gallium
driver.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Timothy Arceri
1984712a8e glsl: inline _mesa_copy_linked_program_data()
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28709>
2024-04-13 11:36:08 +00:00
Timothy Arceri
4655381e3b glsl: remove UsesEndPrimitive field
Here we store the value directly in shader info rather than passing
it around.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28709>
2024-04-13 11:36:08 +00:00
Timothy Arceri
1139a703c1 glsl: remove ActiveStreamMask field
There is no need to pass this value around just store it directly
in the shader info.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28709>
2024-04-13 11:36:08 +00:00
Timothy Arceri
1e13e9be45 glsl: remove FragDepthLayout field
Nothing uses it. I *looks* like _mesa_copy_linked_program_data()
copies it somewhere useful however that function is called before
the value are even initialised.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28709>
2024-04-13 11:36:08 +00:00
Pavel Ondračka
9dc6ea2fad r300: remove nir_to_rc_options wrapper
Just call nir_to_rc directly since we don't have any options anymore.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28663>
2024-04-13 09:49:38 +00:00
Pavel Ondračka
b1c98ffd9e r300: move lower_fabb option out of the options struct
It is the last one, we don't need an extra struct for it...

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28663>
2024-04-13 09:49:38 +00:00
Pavel Ondračka
2de9142f9f r300: remove the ntr lower_cmp option
Only used in nir_lower_bool_to_float, so just hardcode the logic there.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28663>
2024-04-13 09:49:38 +00:00
Pavel Ondračka
4735265187 r300: get rid of the unused ubo_vec4_max ntr option
We now do the lowering in finalize_nir.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28663>
2024-04-13 09:49:38 +00:00
Pavel Ondračka
26bb068935 r300: inline unoptimized_ra ntr option
Also remove the check for overflowing 16bit TGSI register index.
If that ever happens we are out of luck anyway, no need to waste CPU
cycles on RA...

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28663>
2024-04-13 09:49:38 +00:00
Marek Olšák
7de43c4fb8 ac: add helper ac_get_ip_type_string to remove duplication
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607>
2024-04-12 22:22:04 -04:00
Marek Olšák
8597870dcb ac/llvm: simplify the optimization barrier and apply it to the whole vector
Use the same code as the pointer type. It works with all types and works
with any vector, but we need to handle i1 and v3i16 as special cases,
otherwise LLVM fails when it sees them. The previous code only extracted
the first component, which is not what we want.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607>
2024-04-12 22:22:04 -04:00
Marek Olšák
c7e30cdbbb ac/llvm: remove unused fields of ac_shader_abi
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607>
2024-04-12 22:22:04 -04:00
Marek Olšák
105e22f6fd ac/llvm: remove handling of input and output loads/stores that are lowered
There is a lot that we still use.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607>
2024-04-12 22:22:04 -04:00
Marek Olšák
ce7ca0d80b ac/llvm: allow image loads to return less than 4 components, trim DMASK
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607>
2024-04-12 22:22:04 -04:00
Marek Olšák
c91b56c271 ac/llvm: add support for 16-bit coordinates (A16) for image (non-sampler) opcodes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607>
2024-04-12 22:22:03 -04:00
Marek Olšák
c9ea9e96a7 ac/llvm: simplify extracting an element in get_image_coords
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607>
2024-04-12 22:20:14 -04:00
Marek Olšák
f49cfa9a1c ac/nir: allow 16-bit results for resinfo
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607>
2024-04-12 22:20:14 -04:00
Marek Olšák
03d241b256 ac/surface: add radeon_surf::thick_tiling
It's not worth writing a compute shader for copying 3D textures yet.
I have a sophisticated compute shader that will do it properly.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607>
2024-04-12 22:20:14 -04:00
Yiwei Zhang
abc327a39a venus: use more relaxed profile for TLS ring seqno wait
Excessive polling for TLS ring synchronous cmds is a waste of cpu
cycles.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28706>
2024-04-13 00:52:22 +00:00
Mike Blumenkrantz
7f246bca04 zink: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28580>
2024-04-12 21:30:45 +00:00
Mike Blumenkrantz
0e0effe59b zink: enable opt_varyings with ZINK_DEBUG=ioopt
uses copied instruction costs from radeonsi for AMD, need info for
other platforms...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28580>
2024-04-12 21:30:45 +00:00
Mike Blumenkrantz
942f3d3a3f zink: add a pass to fix vertex input locations
this is very stupid

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28580>
2024-04-12 21:30:45 +00:00
Mike Blumenkrantz
e8c12c82ef zink: set nir_io_glsl_lower_derefs in compiler options
this runs all the io lowering in the frontend and allows for code--

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28580>
2024-04-12 21:30:45 +00:00
Mike Blumenkrantz
163bb2b9c1 zink: rework rework_io_vars
this should be a bit more robust and also maybe even readable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28580>
2024-04-12 21:30:45 +00:00
Mike Blumenkrantz
c329ee200f zink: set lower_to_scalar
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28580>
2024-04-12 21:30:45 +00:00
Mike Blumenkrantz
0d756fd0bc zink: set indirect io compiler flags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28580>
2024-04-12 21:30:45 +00:00
David Heidelberg
e511ffea4b ci/intel: sona device_type is back online
Fixes: 44db558cea ("ci: disable sona devices, all devices are offline")
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28721>
2024-04-12 19:37:56 +00:00
Mike Blumenkrantz
2e5d49b3dd gallium: delete PIPE_CAP_NIR_COMPACT_ARRAYS
this is now nir_shader_compiler_options::compact_arrays

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Mike Blumenkrantz
44aee09cfb nine: stop checking PIPE_CAP_NIR_COMPACT_ARRAYS and use compact_arrays
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Mike Blumenkrantz
8d9c5cc6ed st/program: stop using PIPE_CAP_NIR_COMPACT_ARRAYS and use compact_arrays
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Mike Blumenkrantz
cba1b03e86 mesa: delete LowerCombinedClipCullDistance from consts
no longer used

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Mike Blumenkrantz
c9977f8de6 glsl: move an assert from st_context over to avoid using PIPE_CAP_NIR_COMPACT_ARRAYS
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Mike Blumenkrantz
9f5e62df89 ttn: stop using PIPE_CAP_NIR_COMPACT_ARRAYS and check compact_arrays
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Mike Blumenkrantz
20d0613c13 glsl: stop using PIPE_CAP_NIR_COMPACT_ARRAYS and check compact_arrays
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Mike Blumenkrantz
d2abc7f9a6 freedreno: set compact_arrays in compiler options
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Mike Blumenkrantz
39b66f9c84 intel: set compact_arrays in compiler options
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Mike Blumenkrantz
d694c1b094 v3d: set compact_arrays in compiler options
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Mike Blumenkrantz
7967be922d agx: set compact_arrays in compiler options
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28601>
2024-04-12 18:43:48 +00:00
Dave Airlie
223aedfa5d egl/dri2: don't bind dri2 for zink
I'm not sure why zink would want dri2 here instead of kopper,
I'm sure it's some side effect of something else, let zink
use the kopper paths.

This fixes:
dEQP-GL45-ES3.info.vendor
on zink on nvk with GL cts using EGL.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fixes: 12a47b84b7 ("egl/dri2: trigger drawable invalidation from surface queries for zink")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28707>
2024-04-12 17:48:51 +00:00
Pavel Ondračka
26836438cb r300: optimize swizzle for inline constants
We can use any swizzle to access it, so if the inline constant is in
ADD,try to have the swizzle same as the second channel so that we can
potentially use presubtract later.

RV530:
total instructions in shared programs: 129366 -> 129306 (-0.05%)
instructions in affected programs: 10191 -> 10131 (-0.59%)
helped: 56
HURT: 12
total presub in shared programs: 8421 -> 8791 (4.39%)
presub in affected programs: 1523 -> 1893 (24.29%)
helped: 0
HURT: 102
total temps in shared programs: 17561 -> 17562 (<.01%)
temps in affected programs: 47 -> 48 (2.13%)
helped: 2
HURT: 4
total lits in shared programs: 3021 -> 3179 (5.23%)
lits in affected programs: 427 -> 585 (37.00%)
helped: 0
HURT: 37
total cycles in shared programs: 197845 -> 197512 (-0.17%)
cycles in affected programs: 18949 -> 18616 (-1.76%)
helped: 50
HURT: 19

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28428>
2024-04-12 15:35:50 +00:00
Pavel Ondračka
e34bb4738a r300: move presubtract pass later
We want to move it after rc_remove_constants because we can't reswizzle
presubtract sources and we need to pack multiple uniforms into vec4
slots to be able to run glamor shaders on R400.

This mostly works OK, the detection logic just needs to recognize the
case when 2.0 was converted to inline constant.

RV530:
total instructions in shared programs: 129384 -> 129366 (-0.01%)
instructions in affected programs: 2078 -> 2060 (-0.87%)
helped: 16
HURT: 7
total presub in shared programs: 8404 -> 8421 (0.20%)
presub in affected programs: 423 -> 440 (4.02%)
helped: 19
HURT: 25
total omod in shared programs: 410 -> 429 (4.63%)
omod in affected programs: 10 -> 29 (190.00%)
helped: 0
HURT: 13
total temps in shared programs: 17560 -> 17561 (<.01%)
temps in affected programs: 34 -> 35 (2.94%)
helped: 3
HURT: 3
total lits in shared programs: 3006 -> 3021 (0.50%)
lits in affected programs: 267 -> 282 (5.62%)
helped: 13
HURT: 20
total cycles in shared programs: 197840 -> 197845 (<.01%)
cycles in affected programs: 4159 -> 4164 (0.12%)
helped: 13
HURT: 13

R420:
total instructions in shared programs: 103810 -> 103762 (-0.05%)
instructions in affected programs: 4176 -> 4128 (-1.15%)
helped: 29
HURT: 1
total presub in shared programs: 2724 -> 2878 (5.65%)
presub in affected programs: 478 -> 632 (32.22%)
helped: 6
HURT: 40
total omod in shared programs: 411 -> 421 (2.43%)
omod in affected programs: 3 -> 13 (333.33%)
helped: 0
HURT: 7
total temps in shared programs: 16841 -> 16852 (0.07%)
temps in affected programs: 814 -> 825 (1.35%)
helped: 5
HURT: 17
total cycles in shared programs: 162397 -> 162361 (-0.02%)
cycles in affected programs: 5746 -> 5710 (-0.63%)
helped: 30
HURT: 3

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28428>
2024-04-12 15:35:49 +00:00
Pavel Ondračka
a35a158b09 r300: check for the extra restrictions on presubtract swizzles
And don't use presubtract in the first place instead of relying on the
dataflow swizzle pass to sort things up later.

Just two shaders in shader-db hits this, but this patch prevents some
regressions in dEQP when we later move presubtract after the dataflow
swizzle pass.

RV420:
presub helped:   shaders/chromeos/24.shader_test FS:               6 -> 2 (-66.67%)
presub helped:   shaders/chromeos/21.shader_test FS:               6 -> 2 (-66.67%)
cycles helped:   shaders/chromeos/24.shader_test FS:               79 -> 78 (-1.27%)
cycles helped:   shaders/chromeos/21.shader_test FS:               47 -> 46 (-2.13%)

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28428>
2024-04-12 15:35:49 +00:00
Mike Blumenkrantz
ede4e4aae3 lavapipe: clamp 32bit query results to low 32 bits rather than MIN
this should be more consistent with hardware driver behavior

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28671>
2024-04-12 13:36:56 +00:00
Mike Blumenkrantz
129bebd519 llvmpipe: clamp 32bit query results to low 32 bits rather than MIN
this should be more consistent with hardware driver behavior

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28671>
2024-04-12 13:36:55 +00:00
Martin Krastev
6067426549 svga/ci: add two new piglit flakes to svga
Two more piglit flakes appeared after yesterday's piglit uprev:
  spec@egl_chromium_sync_control@conformance
  spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_test

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28712>
2024-04-12 13:06:07 +00:00
Danylo Piliaiev
56dba5489a ir3: Do not set clip/cull mask if no one writes clip/cull
This may happen when undefined value is written into gl_ClipDistance,
then it gets optimized out by nir_opt_undef.

Fixes GPU faults in Tropico 5 (D3D11) on at least A750.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28109>
2024-04-12 11:11:52 +00:00
Lionel Landwerlin
35831dded5 anv: increase maxResourceDescriptorBufferRange on DG2+
The current helper anv_physical_device_bindless_heap_size()
artificially limited the surface heap size on DG2+ to 128MB. The HW is
actually 4GB capable, but we have workaround requiring to overlap the
dynamic state heap with the bindless surface state heap.

The actual limit comes from our virtual address space setup. It is
different between descriptor buffers and regular descriptors.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: fe037dec6e ("anv: expose VK_EXT_descriptor_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27873>
2024-04-12 10:23:39 +03:00
Samuel Pitoiset
c82b8a8153 radv: stop ignoring shader stages that don't need to be imported with GPL
The Vulkan specification has been updated since I wrote this and it's
invalid now.

This marks some tests as expected failures because they are invalid
now and they will be removed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28692>
2024-04-12 06:24:43 +00:00
Patrick Lerda
2b6993cb71 r300: fix r300_draw_elements() behavior
Indeed, the pointer processed by r300_upload_index_buffer() was not the right one.
This is the reason why "deqp-gles2 --deqp-case=dEQP-GLES2.functional.draw.draw_elements.indices.user_ptr.index_byte"
was failing (the logs are below). This change corrects this issue and makes the related deqp tests work properly.

This change considers that r300_upload_index_buffer() sets indexBuffer to NULL. The indexBuffer resource
should be properly freed once the buffer is processed. This is required to avoid another refcnt imbalance
(another kind of memory leak).

==9962==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000721f at pc 0x7fd57b54a9a0 bp 0x7fffd2c39290 sp 0x7fffd2c38a40
READ of size 30 at 0x60200000721f thread T0
    #0 0x7fd57b54a99f in __interceptor_memcpy (/usr/lib64/libasan.so.6.0.0+0x3c99f)
    #1 0x7fd570d10528 in u_upload_data ../src/gallium/auxiliary/util/u_upload_mgr.c:333
    #2 0x7fd57114142b in r300_upload_index_buffer ../src/gallium/drivers/r300/r300_screen_buffer.c:44
    #3 0x7fd57113943c in r300_draw_elements ../src/gallium/drivers/r300/r300_render.c:632
    #4 0x7fd57113bbc4 in r300_draw_vbo ../src/gallium/drivers/r300/r300_render.c:840
    #5 0x7fd570d212e2 in u_vbuf_draw_vbo ../src/gallium/auxiliary/util/u_vbuf.c:1487
    #6 0x7fd56fceb873 in _mesa_validated_drawrangeelements ../src/mesa/main/draw.c:1709
    #7 0x7fd56fcf28c5 in _mesa_DrawElementsBaseVertex ../src/mesa/main/draw.c:1852

Fixes: 330d0607ed ("gallium: remove pipe_index_buffer and set_index_buffer")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28523>
2024-04-12 05:05:27 +00:00
Timothy Arceri
9e056fc962 glsl: remove now unused do_dead_functions()
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28690>
2024-04-12 12:17:31 +10:00
Timothy Arceri
875ca9ec11 glsl: move validate_{stage}_shader_executable() to the nir linker
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28690>
2024-04-12 12:17:31 +10:00
Timothy Arceri
316165afec glsl: use info from shader when linking
We update the program copy of info at the end of linking. During linking
we should use the shader copy. This change is required to avoid updating
both in the following patch.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28690>
2024-04-12 12:15:48 +10:00
Timothy Arceri
38398cc6bb glsl: use shader info to store gs verts
Rather than passing this value around we can just store it directly
in its final location.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28690>
2024-04-12 12:15:48 +10:00
Timothy Arceri
0dcbd8a8a4 glsl: move cross_validate_uniforms() to the nir linker
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28690>
2024-04-12 12:15:48 +10:00
Timothy Arceri
0d8ee7534e glsl: make validate_intrastage_arrays() usable across files
This will be used in the following patch.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28690>
2024-04-12 12:15:48 +10:00
Timothy Arceri
fe2e60a4d3 glsl: add some data members to nir_variable
These will be used in the following patch.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28690>
2024-04-12 12:15:48 +10:00
Timothy Arceri
344bcd1703 glsl: move mode_string() to helper
This will be used from multiple files in the following patches.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28690>
2024-04-12 12:15:48 +10:00
nyanmisaka
7d00b759f3 radeonsi/uvd_enc: update to use correct padding size
Update padding size calculation to use cropping.
Original method could result in 0 padding, which
generated unnessary noise in the encoding result.

Cc: mesa-stable
Fixes: mesa/mesa#9196

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28369>
2024-04-11 21:49:54 +00:00
Sagar Ghuge
0aa632b519 anv: Use appropriate argument format for indirect draw
If index is specified we can use the DRAWINDEXED otherwise we can simply
use DRAW argument format.

v2: (Rohan & Lionel)
- Fix the aligned_stride check

Fixes: 6d4f43f0d6 ("anv: Emit EXECUTE_INDIRECT_DRAW when available")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28658>
2024-04-11 21:26:37 +00:00
Collabora's Gfx CI Team
7e82c59fa4 Uprev Piglit to dd6f7eaf82e8dd442da28b346c236141cbcce0b1
1e631479c0...dd6f7eaf82

Reviewed-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28088>
2024-04-11 20:49:33 +00:00
Hannes Mann
f419a8be90 frontends/va: Only export one handle for contiguous planes
If the driver stores all planes contiguously in memory, only one BO
needs to be exported from vaExportSurfaceHandle. This is required
for Chromium's VaapiVideoDecoder to work on radeonsi and r600.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26165>
2024-04-11 20:14:16 +00:00
Hannes Mann
4f4c9ff68a gallium/pipe: Add contiguous planes per-surface attribute
Attribute is set when textures are created by compatible drivers, but
not when importing from DMA-BUF.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26165>
2024-04-11 20:14:15 +00:00
Mike Blumenkrantz
934188c3ca zink: block LA formats with srgb
this doesn't work correctly

fixes #7218

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28674>
2024-04-11 19:52:52 +00:00
Mike Blumenkrantz
d2507a6916 nir/lower_clip: handle scalarized io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28308>
2024-04-11 18:57:26 +00:00
Mike Blumenkrantz
49714125d5 nir/lower_clip: surgerize for lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28308>
2024-04-11 18:57:25 +00:00
Mike Blumenkrantz
7760642d2e v3d: set use_clipdist_array=true for lower_clip?
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28308>
2024-04-11 18:57:25 +00:00
Rhys Perry
c2a467dd4b aco: remove occupancy check in dealloc_vgprs()
This didn't consider that there might be different programs using the same
SIMD.

fossil-db (navi31):
Totals from 68129 (85.81% of 79395) affected shaders:
Instrs: 23230924 -> 23388315 (+0.68%)
CodeSize: 120636544 -> 121272888 (+0.53%)
Latency: 115645106 -> 115683965 (+0.03%)
InvThroughput: 18804076 -> 18806912 (+0.02%); split: -0.00%, +0.02%
Branches: 404644 -> 407945 (+0.82%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28633>
2024-04-11 18:30:47 +00:00
Rhys Perry
9775318aa9 aco: don't include the clause in VMEM_CLAUSE_MAX_GRAB_DIST
By excluding the clause from this check, we only count the number of
instructions that we're actually moving the store across.

fossil-db (navi31):
Totals from 4409 (5.55% of 79395) affected shaders:
MaxWaves: 120234 -> 119738 (-0.41%)
Instrs: 3184513 -> 3184702 (+0.01%); split: -0.09%, +0.09%
CodeSize: 15942424 -> 15943276 (+0.01%); split: -0.07%, +0.07%
VGPRs: 248448 -> 255816 (+2.97%); split: -0.04%, +3.00%
Latency: 18841156 -> 18829451 (-0.06%); split: -0.08%, +0.02%
InvThroughput: 2549229 -> 2552042 (+0.11%); split: -0.02%, +0.13%
VClause: 67760 -> 64138 (-5.35%); split: -5.40%, +0.06%
SClause: 82921 -> 82922 (+0.00%)
Copies: 270026 -> 273399 (+1.25%); split: -0.14%, +1.39%
VALU: 1793374 -> 1796743 (+0.19%); split: -0.02%, +0.21%
VOPD: 798 -> 802 (+0.50%); split: +0.63%, -0.13%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28633>
2024-04-11 18:30:47 +00:00
Job Noorman
8d55b6155c freedreno,computerator: support initialization of buffers
The following syntax can now be used to set the initial content of
buffers:

@buf size (reg) val0, val1, ...

If the buffer is not fully initialized, remaining values will be set to
zero.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28625>
2024-04-11 15:56:54 +00:00
Juan A. Suarez Romero
b3e65c77c4 v3d: configure polygon mode when enabled
The hardware do not support setting different polygon modes for front
and back faces at the same time. In this case, unless we are culling one
of the faces, we show a warning to the user.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28675>
2024-04-11 14:44:55 +00:00
Gert Wollny
6cc119522e tsan-blacklist: surpress two race conditions in TC
They are both of no consequence

v2: fix comment

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28650>
2024-04-11 13:52:36 +00:00
Gert Wollny
ccff97f7ba tsan-blacklist: Ignore race in get_max_abs_timeout_ns
The returned value is independent of the race, so surpress it.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28650>
2024-04-11 13:52:36 +00:00
Gert Wollny
9e7112f4df llvmpipe: Don't emit certain debug code when TSAN is enabled
It produces race conditions and is probably not interesting when running
TSAN.

v2: use #if and define values instead of "#if defined" (Yonggang Luo)
v3: remove some leftover text
v4: drop ws changes (Yonggang Luo)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28650>
2024-04-11 13:52:36 +00:00
Gert Wollny
7c36c4f0a4 tsan-blacklist: ignore race when reading lp_fence signalled status
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28650>
2024-04-11 13:52:36 +00:00
Gert Wollny
7dc19d941e util/u_queue: read fence->signalled locked with TSAN
When TSAN is enabled we use standard mutexes instead of futexes. With
futexes the fence->signalled is read using an atomic operation, to best
mimic this let's protect the read with a locked mutex.

This avoids TSAN reporting a race condition (false positive with
futexes) with Zink when accessing the pipeline cache.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28650>
2024-04-11 13:52:36 +00:00
Gert Wollny
aa347029da futex: disable futexes when compiling with tsan
Thread sanitizer doesn't support futexes, so don't use them in this case
and fall back to standard mutexes. With that we can avoid tsan reporting
a large number of false positives.

v2: use #if instead of #ifdef to test the value of the define

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28650>
2024-04-11 13:52:36 +00:00
Gert Wollny
0d46e0e88b meson: Add blacklist when compiling with tsan
Check whether the compiler actually supports it and if
not than warn about it. Note that meson will also
suggest that one should use the build-in flag, but this
is just sloppy testing for -fsanitize, -fsanitize-blacklist
is actually not available as build-in option.

v2: define THREAD_SANITIZER to 1 or 0 (suggested by Yonggang Luo)
v3: Update comment about meson warning (Dylan Baker)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28650>
2024-04-11 13:52:36 +00:00
Vignesh Raman
446672f9b1 ci: Implement support for replaying ANGLE restricted traces
ANGLE traces must be compiled together with binaries into binary format.
Introduce them for AMD Raven device, replaying on Vulkan (radv).

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24270>
2024-04-11 12:13:34 +00:00
Jonathan Gray
094a0a2ccb intel/dev: 0x7d45 is mtl-u not mtl-h
Ref: https://ark.intel.com/content/www/us/en/ark/products/237327/intel-core-ultra-7-processor-155u-12m-cache-up-to-4-80-ghz.html
Ref: Core Ultra Processor Datasheet, Doc. No.: 792044, Rev.: 002
Fixes: 48ff68820e ("intel/dev: Enable MTL PCI ids")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27973>
2024-04-11 10:03:40 +00:00
Jordan Justen
5238b773b4 intel/dev: Change ATS-M 0x56c2 string from 170G to 170V
Ref: bspec 44477
Ref: 9123b5d5b0
Fixes: ce900dcbb1 ("intel/dev: Add ATS-M PCI ID for Data Center GPU Flex 170G")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28687>
2024-04-11 07:38:21 +00:00
Georg Lehmann
5e6e3c7f89 nir: rename to nir_opt_16bit_tex_image
Not sure what I was thinking when I wrote this pass (probably not much),
but opt makes more sense and matches other nir passes.
Fold is usually used for constants, and this pass handles more than those.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28662>
2024-04-11 06:10:33 +00:00
Dave Airlie
16682b6054 radv/video: don't advertise timestamp bits for decode/encode
At this point I'm not sure if the queues can support timestamps.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900>
2024-04-11 13:40:04 +10:00
Dave Airlie
ee64a385b6 radv/video: handle encode control parameters better.
The spec clarifies different operations for the reset flags,
just clean it up to follow it better.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900>
2024-04-11 13:40:04 +10:00
Dave Airlie
05cd42417f radv/video: enable video encoding behind perftest flag
This probes the vcn firmware version to make sure it can support
the encode extensions properly, then uses the perf test flag if so.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900>
2024-04-11 13:40:02 +10:00
Dave Airlie
967e4e09de radv/video: add h265 encode support
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900>
2024-04-11 13:40:02 +10:00
Dave Airlie
54d499818c radv/video: add initial support for encoding with h264.
This adds the encoding infrastructure along with support for h264.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900>
2024-04-11 13:28:32 +10:00
Dave Airlie
800c03ffbd radv/video: add parameter patching calls.
This is just infrastucture for encoding to plug into to patch
session parameters at create time.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900>
2024-04-11 12:57:13 +10:00
Dave Airlie
1d74661dfd radv: add encoder queue support pieces and encoder queries.
This is just checks for events and avoiding an assert in the winsys,
and adds support for the encoder queries.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900>
2024-04-11 12:57:05 +10:00
Dave Airlie
f6c27bea26 radv: add direct cs emit for a dword.
This lets you write a dword at a certain location, this is needed
for the encode queues.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900>
2024-04-11 12:48:29 +10:00
Dave Airlie
1ce215c5a3 radv/video: export unified queue header/tail functions.
These will be used for encode as well.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900>
2024-04-11 12:48:26 +10:00
Dave Airlie
1e16851ab1 vulkan/video: copy the profile over for h264 encode.
This allows is to use it for encoding h264 headers.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900>
2024-04-11 12:48:22 +10:00
Eric Engestrom
24b6a047ee docs: add sha256sum for 24.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28680>
2024-04-11 01:32:09 +00:00
Eric Engestrom
ead2f6d7f1 docs: update calendar for 24.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28680>
2024-04-11 01:32:09 +00:00
Eric Engestrom
030473f5b2 docs: add release notes for 24.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28680>
2024-04-11 01:32:09 +00:00
Timur Kristóf
cfb8f3c1a5 radv: Clean up gathering linked I/O info.
The code is more concise now without these helpers.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28488>
2024-04-11 00:44:45 +00:00
Timur Kristóf
0e481a4adc radv: Always use fixed I/O locations for TCS outputs in VRAM.
The goal of this patch is to make the TCS->TES shader I/O
independent of assigned I/O driver locations.

Always using the unlinked approach means a larger stride when
calculating some memory addresses, but otherwise should have no
perf impact whatsoever, because this only affects how TCS
outputs are stored to VRAM, and doesn't affect how they are
stored in LDS.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28488>
2024-04-11 00:44:45 +00:00
Timur Kristóf
892ebf2040 radv: Add radv_gather_unlinked_io_mask to shader info header.
We will call this from another file.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28488>
2024-04-11 00:44:45 +00:00
Timur Kristóf
e8ddf1a064 radv: Remove dead code for creating per-patch IO mask.
Not relevant or necessary anymore.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28488>
2024-04-11 00:44:45 +00:00
Timur Kristóf
66f4dd292c radv: Keep track of TCS outputs that need LDS.
Instead of reserving LDS space for all TCS outputs, we will now
only reserve it for TCS outputs which really need it, ie. those
which are read by the TCS.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28488>
2024-04-11 00:44:45 +00:00
Georg Lehmann
b44f97a7ba nir: don't try to optimize exclusive min/max scan to inclusive
SPIR-V rules for fmax/fmin scans are *very* stupid.
The required identity is Inf instead of NaN but if one input
is NaN, the other value has to be returned.
This means for invocation 0:
min(subgroupExclusiveMin(NaN), NaN) -> Inf
subgroupInclusiveMin(NaN) -> undefined (NaN for any sane backend)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27536>
2024-04-11 00:03:13 +00:00
Lucas Stach
df63f188e8 etnaviv: fix separate depth/stencil clears
TS only tracks the clear state on a per-tile basis, so for a combined
depth/stencil buffer there is no way to fast-clear the one without also
affecting the other. Fall back to a regular clear when the clear_bits
tell us that not all channels of the buffer are to be cleared and make
sure to flush/invalidate any pending TS state when we do so.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28668>
2024-04-10 23:46:01 +00:00
Erik Kurzinger
c1401fda8a wsi/wayland: don't use explicit sync with sw
When using software rendering with the Wayland WSI we should not try to
use explicit sync even if it is supported by the compositor. Not only is
it not necessary in that case, but the protocol explicitly disallows
using it with shared memory buffers.

As a fix, first we modify wsi_configure_cpu_image to not set
info->explicit_sync to true for CPU images. However, we still want the
implicit_sync parameter in wsi_create_buffer_blit_context to be set to
false since CPU images don't need implicit sync either. To ensure that
remains so, we add a new field to wsi_image_info tracking the image
type, and then only enable implicit sync for DRM images when explicit
sync is not supported.

Additionally, we modify wsi_wl_use_explicit_sync to return false when
device->sw is true.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28678>
2024-04-10 23:08:36 +00:00
David Heidelberg
44db558cea ci: disable sona devices, all devices are offline
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28683>
2024-04-10 22:41:20 +00:00
Connor Abbott
c0867f4811 freedreno/afuc: Add initial support for a750
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28628>
2024-04-10 21:51:59 +00:00
Connor Abbott
04af4cbfea freedreno/afuc: Add a7xx new-style branch instructions
It turns out that what I guessed was "preemptleave" was actually "bl"
which writes a return address to $1b which I've renamed $lr. On a750
this is combined with a new indirect jump instruction to create a more
"standard" function call ABI in the AQE firmware using $lr and $1a which
is $sp. This ABI is used for what appears to be compiled functions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28628>
2024-04-10 21:51:59 +00:00
Connor Abbott
9c0ba24c70 freedreno/afuc: Switch to using the GPU ID in the firmware
Starting with a750, the control registers are shuffled around even
though the ISA is compatible. The format of the file name also changes.
This would make support convenient, except that there is already a
perfectly good way to ID the hardware that we aren't using: the first
dword contains a hardware version field in addition to the firmware
version. Use this field as the ID that determines everything else (ISA
version, control register layout to use, etc.). This means that when
assembling and disassembling we must parse the first dword in order to
get it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28628>
2024-04-10 21:51:59 +00:00
Samuel Pitoiset
9840607f4b radv: rework and add a helper for hashing a compute pipeline
It should be similar to the previous hashing method but it allows us
to get a hash directly from a pCreateInfo for future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28651>
2024-04-10 20:05:22 +00:00
Samuel Pitoiset
05cd85afc6 radv: add a helper for hashing pipelines
Similar between graphics/compute/raytracing pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28651>
2024-04-10 20:05:22 +00:00
Samuel Pitoiset
c6cb3b3b93 radv/rt: remove dead code about intersection shaders in radv_pipeline_get_shader_key()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28651>
2024-04-10 20:05:22 +00:00
Sagar Ghuge
7cc604ed1b anv: Fix typo in DestinationAlphaBlendFactor value
Workaround states that if Destination Alpha Blend
Factor==BLENDFACTOR_ZERO, instead use BLENDFACTOR_CONST_ALPHA with the
constant alpha set to 0.

We had typo while setting the DestinationAlphaBlendFactor, use
BLENDFACTOR_CONST_ALPHA instead of BLENDFACTOR_CONST_COLOR.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28640>
2024-04-10 19:42:52 +00:00
Georg Lehmann
1f4662cc4e radv: move alu
The stats are decent now that aco has an ILP scheduler

Foz-DB Navi31:
Totals from 73549 (92.59% of 79439) affected shaders:
MaxWaves: 2226952 -> 2229352 (+0.11%); split: +0.21%, -0.10%
Instrs: 44690384 -> 44905884 (+0.48%); split: -0.10%, +0.58%
CodeSize: 232666088 -> 233474808 (+0.35%); split: -0.10%, +0.45%
VGPRs: 2998036 -> 2986936 (-0.37%); split: -0.58%, +0.21%
SpillSGPRs: 7176 -> 7170 (-0.08%); split: -0.53%, +0.45%
SpillVGPRs: 1124 -> 1068 (-4.98%); split: -5.07%, +0.09%
Scratch: 6981632 -> 6977792 (-0.06%)
Latency: 297998345 -> 298541597 (+0.18%); split: -0.35%, +0.53%
InvThroughput: 49162321 -> 49039572 (-0.25%); split: -0.46%, +0.21%
VClause: 881737 -> 884147 (+0.27%); split: -0.35%, +0.62%
SClause: 1371928 -> 1373973 (+0.15%); split: -0.78%, +0.92%
Copies: 2920492 -> 2927281 (+0.23%); split: -0.84%, +1.08%
Branches: 890209 -> 890121 (-0.01%); split: -0.03%, +0.02%
PreSGPRs: 2376670 -> 2377251 (+0.02%); split: -0.25%, +0.28%
PreVGPRs: 2229634 -> 2208966 (-0.93%); split: -1.04%, +0.11%
VALU: 25124040 -> 25127521 (+0.01%); split: -0.07%, +0.08%
SALU: 4343167 -> 4361062 (+0.41%); split: -0.23%, +0.65%
VMEM: 1582363 -> 1582245 (-0.01%); split: -0.01%, +0.00%
VOPD: 8709 -> 8708 (-0.01%); split: +2.35%, -2.37%

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27032>
2024-04-10 17:05:59 +00:00
Georg Lehmann
d9a8ab0e01 radv: sink alu
The stats are decent now that aco has an ILP scheduler.

Foz-DB Navi31:
Totals from 50743 (63.88% of 79439) affected shaders:
MaxWaves: 1504722 -> 1506408 (+0.11%); split: +0.12%, -0.01%
Instrs: 37550246 -> 37543687 (-0.02%); split: -0.12%, +0.10%
CodeSize: 194277496 -> 194253004 (-0.01%); split: -0.11%, +0.10%
VGPRs: 2266056 -> 2254320 (-0.52%); split: -0.57%, +0.06%
SpillSGPRs: 7893 -> 6861 (-13.07%); split: -14.03%, +0.95%
SpillVGPRs: 1359 -> 1124 (-17.29%)
Scratch: 7006720 -> 6981632 (-0.36%)
Latency: 268082325 -> 267597538 (-0.18%); split: -0.57%, +0.39%
InvThroughput: 43592221 -> 43287284 (-0.70%); split: -1.14%, +0.44%
VClause: 759701 -> 761164 (+0.19%); split: -0.24%, +0.43%
SClause: 1133209 -> 1138406 (+0.46%); split: -0.32%, +0.78%
Copies: 2639405 -> 2632081 (-0.28%); split: -0.81%, +0.53%
Branches: 830411 -> 831358 (+0.11%); split: -0.02%, +0.13%
PreSGPRs: 1802510 -> 1798852 (-0.20%); split: -0.57%, +0.36%
PreVGPRs: 1755801 -> 1747642 (-0.46%); split: -0.51%, +0.04%
VALU: 20974500 -> 20967009 (-0.04%); split: -0.08%, +0.04%
SALU: 3901240 -> 3900098 (-0.03%); split: -0.23%, +0.20%
VMEM: 1397890 -> 1397486 (-0.03%)
VOPD: 4837 -> 4902 (+1.34%); split: +2.03%, -0.68%

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27032>
2024-04-10 17:05:58 +00:00
Peyton Lee
8479c3bddb radeonsi/vpe: add support for p010
add support for p010, correct the settings of format and buffer pitch.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28518>
2024-04-10 16:30:14 +00:00
Christian Gmeiner
d330676c22 etnaviv: Remove offline shader compiler
This compiler is too limited for the benefit it could bring. A great
replacement for it is shaderdb's runner.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28653>
2024-04-10 16:09:40 +00:00
David Rosca
fce9a31ba0 frontends/vdpau: Support creating VDP_CHROMA_TYPE_420_16 surfaces
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28317>
2024-04-10 15:00:02 +00:00
David Rosca
b17cf67895 frontends/vdpau: Fix cdef strengths and lr_unit_shift in AV1 decode
Fixes: f9358cb105 ("frontends/vdpau: Add support for VDPAU AV1 decoding.")

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28317>
2024-04-10 15:00:02 +00:00
Martin Krastev
33785a2ab1 svga/ci: re-enable vmware farm
Re-enable the farm after an outage. Latter was caused by lava-ci running out
of free space after accumulation of artifacts, mainly docker images. Mend by:

* setting a cronjob for docker system prune --all --volumes
* bumping up lava-ci fs to 128GB

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28667>
2024-04-10 14:25:02 +00:00
Hans-Kristian Arntzen
2e502542ac vulkan/runtime: Check correct callback list for binding report.
instance_callbacks is only used for vkCreateInstance time callbacks.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: 34e8e5d76f ("vulkan/debug_utils: add a helper for reporting address binding")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28649>
2024-04-10 13:50:56 +00:00
Gert Wollny
66066650c9 zink: if AcquireNextImageKHR fails with VK_NOT_READY or VK_TIMEOUT retry
Gradually increase timeout until we reach a limit on which we abort.
This fixes a crash with

    spec@ext_framebuffer_blit@fbo-blit-check-limits

on llvmpipe.

Fixes: d1cac5ed05
    zink: acquire - maybe clear timeout after waiting for presentation fence

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28558>
2024-04-10 13:21:43 +00:00
Mike Blumenkrantz
a5a2bd2969 lavapipe: don't clamp index buffer size for null index buffer draws
this should execute however many draws the user is trying to execute

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28656>
2024-04-10 12:59:58 +00:00
Jonathan Gray
fef9ad6f66 intel/dev: update DG2 device names
Ref: 864f42116c/shared/source/dll/devices/devices_base.inl (L53)
Fixes: 98f3d072b4 ("intel/dev: Add 0x56be and 0x56bf DG2 PCI IDs")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28643>
2024-04-10 12:02:58 +00:00
Jonathan Gray
a02d8c811d intel/dev: update DG2 device names
Ref: https://ark.intel.com/content/www/us/en/ark/products/237549/intel-arc-a380e-graphics.html
Ref: https://ark.intel.com/content/www/us/en/ark/products/237552/intel-arc-a310e-graphics.html
Ref: https://ark.intel.com/content/www/us/en/ark/products/237550/intel-arc-a370e-graphics.html
Ref: https://ark.intel.com/content/www/us/en/ark/products/237551/intel-arc-a350e-graphics.html
Ref: 864f42116c/shared/source/dll/devices/devices_base.inl (L49)
Fixes: c74a578c54 ("intel/dev: Add 0x56ba-0x56bd DG2 PCI IDs")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28643>
2024-04-10 12:02:58 +00:00
Samuel Pitoiset
8d5072bb7f radv: fix missing unbind report when a buffer is destroyed
There should be a matching unbound operation with
VK_EXT_device_address_binding_report.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659>
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
50060072a7 radv: fix missing unbind report when an image is destroyed
There should be a matching unbound operation with
VK_EXT_device_address_binding_report.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659>
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
ec55364f9b radv: add a helper to set image bindings
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659>
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
91c48d8f43 radv/rmv: fix image binds logging for disjoint images
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659>
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
04c9369c55 radv: fix addr binding report for disjoint image binds
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659>
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
ea84b50e4e radv: fix missing addr binding report for WSI image binds
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659>
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
8626844a00 radv/rmv: fix missing image bind logging for WSI images
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659>
2024-04-10 11:23:40 +00:00
Corentin Noël
f783ca5926 ci: Add VK_DRIVER_FILES passthrough from jobs to tests
Allows to specify the driver in use when running Vulkan tests under crosvm.

Note that this is specifically used in virglrenderer CI.

Fixes: 09e5b3da76
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28609>
2024-04-10 09:46:31 +00:00
Corentin Noël
e16849a0d3 ci: Change propagated variables into an array
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28609>
2024-04-10 09:46:31 +00:00
Konstantin Seurer
03483ecb11 radv: Destroy leaf_updateable_pipeline
The pipeline was never destroyed. Fixes an assert in ac_sqtt_finish.

Fixes: 217072d ("radv/rt: Force active leaves for every updateable accel struct")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28557>
2024-04-10 08:23:14 +00:00
Georg Lehmann
702f40f415 aco: add ra test for hi v_interp_p2_f16
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28435>
2024-04-10 07:49:27 +00:00
Georg Lehmann
e2cb9c57a2 aco: use v_interp_p2_f16 opsel
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28435>
2024-04-10 07:49:27 +00:00
Georg Lehmann
d15ca421c4 aco/gfx9: all non legacy opsel instructions only write 16bits
This affects 16bit VOP3 instructions that were new on gfx9, like max3.

No Foz-DB changes on vega10.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28435>
2024-04-10 07:49:27 +00:00
Georg Lehmann
18706947e8 aco/tests: add assembler tests for interp high_16bits
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28435>
2024-04-10 07:49:27 +00:00
Georg Lehmann
4b5016a537 aco: support high_16bits FS IO
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28435>
2024-04-10 07:49:27 +00:00
Georg Lehmann
af199c6949 aco: swap opsel and wait_exp for vinterp
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28435>
2024-04-10 07:49:26 +00:00
Georg Lehmann
81a334a594 aco/assembler: add vintrp high_16bit support
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28435>
2024-04-10 07:49:26 +00:00
Georg Lehmann
893ee883fe aco: use v1 definition for v_interp_p1lv_f16
The result of the first interpolation step is always fp32.

Fixes: 1647e098e9 ("aco: implement 16-bit interp")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28435>
2024-04-10 07:49:26 +00:00
Samuel Pitoiset
2526d1020b radv/rt: stop passing pCreateInfo to radv_ray_tracing_pipeline_cache_search()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645>
2024-04-10 06:38:38 +00:00
Samuel Pitoiset
5db1ce3733 radv/rt: handle creation feedback like graphics/compute pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645>
2024-04-10 06:38:38 +00:00
Samuel Pitoiset
c73e5e08e0 radv/rt: constify device in radv_init_rt_stage_hashes()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645>
2024-04-10 06:38:38 +00:00
Samuel Pitoiset
7bb437f3d6 radv: stop using a graphics pipeline for generating the graphics key
For future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645>
2024-04-10 06:38:37 +00:00
Samuel Pitoiset
1b05570d6c radv: add skip_shaders_cache also for compute/rt pipelines
Similarly to graphics pipelines. For future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645>
2024-04-10 06:38:37 +00:00
Samuel Pitoiset
f6d9772010 radv: determine if the cache is disabled at device creation time
It's a cleanup but also for future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645>
2024-04-10 06:38:37 +00:00
Tapani Pälli
0413729bc3 intel/compiler: add assert for Wa_22017182272
According to the workaround description:
   "For all Data Port messages, DP_FLUSH_TYPE should not be
    programmed to Discard."

This issue happens only with certain circumstances but as we are not
using discard, add assert and deal with it later if discard is taken in
to use.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24422>
2024-04-10 06:03:58 +00:00
Tapani Pälli
7d4c23991a intel/blorp: remove unused blorp batch flag
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28623>
2024-04-10 05:38:24 +00:00
Yiwei Zhang
c603dee104 venus: use STACK_ARRAY to simplify descriptor set update and push
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28563>
2024-04-10 01:01:37 +00:00
Yiwei Zhang
1521415092 venus: refactor descriptor set update and push
Split the write image counting out to a separate helper
vn_descriptor_set_count_write_image to prepare for STACK_ARRAY.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28563>
2024-04-10 01:01:37 +00:00
Yiwei Zhang
563a61878c venus: drop vn_should_sanitize_descriptor_set_writes
The check won't reduce much of the overhead but also adds more when
something is to be fixed (mostly the case for push descriptor).

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28563>
2024-04-10 01:01:37 +00:00
Yiwei Zhang
21dee4d463 venus: misc set alloc and cleanup refactors
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28563>
2024-04-10 01:01:37 +00:00
Yiwei Zhang
e488b2f85e venus: optimize mutable state restore
Summary:
1. skip zero count
2. no need to check last binding count on the restore path
3. flatten the helper to avoid a 2nd pass in free_descriptors

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28563>
2024-04-10 01:01:37 +00:00
Yiwei Zhang
799ac5d77b venus: set alloc to skip earlier for reserved and invalid bindings
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28563>
2024-04-10 01:01:37 +00:00
Yiwei Zhang
0f47d43eee venus: move async_set_allocation check outside helpers
This is to balance with other checks against it, and meanwhile making it
explicit that real descriptor free shouldn't call the free helper.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28563>
2024-04-10 01:01:37 +00:00
Yiwei Zhang
7d5c046c80 venus: rely on enum vn_descriptor_type for internal trackings
then we don't have to convert at runtime for set allocations

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28563>
2024-04-10 01:01:37 +00:00
Jesse Natalie
2c1cb65949 d3d12: Include <shlobj.h> with lowercase name
The Windows SDK file is <ShlObj.h> but MinGW uses <shlobj.h>. Since
Linux is case-sensitive and Windows isn't, use the MinGW casing.

Fixes: 05b66efb ("d3d12: Add a debug flag for loading WinPixGpuCapturer.dll")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10970
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28635>
2024-04-09 20:30:13 +00:00
M Henning
1fb74672a9 nak: Use undef for unset FSOut components
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27742>
2024-04-09 20:13:16 +00:00
M Henning
fdfccfa8fa nak: Set fewer bits in writes_color
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27742>
2024-04-09 20:13:16 +00:00
M Henning
078fe5454e nak: Fix ldg/stg/atomg encoding to use globalmem
Previously, we were encoding these as the generic pointer ld/st/atom,
which often works but would likely break if you happened to allocate
a page in the wrong spot.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28589>
2024-04-09 19:51:25 +00:00
Lucas Fryzek
b4bf44a574 ci/lp: Remove ext buffer YUV tests from fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28612>
2024-04-09 19:13:34 +00:00
Lucas Fryzek
58b4bf04e4 lp: Wrap udmabuf usage in HAVE_LIBDRM ifdef
Fixes #10969 by ensuring umdabuf functionality is only used when libdrm
is available.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28612>
2024-04-09 19:13:34 +00:00
Chia-I Wu
18e6bb322e radv: fix 2d/3d image copy on compute queue
build_nir_itoi_compute_shader did not handle copies between 2D and 3D
images.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28605>
2024-04-09 18:15:41 +00:00
Samuel Pitoiset
fdffa675f9 docs: mark VK_KHR_maintenance6 as DONE for RADV
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28654>
2024-04-09 16:53:13 +00:00
Eric R. Smith
4c12ac5f7c panfrost: fix polygon offset calculation for floating point Z
For fixed point Z the offset_units passed to glPolygonOffset
must be scaled by 2, and we do that. However, this scaling is not
needed for floating point output, and actually produces incorrect Z
values. The detailed description of the depth offset is in
e.g. section 13.7.2 of the OpenGL ES 3.2 spec. Note that equation (13.11)
has no factor of 2. That factor is what we get as the minimum
resolvable difference in a 24 bit fixed point format.

After this patch the output Z for a 32 bit floating point depth
buffer exactly match what the software renderer produces, and are extremely
close (off by 1 ULP) to the amdgpu hardware renderer; before the
patch they were significantly different.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28477>
2024-04-09 16:30:22 +00:00
Sil Vilerino
54ca0b3b21 d3d12/ci: Add vainfo with appverifier CI check
This trivially covers VA initialization/destruction path
is working with the d3d12 gallium driver, and also check
for leaks using appverifier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28577>
2024-04-09 15:37:23 +00:00
Christian Gmeiner
5028a9ede3 ci/etnaviv: Do not skip tex-miplevel piglits
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28631>
2024-04-09 12:55:21 +00:00
Zan Dobersek
85a8cc14c0 tu/query: improve CP_EVENT_WRITE7::ZPASS_DONE usage
The WRITE_SAMPLE_COUNT_DIFF attribute of CP_EVENT_WRITE7 calculates the
difference between the begin and end sample-count values, but it in fact
accumulates that difference in the desired location, so it's renamed
to reflect that.

When writing out the ending-point samples count for the occlusion query
through CP_EVENT_WRITE7::ZPASS_DONE, enable the SAMPLE_COUNT_END_OFFSET and
WRITE_ACCUM_SAMPLE_COUNT_DIFF attributes on the event struct and use the
address of the beginning-count value. The latter adjustment is necessary
since the difference will be written 8 bytes into the buffer and the
ending-count will be written 16 bytes into the buffer.

With the occlusion query result now being handily accumulated in the query
buffer as long as the hardware supports it, the occlusion_query_slot struct
is adjusted to reflect that. On pre-a740 hardware the difference is still
calculated and stored in the result location, whereas on newer hardware
CP_EVENT_WRITE7::ZPASS_DONE can do it for us.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28610>
2024-04-09 12:04:16 +00:00
Zan Dobersek
1df5ab2562 tu: RB_SAMPLE_COUNT_ADDR is also used on a7xx
Remove the 'A6XX' variant attribute from the RB_SAMPLE_COUNT_ADDR register
definition since this register is also used up to a730, being displaced
from a740 onwards by CP_EVENT_WRITE7::WRITE_SAMPLE_COUNT.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28610>
2024-04-09 12:04:16 +00:00
Zan Dobersek
b2613ba0fb tu/autotune: use SAMPLE_COUNT_END_OFFSET when writing the ending sample count
Use the SAMPLE_COUNT_END_OFFSET attribute when writing out the sample count
at the end of ZPASS_DONE event, if the GPU version supports it. The write
is done 16 bytes into the specified iova address, which is already where
the tu_renderpass_samples struct on top of that address expects the end
value.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28610>
2024-04-09 12:04:16 +00:00
Lionel Landwerlin
85dd83aa46 anv: only check patch_control_points changes in runtime flush
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28396>
2024-04-09 11:32:48 +00:00
David Heidelberg
e2bcbcd24f r600: fix typos
No functional changes intended.

Acked-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28395>
2024-04-09 08:56:08 +00:00
David Heidelberg
fd3d125343 r600: add license information to the sfn_shader_gs.h
Fixes: 79ca456b48 ("r600/sfn: rewrite NIR backend")
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28395>
2024-04-09 08:56:08 +00:00
David Heidelberg
722e5bf46f r600: add license info to the r600_opcodes.h
Fixes: a3a94554f5 ("r600g: split opcodes out and add wrapper around usage.")
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28395>
2024-04-09 08:56:08 +00:00
David Heidelberg
0020dd85ee r600: add license header to r600_formats.h
The header was missing after the definitions were moved.

Fixes: 82114ac02a ("r600g: switch to a common formats.h file since they are in different regs")

Acked-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28395>
2024-04-09 08:56:08 +00:00
David Heidelberg
fb8cf56b75 r600: update licensing to SPDX header
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28395>
2024-04-09 08:56:08 +00:00
David Heidelberg
c423f48204 frontend/nine: fix typos
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28232>
2024-04-09 10:30:40 +02:00
Axel Davy
c6468f6547 frontend/nine: Reset should EndScene
This was reported by some users.

Cc: mesa-stable
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28232>
2024-04-09 10:30:40 +02:00
Axel Davy
d6044cf857 frontend/nine: Fix destruction race
As we were checking the bind count after decreasing the ref count,
we could hit a situation where the worker thread decreases the bind count
just after the ref count is decreased, but before the bind count is checked
which would lead to both threads calling the resource dtor.

Cc: mesa-stable
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28232>
2024-04-09 10:30:40 +02:00
Axel Davy
b4a14c7ebf frontend/nine: Fix missing light flag check
The constants for ff lights use the VIEW matrix,
thus we must update them if the matrix is dirty.

Cc: mesa-stable

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28232>
2024-04-09 10:30:40 +02:00
Axel Davy
d3cec6cdf1 frontend/nine: Fix programmable vs check
Checking if context->vs is set is not
equivalent to checking programmable vs

Cc: mesa-stable
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28232>
2024-04-09 10:30:39 +02:00
Axel Davy
9063d554f3 frontend/nine: Fix ff ps key
The stage index, rather than the
texture coord index was used.

Cc: mesa-stable
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28232>
2024-04-09 10:30:39 +02:00
Konstantin Seurer
750b2af4d9 lavapipe: Implement VK_KHR_ray_tracing_position_fetch
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:02 +00:00
Konstantin Seurer
cede129119 lavapipe: Implement VK_EXT_pipeline_library_group_handles
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:02 +00:00
Konstantin Seurer
1f729d9e2d lavapipe: Implement KHR_ray_tracing_maintenance1
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:02 +00:00
Konstantin Seurer
d99e95e033 lavapipe: Implement VK_KHR_ray_tracing_pipeline
Uses the existing ray traversal helpers and function calls handled by
gallivm.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:02 +00:00
Konstantin Seurer
8b71c6d0d1 lavapipe: Fix a memory leak in lvp_push_internal_buffer
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:02 +00:00
Konstantin Seurer
73259c9ec4 lavapipe: Add an api_stage parameter to update_pcbuf
llvmpipe does not support ray tracing stages, so update_pcbuf needs to
be aware of the Vulkan and the llvmpipe stage.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:02 +00:00
Konstantin Seurer
fd8fd2d791 lavapipe: Inline fill_ubo0
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:02 +00:00
Konstantin Seurer
9482d8cc61 lavapipe: Use the pipeline type in get_pcbuf_size
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
5e0b8334ec lavapipe: Pass lvp_ray_flags into lvp_aabb_intersection_cb
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
bdab90d120 lavapipe: Add more ray tracing helpers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
35ad2e37d9 lavapipe: Remove unused ray tracing variables
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
5423a47954 lavapipe: Defer binding compute state
Ray tracing uses compute state as well and therefore will need to dirty
it.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
a738ae4838 lavapipe: Lower mem_constant variables
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
8ff444b595 lavapipe: Make lvp_create_pipeline_nir non-static
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
1a718e0adf lavapipe: Make lvp_shader_init non-static
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
5d43b8c46e lavapipe: Add lvp_spirv_to_nir
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
04af9b3ac2 llvmpipe: Fix function call handling
Fixes using images and samplers inside functions and allows for
function calls outside of kernels.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
85e840786c nir: Add lavapipe ray tracing intrinsics
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
edc8e011eb nir/serialize: Encode data for temporaries
the location has to be preserved when lowering them to scratch using
nir_lower_vars_to_explicit_types and nir_lower_explicit_io.

cc: mesa-stable

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Konstantin Seurer
1ff8659f41 nir/print: Fix printing booleans with bit_size>1
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
2024-04-09 07:13:01 +00:00
Paul Gofman
27dba224d3 driconf: add a workaround for Joe Danger
CC: mesa-stable
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28439>
2024-04-09 01:29:24 +00:00
Paul Gofman
2abb72f512 driconf: add a workaround for Joe Danger 2
CC: mesa-stable
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28439>
2024-04-09 01:29:23 +00:00
Paul Gofman
bd189dbd77 glsl: allow out arrays in #110 with allow_glsl_120_subset_in_110
CC: mesa-stable
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28439>
2024-04-09 01:29:23 +00:00
Faith Ekstrand
6b383ca810 nil: Enforce units via Rust types
We add a units generic parameter to Extent4D and Offset4D and then make
every helper take and return the right type.  The mul and div_* helpers
only half-enforce types but it's better than nothing.  We leave them
non-public so no one outside extent.rs uses them.

Reviewed-by: Lina Versace <linyaa@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28639>
2024-04-09 00:13:01 +00:00
Faith Ekstrand
c3b33de33c nil: Take a format in el_to_B()
Reviewed-by: Lina Versace <linyaa@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28639>
2024-04-09 00:13:01 +00:00
Faith Ekstrand
5a075785ac nil: Drop the nil_extent/offset4d() helpers
They're only used one place each in NVK and we can just use a struct
initializer instead.

Reviewed-by: Lina Versace <linyaa@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28639>
2024-04-09 00:13:01 +00:00
Faith Ekstrand
bc0de7a2cf nil: Add Extent/Offset4D::new() helpers
We're about to add a PhantomData to Extent/Offset4D and that'll make it
harder to construct.  Adding a helper lets us more easily construct them
elsewhere in the code.

Reviewed-by: Lina Versace <linyaa@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28639>
2024-04-09 00:13:01 +00:00
Connor Abbott
8f65ecac21 ir3: Use divergence analysis for (jp) and physical CFG
This will be important for checking whether we can use scalar registers
for phis.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28573>
2024-04-08 23:20:08 +00:00
Connor Abbott
b349dc5c74 ir3: Remove loop shared copy check
This is now handled by inserting LCSSA phis similar to how it's handled
in ACO.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28573>
2024-04-08 23:20:08 +00:00
Connor Abbott
5ed567fea1 ir3: Run divergence analysis at the end
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28573>
2024-04-08 23:20:08 +00:00
Connor Abbott
266adc3e11 ir3: Allow single-predecessor phis
These will be used to block propagating shared -> non shared moves out
of loops instead of the current check in ir3_cp.c, similar to what ACO
does.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28573>
2024-04-08 23:20:08 +00:00
Connor Abbott
42ddbf4ebe nir/divergence_analysis: Fix load_view_index divergence in VS
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28573>
2024-04-08 23:20:08 +00:00
Connor Abbott
223e3727d5 nir/divergence_analysis: Add uniform_load_tears option
This "tear" is similar to the original concept of loads/stores tearing,
but across invocations in a wave instead of bytes. Qualcomm seems to
have this problem, at least for some GPUs. This fixes
spec@arb_shader_storage_buffer_object@execution@ssbo-atomiccompswap-int
on a630 once we start relying on divergence analysis for computing
reconvergence properties. For backends that have readFirstInvocation(),
it should be possible to fix the problem by inserting
readFirstInvocation() instead, but a5xx doesn't have it so we can't rely
on it in freedreno.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28573>
2024-04-08 23:20:08 +00:00
Connor Abbott
291e6d2940 nir/divergence_analysis: Add ir3-specific intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28573>
2024-04-08 23:20:08 +00:00
Paulo Zanoni
cf7e1f3817 anv, iris: add missing CS_STALL bit for GPGPU texture invalidation
The BSpec page "Flush Types" (46213) says the following about the Tex
Invalidate bit:

  "Requires stall bit ([20] of DW) set for all GPGPU Workloads."

For newer platforms, this is documented in the description of the
texture invalidation bit in the PIPE_CONTROL page (56551):

  "CS Stall bit in PIPE_CONTROL command must be always set for GPGPU
   workloads when Texture Cache Invalidation Enable bit is set"

Iris had it only for GFX_VER 9 and 11, while Anv had it missing for
everything.

Please notice that this patch includes a revert of 397e728ef4.

Fixes: 397e728ef4 ("iris: Drop GPGPU Tex Invalidate restriction for TGL+")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
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/28608>
2024-04-08 22:57:22 +00:00
Zack Rusin
955444e068 svga: Fix instanced draw detection
The new GTK+ GL renderer is extensively using instanced rendering. SVGA
driver was incorrectly detecting the instanced draws by only checking
whether the instance count was greater than 1. Base instance has to
be also checked to make sure that the draw correctly offsets the vertex
buffer.

Fix instanced draw detection by checking both the instance count and
the base instance. Fixes the new GTK+ 4 GL renderer.

Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Fixes: ccb4ea5a43 ("svga: Add GL4.1(compatibility profile) support in svga driver")
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28616>
2024-04-08 22:35:48 +00:00
Pavel Ondračka
96479794a5 nir/lower_vec_to_regs: always set cursor before inserting decl_reg
Otherwise we can end with invalid curson in some cases, specifically,
if we encounter an identity vector and thus neither register
declaration nor swizzle is inserted, it can lead to invalid cursor and a
crash later.

Suggested by: Alyssa Rosenzweig <alyssa@rosenzweig.io>

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10905
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28581>
2024-04-08 21:03:46 +00:00
Faith Ekstrand
fc90d4eed9 nil: Make the Rust library the primary build target
This just shuffles around the meson to make it so that the Rust library
is the final build target, not a C library.  We're still building
fundamentally the same amount of stuff because nil_format_table.c is
still C (C is really good at tables that go in the .data section) and we
still need a wrapper rlib for bindgen.  Howver, the Rust library is now
the main thing.  When the time comes to start using NIL from other Rust
code, this will mean that we can just build an rlib and it will have
everything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:44 +00:00
Faith Ekstrand
571b77fee7 nil: Delete unused USAGE bits
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:44 +00:00
Daniel Almeida
5577128c83 nil: Rewrite the TIC code in Rust
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:44 +00:00
Faith Ekstrand
d5b7dd6ce5 nak/bitview: Add a SetField<f32> implementation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:44 +00:00
Daniel Almeida
426553d61d nil: Re-implement nil_image in Rust
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Faith Ekstrand
9fdcd217a4 nil: Rename nil_tiling::gob_height_8 to gob_height_is_8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Faith Ekstrand
c13e7b01f9 nvk: Stop using nvk_extent4d short names
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Daniel Almeida
1713b02da7 nil: Rewrite nil_format in rust
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Daniel Almeida
303dc12214 nil: Add the start of a Rust library
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Faith Ekstrand
299f32736a nil: Move to a single header file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Faith Ekstrand
cdaa8e67e3 nil: Move nil_tic_format to nil_format_table.h
This gets it out of nil_format.c/h and decouples things a bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Daniel Almeida
dde95fc039 meson,ci: Add the paste crate
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Faith Ekstrand
923a0a727b ci: Add cbindgen to the build images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Faith Ekstrand
640d14969e nouveau/headers: Add Rust bindings for texture headers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Faith Ekstrand
56aefac615 nouveau/headers: Add initial Rust bindings
This adds the infrastructure for the nvidia_headers crate.  It currently
only has declarations for the texture headers but QMDs should be trivial
to add as well.  The plan is to organize it as follows:

crate nvidia_headers {
    mod cl9097 {
        // Methods
        mod tex {
            // Texture defines
        }
    }
    mod clc5c0 {
        // Methods
        mod qmd {
            // QMD defines
        }
    }
}

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Faith Ekstrand
53bc795616 nouveau: Use hyphenated arguments to class_parser.py
This is more consistent with other code generators in Mesa.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Faith Ekstrand
0d2008461d nouveau: Move .rustfmt.toml from NAK to src/nouveau/
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27397>
2024-04-08 20:28:43 +00:00
Samuel Pitoiset
f387c47365 ci: uprev vkd3d-proton to c3b385606a93baed42482d822805e0d9c2f3f603
The current version was 3 months old and a bunch of new tests have
been added since.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28124>
2024-04-08 19:18:21 +00:00
Rhys Perry
0f2d5ed75c aco: assume no unreachable blocks
These shouldn't happen anymore.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28301>
2024-04-08 18:38:39 +00:00
Rhys Perry
306a72db1f aco/tests: add control flow tests
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28301>
2024-04-08 18:38:39 +00:00
Rhys Perry
ae63d967d7 aco/tests: add isel test helpers
Having NIR-based instruction selection tests instead of GLSL lets us be
more precise with the input NIR.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28301>
2024-04-08 18:38:39 +00:00
Rhys Perry
543ca160a5 nir,aco: add test intrinsics
These don't really do anything. They're just a source and user of SSA
defs.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28301>
2024-04-08 18:38:39 +00:00
Rhys Perry
0a25af1d4e aco: save/reset/combine has_divergent_continue in uniform branches
For
if (uniform) {
   if (divergent)
      continue
} else {
   break
}
we don't need to consider the continue to be divergent.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28301>
2024-04-08 18:38:39 +00:00
Rhys Perry
46c734ff02 aco: ensure loop exits exist in NIR
This simplifies instruction selection and fixes the case where the loop
ends with a continue instruction.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28301>
2024-04-08 18:38:39 +00:00
Rhys Perry
842191e9ba aco: remove unreachable merge blocks
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28301>
2024-04-08 18:38:39 +00:00
Rhys Perry
863718d62e nir: add nir_remove_after_cf_node helper
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28301>
2024-04-08 18:38:39 +00:00
Paulo Zanoni
b0653370d0 vulkan: don't zero-initialize STACK_ARRAY()'s stack array
STACK_ARRAY() is used in a lot of places. When games are running we
see STACK_ARRAY() arrays being used all the time: each queue
submission uses 6, WaitSemaphores and syncobj waiting also uses them:
they're constantly present in Vulkan runtime.

There's no need for STACK_ARRAY()'s stack array to be initialized,
callers cannot not depend on it. If the number of elements is greater
than STACK_ARRAY_SIZE, then STACK_ARRAY() will just malloc() the array
and return it not initialized: anybody depending of
zero-initialization is going to break when the array is big.

The reason why we're zero-intializing STACK_ARRAY()'s stack array is
to silence -Wmaybe-uninitialized warnings: see commit d7957df318
("vulkan: fix uninitialized variables"). I don't think that commit is
the ideal way to deal with the problem, so this patch proposes a
better solution.

The problem here is that zero-initializing it adds code we don't need
for every single caller. STACK_ARRAY() already has 63 callers and only
3 of them are affected by the -Wmaybe-uninitialized warining. So here
we undo what commit d7957df318 did and instead we fix the 3 cases
that actually generate the -Wmaybe-uninitialized warnings.

Gcc is only emitting those warinings because it knows that the number
of elements in the array may be zero, so the loops we have that set
elements to the array may end up do nothing, and then we pass the
array uninitialized to other functions.

For the cases related to vk_sync this is just returning VK_SUCCESS
earlier, instead of relying on the check that eventually happens at
__vk_sync_wait_many(). For the vkCmdWaitEvents() function, the Vulkan
spec says that "eventCount must be greater than 0", so the early
return doesn't hurt anybody either. In both cases we make the zero
case faster by not defining an 8-sized array, zero-initializing it,
then returning success without using it.

Reference: d7957df318 ("vulkan: fix uninitialized variables")
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28288>
2024-04-08 17:23:25 +00:00
Sergi Blanch Torne
856db21acd Revert "ci: disable Collabora's farm due to maintance"
This reverts commit fe53d85273.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28624>
2024-04-08 16:37:33 +00:00
Lucas Stach
34b6ae96c0 etnaviv: use correct blit box sizes when copying resource
The padded width/height is stored in samples, while the blit box
dimensions need to be specified in pixels. Use the unpadded
width/height of the resource levels to generate the blit box
dimensions used to copy a resource. The blit code already extends
those sizes to the padded sizes when necessary and possible.

This commit needed to be reverted previously, as it triggered
a bug in the RS blit path. This bug has been fixed so now we
can reapply this change to get the blit dimensions corrected.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28598>
2024-04-08 16:19:18 +00:00
Lucas Stach
2964812aac etnaviv: rs: take src dimensions into account when increasing height alignment
When trying to increase the height alignment to unlock multi-pipe resolve for
better performance we need to be careful to not overstep the source dimensions
as this would cause the blit to be rejected.

Do so and also rearrange the code a bit to make it more obvious what is being
done.

Fixes: 797454edfc ("etnaviv: rs: fix blits with insufficient alignment for dual pipe operation")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28598>
2024-04-08 16:19:18 +00:00
Samuel Pitoiset
7a69d78ba2 aco: use SPDX-License-Identifier
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28622>
2024-04-08 15:49:25 +00:00
Eric Engestrom
bd68c39f65 mr-label-maker: be explicit about the various CI files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28596>
2024-04-08 13:33:51 +00:00
Eric Engestrom
b2f3835d00 mr-label-maker: include */gitlab-ci-inc.yml in GitLab CI changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28596>
2024-04-08 13:33:51 +00:00
Lionel Landwerlin
2dd321963f isl: set NullPageCoherencyEnable for depth/stencil sparse surfaces
Not setting this bits, it seems we get incorrect depth values (i.e
not zero) for null depth/stencil tiles.

Fixes vkd3d-proton's test_sparse_depth_stencil_rendering

CTS doesn´t seem to exercise any depth/stencil format.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28611>
2024-04-08 09:03:41 +00:00
Samuel Pitoiset
74955dbed7 radv: enable VK_EXT_shader_object by default
This has been a long and painful extension to implement but finally
RADV has support for it on all supported generations. It's passing
VKCTS and GLCTS through Zink but the number of application using ESO
is currently very limited.

This adds RADV_DEBUG=noeso to disable it for debugging purposes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28374>
2024-04-08 08:36:14 +00:00
Erik Faye-Lund
6bf80841a8 panfrost: add tiler-heap driconfs
We currently allocate 10 MB up-front for tiler heaps. That can sometimes
be a lot, depending on the system. So let's add some DRIconf variables to
allow tweaking these.

Until we have incremental-rendering implemented, it's a bit risky to lower
these too much. Be warned.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28594>
2024-04-08 08:17:08 +00:00
Erik Faye-Lund
d55f85491c panfrost: silence compiler warning
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28595>
2024-04-08 07:55:15 +00:00
Samuel Pitoiset
87fde606cf radv: use SPDX-License-Identifier
Only files under src/amd/vulkan/** are concerned.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28599>
2024-04-08 07:17:31 +00:00
Lionel Landwerlin
c3d30d9e65 anv: mark descriptors & pipeline dirty after blorp compute
All of those are used by blorp, we need to reemit it when doing the
next compute dispatch.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 37fca614b8 ("anv/blorp: Split blorp_exec into a render and compute")
Fixes: 6823ffe70e ("anv: try to keep the pipeline in GPGPU mode when buffer transfer ops")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10972
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28617>
2024-04-08 06:55:54 +00:00
Sergi Blanch Torne
fe53d85273 ci: disable Collabora's farm due to maintance
Planned downtime in the farm:
* Start: 2024-04-08 07:00 UTC
* End: 2024-04-08 13:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28391>
2024-04-08 08:34:29 +02:00
Hyunjun Ko
2bd3674679 anv/video: Fix to set correct offset and size for parsing h265 slice header.
Fixes: 8d519eb5 ("anv: add initial video decode support for h265")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28591>
2024-04-08 04:12:07 +00:00
M Henning
e808a1ead4 nvk: Early-out impossible descriptor allocations
Also, return VK_ERROR_FRAGMENTED_POOL when appropriate.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28494>
2024-04-08 03:10:08 +00:00
Faith Ekstrand
aac2a31b3d vulkan: Add a bunch of -Wpadded errors
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28615>
2024-04-06 23:54:36 -05:00
Faith Ekstrand
6ea591d372 nvk: Add a bunch of -Wpadded errors
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28615>
2024-04-06 23:54:34 -05:00
Faith Ekstrand
987cbaee2a nvk: Add a _pad field to nvk_fs_key
Fixes: ae17145882 ("nak: Rewrite nir_intrinsic_load_sample_pos...")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28615>
2024-04-06 23:54:28 -05:00
Eric R. Smith
0cb852050d gallium: handle copy_image of depth textures
copy_image calls blit now for multisampled images, including
depth. But blit explicitly uses only PIPE_MASK_RGBA, so it is
incapable of copying depth buffers.

This patch checks the destination format and uses PIPE_MASK_ZS if
it is a depth or stencil. Ideally we would simply use PIPE_MASK_RGBAZS
always, but not all drivers actually handle getting this mask
(they probably should, but that's another story).

The change to copy_image was in 5027b5aa2, so in some sense this
patch "fixes" that. In fact though the issue wasn't in the copy_image
change, it was always latent in blit().

Fixes: 5027b5aa28 ("gallium: stop calling resource_copy_region for multisampled copy_image")
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28585>
2024-04-06 22:50:10 +00:00
Eric Engestrom
d5aefb7a16 meson: auto-enable glvnd when libglvnd is installed
We've talked about flipping the default value of `glvnd` to `true`
a bunch of times but never actually went through with it because some
don't want to use glvnd, so let's instead go for the middle ground of
"enabled glvnd by default if it's installed".

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26367>
2024-04-06 18:40:47 +00:00
Eric Engestrom
f39b8154c1 ci: explicitly disable glvnd to avoid regression when making it auto
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26367>
2024-04-06 18:40:46 +00:00
Eric Engestrom
4f25b84b24 meson: turn glvnd option into a feature
Makes for nicer code, and allows the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26367>
2024-04-06 18:40:46 +00:00
Eric Engestrom
3a4a16e9e8 meson: regroup glvnd lines to get an easier-to-review diff in the next commit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26367>
2024-04-06 18:40:46 +00:00
Eric Engestrom
a6392c06c0 gallium/dri: reuse existing meson variables
This avoid having to duplicate the logic there in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26367>
2024-04-06 18:40:46 +00:00
Lionel Landwerlin
fe36cf6cad anv: add missing data flush out of L3 for transform feedback writes
Fixes zink's piglit.spec.arb_shader_image_load_store.host-mem-barrier on TGL

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28492>
2024-04-06 07:33:29 +00:00
Timothy Arceri
f60956d002 glsl: move check_explicit_uniform_locations() to NIR linker
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:04 +00:00
Timothy Arceri
2a5ae739ea glsl: move link_assign_subroutine_types() to the nir linker
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:04 +00:00
Timothy Arceri
baf13bff29 nir: add subroutine fields to nir_function
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:04 +00:00
Timothy Arceri
5ea15ded2f glsl: switch verify_subroutine_associated_funcs() to nir
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:04 +00:00
Timothy Arceri
1a78e9a7e8 glsl: move some linking calls to gl_nir_link_glsl()
This is a more logical place for them and will avoid us adding more
function validtion calls to the st glsl to nir file in future
patches.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:04 +00:00
Timothy Arceri
dbaa90200c glsl: remove now unused glsl ir block validation
We now use a NIR based implementation instead.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:04 +00:00
Timothy Arceri
07078d4b8e glsl: remove now unused resize_tes_inputs()
This has be replaced by a NIR based implementation of this function.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:04 +00:00
Timothy Arceri
c2066d4685 glsl: call new nir resize_tes_inputs() pass
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:04 +00:00
Timothy Arceri
d1c11d957a glsl: switch to NIR block validation
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:04 +00:00
Timothy Arceri
aea1265470 glsl: add nir implemenation of block validation
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:04 +00:00
Timothy Arceri
20978004a7 glsl: don't remove redefined per vertex block
Commit 719bf30165 added this removal code with the following
justification:

"The GLSL 4.10 rules for redeclaration of built-in interface blocks
 (which we've chosen to regard as clarifications of GLSL 1.50) only
 require gl_PerVertex blocks to match in shaders that actually use
 those blocks.  The easiest way to implement this is to detect
 situations where a compiled shader doesn't refer to any elements of
 gl_PerVertex, and remove all the associated ir_variables from the
 shader at the end of ast-to-ir conversion."

However the intention is to avoid matching a redeclared block with
gl's default block if unused. We are still required to do block
matching in the shader should the block be redeclared, even if unused.
So with this change we only remove the block if it is both unused
and not redeclared.

The existing glsl IR code managed to avoid failing CTS tests for this
due to seemingly magical or hacky use of the symbol table but fixing
it will make things much clearer, and also allow a nir version of
this validation in a following patch.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:04 +00:00
Timothy Arceri
c46827d52a nir: add variable field from_ssbo_unsized_array
This will be used for validation in following patches

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:03 +00:00
Timothy Arceri
ab801a1a27 glsl: add resize_tes_inputs() to the nir linker
We will switch from the GLSL IR version to this in a following patch.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:03 +00:00
Timothy Arceri
a18e06f694 nir: add implicit_sized_array data field
Will be used in following patches for glsl linking validation.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:03 +00:00
Timothy Arceri
f24e6a5062 nir: add max_array_access data field
Will be used in following patches for glsl linking validation.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
2024-04-06 05:56:03 +00:00
Jesse Natalie
acbf3ad1fb glsl: Use a stable attr sort for VS in / FS out
This is a perpetual bug that hits Windows. In the MSVC CRT, qsort
is unstable, where the glibc qsort is stable. So apps run fine on
Windows IHV drivers, and on Linux Mesa drivers, and only break down
when running on Windows Mesa drivers.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10922
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28586>
2024-04-05 20:35:05 +00:00
Lionel Landwerlin
6a7e576017 intel/fs: fixup instruction scheduling last grf write tracking
When I bumped the max size of VGRFs, I should have bumped the values
in the scheduler too.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d33aff783d ("intel/fs: add support for sparse accesses")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28188>
2024-04-05 19:46:40 +00:00
Lionel Landwerlin
d59612f5e5 intel/fs: printout a couple of more late compile steps
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28188>
2024-04-05 19:46:40 +00:00
Gert Wollny
012c696561 zink/ntv: pull result out of cases and use a common store_def
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
Gert Wollny
fa581c7020 zink/ntv: extract emit_tex_readop as function that reads texture pixel data
These calls need a different preparation and result type handling than
the calls that query resource info, so we move this to an extra
function that can then be called from the default case of the
texop switch.

v2: drop ALWAYS_INLINE (zmike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
Gert Wollny
13f8a462c5 zink/ntv: extract picking the image to load from
v2: remove ALWAYS_INLINE (zmike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
Gert Wollny
2678f7a554 zink/ntv: replace if-chain with switch in emit_tex
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
Gert Wollny
cadbf72076 zink/ntv: Extract move_tex:proj_into_coord
v2: - drop ALWAYS_INLINE (zmike)
    - move test whether projection must be applied out of function,
      this makes it clearer at the call site when this change
      is applied

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
Gert Wollny
1850cd9a82 zink/ntv: extract get_texop_dest_type
v2: drop ALWAYS_INLINE (zmike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
Gert Wollny
94bef5a182 zink/ntv: extract get_texture_load
v2: drop ALWAYS_INLINE (zmike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
Gert Wollny
7f1a4624f8 zink/ntv: simplify evaluation of sampled_type
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
Gert Wollny
6c5193368b zink/ntv: extract find_sampler_and_texture_index
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
Gert Wollny
cca3f1de56 zink/ntv: use new struct to pass texture parameters
v2: pass struct spirv_tex_src as const ptr (zmike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
Gert Wollny
f19d22ed7f zink/ntv: extract get_tex_srcs
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
Gert Wollny
881b2b1192 zink/ntv: introduce structure using the source params
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
2024-04-05 19:19:29 +00:00
David Heidelberg
5b69cbb80a ci/amd: drop old PIGLIT_REPLAY_DESCRIPTION_FILE surpassed by PIGLIT_TRACES_FILE
This got probably accidentally in, as Eric MR changing this was just
before this change got in.

Fixes: 16af090908 ("ci/lava: separate HW definitions from SW")
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28600>
2024-04-05 18:51:48 +00:00
David Heidelberg
9c104d2158 ci/amd: meld radv-traces into radv-raven-traces
Most of it is one workload specific.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28600>
2024-04-05 18:51:48 +00:00
Mike Blumenkrantz
38c5a722c2 microsoft/compiler: set compact_arrays in compiler options
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28554>
2024-04-05 17:56:28 +00:00
Mike Blumenkrantz
695cde484e zink: set compact_arrays in compiler options
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28554>
2024-04-05 17:56:28 +00:00
Mike Blumenkrantz
a9d366085c nir/gather_info: fix gathering for compact arrayed builtins
these are treated as vecs, but depending on driver caps num_slots
may or may not equal the array size

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28554>
2024-04-05 17:56:28 +00:00
Mike Blumenkrantz
843614f45a nir: add compact_arrays to nir_shader_compiler_options
this is used to inform passes about semantics for compact array builtins

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28554>
2024-04-05 17:56:28 +00:00
Eric Engestrom
6e2c3a70d3 ci: add nightly full run of lavapipe
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28593>
2024-04-05 17:18:55 +00:00
Eric Engestrom
5650107c28 ci: add nightly full run of llvmpipe
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28593>
2024-04-05 17:18:55 +00:00
Eric Engestrom
581f60def1 ci/lavapipe: skip test that sometimes times out
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28593>
2024-04-05 17:18:55 +00:00
Eric Engestrom
69023c461f ci/lavapipe: fix out of date fails list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28593>
2024-04-05 17:18:55 +00:00
Eric Engestrom
60977b2efb ci/llvmpipe: fix out of date fails list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28593>
2024-04-05 17:18:55 +00:00
Eric Engestrom
207f45e098 ci/llvmpipe: make sure manual jobs don't auto-retry
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28593>
2024-04-05 17:18:55 +00:00
Mary Guillemard
ab6118361b nvk: Allow various alu op to be vectorized for 2xfp16
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27635>
2024-04-05 16:58:04 +00:00
Mary Guillemard
001540bad2 nvk: Advertise shaderFloat16
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27635>
2024-04-05 16:58:04 +00:00
Mary Guillemard
567cae69c3 nak: Add 16-bits float operations
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27635>
2024-04-05 16:58:04 +00:00
Mary Guillemard
6b2ce802b7 nak: Improve copy propagation pass to handle F16
Allow to optimize away prmt rX 0xXX01 rY and prmt rX 0x32XX rY.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27635>
2024-04-05 16:58:04 +00:00
Mary Guillemard
bad23ddb48 nak: Add F16 and F16v2 sources
This also add a swizzle information in Src for F16v2.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27635>
2024-04-05 16:58:04 +00:00
Mary Guillemard
791c2b604a nak: move folding logic to Src::fold_imm
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27635>
2024-04-05 16:58:04 +00:00
Mary Guillemard
02873c4745 nak: Support unaligned swizzles in 8/16 bits vec srcs
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27635>
2024-04-05 16:58:03 +00:00
Lucas Fryzek
c2ec0111b2 venus/ci: Add patch for modifiers test to check import/export bits
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
e84b6255d8 docs: update lavapipe features
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Lucas Fryzek
0507988f41 lavapipe: EXT_image_drm_format_modifier
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
d6cb3c5793 lavapipe: handle drm image imports
this creates the unbacked image with the metadata expected for use
with imports, then applies the import offset when binding memory

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Lucas Fryzek
bd4f69a0fe lavapipe: check drm modifier info during image create
not doing anything except validation

Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
97331d1ed4 lavapipe: handle drm image format queries
only LINEAR is supported, so this is easy

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Lucas Fryzek
a4290558df lavapipe: include drm_fourcc.h
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
18c345d840 lavapipe: rework mem handle type assert to handle dmabuf
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
6df7cf4cfc lavapipe: EXT_queue_family_foreign
no-op for us

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Lucas Fryzek
b3d3239fc1 llvmpipe: make it possible to import and bind unbacked resources
this reworks the existing import to just set some metadata and then
apply the memory region during bind with the assumption that something
else is doing the import

Also adjust ci failures for llvmpipe to represent multiplanar surfaces as
not supported

Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
bfd8c12406 winsys: add more stride members to winsys_handle
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
3727457884 winsys: add WINSYS_HANDLE_TYPE_UNBACKED
for use with lavapipe imports

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Lucas Fryzek
07f25aa785 lavapipe: EXT_external_memory_dma_buf
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:21 +00:00
Lucas Fryzek
c1657de63c lavapipe: support VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
eb64f56b59 lavapipe: add a function for asserting external memory handle types
easier to expand upon

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Lucas Fryzek
ce3851d469 llvmpipe: conditionally export PIPE_CAP_DMABUF
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Lucas Fryzek
715b29d032 drisw: reuse kopper image extension vtable if modifiers/dmabuf is supported
this is handier than copying the same vtable again

Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Lucas Fryzek
d74ea2c117 llvmpipe: Implement dmabuf handling
For export this is handled through the use of the udmabuf driver to
allocate a dmabuf we can control from userspace. For import this is
handled through mmap-ing a dmabuf handle. Please note that you can
only mmap a dmabuf handle if its linear and the dmabuf handle was
created with matching read and write permissions.

Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Lucas Fryzek
7e5c5d313b gallium: Add dmabuf arg to memory fd allocation API
Modify the memory fd allocation API to provide an argument to specify
if the allocating fd should be a dmabuf.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
e4ae665f93 winsys/drisw: implement dmabuf handling
this comes in two variants:
* util/memfd stuff with a header for metadata
* raw fd passing

for imports, both have to be tried since the import might be from a hw
device, but only the latter needs to be handled in winsys here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
17abe3ecbd winsys/drisw: implement displaytarget_create_mapped
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
73d75971ab winsys/null: implement displaytarget_create_mapped
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
23206844eb sw_winsys: add displaytarget_create_mapped
this is for creating displaytargets from already-imported fds

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
6e43fbdb11 drisw: reorder image extensions
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Lucas Fryzek
2b4e56ca27 llvmpipe: explicitly reject (most) yuv formats
use gallium fallbacks here

Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
2024-04-05 16:05:20 +00:00
Gert Wollny
0f97c2ec51 ntv: simplify increasing the number of dest componnets for sparse tex
store_def doesn't use the number of components, so we can drop the
checks for is_shador and simpliy increment the number of components.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28502>
2024-04-05 15:28:12 +00:00
Gert Wollny
0aa6c4437c ntv: pass def->index to store_def
The full definition is not needed, only the index.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28502>
2024-04-05 15:28:12 +00:00
Gert Wollny
f73dc77cc7 ntv: remove store_ssa_def
move the code to store_def and drop store_ssa_def.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28502>
2024-04-05 15:28:12 +00:00
Gert Wollny
5415abe396 ntv: remove store_def_raw
it was only forwarding to store_ssa_def

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28502>
2024-04-05 15:28:12 +00:00
José Roberto de Souza
77c004f7ca anv: Create protected engine context when i915 supports vm control
When has_vm_control is supported it takes a different code path and
creates one context per engine and in this code path we were not
setting the protected context flag.

The lack of this is not causing any test to fail in our CI but it is
better do what we are supposed to do.

Fixes: fd40134487 ("anv: allow protected GEM context creation")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28299>
2024-04-05 15:00:24 +00:00
Timur Kristóf
f0a354a7a5 radv: Don't set driver locations for last pre-rasterization stage.
They were already unused, just don't set them.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553>
2024-04-05 15:25:32 +02:00
Timur Kristóf
0dbf6e7582 radv: Don't set driver locations for FS outputs.
They were already unused, just don't set them.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553>
2024-04-05 15:25:24 +02:00
Timur Kristóf
450c8f159b radv: Don't set driver locations for mesh shaders.
They were already unused, just don't set them.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553>
2024-04-05 15:25:15 +02:00
Timur Kristóf
a554e44eae radv: Use NIR IO semantics for VS input location mapping.
The IO semantics already contain all the information needed
for VS inputs, so there is no need use driver locations.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553>
2024-04-05 15:24:43 +02:00
Timur Kristóf
124202469f ac/nir/ngg: Rename confusing driver_location variable in mesh shader lowering.
Mesh shader lowering never used the actual driver location
because it uses custom mapping for the I/O variables, but
it had some variables with this name, which is confusing.
Rename them to mapped_location.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553>
2024-04-05 15:24:37 +02:00
Timur Kristóf
580baaf1e1 ac/nir/ngg: Use IO semantics for determining instance rate inputs.
This used the driver location by accident, which is wrong.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553>
2024-04-05 15:24:14 +02:00
Timur Kristóf
11ced35e0a ac/nir/ngg: Don't create dummy output variable for primitive ID.
This was needed by RADV in the past, but not anymore.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553>
2024-04-05 15:23:28 +02:00
Samuel Pitoiset
14ba56718f radv: make sure the heap budget is less than or equal to the heap size
Reported by Hans-Kristian.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28575>
2024-04-05 12:43:09 +00:00
Samuel Pitoiset
a29fda1ba0 radv: move radv_printf_data to radv_printf.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592>
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
9223b80086 radv: remove old comment in radv_cs.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592>
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
6428270408 radv: move radv_queue_family_to_ring() to radv_queue.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592>
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
6e4f26827c radv: move radv_get_user_sgpr() to radv_shader.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592>
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
80683c220b radv: make radv_get_vgt_index_size() static
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592>
2024-04-05 12:18:38 +00:00
Rhys Perry
be8b8722f9 radv: memset radv_pipeline_cache_object data
This silences Valgrind warnings.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28549>
2024-04-05 11:56:25 +00:00
Rhys Perry
c3c138b10f radv: optimize msad_4x8 to mqsad_4x8
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/26251>
2024-04-05 11:01:39 +00:00
Rhys Perry
e5976bebed amd: set has_shfr32=true
This appears in some FSR3 shaders and will be used for the MQSAD
optimization.

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/26251>
2024-04-05 11:01:39 +00:00
Rhys Perry
35f9318cee ac/llvm: implement mqsad_4x8 and shfr
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/26251>
2024-04-05 11:01:39 +00:00
Rhys Perry
6b301eae36 aco: implement mqsad_4x8 and shfr
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/26251>
2024-04-05 11:01:39 +00:00
Rhys Perry
08903bbe89 nir: add mqsad_4x8, shfr and nir_opt_mqsad
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/26251>
2024-04-05 11:01:39 +00:00
Georg Lehmann
be93e38152 aco/vn: remove instruction hash templates
This reuses the instruction data size helper used for creating instruction.
It also removes the hashing of the aco::spans used for operands and definitions,
which was redundant with hash finalization.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28527>
2024-04-05 10:23:16 +00:00
Lionel Landwerlin
ea84b36592 anv: fix incorrect blorp dynamic state heap usage
Found with valgrind :

==253563== Invalid free() / delete / delete[] / realloc()
==253563==    at 0x6EEBB88: anv_state_pool_free (anv_allocator.c:962)
==253563==    by 0x6EFB563: anv_device_finish_blorp (anv_blorp.c:143)
==253563==    by 0x6F204F8: anv_DestroyDevice (anv_device.c:4063)
==253563==    by 0x6DE1CD7: loader_layer_destroy_device (loader.c:4387)
==253563==    by 0x6DF1D5E: vkDestroyDevice (trampoline.c:1025)
==253563==    by 0x407C54: vk::refdetails::Deleter<vk::VkDevice_s*>::operator()(vk::VkDevice_s*) const (vkRef.hpp:131)
==253563==    by 0x42C016: vk::refdetails::RefBase<vk::VkDevice_s*>::reset() (vkRef.hpp:303)
==253563==    by 0x40B385: vk::refdetails::RefBase<vk::VkDevice_s*>::~RefBase() (vkRef.hpp:296)
==253563==    by 0x40A95D: vk::refdetails::Unique<vk::VkDevice_s*>::~Unique() (vkRef.hpp:376)
==253563==    by 0x402501: vkt::DefaultDevice::~DefaultDevice() (vktTestCase.cpp:658)
==253563==    by 0x444807: de::DefaultDeleter<vkt::DefaultDevice>::operator()(vkt::DefaultDevice*) const (deDefs.hpp:112)
==253563==    by 0x43922D: de::details::UniqueBase<vkt::DefaultDevice, de::DefaultDeleter<vkt::DefaultDevice> >::reset() (deUniquePtr.hpp:90)
==253563==  Address 0xd3df000 is 0 bytes inside a block of size 272 client-defined
==253563==    at 0x6EEBA0B: anv_state_pool_alloc (anv_allocator.c:940)
==253563==    by 0x6EFA610: anv_state_pool_emit_data (anv_private.h:852)
==253563==    by 0x6EFB206: upload_dynamic_state (anv_blorp.c:106)
==253563==    by 0x6FC8C31: blorp_init_dynamic_states (blorp_genX_exec_brw.h:2211)
==253563==    by 0x6FCD02D: gfx9_blorp_init_dynamic_states (genX_blorp_exec.c:507)
==253563==    by 0x6EFB47E: anv_device_init_blorp (anv_blorp.c:129)
==253563==    by 0x6F1FBBA: anv_CreateDevice (anv_device.c:3908)
==253563==    by 0x840B669: vk_tramp_CreateDevice (vk_dispatch_trampolines.c:78)
==253563==    by 0x6DE663A: terminator_CreateDevice (loader.c:5836)
==253563==    by 0x6DE3E39: loader_create_device_chain (loader.c:4940)
==253563==    by 0x6DE1AC5: loader_layer_create_device (loader.c:4320)
==253563==    by 0x6DF1CBF: vkCreateDevice (trampoline.c:1005)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: fe1baa6481 ("anv: reduce blorp dynamic state emissions")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28578>
2024-04-05 09:50:41 +00:00
Corentin Noël
0624130933 zink: Remove ctx from zink_gfx_program
It is already available in the base structure.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28567>
2024-04-05 08:01:01 +00:00
Corentin Noël
b0d680f54c zink: Removed unused push_valid member
This member is only set but never used.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28567>
2024-04-05 08:01:01 +00:00
Gert Wollny
6a0f3b1aa5 zink: another fence that is better off as a batch state
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28560>
2024-04-05 07:29:04 +00:00
Gert Wollny
d862cb0024 zink: ctx->last_fence really wants to be a batch_state, so accomodate it
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28560>
2024-04-05 07:29:03 +00:00
Jordan Justen
98f3d072b4 intel/dev: Add 0x56be and 0x56bf DG2 PCI IDs
Ref: bspec 44477
Backport-to: 24.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28584>
2024-04-05 06:36:44 +00:00
Lionel Landwerlin
9b0f028c7e anv: update protection fault property
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 794b0496e9 ("anv: enable protected memory")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Tested-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26540>
2024-04-05 09:07:21 +03:00
Lionel Landwerlin
d2e490dc4d anv: disable generated draws in protected command buffers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 794b0496e9 ("anv: enable protected memory")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Tested-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26540>
2024-04-05 09:07:21 +03:00
Lionel Landwerlin
034a1cdb58 anv: disable protected content around surface state copies
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 794b0496e9 ("anv: enable protected memory")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Tested-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26540>
2024-04-05 09:07:21 +03:00
Lionel Landwerlin
27a3771227 anv: pull surface state copies for secondary in one loop
It'll be easier for the next commit.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26540>
2024-04-05 09:07:21 +03:00
Lionel Landwerlin
07bf480856 anv: fix protected memory allocations
Using the wrong flag field...

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 5f2c77a10a ("anv: handle protected memory allocation")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Tested-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26540>
2024-04-05 09:07:21 +03:00
Ian Romanick
0e817ba548 intel/brw/xe2+: Implement Wa 22016140776
HF sources to math instructions cannot be scalar. This is very similar
to an old Gfx6 restriction on POW, so let's fix it in a similar way.

As an extra bit of saftey, lower any occurances that might slip through
in brw_fs_lower_regioning.

The primary change is to prevent copy propagation from violating the
restriction. With that change, nothing should be able to generate these
invalid source strides. The modification to fs_visitor::validate should
detect potential problems sooner rather than later.

Previous attempts to implement this Wa when emitting the math
instruction (in brw_eu_emit.c gfx6_math) didn't work for several
reasons. The lowering happens after the SWSB pass, so the scoreboarding
was incorrect (thanks to Curro for finding that). In addition, the
lowering happens after register allocation, so it's impossible to
allocate a non-scalar register to expand the scalar value.

Fixes 113 tests in the dEQP-VK.spirv_assembly.* group on LNL.

v2: Add changes to brw_fs_lower_regioning. Suggested by Curro.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28480>
2024-04-04 21:04:09 -07:00
Jordan Justen
50c7d25a9e intel/dev/mesa_defs.json: Add LNL WA entries
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28480>
2024-04-04 21:03:51 -07:00
Jesse Natalie
c891a384e7 dzn: Don't copy app indirect args if we don't need to
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383>
2024-04-05 00:25:41 +00:00
Jesse Natalie
db16dcf0f9 dzn: Add a hash table of command signatures with non-default strides
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383>
2024-04-05 00:25:41 +00:00
Jesse Natalie
d7bd87aa27 dzn: Rework indirect drawing keys for shaders and command signatures
When we don't need emulation of first vertex, base instance, draw ID
sysvals, or triangle fans, we can have very simple command signatures
and indirect arg buffer generation shaders. The next step is to handle
the case where everything can be supported straight from the app's
buffer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383>
2024-04-05 00:25:41 +00:00
Jesse Natalie
ccf439629f dzn: Update pipeline cache params to take all options into account
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383>
2024-04-05 00:25:41 +00:00
Jesse Natalie
4de88025cc dzn: Understand whether first-vertex and base-instance are needed for a pipeline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383>
2024-04-05 00:25:41 +00:00
Jesse Natalie
fbd4e5d8aa dzn: Query options21
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383>
2024-04-05 00:25:41 +00:00
Jesse Natalie
ed465bf738 dzn: Delete dzn structs for indirect draw args and use D3D ones
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383>
2024-04-05 00:25:41 +00:00
Jesse Natalie
f6c3d73700 spirv2dxil: Output more specific metadata for whether draw sysvals are needed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383>
2024-04-05 00:25:41 +00:00
Jesse Natalie
30b1a6750c spirv2dxil: Support passing first vertex / base instance to DXIL backend
These values now have 3 modes of operation so switch from a bool to an enum:
1. Zero
2. Native DXIL sysvals
3. "Runtime data" via a constant buffer or root constants

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383>
2024-04-05 00:25:41 +00:00
Jesse Natalie
607720151f microsoft/compiler: Handle base vertex/instance sysvals as DXIL intrinsics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383>
2024-04-05 00:25:41 +00:00
Jesse Natalie
349c4d84c0 ci/windows: Bump Agility SDK to 1.613.2 for ExecuteIndirect validation fix
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28383>
2024-04-05 00:25:41 +00:00
Ian Romanick
0b67d3d909 intel/elk: Delete stray nir_opt_dce
No shader-db changes on any Intel platform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28136>
2024-04-04 23:42:28 +00:00
Ian Romanick
24cdbbdaa2 intel/brw: Delete stray nir_opt_dce
No shader-db or fossil-db changes on any Intel platform.

Fixes: f76f4be301 ("intel/compiler: move gen5 final pass to actually be final pass")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28136>
2024-04-04 23:42:27 +00:00
Ian Romanick
44fb57b827 intel/elk: Don't call nir_opt_remove_phis before nir_convert_from_ssa
shader-db:

All platforms had similar results. (Ivy Bridge shown)
total instructions in shared programs: 15831424 -> 15831637 (<.01%)
instructions in affected programs: 38880 -> 39093 (0.55%)
helped: 0 / HURT: 179

total cycles in shared programs: 432140353 -> 432170199 (<.01%)
cycles in affected programs: 11798080 -> 11827926 (0.25%)
helped: 77 / HURT: 123

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28136>
2024-04-04 23:42:27 +00:00
Ian Romanick
6377e8fd29 intel/brw: Don't call nir_opt_remove_phis before nir_convert_from_ssa
Per discussion in #10727, removing phis breaks LCSSA form which in turn
invalidates divergence analysis.

shader-db:

All Skylake and newer platforms had similar results. (Ice Lake shown)
total instructions in shared programs: 20299612 -> 20299695 (<.01%)
instructions in affected programs: 20829 -> 20912 (0.40%)
helped: 6 / HURT: 13

total cycles in shared programs: 842149085 -> 842148399 (<.01%)
cycles in affected programs: 15146222 -> 15145536 (<.01%)
helped: 40 / HURT: 45

fossil-db:

All Intel platforms had similar results. (Ice Lake shown)
Totals:
Instrs: 165505077 -> 165505603 (+0.00%); split: -0.00%, +0.00%
Cycles: 15144183575 -> 15144235695 (+0.00%); split: -0.00%, +0.00%
Spill count: 45213 -> 45220 (+0.02%)
Fill count: 74166 -> 74184 (+0.02%)

Totals from 94 (0.01% of 656116) affected shaders:
Instrs: 263079 -> 263605 (+0.20%); split: -0.00%, +0.20%
Cycles: 28411487 -> 28463607 (+0.18%); split: -0.18%, +0.37%
Spill count: 3474 -> 3481 (+0.20%)
Fill count: 6713 -> 6731 (+0.27%)

Fixes: 6dbb5f1e07 ("intel/fs: rerun divergence analysis prior to convert_from_ssa")
Closes: #10727
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28136>
2024-04-04 23:42:27 +00:00
Ian Romanick
87101e7d83 intel/compiler: Ensure load_barycentric_at_sample and load_interpolated_input remain together
This previously worked by luck because we were incorrectly calling
nir_opt_remove_phis before calling nir_convert_from_ssa. See also #10727.

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

v2: Handle the load_interpolated_input and load_barycentric_at_sample as
separate passes. Based on discussion with Ken starting at
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28136#note_2330424.

Fixes: 74a40cc4b6 ("intel/fs: move lower of non-uniform at_sample barycentric to NIR")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28136>
2024-04-04 23:42:27 +00:00
Erico Nunes
49217c2547 ci: enable shader-db on lima
Run shader-db on CI with the lima drm_shim as done for other drivers.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24357>
2024-04-04 22:48:10 +00:00
Samuel Pitoiset
69b911bc53 radv: remove radv_private.h
This file was a giant mess and I'm very happy to remove it entirely.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
367cf70a29 radv: move RADV_USE_WSI_PLATFORM define to radv_wsi.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
28eefbadeb radv: move CLOCK_MONOTONIC_RAW define to radv_physical_device.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
e8269c01cb radv: move RADV_API_VERSION to radv_instance.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
e25882352b radv: move RADV_SUPPORT_CALIBRATED_TIMESTAMPS to radv_physical_device.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
cc1526eeac radv: replace radv_is_aligned() by util_is_aligned()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
81e3c46d06 util: add util_is_aligned()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
5cc3258533 radv: replace radv_float_to_{u,s}fixed() by util_{un}signed_fixed()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
6a27c5e9a8 radv: replace align_u32_npot() by ALIGN_NPOT
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:45 +00:00
Samuel Pitoiset
e75fdac533 radv: replace align_{u32,u64}() by align{64}()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:45 +00:00
Samuel Pitoiset
ba153fc06b radv: replace radv_minify() by u_minify()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:45 +00:00
Samuel Pitoiset
799e99fe21 radv: rename remaining phys_dev occurrences to pdev
Missed those.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:45 +00:00
Samuel Pitoiset
b409936e97 radv: add missing endif comment for some headers
For consistency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:45 +00:00
Samuel Pitoiset
0388df3d08 radv: replace RADV_FROM_HANDLE by VK_FROM_HANDLE
It was exactly the same thing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:45 +00:00
Samuel Pitoiset
67ac6e75c6 radv: remove remaining forward declarations and comments in radv_private.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:45 +00:00
Samuel Pitoiset
8ade8f28a8 radv: remove pre-declarations needed for WSI entrypoints
Probably a very old thing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:45 +00:00
Samuel Pitoiset
46515292a3 radv: remove unused radv_printflike()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
2024-04-04 21:57:45 +00:00
Jesse Natalie
05b66efb43 d3d12: Add a debug flag for loading WinPixGpuCapturer.dll
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28476>
2024-04-04 21:37:41 +00:00
Jesse Natalie
116d0bf76b d3d12: Set fractional var masks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
c21355260b microsoft/compiler: Add a fractional var mask for variable sorting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
760effefc6 d3d12: Don't compile useless variants during shader creation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
6928686df9 d3d12: Remove variables instead of adding them for linking
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
dedbd6eea3 d3d12: Gather info less and before the final compilation steps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
c1e7d0598d d3d12: Add primitive ID sysval to input bitmask (for GS in)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
c8d435373e d3d12: Use TES inputs rather than VS outputs for TCS variant key
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
580f801bac d3d12: Capture always_active_io in varying data
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
5d0c77658c d3d12: Forward front-facing for passthrough GS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
d28a552e2a d3d12: Explicitly add tess factor vars to tess signatures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
5c3e96f257 d3d12: Fix var splitting pass writemasks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
4a01ac1aa7 d3d12: Minor logging improvements
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
33735585a9 d3d12: Lower uniforms to UBO by nir options
Ubo0 is tricky. It exists if there were any uniforms when
lower_uniforms_to_ubo was run. If we try to run that ourselves,
it might be too late and DCE/remove_dead_variables might've been run,
which removed the uniforms and their accesses, without decrementing
num_uniforms. So we have no good way of knowing whether to declare
ubos from [0, N] or [1, N]. In practice this probably doesn't make
much of a difference but the logic is there so ¯\_(ツ)_/¯

If we use the nir option, then dead code isn't run, and num_uniforms
is a true indicator of whether ubo0 exists or not.

Note that this means we are no longer running this pass for internal
shaders that don't come from the GLSL compiler, so various places are
updated to query the nir info bit that's set by running this pass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
e80cda0512 d3d12: Move some lowering passes to pre-variant
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:11 +00:00
Jesse Natalie
9702ddccc2 microsoft/compiler: Don't duplicate work from gather_info in var sorting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:10 +00:00
Jesse Natalie
ed757b010a microsoft/compiler: Improve linking helpers
* Take masks instead of shaders
* Be more aggressive at removing sysvals
* Handle loading from outputs

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:10 +00:00
Jesse Natalie
d4a15a048b microsoft/compiler: Expect front-facing var as an input
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:10 +00:00
Jesse Natalie
4180cf39f0 microsoft/compiler: Simplify I/O component type enum handling
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:10 +00:00
Jesse Natalie
230bed221e microsoft/compiler: Move kill-unused/undefined varying pass from spirv to common
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:10 +00:00
Jesse Natalie
b6b5514a5b microsoft/compiler: When sorting variables, put unused variables last
These variables will only be used for xfb

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
2024-04-04 20:29:10 +00:00
Job Noorman
c37e9c1e29 ir3-disasm: add option to disassemble hex number
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28457>
2024-04-04 19:37:25 +00:00
Job Noorman
7eeb781c8b ir3-disasm: add options to specify GPU by chip ID or name
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28457>
2024-04-04 19:37:25 +00:00
Job Noorman
86468ab8af ir3-disasm: remove unused #includes
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28457>
2024-04-04 19:37:25 +00:00
Job Noorman
b9d2dd0788 ir3-disasm: run clang-format
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28457>
2024-04-04 19:37:25 +00:00
Mike Blumenkrantz
56cda23459 nir/dominance: fix comment
this function doesn't exist

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:43 +00:00
Mike Blumenkrantz
0851c30d16 nir/texcoord_replace: fix scalarized io handling
if a texcoord load only loads some components, only those components
should be replaced

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:43 +00:00
Mike Blumenkrantz
f3d9a2e607 nir/lower_point_size_mov: fix for lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
0faeeb6347 nir/lower_point_size_mov: rework.
this was weirdly complex

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
30415fe835 nir/lower_clip_disable: fix for lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
eb190a4e8b nir/lower_drawpixels: fix for lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
c48f580a49 nir/lower_two_sided_color: rework for lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
9af9446127 nir/lower_alpha_test: fix use with lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
842ac5059a nir/lower_flatshade: fix with lowered io
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
712bf98dd8 nir/lower_flatshade: break out location checking
no functional changes

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
56d7dad19c nir/lower_clamp_color_outputs: fix use with lowered io
if io is lowered, variables cannot be used

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Mike Blumenkrantz
056fe1dc6a glsl: set PSIZ bit in outputs_written when injecting a 1.0 psiz write
gather_info may not be called before something checks this value

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28463>
2024-04-04 18:58:42 +00:00
Samuel Pitoiset
f090f7186b radv: rename si_cmd_buffer.c to radv_cs.c
This file now mostly contain CS related functions. Also move prototypes
while we are at it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:16 +00:00
Samuel Pitoiset
e133fb7c3b radv: move code related to sample positions to radv_device.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:16 +00:00
Samuel Pitoiset
7ea12d6ace radv: move radv_emit_{compute,graphics}() to radv_queue.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:16 +00:00
Samuel Pitoiset
5baa1c4c1c radv: move radv_create_gfx_config() to radv_device.c
Also rename to radv_create_gfx_preamble().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:16 +00:00
Samuel Pitoiset
d844d73fb4 radv: move radv_get_viewport_xform() to radv_pipeline_graphics.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:16 +00:00
Samuel Pitoiset
fa0ec3af88 radv: merge radv_write_scissors() with radv_emit_scissor()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
16b6b17889 radv: merge radv_write_guardband() with radv_emit_guardband_state()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
eb1f9da0a0 radv: move more cmd buffer related code to radv_cmd_buffer.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
1d5f434108 radv: move CP DMA related code to radv_cp_dma.c/h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
b171bc2809 radv: add radv_shader_info.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
fb73ccea56 radv: add radv_android.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
d1d04cfeaa radv: add radv_nir_to_llvm.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
58cd24a636 radv: move radv_queue_ring() to radv_queue.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
f606efe62d radv: move radv_get_tdr_timeout_for_ip() to radv_query.h
Missed that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
9a7afbfa13 radv: add radv_printf.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
d1adbf0e53 radv: add radv_cp_reg_shadowing.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
195383a5ec radv: add radv_rmv.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
e677b642bc radv: add radv_cmd_buffer.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
7196b9cc0b radv: add radv_spm.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
2061168461 radv: add radv_shader_object.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Samuel Pitoiset
c1414a9799 radv: add radv_sqtt.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
2024-04-04 16:35:15 +00:00
Timur Kristóf
a313d5f82a radv: Remove unused gfx_level from gfx10_emit_ge_pc_alloc.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27751>
2024-04-04 16:09:18 +00:00
Timur Kristóf
8d97c3bd06 radv: Increase maximum allowed PS params for enabling NGG culling.
The original limits were chosen very conservatively because at
that time we didn't have a good understanding on the perf impact
of shader culling.

Since then, we've seen some use cases that have a higher amount
of PS params but still benefit from shader culling.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27751>
2024-04-04 16:09:18 +00:00
Timur Kristóf
4464e6baff radv: Slightly refactor the determination of max_ps_params.
It now uses has_dedicated_vram and gfx_level to detect GFX10.3+
discrete GPUs, which should also include GFX11 now.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27751>
2024-04-04 16:09:18 +00:00
Timur Kristóf
dbfb96f08f radv: Remove I/O variables after nir_lower_io.
They are not needed anymore.

Both NIR and RADV shader info can be fully deduced from I/O
intrinsics, so there is no need to keep the variables.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28506>
2024-04-04 15:43:56 +00:00
Timur Kristóf
b188561df5 radv: Use NIR IO semantics to determine FS input info.
This commit does two things at once, which cannot be split
into two commits because otherwise the driver would regress
in-between the two.

Change radv_nir_shader_info_pass so that it uses I/O intrinsics
instead of I/O variables for determining FS information.

Also eliminate gaps between input slots caused by unused input
variables. To this end, we use nir_recompute_io_bases after
nir_lower_io instead of assigning driver locations before it.
As part of this, we can now omit a clip/cull input when only
the second one is used.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28506>
2024-04-04 15:43:56 +00:00
Nanley Chery
c6686fda28 intel/isl: Use Tile64 to align images for CCS WA
See HSD 22015614752. We have issues when multiple engines access the
same CCS cacheline in parallel. This can happen in a Vulkan application
that uses different queues to operate on different subresources.

To resolve this, this patch prefers Tile64 when an image has multiple
subresources and disallows CCS if such an image lacks that tiling.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8614
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28284>
2024-04-04 15:17:50 +00:00
Nanley Chery
b092124186 intel/isl: Enable a 64KB alignment WA for flat-CCS
WA 22015614752 applies to gfx125 platforms, but the alignment
requirement was only enabled for the subset that has an aux-map. Adjust
the condition to apply it where appropriate.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28284>
2024-04-04 15:17:50 +00:00
Nanley Chery
d7bfa8051e intel/isl: Remove a CCS_D check from gfx12+ code
This aux usage isn't used on gfx12+.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28284>
2024-04-04 15:17:50 +00:00
Nanley Chery
8845f1e439 intel/isl: Remove inconsistency when encoding Tile64
We guard surface state encoding of tilings by macros when the encoded
value is not present on certain platforms. For gfx20 however, we added
these macros even when the existing ones for gfx125 were sufficient.
Remove the extra macros.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28284>
2024-04-04 15:17:50 +00:00
Nanley Chery
81d8c071ac intel/isl: Remove inconsistency when choosing Tile64
We don't check the gfx version when choosing the tiling except when
choosing Tile64. Drop the version check for consistency and to remove
doubts about the order of operations occuring as expected within the
CHOOSE macro.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28284>
2024-04-04 15:17:50 +00:00
Dave Airlie
f8e48b561e mesa: reorder st context teardown
some gnome tests are seeing this:

==4579== Invalid read of size 4
==4579==    at 0x161B28FB: UnknownInlinedFun (simple_mtx.h:106)
==4579==    by 0x161B28FB: st_save_zombie_sampler_view (st_context.c:213)
==4579==    by 0x161D762A: st_texture_release_all_sampler_views.part.0 (st_sampler_view.c:272)
==4579==    by 0x161D7CB6: st_texture_release_all_sampler_views (st_sampler_view.c:258)
==4579==    by 0x161D7CB6: st_delete_texture_sampler_views (st_sampler_view.c:292)
==4579==    by 0x16191B9E: _mesa_delete_texture_object (texobj.c:523)
==4579==    by 0x16191CDC: _mesa_reference_texobj_ (texobj.c:637)
==4579==    by 0x1619632F: _mesa_reference_texobj (texobj.h:92)
==4579==    by 0x1619632F: _mesa_free_texture_data (texstate.c:1114)
==4579==    by 0x162EEE1D: _mesa_free_context_data (context.c:1155)
==4579==    by 0x161B3C0F: st_destroy_context (st_context.c:999)
==4579==    by 0x160F155A: dri_destroy_context (dri_context.c:277)
==4579==    by 0x1603C371: dri2_destroy_context (egl_dri2.c:1592)
==4579==    by 0x1602EBF5: eglDestroyContext (eglapi.c:918)
==4579==    by 0x502DF3C: gdk_gl_context_dispose (gdkglcontext.c:211)
==4579==  Address 0x34dc9b08 is 7,016 bytes inside an unallocated block of size 10,336 in arena "client"
==4579==

It appears we destroy the mutex and zombie objects, but freeing
context data seems to add them back.

This might not be the complete answer.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28565>
2024-04-04 14:40:57 +00:00
Faith Ekstrand
067bbf9301 nvk: Delete dead descriptor code
We never use nir_address_format_64bit so this is all dead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28564>
2024-04-04 14:11:46 +00:00
Faith Ekstrand
f30ce26569 nvk: Add a _pad field to nvk_cbuf
We use nvk_cbuf as a key in a hash table in nvk_nir_lower_descriptors()
so we want to make sure it always gets fully initialized.

Fixes: f1c909edd5 ("nvk/nir: Add cbuf analysis to nvi_nir_lower_descriptors()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10956
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28564>
2024-04-04 14:11:46 +00:00
Mike Blumenkrantz
cfa955ed78 glx/egl: fix LIBGL_KOPPER_DISABLE
when set, this disables the use of vk swapchains and lets the dri frontend
manage buffers like any other driver

also document some kopper env vars

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28137>
2024-04-04 13:18:00 +00:00
Mike Blumenkrantz
d3730fcd2d egl/x11: disable swapbufferswithdamage for zink without kopper
this is broken

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28215>
2024-04-04 12:48:49 +00:00
Mike Blumenkrantz
9fe9681db1 zink: assert that ntv interp handling isn't doing implicit component expansion
the number of components that ntv loads should always be the number of components
that the nir shader thinks it's loading

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28530>
2024-04-04 12:13:44 +00:00
Mike Blumenkrantz
a7509a09ec zink: fix add_derefs for partial interp loads of derefs
this needs to load the full deref and then swizzle, not interp a partial
deref

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28530>
2024-04-04 12:13:44 +00:00
Mike Blumenkrantz
7deef8d7d2 zink: delete some maintenance5 psiz pruning
now that gallium is no longer adding these all over, they don't need
to be deleted

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28162>
2024-04-04 11:26:17 +00:00
Mike Blumenkrantz
24453579ad gallium: rework PIPE_CAP_POINT_SIZE_FIXED
this adds modes to the cap which allow drivers to opt out of the
frontend injecting gl_PointSize=1.0 into shaders while still getting
the uniform value uploaded

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28162>
2024-04-04 11:26:17 +00:00
Jesse Natalie
201053bac1 d3d12: Fix d3d12_lower_triangle_strip if multiple vars are in a single location
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28562>
2024-04-04 10:37:30 +00:00
Rob Clark
c17ef8c196 freedreno+virgl: Add missing driconf
Probably a sign that we need a better long term approach for dealing
with vdrm native context drivers driconf.

Fixes: 850267ef99 ("freedreno/a6xx: Add dual_color_blend_by_location")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28531>
2024-04-04 09:38:57 +00:00
Rob Clark
6d17577b64 freedreno/drm/virtio: Fix deadlock on exit
We don't want the retire work to be the one to drop the last reference
to the pipe, as that would result in trying to free the retire_queue
from the retire_queue thread.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28531>
2024-04-04 09:38:57 +00:00
Eric Engestrom
145a5cd414 ci: fix nightly build (v2)
Scheduled pipelines don't have `changes`, so the rule I added in
fa4dd110986083105604 won't match; re-do that but as its own rule,
without the additional `changes` condition.

Fixes: 7c0b19a607 ("ci: run python-test automatically only in merge pipelines")
Fixes: fa4dd110986083105604 ("ci: fix nightly build")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28561>
2024-04-04 08:48:54 +00:00
Mike Blumenkrantz
37be4bf1b7 mesa: clamp binary pointer in ShaderBinary if length==0
this pointer is only valid if length is valid

fixes dEQP-GL45-ES3.functional.negative_api.shader.shader_binary with
glthread enabled

fixes #10915

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28501>
2024-04-04 07:01:21 +00:00
Yiwei Zhang
6e91c88036 venus: use STACK_ARRAY to simplify sync wait
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28532>
2024-04-04 06:35:54 +00:00
Yiwei Zhang
30824a1183 venus: use STACK_ARRAY to simplify set layout creation
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28532>
2024-04-04 06:35:54 +00:00
Yiwei Zhang
bece318296 venus: use STACK_ARRAY to simplify physical device enumeration
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28532>
2024-04-04 06:35:54 +00:00
Yiwei Zhang
630f4a5b92 venus: use STACK_ARRAY to simplify render pass creation
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28532>
2024-04-04 06:35:54 +00:00
Yiwei Zhang
36f639375b venus: use STACK_ARRAY to simplify BindImageMemory2
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28532>
2024-04-04 06:35:54 +00:00
Yiwei Zhang
7f75ebfda7 venus: use STACK_ARRAY to simplify BindBufferMemory2
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28532>
2024-04-04 06:35:54 +00:00
Yiwei Zhang
02985e37ed venus: use STACK_ARRAY to simplify modifier query
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28532>
2024-04-04 06:35:54 +00:00
Yiwei Zhang
c3edd6b555 venus: remove obsolete TODOs
The ring cs shmem cache is already there. The external fence/sempahore
support will be eventually via adopting mesa common drm syncobj support.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28532>
2024-04-04 06:35:54 +00:00
Yiwei Zhang
93421ef3d3 venus: cleanup 2 TODOs from 1.3 support
The two extensions are implemented natively but allow to leak structs to
renderer side to avoid deep copying huge driver side pNext chain. It
doesn't make things more robust if we hide the two behind core 1.3 and
drop the two from the protocol so that venus-protocol filters out the
leaked structs. e.g. we'd still have to flip some bits in the core
feature structs.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28532>
2024-04-04 06:35:53 +00:00
Job Noorman
1e983c4360 ir3: fix finding uses of reloaded defs in predicates RA
While looking for the first use of a def for spilling, we used to
iterate all sources of a use to determine which one refers to the def.
However, when the def was reloaded before, we would fail to find it
since the source was updated to refer to the reloaded def while we
searched the uses of the original def.

This patch fixes this by simply not iterating the sources of a use
anymore. We don't need to know which source exactly uses the def, the
instruction is enough.

Fixes: 21cd9b9557 ("ir3: implement RA for predicate registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28148>
2024-04-04 05:39:45 +00:00
Job Noorman
dbcbf61726 ir3: calculate SSA uses at the start of predicates RA
When calculating SSA uses after reloading a def for the first time, the
uses of the original def would not be complete anymore (since some of
its uses may be replaced by a reloaded def). This causes problems when
calculating the furthest first use to determine a value to be spilled.

For example, something like:

ssaX = foo # No free regs so this one is ignored
...
bar ssaX, ssaY So

Let's say we arrive at bar and neither ssaX nor ssaY are live and we
have one free register. First, ssaX will get reloaded. Then, since there
are no free registers left, we need to spill one. If we calculate SSA
uses now, the ones for ssaX will not include bar which might cause us to
select ssaX for spilling which shouldn't happen because it's used by the
current instruction.

This patch fixes this by calculating SSA uses at the start of RA. I
haven't been able to measure a significant performance improvement when
trying to postpone calculating the SSA uses.

Fixes: 21cd9b9557 ("ir3: implement RA for predicate registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28148>
2024-04-04 05:39:45 +00:00
Job Noorman
22f64a1fe3 zink: print shaderdb info via debug message callback
shaderdb expects to receive shader info via a glDebugMessageCallback
callback. This patch updates print_pipeline_stats to use the
zink_context::dbg callback.

The format of the shader info is also updated to match what the shaderdb
report.py script expects. In particular, we use what report.py calls
"nv_format" since that is the closest to the current format.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28542>
2024-04-04 02:59:10 +00:00
Rohan Garg
57209a0c7a isl: allow CCS on single sampled TILE64 surfaces
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23030>
2024-04-04 02:17:34 +00:00
Rohan Garg
afb63443a0 intel/blorp: add fast clear rectangle dimensions for single sampled TILE64 CCS surfaces
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23030>
2024-04-04 02:17:34 +00:00
Rohan Garg
8670fd6ac4 iris: slow clear higher miplevels on single sampled 8bpp resources that have TILE64
This helps fix a number of piglit tests that exercise this
functionality, such as:
  - piglit.spec.arb_texture_rg.fbo-clear-formats
  - piglit.spec.ext_framebuffer_object.fbo-clear-formats
  - piglit.spec.ext_texture_snorm.fbo-clear-formats

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23030>
2024-04-04 02:17:34 +00:00
Marek Olšák
772149b15a nir/opt_varyings: handle load_input_vertex
Explicit interpolation just loads raw vertex data as-is and lets the FS do
the interpolation manually.

This adds handling of nir_intrinsic_load_input_vertex, which has 2 different
behaviors: undefined vertex ordering and strict vertex ordering.

- dead IO removed correctly
- constants and uniform expressions are propagated normally
- outputs are deduplicated within their own category (strict and non-strict)
- outputs used by explicit interpolation are never treated as "convergent"
- backward inter-shader code motion is skipped
- compaction has 2 new types of vec4 slots:
    - mixed 32-bit and 16-bit explicit strict (sharing the same vec4)
    - mixed 32-bit and 16-bit explicit non-strict (sharing the same vec4)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28247>
2024-04-04 01:25:06 +00:00
Timur Kristóf
b9b557f2e7 aco/optimizer_postRA: Remove a check from SCC no-compare optimization.
Not all code paths of this optimization depend on there being only
one user of the first operand; and those code paths already have
their own check for this.

Fossil DB stats on Navi 21:

Totals from 477 (0.60% of 79395) affected shaders:
Instrs: 995901 -> 995341 (-0.06%); split: -0.06%, +0.00%
CodeSize: 5218856 -> 5216816 (-0.04%); split: -0.04%, +0.00%
Latency: 16340256 -> 16338799 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 3044975 -> 3044871 (-0.00%); split: -0.00%, +0.00%
Copies: 95047 -> 95071 (+0.03%)
SALU: 150345 -> 149785 (-0.37%); split: -0.38%, +0.01%

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28545>
2024-04-04 00:50:11 +00:00
Ganesh Belgur Ramachandra
5b301e74ed compiler,glsl: fix warning when -finstrument-functions is used
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28411>
2024-04-04 00:03:53 +00:00
Timur Kristóf
5fa70730da radv: Use IO semantic location for shader output info.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28172>
2024-04-03 23:40:33 +00:00
Timur Kristóf
f23795e78c radv: Use NIR IO semantics to determine VS input info.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28172>
2024-04-03 23:40:33 +00:00
Timur Kristóf
9fd67c84da radv: Remove unused VS input usage mask.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28172>
2024-04-03 23:40:33 +00:00
Timur Kristóf
0ddecb3f0e radv: Add helper to determine usage of VS prologs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28172>
2024-04-03 23:40:33 +00:00
Timur Kristóf
5156d3097b radv: Add helper for determining per-attribute vertex buffer descriptors.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28172>
2024-04-03 23:40:33 +00:00
Timur Kristóf
e04f66ae33 radv: Use NIR IO semantics to determine GS output info.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28172>
2024-04-03 23:40:33 +00:00
Timur Kristóf
7276bea52d radv: Record PS input clip/cull mask instead of number.
Keeping the mask instead of the actual number will make it easier
later to transition to basing the information on I/O intrinsics
instead of I/O variables.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28172>
2024-04-03 23:40:33 +00:00
Timur Kristóf
cbc8f5216a radv: Slightly refactor gather_intrinsic_store_output_info.
No functional changes.
Use const more, and rename some variables to make them clearer.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28172>
2024-04-03 23:40:33 +00:00
Timur Kristóf
d10e458df0 radv: Extract gather_load_vs_input_info function.
No functional changes.
Make the code look cleaner by handling the various stages
by different functions.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28172>
2024-04-03 23:40:33 +00:00
Timur Kristóf
4e2eeab90d radv: Pass key structures to gather intrinsic info.
No functional changes.
The information in these structures will be needed
in a later commit. Done separately to help keep that
other commit cleaner.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28172>
2024-04-03 23:40:33 +00:00
Timur Kristóf
c27877cff9 radv: Only add extra dword to LS-HS stride when there are LS outputs.
Fixes: d116272689
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28544>
2024-04-03 23:15:01 +00:00
Eric R. Smith
ad7457fe20 panfrost: mark indirect compute buffer as read
When we dispatch an indirect compute job, the buffer containing
the indirect parameters should be marked as read (since the GPU
will read the parameters from there). Without this there's a
race condition if the CPU later updates the buffer.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28512>
2024-04-03 22:54:28 +00:00
Connor Abbott
fb1c3f7f5d tu: Implement CCHE invalidation
We need invalidate CCHE when we optimize out an invalidation of UCHE,
for example a storage image write to texture read. We missed this
earlier because of the blob's tendency to always over-flush, but the
blob does use this when building acceleration structures.

Fixes: 95104707f1 ("tu: Basic a7xx support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28445>
2024-04-03 21:10:25 +00:00
Connor Abbott
abe9bd38ff freedreno/a7xx: Add CP_CCHE_INVALIDATE
Fixes: 95104707f1 ("tu: Basic a7xx support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28445>
2024-04-03 21:10:25 +00:00
José Roberto de Souza
a47a65c1c2 intel/genxml/xe2: Update definition of INTERFACE_DESCRIPTOR_DATA
This maches specification and better matches the gfx 125 definition.

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/28505>
2024-04-03 20:21:04 +00:00
José Roberto de Souza
0f29b780e1 intel/genxml/gfx125: Fix definition of INTERFACE_DESCRIPTOR_DATA::Thread group dispatch size
It was using the wrong platform definition that only had 1 bit,
filtering by DG2/ACM it shows the correct definition.

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/28505>
2024-04-03 20:21:04 +00:00
José Roberto de Souza
c00c685f84 intel/genxml: Add more instdone registers
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/28505>
2024-04-03 20:21:04 +00:00
José Roberto de Souza
2f3dc31876 anv: Set STATE_COMPUTE_MODE mask bit when zeroing compute mode
Justing setting all zeroes to STATE_COMPUTE_MODE will do nothing,
the mask of each register must be set for it to change.

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/28505>
2024-04-03 20:21:04 +00:00
Mike Blumenkrantz
ba52fb0eca glsl: handle xfb resources for spirv before running varying opts
this otherwise breaks lowered io

cc: mesa-stable

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28529>
2024-04-03 19:28:18 +00:00
daoxiang.gong
6cadf5cc2d zink - Fix for minLod and maxLod when mipmap filter is disabled
According to spec 4.6 section 8.14 (TEXTURE MINIFICATION),  λ(x, y) is clamped to minLod and maxLod first and then used to choose minification or magnification: “If λ(x, y) is less than or equal to zero the texture is said to be magnified; if it is greater, the texture is minified. “

Prior to this change, Zink hard-coded minLod and maxLod to be [0.0, 0.25]. Some problems can be seen here:

If lambda originally is 0.3, and app sets minLod = 0.0f, maxLod = 0.0f, and minFilter = Linear, magFilter = Nearest:
According to the spec, lambda is clamped to 0.0 first, so magnification should be chosen, but on Zink lambda was clamped to 0.25, minification was chosen incorrectly.

Similarly if app sets minLod = 3.0f and maxLod = 3.0f
 According to the spec, minification should be used regardless of lambda, but Zink would allow magnification if lambda was less than or equal to zero.

This is fixed by individually clamping minLod and maxLod to [0, 0.25].

Signed-off-by: daoxiang.gong <daoxiang.gong@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26933>
2024-04-03 18:53:58 +00:00
Corentin Noël
ebfd3f2a78 zink: Removed unused num_texel_buffers member
This member is only set but never used.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28540>
2024-04-03 18:27:26 +00:00
Timur Kristóf
cff24443fd ac/nir/tess: Clarify when VS-TCS I/O can use registers.
And cleanup some old ugly code.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28487>
2024-04-03 17:37:40 +00:00
Timur Kristóf
9faabdd5dd ac/nir/tess: Remove superfluous args for reserved TCS outputs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28487>
2024-04-03 17:37:40 +00:00
Timur Kristóf
ae8a954048 ac/nir/tess: Calculate reserved LDS outputs based on IO info.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28487>
2024-04-03 17:37:40 +00:00
Timur Kristóf
c61eb54806 ac/nir/tess: Map TCS LDS IO locations without gaps.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28487>
2024-04-03 17:37:40 +00:00
Timur Kristóf
a167cb9ba3 ac/nir/tess: Return undef when loading an unwritten TCS output.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28487>
2024-04-03 17:37:40 +00:00
Timur Kristóf
a1c821e911 ac/nir/tess: Clarify when a TCS output is stored in LDS or VRAM.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28487>
2024-04-03 17:37:40 +00:00
Timur Kristóf
08baefe18c ac/nir/tess: Load tess factors from variable when they are passed in registers.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28487>
2024-04-03 17:37:40 +00:00
Timur Kristóf
10acebf88f ac/nir: Introduce ac_nir_calc_io_offset_mapped.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28487>
2024-04-03 17:37:40 +00:00
Mike Blumenkrantz
3d43f8c1a1 nir/lower_wpos_ytransform: fix for lowered io
this should now handle scalarized+lowered io correctly

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28462>
2024-04-03 16:42:46 +00:00
Mike Blumenkrantz
1c527dab96 nir/lower_wpos_ytransform: scalarize emit_wpos_adjustment
should be no functional changes

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28462>
2024-04-03 16:42:46 +00:00
Mike Blumenkrantz
a9e023ed94 nir/lower_wpos_ytransform: update comment to reflect variable usage
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28462>
2024-04-03 16:42:46 +00:00
Mike Blumenkrantz
e871424b5e nir/lower_wpos_ytransform: reuse input zw components for fragcoord rewrite
no functional changes, these are just unchanged

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28462>
2024-04-03 16:42:46 +00:00
Mike Blumenkrantz
e848d9b9cc nir/lower_wpos_ytransform: move new value load to start of function, reuse
should be no functional changes

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28462>
2024-04-03 16:42:46 +00:00
Mike Blumenkrantz
356d88d1e8 llvmpipe: fix DRAW_USE_LLVM=0
this only supports 16 UBOs

fixes #9346

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28335>
2024-04-03 16:08:12 +00:00
Sil Vilerino
5bb72e05d1 vl_win32_screen_create: Take ownership of winsys injected to created d3d12_screen
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28546>
2024-04-03 14:50:28 +00:00
Sil Vilerino
37cafd53ef d3d12: Fix util_blitter_destroy destruction ordering
Fixes: 55e377e965 ("d3d12: Add partial media, compute, graphics support with CORE and GENERIC feature levels")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28546>
2024-04-03 14:50:28 +00:00
Sil Vilerino
0dd871442b d3d12: Fix leak dxil_module::serialized_dependency_table
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28546>
2024-04-03 14:50:28 +00:00
Mike Blumenkrantz
24197aeb2b zink: only use location_frac for deref array indexing for compact variables
not sure why I did this or how it ever worked?

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
2185da6c89 zink: fix add_derefs case for compact arrays
only compact arrays use the aoa size as the vector length

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
baf96518fa zink: fix io slot calculation for vertex inputs in add_derefs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
460cd99ea5 zink: don't clobber indirect array reads with missing components
this breaks interfaces where the consumer reads its input indirectly
and only some of the components are written by clobbering all
the components, even if the unwritten components are never accessed

Fixes: 459b49a174 ("zink: add a new linker pass to handle mismatched i/o components")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
a64f5ae9d7 zink: always check patch io during rework_io_vars
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
11e988fa80 zink: call gather_info during shader creation
this is totally out of sync at this point

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
562cb8381e zink: track a mask of arrayed io locations on shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
364a6ac1a3 zink: check for arrayness rather than tess io vars for indirect array vars
this is a bit more accurate since it includes clip/cull dist

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
720a43858d zink: fix generated variable expansion
this fixes a case where the found variable might be an array of a
smaller vector

not currently possible to reach

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
404e9f1134 zink: always use shader sizes for clip/cull dist variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
316470920a zink: add a helper to detect clip/cull dist locations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
665755720a zink: manually calc clip/cull distance sizes
the current frontend handling for this is too unreliable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
cf4953d184 zink: apply component offset for CLIP/CULL DIST1 location derefs
cannot currently be reached

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
332c24774c zink: run scan_nir before variable rework
this will enable using its heuristics when generating variables

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:47 +00:00
Mike Blumenkrantz
88792b9ea3 zink: update xfb info after lower_to_scalar
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:46 +00:00
Mike Blumenkrantz
23ce5696d6 zink: use outputs_written mask to detect edge flag usage
fixes lowered io

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:46 +00:00
Mike Blumenkrantz
b8bf82133a zink: always sort io variables by location after re-creating them
this otherwise breaks linking

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:46 +00:00
Mike Blumenkrantz
5fd03efda0 zink: delete some ntv dead code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
2024-04-03 14:21:46 +00:00
Samuel Pitoiset
cefbfe6597 radv: add radv_wsi.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:54 +00:00
Samuel Pitoiset
bfaa674583 radv: add radv_pipeline_graphics.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:54 +00:00
Samuel Pitoiset
987f3351b3 radv: add radv_pipeline_rt.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:54 +00:00
Samuel Pitoiset
7807d49f82 radv: add radv_pipeline_compute.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:54 +00:00
Samuel Pitoiset
f07a639801 radv: add radv_pipeline.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:54 +00:00
Samuel Pitoiset
8e9b41641a radv: add radv_pipeline_cache.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:54 +00:00
Samuel Pitoiset
150ce13273 radv: add radv_device.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:54 +00:00
Samuel Pitoiset
1c590cbd28 radv: add radv_rra.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:54 +00:00
Samuel Pitoiset
6849305a86 radv: add radv_physical_device.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:54 +00:00
Samuel Pitoiset
0fb19b8331 radv: add radv_queue.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:54 +00:00
Samuel Pitoiset
30eb0ef45a radv: add radv_instance.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:54 +00:00
Samuel Pitoiset
83841b0b78 radv: add radv_device_memory.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:53 +00:00
Samuel Pitoiset
bcfac61468 radv: move radv_shader_{layout,stage} to radv_shader.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:53 +00:00
Samuel Pitoiset
0df9270997 radv: move radv_userdata_locations to radv_shader_args.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:53 +00:00
Samuel Pitoiset
d058264f55 radv: move radv_prim_vertex_count to si_cmd_buffer.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28526>
2024-04-03 13:32:53 +00:00
Sil Vilerino
74ac72ceb2 d3d12: Fix leak of batch->bos on video-only builds
Fixes: 55e377e965 ("d3d12: Add partial media, compute, graphics support with CORE and GENERIC feature levels")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28543>
2024-04-03 12:51:16 +00:00
Iago Toral Quiroga
bdf2a470d3 v3dv: fix job suspend with command buffer simultaneous use flag
With the simultaneous use flag we can reuse the same command
buffer multiple times. That means, for example, that we can
have an instance of a job running in the GPU while we are
submitting another one for execution to a queue.

This scenario is problematic with dynamic rendering and job
suspension because suspended jobs need to be patched with the
resume address at queue submit time, and thus, if we have another
instance of the same job currently executing in the GPU we could
stomp its resume address, which could be different.

To fix this, at queue submission time, when we detect a suspending
job in a command buffer with the simultaneous use flag, we clone the
job and create its own copy of the BCL so we can patch the resume
address into it safely without conflicting with any other instance
of the job that may be running.

We need to flag these clones  as having their own BCL since
we would have to free it when the job is destroyed, unlike other
clones that don't own any resources of their own. Also, because
this job is created at queue submit time, it won't be in the
execution list of the command buffer, so it won't be automatically
destroyed with it, so we need to add it to the command buffer
as a private object.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28521>
2024-04-03 13:35:54 +02:00
Iago Toral Quiroga
ff8d72ba22 v3dv: store the offset of the BRANCH instruction in a CL
This will be useful to know which is the actual executable
size of a BO in a CL that branches into a another BO. We
will need this soon to implement deep clones of the BCL
for suspending jobs with the command buffer simultaneous
use flag.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28521>
2024-04-03 12:57:56 +02:00
Iago Toral Quiroga
c874caf33d v3dv: fix job pointers from cloned CLs
We had these pointing to the original job instead of pointing
to the cloned job. This can be confusing, particularly, if we
then emit commands that include references to new BOs into the
cloned jobs, since we would then try to insert these BOs in the
original jobs instead of the clones, which was the situation
we had when we implemented resume address patching with dynamic
rendering.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28521>
2024-04-03 12:57:56 +02:00
Iago Toral Quiroga
e6efee3b40 v3dv: add a v3dv_job_clone helper
This will clone the job but it won't automatically put it in the
job list of a command buffer. This will come in handy to handle
the required job cloning for suspending jobs with the command buffer
reuse flag in a follow-up patch.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28521>
2024-04-03 12:57:56 +02:00
Iago Toral Quiroga
16c96b0e93 v3dv: drop single sync kernel interface
Since we are now requiring a multisync kernel interface there is
no reason to continue supporting the legacy interface.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28541>
2024-04-03 10:34:17 +00:00
Iago Toral Quiroga
25e45b85c2 v3dv: require multisync kernel
Multisync has been available in kernel releases for a long time
now and Raspberry Pi OS kernels have been supporting it for a
while too.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28541>
2024-04-03 10:34:17 +00:00
Mary Strodl
7a8771f7b5 NirShader: don't fail on null constant_buffer
On iris (and probably other platforms too), an empty buffer could be a
null pointer. This is problematic, because even empty slices can't have
a null pointer. When we encounter an empty buffer, send an empty
static slice instead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28309>
2024-04-03 09:26:38 +00:00
Samuel Pitoiset
f9b3e32440 radv: advertise VK_EXT_device_address_binding_report
This extension can be very useful for debugging VM faults with AMDGPU
because it's possible to associate VA ranges with Vulkan objects. Also
useful for detecting use-after-free.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28373>
2024-04-03 08:48:36 +00:00
Samuel Pitoiset
db736ebf53 radv: implement VK_EXT_device_address_binding_report
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28373>
2024-04-03 08:48:36 +00:00
Samuel Pitoiset
34e8e5d76f vulkan/debug_utils: add a helper for reporting address binding
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28373>
2024-04-03 08:48:36 +00:00
Patrick Lerda
24a5165cdf r300: fix constants_remap_table memory leak related to the dummy shader path
A last memory leak related to constants_remap_table is happening.
This memory leak is triggered by two deqp-gles2 tests.

For instance, this issue is triggered with
"deqp-gles2 --deqp-case=dEQP-GLES2.functional.uniform_api.random.13":
Direct leak of 336 byte(s) in 1 object(s) allocated from:
    #0 0x7f1b4a5de7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7f1b401a2cdf in rc_remove_unused_constants ../src/gallium/drivers/r300/compiler/radeon_remove_constants.c:101
    #2 0x7f1b40185386 in rc_run_compiler_passes ../src/gallium/drivers/r300/compiler/radeon_compiler.c:476
    #3 0x7f1b40185625 in rc_run_compiler ../src/gallium/drivers/r300/compiler/radeon_compiler.c:498
    #4 0x7f1b401c14d2 in r3xx_compile_fragment_program ../src/gallium/drivers/r300/compiler/r3xx_fragprog.c:172
    #5 0x7f1b401b669a in r300_translate_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:516
    #6 0x7f1b401baf73 in r300_pick_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:592
    #7 0x7f1b40128db7 in r300_create_fs_state ../src/gallium/drivers/r300/r300_state.c:1071
    #8 0x7f1b3e67799d in st_create_fp_variant ../src/mesa/state_tracker/st_program.c:1073
    #9 0x7f1b3e680285 in st_get_fp_variant ../src/mesa/state_tracker/st_program.c:1119
    #10 0x7f1b3e6812fa in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1284
    #11 0x7f1b3e6812fa in st_finalize_program ../src/mesa/state_tracker/st_program.c:1363
    #12 0x7f1b3f13d501 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:754
    #13 0x7f1b3f13d501 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:990
    #14 0x7f1b3efeef75 in link_program ../src/mesa/main/shaderapi.c:1336
    #15 0x7f1b3efeef75 in link_program_error ../src/mesa/main/shaderapi.c:1445

Fixes: 29df85788a ("r300: fix constants_remap_table memory leak")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28522>
2024-04-03 08:28:42 +00:00
Erik Faye-Lund
dfc6330b85 panvk: use integers instead of strings
There's no good reason to use strings here instead of integers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28533>
2024-04-03 08:08:00 +00:00
Mike Blumenkrantz
3352803510 zink: fix shaderdb pipeline compile
this assert is always triggered with shaderdb, but it's not relevant there

Fixes: 0ebd6f52a2 ("zink: reuse rast_prim for line-rasterization check")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28525>
2024-04-03 06:37:31 +00:00
Mike Blumenkrantz
18fbe63ff2 zink: make descriptor pool creation more robust
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28467>
2024-04-03 05:48:19 +00:00
Mike Blumenkrantz
c2e0c2c67f zink: don't use set_foreach_remove with dmabuf_exports
foreach_remove cannot be used if the set ever has members deleted,
and this set may have deleted members

Fixes: 7b7a581a52 ("zink: prune dmabuf export tracking when adding resource binds")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28464>
2024-04-03 05:22:43 +00:00
Yonggang Luo
3114917986 util: Turn futex_wake parameter to int32_t for consistence across platforms
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28473>
2024-04-03 00:55:24 +00:00
Yonggang Luo
ca9738cd7a util: futex_wait use TIME_MONOTONIC on win32 for consistence with other platform
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28473>
2024-04-03 00:55:24 +00:00
Yonggang Luo
54e3fde5ca util: Fixes futex_wait on win32
The timeout compute is invalid

Fixes: 095dfc6caa ("util: Move the implementation of futex_wake and futex_wait from futex.h to futex.c")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28473>
2024-04-03 00:55:24 +00:00
Timur Kristóf
8a24610477 nir/recompute_io_bases: Sort per-primitive PS inputs last.
Some hardware requires that per-primitive FS inputs are
sorted last, and nir_assign_io_var_locations can already
take care of this.

Add the same consideration to nir_recompute_io_bases.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28489>
2024-04-02 23:00:01 +00:00
Timur Kristóf
ecbf3464f6 nir: Record per-primitive inputs without variables.
Previously, this information would have been lost when the
shader has no I/O variables.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28489>
2024-04-02 23:00:01 +00:00
Timur Kristóf
b085248819 nir/gather_info: Record per-primitive outputs without variables.
Previously, this information would have been lost when the
shader has no I/O variables.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28489>
2024-04-02 23:00:01 +00:00
Eric Engestrom
185e9b4a75 ci: fix nightly build
Fixes: 7c0b19a607 ("ci: run python-test automatically only in merge pipelines")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28517>
2024-04-02 22:10:43 +00:00
Samuel Pitoiset
a535425fb6 radv: enable radv_zero_vram for Red Dead Redemption 2
This fixes some very rare glitches that are unrelated to DCC.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8719
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28393>
2024-04-02 21:31:46 +00:00
Samuel Pitoiset
89182faee8 radv: add radv_device_generated_commands.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510>
2024-04-02 21:04:53 +00:00
Samuel Pitoiset
c4e83026af radv: add radv_perfcounter.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510>
2024-04-02 21:04:53 +00:00
Samuel Pitoiset
bccaeab503 radv: add radv_query.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510>
2024-04-02 21:04:53 +00:00
Samuel Pitoiset
bbb2e82e9a radv: add radv_image_view.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510>
2024-04-02 21:04:53 +00:00
Samuel Pitoiset
d7141bbf79 radv: add radv_image.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510>
2024-04-02 21:04:53 +00:00
Samuel Pitoiset
ce54440af3 radv: add radv_video.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510>
2024-04-02 21:04:53 +00:00
Samuel Pitoiset
c925f03712 radv: add radv_buffer.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510>
2024-04-02 21:04:53 +00:00
Samuel Pitoiset
4ba5ba8017 radv: add radv_buffer_view.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510>
2024-04-02 21:04:53 +00:00
Samuel Pitoiset
9a09954637 radv: add radv_event.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510>
2024-04-02 21:04:53 +00:00
Samuel Pitoiset
0c8f0c3918 radv: add radv_sampler.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28510>
2024-04-02 21:04:53 +00:00
Eric Engestrom
e4aa095c6e ci/deqp: backport fix for dEQP-VK.pipeline.*.render_to_image.*.huge.*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28498>
2024-04-02 19:49:09 +00:00
Georg Lehmann
80652de67b aco/ra: use SDWA for 16bit instructions when the second byte is blocked
Found by inspection, I think this can happen with pack_32_4x8(f2u8(a@16)),
which will use v_cvt_u16_f16 (a 16bit instruction) with a v1b definition.

No Foz-DB changes on Navi21.

Cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28443>
2024-04-02 19:03:14 +00:00
Eric Engestrom
e215200617 ci: use the new VK_DRIVER_FILES env var
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28516>
2024-04-02 18:08:52 +00:00
Eric Engestrom
09e5b3da76 ci: drop unused VK_ICD_FILENAMES passthrough from jobs to tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28516>
2024-04-02 18:08:52 +00:00
Eric Engestrom
ff37f68740 meson: add VK_DRIVER_FILES to devenv, alongside the old VK_ICD_FILENAMES
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28516>
2024-04-02 18:08:52 +00:00
Eric Engestrom
364ef85a8e docs/zink: format the envvar value as code instead of plain text
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28516>
2024-04-02 18:08:52 +00:00
Eric Engestrom
96e8648b32 docs: replace references to the deprecated VK_INSTANCE_LAYERS with the new VK_LOADER_LAYERS_ENABLE
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28516>
2024-04-02 18:08:52 +00:00
Eric Engestrom
5a8ce84c92 docs: replace references to the deprecated VK_ICD_FILENAMES with the new VK_DRIVER_FILES
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28516>
2024-04-02 18:08:51 +00:00
Eric Engestrom
4e746c90a4 docs/envvars: document some vulkan loader env vars
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28516>
2024-04-02 18:08:51 +00:00
Eric Engestrom
4b8735cd4e ci: raise the log level threshold of spirv logs
Avoid the wall of "Unsupported SPIR-V capability" warnings in CI job
log, hiding away useful output:

    ERROR - dEQP error: SPIR-V WARNING:
    ERROR - dEQP error:     In file ../src/compiler/spirv/spirv_to_nir.c:4779
    ERROR - dEQP error:     Unsupported SPIR-V capability: SpvCapabilityDrawParameters (4427)
    ERROR - dEQP error:     28 bytes into the SPIR-V binary

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28503>
2024-04-02 17:25:42 +00:00
Timur Kristóf
3223650bad radv: Reuse TCS offchip layout between TCS and TES.
Using the same SGPR bitfield in TCS and TES will simplify driver
code and make RADV consistent with RadeonSI.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28490>
2024-04-02 16:54:09 +00:00
Timur Kristóf
4b0b0e675c radv: Include output patch size in TCS offchip layout.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28490>
2024-04-02 16:54:09 +00:00
Timur Kristóf
2a76f821af radv: Change number of patches in TCS offchip layout to match RadeonSI.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28490>
2024-04-02 16:54:09 +00:00
Timur Kristóf
820370ca08 radv: Change input patch size in TCS offchip layout to match RadeonSI.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28490>
2024-04-02 16:54:08 +00:00
Timur Kristóf
d116272689 radv: Add number of LS and HS outputs to tcs_offchip_layout.
And calculate the LS-HS per-vertex stride in shader code.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28490>
2024-04-02 16:54:08 +00:00
Rob Clark
5a45077d84 egl/android: Fix gl_config dereference
Fixes: 273e54391a ("egl/android: Remove hard-coded color-channel data")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28509>
2024-04-02 15:52:23 +00:00
Samuel Pitoiset
eb4036a4be radv: move some VK_DEFINE_NONDISP_HANDLE_CASTS to radv_descriptor_set.h
Use that right after the structures are declared.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28519>
2024-04-02 13:55:52 +00:00
Samuel Pitoiset
964f1ed023 radv: move radv_device_supports_etc() to radv_physical_device.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28519>
2024-04-02 13:55:52 +00:00
Samuel Pitoiset
57dd6691df radv: pass a radv_physical_device to radv_use_llvm_for_stage()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28519>
2024-04-02 13:55:52 +00:00
Samuel Pitoiset
1a48e57a3d radv: declare format related functions in radv_formats.h
They are all defined in radv_formats.c.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28519>
2024-04-02 13:55:52 +00:00
Samuel Pitoiset
20963fbba5 radv: declare radv_cmd_update_descriptor_xxx() in radv_descriptor_set.h
They are defined in radv_descriptor_set.c.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28519>
2024-04-02 13:55:52 +00:00
Joshua Ashton
5f7a5a27ef wsi: Implement linux-drm-syncobj-v1
This implements explicit sync with linux-drm-syncobj-v1 for the
Wayland WSI.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:38 +00:00
Joshua Ashton
dd16c28b78 meson: Bump wayland-protocols requirement to 1.34
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:38 +00:00
Joshua Ashton
d9eb69182d meson: Update wayland-protocols wrap to 1.34
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
cee642af36 ci: Bump DEBIAN_BASE_TAG for now
We should not have to do this... but the arm64 builder does not respect DEBIAN_BUILD_TAG.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
19607c9ff4 ci: Bump wayland-protocols version to 1.34
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
59813ae468 wsi: Add common infrastructure for explicit sync
Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
4bf8f96b3e wsi: Get timeline semaphore exportable handle types
We need to know this for explicit sync

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
6a72ea01d3 wsi: Track CPU side present ordering via a serial
We will use this in our hueristics to pick the most optimal buffer in AcquireNextImageKHR

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
7467f29af1 wsi: Add acquired member to wsi_image
Tracks whether this wsi_image has been acquired by the app

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
a50ce3df71 wsi: Track if timeline semaphores are supported
This will be needed before we expose and use explicit sync.

Even if the host Wayland compositor supports timeline semaphores, in the
case of Venus, etc the underlying driver may not.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
efa6fac0d7 build: Add linux-drm-syncobj-v1 wayland protocol
Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
72240780f2 wsi: Add explicit_sync to wsi_drm_image_params
Allow the WSI frontend to request explicit sync buffers.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
c30c969c24 wsi: Add explicit_sync to wsi_image_info
Will be used in future for specifying explicit sync for Vulkan WSI when supported.

Additionally cleans up wsi_create_buffer_blit_context, etc..

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
eae948332a wsi: Pass wsi_drm_image_params to wsi_configure_prime_image
Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Joshua Ashton
d6345250ca wsi: Pass wsi_drm_image_params to wsi_configure_native_image
No need to split this out into function parameters, it's just less clean.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:37 +00:00
Eric Engestrom
55ac1bfc57 ci: add missing rule to disable vmware farm
Fixes: 54050d8844 ("svga/ci: land vmware mesa-ci lava farm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28515>
2024-04-02 12:18:01 +00:00
Kai Wasserbäch
50783351bc fix(FTBFS): clover: adapt to new LLVM 19 DiagnosticHandlerTy
LLVM 19 changed DiagnosticHandlerTy. Adapt to that.

Reference: 44d037cc25
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28520>
2024-04-02 11:27:31 +00:00
Kai Wasserbäch
1c3cce2fff fix(FTBFS): clc: adapt to new LLVM 19 DiagnosticHandlerTy
LLVM 19 changed DiagnosticHandlerTy. Adapt to that.

Reference: 44d037cc25
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10928
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28520>
2024-04-02 11:27:31 +00:00
Eric Engestrom
1b6c9a8f68 ci: mark vmware farm as offline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28514>
2024-04-02 10:05:05 +00:00
Tapani Pälli
a87d888546 anv: disable fcv optimization on >= gfx125
Earlier strategy was to enable always on DG2 but there has been bunch of
issues that indicate this feature is not working correctly. Disable
until we figure out issues with it.

Cc: mesa-stable
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/28184>
2024-04-02 09:28:18 +00:00
Sergi Blanch Torne
35a9e8577c ci: Nightly run expectations update
Reviewer the results from the last nightly run completed using ci-collate tool
(gl.fd.o/gfx-ci/ci-collate) with the 'patch' feature and a bit of human
intervention, these are the changes in the expectations.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28350>
2024-04-02 07:52:42 +00:00
Zan Dobersek
ca6779f3cb fd: enable prefixing the RD output filename
When using Freedreno's RD output facilities, enable prefixing any output or
trigger file with the string specified in the FD_RD_DUMP_TESTNAME environment
option. This is similar to how the TESTNAME env can be used with libwrap to
provide a more descriptive name for the output RD file.

These prefixes can be quite long, e.g. the longest test case name in Vulkan CTS
is above 250 characters. For that reason the output name string in the
fd_rd_output struct is now allocated on the heap, and any path building using
the output name has its on-stack string buffer enlarged.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28442>
2024-04-02 07:49:36 +02:00
Kenneth Graunke
9e0d0190ea intel/brw: Drop align16 support in brw_broadcast()
align16 support is only used on Gen9 for 3-source instructions, quad
swizzling, and dPdy calculations.  We don't need it for broadcast.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28458>
2024-04-02 00:00:59 +00:00
Kenneth Graunke
a520c976a5 intel/brw: Drop dead CHV checks.
This compiler no longer supports Cherryview.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28458>
2024-04-02 00:00:59 +00:00
Kenneth Graunke
e3d12cf72f intel/brw: Don't mention gfx7 limitations in shuffle comments
We don't support gfx7 here anymore, so we needn't consider it.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28458>
2024-04-02 00:00:59 +00:00
Kenneth Graunke
1d9e2b761a intel/brw: Update comments for indirect MOV splitting
brw_broadcast and generate_mov_indirect both had similar comments, both
with typos ("insead").  One still referred to IVB bugs, while the other
dropped that during the compiler split.  The one that dropped the
comment mentioned "both of these" issues, while citing only one issue;
there was in fact a third issue (no-Q/UQ) that wasn't mentioned in
either comment.  One also had some bad grammar in the comments.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28458>
2024-04-02 00:00:59 +00:00
Kenneth Graunke
7a24f29fbb intel/brw: Fix lower_regioning for BROADCAST, MOV_INDIRECT on Q types
For BROADCAST and MOV_INDIRECT, required_exec_type was returning
brw_int_type(type_sz(t), false), which is an unsigned type.  However,
get_exec_type(inst) returns the original type for either Q or UQ.
This meant that has_invalid_exec_type would detect a mismatch and
trigger lowering.

That lowering would insert new 64-bit MOVs, which would need to be
lowered on platforms which don't support Q/UQ.  Except, we already
ran that lowering pass earlier.  So, the unlowered Q/UQ MOVs would
reach the software scoreboarding pass, and trigger failures in the
inferred_exec_pipe() function, as no pipe is available to handle
64-bit integer operations.

It turns out that we don't need the region lowering pass to do
anything for these opcodes.  The generator code for both BROADCAST
and MOV_INDIRECT already handle decomposing Q/UQ operations into
32-bit MOVs when they're not supported.  And, it also implicitly
converts to integer types, even for floating point sources.  The
inferred_exec_pipe function already special cases them to note
that they'll always be handled on the integer pipe, so that matches.

Just drop the region lowering code for these opcodes.

Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28458>
2024-04-02 00:00:59 +00:00
Kenneth Graunke
a90edad9f7 intel/brw: Fix generate_mov_indirect to check has_64bit_int not float
We are overriding the type to Q/UQ, so we need to split to two MOVs
if 64-bit integer math is not supported.  For reference, Meteorlake
does support 64-bit floats but would still not work correctly here.

See also brw_broadcast(), which does similar indirects but correctly
checks has_64bit_int instead of has_64bit_float.

Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28458>
2024-04-02 00:00:59 +00:00
Paulo Zanoni
817f74748f anv/xe: don't overwrite the result from vk_sync_wait()
The vk_sync_wait() function is already capable of returning some nice
VkResult errors, don't lose information by replacing everything with
vk_queue_set_lost.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28455>
2024-04-01 23:36:12 +00:00
Paulo Zanoni
38af7254e2 anv/xe: don't leak xe_syncs during trtt submission
==134077== 96 bytes in 1 blocks are definitely lost in loss record 1 of 3
==134077==    at 0x4840808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==134077==    by 0x6D6F690: vk_default_alloc (vk_alloc.c:26)
==134077==    by 0x52EEEBE: vk_alloc (vk_alloc.h:48)
==134077==    by 0x52EEEEE: vk_zalloc (vk_alloc.h:56)
==134077==    by 0x52EF47E: xe_exec_process_syncs (anv_batch_chain.c:132)
==134077==    by 0x52EF8F6: xe_execute_trtt_batch (anv_batch_chain.c:215)
==134077==    by 0x5301670: anv_queue_submit_trtt_batch (anv_batch_chain.c:1697)
==134077==    by 0x603D135: gfx125_write_trtt_entries (genX_cmd_buffer.c:6091)
==134077==    by 0x5370B44: anv_sparse_bind_trtt (anv_sparse.c:595)
==134077==    by 0x5370CFC: anv_sparse_bind (anv_sparse.c:629)
==134077==    by 0x5370E6E: anv_init_sparse_bindings (anv_sparse.c:670)
==134077==    by 0x5328037: anv_CreateBuffer (anv_device.c:5071)

Note to backporters: this is only for when xe.ko is being used and
ANV_SPARSE_USE_TRTT=1 is exported. This is not the regular code path.

Fixes: 18bd00c024 ("anv/trtt: don't wait/signal syncobjs using the CPU anymore")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28455>
2024-04-01 23:36:12 +00:00
Eric Engestrom
4cf272364b docs/nvk: fix envvar documentation
It was accidentally trying to link to an envvar definition instead of creating said definition.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:37 +00:00
Eric Engestrom
7c637c20d9 docs/anv: fix envvar documentation
It was accidentally trying to link to an envvar definition instead of creating said definition.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:37 +00:00
Eric Engestrom
8e7703a455 nir: add missing stdint include
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:37 +00:00
Eric Engestrom
51c589234d isl: fix inline c identifier reference -> inline code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:37 +00:00
Eric Engestrom
13b88747d4 docs: fix inline c identifier reference -> inline code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:37 +00:00
Eric Engestrom
7668cb54dd docs/isl: fix enum references
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:37 +00:00
Eric Engestrom
a38d6547a5 docs/isl: VK_FORMAT_xxx_PACKEDn is not a real format, don't try to link to it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:37 +00:00
Eric Engestrom
dfc211ed43 docs/isl: stop trying to link to classic drivers code
It doesn't exist anymore since cdde031ac2
("classic/i965: Remove driver").

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:36 +00:00
Eric Engestrom
643cc8be7f docs/isl: fix references to ISL_AUX_USAGE_CCS_*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:36 +00:00
Eric Engestrom
db810a0644 docs/envvars: fix reference
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:36 +00:00
Eric Engestrom
f6702bb91f docs/nir: vec4 reference
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:36 +00:00
Eric Engestrom
c7da4a97fb docs/macos: drop reference to former github mirror
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28499>
2024-04-01 21:18:36 +00:00
Eric Engestrom
7c0b19a607 ci: run python-test automatically only in merge pipelines
In particular, fork and pre-merge pipelines should not automatically run
it (and `debian/x86_64_build` and `debian/x86_64_build-base`).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28452>
2024-04-01 20:21:44 +00:00
Eric Engestrom
891e2e42c6 ci: run python-test when editing the CI itself
Every job should have this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28452>
2024-04-01 20:21:44 +00:00
Eric Engestrom
182ff5dada ci: fold .test-check into its only user, python-test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28452>
2024-04-01 20:21:44 +00:00
Sathishkumar S
c34cfc1a3b ac/gpu_info: update multimedia info
update multimedia info to show num_instances and firmware version when valid
and video codec capabilities are shown if the query is supported and valid.
Multimedia info: from Navi21 ASIC is shown below.

Multimedia info:
    vcn_decode = 2
    vcn_encode = 2
    vcn_enc_major_version = 1
    vcn_enc_minor_version = 30
    vcn_dec_version = 3
    jpeg_decode = 1
    codec    dec  max_resolution   enc  max_resolution
    mpeg2    *    4096x4096        -    -
    mpeg4    *    4096x4096        -    -
    vc1      *    4096x4096        -    -
    h264     *    4096x4096        *    4096x2160
    hevc     *    8192x4352        *    7680x4352
    jpeg     *    4096x4096        -    -
    vp9      *    8192x4352        -    -
    av1      *    8192x4352        -    -

v2: fix build error with _WIN32 builds
v3: rebase on 76425cdf23 (ac/gpu_info: Add vcn dec and enc version query)

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28252>
2024-04-01 18:05:21 +00:00
Sathishkumar S
eb693cfec6 radeonsi/vcn: use num_instances from radeon_info
num_instances is used to track ip count not num_queues.

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28252>
2024-04-01 18:05:21 +00:00
Sathishkumar S
583921b2e7 ac/gpu_info: fix regression in vulkan hw decode
commit f3ab454f07 breaks vulkan hardware decoding. num_queues must
not be more than 1 for vcn ip since vcn has to retain context among
dependent jobs. use num_instances variable to track ip count.

Fixes: f3ab454f07 ("ac/gpu_info: query the number of ip instance")

v2: rebase on 76425cdf23 (ac/gpu_info: Add vcn dec and enc version query)

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28252>
2024-04-01 18:05:21 +00:00
Eric Engestrom
9329f2c15b radv/ci: simplify tahiti flakes list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28478>
2024-04-01 17:27:45 +00:00
Eric Engestrom
4e625fa161 ci: restore kws farm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28508>
2024-04-01 17:00:29 +00:00
Samuel Pitoiset
b35b2718be radv: remove radv_physical_device::instance
Get the instance object using the base object.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500>
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
e2c29c9bb6 radv: remove radv_device::instance
Use the physical device to access the instance.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500>
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
675d7f4bd0 radv: remove radv_cmd_buffer::device
Get the logical device object using the base object.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500>
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
29bae070d1 radv: remove radv_queue::device
Get the logical device object using the base object.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500>
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
896c9cf486 radv: remove radv_device::physical_device
Get the logical device object using the base object.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500>
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
310597cab6 radv: rename radv_physical_device::rad_info to info
The extra rad_ prefix isn't necessary and it's longer to type.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500>
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
2686cd59df radv: rename radeon_info variables to gpu_info everywhere
Sometimes we might have other info struct, so renaming to gpu_info
removes the confusion.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500>
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
52663ec80f radv/winsys: rename gpu_info to pci_ids in the null winsys
To avoid a conflict in the next commit.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500>
2024-04-01 16:35:09 +00:00
Samuel Pitoiset
ce1c32e358 radv: rename radv_physical_device variables to pdev everywhere
Shorter and more consistent.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28500>
2024-04-01 16:35:09 +00:00
Eric Engestrom
f674fdee72 ci: take kws farm offline
Planned maintenance, will revert when we're done.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28507>
2024-04-01 17:28:41 +01:00
Samuel Pitoiset
fcb568a5d5 docs: add alpha-to-one features for RADV
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28434>
2024-04-01 10:50:52 +00:00
Samuel Pitoiset
f463901983 radv: advertise extendedDynamicState3AlphaToOneEnable with ACO
PS epilogs aren't supported with LLVM.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28434>
2024-04-01 10:50:52 +00:00
Samuel Pitoiset
850605eba1 radv: advertise alphaToOne
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28434>
2024-04-01 10:50:52 +00:00
Samuel Pitoiset
e7206bcdb2 radv: implement alpha-to-one
This was missing and it's useful for Zink.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28434>
2024-04-01 10:50:51 +00:00
Eric Engestrom
a5f1f39bf7 docs/egl: various wording improvements
Drop mention of the option for classic drivers, be clearer about which
options enable gles1 and 2+, mention that it's 2+ and not just 2, be
clearer when we say "main library" that we're talking about the EGL lib,
and some grammar fixes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28497>
2024-04-01 10:33:09 +00:00
Eric Engestrom
57ceedfc3e docs: mesa also implements gles 3.0+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28496>
2024-04-01 10:11:43 +00:00
David Heidelberg
28a1cdf7e0 docs: we support EGL 1.5 for a long time
Cc: mesa-stable
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28495>
2024-04-01 09:52:36 +00:00
Iago Toral Quiroga
9fad2922fb broadcom/compiler: fix workaround for GFXH-1602
In this scenario drivers are adding a dummy attribute with a size
of 1, so we should account for it here.

Fixes missing window decorations with GTK4+.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10853
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28414>
2024-04-01 09:22:39 +00:00
Iago Toral Quiroga
ad647e2c90 v3d: implement fix for GFXH-1602
Same fix as implemented for v3dv.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28414>
2024-04-01 09:22:38 +00:00
Rohan Garg
3d68dd78d0 intel/eu/validate: Allow SIMD16 for mixed mode float operations on xe2+
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28484>
2024-04-01 00:00:03 +00:00
Rohan Garg
a368d234c8 intel/brw: Lower DWORD scattered read writes to lsc
Rework:
 * Francisco Jerez: Rebase on 07b9bfacc7 ("intel/compiler: Move
   logical-send lowering to a separate file")
 * Jordan: Move SHADER_OPCODE_DWORD_SCATTERED_*_LOGICAL from previous
   patch, as it seems to make more sense here.
 * Jordan: Change `devinfo->has_lsc` ?: to if/else as suggested by idr

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28484>
2024-04-01 00:00:03 +00:00
Rohan Garg
b5040bfc3f intel/brw: Handle typed surface and atomic messages for xe2+
Reworks:
 * Francisco: Rebase on 07b9bfacc7 ("intel/compiler: Move
   logical-send lowering to a separate file")
 * Jordan: Rebase on 952a523abb ("intel: switch over to unified
   atomics")

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28484>
2024-04-01 00:00:03 +00:00
Francisco Jerez
74efde7663 intel/brw/xehp+: Drop redundant arguments of lsc_msg_desc*().
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28484>
2024-04-01 00:00:03 +00:00
Francisco Jerez
f1812437e8 intel/eu/xehp+: Don't initialize mlen and rlen descriptor fields from lsc_msg_desc*().
These fields are overlapping with the ones set by brw_message_desc(),
so the latter should be used instead.  This fixes corruption of the
LSC message descriptors when inconsistent values are specified through
both helpers, which can happen if the 'inst->mlen' field is modified
during optimization (e.g. by opt_split_sends()).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28484>
2024-04-01 00:00:03 +00:00
Francisco Jerez
fa96274a87 intel/brw/xehp+: Replace lsc_msg_desc_dest_len()/lsc_msg_desc_src0_len() with helpers to do the computation.
We cannot rely on the immediate message descriptor having accurate
values for mlen and rlen at the IR level, since they are updated at
codegen time via 'inst->mlen' and 'inst->size_written', which could
end up with values inconsistent with the message descriptor if
e.g. the split sends optimization had an effect.  Instead, define
helpers that do the computation without relying on the message
descriptor, and use the pre-existing
brw_message_desc_mlen()/brw_message_desc_rlen() helpers (fully
equivalent to the lsc helpers deleted here) during disassembly.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28484>
2024-04-01 00:00:03 +00:00
Ian Romanick
5f9ab41457 intel/brw/xe2: Update uniform handling to account for 512b physical registers
Rework:
 * Jordan: Drop FINISHME (s-b Caio)
 * Jordan: Use reg_unit() in asserts rather than a ver check (s-b Caio)
 * Ian: Make use of reg_unit() in round_components_to_whole_registers()

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28484>
2024-04-01 00:00:03 +00:00
Ian Romanick
8587ef172c intel/brw/xe2: Update brw_nir_analyze_ubo_ranges to account for 512b physical registers
Rework:
 * Jordan: Use `REG_SIZE * reg_unit` (Suggested by Caio)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28484>
2024-04-01 00:00:03 +00:00
Faith Ekstrand
d5a8940812 nvk: Use a linked list for descriptor sets in a pool
There's no real benefit to all this fixed size array nonsense.  We're
heap allocating all of the nvk_descriptor_set structs anyway so having
an array-of-pointers walk instead of a linked list is no faster.  Also,
this gets rid of another fixed-size array that can overflow.

Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28482>
2024-03-31 20:42:59 +00:00
Faith Ekstrand
5c1683c9b9 nvk: Use a VMA heap for descriptor memory
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28482>
2024-03-31 20:42:59 +00:00
Faith Ekstrand
6cbd3a18d4 nvk: Use the page-aligned BO size for the descriptor pool
The BO may have more space in it than requested since it's aligned to
64K. We may as well make that available to the client.

Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28482>
2024-03-31 20:42:59 +00:00
David Heidelberg
a2d3cdd5f2 r300: add missing copyright header
Missed copyright header in newly added file.

Fixes: 024491f60f ("r300: nir fcsel/CMP lowering pass for R500")
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28384>
2024-03-31 13:03:01 +00:00
David Heidelberg
b2ae73b27e r300: add missing licence to the r300_public.h
Hardly a copyrightable file, though it should inherit the MIT
license as the code originate from MIT licensed r300_winsys.h.

Fixes: 6e3fc2de2a ("r300g: Move bootstrap code to targets")
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28384>
2024-03-31 13:03:00 +00:00
David Heidelberg
95eefce4d8 r300: convert to SPDX license block and fix small typos
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28384>
2024-03-31 13:03:00 +00:00
Marek Olšák
b6a93058b9 nir/opt_varyings: simplify nir_io_semantics::num_slots of directly-indexed slots
Compaction only moves directly-indexed slots. This prevents unnecessary
num_slots > 1 from appearing in random slots.

Fixes: c66967b5cb - nir: add nir_opt_varyings, new pass optimizing and compacting varyings

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28431>
2024-03-31 03:02:51 +00:00
Marek Olšák
71becd1b44 nir/opt_varyings: don't generate IO with unsupported bit sizes
Backward inter-shader code motion turns ALU results into outputs,
which led to getting IO with unsupported bit sizes. This prevents
that.

There is a new NIR option flag that indicates 16-bit support.

Fixes: c66967b5cb - nir: add nir_opt_varyings, new pass optimizing and compacting varyings

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28431>
2024-03-31 03:02:51 +00:00
Marek Olšák
5c543f4a02 tgsi_to_nir: translate TG4
Tested-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28349>
2024-03-30 22:25:19 -04:00
Timur Kristóf
96ee0d6711 ac/nir/tess: Remove dead code that was meant for epilogs.
We no longer need to emit store_output intrinsics at the
end of the shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28425>
2024-03-30 21:56:51 +01:00
Timur Kristóf
b34e99d021 radeonsi: Use one more bit for number of patches in TCS offchip layout.
There was 1 more bit left, may as well use it for something.
In the future, this may allow increasing the maximum number of
patches per workgroup.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28425>
2024-03-30 21:56:48 +01:00
Timur Kristóf
04dea4aef2 radeonsi: Remove tess bits from VS state.
These parts are not used anymore, therefore we no longer need to
change the VS state when tessellation states change.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28425>
2024-03-30 21:56:45 +01:00
Timur Kristóf
b82614e06b radeonsi: Add number of VS outputs to TCS output layout.
Use tcs_offchip_layout instead of VS state to determine the
number of LS outputs.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28425>
2024-03-30 21:56:42 +01:00
Timur Kristóf
8883b88dd4 aco: Delete all TCS epilog code.
Now that neither RADV nor RadeonSI uses TCS epilogs, we don't
need to keep the code to compile them in ACO either.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28425>
2024-03-30 21:56:39 +01:00
Timur Kristóf
078a23cde4 radeonsi: Delete TCS epilogs entirely.
Always emit the tessellation factor writes in the main shader,
which is doable now that the necessary information is in the
tcs_offchip_layout SGPR.

This eliminates the need for TCS epilogs, so delete them
entirely from RadeonSI.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28425>
2024-03-30 21:56:35 +01:00
Timur Kristóf
71f9d4b9eb radeonsi: Implement dynamic TCS intrinsics for non-monolithic shaders.
Put the primitive mode and whether TES reads tess factors into
the tcs_offchip_layout SGPR, so they can be used by the main
shader instead of needing the epilog.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28425>
2024-03-30 21:56:32 +01:00
Timur Kristóf
05dda3d6e7 radeonsi: Put HS output count in TCS offchip layout, not patch data offset.
The intention is to free up enough bits in tcs_offchip_layout so
that it can contain information for more dynamic states.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28425>
2024-03-30 21:56:29 +01:00
Timur Kristóf
e68ab8651e ac/llvm, radeonsi: Handle tess_rel_patch_id in common code.
We'll need to clean this up later, but for now it's better to
have it in common code than in RadeonSI.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28425>
2024-03-30 21:56:20 +01:00
Zan Dobersek
3ee81ffe14 tu: fix memory leaks in tu_shader
When tu_shader object is destroyed through vk_pipeline_cache, the relevant
destroy callback should relay to the general tu_shader_destroy function
that will also clean up owned resources.

During shader creation, the ir3_shader object should be destroyed once the
shader variants are retrieved. Since those variants are owned by tu_shader
they should be freed up in tu_shader_destroy.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: a03525d8db ("tu: Split program draw state into per-shader states")
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27847>
2024-03-30 08:56:03 +01:00
Alyssa Rosenzweig
fcf1a8062b asahi: switch to VS/FS prolog/epilog system
With the exception of some variants for framebuffer fetch (to be addressed in a
follow up MR, this is big enough as it is) -- this switches us to a shader
precompile path for VS & FS. VS prologs let us implement vertex buffer fetch
with dynamic formats, FS prologs let us implement misc emulation like API sample
masking and cull distance, while FS epilogs handle blending and tilebuffer
stores. This should cut down shader recompile jank significantly in the GL
driver. It also prepares us with most of what we need for big ticket Vulkan
extensions like ESO, GPL, and EDS3.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:20 +00:00
Alyssa Rosenzweig
742a842811 asahi/clc: stop padding binaries
we're going to switch away from the dynarray soon.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
3a2d13f59e asahi: add fast linker
to stitch together programs from separate parts

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
66862fa160 agx: add main_size info
so we can fastlink when there are preambles

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
0298c5d905 agx: add agx_shader_part data structure
for fastlinking.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
e6105cdf0c asahi: static assert blend key size
need to make sure it's padded because C

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
b0698b796e agx: drop shader stage assertion
we'll reuse these for SW VS too which is HW compute

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
57fa9a2b8e nir: add intrinsics for non-monolithic agx shaders
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
99a4d0fcad asahi: don't allocate tib space for gaps
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
eadf4cfe1c asahi: constify agx_build_tilebuffer_layout
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
5d375e6143 asahi: add agx_usc_push_packed helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
9974f68bb9 agx: document non-monolithic ABI
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
a9ccd72265 agx: implement exports
translate export/load_exported instructions into moves to/from the requested
GPRs at shader part boundaries, with coalescing in RA for perf.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
c6839cfd69 agx: generalize preloaded cache
we'll need it for more regs

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
61a4414bf6 agx: wire up samples_log2 sr
details determined by trial & error.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
e536b4973f nir: add export/load_exported_agx intrinsics
for lowering non-monolithic ABI

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
df8e52a795 nir: add samples_log2_agx sysval
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
fbd6182549 asahi: fix bit sizes in point sprite lower
not sure how this wasn't caught before. ati_fragment_shader-error05-passes

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
caad4703aa agx: always reserve sampler #0 for txf
this is a lot simpler for non-monolithic programs and is unlikely to be a
meaningful performance problem.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
be81812a4b agx: inline sampler states
to avoid regresisng code gen next commit

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
781dcc8ef8 agx: optimize out wait_pix in some cases
noticed in prop driver asm

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
c955845891 asahi: don't set writes_memory for tib spilling
we don't want the zs_emit dance emitted, all we care about is making sure tag
writes are enabled as if we had a regular tib store

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
70395c1ac1 asahi: delete layer id code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
6a63fffeaa asahi: fix _packed USC structs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
b3fdede75b asahi: use ht derive more
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
a108b21d4c asahi: drop dead linked_so code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
ad2f096a8b agx/lower_vbo: dce as we go
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
acc1fd3a8a asahi: stop using GLSL indirect lowering
we typically don't need it, and where we do, NIR does better.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
5c7ce24896 asahi: make point size replacement dynamic
I'm not measuring a significant perf difference in
-bshading:shading=phong:model=bunny -bideas -brefract so this seems Good Enough
For Me.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
7595dc9036 asahi: drop now-empty base key
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
f0e1ccc8d4 asahi: rewrite varying linking
Lower store_output to store_uvs_agx + math. Link UVS indices at draw-time
instead of compile-time to get efficient separate shaders. Also picks up varying
compaction along the way.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
3764adbef1 agx: inline imm into st_vary
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
a25e8de180 agx: pack indirect st_vary
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
78ede839f7 agx: rm unnecessary iter hack
I added this hack to avoid WaW hazards with iter instructions. Now that we know
about the iter elide bit and are not setting it improperly, we can drop the
complexity and just allow the hazard.

total instructions in shared programs: 2039480 -> 2038792 (-0.03%)
instructions in affected programs: 123441 -> 122753 (-0.56%)
helped: 811
HURT: 124
Instructions are helped.

total bytes in shared programs: 13983802 -> 13977870 (-0.04%)
bytes in affected programs: 806882 -> 800950 (-0.74%)
helped: 823
HURT: 117
Bytes are helped.

total regs in shared programs: 590670 -> 592862 (0.37%)
regs in affected programs: 8585 -> 10777 (25.53%)
helped: 29
HURT: 398
Regs are HURT.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
0d9ab6f7c7 asahi: advertise indirect fs inputs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
a17b350a3d agx: handle indirect varyings
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
87551ba3eb agx: pack indirect CF
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
ea9ddf1b96 agx: explicitly assign coeff registers
prereq to doing FS indirect inputs nicely

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
70277f8ff7 asahi: extract agx_cf_binding
for convenience

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
a2265ff588 asahi: drop =varyings debug
hasn't been relevant.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
9c2df9e814 asahi: add agx_push_packed
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
499d091208 nir: add intrinsics for lowered VS outputs
handling VS indirects will require some driver cooperation.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
1773eb329c nir: add offset to load_coefficients_agx
for indirect varyings

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
a1f6e2818d docs/asahi: document UVS
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
43613314ab agx/opt_preamble: improve rewrite cost est
this keeps us from hoisting piles of iadd for no benefit withthe new vertex
path. results on shaderdb without HW VS:

total bytes in shared programs: 13975632 -> 13975666 (<.01%)
bytes in affected programs: 3298 -> 3332 (1.03%)
helped: 0
HURT: 3

total uniforms in shared programs: 1516540 -> 1516522 (<.01%)
uniforms in affected programs: 234 -> 216 (-7.69%)
helped: 3
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
fd76caf5d3 agx/opt_preamble: preamble cycle estimates
total instructions in shared programs: 2038338 -> 2038217 (<.01%)
instructions in affected programs: 32658 -> 32537 (-0.37%)
helped: 9
HURT: 4
Instructions are helped.

total alu in shared programs: 1593474 -> 1593094 (-0.02%)
alu in affected programs: 110828 -> 110448 (-0.34%)
helped: 315
HURT: 9
Alu are helped.

total fscib in shared programs: 1589634 -> 1589254 (-0.02%)
fscib in affected programs: 110828 -> 110448 (-0.34%)
helped: 315
HURT: 9
Fscib are helped.

total ic in shared programs: 477960 -> 477948 (<.01%)
ic in affected programs: 12 -> 0
helped: 3
HURT: 0

total bytes in shared programs: 13975162 -> 13975632 (<.01%)
bytes in affected programs: 978988 -> 979458 (0.05%)
helped: 14
HURT: 313
Inconclusive result (value mean confidence interval includes 0).

total uniforms in shared programs: 1516534 -> 1516540 (<.01%)
uniforms in affected programs: 4278 -> 4284 (0.14%)
helped: 5
HURT: 6
Inconclusive result (value mean confidence interval includes 0).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
4c77f59e8a agx/opt_preamble: restrain ourselves
hoisting EVERYTHING is counterproductive now that we can remat constants.

total instructions in shared programs: 2038818 -> 2038338 (-0.02%)
instructions in affected programs: 33002 -> 32522 (-1.45%)
helped: 9
HURT: 3
Instructions are helped.

total alu in shared programs: 1594051 -> 1593474 (-0.04%)
alu in affected programs: 22012 -> 21435 (-2.62%)
helped: 12
HURT: 0
Alu are helped.

total fscib in shared programs: 1590211 -> 1589634 (-0.04%)
fscib in affected programs: 22012 -> 21435 (-2.62%)
helped: 12
HURT: 0
Fscib are helped.

total bytes in shared programs: 13978022 -> 13975162 (-0.02%)
bytes in affected programs: 219746 -> 216886 (-1.30%)
helped: 12
HURT: 0
Bytes are helped.

total regs in shared programs: 592854 -> 592758 (-0.02%)
regs in affected programs: 954 -> 858 (-10.06%)
helped: 6
HURT: 0
Regs are helped.

total uniforms in shared programs: 1516579 -> 1516534 (<.01%)
uniforms in affected programs: 4605 -> 4560 (-0.98%)
helped: 9
HURT: 0
Uniforms are helped.

total threads in shared programs: 20329216 -> 20329600 (<.01%)
threads in affected programs: 3840 -> 4224 (10.00%)
helped: 6
HURT: 0
Threads are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
cae914978b agx/opt_preamble: improve preamble cost function
save lots of uniforms by no longer pushing silly things.

total instructions in shared programs: 2039473 -> 2039480 (<.01%)
instructions in affected programs: 28335 -> 28342 (0.02%)
helped: 51
HURT: 47
Inconclusive result (value mean confidence interval includes 0).

total bytes in shared programs: 13983778 -> 13983802 (<.01%)
bytes in affected programs: 451678 -> 451702 (<.01%)
helped: 151
HURT: 79
Inconclusive result (value mean confidence interval includes 0).

total regs in shared programs: 590373 -> 590670 (0.05%)
regs in affected programs: 2354 -> 2651 (12.62%)
helped: 13
HURT: 65
Regs are HURT.

total uniforms in shared programs: 1532271 -> 1516549 (-1.03%)
uniforms in affected programs: 295709 -> 279987 (-5.32%)
helped: 2302
HURT: 0
Uniforms are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
b9a359e9bd agx: start a crude cycle model
based on notes by Dougall Johnson and Philip Turner.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
85f7310ba7 agx: vectorize uniform_store
this makes preambles shorter.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:19 +00:00
Alyssa Rosenzweig
703e5385eb agx: split select opt into its own pass
so it runs on the results of b2f lowering.

total instructions in shared programs: 2039862 -> 2039473 (-0.02%)
instructions in affected programs: 12348 -> 11959 (-3.15%)
helped: 84
HURT: 0
Instructions are helped.

total bytes in shared programs: 13986278 -> 13983778 (-0.02%)
bytes in affected programs: 141748 -> 139248 (-1.76%)
helped: 84
HURT: 122
Bytes are helped.

total regs in shared programs: 590371 -> 590373 (<.01%)
regs in affected programs: 195 -> 197 (1.03%)
helped: 5
HURT: 6
Inconclusive result (value mean confidence interval includes 0).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
90b4e27bb2 agx: use funop short form
noticed comparing asm with the blob

total bytes in shared programs: 14112726 -> 13986278 (-0.90%)
bytes in affected programs: 10848000 -> 10721552 (-1.17%)
helped: 9115
HURT: 0
Bytes are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
42a43bbdad libagx: parallelize prefix sum over 1024 threads
instead of 32. small % win on a synthetic GS benchmark

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
3319d4fdba libagx: deal with silly NIR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
13ecef56d0 libagx: accelerate prim restart unroll across wg
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
890a96e2a7 libagx: accelerate restart unroll across a subgroup
before implementing hard stream compaction algorithms, let's do the easy
accelleration.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
b51282500d libagx: polyfill glsl ballot()
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
4a586c7e87 agx: implement load_subgroup_id
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
c274566bbf agx: test constant compaction
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
fb785a5503 agx: compact 32-bit constants
we can convert f16->f32 for free on read, so we can compact constants to reduce
register pressure. this makes constant promotion more effective.

this saves a few instructions in "wall and chimney".

total instructions in shared programs: 2039709 -> 2039862 (<.01%)
instructions in affected programs: 12585 -> 12738 (1.22%)
helped: 0
HURT: 3

total bytes in shared programs: 14111800 -> 14112726 (<.01%)
bytes in affected programs: 102778 -> 103704 (0.90%)
helped: 7
HURT: 4
Inconclusive result (value mean confidence interval includes 0).

total uniforms in shared programs: 1533232 -> 1532271 (-0.06%)
uniforms in affected programs: 60255 -> 59294 (-1.59%)
helped: 481
HURT: 0
Uniforms are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
61b74894a9 agx: promote constants to uniforms
Add an optimization pass to promote constants loaded in the shader to dedicated
uniform registers preloaded before the shader. This is beneficial for two
reasons:

* fewer mov_imm instructions
* less GPR pressure (uniforms have dedicated registers)

The latter can significantly improve occupancy since we don't remat constants
for occupancy. We do remat to avoid spilling so it won't affect spilling,
although it can still be a win by reducing remat when a shader would otherwise
spill.

The problem is that we have limited uniform registers so can't promote
everything that we would want to. We model this as a 0-1 knapsack problem and
use the well-known heuristic to prioritize frequently used constants. This is
not optimal but works quite well in practice.

This gives a nice fps win in some complex shaders, including:

* Dolphin ubers from 10.25fps to 10.85fps at 4K in MMG.
* "Wall and chimney" shadertoy from 24.8fps to 29.5fps at 1188x658.

shader-db results are excellent as well.

total instructions in shared programs: 2088290 -> 2039709 (-2.33%)
instructions in affected programs: 1478061 -> 1429480 (-3.29%)
helped: 8246
HURT: 85
Instructions are helped.

total bytes in shared programs: 14321004 -> 14111800 (-1.46%)
bytes in affected programs: 10108742 -> 9899538 (-2.07%)
helped: 7999
HURT: 1416
Bytes are helped.

total regs in shared programs: 602415 -> 590371 (-2.00%)
regs in affected programs: 92177 -> 80133 (-13.07%)
helped: 1887
HURT: 209
Regs are helped.

total uniforms in shared programs: 1457531 -> 1533232 (5.19%)
uniforms in affected programs: 835522 -> 911223 (9.06%)
helped: 0
HURT: 11042
Uniforms are HURT.

total threads in shared programs: 20325824 -> 20329216 (0.02%)
threads in affected programs: 29632 -> 33024 (11.45%)
helped: 41
HURT: 0
Threads are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
2a97657792 agx: extract agx_is_float_src
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
6e2cc790eb agx: model 64-bit uniform restriction on ALU
this one is annoying!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
5b6640d013 agx: extract "accepts uniform?" ISA query
we'll want this in a second place, so invert it and export it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
51d3a376bc agx: restrict high uniforms with textures
seems to cause brokenness in blender, guess this is a new ISA corner we just
found.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
51eba1c38e agx: fix lowering uniforms with abs/neg
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
17e05c2f21 agx: add more shaderdb stats
relevant to spilling and promotion

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
36491b6e0b asahi: use less bindless samplers
before/after:

wanderer/386.shader_test - MESA_SHADER_FRAGMENT shader: 16404 inst, 111604 bytes, 255 halfregs, 384 threads, 5 loops, 444:736 spills:fills
wanderer/386.shader_test - MESA_SHADER_FRAGMENT shader: 16268 inst, 110728 bytes, 255 halfregs, 384 threads, 5 loops, 436:720 spills:fills

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
55d7267d6c agx: implement get_sr remat
wanderer/386.shader_test - MESA_SHADER_FRAGMENT shader: 16268 inst, 110728 bytes, 255 halfregs, 384 threads, 5 loops, 436:720 spills:fills
wanderer/386.shader_test - MESA_SHADER_FRAGMENT shader: 16255 inst, 110670 bytes, 255 halfregs, 384 threads, 5 loops, 435:719 spills:fills

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
03000030d0 agx: generalize remat code
so we can remat more things

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
e2ce64d013 agx: enable indirect temps
we support scratch now.

total spills in shared programs: 32764 -> 990 (-96.98%)
spills in affected programs: 32764 -> 990 (-96.98%)

total fills in shared programs: 38694 -> 639 (-98.35%)
fills in affected programs: 38694 -> 639 (-98.35%)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
e80d451e55 agx: move spill/fills accounting to shaderdb
don't bother the compiler proper about it. this now counts NIR scratch access as
spills/fills, which I think is probably the right call

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
43e804b0e4 agx: add tests for SSA repair
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
0dbf1b48d1 agx: add helpers for multiblock unit tests
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
a181f3caf4 agx: make add_successor public
for unit testing

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
7c147ae448 agx: use dense reg_to_ssa map
ssa_to_reg is necessarily sparse, and since it's allocated per block, it's
tremendously memory intensive for shaders with thousands of blocks (which
can easily happen with if-ladders)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
034f369ddf agx: switch to Braun-Hack spiller
instructions in affected programs: 771842 -> 261686 (-66.10%)
bytes in affected programs: 5286320 -> 1981896 (-62.51%)
spills in affected programs: 134070 -> 32764 (-75.56%)
fills in affected programs: 341356 -> 38694 (-88.66%)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
fe8b245cc4 agx: add Braun-Hack spiller pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
a6e9f707f4 agx: add SSA repair pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
450e79c1e6 agx: add SSA reindexing pass
spilling and SSA repair will generate piles of dead SSA defs. add a reindexing
pass to keep memory usag emanagable on large shaders.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
20409b6bae agx: validate phi sources for consistency
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
d553af7f8b agx: drop scratch regs for spilling
remnant of an old approach.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
b48f2d0ebc agx: try to coalesce moves
No shader-db changes but meh.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
fe612acb8f agx: coalesce phi webs
This massively improves our coalescing of phis by considering not just single
phi instructions but entire webs of phi-related SSA values. We do this with a
union-find data structure, which is effectively constant time thanks to union by
rank and path compression. Phi related SSA values are unioned and we try to
assign the same register to everything in the union. Boissinot might be better
but this is delightfully simple.

total instructions in shared programs: 2910655 -> 2883792 (-0.92%)
instructions in affected programs: 1295671 -> 1268808 (-2.07%)
helped: 1129
HURT: 34
Instructions are helped.

total bytes in shared programs: 19417970 -> 19255234 (-0.84%)
bytes in affected programs: 8790112 -> 8627376 (-1.85%)
helped: 1129
HURT: 34
Bytes are helped.

total halfregs in shared programs: 517813 -> 517867 (0.01%)
halfregs in affected programs: 751 -> 805 (7.19%)
helped: 2
HURT: 15
Halfregs are HURT.

total spills in shared programs: 135918 -> 134070 (-1.36%)
spills in affected programs: 135918 -> 134070 (-1.36%)
helped: 6
HURT: 0

total fills in shared programs: 343204 -> 341356 (-0.54%)
fills in affected programs: 343204 -> 341356 (-0.54%)
helped: 6
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
afdcee6a0a agx: add limit for max sources per non-phi
used to bound stack allocations.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
3684c9ebbd agx: add before_function cursor
needs care around preloads.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
6bff596505 agx: add temp_like helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
ffd2b846c4 agx: add more iterator macros
will be used for spiller.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
645f5187ed agx: don't leak shuffle copies
==42579==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 9408 byte(s) in 147 object(s) allocated from:
    #0 0xffff244c4828 in __interceptor_realloc.part.0 (/usr/lib64/libasan.so.8.0.0+0xc4828) (BuildId: 3109905b64795755dad05d7bb29ad23633a06660)
    #1 0xffff1fc71fe0 in util_dynarray_ensure_cap ../src/util/u_dynarray.h:109
    #2 0xffff1fc71fe0 in util_dynarray_grow_bytes ../src/util/u_dynarray.h:157
    #3 0xffff1fc71fe0 in assign_regs_by_copying ../src/asahi/compiler/agx_register_allocate.c:440
    #4 0xffff1fc73858 in find_regs ../src/asahi/compiler/agx_register_allocate.c:648
    #5 0xffff1fc77d3c in pick_regs ../src/asahi/compiler/agx_register_allocate.c:1010
    #6 0xffff1fc77d3c in agx_ra_assign_local ../src/asahi/compiler/agx_register_allocate.c:1098
    #7 0xffff1fc77d3c in agx_ra ../src/asahi/compiler/agx_register_allocate.c:1355
    #8 0xffff1fc3b6c4 in agx_compile_function_nir ../src/asahi/compiler/agx_compile.c:2840

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
106da137e3 agx: implement live range splits of phis
this requires some special handling but closes the last soundness gap (I hope)
in our RA. with later patches in this series, we actually hit this (50+ tests on
the CTS even) so I can be sure this actually works ^^

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
a7f01d8ca5 agx: sink harder
cuts a few spills in blender

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
4024a82aa3 agx: fix bogus implicit cast with 2d msaa arrays
causes heartburn for spiller with KHR-GL46.multi_bind.dispatch_bind_image_textures

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
c41c6ff27f agx: assert phis don't have .kill set
it's meaningless for phis but would cause soundness problems.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
6b878c5b57 agx: allow vector phis to pass validation
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
f2b344a041 agx: scalarize vector phis
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
2fc2a45c8f agx: fix 16-bit mem swaps
don't clobber r1l

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
5bfdb20dac agx: add num_successors helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
da18ac5dfa agx: add more asserts
sigh, C

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
c0d47d827a agx: fix allocating phi sources past the reg file
count can differ.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
3a3f9de486 agx: fix stack smash with spilling
ASAN saves the day! Was stuck on this for hours.

==37495==ERROR: AddressSanitizer: stack-buffer-overflow on address 0xfffff29ecdbc at pc 0xffff7c0751f4 bp 0xfffff29eca30 sp 0xfffff29eca48
READ of size 4 at 0xfffff29ecdbc thread T0
    #0 0xffff7c0751f0 in __bitset_set_range ../src/util/bitset.h:249
    #1 0xffff7c0751f0 in find_regs ../src/asahi/compiler/agx_register_allocate.c:642
    #2 0xffff7c077d2c in pick_regs ../src/asahi/compiler/agx_register_allocate.c:1008
    #3 0xffff7c077d2c in agx_ra_assign_local ../src/asahi/compiler/agx_register_allocate.c:1096
    #4 0xffff7c077d2c in agx_ra ../src/asahi/compiler/agx_register_allocate.c:1353
    #5 0xffff7c03b6c4 in agx_compile_function_nir ../src/asahi/compiler/agx_compile.c:2840

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
9ca5778f3e agx/opt_cse: alloc less
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
114f858440 asahi/clc: fix mem leaks
needed to build mesa with asan enabled

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
2e28998017 libagx: improve static assert message
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:18 +00:00
Alyssa Rosenzweig
b01ccc13e9 asahi: drop asahi_vs_next_stage
now we use the same vs for vs->gs and vs->tcs

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
6c497d41c7 asahi: drop TCS key
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
72ef80dfc8 asahi: stop merging VS and TCS
unfortunately, shader stage merging is bogus when coherent images are used, so
we need an unmerged path. i'd rather not maintain two paths, so let's just
stop merging. as a bonus this makes ESO a lot easier, and lets us reuse the same
VS for both VS->GS and VS->TCS.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
351698d165 asahi: be robust against tess batch changes
fixes faults in arb_shader_image_load_store-coherency

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
20089a681a asahi: implement CDM stream linking for GS
fixes crash with massive #s of geometry shader draws, as seen in
arb_shader_image_load_store-coherency

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
69dc5bed89 asahi: fix depth bias interactions with points/lines
we need to apply depth bias for tris with point/line poly mode (according to
offset_point/offset_line), but we need to NOT apply depth bias for API-level
points/lines. weirdly the hw is sensitive to that last part.

fixes z-fighting with FreeCAD.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
2c40768207 asahi: accelerate QBO copies
using a compute shader to avoid a stall.

doubles/triples perf in smo metro in ryu

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
6f642e9bb9 asahi: add helper to classify queries
to share query/qbo code

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
7bc904cb4a asahi: add flush_query_writers helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
c0582fcd8e asahi: export build_meta_shader
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
83737cca5c asahi: fix stage accounting for meta compute shaders
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
f2a1d38096 asahi: fix unit mismatch with unroll path
Fixes GS line/point expansion in Dolphin, as well as corruption in Blender when
the dancing ants show up

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
1dee26b61f asahi: zero more in the unroll path
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
2f1b50d8bc asahi: clarify how unroll index buffers are offsetted
it's a little inconsistent

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
e952189443 asahi: fix overread with samplers
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
007a440a33 asahi/lib: fix overread with stateful
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
0a8d0217c9 asahi: move more code out of agx_preprocess_nir
we need to gather tex masks  / lower mediump io before lowering textures for our
detection to work ... also we want driver-side i/o soon lowering for Marek's
thing anyway. do some code motion / pass reordering to make this doable.

in doing so, we get rid of agx_uncompiled_shader_info which is probably good.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
d6800d5cc6 asahi: allow more samplers for shaderdb
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Isaac Marovitz
ff6722814a asahi: Add >16 Sampler Access for Ryujinx
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Alyssa Rosenzweig
4779e9d574 asahi: bump maximum samplers for Blender
Blender needs more samplers to render the "wanderer" scene. While our binding
table is limited, we can get additional samplers by downshifting to the bindless
sampler heap, at a performance penalty. That mechanism is already in place for
merged VS/TCS, so we can reuse it for this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
2024-03-30 00:26:17 +00:00
Faith Ekstrand
0e4b5e0b00 nil: Drop unneeded types from formats
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28453>
2024-03-30 00:03:46 +00:00
Faith Ekstrand
4c59398615 nil: Remove 2-bit SNORM from the format table
Initially I left it in place because I didn't want to disturb the table
beyond what was in nv50_formats.c.  However, we've moved past that now
and these formats are permanently broken so it's easiest to just remove
them from the table rather than have them in the table and then have C
code which disables them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28453>
2024-03-30 00:03:46 +00:00
Faith Ekstrand
4ca6ad7f8c nil: Drop bogus color formats from non-renderable luminance/alpha formats
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28453>
2024-03-30 00:03:46 +00:00
Faith Ekstrand
7b6b5aa0c6 nil: Switch to using the CSV generated table
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28453>
2024-03-30 00:03:45 +00:00
Faith Ekstrand
bc0ce3848f nil: Re-organize the format table
For normal color formats, sort them by largest component size then by
number of components.  This should make things easier to find.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28453>
2024-03-30 00:03:45 +00:00
Faith Ekstrand
70843be321 nil: Add a CSV version of the format table
This is much more readable than the macro mess we had before.  Most
notably because we no longer have this mess of #defines for format
support flags and instead have a character per flag and every every
supported flag is there every time.  This makes it way easier to figure
out what we're actually claiming a format can do.

This conversion was tested with a patch that did a memcmp() of this
table against the old one to ensure that the two tables are bit-for-bit
identical.  Later commits may modify the table in various ways but this
conversion to a CSV file is lossless.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28453>
2024-03-30 00:03:45 +00:00
Faith Ekstrand
3f50d72ec5 nak: Don't do a scope break cascade for nir_jump_halt
Fixes: 9312356d99 ("nak/nir: Add a control-flow lowering pass")
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28456>
2024-03-29 23:08:50 +00:00
Faith Ekstrand
b593de2c49 nir: Delete the rest of the CF list when adding a halt
In nir_lower_terminate_to_demote(), we were deleting the rest of the
block contents when we added a halt instruction but left any subsequent
CF nodes in the list.  While this may be technically okay, that much
dead code makes the rest of NIR pretty grumpy.  It's better to delete
everything to the end of the CF list, not just everything to the end of
the block.

Fixes: 75861c64b8 ("nir: Add a lower_terminate_to_demote pass")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28456>
2024-03-29 23:08:50 +00:00
Caio Oliveira
d9e737212d intel/brw: Add a src array for the common case in fs_inst
In the common case, fs_inst will have up to 4 sources (the HW
instructions have up to 3, and our representation of SENDs have 4).
Embed such array into the fs_inst, and use it whenever applicable
instead of allocating a new array.

Also change the code to reuse the allocated src array when resizing to
a smaller length.

Between the changes above and the reduced amount of initializing
fs_regs, this reduces fossil-db time by around 2% for Borderlands 3
and Rise of the Tomb Raider, and around 1.5% for Total War Warhammer 3.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28379>
2024-03-29 22:44:01 +00:00
Caio Oliveira
dae9795628 intel/brw: Remove vestiges of sources on IF opcode, only valid on Gfx6
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28379>
2024-03-29 22:44:01 +00:00
Kenneth Graunke
816a33849a intel/brw: Rearrange fs_inst fields
For better packing, and to make all the small fields easier to hash
and compare en masse.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28379>
2024-03-29 22:44:01 +00:00
Eric Engestrom
814017103c rpi/ci: another batch of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28481>
2024-03-29 22:22:21 +00:00
Faith Ekstrand
6f395d44b1 nvk: Advertise VK_KHR_maintenance6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27796>
2024-03-29 22:03:25 +00:00
Valentine Burley
16397c10c7 nvk: Add support for version 2 of all descriptor binding commands
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27796>
2024-03-29 22:03:25 +00:00
Faith Ekstrand
3a88e3f18b nvk: Support VkBindMemoryStatusKHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27796>
2024-03-29 22:03:25 +00:00
Ian Romanick
5e9c01dfe4 intel/brw/xe2+: Use phys_nr and phys_subnr in DPAS encoding
Suggested-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28404>
2024-03-29 21:12:32 +00:00
Ian Romanick
6d85f7129a intel/brw/xe2+: DPAS must be SIMD16 now
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28404>
2024-03-29 21:12:32 +00:00
Ian Romanick
a8115221e5 nir: intel/brw: Change the order of sources for nir_dpas_intel
It was by pure luck that all sources (and the result) of nir_dpas_intel
had the same number of components. It is possible to support matrix
sizes where the accumlator matrix and the result matrix are larger
(e.g., 16x8 * 8x16 = 16x16).

This breaks all of the assumptions of NIR's infrastructure for code
generating intrinsics. Fix the by making the accumulator matrix be the
first source. The accumulator and the result will always have the same
dimensions (due to rules of matrix multiplication) and the same type
(due to restructions of the cooperative matrix extension). This forces
them to have the same number of components.

This doesn't fix all the potential problems. NIR expects that all
0-sized sources will have the same number of components. This just
ensures that the result has the correct number of components.

Fixes: 6b14da33ad ("intel/fs: nir: Add nir_intrinsic_dpas_intel")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28404>
2024-03-29 21:12:32 +00:00
Ian Romanick
c6bd6f2a41 intel/brw: Use enums for DPAS source regioning
Was previously passing 1, 1, 0 as the regioning. This generated
incorrect disassembly because the encoding for a width of 1 is 0. Use
the enums to ensure the correct values are used.

Fixes: 1c92dad5cb ("intel/disasm: Disassembly support for DPAS")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28404>
2024-03-29 21:12:32 +00:00
Ian Romanick
be4fa59a72 intel/brw: Clear write_accumulator flag when changing the destination
If the destination was the accumulator but is no longer, having the flag
set is not correct. On Xe2 this also causes a validation error.

v2: Reword the comment to be more clear. Suggested by Jordan.

Fixes: efa4e4bc5f ("intel/fs: Introduce regioning lowering pass.")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28404>
2024-03-29 21:12:32 +00:00
Faith Ekstrand
b5f4b16811 nak: Implement load_ubo with an indirect cbuf index
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28474>
2024-03-29 19:30:16 +00:00
Faith Ekstrand
f4ac517cc8 nak: Plumb through LDC modes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28474>
2024-03-29 19:30:16 +00:00
Eric Engestrom
189b4193ee ci_run_n_monitor: explain how to pass multiple targets without having to use regexes
Fixes: 6825c67c99 ("ci_run_n_monitor: allow passing multiple targets")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28461>
2024-03-29 19:23:24 +00:00
Eric Engestrom
48566d00b1 ci: don't run rustfmt on every core change
Only keep the two parts we want: disabling the job in the nightly
pipeline, and running the job if the CI itself is modified.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28468>
2024-03-29 18:43:38 +00:00
Jesse Natalie
4f310b04f0 wgl: The default swap interval is supposed to be 1
Per WGL_EXT_swap_control:
> The default swap interval is 1.

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28471>
2024-03-29 17:29:18 +00:00
Eric Engestrom
cc5e9def56 radv/ci: dEQP-VK.spirv_assembly.type.vec4.i8.mod_geom Fail -> Crash on tahiti
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28472>
2024-03-29 16:36:10 +00:00
Eric Engestrom
64293c5aa3 radv/ci: another batch of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28472>
2024-03-29 16:36:10 +00:00
Mike Blumenkrantz
edeb3fec4d zink: only check that CUBE_COMPATIBLE for images doesn't subtract flags
the flags may change if e.g., HOST_TRANSFER is enabled by adding CUBE

fixes #10924

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28460>
2024-03-29 13:09:40 +00:00
Rhys Perry
03938804f1 aco: avoid breaking clauses with waitcnt
fossil-db (navi31):
Totals from 3573 (4.50% of 79395) affected shaders:
Instrs: 6172096 -> 6170009 (-0.03%); split: -0.04%, +0.01%
CodeSize: 31448052 -> 31439660 (-0.03%); split: -0.03%, +0.01%
Latency: 37317302 -> 37307935 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 6820967 -> 6819930 (-0.02%); split: -0.02%, +0.00%
VClause: 163424 -> 157705 (-3.50%)
SClause: 135441 -> 135295 (-0.11%)

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/28433>
2024-03-29 12:04:13 +00:00
Karol Herbst
88a9576a3e meson: fix link failure with llvm-18
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10739
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10775
cc: mesa-stable

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28267>
2024-03-29 07:31:02 +00:00
Timur Kristóf
3fd002f6d5 radv, aco: Remove the code that jumped to RADV's TCS epilogs.
The actual TCS epilog selection code is kept unchanged for now,
we'll delete it when RadeonSI also gets rid of TCS epilogs.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28408>
2024-03-28 23:44:03 +00:00
Timur Kristóf
e421923692 radv: Completely delete TCS epilogs.
TCS epilogs are not needed anymore because the TCS can implement
dynamic states by itself now.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28408>
2024-03-28 23:44:03 +00:00
Timur Kristóf
508f293b14 ac/nir/tess: Emit tess factor stores based on new intrinsics.
This allows the TCS to read the primitive mode and whether
TES reads the tess factors, from an SGPR arg, which lets it
decide how to store them at runtime.

For linked shaders, the conditions will be constant and
NIR optimizations can delete the dead CF.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28408>
2024-03-28 23:44:03 +00:00
Timur Kristóf
476a42c02c radv: Call nir_opt_dead_cf in radv_optimize_nir_algebraic.
In case lowering passes added dead CF.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28408>
2024-03-28 23:44:03 +00:00
Timur Kristóf
315cacddbd radv: Implement new tess intrinsics.
For linked shaders, the information is available as constant,
while for unlinked shaders, the info is in a SGPR arg.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28408>
2024-03-28 23:44:03 +00:00
Timur Kristóf
5a43f33426 radv: Copy TES primitive mode to TCS info.
Will be needed by the ABI lowering of the new intrinsic that
tells the TCS the primitive type, if it's known.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28408>
2024-03-28 23:44:03 +00:00
Timur Kristóf
f646b05737 radeonsi: Implement new intrinsics for monolithic shaders.
For now, only monolithic shaders will hit the code path that will
generate these intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28408>
2024-03-28 23:44:03 +00:00
Timur Kristóf
411de8488c nir: Add two new AMD specific tess intrinsics.
These will be needed to implement some tessellation dynamic
states within the TCS as opposed to using an epilog.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28408>
2024-03-28 23:44:03 +00:00
Sil Vilerino
8a8fae2520 d3d12: Support HEVC slice L0/L1 active number override
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28424>
2024-03-28 21:31:25 +00:00
Sil Vilerino
33336a2766 d3d12: Support H264 slice L0/L1 active number override
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28424>
2024-03-28 21:31:25 +00:00
Sil Vilerino
cc04a04f13 d3d12: Bump directx-headers dependency to v613
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28424>
2024-03-28 21:31:25 +00:00
Rhys Perry
66153f7bfe aco: always emit float mode for merged shaders compiled separately
We don't know what the float mode was by the end of the previous shader,
so we should always set it.

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/28392>
2024-03-28 21:02:29 +00:00
Rohan Garg
df3a1348d1 intel/brw: minor rework to de duplicate variable assignment
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27235>
2024-03-28 19:53:40 +00:00
Rohan Garg
a715512177 intel/brw: adjust the copy propgation pass to account for wider GRF's on Xe2+
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27235>
2024-03-28 19:53:40 +00:00
Rohan Garg
7d425913f7 intel/brw: update disassembly for MATH pipe
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27235>
2024-03-28 19:53:40 +00:00
Rohan Garg
467ee9d27a intel/brw: Xe2+ can do SIMD16 for extended math on HF types
BSpec 56797:
Math operation rules when half-floats are used on both source and
destination operands and both source and destinations are packed.

The execution size must be 16.

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/27235>
2024-03-28 19:53:40 +00:00
Rohan Garg
c4b38c717d intel/brw: account for sources when determining if a operation uses half floats
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/27235>
2024-03-28 19:53:40 +00:00
Eric Engestrom
07f0825c03 radv/ci: another batch of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28450>
2024-03-28 18:59:10 +00:00
Eric Engestrom
d92db5e14a v3dv/ci: another batch of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28449>
2024-03-28 18:37:22 +00:00
Juston Li
d6978b1af2 Revert "zink: store last pipeline directly for zink_gfx_program::last_pipeline"
This reverts commit be8b7980e6.

Store the cache entry so that the fast path picks up the optimized
pipeline when its available from a background optimized_compile_job().

Observed traces where it would take the fast path back and forth using
an unoptimized pipeline and never pick up the optimized pipeline leading
to >50% fps drop.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28440>
2024-03-28 17:06:39 +00:00
Hans-Kristian Arntzen
5eb0dec525 wsi/x11: Return OUT_OF_DATE on sw resize.
This is more in line with DRI3 path, and fixes a regression
since SUBOPTIMAL was not considered correctly.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: 19dba854be ("wsi/x11: Rewrite implementation to always use threads.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10878
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28413>
2024-03-28 14:22:19 +00:00
Daniel Schürmann
a4231d4f56 aco/spill: use average use distances to spill loop variables
Totals from 83 (0.10% of 79395) affected shaders: (GFX11)

Instrs: 3429510 -> 3427917 (-0.05%); split: -0.05%, +0.01%
CodeSize: 17587884 -> 17570224 (-0.10%); split: -0.11%, +0.01%
SpillSGPRs: 4660 -> 4630 (-0.64%); split: -1.07%, +0.43%
Latency: 20054145 -> 20054454 (+0.00%); split: -0.00%, +0.01%
InvThroughput: 4989606 -> 4989740 (+0.00%); split: -0.00%, +0.01%
VClause: 90844 -> 90843 (-0.00%)
SClause: 69534 -> 69535 (+0.00%); split: -0.04%, +0.04%
Copies: 283288 -> 283415 (+0.04%); split: -0.11%, +0.15%
Branches: 113543 -> 113409 (-0.12%); split: -0.12%, +0.01%
VALU: 1888933 -> 1887489 (-0.08%); split: -0.08%, +0.00%
SALU: 423548 -> 423609 (+0.01%); split: -0.07%, +0.09%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27799>
2024-03-28 13:57:36 +00:00
Daniel Schürmann
c371882060 aco/spill: use average use distances in init_live_in_vars() for merge blocks
Totals from 18 (0.02% of 79395) affected shaders: (GFX11)

Instrs: 726400 -> 726409 (+0.00%); split: -0.00%, +0.00%
CodeSize: 3750396 -> 3750420 (+0.00%); split: -0.00%, +0.00%
Latency: 4363014 -> 4363039 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 1483486 -> 1483485 (-0.00%)
SClause: 13393 -> 13392 (-0.01%); split: -0.01%, +0.01%
Copies: 70236 -> 70254 (+0.03%); split: -0.01%, +0.03%
Branches: 23811 -> 23810 (-0.00%)
VALU: 404250 -> 404247 (-0.00%); split: -0.00%, +0.00%
SALU: 92208 -> 92226 (+0.02%); split: -0.01%, +0.02%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27799>
2024-03-28 13:57:36 +00:00
Daniel Schürmann
c2ac4f1917 aco/spill: use average use distances in process_block()
Totals from 128 (0.16% of 79395) affected shaders: (GFX11)

Instrs: 672936 -> 672086 (-0.13%); split: -0.40%, +0.28%
CodeSize: 3574396 -> 3565540 (-0.25%); split: -0.55%, +0.30%
SpillSGPRs: 6254 -> 6636 (+6.11%); split: -0.32%, +6.43%
SpillVGPRs: 967 -> 839 (-13.24%)
Latency: 6489362 -> 6469427 (-0.31%); split: -0.36%, +0.05%
InvThroughput: 2216723 -> 2212417 (-0.19%); split: -0.24%, +0.05%
VClause: 11670 -> 11517 (-1.31%); split: -1.50%, +0.19%
SClause: 15711 -> 15754 (+0.27%); split: -0.29%, +0.57%
Copies: 85185 -> 84155 (-1.21%); split: -2.14%, +0.93%
Branches: 18706 -> 18708 (+0.01%); split: -0.05%, +0.06%
VALU: 386892 -> 386204 (-0.18%); split: -0.40%, +0.23%
SALU: 85754 -> 86211 (+0.53%); split: -0.46%, +1.00%
VMEM: 18777 -> 18524 (-1.35%); split: -1.37%, +0.02%
VOPD: 670 -> 628 (-6.27%); split: +0.75%, -7.01%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27799>
2024-03-28 13:57:36 +00:00
Daniel Schürmann
9833120e91 aco/spill: gather information about average use distances
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27799>
2024-03-28 13:57:36 +00:00
Daniel Schürmann
b6e56ab356 aco/spill: use live variables instead of next_use_distances in add_coupling_code()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27799>
2024-03-28 13:57:36 +00:00
Daniel Schürmann
7b96482ec9 aco/spill: maintain valid live vars at any point
In order to do so, we need to process blocks unconditionally.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27799>
2024-03-28 13:57:36 +00:00
Daniel Schürmann
fab8757831 aco/spill: compute live-in variables from live-out
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27799>
2024-03-28 13:57:36 +00:00
Daniel Schürmann
bfb62fa70d aco/spill: pass live_vars to spill_ctx
We will use them in future commits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27799>
2024-03-28 13:57:36 +00:00
Daniel Schürmann
66616f0862 aco/spill: Fix assertion for nested loops
Fixes: 898fd9227a ('aco/spill: keep loop variables spilled during nested loops')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27799>
2024-03-28 13:57:36 +00:00
Boyuan Zhang
c38a2ab993 radeonsi/vcn: mark rc_per_pic as obsoleted
Rename parameters in rc_per_pic to emphasize that the method is obsoleted
Add warning to recommend users to update VCN FW for the correct rate control

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28234>
2024-03-28 13:09:18 +00:00
Boyuan Zhang
b61ffe2151 radeonsi/vcn: choose rc_per_pic by encode verison
Using VCN FW encode version to check if the current FW support the new
rate control per picture method (ex). If not, roll back to use the previous
rate control per picture method.

Fixes: 5ecf83e9adcd652e6159 ("radeonsi/vcn: Implement separate QP for I/P/B frames")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10793

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28234>
2024-03-28 13:09:18 +00:00
Boyuan Zhang
76425cdf23 ac/gpu_info: Add vcn dec and enc version query
So that driver can query the current VCN FW decode version and encode
major and minor version.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28234>
2024-03-28 13:09:18 +00:00
Georg Lehmann
51a5ebbd01 aco: don't combine mul+add_clamp to mad_clamp
The result is not the same if the multiplication overflows, mad_clamp
does not truncate between the mul and the add.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28421>
2024-03-28 12:41:49 +00:00
Daniel Schürmann
db29984c25 aco: move create_instruction() to aco_ir.cpp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28370>
2024-03-28 11:25:43 +00:00
Daniel Schürmann
a863c7951e aco: remove create_instruction() template parameter
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28370>
2024-03-28 11:25:43 +00:00
Daniel Schürmann
4cb73cb5f3 aco: defer instruction size from aco::Format in create_instruction()
rather than using the template argument.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28370>
2024-03-28 11:25:43 +00:00
Daniel Schürmann
9b0ebcc39b aco: change return type of create_instruction() to Instruction*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28370>
2024-03-28 11:25:43 +00:00
Daniel Schürmann
cd62f97719 aco/builder: use accessor functions instead of casting to subtypes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28370>
2024-03-28 11:25:43 +00:00
Daniel Schürmann
1187189235 aco: unify different SALU types into single struct SALU_instruction
This removes
- SOP1_instruction
- SOP2_instruction
- SOPC_instruction
- SOPK_instruction
- SOPP_instruction

and their corresponding methods.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28370>
2024-03-28 11:25:43 +00:00
Daniel Schürmann
5d265257a0 aco: remove SOPP_instruction::block member
Re-use SOPP_instruction::imm instead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28370>
2024-03-28 11:25:43 +00:00
Daniel Schürmann
cef01e817d aco: use instr_class::branch to identify SOPP branches
Also changes the instr_class of s_trap to instr_class::other.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28370>
2024-03-28 11:25:43 +00:00
Samuel Pitoiset
c2d189380c radv: remove useless RADV_DEBUG=nomemorycache
This is a leftover from the cache changes few months ago.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28441>
2024-03-28 10:36:58 +00:00
Timur Kristóf
fcf574f4c1 radv, aco: Delete now dead TCS epilog code.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28371>
2024-03-28 09:41:08 +00:00
Timur Kristóf
53ab164234 radv: Always pass tess factors to epilogs in registers.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28371>
2024-03-28 09:41:08 +00:00
Timur Kristóf
542992d037 radv: Declare tess_lvl_in/out args for TCS epilogs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28371>
2024-03-28 09:41:08 +00:00
Timur Kristóf
023d7fc76d aco: Use tess factors when TCS jumps to epilog.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28371>
2024-03-28 09:41:08 +00:00
Timur Kristóf
3422084026 aco: Use common helper for counting tess level components.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28371>
2024-03-28 09:41:08 +00:00
Timur Kristóf
524c4fa5ad ac/nir/tess: Refactor how the end of HS is emitted.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-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/28371>
2024-03-28 09:41:08 +00:00
Timur Kristóf
96998b448c ac/nir/tess: Emit tess factor output independently of whether it can be passed by registers.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-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/28371>
2024-03-28 09:41:08 +00:00
Timur Kristóf
7a5a462a75 ac/nir/tess: Split tess factor write into multiple functions.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-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/28371>
2024-03-28 09:41:08 +00:00
Timur Kristóf
d53e836d55 ac/nir/tess: Don't record mapped tess level location.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-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/28371>
2024-03-28 09:41:08 +00:00
Timur Kristóf
b7d5d7629a ac/nir/tess: Always record tess level info and use it at the end.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-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/28371>
2024-03-28 09:41:08 +00:00
Timur Kristóf
02f6a2591c compiler: Add helper for counting tess level components.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28371>
2024-03-28 09:41:08 +00:00
Danylo Piliaiev
74a1564aed freedreno/replay: Allocated maximum available size for cs overriding
We pessimistically allocate 1MB per IB when overriding cs. There could
be lots of small IBs, so we should allocate as much space as possible
for overriding.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28276>
2024-03-28 08:50:39 +00:00
Danylo Piliaiev
df3ba95a24 util/vma: Add function to get max continuous free size
Useful to find out what's the biggest allocation we could make.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28276>
2024-03-28 08:50:38 +00:00
Samuel Pitoiset
bcf793306f radv: fix conditional rendering with mesh+task and multiview (again)
ViewIndex isn't allowed with task shaders and the whole thing was just
wrong.

Fixes GPU hangs with
dEQP-VK.mesh_shader.ext.conditional_rendering.*_multiview.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28157>
2024-03-28 07:27:55 +00:00
Yonggang Luo
46127a4ba7 pvr: Add pvr_ prefix for vk_format_* functions in pvr_formats.h
Also rename vk_format_is_normalized to pvr_vk_format_is_fully_normalized for good function name

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28266>
2024-03-28 04:11:52 +00:00
Yonggang Luo
86c88369c6 pvr: Merge imagination/vulkan/vk_format.h into imagination/vulkan/pvr_formats.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28266>
2024-03-28 04:11:52 +00:00
Yonggang Luo
a4a42eb652 pvr: inline and remove vk_format_get_channel_width
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28266>
2024-03-28 04:11:52 +00:00
Yonggang Luo
49f6270e7d vulkan: Move vk_format_is_alpha and vk_format_is_alpha_on_msb into vk_format.h from pvr
The vk_format_description moved to front because it's referenced by vk_format_is_alpha_on_msb

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28266>
2024-03-28 04:11:52 +00:00
Yonggang Luo
df3d37d7d6 radv: Rename src/amd/vulkan/vk_format.h to src/amd/vulkan/radv_formats.h
vk_format.h is resident under src/vulkan/util/vk_format.h, so do the rename to avoid
conflict

Only include radv_formats.h when needed.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28266>
2024-03-28 04:11:52 +00:00
Eric Engestrom
0173825278 docs: add sha256sum for 24.0.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28438>
2024-03-28 03:29:31 +00:00
Eric Engestrom
8372991400 docs: add release notes for 24.0.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28438>
2024-03-28 03:29:31 +00:00
Eric Engestrom
7a538dcc57 docs: update calendar for 24.0.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28438>
2024-03-28 03:29:31 +00:00
Eric Engestrom
5cf3260de8 docs: update calendar for 24.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28438>
2024-03-28 03:29:31 +00:00
Lionel Landwerlin
65e2b37ade anv: optimize emission of dynamic state with blorp
There are a few structures located in the dynamic state heap that
blorp also emits. Instead of repacking them after a blorp operation,
just reemit the old dynamic state heap offset.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28368>
2024-03-28 02:41:50 +00:00
Lionel Landwerlin
fe1baa6481 anv: reduce blorp dynamic state emissions
Just enable the work done in the previous commit.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28368>
2024-03-28 02:41:50 +00:00
Lionel Landwerlin
a147ccaa5c blorp: add support for cached dynamic states
Of the dynamic states we have blorp reemit for each operations, a few
actually never change :
   * BLEND_STATE (it looks like it does, but actually for anv no)
   * COLOR_CALC_STATE
   * CC_VIEWPORT
   * SAMPLER_STATE

We add infrastructure here to upload into the driver and retrieve the
state offset later.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28368>
2024-03-28 02:41:50 +00:00
Yonggang Luo
bdc3d75431 radv: Remove redundant inc_gallium
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28230>
2024-03-28 01:24:33 +00:00
Yonggang Luo
6c4705d4cf intel/meson: Remove redundant inc_gallium
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28230>
2024-03-28 01:24:33 +00:00
Eric Engestrom
aaf81bd069 v3dv/ci: add more flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28437>
2024-03-28 01:01:05 +00:00
David Stern
82ed8aadea vulkan/wsi/x11: Explicitly discard errors from xcb_present_pixmap.
Errors produced by the call to `xcb_present_pixmap` should be explicitly
discarded to ensure they don't leak into the application event loop.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Fixes: 2b885b23 ("vk/wsi/x11: stop roundtripping on presentation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28402>
2024-03-28 00:23:38 +00:00
Mike Blumenkrantz
b5877e0501 nir/opt_varyings: update alu type when rewriting src/dest for moved ops
this otherwise retains the old bit size

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28304>
2024-03-27 23:29:36 +00:00
Timur Kristóf
c32401f49b radv: Allow NGG culling with LLVM.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28430>
2024-03-27 23:02:26 +00:00
Timur Kristóf
af2a0ea452 radv/llvm: Remove dead code.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28430>
2024-03-27 23:02:26 +00:00
Lucas Stach
3a10d1be0e etnaviv: fix depth writes without testing
Depth writes are only gated by the depth writemask. The state object
member depth_enabled must only affect depth testing.

Fixes: b29fe26d43 ("etnaviv: rework ZSA into a derived state")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28403>
2024-03-27 21:36:40 +00:00
Mike Blumenkrantz
2b2f74ab35 nir/divergence: add zink intrinsics
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28429>
2024-03-27 20:55:07 +00:00
Erik Faye-Lund
0ab81efefc gallium: remove always-false parameter
We always pass false to util_map_texcoords2d_onto_cubemap function, which
allows us to avoid the dodgy case of using a close-to-one scaling factor
in an attempt to avoid sampling on the edges.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27759>
2024-03-27 20:00:24 +00:00
Mary Guillemard
9ea8249e55 nouveau: Fix NINC TERT handling in vk_push_print
This was an oversight from the previous changes but that codepath
shouldn't really be taken on G80+.

Fixes: 9e133c4000 ("nouveau: Add support for TERT opcodes in vk_push_print")

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28427>
2024-03-27 19:37:18 +00:00
Eric Engestrom
382a53979b radv/ci: add more flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28426>
2024-03-27 18:53:51 +00:00
Job Noorman
b75d65dfb2 freedreno/registers: fix installation of schema
A previous cleanup erroneously removed the installation of the schema
and copyright files. This caused tools like cffdump to fail when the
source directory was not available. This patch re-enables the
installation of these files.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: bf89f777f8 ("freedreno/registers: fix generation dependencies")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28422>
2024-03-27 18:21:08 +00:00
Eric Engestrom
c0875d2156 rpi/ci: add flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28423>
2024-03-27 17:59:18 +00:00
Mike Blumenkrantz
2c4625c887 ci: bump VVL to v1.3.281
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28400>
2024-03-27 17:02:44 +00:00
Mike Blumenkrantz
739d45d5d4 radv: inline radv_device_fault_detection_enabled
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28394>
2024-03-27 16:28:19 +00:00
Philipp Zabel
f4199a9b21 rusticl: work around reference-to-mutable-static warnings
Creating mutable or shared references to mutable static variables is
discouraged, but still possible by taking a detour to a raw pointer
via the addr_of! / addr_of_mut! macros.

For details, see: https://github.com/rust-lang/rust/issues/114447

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10887
Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28415>
2024-03-27 14:58:08 +00:00
Corentin Noël
437e0cb3cb zink: Removed unused function
zink_program_get_descriptor_usage is not used anywhere.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28412>
2024-03-27 14:33:36 +00:00
Eric Engestrom
8b707e0301 v3dv/ci: track regression
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28420>
2024-03-27 13:29:43 +00:00
Christian Gmeiner
dac3b9ac26 ci/etnaviv: Remove duplicates
cat src/etnaviv/ci/etnaviv-gc2000-flakes.txt | sed 's/[ \t]*$//' | sort | uniq -d

spec@arb_depth_texture@depth-level-clamp
spec@arb_depth_texture@fbo-depth-gl_depth_component24-blit
spec@arb_pixel_buffer_object@texsubimage-depth-formats pbo
spec@arb_texture_storage@texture-storage
spec@arb_texture_storage@texture-storage@2D mipmap rendering
spec@ext_packed_depth_stencil@fbo-depth-gl_depth24_stencil8-copypixels
spec@nv_copy_image@nv_copy_image-simple --tex-to-tex
spec@!opengl 1.1@depthstencil-default_fb-copypixels

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28416>
2024-03-27 13:12:16 +00:00
David Heidelberg
1ea357a7d7 ci/svga: add missed test and gl-rules include
Fixes: 54050d8844 ("svga/ci: land vmware mesa-ci lava farm")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28418>
2024-03-27 13:07:31 +01:00
Martin Krastev
3d348e632e svga/ci: workaround vmware farm's inability to use public DNS 8.8.8.8
This workaround is termporary and will be dropped once the
farm is moved to its permament location.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28261>
2024-03-27 10:30:23 +00:00
Martin Krastev
54050d8844 svga/ci: land vmware mesa-ci lava farm
* add vmware farm, jobs and local rules
* add qemu lava deploy and boot actions
* add vmware-qemu traces job for llvmpipe device, as manual
* add vmware-vmx piglit job for svga device, as automatic
* add llvmpipe device piglit skip/fail lists
* add svga to GALLIUM_DRIVERS in debian-testing job
* add svga device fails/skips/flakes lists
* switch KERNEL_REPO/FORCE_KERNEL_TAG to own fork

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28261>
2024-03-27 10:30:23 +00:00
Vlad Schiller
8dde690a5b pvr: Implement VK_KHR_index_type_uint8
This commit will also add a helper function to simplify the code

Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28361>
2024-03-27 10:09:42 +00:00
Boris Brezillon
d7517afa81 panvk: Make panvk_pipeline_layout per-gen
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
ea98467a2d panvk: Make panvk_queue per-gen
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
4253ad9999 panvk: Make panvk_pipeline per-gen
It's already per-gen, but DestroyPipeline() was defined globally.
Let's move this function to panvk_vX_pipeline.c so we can get
rid of panvk_pipeline.c.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
f912b075dd panvk: Make panvk_descriptor_set_layout per-gen
Forbid inclusion of panvk_descriptor_set_layout.h from non per-gen
compilation units.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
52abe6e921 panvk: Make panvk_descriptor_set per-gen
Merge panvk_descriptor_set.c and panvk_vX_descriptor_set.c.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
cc61d54489 panvk: Make panvk_shader per-gen
Move panvk_shader_destroy() to panvk_vX_shader.c so we can get rid
of panvk_shader.c.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
a790f77169 panvk: Make panvk_cmd_buffer per-gen
The command buffer state is going to be an object containing per-gen
descriptors. Instead of pretending we can have gen-agnostic helpers,
let's merge everything in panvk_vX_cmd_buffer.c, and make
panvk_cmd_buffer.h a per-gen file.

We will split this into sub-files (panvk_cmd_draw, panvk_cmd_desc, ...)
further down the road, so we can specialize only specific bits
(like descriptor tables, the way we issue draw/dispatch jobs, etc).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
18e03803a7 panvk: Make panvk_sampler a per-gen
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
9ff7971b16 panvk: Make panvk_image_view per-gen
This way we can use mali_xxx_packed structs for the descriptor
templates.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
4aeb7aa22f panvk: Make panvk_buffer_view per-gen
Use auto-generated mali_xx_packed structs for the descriptors and
make sure panvk_buffer_view.h is never included from a non per-gen
context.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
2de95773b9 panvk: Kill panvk_private.h
Explicitly include the headers we need in the various .{c,h} files and
remove panvk_private.h.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
fc69751abd panvk: Move panvk_wsi definitions to panvk_wsi.h
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
2a032600c6 panvk: Move the panvk_priv_bo logic to panvk_priv_bo.{c,h}
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
23c3edf3de panvk: Move the panvk_cmd_buffer definitions in panvk_cmd_buffer.h
While at it, merge panvk_vX_cmd_buffer.h into panvk_cmd_buffer.h.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
8157f51fae panvk: Move panvk_device definition to panvk_device.h
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
524e17664f panvk: Move panvk_meta definitions to panvk_meta.h
While at it, merge panvk_vX_meta.h into panvk_meta.h and stop including
panvk_meta_vX.h from panvk_private.h.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
ac34183ec3 panvk: Move the VkPhysicalDevice logic to panvk_physical_device.{c,h}
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
afdca26091 panvk: Move the VkInstance logic to panvk_instance.{c,h}
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
5b0ff2643f panvk: Make the device creation/destruction per-arch
This way we just have one place where we need to dispatch calls.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
a58268f6a9 panvk: Add a panvk_arch_dispatch_ret() variant
So we can dispatch calls to per-arch functions that return a value.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
01a6f128c1 panvk: Move VkQueue logic to panvk_[vX_]queue.{c,h}
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
afbac1af77 panvk: Move the VkCommandPool logic to panvk_cmd_pool.{c,h}
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
7bf8805e5a panvk: Move panvk_{draw,dispatch}_info definitions to panvk_vX_cmd_buffer.c
These structures are not used outside this file, there's no point
sharing them with others. This also allows us to use the
mali_invocation_packed object instead of declaring a u32 array that's
big enough to contain this descriptor.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
69525b7955 panvk: Kill panvk_[vX_]cs.{c,h}
Dispatch the helpers where they are used, or inline them when they
are simple.

The only helper that's shared by the command buffer and pipeline logic
is panvk_per_arch(emit_viewport)(), and we move it to the cmd_buffer
file for now. If there's more to share, we might want to create
panvk_graphics_state.{c,h} for those.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
18174d8665 panvk: Move shader related definitions to panvk_[vX_]shader.{c,h}
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
80947ae1d2 panvk: Move VkPipelineLayout logic to its own file
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
2da06e6628 panvk: Move VkDescriptorSetLayout logic to panvk_descriptor_set_layout.{c,h}
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
a944d7270b panvk: Move panvk_descriptor_{set,pool} definitions to panvk_descriptor_set.h
Along with the various SW-descriptor definitions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
4a16aaafb5 panvk: Move the VkEvent logic to panvk_event.{c,h}
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:34 +00:00
Boris Brezillon
adab7d3fcc panvk: Move VkImageView logic to its own source files
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:33 +00:00
Boris Brezillon
86a4978071 panvk: Move panvk_pipeline definition to panvk_pipeline.h
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:33 +00:00
Boris Brezillon
6b511f7564 panvk: Move the VkSampler logic to its own file
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:33 +00:00
Boris Brezillon
5a817bd62b panvk: Move the VkDeviceMemory logic to panvk_device_memory.{c,h}
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:33 +00:00
Boris Brezillon
09d3411ad8 panvk: Move the VkBufferView logic to its own file
Note that we make DestroyBufferView() a per-arch function even if
it's not strictly needed, but given the size of the function, not
sure it's worth having a extra panvk_buffer_view.c file.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:33 +00:00
Boris Brezillon
822478ec20 panvk: Move the VkBuffer logic to its own source file
This is an attempt at splitting the driver code into logical blocks
like NVK did.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:33 +00:00
Boris Brezillon
763fa8f45a panvk: Move image related definitions to panvk_image.{h,c}
Move GetImageMemoryRequirements2(), GetImageSparseMemoryRequirements2()
and BindImageMemory2() implementations to panvk_image.c, so we have all
image related functions where they belong, and create a panvk_image.h
header for the panvk_image struct definition.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:33 +00:00
Boris Brezillon
5b91e44309 panvk: Move some macros to panvk_macros.h
Any macro we might need and is not specific to a VkXxx object is put
in the panvk_macros.h file.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28170>
2024-03-27 09:47:33 +00:00
Samuel Pitoiset
6440abce3b radv: add radv_bo_virtual_bind() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:54:34 +01:00
Samuel Pitoiset
e715cf30dc radv/rmv: log allocated/destroyed BOs in radv_buffer_{create,destroy}()
This will likely log more things because a bunch of them were missing.
This will also allow us to implement
VK_EXT_device_address_binding_report more easily.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:54:34 +01:00
Samuel Pitoiset
9b4787ebc0 radv/rmv: prevent logging BOs allocated in GDS/OA domains
Looks like unsupported for now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:54:34 +01:00
Samuel Pitoiset
36f6a5b8ff radv: add radv_bo_{create,destroy}() helpers
This will allow us to easily log all BOs both for RMV and
VK_EXT_device_address_binding_report.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:54:23 +01:00
Samuel Pitoiset
0b1ab23130 radv/rmv: remove unnecessary is_internal parameter to some helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:52:50 +01:00
Samuel Pitoiset
f9105dea24 radv: make some create resources helpers static
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:52:50 +01:00
Samuel Pitoiset
e863880ffb radv/rmv: remove BO size parameter in radv_rmv_log_bo_allocate()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:52:50 +01:00
Samuel Pitoiset
c718b19f7b radv/winsys: move BO size to radeon_winsys_bo
This will allow us to read the value outside of the winsys, like VA.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:52:50 +01:00
Samuel Pitoiset
b7d21220e8 radv/rmv: fix logging sparse residency
The offset should be the sparse image/buffer offset.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:52:50 +01:00
Samuel Pitoiset
13ad10bd26 radv/rmv: fix logging of per-queue destroyed BOs
They should be logged before actually destroyed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:52:50 +01:00
Samuel Pitoiset
3f0e1aae87 radv/rmv: add missing logging when events are destroyed
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:52:50 +01:00
Samuel Pitoiset
d004c2e725 radv/rmv: add missing logging when sparse BOs are destroyed
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28367>
2024-03-27 08:52:50 +01:00
Yusuf Khan
71841afa5e crocus: fix potential null pointer dereference if transfer_mapping fails
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28355>
2024-03-27 05:24:19 +00:00
Kenneth Graunke
348506462a intel/brw: Stop checking mlen on math opcodes in CSE pass
These were only messages on Gfx4 which we no longer support here.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28067>
2024-03-27 04:52:17 +00:00
Kenneth Graunke
8441043161 anv, hasvk: Fix nir_lower_multiview to re-emit outputs before EmitVertex
In geometry shaders, calling EmitVertex() makes the contents of all
output variables undefined.  We need to rewrite our layer ID and view
index outputs before each EmitVertex() call; assuming they'll preserve
their values is undefined behavior.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28067>
2024-03-27 04:52:17 +00:00
Kenneth Graunke
0b3f78796d anv, hasvk: Move multiview remapping loop below output stores
This will help prepare for the next patch.  No functional changes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28067>
2024-03-27 04:52:17 +00:00
Kenneth Graunke
c831355d64 anv, hasvk: Save the original instance ID
Currently, build_view_index and build_instance_id emit load_instance_id
intrinsics, which want the instance ID coming into the program, which is
the true instance ID multiplied by the view count.

The loop also remaps any load_instance_id in the original program back
to the true instance ID, which is the one coming in divided by the view
count.  Because we call build_view_index and build_instance_id as part
of the loop, and emit the new load_instance_id instructions earlier in
the shader, we successfully avoid seeing those.

However, this is a bit fragile as it means you can't call
build_view_index or build_instance_id prior to the loop without
accidentally remapping things we don't intend to.  To fix this
fragility, we save off the original instance ID (including the view
count) and directly reference that.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28067>
2024-03-27 04:52:17 +00:00
Kenneth Graunke
a203722634 intel/brw: Delete brw_fs_lower_minmax
This is for old hardware and never called in brw.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28067>
2024-03-27 04:52:17 +00:00
Kenneth Graunke
e5a0f3b570 intel/brw: Allow changing types for LOAD_PAYLOAD with 1 source
This is equivalent to a MOV.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28067>
2024-03-27 04:52:17 +00:00
Kenneth Graunke
c0c05c1041 intel/brw: Fix destination stride assertion in copy propagation
We were asserting that entry->dst.offset % REG_SIZE == 0, which is
easily tripped by a simple LOAD_PAYLOAD that writes a 16-bit vec2:

    load_payload(8) vgrf1:UW, vgrf2+0.0:UW, vgrf3+0.0:UW

We create separate ACP entries corresponding to the values coming from
vgrf2 and vgrf3, with entry->dst set to the location within vgrf1 where
those sources get written to.  So the second entry will have offset 16,
which is not REG_SIZE aligned.

It looks like this assert was originally added back in 2014 (see commit
1728e74957) and adjusted through the ages,
including at a point when we combined reg and subreg offsets into a
single byte offset, and over time also extended copy propagation.

Here the destination offset is already accounted for via rel_offset,
at the byte offset level, so things ought to work and there is no need
to assert that this is the case.  Ian had already noted that the assert
tripped in commit e3f502e007, but checking
for inst->opcode == MOV here doesn't really make sense - it's just the
case that he found that broke.

Remove the erroneous assertion.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28067>
2024-03-27 04:52:17 +00:00
Kenneth Graunke
1cb9946228 intel/brw: Fix register coalescing's LOAD_PAYLOAD dst offset handling
We were discarding inst->dst.offset on LOAD_PAYLOAD instructions.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28067>
2024-03-27 04:52:17 +00:00
Kenneth Graunke
ba11127944 intel/brw: Fix opt_split_sends() to allow for FIXED_GRF send sources
opt_copy_propagation() can sometimes propagate FIXED_GRF sources into
SHADER_OPCODE_SENDs as the message payload.  For example, GS input
reads, which simply take a URB handle and have the offset in the
descriptor.  For non-VGRFs, there isn't a payload to split, so just
skip past such send messages.

Fixes: 589b03d02f ("intel/fs: Opportunistically split SEND message payloads")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28067>
2024-03-27 04:52:17 +00:00
Charlie Turner
9e3932e990 {vulkan,radv,anv}/video: fix issue in H264 scaling lists derivation
Originally was trying to copy a pps's scaling list when an sps's was
signaled.

Fixes: 8daa32963 ("vulkan/video: add helper to derive H264 scaling lists")

Signed-off-by: Charlie Turner <cturner@igalia.com>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28352>
2024-03-27 00:19:32 +00:00
Eric Engestrom
f36c0683a0 radv/ci: add a bunch of flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28405>
2024-03-26 21:33:31 +00:00
Eric Engestrom
b1007e0069 radv/ci: sort tahiti flakes
Makes it easier to add new ones.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28405>
2024-03-26 21:33:31 +00:00
Jan Beich
2b76284635 util: mimic KCMP_FILE via KERN_FILE on DragonFly and FreeBSD
Iterate over all file descriptors and compare their kernel addresses.

Reviewed-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Val Packett <val@packett.cool>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6881>
2024-03-26 20:53:36 +00:00
Jesse Natalie
e12b68aab5 microsoft/clc: Install clon12compiler
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26803>
2024-03-26 20:12:41 +00:00
Jesse Natalie
6e9b980b3f microsoft/clc: Adjust order of UAV binding assignment
All UAVs which can be accessed via pointer need to be grouped together
starting at base 0, because nir_to_dxil emits the globals array from
[0, size], where size is the input number of globals, as well as one
for each SSBO. Images need to come after that.

Theoretically, nir_to_dxil could emit 3 arrays:
1. Globals
2. Constants
3. Printf
But constants get converted to globals early on so that'd be pretty
tricky to actually detangle.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26803>
2024-03-26 20:12:41 +00:00
Jesse Natalie
b64f13e70f microsoft/clc: Add linkage capability to libclc build to silence warning
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26803>
2024-03-26 20:12:41 +00:00
Jesse Natalie
6468c6a80b clc: Move libclc helpers back to microsoft/clc
These were intended to be shared with (e.g.) rusticl, but they're
unused and I expect they will continue to be. The spirv options
are also hardcoded to be what CLOn12 expects.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26803>
2024-03-26 20:12:41 +00:00
Jesse Natalie
a6658e3dc6 microsoft/compiler: Simplify code emitting CL globals
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26803>
2024-03-26 20:12:41 +00:00
Jesse Natalie
1649a4d92b microsoft/clc: When possible, compute a part-constant "pointer" value for kernel inputs
When a kernel input is a pointer to global or constant memory, it's expected
that the invoker provides the pointer value in the form of
(buffer_index << 32) | offset. The buffer index, however, is statically
knowable in the compiler, as long as a buffer is bound. Since it's
undefined behavior to dereference the pointer with no buffer bound,
we can replace any deref chain that terminates in an access with one
that uses a constant buffer index.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26803>
2024-03-26 20:12:41 +00:00
Jesse Natalie
6fc8d0147e microsoft/compiler: Don't store static-indexing handles that are dynamically emitted
These handles can be emitted in control flow, which means that the handle
might be in a block which does not dominate a block that's processed
later on, which results in incorrect DXIL if we try to reference it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26803>
2024-03-26 20:12:41 +00:00
Jesse Natalie
108b205830 nir: Handle ptr_as_array for build_deref_follower
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26803>
2024-03-26 20:12:41 +00:00
Rob Clark
b5414e7166 freedreno/registers: Add license header
We want to copy this into the kernel to generate headers from xml at
build time, like we do in mesa.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28375>
2024-03-26 19:36:10 +00:00
Kenneth Graunke
0e7bb74a1a Revert "intel/brw: Don't consider UNIFORM_PULL_CONSTANT_LOAD a send-from-GRF"
This reverts commit 5814534de5.  It
apparently caused GPU hangs in Assassin's Creed: Valhalla, and it isn't
that critical of a patch, so let's just roll it back for now.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10894
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28390>
2024-03-26 18:58:20 +00:00
Valentine Burley
4311314891 docs: Update features.txt and new_features.txt for anv and nvk
Both of these drivers implement VK_KHR_shader_maximal_reconvergence.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28388>
2024-03-26 16:34:35 +00:00
Sil Vilerino
99f576979a d3d12: Implement PIPE_VIDEO_CAP_ENC_SURFACE_ALIGNMENT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28398>
2024-03-26 15:09:59 +00:00
Lionel Landwerlin
983b62ea50 anv: fix query clearing with blorp compute operations
If we did clear a query buffer in compute mode, the flushing needs to
match the engine used for clearing.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 6823ffe70e ("anv: try to keep the pipeline in GPGPU mode when buffer transfer ops")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28285>
2024-03-26 14:29:38 +00:00
Gert Wollny
b6c1390354 nir_to_spirv: Allow LOD for external images
External images translate to 2D images in ntv, so we will have to emit
OpImageQuerySizeLod instead of OpImageQuerySize (thanks Faith for
pointing that out). This quells

  VUID-VkShaderModuleCreateInfo-pCode-08737

  Image must have either 'MS'=1 or 'Sampled'=0 or 'Sampled'=2
     %32 = OpImageQuerySize %v2int %31

triggred by piglit

  spec@oes_egl_image_external_essl3@oes_egl_image_external_essl3

on Zink.

Fixes: 3f783a3c50
  zink: omit Lod image operand in ntv when not using an image texture dim

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28389>
2024-03-26 13:25:39 +00:00
Lionel Landwerlin
601d219257 anv: fix bitfield checks in gfx runtime flushing
s/SET/TEST/

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28387>
2024-03-26 12:59:37 +00:00
Lionel Landwerlin
341a9e9194 anv: fix temporary state pool allocation failures
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 82d772fa9b ("anv: create new helper for small allocations")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28387>
2024-03-26 12:59:37 +00:00
Lionel Landwerlin
0264fc688f anv: fix block pool allocation failure
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28387>
2024-03-26 12:59:37 +00:00
Lionel Landwerlin
58a91f6a8c anv: fix invalid border color free
The right one is a few lines below.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 44bf552704 ("anv: allocate border colors for descriptor buffers")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28387>
2024-03-26 12:59:37 +00:00
Lionel Landwerlin
1d7c38a5de blorp: handle a few allocation failure cases
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28387>
2024-03-26 12:59:37 +00:00
Danylo Piliaiev
0b5097081a freedreno/devices: Add A740v3 from Quest 3
Two known differences with a740 are:
- RB_DBG_ECO_CNTL being 1 on A740v3
- Concurrent binning is not used

We don't have concurrent binning implemented and it's unknown
how important is RB_DBG_ECO_CNTL diff. So for now A740v3 is aliased
to ordinary A740.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28380>
2024-03-26 12:22:08 +00:00
Danylo Piliaiev
8b8c739ccd tu: Emit non-draw-state state at the first draw call
If this state was emitted at the point of previous RP, which
could happen if pipeline is not set at the start of current RP,
we have to emit non-draw-state state since it would become stale
in the next tile.

Fixes test with stale reg dbg:
 dEQP-VK.transform_feedback.primitives_generated_query.get.queue_reset.32bit.tese.xfb.color_write_disable_static.patch_list.pgq_default_xfb_default.two_draws.pqg_first.none_2_queries

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28326>
2024-03-26 11:44:53 +00:00
Danylo Piliaiev
5acdb22ba2 tu: Update RP state depending on pipeline in first RP draw
The pipeline used in RP may have been bound in another RP, so
we have to save relevant state and re-apply it on first draw.

Fixes GPU hang in the following test with forced binning + reg stomping:
 dEQP-VK.transform_feedback.primitives_generated_query.get.queue_reset.32bit.tese.xfb.color_write_disable_static.patch_list.pgq_default_xfb_default.two_draws.pqg_first.none_2_queries

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28326>
2024-03-26 11:44:53 +00:00
Valentine Burley
a19c511818 docs: Update features.txt for tu
VK_EXT_post_depth_coverage was implemented in
f1305d49d9 ("tu: Implement VK_EXT_post_depth_coverage").

Additionally mark that certain extensions are supported from a650
onwards rather than exclusively on that generation in features.txt
to match the formatting that the other drivers use.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28236>
2024-03-26 11:08:21 +00:00
Valentine Burley
98ae874344 tu: Trivially expose three VK_GOOGLE extensions
This patch exposes support for the following three extensions:

* VK_GOOGLE_decorate_string
* VK_GOOGLE_hlsl_functionality1
* VK_GOOGLE_user_type

There's nothing for the driver to do; it's all handled in spirv_to_nir.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28236>
2024-03-26 11:08:20 +00:00
Valentine Burley
05b9e0dfed tu: Expose VK_KHR_surface_protected_capabilities
This is implemented in common code.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28236>
2024-03-26 11:08:20 +00:00
Boris Brezillon
3bac815c78 pan/bi: Update the push constant count when emitting load_push_constant
This is needed for panvk.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28175>
2024-03-26 11:10:44 +01:00
Boris Brezillon
d53e848936 pan/bi: Lower load_push_constant with dynamic indexing
Push constants are exposed as special registers on Bifrost/Valhall,
this means we can't index the push constant region with a dynamic
index. In order to support dynamic indexing, we need iterative CSELs
to select the right value from the access range.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28175>
2024-03-26 11:10:44 +01:00
Boris Brezillon
1a07685bf1 pan/bi: Lower push constant accesses
On Bifrost, push constants are exposed as 64-bit registers which can
be accessed at a 32-bit granularity. Make sure push constant accesses
are lowered to guarantee a 32-bit alignment.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28175>
2024-03-26 11:10:44 +01:00
Boris Brezillon
bb8379557e nir: Extend nir_lower_mem_access_bit_sizes() to support push constants
Mali GPUs have a 32-bit alignment constraint on push constants. Extend
nir_lower_mem_access_bit_sizes() so it can lower bit sizes on push
constant accesses.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28175>
2024-03-26 11:10:41 +01:00
Boris Brezillon
544f76dd13 nir: Extend nir_get_io_offset_src_number() to support load_push_constant
Will be needed to support push constants in
nir_lower_mem_access_bit_sizes().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28175>
2024-03-26 11:09:37 +01:00
Boris Brezillon
595d362d4b panvk: Implement dynamic rendering entry points
Implement dynamic rendering entry points so we can get rid of the
render pass logic.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28167>
2024-03-26 09:06:43 +00:00
Boris Brezillon
8cba497701 panfrost: Move the image attribute offset adjustment to a NIR pass
The gallium and vulkan drivers deal with vertex attribute emission
differently. The gallium driver re-emits the VS attributes on each
draw, while the vulkan driver uses explicit attribute/image
descriptor dirtiness tracking, and could keep the attribute array
around if a new pipeline using a different number of attribute is
bound. If we want to be able to do that, we need to assign a fixed
offset for image attributes, such that the Vulkan descriptor
lowering pass knows where the images are in the attribute table.

We could teach the Bifrost backend how to deal with a custom offset
but it doing that in a lowering pass also simplifies the Midgard
code.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28200>
2024-03-26 09:24:25 +01:00
Iago Toral Quiroga
7992d44b24 v3dv: fix image creation when exceeding maxResourceSize
Fixes crashes in tests like
dEQP-VK.pipeline.monolithic.render_to_image.core.2d_array.huge.width_height_layers.r8g8b8a8_unorm
with CTS main.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28364>
2024-03-26 07:23:56 +00:00
Faith Ekstrand
0d2c5999fd nak: Don't write undefined FS outputs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Faith Ekstrand
fb15a42357 nak: Simplify over-all I/O lowering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Faith Ekstrand
a1e8bba7fa nak: Drop lower_io_arrays_to_elements_no_indirects for FS outputs
All we really need is for them to have no indirects which we can ensure
via nir_lower_indirect_derefs.  Splitting into individual variables is a
relic of older attempts at FS output lowering and not needed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Faith Ekstrand
d4ac4ce112 nak/nir: Use nir_io_semantics for FS outputs
We also add a new nir_intrinsic_fs_out_nv to which is a lot simpler than
store_output to pass to the NAK back-end.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Faith Ekstrand
278eaa5ab1 nak: Call nir_lower_io_to_temporaries for FS outputs
They can't be indirected and we also need the guarantee that all output
writes are in the last block in the shader or else our back-end copying
is sketchy.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Faith Ekstrand
f46445a0f6 nak/nir: Clean up lower_fs_inputs a bit
There's no reason why every single case needs to have it's own instance
of setting the cursor and rewriting the instruction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Faith Ekstrand
2b9a836ee3 nak: Break lower_fs_inputs into its own file
While we're at it, make the pass handle layer_id and front_face

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Faith Ekstrand
bdb237a195 nak/nir: Use nir_io_semantics for varyings and attributes
This removes our reliance on driver_locaiton for varyings and attributes
by using nir_io_semantics instead.  This is probably better as NIR seems
to be trending this direction long-term.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Faith Ekstrand
3b967789f4 nak/nir: Emit nir_intrinsic_ipa_nv directly for FS system values
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Faith Ekstrand
668880c8c8 nak/nir: Add a load_fs_input hepler for flat inputs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Faith Ekstrand
0d5cea7d81 nak/nir: Rename load_interpolated_input
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Faith Ekstrand
9cce4e6364 nak/nir: Emit nir_intrinsic_ald_nv directly for system values
These are simple enough that running them through the lowering code
really isn't gaining us anything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28377>
2024-03-26 05:57:12 +00:00
Patrick Lerda
2b4095d086 r300: fix NIR passes regression
The pass "nir_opt_constant_folding" is definitely required.

For instance, this issue is triggered on a R430 with "piglit/bin/shader_runner generated_tests/spec/glsl-1.10/execution/variable-indexing/fs-varying-array-mat2-col-rd.shader_test -auto -fb":
shader_runner: ../src/compiler/nir/nir_lower_int_to_float.c:239: lower_alu_instr: Assertion `nir_alu_type_get_base_type(info->output_type) != nir_type_int && nir_alu_type_get_base_type(info->output_type) != nir_type_uint' failed.

Fixes: 092299f18a ("r300: remove some late NIR passes")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28365>
2024-03-26 05:35:31 +00:00
Mike Blumenkrantz
bf5d203f24 zink: set dynamic rendering color attachment layouts
this is otherwise broken for fbfetch

Fixes: 2ad0146179 ("zink: use KHR_dynamic_rendering_local_read")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28340>
2024-03-26 02:13:52 +00:00
Yusuf Khan
561fae6845 nvk: fix valve segfault from setting a descriptor set from NULL
Reported by Nikita Vilunov and fix found by him when analyzing his
CS2 dump.

cc: mesa-stable

v2: these two need to be zero when set == NULL

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10719
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28353>
2024-03-26 01:52:48 +00:00
Yiwei Zhang
1a475c70b2 venus: add a more relaxed polling strategy
The default vn_relax is mainly targeting Vulkan commands expecting a
rely like object creation and property queries. The defined relax reason
here is VN_RELAX_REASON_RING_SPACE. The polling strategy involves more
busy waits to overcome sleep penalty affecting cpu utilization, as well
as an edge case for Android system server which forces to sleep longer
even with trivial hrtimer interval.

However, for the below relax reasons:
- VN_RELAX_REASON_RING_SPACE
- VN_RELAX_REASON_FENCE
- VN_RELAX_REASON_SEMAPHORE
- VN_RELAX_REASON_QUERY

It's a waste of cpu cycles if we do more busy waits if the initial
polled signals are not "ready". Having less busy waits there allows to
jump to higher order of sleeps sooner to disturb the scheduler less
until signaled.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28287>
2024-03-26 00:37:24 +00:00
Yiwei Zhang
7dc2f62273 venus: decorate cmd enqueue macro internals with compiler hints
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28287>
2024-03-26 00:37:24 +00:00
Yiwei Zhang
0fa9950ef5 venus: deprecate unused perf env vars
So far there's no clear wins/losses from the non-default behavior of cmd
batching and base_sleep_us. Just drop those.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28287>
2024-03-26 00:37:24 +00:00
Yiwei Zhang
1e47ec2321 venus: avoid constant busy wait for query result waiting
Up to this commit in this MR, the gfxbench manhattan scores have been
improved by 10~15% with ANGLE-on-Venus on some AMD platforms.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28287>
2024-03-26 00:37:24 +00:00
Yiwei Zhang
88b64d14d8 venus: add enum vn_relax_reason
Better distinguish different client waiting and prepare for applying
different waiting profile for different reasons.

Default case is avoided in reason string mapping so that below can be
hit upon compilation:
- error: enumeration value ‘XXX’ not handled in switch [-Werror=switch]

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28287>
2024-03-26 00:37:24 +00:00
Yiwei Zhang
d05eb97408 venus: further reduce idle timeout from 5ms to 1ms
Similar to the rationale for the 50ms -> 5ms adjustment before. When
there's enough cpu cycles, doing so would only help reduce cpu
utilization. When cpu is mostly drained, less host side unnecessary
polling is favored by the scheduler. Also in the latter case, it'd be
the non-primary ring, so it doesn't hurt to idle out faster.

Besides the theory, there's no regression in popular benchmarks, but
only power wins. Making the idle timeout too small will lead to overhead
built up. e.g. From the initial notify to ring being waken up, it's
about 200us. The notify op is more expensive than ring thread doing a
few more polls. However, we normally would save many more polls by idle
out earlier. From my local testing, reducing down to 500us won't incur
and real perf regressions either.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28287>
2024-03-26 00:37:23 +00:00
Yiwei Zhang
30d7b3bdec venus: avoid excessive ring notifications
The ring notification can be blocked on renderer main thread if a vq cmd
is waiting for a ring cmd (via a different non-idle ring). This change
optimizes to only try waking up the ring on the idle timeout period.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28287>
2024-03-26 00:37:23 +00:00
Dylan Baker
c81b6e5d4c nvk: drop meson version check that is always true
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28381>
2024-03-25 20:48:17 +00:00
José Roberto de Souza
0113a2d4b3 intel/decoder: Fix binding table pointer entry being marked as invalid
If entry goes until the last byte of the bo it was being marked as
not valid while it is valid.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28376>
2024-03-25 20:27:06 +00:00
Rob Clark
787079e52a pps: Config tweaks to avoid loosing traces
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28058>
2024-03-25 19:49:50 +00:00
Rob Clark
e1e57ea287 pps: Enable memory traces
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28058>
2024-03-25 19:49:50 +00:00
Rob Clark
5154a0831e tu: Add perfetto memory tracing
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28058>
2024-03-25 19:49:50 +00:00
Rob Clark
9936e91808 freedreno/drm: Add perfetto memory tracing
The design of the perfetto memory event is a bit more vk specific, but
we can abuse it to get a breakdown of memory usage for various purposes.
The memory_type parameter is (ab)used to get buffer vs image memory
split out into it's own track/graph.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28058>
2024-03-25 19:49:50 +00:00
Rob Clark
a3fb2b07aa freedreno: Add bo usage hints
These hints aren't used for allocation, but will be used to
differentiate the purpose of an allocation in the next commit.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28058>
2024-03-25 19:49:50 +00:00
Rob Clark
db49237267 freedreno/pps: Don't re-init perfcntrs
init_perfcntr() can be called multiple times.  We don't want to
regenerate the list of counters (and overwrite/leak various other
things), so just bail if we've already initialized.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28058>
2024-03-25 19:49:50 +00:00
Jesse Natalie
8498371b65 ci/debian: Update DirectX-Headers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28339>
2024-03-25 19:11:35 +00:00
Jesse Natalie
ff802ca93b ci/windows: Update DirectX-Headers, Agility SDK, zlib, DXC, and WARP
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28339>
2024-03-25 19:11:35 +00:00
Jesse Natalie
267ae85a72 microsoft/compiler: Disable GS streams workaround for validator 1.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28339>
2024-03-25 19:11:35 +00:00
Jesse Natalie
811bed8a23 microsoft/compiler: domainLocation component index needs to be i8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28339>
2024-03-25 19:11:35 +00:00
Jesse Natalie
007b0fdff0 dzn: Initialize memoryTypeBits for querying properties on imported handles
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28339>
2024-03-25 19:11:35 +00:00
Jesse Natalie
5957778c16 dzn: Include vulkan_core.h instead of vulkan.h in the device enum header
Prevents pulling in X11 "None" define into the DXCore implementation,
which conflicts with updated DXCore headers.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10803
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28339>
2024-03-25 19:11:35 +00:00
Boris Brezillon
d9d6514fbc panvk: Disable global offset on varying and non-VS attribute descriptors
We are not supposed to apply the vertex index offset to our varying or
non-VS attribute (AKA image) descriptors. While at it, explicitly set
offset_enable to true when emitting vertex attribute descriptors, to
clarify our intentions.

Fixes: c0d6539827 ("panvk: Drop support for Midgard")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28182>
2024-03-25 18:30:47 +00:00
Faith Ekstrand
44cfc57062 nvk: Advertise VK_KHR_shader_subgroup_uniform_control_flow
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
79abb2aaff nvk: Advertise VK_KHR_shader_maximal_reconvergence
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
8b5e785d9e nak/nir: Use nir_lower_terminate_to_demote()
In NAK, halt turns int OpExit so this gives us exactly the same behavior
as before, just with the increased ability of NIR and our controlf-flow
lowering pass to reason about it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
cad080412d nak: Remove the old barriers pass
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
a510e858b1 nak: Use the new lowering pass on SM70+
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
4bf8d8bd51 nak: Handle unstructured NIR
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
b75dde0cc6 nak: Add helpers for emitting jumps
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
2938e7934b nak: Add NIR helpers for jump instructions
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
8e7f33818f nak: Add more NIR wrappers for walking the NIR CFG
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
9312356d99 nak/nir: Add a control-flow lowering pass
This pass lowers from NIR structured control-flow to unstructured
control-flow with sync instructions scattered throughout to ensure
uniform convergence.  Unlike the previous nak_nir_add_barriers() pass,
this one actually handles loop continues correctly.  The previous pass
had no plan for handling divergent early continues whereas this pass
should.  Also, the previous pass attempted to use barrier breaks in a
way that don't actually work because not all lanes involved in the
barrier were involved in the break.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
879c5c1dda nak: Add a condition to bar_break_nv
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
18c4c36ae2 nak: Move barrier removal into its own pass
This only thing that's really required here is uniform re-convergence so
it may as well be its own pass.

Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
4fcbf558dd nak: Add a copy_fs_outputs_nv intrinsic
This is just a little handle to tell the back-end where to do the copy.
Ideally, we'd have a NIR intrinsic that does the copy but we need to be
able to copy any number of registers up to 34 and NIR intrinsics just
aren't that flexible.

Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
75861c64b8 nir: Add a lower_terminate_to_demote pass
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
1bd9c1b958 nir: Mark divergent regs in phis_to_regs_block()
This way we avoid destroying divergence information which may be used by
passes which also need to lower phis.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
2be97717e6 nir/gather_types: Support unstructured control-flow
This fixes nir_print for unstructured control-flow.  It's safe to
backport just this patch because the worst case is that we don't set as
many types and not as much gets printed.

Fixes: 260a9167db ("nir/print: Improve NIR_PRINT=print_consts by using nir_gather_ssa_types()")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
3293248439 nir/repair_ssa: Support unstructured control-flow
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
42853b8115 nir/lower_reg: Support unstructured control-flow
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
bef0601d51 nir/lower_reg: Remove dead reg_decl intrinsics
For any reg we can lower, we remove it whenever we remove the last read
or write.  For regs that aren't used at all, however, there are no reads
or writes so there's nothing to trigger the removal.  Instead, we need
to do it in setup_reg.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
7576212c2c nir: Validate that unstructured blocks are in reverse PDFS order
Also update the comment on nir_block_unstructured_next()

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:49 +00:00
Faith Ekstrand
c859ea5783 nir: Add a sort_unstructured_blocks() helper
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:48 +00:00
Faith Ekstrand
a18a917237 nir: Improve the comment for nir_block::imm_dom
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:48 +00:00
Faith Ekstrand
a782809f81 nir/builder: Correctly handle decl_reg or undef as the first instruction
These are both handled by inserting them directly at the top of the
nir_function_impl.  However, if the cursor is already at the top, it
never gets updated so we end up inserting other stuff after the newly
inserted undef or decl_reg.  It's an odd edge case to be sure but I hit
it with my new NIR CF pass for NAK.

Fixes: 1be4c61c95 ("nir/builder: Add a helper for creating undefs")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:48 +00:00
Faith Ekstrand
b069151e62 nir/print: Inline print_ssa_use()
It has one caller.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:48 +00:00
Faith Ekstrand
ba8860301f nir: Take a nir_def in nir_goto_if()
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28300>
2024-03-25 15:55:48 +00:00
Samuel Pitoiset
76cd9388a1 zink/ci: enable RADV_PERFTEST=shader_object for NAVI10/VANGOGH
Mark arb_tessellation_shader-tes-gs-max-output as flake because
it passes with ESO but crashes with pipelines (existing failure).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28295>
2024-03-25 15:20:00 +00:00
Ruijing Dong
fecbb4177c radeonsi/vcn: update to use correct padding size.
Update padding size calculation to use cropping.
Original method could result in 0 padding, which
generated unnessary noise in the encoding result.

Cc: mesa-stable
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9196

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/28280>
2024-03-25 14:38:47 +00:00
Ruijing Dong
b24748a93a frontends/va: add surface alignment attribute
It is only taking effect in hevc encoding so far.

Cc: mesa-stable
Reviewed-By: Sil Vilerino <sivileri@microsoft.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/28280>
2024-03-25 14:38:46 +00:00
Ruijing Dong
7525d2242b radeonsi/vcn: add enc surface alignment caps
set [64x16] as the alignment for hevc
encoding surface.

Cc: mesa-stable
Reviewed-By: Sil Vilerino <sivileri@microsoft.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/28280>
2024-03-25 14:38:46 +00:00
Eric Engestrom
9be380c6da ci: simplify unnecessarily complex printf
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28344>
2024-03-25 13:04:15 +00:00
Eric Engestrom
ed45e373bf ci: convert the job start date into a timestamp only once
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28344>
2024-03-25 13:04:15 +00:00
Eric Engestrom
775eca9449 ci: deduplicate converting the current job runtime into %M:%S
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28344>
2024-03-25 13:04:15 +00:00
Danylo Piliaiev
bfd56a1fdd freedreno,tu/a7xx: Add PC_TESS_PARAM_SIZE and PC_TESS_FACTOR_SIZE
A750 adds explicit definition of PC_TESS_PARAM_SIZE and
PC_TESS_FACTOR_SIZE, probably in order to to correctly overlap execution
of several draws.

Note that blob adds a bit more space ({0x10, 0x20, 0x30, 0x40} bytes)
to PC_TESS_FACTOR_SIZE than we are, but the purpose of this additional
space is unknown.

Emitting these regs on whole A7XX seem to be fine - A740 doesn't
complain.

Fixes GPU faults in Witcher 3.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28210>
2024-03-25 12:27:07 +00:00
Samuel Pitoiset
328f74fb44 radv: make sure to disable NGG culling with TES when the FS stage is unknown
NGG culling depends on the number of FS input reads but this can be
unknown with GPL/ESO when VS/TES are compiled separately. While VS
has a prolog most of the time, TES might incorrectly enable NGG culling
because the number of FS inputs was considered to be zero. To fix that,
consider the number of FS input reads to be the maximum possible value
when the FS is unknown to implicitly disable NGG culling.

This fixes a bunch of tess related flakes with Zink/ESO/RADV on RDNA2.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28293>
2024-03-25 11:48:58 +00:00
Christian Gmeiner
3d3374a7a6 etnaviv: Do not set tex.amode for rounding
isaspec's encoding does not care about tex.amode for alu instructions.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
6b1456ccdb etnaviv: Remove isa.xml.h
We are using etnaviv.xml to describe our isa and generated all the
needed files.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
846d4988ce etnaviv: Switch to macros from isa.h
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
8e0f2c2539 etnaviv: Move swizzle related macros to scr/etnaviv
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
abe5bd35d0 etnaviv: Switch to isa_assemble_instruction(..)
Use isaspec to assemble our instructions.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
520886817e etnaviv: isa: Add isa_assemble_instruction(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
b216fd044b etnaviv: isa: Add encode support
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
3263d533d3 etnaviv: Set dst.use for MOVAR
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
8de9be6eb1 etnaviv: isa: Add rouding to etna_inst
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
feacc7239c etnaviv: isa: Make use of generated enums
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
36c826d7ec etnaviv: Move struct etna_inst to src/etnaviv
We will use struct etna_inst as starting point for our new assembler. The goal is
to do a smooth translation for the gallium driver.

Also apply clang-format rules and use SPDX license tag.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
59f9a54f36 etnaviv: Link against libetnaviv_encode
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
7a4e15fdff etnaviv: isa: Add an empty libetnaviv_encode
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:49 +00:00
Christian Gmeiner
76e1588ca8 etnaviv: isa: Generate opcode enum
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:49 +00:00
Christian Gmeiner
a0635f8f52 etnaviv: isa: Generate c header containing enums
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:49 +00:00
Christian Gmeiner
9cc8b12e8c etnaviv: isa: Add name attributes
Generate better names for enum values.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:49 +00:00
Daniel Schürmann
898fd9227a aco/spill: keep loop variables spilled during nested loops
Totals from 36 (0.05% of 79395) affected shaders: (GFX11)

Instrs: 2775993 -> 2781480 (+0.20%); split: -0.01%, +0.20%
CodeSize: 14184524 -> 14231956 (+0.33%); split: -0.01%, +0.34%
SpillSGPRs: 1441 -> 1207 (-16.24%)
SpillVGPRs: 477 -> 421 (-11.74%)
Scratch: 35840 -> 35072 (-2.14%)
Latency: 15559241 -> 15606047 (+0.30%); split: -0.01%, +0.31%
InvThroughput: 3787994 -> 3803749 (+0.42%); split: -0.02%, +0.44%
VClause: 76422 -> 76411 (-0.01%)
SClause: 55717 -> 55671 (-0.08%); split: -0.10%, +0.01%
Copies: 214877 -> 215185 (+0.14%); split: -0.04%, +0.18%
Branches: 93158 -> 93129 (-0.03%); split: -0.03%, +0.00%
VALU: 1520556 -> 1525425 (+0.32%); split: -0.00%, +0.32%
SALU: 341104 -> 341408 (+0.09%); split: -0.02%, +0.11%
VMEM: 119673 -> 119617 (-0.05%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
80bc658efc aco/spill: select more loop-carried variables to be spilled
This changes the heuristic to also spill live-through variables
if they are used within the loop if the register pressure is too high.

Totals from 68 (0.09% of 79395) affected shaders: (GFX11)

Instrs: 3385477 -> 3386659 (+0.03%); split: -0.11%, +0.14%
CodeSize: 17329668 -> 17353796 (+0.14%); split: -0.12%, +0.26%
SpillSGPRs: 4246 -> 3659 (-13.82%); split: -17.12%, +3.30%
SpillVGPRs: 978 -> 884 (-9.61%); split: -10.02%, +0.41%
Scratch: 58880 -> 59648 (+1.30%)
Latency: 20567445 -> 20753412 (+0.90%); split: -0.08%, +0.98%
InvThroughput: 5091128 -> 5188098 (+1.90%); split: -0.07%, +1.97%
VClause: 90446 -> 90499 (+0.06%); split: -0.05%, +0.11%
SClause: 68270 -> 68072 (-0.29%); split: -0.35%, +0.06%
Copies: 280689 -> 278003 (-0.96%); split: -1.08%, +0.12%
Branches: 112577 -> 112608 (+0.03%); split: -0.10%, +0.13%
VALU: 1863415 -> 1866878 (+0.19%); split: -0.07%, +0.26%
SALU: 415572 -> 413062 (-0.60%); split: -0.63%, +0.03%
VMEM: 140890 -> 141045 (+0.11%); split: -0.04%, +0.15%
VOPD: 650 -> 670 (+3.08%); split: +3.54%, -0.46%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
31f6aebb2c aco/spill: keep loop-carried variables spilled at merge blocks
If loop-carried variables are partially spilled at some predecessor,
keep them spilled without extra instruction.

Also slightly refactors the code for better readability.

Totals from 13 (0.02% of 79395) affected shaders: (GFX11)

Instrs: 259129 -> 258194 (-0.36%)
CodeSize: 1337604 -> 1331768 (-0.44%)
SpillSGPRs: 561 -> 560 (-0.18%)
SpillVGPRs: 146 -> 140 (-4.11%)
Latency: 2410886 -> 2408560 (-0.10%)
InvThroughput: 759229 -> 758416 (-0.11%)
VClause: 4178 -> 4154 (-0.57%)
SClause: 7217 -> 7219 (+0.03%)
Copies: 32411 -> 32174 (-0.73%)
Branches: 9426 -> 9296 (-1.38%)
VALU: 144602 -> 144098 (-0.35%)
SALU: 30582 -> 30405 (-0.58%)
VMEM: 6961 -> 6908 (-0.76%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
971407bd2f aco/spill: keep loop-carried variables spilled at loop headers
Now, that we avoid re-spilling loop-carried variables, we can
keep them spilled at loop-headers.

Totals from 31 (0.04% of 79395) affected shaders: (GFX11)

Instrs: 1539175 -> 1538109 (-0.07%); split: -0.14%, +0.07%
CodeSize: 7877948 -> 7871916 (-0.08%); split: -0.16%, +0.08%
SpillSGPRs: 1936 -> 1523 (-21.33%)
SpillVGPRs: 160 -> 146 (-8.75%)
Scratch: 18176 -> 16896 (-7.04%)
Latency: 9439964 -> 9441197 (+0.01%); split: -0.01%, +0.02%
InvThroughput: 2406253 -> 2406700 (+0.02%); split: -0.01%, +0.03%
VClause: 38903 -> 38922 (+0.05%)
SClause: 33347 -> 33349 (+0.01%); split: -0.01%, +0.02%
Copies: 131420 -> 130974 (-0.34%); split: -0.57%, +0.23%
Branches: 53091 -> 53212 (+0.23%); split: -0.03%, +0.26%
VALU: 844372 -> 843876 (-0.06%); split: -0.12%, +0.06%
SALU: 190329 -> 189891 (-0.23%); split: -0.40%, +0.17%
VMEM: 60491 -> 60510 (+0.03%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
e968a18652 aco/spill: avoid re-spilling loop-carried variables in add_coupling_code()
These variables only need to be spilled once at the loop-preheader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
7726b92707 aco/spill: avoid re-spilling loop-carried variables in process_block()
If a variable is spilled at the loop-header of the current loop,
there is no need to spill it redundantly. Instead, re-use the
spill-slot from the loop-header.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
bb3b6a5ff3 aco/spill: add interferences with variables spilled at loop headers
We will re-use the spill slots rather than re-spilling the variables.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
09c5414760 aco/spill: don't prefer to spill phis at merge blocks
Totals from 44 (0.06% of 79242) affected shaders: (GFX11)

Instrs: 165578 -> 165545 (-0.02%); split: -0.08%, +0.06%
CodeSize: 833528 -> 832988 (-0.06%); split: -0.11%, +0.04%
SpillSGPRs: 346 -> 329 (-4.91%)
Latency: 1176341 -> 1176231 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 235771 -> 235761 (-0.00%); split: -0.01%, +0.01%
SClause: 3287 -> 3289 (+0.06%); split: -0.21%, +0.27%
Copies: 16290 -> 16299 (+0.06%); split: -0.62%, +0.68%
Branches: 3633 -> 3641 (+0.22%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
d234f789b5 aco/spill: keep live-out variables spilled at branch blocks
There is no reason to reload early. Leave scheduling to the scheduler.

Totals from 98 (0.12% of 79242) affected shaders: (GFX11)

Instrs: 841944 -> 841995 (+0.01%); split: -0.02%, +0.03%
CodeSize: 4354332 -> 4354544 (+0.00%); split: -0.02%, +0.02%
SpillSGPRs: 2557 -> 2554 (-0.12%)
Latency: 5772080 -> 5772209 (+0.00%); split: -0.00%, +0.01%
InvThroughput: 1694834 -> 1694873 (+0.00%); split: -0.00%, +0.00%
SClause: 16036 -> 16042 (+0.04%); split: -0.07%, +0.11%
Copies: 85117 -> 85125 (+0.01%); split: -0.18%, +0.19%
Branches: 25222 -> 25219 (-0.01%); split: -0.02%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
32882d647e aco/spill: refactor adding spilled vars into separate function add_to_spills()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
a5e8f9f879 aco/spill: add spills_entry interferences only when necessary
For variables which are already spilled in previous blocks,
the interferences already exist.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
1a1d6aef56 aco/spill: don't allocate extra spill_id for phi operands in add_coupling_code()
We can re-use the phi definition's spill_id.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:20 +00:00
Daniel Schürmann
b1468fc952 aco/spill: refactor SSA repairing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27774>
2024-03-25 09:21:19 +00:00
Samuel Pitoiset
585b4c5a01 radv: invalidate L2 metadata for VK_ACCESS_2_MEMORY_READ_BIT
When shaders might read metadata (DCC) this must be flushed.
VK_ACCESS_2_MEMORY_READ_BIT includes all READ bits that are relevant.

I think this issue has been uncoverd since vkd3d-proton d1425ee4
("vkd3d: Use VK_ACCESS_MEMORY_{READ,WRITE}_BIT where appropriate")
because RADV used to be missing VK_ACCESS_2_MEMORY_{READ,WRITE} in the
past and vkd3d-proton added a special workaround that has been removed.

This fixes some DCC corruption in WWE 2K24.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10774
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28332>
2024-03-25 07:27:46 +00:00
Dave Airlie
4fc2ab43c0 radv/video: fix h265 decode with unaligned w/h
This is similiar to the h264 fix done previously.

Fixes decoding with the nvpro samples app and a test video.

Fixes: db62c38091 ("radv: add vcn h265 decode.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28359>
2024-03-25 05:51:43 +00:00
Yusuf Khan
dcc2e596c1 nvk: remove some dead code files
Dead beef.

Fixes: 813b253939

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28354>
2024-03-25 03:23:11 +00:00
Alan Liu
f351e4be11 radeonsi/vpe: support vpe 1.1
update radeonsi and vpelib to support vpe 1.1

Co-authored-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Peyton Lee <peytolee@amd.com>
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28239>
2024-03-25 00:59:02 +00:00
Eric Engestrom
c73c244a6c ci/deqp-runner: print deqp-gles version log as well
Fixes: 78ea3bb43d ("ci/deqp: use the proper gl/gles releases for deqp-gl*, deqp-gles*, deqp-egl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28356>
2024-03-24 23:23:44 +00:00
Eric Engestrom
14279087fb ci/deqp-runner: split gl & gles groups to use the correct binary
Now that these can come from different releases, with different sets of
patches backported to them, it matters that we use the correct one.

Fixes: 78ea3bb43d ("ci/deqp: use the proper gl/gles releases for deqp-gl*, deqp-gles*, deqp-egl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28343>
2024-03-24 22:14:06 +00:00
Eric Engestrom
9bbbe90f06 ci: enable MESA_VK_ABORT_ON_DEVICE_LOSS globally
This makes all vulkan drivers abort on DEVICE_LOST, which is better than
the current error in deqp-runner because deqp has added a new DeviceLost
test status but deqp-runner doesn't understand it yet (the next release
will though), breaking jobs when this happens.

Disable it on zink for now, as EGL test intentionally cause this in some
tests and we don't want them to start crashing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28320>
2024-03-24 21:20:55 +00:00
Eric Engestrom
197e3f7109 v3dv/ci: assume list of dEQP-VK.wsi.*.maintenance1.present_modes.* flakes is the same between xcb & xlib and between rpi4 & rpi5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28351>
2024-03-24 20:10:42 +00:00
Eric Engestrom
a856d30b72 v3dv/ci: add more flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28351>
2024-03-24 20:08:06 +00:00
Eric Engestrom
7156575dcb v3dv/ci: assume dEQP-VK.wsi.wayland.swapchain.simulate_oom.* have been fixed
We'll add them back if it turns out 1900617baf was not enough to fix them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28351>
2024-03-24 20:08:06 +00:00
Lucas Fryzek
912e203a53 drisw: clamp damage region to texture bounds
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28242>
2024-03-24 17:27:22 +00:00
Lucas Fryzek
85a91f461c drisw/winsys: Flip y coordinate when creating pipe boxes
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28242>
2024-03-24 17:27:21 +00:00
Lucas Fryzek
b3680c92a1 egl/wayland/sw: don't invert y wl_surface_damage_buffer
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28242>
2024-03-24 17:27:21 +00:00
Jesse Natalie
d82ff37ed0 nir_tests: Add /bigobj when compiling with MSVC
Otherwise the opt_varying tests fail to compile

Fixes: 6dbd1dcd ("nir/tests: add tests for nir_opt_varyings")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28345>
2024-03-24 15:50:18 +00:00
Paulo Zanoni
72e1e6e120 driconf/anv: set fp64_workaround_enabled to DIRT 5
Otherwise the game refuses to launch. With it, it's playable on my
DG2.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9882
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28213>
2024-03-23 17:01:17 +00:00
Paulo Zanoni
460bacc223 anv: set shaderFloat64 to true when fp64_workaround_enabled
According to 00-mesa-defaults.conf, the only game that seems to care
about fp64_workaround_enabled right now is Doom Eternal. After some
brief testing I couldn't spot any performance difference by setting
shaderFloat64 to true.

We want to set this to true so that DIRT 5 can work, as it looks at
shaderFloat64 and then refuses to launch today.

Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9882
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28213>
2024-03-23 17:01:17 +00:00
Eric Engestrom
cc5e7f8b9b ci: fix shader-db job existence condition
Without this, the job always exists but it depends on things that don't
always exist, leading to errors like this one
(https://gitlab.freedesktop.org/sixtyfourktec/mesa/-/pipelines/1133679):
```
'shader-db' job needs 'debian-build-testing' job, but 'debian-build-testing' is not in any previous stage
```

Fixes: 3983ae89e9 ("Split debian-build-testing job")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28334>
2024-03-23 07:17:25 +00:00
Ian Romanick
b835784dde intel/brw: Remove last vestiges of could_coissue
Most of the obvious bits were removed by 7ac5696157 ("intel/brw: Remove
Gfx8- code from backend passes").

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/28342>
2024-03-23 01:29:22 +00:00
Marek Olšák
60231e6d6f nir/validate: validate more fields of nir_io_semantics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28312>
2024-03-22 22:39:50 +00:00
Marek Olšák
2034cf87c5 nir/lower_io: add nir_io_semantics::interp_explicit_strict
This preserves the misnamed "per_vertex" flag in lowered IO.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28312>
2024-03-22 22:39:50 +00:00
Marek Olšák
f02678bb50 nir/validate: validate interp_mode of load_barycentric_*
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28312>
2024-03-22 22:39:50 +00:00
Marek Olšák
4ae952506d radeonsi: implement the shader debug log from ac_nir_store_debug_log_amd
This can be used to print values directly from shaders using
ac_nir_store_debug_log_amd.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Marek Olšák
a60b9eb17c ac/llvm: remove remnants of gfx10 NGG streamout
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Marek Olšák
7c25243f86 aco: add a helper printing shader asm by disassembling via LLVM
ACO uses the LLVM disassembler. It was used to verify that manually-written
inline assembly code is correct.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Marek Olšák
df6fe90926 aco: implement aco_is_gpu_supported using switch statement
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Marek Olšák
1585a5cc6d nir,amd: add nir_intrinsic_load_debug_log_desc_amd and its use
for shader debugging

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Marek Olšák
6773595ed0 nir: rename AMD XFB intrinsics to *_gfx11_amd
to indicate it's only for gfx11.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27952>
2024-03-22 21:58:02 +00:00
Benjamin Tissoires
311f32caad CI: add a test for checking the validity of .mr-label-maker.yml
Just run a dry-run of mr-label-maker on the current MR is sufficient
to find out bugs

Requires https://gitlab.freedesktop.org/freedesktop/mr-label-maker/-/merge_requests/37

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28331>
2024-03-22 21:19:28 +00:00
Benjamin Tissoires
bf7cb69027 .mr-label-maker.yml: fix wrong label
~"feature_request" doesn't exists, ~"feature request" does :(

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28331>
2024-03-22 21:19:28 +00:00
Dmitry Baryshkov
b8ffa9f956 freedreno/rnn: drop custom aprintf function
Replace custom apritnf() function with the existing asprintf(), which is
already widely used by rnn.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:06 +00:00
Dmitry Baryshkov
8c95eada0d freedreno/rnn: drop headergen2
The headergen2 tool is no longer used by the freedreno driver, drop it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7978
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:06 +00:00
Dmitry Baryshkov
ec61c49f26 freedreno/registers: drop unsupported features from schema
Drop the features from original rules-ng schema that are not supported
by the gen_header.py script.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:06 +00:00
Dmitry Baryshkov
639488f924 freedreno/registers: limit the rules schema
The gen_headers.py supports only a limited set of original rules-ng.xsd
schema. At the same time it added support for additional attributes, not
covered by the original Nouveau schema. Rename the schema file.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:06 +00:00
Dmitry Baryshkov
12f32ff864 freedreno/registers: support processing display display headers
Add missing features to gen_headers.py script in order to support MDP /
DSI / HDMI headers. This includes nested array declarations, offsets /
doffsets attributes support and using enums for array indexing.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7978
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:06 +00:00
Dmitry Baryshkov
f50da71198 freedreno/registers: fix WB doffsets array in mdp5.xml
In mdp5.xml the doffsets attribute of the WB array contains one extra
comma, resulting in one empty entry in __offset_WB(). Fix that now.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:05 +00:00
Dmitry Baryshkov
7f2af6841b freedreno/registers: inline mdp4_csc group
The gen_headers.py script doesn't support and is not going to support
group declarations. Inline the only user of group / use-group
definitions, mdp4_csc.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:05 +00:00
Dmitry Baryshkov
a3d8acc875 freedreno/registers: add missing copyright imports
Import copyright into all files so that it is included into the
generated headers.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:05 +00:00
Dmitry Baryshkov
bf89f777f8 freedreno/registers: fix generation dependencies
The rules-ng.xsd is not a registers XML file, don't pass it to
gen_header.py. Instead declare rules-ng.xsd and freedreno_copyright.xml
as inputs to the gen_header.py, so that the headers are regenerated if
schema or copyright file changes.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28193>
2024-03-22 19:30:05 +00:00
Samuel Pitoiset
2ab3a5a0f7 zink/ci: allow RADV_PERFTEST=shader_object on NAVI31
NAVI10/VANGOGH are waiting for another fix related to NGG culling
for passing CI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28338>
2024-03-22 19:05:41 +00:00
Yonggang Luo
1d18aba016 meson: Remove the non-used -DDEBUG manually
And also remove the workarounds for LLVM and bellagio

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
2024-03-22 18:22:34 +00:00
Yonggang Luo
1ac1c0843f treewide: Replace usage of macro DEBUG with MESA_DEBUG when possible
This is achieved by the following steps:

#ifndef DEBUG => #if !MESA_DEBUG
defined(DEBUG) => MESA_DEBUG
#ifdef DEBUG => #if MESA_DEBUG

This is done by replace in vscode

excludes
docs,*.rs,addrlib,src/imgui,*.sh,src/intel/vulkan/grl/gpu

These are safe because those files should keep DEBUG macro is already excluded;
and not directly replace DEBUG, as we have some symbols around it.

Use debug or NDEBUG instead of DEBUG in comments when proper

This for reduce the usage of DEBUG,
so it's easier migrating to MESA_DEBUG

These are found when migrating DEBUG to MESA_DEBUG,
these are all comment update, so it's safe

Replace comment /* DEBUG */ and /* !DEBUG */ with proper /* MESA_DEBUG */ or /* !MESA_DEBUG */ manually

DEBUG || !NDEBUG -> MESA_DEBUG || !NDEBUG
!DEBUG && NDEBUG -> !(MESA_DEBUG || !NDEBUG)

Replace the DEBUG present in comment with proper new MESA_DEBUG manually

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
2024-03-22 18:22:34 +00:00
Yonggang Luo
0578f13fc9 meson: Define MESA_DEBUG for latter usage
rationale:
DEBUG is easily conflict with third-party headers, for example LLVM https://github.com/llvm/llvm-project/issues/24002#issuecomment-1673922017
And amdcommon's addrlib

And according to https://github.com/llvm/llvm-project/issues/24002#issuecomment-1673922017
LLVM is already switched to LLVM_DEBUG, I think it's time for mesa switch to MESA_DEBUG for #ifdef DEBUG.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
2024-03-22 18:22:34 +00:00
Yonggang Luo
5d3ce49e76 meson: Extract with_mesa_debug and with_mesa_ndebug for latter usage
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
2024-03-22 18:22:33 +00:00
Matthew Waters
cf8f894921 teximage: allow glCopyTex{Sub}Image[123]D into R/RG textures with OpenGL ES 2.0
This is explicitly allowed in the GL_EXT_texture_rg extension.

Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28313>
2024-03-22 17:04:55 +00:00
Jesse Natalie
63366781aa wgl: Check for null before dereferencing ctx in swap
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28211>
2024-03-22 16:40:08 +00:00
Jesse Natalie
df638c023d wgl: Delete unused context param to swap
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28211>
2024-03-22 16:40:08 +00:00
Samuel Pitoiset
f729fe50e5 radv: trigger a new PS epilog when the framebuffer is dirty with ESO
When a new framebuffer is used, the color output formats might have
changed and a new PS epilog might need to be recompiled. This shouldn't
affect graphics pipeline because color output formats must already match.

This fixes a couple of failures/flakes like
spec@ext_framebuffer_multisample@fast-clear with Zink and shader object.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28294>
2024-03-22 15:08:23 +00:00
Samuel Pitoiset
53ec57d42d radv: always export MRTZ in FS epilogs with ESO on GFX11
Alpha to coverage is special on RDNA3 and it needs to be emitted
through MRTZ in some situations. Because we can't know this at compile
time when everything is dynamic, we have to always emit MRTZ in PS
epilogs.

This fixes remaining failures on NAVI31 with Zink/ESO/RADV like
spec@ext_packed_depth_stencil@fbo-depthstencil-gl_depth24_stencil8-drawpixels-float-and-ushort.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28297>
2024-03-22 14:42:21 +00:00
Hans-Kristian Arntzen
1900617baf wsi/wayland: Init outstanding list earlier.
Fixes a crash if swapchain free is called before the list is
initialized. This only happens when swapchain init fails, so
it is highly unlikely to happen in practical scenarios.

Fixes dEQP-VK.wsi.wayland.swapchain.simulate_oom.min_image_count.

Fixes: 0d51cd4808 ("wsi/wl: Improve fallback for present_wait.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10866

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Tested-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28325>
2024-03-22 14:02:26 +00:00
duncan.hopkins
2743adac7f zink/apple: update docs to reflect the current status of Zink on macOS.
Adds extra information to the "Notes for macOS" and "Zink" documentation pages to:
1) Better describe how to build on macOS
2) Temper expectations on running Zink on macOSx

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

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28330>
2024-03-22 11:56:01 +00:00
duncan.hopkins
f75750f740 zink/apple: added moltenvk-dir search to allow MoltenVK to be sourced from brew.
The file layout in the brew obtained molten-vk package is differnt again to the VulkanSDK or MoltenVK packages.
Added an extra sub-directory location search from the `moltenvk-dir` build option.

This allows for the following to be used `-Dmoltenvk-dir=$(brew --prefix molten-vk)`.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28330>
2024-03-22 11:56:01 +00:00
Thomas H.P. Andersen
5532f13566 driconf: override vendor id for X4 Foundations on NVK
The game will refuse to start if the driver version is tool old.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27784>
2024-03-22 11:18:55 +00:00
Thomas H.P. Andersen
03d72c4ef1 nvk: support driconf option force_vk_vendor
Some games match on the vendor ID and then check if the driver version
is at least a specific version. Some games just warn about the "old" driver
version. Others refuse to start.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27784>
2024-03-22 11:18:55 +00:00
Eric Engestrom
951aa2fa82 v3dv/ci: add other flakes seen during nightly run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28333>
2024-03-22 10:58:35 +00:00
Eric Engestrom
423e85caf5 v3dv/ci: mark the dEQP-VK.wsi.*.maintenance1.deferred_alloc.* flakes seen so far as happening on all platforms
Not all of these have flaked on all platforms yet, but enough that it's
safer to just consider that alloc issues might not be platform-specific.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28333>
2024-03-22 10:58:35 +00:00
Eric Engestrom
648490f7ce vc4/ci: add another spec@arb_vertex_buffer_object@vbo-subdata-many draw flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28333>
2024-03-22 10:58:35 +00:00
Eric Engestrom
5f2915e8ee vc4/ci: add another spec@!opengl 1.1@depthstencil-default_fb-drawpixels flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28333>
2024-03-22 10:58:35 +00:00
Eric Engestrom
fa0f834453 v3d/ci: mark spec@ext_framebuffer_blit@fbo-blit-check-limits as fixed
It looks like it has been fixed for many drivers yesterday, but
apparently not vc4.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28333>
2024-03-22 10:58:35 +00:00
Rhys Perry
588b1ce533 aco: split instruction assembly into functions
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27913>
2024-03-22 10:29:43 +00:00
Rhys Perry
5651aa7644 aco/gfx11: fix scratch ST mode assembly
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27913>
2024-03-22 10:29:43 +00:00
Rhys Perry
cdcc856cbf aco: unify MIMG opcode lists
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27913>
2024-03-22 10:29:43 +00:00
Rhys Perry
20b14381c4 aco: move dot/wmma instructions into VOP3P list
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27913>
2024-03-22 10:29:43 +00:00
Rhys Perry
6bfd3dc39f aco: use op()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27913>
2024-03-22 10:29:43 +00:00
Rhys Perry
a806e48982 aco: use single tuple for all opcode numbers
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27913>
2024-03-22 10:29:43 +00:00
Rhys Perry
5864c22fb7 aco: refactor VOPC opcode list
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27913>
2024-03-22 10:29:43 +00:00
Rhys Perry
d23f8b0dcf aco: rename opcode->instruction
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27913>
2024-03-22 10:29:43 +00:00
Rhys Perry
b723a15bd0 aco: fix GFX6 buffer_load_dwordx4 opcode number
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27913>
2024-03-22 10:29:43 +00:00
David Heidelberg
cb17a936e0 ci/r300: implement rules for d3d9 testing
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Suggested-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28305>
2024-03-22 10:38:04 +01:00
Pierre-Eric Pelloux-Prayer
9c909aefc4 amd: fix addrlib regression
This reverts only a small chunk of e01266335b because this
change caused this piglit test to page fault:

   nv_copy_image-formats --samples=8 GL_RGB32UI

Fixes: e01266335b ("amd: update addrlib")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28268>
2024-03-22 08:25:21 +00:00
Pierre-Eric Pelloux-Prayer
53f9cdac9b radeonsi: preserve alpha if needed in kill_ps_outputs_cb
Some features (eg: ALPHA_TEST) relies on the alpha value being
exported even if color_mask.a = false.

In these cases, override comp_mask to preserve the alpha value.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10841
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10845
Fixes: 6d2a7f53 ("radeonsi: decrease NUM_INTERP if export formats/colormask eliminated PS inputs")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28268>
2024-03-22 08:25:21 +00:00
Mark Janes
4acea392af intel/compiler: drop unused ray-tracing fields from cache hash
The compiler only references `intel_device_info->subslice_masks` for
ray tracing workloads.  Platforms which lack raytracing support can
share a cache even if they differ on this field.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28311>
2024-03-22 00:01:28 +00:00
Kenneth Graunke
9a72116367 intel/brw: Unify DF and Q/UQ lowering for MOV
Using the new unsupported_64bit_type helper.

Fixes: ea423aba1b ("intel/brw: Split out 64-bit lowering from algebraic optimizations")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28328>
2024-03-21 23:25:56 +00:00
Kenneth Graunke
97c7d5113d intel/brw: Use correct execution pipe for lowering SEL on DF
This is a float operation, let's keep it on the float pipe.

Fixes: ea423aba1b ("intel/brw: Split out 64-bit lowering from algebraic optimizations")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28328>
2024-03-21 23:25:56 +00:00
Kenneth Graunke
26d65e96dd intel/brw: Assert that min/max are not happening in 64-bit SEL lowering
These aren't handled, only pure selects.

Fixes: ea423aba1b ("intel/brw: Split out 64-bit lowering from algebraic optimizations")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28328>
2024-03-21 23:25:56 +00:00
Kenneth Graunke
a2c2a7bc00 intel/brw: Fix check for 64-bit SEL lowering types
The 64-bit type lowering for SEL in opt_algebraic had a pre-existing bug
where it only triggered when 64-bit float _and_ integer types were
unsupported.  Meteorlake supports 64-bit float but not integer, so we
need to lower Q/UQ in that case still.

When I moved this to a later pass, opt_peephole_sel started generating
Q/UQ SEL instructions which were failing to be lowered.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10867
Fixes: ea423aba1b ("intel/brw: Split out 64-bit lowering from algebraic optimizations")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28328>
2024-03-21 23:25:56 +00:00
Dylan Baker
75ede9d9bc intel/brw: track last successful pass and leave the loop early
This is similar to what RADV implements using the NIR_LOOP_PASS
helpers. I have not used those helpers for a couple of reasons:

 1. They use the pointer to the optimization function, which doesn't
    work if the same function is called multiple times in one invocation
    of the loop (fixable)
 2. After fixing them, due to Intel's use of sub-expressions, the amount
    of code added to wrap the shared macro becomes more than simply
    reimplementing them for the Intel compiler

On most workloads the results are a wash, but on compile heavy
workloads like Cyberpunk 2077 and Rise of the Tomb Raider, I saw
fossil-db runtimes fall by 1-2% on my ICL, with no changes to the
compiled shaders. Caio saw closer to 2.5% on TGL.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27510>
2024-03-21 23:02:32 +00:00
Caio Oliveira
b2ee98d2db intel/brw: Handle Xe2 in brw_fs_opt_zero_samples
The mlen tracking is in REG_SIZE units, but in Xe2 each GRF has
doubled the size.  The optimization can only elide full GRFs, so
round down the amount of trailing zeros to ensure the optimization
will remove only full GRFs.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28279>
2024-03-21 22:38:54 +00:00
Ian Romanick
cd70e49394 intel/brw: Allow SIMD16 F and HF type conversion moves
On DG2, the lowering generated for these MOV instructions is
**awful**. The original SIMD16 MOV

    { 18}   67: mov(16) vgrf54+0.0:HF, vgrf46+0.0:F NoMask group0

is lowered to SIMD8 MOVs:

    { 18}  118: mov(8) vgrf54+0.0:HF, vgrf46+0.0:F NoMask group0
    { 18}  119: mov(8) vgrf54+0.16:HF, vgrf46+1.0:F NoMask group8

These MOVs violate Gfx12.5 region restrictions, so these are further
lowered:

    { 17}  119: mov(8) vgrf83<2>:HF, vgrf46+0.0:F NoMask group0
    { 19}  120: mov(8) vgrf54+0.0:UW, vgrf83<2>:UW NoMask group0
    { 19}  122: mov(8) vgrf84<2>:HF, vgrf46+1.0:F NoMask group8
    { 19}  123: mov(8) vgrf54+0.16:UW, vgrf84<2>:UW NoMask group8

The shader-db and fossil-db results are nothing to get excited
about. However, the affect on vk_cooperative_matrix_perf is substantial. In one subtest

shader: shaders/shmemfp16.spv

cooperativeMatrixProps = 8x8x16   A = float16_t B = float16_t C = float16_t D = float16_t scope = subgroup
TILE_M=128 TILE_N=128, TILE_K=32 BLayout=0

performance on my DG2 improved by ~60% due to a MASSIVE reduction in spills and fills:

-Native code for unnamed compute shader (null) (src_hash 0x00000000) (sha1 c6a41b1c4e7aa2da327a39a70ed36c822a4b172f)
-SIMD32 shader: 32484 instructions. 1 loops. 1893868 cycles. 737:1820 spills:fills, 442 sends, scheduled with mode none. Promoted 1 constants. Compacted 519744 to 492224 bytes (5%)
-   START B0 (20782 cycles)
+Native code for unnamed compute shader (null) (src_hash 0x00000000) (sha1 621e960daad5b5579b176717f24a315e7ea560a1)
+SIMD32 shader: 23918 instructions. 1 loops. 1089894 cycles. 432:1166 spills:fills, 442 sends, scheduled with mode none. Promoted 1 constants. Compacted 382688 to 353232 bytes (8%)

shader-db:

All Gfx9 and later platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19656270 -> 19653981 (-0.01%)
instructions in affected programs: 61810 -> 59521 (-3.70%)
helped: 116 / HURT: 0

total cycles in shared programs: 823368888 -> 823375854 (<.01%)
cycles in affected programs: 1165284 -> 1172250 (0.60%)
helped: 51 / HURT: 57

fossil-db:

DG2 and Meteor Lake had similar results. (Meteor Lake shown)
*** Shaders only in 'before' results are ignored:
fossil-db/steam-dxvk/total_war_warhammer3/2a3ed2ca632a7cb7/fs.32,
fossil-db/steam-dxvk/total_war_warhammer3/18b9d4a3b1961616/fs.32,
fossil-db/steam-dxvk/total_war_warhammer3/04ac9f3146a6db19/fs.32,
fossil-db/steam-dxvk/total_war_warhammer3/f37ebec6aa1b379a/fs.32,
fossil-db/steam-dxvk/total_war_warhammer3/255c987feb0d4310/fs.32, and 25
more
from 1 apps: fossil-db/steam-dxvk/total_war_warhammer3

Totals:
Instrs: 160946537 -> 160928389 (-0.01%); split: -0.01%, +0.00%
Cycles: 14125908620 -> 14125873958 (-0.00%); split: -0.00%, +0.00%

Totals from 1002 (0.15% of 652134) affected shaders:
Instrs: 411261 -> 393113 (-4.41%); split: -4.41%, +0.00%
Cycles: 16676735 -> 16642073 (-0.21%); split: -0.48%, +0.27%

Tiger Lake
Totals:
Instrs: 164511816 -> 164497202 (-0.01%); split: -0.01%, +0.00%
Cycles: 13801675722 -> 13801629397 (-0.00%); split: -0.00%, +0.00%
Subgroup size: 7955168 -> 7955152 (-0.00%)
Send messages: 8544494 -> 8544486 (-0.00%)

Totals from 997 (0.15% of 651454) affected shaders:
Instrs: 460820 -> 446206 (-3.17%); split: -3.17%, +0.00%
Cycles: 16265514 -> 16219189 (-0.28%); split: -0.84%, +0.56%
Subgroup size: 17552 -> 17536 (-0.09%)
Send messages: 26045 -> 26037 (-0.03%)

Ice Lake
Totals:
Instrs: 165504747 -> 165489970 (-0.01%); split: -0.01%, +0.00%
Cycles: 15145244554 -> 15145149627 (-0.00%); split: -0.00%, +0.00%
Subgroup size: 8107032 -> 8107016 (-0.00%)
Send messages: 8598680 -> 8598672 (-0.00%)
Spill count: 45427 -> 45423 (-0.01%)
Fill count: 74749 -> 74747 (-0.00%)

Totals from 1125 (0.17% of 656115) affected shaders:
Instrs: 521676 -> 506899 (-2.83%); split: -2.83%, +0.00%
Cycles: 19555434 -> 19460507 (-0.49%); split: -0.59%, +0.10%
Subgroup size: 21616 -> 21600 (-0.07%)
Send messages: 28623 -> 28615 (-0.03%)
Spill count: 603 -> 599 (-0.66%)
Fill count: 1362 -> 1360 (-0.15%)

Skylake
*** Shaders only in 'after' results are ignored:
fossil-db/steam-native/red_dead_redemption2/cef460b80bad8485/fs.16,
fossil-db/steam-native/red_dead_redemption2/cd5fe081e2e5529d/fs.16
from 1 apps: fossil-db/steam-native/red_dead_redemption2

Totals:
Instrs: 141607617 -> 141593776 (-0.01%); split: -0.01%, +0.00%
Cycles: 14257812441 -> 14257661671 (-0.00%); split: -0.00%, +0.00%
Subgroup size: 7743752 -> 7743736 (-0.00%)
Send messages: 7552728 -> 7552720 (-0.00%)
Spill count: 43660 -> 43661 (+0.00%)
Fill count: 71301 -> 71303 (+0.00%)

Totals from 1017 (0.16% of 636964) affected shaders:
Instrs: 392454 -> 378613 (-3.53%); split: -3.53%, +0.00%
Cycles: 16622974 -> 16472204 (-0.91%); split: -1.04%, +0.13%
Subgroup size: 19840 -> 19824 (-0.08%)
Send messages: 23021 -> 23013 (-0.03%)
Spill count: 484 -> 485 (+0.21%)
Fill count: 1155 -> 1157 (+0.17%)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28281>
2024-03-21 15:12:58 -07:00
Ian Romanick
66dc6e07f5 intel/brw: Fix handling of accumulator register numbers
Folks, there's more than one accumulator. In general, when the
register file is ARF, the upper 4 bits of the register number specify
which ARF, and the lower 4 bits specify which one of that ARF. This
can be further partitioned by the subregister number.

This is already mostly handled correctly for flags register, but lots
of places wanted to check the register number for equality with
BRW_ARF_ACCUMULATOR. If acc1 is ever specified, that won't work.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28281>
2024-03-21 15:12:54 -07:00
David Heidelberg
d8f53f698c util: move gen_zipped_file into generic util and rename to gen_zipped_xml_file
Make the filename more descriptive and since the file is used by
multiple drivers, move it into appropriate util/ directory.

Cosmetics:
 - use SPDX license tag
 - add newline before main function

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27804>
2024-03-21 20:48:41 +00:00
Echo J
16753bc2f1 nvk: Implement calibrated timestamps
This implementation is mostly a copy-paste from RADV

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28274>
2024-03-21 20:11:49 +00:00
Echo J
4b0ad410d0 nvk: Advertise VK_VALVE_mutable_descriptor_type
This missing extension looks bad when most of the other drivers
have it (so that's why I made this change)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28291>
2024-03-21 19:15:28 +00:00
Faith Ekstrand
359bb89302 nvk: Move the mutableDescriptorType enable
The EXT extension overrides the VALVE one so put it in the EXT section.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28291>
2024-03-21 19:15:28 +00:00
José Roberto de Souza
1bed037b88 iris: Remove i915_drm.h include from iris_indirect_gen.c
It don't use i915_drm.h no need to include.

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/28327>
2024-03-21 18:52:14 +00:00
José Roberto de Souza
50eceb1e33 iris: Move tiling_to_modifier() implementation to i915 folder
There is no tiling in Xe KMD uAPI.
With this one more i915_drm.h include can be removed.

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/28327>
2024-03-21 18:52:14 +00:00
Rohan Garg
cc570dbada isl: enable CCS for 3D surfaces on gen12.5 and above
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23632>
2024-03-21 18:28:27 +00:00
Rohan Garg
49ed35c08a anv: 3D surfaces have fewer layers for higher miplevels
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23632>
2024-03-21 18:28:27 +00:00
Rohan Garg
9628723943 anv,blorp: implement restrictions from WA 1406738321
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23632>
2024-03-21 18:28:27 +00:00
Valentine Burley
c83dcd4967 nvk: Trivially expose three VK_GOOGLE extensions
This patch exposes support for the following three extensions:

 * VK_GOOGLE_decorate_string
 * VK_GOOGLE_hlsl_functionality1
 * VK_GOOGLE_user_type

There's nothing for the driver to do; it's all handled in spirv_to_nir.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28155>
2024-03-21 18:10:04 +00:00
Robert Mader
b2719a73c1 crocus: Support offset query for multi-planar planes
Multi-planar planes can be imported from VA-API or V4L2. In this case we
would currently report wrong values for `gbm_bo_get_offset()`.

This does not fix any know visible bug, as crocus hardware usually does
not support muliti-planar planes in the display engine - in which case
the wrong values would make Mutter glitch. Lets report correct values
regardless.

While on it, also use the helper function for counting planes.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28225>
2024-03-21 17:49:31 +00:00
duncan.hopkins
899fcaf237 zink: Avoid issues when kopper tries using XCB WSI on Apple.
On macOS builds the code is tryng to use X11 and XCB code paths for WSI functions and structures,
i.e. `VkXcbSurfaceCreateInfoKHR` and `vkCreateXcbSurfaceKHR()`.
The MoltenVK implementation only supports `VkMacOSSurfaceCreateInfoMVK` and `vkCreateMacOSSurfaceMVK()`.
To get these working correctly Metal diusplay surfaces need to be setup, which xquarts does not expose.

Until this situation is resolved correctly the `VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR` code paths has been
changed to return `VK_INCOMPLETE`. This allows them to run without asserting and terminating the runtime.
This allows for non-display applicaitons, like `glxinfo`, to run without terminating.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28259>
2024-03-21 17:22:34 +00:00
duncan.hopkins
d644b64ff2 zink: removed MESA_PRIM_QUADS from the supported PIPE_CAP_SUPPORTED_PRIM_MODES.
Vulkan does not support quads, removal of this type forces quads to be converted
in `primconvert_init_draw()`.

In cases where `screen->have_triangle_fans` excludes MESA_PRIM_TRIANGLE_FAN,
`u_index_generator()` is accessing a NULL entry in 'generate_quads'
for converting MESA_PRIM_TRIANGLE_FAN to MESA_PRIM_QUADS.
Which seems like an odd conversion to do (might be why it is missing).

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28259>
2024-03-21 17:22:34 +00:00
duncan.hopkins
7e1e0c6824 zink: stopped the use of VkFormatProperties3 if the reported API is less than 1.3 or VK_KHR_format_feature_flags2 not present.
The MoltenVK (time of writing) only implements Vulkan 1.2 APIs and no `VK_KHR_format_feature_flags2` device extension.
This means VkFormatProperties3 is not supported, and is left blank when used in `populate_format_props()`.
If non-1.3 is detected then the same values are read from the `VkFormatProperties2` `props` location.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28259>
2024-03-21 17:22:34 +00:00
duncan.hopkins
d0015ebbab zink: use portability EXT on Apple.
Vulkan behaviour has changed to require VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR
and VK_KHR_portability_enumeration to be used on layered Vulkan implementations.
These are enbaled on macOS/Apple as MoltenVK is the only implmentation (time of writing)
and newer version require this.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28259>
2024-03-21 17:22:34 +00:00
duncan.hopkins
32ac90d8c2 zink: Fixed header location and compiling issue with [[deprecated]] from newer MoltenVK versions.
From Vulkan 1.3.250 the MoltenVK include filenames changed.
Now include the newer 'MoltenVK/mvk_vulkan.h' instead of the older `MoltenVK/vk_mvk_moltenvk.h` headers.

From Vulkan 1.3.275 the MoltenVK include location changed.
The meson build options 'moltenvk-dir' now needs to point at the root of the Vulkan SDK install.
It will look for the presence of the older 'MoltenVK/include' loction and the newer 'macos/include' location.

Tested against Vulkan SDK versions: 1.3.250, 1.3.261, 1.3.268, 1.3.275.
Will not work compile with Vulkan 1.3.234 or earlier.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28259>
2024-03-21 17:22:34 +00:00
José Roberto de Souza
47bbd1c7ff intel/tools/error_decode: Parse HW context in Xe decoder
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/27888>
2024-03-21 16:59:09 +00:00
José Roberto de Souza
ec3a41960b intel/tools/error_decode: Add function to print batch in Xe decoder
This will be useful to decode HW context in the next patch.

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/27888>
2024-03-21 16:59:09 +00:00
José Roberto de Souza
171eb89b75 intel/tools/error_decode: Fix parsing in Xe decoder
xe_topic can't be inside of the for loop otherwise it will be set to
TOPIC_INVALID at every iteration.

TOPIC_INVALID was added after it was reviewed by Lionel because CI
complained that xe_topic may be not initialized, turns out leaving it
not initialized was causing the xe_topic value to keep the value set
in the previous interation makeing the parser to work by luck.

Fixes: 90e38bbb3b ("intel/tools/error_decode: Parse Xe KMD error dump file")
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/27888>
2024-03-21 16:59:09 +00:00
Dylan Baker
477943cc9d meson: Allow building intel-clc for the host if it can be run
In what is probably the most common case  cross of compilation, x86_64
-> x86, it should be possible to build intel-clc for the host machine
and run it. Doing so simplifies the build by not needing to be able to
cross compile half of mesa, and should ease developer and distro strain
for building Intel drivers for x86.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28222>
2024-03-21 16:31:35 +00:00
Lionel Landwerlin
098136e52a anv: avoid partially compiled warning with GPL
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/28318>
2024-03-21 16:09:54 +00:00
Vignesh Raman
3983ae89e9 Split debian-build-testing job
Split the build job from the shader-db tests so that the test
job can be rerun more reliably without hitting the timeout.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/9513
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27507>
2024-03-21 13:26:20 +00:00
Mike Blumenkrantz
ee13512a62 zink: clamp swapchain renderarea instead of asserting
in a sequence like:
* resize A
* clear
* resize B
* clear
* resize C
* clear

for a swapchain resource, the geometry for a given op after the resize
may desync for the op with which it was executed, but this is fine
since the underlying swapchain object will have to be re-created anyway

fixes #10827

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28214>
2024-03-21 13:05:04 +00:00
Mike Blumenkrantz
27f42a38aa zink: clamp present region size
it's illegal for these to exceed the size of the swapchain

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28214>
2024-03-21 13:05:04 +00:00
Mike Blumenkrantz
1670c40557 zink: defer present barrier to flush if a clear is pending
this otherwise submits the swapchain with the wrong layout

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28214>
2024-03-21 13:05:04 +00:00
Christian Gmeiner
7e686fa417 etnaviv: isa: Define a dontcare bit in atomic instructions
Looks like it is the same as for ALU instructions: skpHp

This simplifies the special atomic handling a lot. Seen on blob
running a simple opencl shader on GC3000.

__kernel void kern(
   __global int *a,
   __global int *b,
   __global int *result)
{
   atomic_add(result, a[0]);
}

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28272>
2024-03-21 12:24:35 +00:00
Iago Toral Quiroga
83f53be8c7 broadcom/ci: add skips for unsupported features
Currently 92% of our Vulkan CI tests hit "Not Supported" test
cases, which is ridiculously high. Add a bunch of skips, some
of which include very large categories of tests of features we
already know we don't support, so we stop wasting so much time
skipping tests.

With this, we can also increase the fraction of tests we execute
for vulkan significantly, while still keeping job run times
under control.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28264>
2024-03-21 11:47:50 +00:00
Eric Engestrom
795046a8d4 v3dv/ci: update expectations
A big chunk of the new flakes and timeouts are caused by enabling new
tests in f977e4d4f5 ("v3dv: Enable
EXT_swapchain_maintenance1").

I'm not quite sure what happened with
`dEQP-VK.wsi.wayland.swapchain.simulate_oom.*` but now at least half of
them are flaky on rpi4 (between Skip and Crash), so moving the whole
block to flakes. On rpi5 I haven't seen them flake yet so tentatively
removing them entirely, but there's a good chance the issue is common
and they'll have to be put into flakes on rpi5 at some point as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28316>
2024-03-21 11:20:18 +00:00
Samuel Pitoiset
4b065fe863 zink/ci: update CI lists
This seems to have been fixed quite recently.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28315>
2024-03-21 10:38:18 +01:00
Christian Gmeiner
e0ca29e7a3 isaspec: deocde: Remove generic functions from public interface
This will switch everyone to the isa specific functions.

Fixes the output of etnaviv's pre_instr_cb callback if
freedreno and etnaviv are build at the same time.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28176>
2024-03-21 07:51:18 +00:00
Christian Gmeiner
3f2295d99b isaspec: decode: Add libisaspec
Create a static library that just contains isa_print(..). We
need to do this step to make lto happy.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28176>
2024-03-21 07:51:18 +00:00
Christian Gmeiner
878fa2032e isaspec: deocde: Make isa_decode_field(..) private
Without this change the isa_decode_field(..) uses the wrong bitmask_t
type (freedreno: array with 2 elements, etnaviv: array with 4 elements)
and weird things happens.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28176>
2024-03-21 07:51:18 +00:00
Christian Gmeiner
872f714e32 isaspec: deocde: Make isa_bitset arrays static
Without this commit etnaviv_isa_disasm(..) will call into
find_field(..) and use the bitsets are the one from freedreno.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28176>
2024-03-21 07:51:18 +00:00
Christian Gmeiner
1196b82815 etnaviv: isa: Rework meson dependency for libetnaviv_decode
Any component that links against libetnaviv_decode should not need to
take care if the generated isa files exists.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28176>
2024-03-21 07:51:18 +00:00
Christian Gmeiner
f396899983 freedreno/isa: Rework meson dependency for libir3decode
Any component that links against libir3decode should not need to
take care if the generated isa files exists.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28176>
2024-03-21 07:51:18 +00:00
Christian Gmeiner
505ec13f87 isaspec: decode: Make isa_decode_bitset(..) private
Fixes lto issues later in the series.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28176>
2024-03-21 07:51:18 +00:00
Christian Gmeiner
77872bec95 isaspec: decode: Add isa specific functions
In the end we want to only the specific functions and remove
the generic ones from the public interface.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28176>
2024-03-21 07:51:18 +00:00
Christian Gmeiner
16e8a3548f isaspec: deocde: Hide all the internals ISA details
There are no users of these defines, structs and functions
outside of the generated isa.c file. I left the empty header
as it will be used in later commits.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28176>
2024-03-21 07:51:18 +00:00
Christian Gmeiner
08e899852b isaspec: Remove not used isa_decode_hook
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28176>
2024-03-21 07:51:17 +00:00
Marek Olšák
651191801a gallium: increase the size of pipe_box y, height fields to allow bigger textures
and reorder the fields to pack them better

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27953>
2024-03-21 03:33:39 +00:00
Marek Olšák
bfdbfd6ade gallium: use u_box_3d to initialize pipe_box instead of non-designated initializers
This is the original utility for initializing pipe_box.
It prevents breakage when pipe_box fields are reordered.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27953>
2024-03-21 03:33:39 +00:00
Karol Herbst
dc57c6b59e rusticl/util: make create_pipe_box indepentend of pipe_box's field types
This way one can freely change the types of fields inside pipe_box without
running into compilation errors here.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27953>
2024-03-21 03:33:39 +00:00
Patrick Lerda
0fd907fc7b ac/llvm,radeonsi: fix memory leaks triggered by ac_nir_translate() errors
For instance, this issue is triggered with
"piglit/bin/glslparsertest tests/spec/arb_bindless_texture/compiler/images/arith-bound-image.frag pass 3.30 GL_ARB_bindless_texture GL_ARB_shader_image_load_store":
Direct leak of 176 byte(s) in 1 object(s) allocated from:
    #0 0x7f84c3fbe9a7 in calloc (/usr/lib64/libasan.so.6+0xb19a7)
    #1 0x7f84ba7e0801 in ac_nir_translate ../src/amd/llvm/ac_nir_to_llvm.c:4391
    #2 0x7f84ba53fdf4 in si_llvm_translate_nir ../src/gallium/drivers/radeonsi/si_shader_llvm.c:759
    #3 0x7f84ba542bb7 in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:836
    #4 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874
    #5 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176
    #6 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309
    #7 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
    #8 0x7f84c2fea38a  (/lib64/libc.so.6+0x8438a)

Direct leak of 136 byte(s) in 1 object(s) allocated from:
    #0 0x7f84c3fbff57 in operator new(unsigned long) (/usr/lib64/libasan.so.6+0xb2f57)
    #1 0x7f84b1a5f749 in LLVMCreateBuilderInContext (/usr/local/lib64/libLLVM-17.so+0xc84749)
    #2 0x7f84ba7817b0 in ac_llvm_context_init ../src/amd/llvm/ac_llvm_build.c:54
    #3 0x7f84ba542b7a in si_llvm_context_init ../src/gallium/drivers/radeonsi/si_shader_llvm.c:120
    #4 0x7f84ba542b7a in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:832
    #5 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874
    #6 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176
    #7 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309
    #8 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
    #9 0x7f84c2fea38a  (/lib64/libc.so.6+0x8438a)

Indirect leak of 176 byte(s) in 1 object(s) allocated from:
    #0 0x7f84c3fbe7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7f84b81b9b3f in ralloc_size ../src/util/ralloc.c:118
    #2 0x7f84b81b9fee in rzalloc_size ../src/util/ralloc.c:152
    #3 0x7f84b81b9fee in rzalloc_array_size ../src/util/ralloc.c:232
    #4 0x7f84b81b05c7 in _mesa_hash_table_init ../src/util/hash_table.c:163
    #5 0x7f84b81b05c7 in _mesa_hash_table_create ../src/util/hash_table.c:186
    #6 0x7f84ba7e06ae in ac_nir_translate ../src/amd/llvm/ac_nir_to_llvm.c:4381
    #7 0x7f84ba53fdf4 in si_llvm_translate_nir ../src/gallium/drivers/radeonsi/si_shader_llvm.c:759
    #8 0x7f84ba542bb7 in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:836
    #9 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874
    #10 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176
    #11 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309
    #12 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
    #13 0x7f84c2fea38a  (/lib64/libc.so.6+0x8438a)

Indirect leak of 176 byte(s) in 1 object(s) allocated from:
    #0 0x7f84c3fbe7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7f84b81b9b3f in ralloc_size ../src/util/ralloc.c:118
    #2 0x7f84b81b9fee in rzalloc_size ../src/util/ralloc.c:152
    #3 0x7f84b81b9fee in rzalloc_array_size ../src/util/ralloc.c:232
    #4 0x7f84b81b05c7 in _mesa_hash_table_init ../src/util/hash_table.c:163
    #5 0x7f84b81b05c7 in _mesa_hash_table_create ../src/util/hash_table.c:186
    #6 0x7f84ba7e06e4 in ac_nir_translate ../src/amd/llvm/ac_nir_to_llvm.c:4382
    #7 0x7f84ba53fdf4 in si_llvm_translate_nir ../src/gallium/drivers/radeonsi/si_shader_llvm.c:759
    #8 0x7f84ba542bb7 in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:836
    #9 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874
    #10 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176
    #11 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309
    #12 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
    #13 0x7f84c2fea38a  (/lib64/libc.so.6+0x8438a)

Indirect leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7f84c3fbe7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7f84b81b9b3f in ralloc_size ../src/util/ralloc.c:118
    #2 0x7f84b81b046c in _mesa_hash_table_create ../src/util/hash_table.c:182
    #3 0x7f84ba7e06e4 in ac_nir_translate ../src/amd/llvm/ac_nir_to_llvm.c:4382
    #4 0x7f84ba53fdf4 in si_llvm_translate_nir ../src/gallium/drivers/radeonsi/si_shader_llvm.c:759
    #5 0x7f84ba542bb7 in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:836
    #6 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874
    #7 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176
    #8 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309
    #9 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
    #10 0x7f84c2fea38a  (/lib64/libc.so.6+0x8438a)

Indirect leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7f84c3fbe7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7f84b81b9b3f in ralloc_size ../src/util/ralloc.c:118
    #2 0x7f84b81b046c in _mesa_hash_table_create ../src/util/hash_table.c:182
    #3 0x7f84ba7e06ae in ac_nir_translate ../src/amd/llvm/ac_nir_to_llvm.c:4381
    #4 0x7f84ba53fdf4 in si_llvm_translate_nir ../src/gallium/drivers/radeonsi/si_shader_llvm.c:759
    #5 0x7f84ba542bb7 in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:836
    #6 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874
    #7 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176
    #8 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309
    #9 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
    #10 0x7f84c2fea38a  (/lib64/libc.so.6+0x8438a)

SUMMARY: AddressSanitizer: 920 byte(s) leaked in 6 allocation(s).

Fixes: d92d35c9db ("ac/llvm: add a return value to ac_nir_translate")
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/28099>
2024-03-21 00:51:19 +00:00
Ian Romanick
3556dbb97f intel/brw/xe2: Correctly disassemble RT write subtypes
The encoding changed when SIMD32 was added.

Part of Wa_14011334914.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Francisco Jerez
871805215a iris/xe2+: Disable coherent framebuffer fetch.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Francisco Jerez
c4325f426c intel/brw/xe2+: Setup PS thread payload registers required for ALU-based pixel interpolation.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Francisco Jerez
6427f16074 intel/brw/gfx12: Setup PS thread payload registers required for ALU-based pixel interpolation.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Rohan Garg
2df6d208c8 intel/brw: Adjust src1 length bits for xe2+
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Rohan Garg
83f2bdc116 intel/brw: Set the right cache control bits for xe2
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Rohan Garg
adb853ed10 intel/brw: Update written size depending on the LSC message
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/28306>
2024-03-20 15:46:44 -07:00
Rohan Garg
48376ac3b8 intel/brw: Cleanup send generation
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Rohan Garg
65f66974a5 intel/brw: Use the dimensions supplied in the instruction
Rework:
 * Francisco Jerez: Rebase on 07b9bfacc7 ("intel/compiler: Move
   logical-send lowering to a separate file")

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/28306>
2024-03-20 15:46:44 -07:00
Francisco Jerez
644a0ede1e intel/blorp/xe2+: Don't use replicated-data clears.
They've been removed from the hardware.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Francisco Jerez
af8b9af700 intel/brw/xe2+: Allow dual-source blending in SIMD16 mode.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Francisco Jerez
762ec3fd59 intel/brw/xe2+: Allow FS stencil output in SIMD16 dispatch mode.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Francisco Jerez
efc0601ddf intel/brw/xe2+: Double allowed SIMD width of FB write SEND messages.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Francisco Jerez
d96bfb160f intel/brw/xe2+: Update encoding of FB write extended descriptor.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Francisco Jerez
189422de1b intel/brw/xe2+: Update encoding of FB write descriptor message control.
Ref: bspec: 65209, 63908
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Francisco Jerez
7b0fbc22dd intel/brw/xe2: Render target reads have been removed from the hardware.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28306>
2024-03-20 15:46:44 -07:00
Paulo Zanoni
6ec1e322f0 anv: don't leak device->vma_samplers
The vma_samplers vma heap is initialized unconditionally. Don't use
device->physical->indirect_descriptors as a condition on whether to
free it or not.

From my TGL machine:

==373617== 32 bytes in 1 blocks are definitely lost in loss record 1 of 1
==373617==    at 0x48459F3: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==373617==    by 0x6926DC0: util_vma_heap_free (vma.c:339)
==373617==    by 0x6925ED3: util_vma_heap_init (vma.c:53)
==373617==    by 0x5334EDA: anv_CreateDevice (anv_device.c:3404)
==373617==    by 0x685593A: vk_tramp_CreateDevice (vk_dispatch_trampolines.c:78)
==373617==    by 0x48A6D56: terminator_CreateDevice (loader.c:5833)
==373617==    by 0x9C2293F: vulkan_layer_chassis::CreateDevice(VkPhysicalDevice_T*, VkDeviceCreateInfo const*, VkAllocationCallbacks const*, VkDevice_T**) (chassis.cpp:497)
==373617==    by 0x48B0690: loader_create_device_chain (loader.c:4937)
==373617==    by 0x48B1327: loader_layer_create_device (loader.c:4317)
==373617==    by 0x48B8D79: vkCreateDevice (trampoline.c:1004)
==373617==    by 0x10CC7A: MyApp::MyApp(int, bool) (sparse.cpp:608)
==373617==    by 0x1201E8: main (sparse.cpp:6025)

Fixes: 7c76125db2 ("anv: use 2 different buffers for surfaces/samplers in descriptor sets")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28303>
2024-03-20 21:55:55 +00:00
Rob Clark
5ee8fd6b49 freedreno/a6xx: Fix z/s preserving sysmem clear blit
Need to ignore color attachments in that logic.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10466
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28249>
2024-03-20 21:28:40 +00:00
Mary Strodl
42ad4c6e6e rusticl: set OCL_ICD_VENDORS as directory, not file
Looks like `OCL_ICD_VENDORS` is meant to be a directory containing
`.icd` files, but we were giving it a path to a driver. This meant that
rusticl wouldn't get picked up when using devenv.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28231>
2024-03-20 16:12:22 -04:00
Lionel Landwerlin
4fbdfdce9c anv: allocate pipeline bindings tables dynamically on the heap
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28290>
2024-03-20 19:29:05 +00:00
Lionel Landwerlin
7730fa5683 anv: track embedded sampler counts in layouts
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28290>
2024-03-20 19:29:05 +00:00
Juston Li
dc1069b167 venus: extend device format prop cache with VkFormatProperties3
Extend the vkGetPhysicalDeviceFormatProperties2 cache to include
VkFormatProperties3 from the pNext chain. VkFormatProperties3 was
observed being always attached for DXVK and thus skipping the cache
if not handled.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28194>
2024-03-20 19:12:00 +00:00
Joshua Ashton
aecd46182d lavapipe: Enable EXT_swapchain_colorspace
No-op.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28275>
2024-03-20 18:24:26 +00:00
Joshua Ashton
fc263e0308 v3dv: Enable EXT_swapchain_colorspace
No-op.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28275>
2024-03-20 18:24:26 +00:00
Joshua Ashton
5c49f3c1aa lavapipe: Enable EXT_swapchain_maintenance1
This was missing, this is implemented in common code.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28275>
2024-03-20 18:24:26 +00:00
Joshua Ashton
f977e4d4f5 v3dv: Enable EXT_swapchain_maintenance1
This was missing, this is implemented in common code.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28275>
2024-03-20 18:24:25 +00:00
Joshua Ashton
145ab5b853 anv: Enable EXT_swapchain_maintenance1
This was missing, this is implemented in common code.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28275>
2024-03-20 18:24:25 +00:00
Rhys Perry
76e089ea48 aco/cssa: update comments
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28248>
2024-03-20 17:50:27 +00:00
Rhys Perry
0c0819f0da aco/cssa: reset equal_anc_out if merging fails
try_merge_merge_set() expects equal_anc_out to be Temp() in the beginning,
so we need to reset it in case it's used again.

Fixes compilation of metro_exodus/163b3b895730d37b with
VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 18ba93e673 ("aco/cssa: rewrite lower_to_cssa pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28248>
2024-03-20 17:50:27 +00:00
Mark Collins
f72cd2eae7 fd/decode: Fix "OPTSIONS" typo in help messages
Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
2024-03-20 17:34:08 +00:00
Mark Collins
8b4b252674 fd/replay: Use generate_rd as default CS generator
The generate_rd from the same directory as the replay executable is
used as the default CS generator.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
2024-03-20 17:34:08 +00:00
Mark Collins
69d347e42f fd/decode: Build generate_rd executable rather
A seperate meson project with mesa as a subproject was required to
compile the generate_rd executable for replaying rddecompiler
generated source. That approach was overly complicated, now the
generate_rd executable is now compiled as a part of building the
freedreno tools with a blank generate-rd.cc file that can be replaced
with the source generated by rddecompiler.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
2024-03-20 17:34:08 +00:00
Mark Collins
bdd89dad1c fd/rddecompiler: Disable IR3 cache for replay context
The cache being enabled results in some warning logs, it's not
necessary for rddecompiler either way.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
2024-03-20 17:34:08 +00:00
Mark Collins
fc9e718a86 fd/replay+rddecompiler: Add option to clear wrbufs at start
It's useful to clear buffers at the start of sequences to view the
delta, this adds that functionality to wrbufs with a fixed clear
value of 0xDEADBEEF.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
2024-03-20 17:34:08 +00:00
Mark Collins
694ed34673 fd/replay: Error when VMA AS allocation fails
It's possible for large allocations to hit the maximum address
space size especially with a fake AS, these failures are silent
and can cause a hard to debug segfault later down the line.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
2024-03-20 17:34:08 +00:00
Mark Collins
e0a680162d fd/replay: Add wrbuf support for KGSL/DXG
The vector for wrbufs wasn't being initialized for KGSL and DXG
leading to UB when they were used with it.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
2024-03-20 17:34:08 +00:00
Mark Collins
0fad4e547b fd/replay: Clear wrbufs after submitting cmdstreams for DRM
Retaining them across submissions was a bug, the wrbuf should only
be dumped for the submission it originates from.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
2024-03-20 17:34:08 +00:00
Mark Collins
011cacd982 fd/replay: Clamp dumped wrbuf to buffer size
We should be careful to not read past the end of any buffers when
dumping wrbufs, this clamps the size to the size of the buffer with
a warning.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
2024-03-20 17:34:08 +00:00
Mark Collins
e10202fdf4 fd/replay: Dump wrbuf into cwd rather than exe directory
It didn't make any sense to output into the bin directory, it has
been replaced with the working directory instead.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
2024-03-20 17:34:08 +00:00
Mark Collins
d043ebc941 fd/replay: Fix wrbuffer name extraction
The offset for reading and length calculation logic was incorrect
leading to the name string being entirely incorrect.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
2024-03-20 17:34:07 +00:00
Zan Dobersek
1e27138588 freedreno/fdl: avoid overflow in layout size computations
When computing layout for large extents and array size, the computations
can overflow the 32-bit variables holding these values. This can end up
underreporting memory requirements for a given resource, making the
application think that such a resource is allocatable.

The size-holding variables in the fdl_layout struct have their type
upgraded to uint64_t, as does the total size variable in tu_image. This
avoids problems in corner-case tests in the Vulkan CTS, but this code
should be improved further to avoid overflows and narrowing conversions.

Fixes a quartet of tests under
dEQP-VK.pipeline.monolithic.render_to_image.core.2d_array.huge.width_height_layers.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28050>
2024-03-20 17:05:55 +00:00
Samuel Pitoiset
be4a6b946a radv: add a workaround for null IBO on GFX6
Based on PAL.

Fixes dEQP-VK.draw.*nulldescriptor_maintenance_5_maintenance6 on GFX6.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28263>
2024-03-20 16:27:58 +00:00
Juan A. Suarez Romero
d87ccf0632 broadcom/ci: add new expected failures
Add more expected failures that should have been included in
74be42d9a4.

Fixes: 74be42d9a4 ("broadcom/ci: add new expected test failures")
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28298>
2024-03-20 16:06:35 +00:00
Mike Blumenkrantz
f79557dd38 zink: do io fixup on patch variables too
fixes spec@arb_separate_shader_objects@rendezvous by location (5 stages)

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28296>
2024-03-20 15:09:12 +00:00
Rhys Perry
f88922e816 radv: use dual_color_blend_by_location with Half-Life Alyx
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Ethan Lee <flibitijibibo@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10462
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28269>
2024-03-20 11:40:18 +00:00
Kenneth Graunke
a075b44493 intel/brw: Eliminate top-level FIND_LIVE_CHANNEL & BROADCAST once
brw_fs_opt_eliminate_find_live_channel eliminates FIND_LIVE_CHANNEL
outside of control flow.  None of our optimization passes generate
additional cases of that instruction, so once it's gone, we shouldn't
ever have to run the pass again.  Moving it out of the loop should
save a bit of CPU time.

While we're at it, also clean adjacent BROADCAST instructions that
consume the result of our FIND_LIVE_CHANNEL.  Without this, we have
to perform copy propagation to get the MOV 0 immediate into the
BROADCAST, then algebraic to turn it into a MOV, which enables more
copy propagation...not to mention CSE gets involved.  Since this
FIND_LIVE_CHANNEL + BROADCAST pattern from emit_uniformize() is
really common, and it's trivial to clean up, we can do that.  This
lets the initial copy prop in the loop see MOV instead of BROADCAST.

Zero impact on fossil-db, but less work in the optimization loop.

Together with the previous patches, this cuts compile time in
Borderlands 3 on Alchemist by -1.38539% +/- 0.1632% (n = 24).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28286>
2024-03-20 01:04:22 -07:00
Kenneth Graunke
5814534de5 intel/brw: Don't consider UNIFORM_PULL_CONSTANT_LOAD a send-from-GRF
It's a logical opcode which is lowered to a send-from-GRF later.  That
lowering code is responsible for ensuring the sources are set up in a
proper SEND payload.

This was preventing copy propagation of surface handles which started
out as scalars, were splatted out to full-SIMD values with NoMask, then
actually consumed as only component 0 (scalar again), because we thought
that scalar values were not allowed.

fossil-db on Alchemist shows improvements in q2rtx but no other titles:

   Totals:
   Instrs: 161310436 -> 161310152 (-0.00%)
   Cycles: 14370605159 -> 14370601066 (-0.00%)

   Totals from 17 (0.00% of 652298) affected shaders:
   Instrs: 16097 -> 15813 (-1.76%)
   Cycles: 185508 -> 181415 (-2.21%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28286>
2024-03-20 01:04:22 -07:00
Kenneth Graunke
ea423aba1b intel/brw: Split out 64-bit lowering from algebraic optimizations
We don't necessarily want to split up MOVs for 64-bit addresses into
2x 32-bit MOVs right away, as this makes things like copy propagating
the whole address around harder.  We should do this late, once, while
still doing other algebraic optimizations earlier.

fossil-db results for Alchemist show tiny improvements:

   Totals:
   Instrs: 161310502 -> 161310436 (-0.00%); split: -0.00%, +0.00%
   Cycles: 14370605606 -> 14370605159 (-0.00%); split: -0.00%, +0.00%

   Totals from 33 (0.01% of 652298) affected shaders:
   Instrs: 15053 -> 14987 (-0.44%); split: -0.64%, +0.20%
   Cycles: 196947 -> 196500 (-0.23%); split: -0.25%, +0.02%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28286>
2024-03-20 01:04:17 -07:00
Nanley Chery
831703157e iris: Use resource_get_param in resource_get_handle
Refactor iris_resource_get_handle to use iris_resource_get_param to pick
up the fix from the previous patch.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9994
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28258>
2024-03-19 23:12:06 +00:00
Nanley Chery
bf1008ac28 iris: Report the correct modifier for Tile4 images
In iris_resource_get_param, report the Tile4 modifier for Tile4 images
instead of reporting the linear modifier.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28258>
2024-03-19 23:12:06 +00:00
Mark Janes
345c918a76 intel/dev: remove pci revision from shader cache key
Pci revision was included in the shader cache key because it can
enable platform workarounds.  While some platform workarounds exist in
the compiler, none are dependent on the silicon stepping.

Many platforms differ only in the pci revision id, causing needless
duplication in cache entries between platforms.

When a platform ships publicly with stepping-specific compiler
workarounds, pci id must be incorporated into the shader cache key.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28085>
2024-03-19 15:11:19 -07:00
Timur Kristóf
58e3b1f930 aco: Allow passing constant operand to is_overwritten_since.
This is to make it more intuitive and also consistent
with last_writer_idx which does allow constant operands.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28046>
2024-03-19 20:50:12 +00:00
Gert Wollny
d1cac5ed05 zink: acquire - maybe clear timeout after waiting for presentation fence
If the presentation fence was signalled and we still hold
max_acquires or more images, then clear the timeout to avoid
a possible deadlock.

With that we avoid the validation error

  VUID-vkAcquireNextImageKHR-surface-07783

triggered by piglit

   spec@!opengl 1.0@gl-1.0-drawbuffer-modes

and others.

v2: clear timeout only if we have acquired more images than the
    reported max and add some comment why the timeout is cleared
    (Mike).

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28245>
2024-03-19 20:12:52 +00:00
Mary Guillemard
9e133c4000 nouveau: Add support for TERT opcodes in vk_push_print
Those opcodes are vestige of the old command format.

This implement handling of them and fix issues when analysing command
buffers that use thoses.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28277>
2024-03-19 19:56:07 +00:00
Kenneth Graunke
d473004576 intel/fs: Avoid generating useless UNDEFs for every SSA def
Emitting UNDEF is only necessary when the instructions we generate to
produce the NIR def are considered partial writes.  By adding a simple
check (adapted from fs_inst::is_partial_write()), we can avoid creating
loads of unnecessary UNDEFs that we have to clean up later.

Our first dead code elimination pass does get rid of them pretty
quickly, but this should save memory and time during our first
split_virtual_grfs and dead_code_elimination passes.

This generates roughly 30% fewer instructions at the beginning.

Improves compilation time of shaders:
- Rise of the Tomb Raider: -3.51563% +/- 0.103951% (n=7)
- Borderlands 3: -3.64422% +/- 0.300951% (n=7).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28169>
2024-03-19 19:32:18 +00:00
Konstantin Seurer
a6b93c50d0 radv/printf: Use fprintf instead of printf
For using other destinations than stdout.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28228>
2024-03-19 19:05:25 +00:00
Konstantin Seurer
d902b6d805 radv: Skip more acceleration structure build markers
We should skip even more stuff when using updates only.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28228>
2024-03-19 19:05:25 +00:00
Caio Oliveira
b58b6d2d32 anv: Enable VK_KHR_shader_quad_control
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27279>
2024-03-19 18:41:15 +00:00
Caio Oliveira
b22879e753 intel/brw: Use predicates for quad_vote_any and quad_vote_all when available
Up until Xe2, we can use the predicates ANY4H and ALL4H to achieve the
same result with less instructions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27279>
2024-03-19 18:41:15 +00:00
Caio Oliveira
857e62e6ac intel/brw: Implement quad_vote_any and quad_vote_all
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27279>
2024-03-19 18:41:15 +00:00
Ian Romanick
671745b616 intel/fs: Don't allow 0 stride on MOV destination
Outside SIMD1 instructions, a destination stride of zero doesn't make
any sense. When such strides exist, they would be fixed by the FS
generator. Currently the only place that intentionally generates such a
stride is setup_barrier_message_payload_gfx125, and this commit changes
that.

The existence of a zero stride that won't really be a zero stride causes
a variety of problems with other optimization passes. Those passes don't
know that 0 actually means 1, and they make incorrect assumptions about
sizes written, etc.

The assertion helped catch many bugs in some other work in progress that
tries to store convergent values in SIMD8 registers regardless of the
dispatch width. That code would accidentally generate destination
strides of zero.

v2: Check stride differently depending on register file. Suggested by
Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28256>
2024-03-19 18:17:59 +00:00
Danylo Piliaiev
d10b546776 freedreno/replay: Use real queueid for submissions and waits
Otherwise it failed when expected queueid is not 0.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27123>
2024-03-19 17:56:33 +00:00
Samuel Pitoiset
6f18f39208 zink/ci: enable RADV_PERFTEST=shader_object for polaris10
It's passing in CI now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28273>
2024-03-19 17:33:11 +00:00
Konstantin Seurer
6095b70f85 radv/rt: Use 32-bit offsets for load_sbt_entry
Totals from 82 (18.06% of 454) affected shaders:
MaxWaves: 820 -> 821 (+0.12%)
Instrs: 2765694 -> 2766338 (+0.02%); split: -0.08%, +0.10%
CodeSize: 14751988 -> 14735464 (-0.11%); split: -0.13%, +0.01%
VGPRs: 8464 -> 8448 (-0.19%)
SpillSGPRs: 454 -> 512 (+12.78%)
Latency: 19368679 -> 19344967 (-0.12%); split: -0.21%, +0.09%
InvThroughput: 5354427 -> 5346317 (-0.15%); split: -0.24%, +0.08%
VClause: 100183 -> 100331 (+0.15%); split: -0.02%, +0.17%
SClause: 66584 -> 66590 (+0.01%); split: -0.02%, +0.03%
Copies: 237008 -> 238684 (+0.71%); split: -0.53%, +1.23%
Branches: 113344 -> 113386 (+0.04%); split: -0.00%, +0.04%
PreSGPRs: 6141 -> 6194 (+0.86%)
PreVGPRs: 7916 -> 7880 (-0.45%)

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27725>
2024-03-19 17:03:28 +00:00
Konstantin Seurer
00dec03438 radv: Use radv_buffer_map for parsing IBs
We need matching pointers pointers for annotations to work.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:14 +00:00
Konstantin Seurer
a78cbc98cc ac: Improve context roll readability
Add new lines to improve visual separation and color registers:
- red = unchanged
- green = changed

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:14 +00:00
Konstantin Seurer
1d747653d4 radv: Add an IB annotation layer
The layer annotates the command buffers with api
entrypoint names.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:14 +00:00
Konstantin Seurer
8f0ee3a92b radv: Add support for IB annotations
Wires up ac_parse_ib annotation support.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:14 +00:00
Konstantin Seurer
bf15688fa1 ac/parse_ib: Implement annotations
Annotates the IB dump with driver specified strings.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:13 +00:00
Konstantin Seurer
0f436e0fe1 ac/parse_ib: Replace the parameter list with ac_ib_parser
It's more code but it should be more readable. This also makes adding
optional arguments easier.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:13 +00:00
Konstantin Seurer
2e4d365104 ac: Annotate context rolls
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:13 +00:00
Timur Kristóf
8f3cc3cb29 radv: Use mapped driver locations for determining I/O strides.
This will allow us to more accurately determine the
input and output strides, because the I/O locations mapped
by RADV don't match the locations in NIR.
As a result, ESO will use less LDS.

It also fixes the per-patch output stride of tess control
shaders, because previously we omitted tess factors from them.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28021>
2024-03-19 15:01:19 +00:00
Timur Kristóf
2f1f55cf32 radv: Extract input and output stride info to new functions.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28021>
2024-03-19 15:01:19 +00:00
Eric Engestrom
c72bb8de75 r300: mark new fails
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56480445

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28271>
2024-03-19 14:41:45 +00:00
Echo J
8c92ac3ee3 nvk: Add NVK to the Vulkan device name
Other Mesa Vulkan drivers do the same thing (this helps to identify
the driver better especially with the recent official name import)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28262>
2024-03-19 14:12:31 +00:00
Danylo Piliaiev
432d8bd081 freedreno/devices: Do not write to 8E79 on a750, KGSL has it protected
Writing REG_A7XX_RB_UNKNOWN_8E79 causes:
 adreno-gen7-gmu 3d68000.qcom,gmu: CP | Protected mode error | WRITE | addr=0x08e79 | status=0x00608e79

Fixes: ebde7d5e87
("tu/a7xx: Write even more magic regs to fix rendering issues on Android")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27912>
2024-03-19 13:35:12 +00:00
Daniel Schürmann
9bbb9f1104 aco: use small_vec as Block::edge_vec for predecessors and successors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27984>
2024-03-19 13:06:58 +00:00
Daniel Schürmann
3e58a736e4 aco/util: small_vec few additions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27984>
2024-03-19 13:06:58 +00:00
Rhys Perry
5cbd7689be aco/util: add small_vec
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27984>
2024-03-19 13:06:58 +00:00
Daniel Schürmann
4564ca313b aco: reorder code and use namespaces in aco_interface.cpp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27984>
2024-03-19 13:06:58 +00:00
Lucas Stach
c30c1af5db ci/etnaviv: update expectations
Now that the negative lodbias bug is fixed we can expect tests
using this to pass.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28224>
2024-03-19 12:27:38 +00:00
Lucas Stach
4b8981e471 etnaviv: fix fixpoint conversion of negative values
The hand rolled etnaviv conversion functions were able to handle
negative input values when converting to fixpoint. By replacing
them with U_FIXED all negative values are clamped to zero, which
breaks usages where negative inputs are valid, like lodbias.

Fixes: 8bce68edf5 ("etnaviv: switch to U_FIXED(..) macro")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28224>
2024-03-19 12:27:38 +00:00
Iago Toral Quiroga
bf3c1cf568 broadcom/ci: add a test that fails only in CI
This is a known bug in CTS affecting a number of tests in the
renderpass, renderpass2 and dynamic_rendering categories, but
it seems this is the only one triggered by CI. The bug has been
fixed in CTS 1.3.7.3.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
74be42d9a4 broadcom/ci: add new expected test failures
These start executing with dynamic rendering, and despite the name,
they don't actually require shader object. The reason they fail
is a bug in CTS (main).

Note: these are a crash in CI, but in CTS main they are a Fail.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
55a8c20e4d broadcom/ci: skips for tests that don't check for extension support correctly
We want these as skips instead of fails because there are many tests involved
and not all of them fail, so every time we add a new feature and change the
subset of tests we run in CI we start hitting different tests and we have
to keep patching the list, so just move them to skips since we know we don't
support them and we should not be running them.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
92172760e2 v3dv: enable VK_KHR_dynamic_rendering
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
7a2b17235d v3dv: also emit subpass clears with secondary command buffers
With dynamic rendering secondary command buffers can start subpasses
so we need this. Outside dynamic rendering secondary command buffers
won't be calling here since they are restricted to record commands
within a subpass.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
e9b44a3bb5 v3dv: handle render pass continue flag with dynamic passes
If a secondary command buffer recording a dynamic pass has the
VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT flag
then the rendering information for it should come from a
VkCommandBufferInheritanceRenderingInfo struct in the pNext
chain instead of the usual render pass information in the
VkCommandBufferInheritanceInfo struct. We take the information
from the new struct and build a render pass description from it
assuming a setup without a framebuffer (which is optional for
regular render passes too).

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
f4ec92084e v3dv: fix resume address patching for secondary command buffers
Because we are cloning these into primaries but the cloning is
superficial the command lists in them still point to the original
jobs and therefore paching new addresses would make the packing
code add the BO of the resume address to the original job. This
has two problems:

1. This is probably not what we want since the patching should only
be affecting the clone.
2. The bo_count of the clone job will not be updated accordingly and
we end up with a mismatch that will blow up when we submit.

The solution used here is a big hack, but works for now: we just
specify the address by its full offset rather than a relative
offset from a BO. We already have to add all the BOS in the resume
job manually which will include this the BO for the branch address
too, so this is fine.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
0bb04c019e v3dv: rename SECONDARY job type to INCOMPLETE
This was used only in secondary CL command buffers so it made
sense but with dynamic rendering we are going to also have
regular CLs also in secondaries (since secondaries can now
record full dynamic rendering passes), so renaming this to
INCOMPLETE makes more sense, since this is really what they
refer to: parts of CLs that are intended to be merged into
other primaries through branching.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
2478939b69 v3dv: implement dynamic rendering resume/suspend
Dynamic rendering allows the client to suspend recording of a
render pass and have it continued in a different command buffer.
When a suspended command buffer is submitted to a queue, the
resuming command buffer must be te next one in submission order.
This means we need to be able to "merge" or "stitch" together
these command buffers at submit time.

To accomplish this, when we suspend a command buffer we emit
a BRANCH instruction to finish it. Then at submit time, when
we know the resuming job, we patch the BRANCH address with the
address of the resuming binning list (bcl). This is very similar
to how we execute secondary command buffers inside a render pass.
Also, only the last resuming job should flush the binning lists
in the bcl since we won't have processed the full binning command
list until we have execute the last linked job in the resume
list.

Since all jobs and command buffers in the suspend/resume chain
must be part of the same dynamic render pass, we only need to
produce and emit the render command list (rcl) once.

Since the way we implement stitching is that we branch from the
suspending job into the resuming one, the first job suspending
will link into all the resuming jobs necessary to complete the
chain, therefore, after the stitching is complete, we only want
to submit the first job in the suspend/resume chain, and thus,
we only produce and emit the rcl for this one job.

Notice as well that suspending only affects the last job
recording a dynamic rendering pass (the one that needs the branch
so we can resume execution with another job in another command
buffer).

Resuming affects all jobs in the dynamic render pass, since
we won't produce RCLs for them (as only the originating job
on the suspend/resume chain will emit the RCL).

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
c15e0aac17 v3dv: implement vkCmdBeginRendering and vkCmdEndRendering
With this we are able to run basic dynamic render passes, however,
we are still missing a few things like support for secondary
render passes, suspend/resume, etc that will be adding in follow-up
patches.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
78015a9da3 v3dv: don't assume that pipelines have a render pass
This builds up on the previous patch and rewrites all the pipeline
code that fetched information from the pipeline's render pass (which
will be NULL for dynamic rendering) to instead fetch it through the
new rendering_info field, which will be valid for both regular and
dynamic render passes.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
e22d843fa4 v3dv: add a vk_render_pass_state to pipelines
With dynamic rendering the API formally eliminates render passes,
so the pipeline create info can now have a NULL render pass, in
which case rendering info must be provided via pNext struct
VkPipelineRenderingCreateInfo, or if this is missing too then
defaults to no multiview and no attachments.

Since we don't want to have separate paths all over the place
whenever we need to access render pass / rendering info for the
pipeline, we will always produce a valid vk_render_pass_state
struct with the relevant information even when we have a render
pass, so we can rely on that always being available.

A follow-up patch will rewrite all the places where we assumed
the existence of a render pass in the pipeline to instead fetch
the info it needs from this new field instead.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
10df187540 v3dv: add a helper to setup a framebuffer for dynamic rendering
Since the plan is to leverage our render pass infrastructure, we
also need to setup a framebuffer from the rendering info provided
with dynamic rendering.

We allocate the framebuffer lazily, only once, if a dynamic render
pass is used. To do this, we make it so it can hold the maximum
number of attachments possible with our hardware.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
6684aa09ff v3dv: add helper to build a render pass for dynamic rendering
The idea is to build a regular render pass from the rendering info
provided with dynamic rendering. We will use this when recording
dynamic render passes to leverage our existing implementation
for render passes with dynamic rendering.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
72c3769437 v3dv: add helper to check if we need to use a draw for a depth/stencil clear
We will need this when setting up dynamic render passes too.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
f1e6e58aef v3dv: add a helper to constrain clip window to render area
We will need to do the same when setting up dynamic render passes.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
f285f69677 v3dv: refactor checking and adding pending jobs
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
e1b52e3052 v3dv: fix copying v3dv_end_query_info into primaries from secondaries
We had missed copying the count field.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
93f9f2bcbb v3dv: always set view index before drawing
It is allowed for a shader to enable the multiview extension
even if the draw call in which it is used doesn't use multidraw.
This allows the shader to still use gl_ViewIndex, which will
always be 0 in that scenario.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
aeee18be1b v3dv: fix subpass clear with draw call for multi-layered framebuffers
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Mary Guillemard
9fd5ac42c3 panfrost: group up stubbed params in drm-shim
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Brezillon Boris <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28241>
2024-03-19 10:22:34 +00:00
Mary Guillemard
25a6af36c9 docs: Document Mali-G610 in drm-shim section
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Brezillon Boris <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28241>
2024-03-19 10:22:34 +00:00
Mary Guillemard
76397f76c9 panfrost: Add support for Panthor in drm-shim
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Brezillon Boris <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28241>
2024-03-19 10:22:34 +00:00
Mary Guillemard
9c92d92ab9 drm-shim: Add io region handling in mmap
This allows to replace mappings of io regions.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Brezillon Boris <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28241>
2024-03-19 10:22:34 +00:00
Samuel Pitoiset
4d4b1820ca radv: add radv_force_pstate_peak_gfx11_dgpu and enable it for Helldivers 2
This seems to definitely improve stability issues (random GPU hangs)
with Helldivers 2 on RDNA3 dGPUs. RDNA3 APUs and other generations
shouldn't be affected.

This is a workaround.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10584
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28260>
2024-03-19 09:06:43 +00:00
Pierre-Eric Pelloux-Prayer
99017891ca winsys/radeon: pass priv instead NULL to radeon_bo_can_reclaim
This fixes a NULL pointer issue.

Fixes: 4a078e693e ("r300,r600,radeon/winsys: always pass the winsys to radeon_bo_reference")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10613
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28240>
2024-03-19 08:46:27 +00:00
Samuel Pitoiset
9b089ca943 radv: fix occlusion queries with MSAA and no attachments
The number of samples should be the rasterization samples and not the
framebuffer samples.

Fixes recent dEQP-VK.query_pool.occlusion_query.no_attachments_*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28198>
2024-03-19 07:19:07 +00:00
Yonggang Luo
d17779430f util: Cleanup strtod.(h|c) by introduce _mesa_get_locale
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28174>
2024-03-19 04:05:08 +00:00
Marek Olšák
4ed3418a43 Unbreak Viewperf by reverting "util: use crc32_z instead of crc32 and bump zlib dep to 1.2.9"
It breaks apps shipping their own copy of zlib, such as Viewperf.
If we use crc32_z, Viewperf is unable to start because it's an undefined
symbol.

This reverts commit 010272b62e.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28233>
2024-03-19 03:08:10 +00:00
Marek Olšák
97084199bb radeonsi/ci: update failures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28219>
2024-03-18 22:27:15 -04:00
Marek Olšák
b98bbb851c radeonsi/ci: run GLCTS, ESCTS, and dEQP from the glcts directory
GLCTS contains more recent dEQP, so we can remove the deqp clone.

Changes:
- glcts should use the main branch
- glcts/build contains gl-cts and deqp
- glcts/build_es contains gles-cts
- remove the escts and deqp directories and paths
- it saves about 27 GB of disk space

Updated build instructions:
    https://github.com/marekolsak/marek-build/

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28219>
2024-03-18 22:26:54 -04:00
Kenneth Graunke
8573e9bf47 ra: Add debug functions for printing spill costs and benefits
These have been incredibly useful when debugging regressions and weird
behavior in the Intel backend when trying to spill multiple registers
before retrying allocation.  With them, we can print out not only what
register was chosen, but the benefit and cost.  Seeing lists of chosen
registers where the benefit/cost was not sorted, and poor options were
chosen before better ones, led me to investigate a number of issues.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28257>
2024-03-19 00:40:52 +00:00
Connor Abbott
84e8a295a0 freedreno/afuc: Add section on reassembling firmwares and relocations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
2e6cfc9e23 freedreno/afuc: Add magic control reg values for a740
It looks like this is the same as a730.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
e7ed7a32cd freedreno/afuc: Add a7xx test case
This tests new instructions, alignment, and sections.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
11b4b570a9 freedreno/afuc: Run entire bootstrap routine
We also need the BV/LPAC info, so run the entire thing until we get to a
waitin or read $data without waitin, which the BV microcode does
because it is disabled by default and skips everything until a
CP_THREAD_CONTROL packet.

The actual microcode writes the packet table last, but my simple test
one doesn't, and there's no guarantee it will continue to do so.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
71f80d3deb freedreno/afuc: Emulate THREAD_SYNC on a660
This is similar to a7xx but slightly different, because it inverts the
sense of the bits (the firmware sets to 1 once it starts) and there are
only 2 processors. We didn't need this before because the waiting on
THREAD_SYNC only happens after setting the packet table.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
7e9380e2bc freedreno/afuc: Allow -e option on a7xx
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
d860b2eca5 freedreno/afuc: Add support for multiple sections when assembling
Sections have names that are currently unused but we will need to use
them on a750 for relocations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
a5db8e9c1f freedreno/afuc: Add more general T_IDENTIFIER in lexer
This frees us from having to strip the trailing colon, and makes it
easier to add other identifiers like for section names. The downside is
that now we can't name a label with a reserved word like "mov" but that
doesn't seem too bad.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
f7bf4db339 freedreno/afuc: Add .align directive
This will be necessary for aligning the sections.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
542ae9de01 freedreno/afuc: Improve jump table handling
Some a7xx firmwares have junk after the LPAC jump table, and the old
method of hardcoding the location of the jumptable and the jumptable
offset when assembling and disassembling also doesn't work well on a7xx
where the location of the jumptable offset changes. Make jump tables
explicit in the disassembly with a ".jumptbl" directive which expands to
contain the contents of the jump table, make disassembly find the jump
table and emit the directive there. Then add the ability for a literal
to reference a label, which will be used for the jump table offset at
the beginning of the firmware. The disassembler guesses when a word is
actually the jump table offset and replaces it with a relocation.

This restores the ability to disassemble a630_sqe.fw and a650_sqe.fw and
reassemble to an identical binary without modifying the disassembly to
remove the jump table.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
46681d64f6 freedreno/afuc: Use left recursion in parser
Otherwise we'll run out of stack space with many instructions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
c1955a0b16 freedreno/afuc: Fix setbit/clrbit parsing
We can't modify the instruction when parsing an operand, we will modify
the previous instruction, so just flatten out the rule.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
105ea1fc68 freedreno/afuc: Bump max instructions for a7xx
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
eeb2db3b5e freedreno/afuc: Add missing ALU encode case for bic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Connor Abbott
443e8b89ca freedreno/afuc: Decode (peek) modifier
This is an educated guess based on the location it is used in
(CP_INDIRECT_BUFFER).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00
Lucas Stach
f88c269148 etnaviv: tex_desc: emit texture comparator
For whatever reasons this has been known in rnndb for ages, but
never was hooked up in the driver. Do so now.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28218>
2024-03-18 20:07:22 +00:00
Lucas Stach
c6a6160583 etnaviv: don't use int filter for depth textures
The int filter has precision issues when used with depth textures,
causing failures in tests like piglit
spec@arb_depth_texture@fbo-depth-gl_depth_component16-drawpixels.

In addition to that the texture compare unit for GL_ARB_shadow
operations seems to be only implemented in the float filter pipe,
so this change also fixes this functionality on GPUs where it
isn't emulated, e.g. GC3000.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28218>
2024-03-18 20:07:21 +00:00
Gert Wollny
5464feed73 zink: set handle type also for user memory
Fixes the validation error
  VUID-vkBindBufferMemory-memory-02985
reported, e.g. by running piglit
  spec@amd_pinned_memory@map-buffer decrement-offset

v2: move setting the export type for user_mem get_export_flags and
    also set alloc_info->external for user_mem to avoid adding
    a conditional when finning the external buffer create info (Mike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28244>
2024-03-18 19:45:34 +00:00
Konstantin Seurer
995727e575 zink: Handle aoa derefs of images
Only the index of the inner array was used.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28250>
2024-03-18 19:24:43 +00:00
Gert Wollny
50a6c5d5fa nir-to-spirv: Cast SSBO input pointer when needed
Fixes validation error:
  VUID-VkShaderModuleCreateInfo-pCode-08737
  AtomicFAddEXT: expected Pointer to point to a value of type Result
Type
     %51 = OpAtomicFAddEXT %float %49 %uint_1 %uint_0 %50
when running
  spec@nv_shader_atomic_float@execution@ssbo-atomicadd-float

Fixes: 9f6be8effb
    zink: store and use alu types for ntv defs

v2: Fix commit message (Mike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28243>
2024-03-18 19:03:14 +00:00
duncan.hopkins
0108bae30f apple: Meson defines GLX_USE_APPLE to allow for Gallium drivers to work on MacOS.
By default, on MacOS, MESA will build a version that does not run the Gallium drivers on MacOS.
GLX_USE_APPLE must be defined to switch the code over to using the Gallium drivers.

GLX_USE_APPLE will be defined if any Gallium driver other than just SWRast is requested.
The default behaviour, due to default values, always asks for SWRast.
This logic leaves the default behaviour alone but allows the Gallium drivers to be actived without extra parameters.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28205>
2024-03-18 18:06:45 +00:00
duncan.hopkins
97b6851815 apple: Extended Apple feature support using GLX_USE_APPLE.
On MacOS/Apple/Dawin you can only get MESA to forward the GL funtions to
the systems OpenGL.framework or run SWRast directly. There is no way to use a gallium driver, even if they have been compiled.
The two gallium drivers of interest are SWRast and Zink, as the rest are hardware drivers and not relavent on MacOS.

The code changes add a new define GLX_USE_APPLE. This is used in combination with the existing GLX_USE_APPLEGL.
GLX_USE_APPLEGL calls the systems OpenGL.framework, Apple's OpenGL.
GLX_USE_APPLE calls the non-system OpenGL code, i.e. Gallium, hence the subtle naming difference. Apple systems are still used, just not the GL ones.
When GLX_USE_APPLE is defined the code will use the DRI/gallium driver sub-system so SWRast and Zink can selected at runtime on MacOS.

This also allows Zink to be run on MacOS, once it is fixed up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28205>
2024-03-18 18:06:45 +00:00
duncan.hopkins
b0bdd0cae3 meson: relaxed some meson restrictions on MacOS/Apple allowing for wider build support.
This patch allows the meson build files, on MacOS, to build the DRI2 and EGL code paths.

This is needed to activate the gallium drivers for swrast and zink to be used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28205>
2024-03-18 18:06:45 +00:00
duncan.hopkins
af04f17909 glx: Switched DRI2 functions over to use Apple specific alternatives and extension name.
DRI2 calls are different between Linux and MacOS.
Calling these Linux version on MacOS using xquartz fails with 'unknown' codes.

This patch hardwires a number of the utility DRI2 functions to use the MacOS
specific version that already exist for APPLEGL.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28205>
2024-03-18 18:06:45 +00:00
Mike Blumenkrantz
c0158b40ca mesa/st: use sanitized shader keys for feedback draws
the draw module shouldn't use any other shader keys, so ensure they
are never set

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28189>
2024-03-18 17:05:05 +00:00
Mike Blumenkrantz
5eb0136a3c mesa/st: when creating draw shader variants, use the base nir and skip driver opts
draw module shaders are sometimes incompatible with driver-specific
lowering passes, so ensure that the shaders received by draw are as
close to the originating source as possible

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28189>
2024-03-18 17:05:05 +00:00
Mike Blumenkrantz
1f7a4cf191 mesa/st: add is_draw_shader param to st_finalize_nir
this is used for skipping all the driver-specific lowering

it is not currently set

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28189>
2024-03-18 17:05:05 +00:00
Mike Blumenkrantz
f2f640f3c7 mesa/st: add 'base_serialized_nir'
this is the pre-finalize nir which has (ideally) not been mangled
by driver-specific lowering passes

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28189>
2024-03-18 17:05:05 +00:00
Valentine Burley
3d279bee0a tu/rmv: Remove tu_rmv_DebugMarkerSetObjectNameEXT
Replaced by DebugMarkerSetObjectNameEXT from the common Vulkan runtime
introduced in f3fe1f2f ("vulkan: Implement DebugMarkerSetObjectNameEXT")

Fixes: a13860e5 ("tu: add RMV support")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28125>
2024-03-18 16:10:21 +00:00
Eric Engestrom
ad580a711b radeonsi/ci: udpate expected failures
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56378175
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56393368
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56414989

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28246>
2024-03-18 14:03:46 +00:00
Georg Lehmann
67997fd735 aco: avoid full 32bit imul for uniform reduce/scan
Foz-DB Navi31:
Totals from 24 (0.03% of 79395) affected shaders:
Instrs: 1172275 -> 1172078 (-0.02%)
CodeSize: 5974424 -> 5973860 (-0.01%)
Latency: 5896216 -> 5895923 (-0.00%)
InvThroughput: 1167928 -> 1167869 (-0.01%)
VALU: 625756 -> 625636 (-0.02%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28223>
2024-03-18 13:37:28 +00:00
Georg Lehmann
96ff511b75 aco/optimizer: combine v_mul_i32_i24 and add to mad
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28223>
2024-03-18 13:37:28 +00:00
Georg Lehmann
0c57340c23 aco/builder: use 24bit mul if low bits of imm are zero
Foz-DB Navi31:
Totals from 39 (0.05% of 79395) affected shaders:
Instrs: 62712 -> 62696 (-0.03%)
CodeSize: 330096 -> 329896 (-0.06%)
Latency: 192747 -> 192561 (-0.10%)
InvThroughput: 34078 -> 33889 (-0.55%)
VALU: 38979 -> 38963 (-0.04%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28223>
2024-03-18 13:37:28 +00:00
Georg Lehmann
b48a101d8f aco/builder: improve v_mul_imm for negative imm
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28223>
2024-03-18 13:37:27 +00:00
Juan A. Suarez Romero
4f6f2cea6a v3dv: enable smooth line rendering
This is based on a lowering that we are already using in the OpenGL
driver.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28171>
2024-03-18 12:09:12 +00:00
Juan A. Suarez Romero
f5d4242928 v3dv: assume that rasterization state can be NULL
So far to check if rasterization discard is enabled or not we assumed
that rasterization state struct was never NULL.

However, as this will change with VK_EXT_extended_dynamic_state3, it can
be a good idea just to assume it can be NULL, so adding the check too.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28171>
2024-03-18 12:09:11 +00:00
Juan A. Suarez Romero
d6553bf177 compiler,gallium: move u_reduced_prim to common
Useful function that even Vulkan drivers can use.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28171>
2024-03-18 12:09:11 +00:00
Amber
7a236dc785 tu: re-emit vertex buffer on MESA_VK_DYNAMIC_VI_BINDINGS_VALID dirty.
Previously cmd->state.vertex_buffers.size changing would not trigger
a re-emission of the state, leading to dEQP-VK.dynamic_state.*.line_width.*
failing on A7XX.

Signed-off-by: Amber Harmonia <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28208>
2024-03-18 11:37:00 +00:00
Amber
44a3a3e7d9 tu: Add MESA_VK_DYNAMIC_RS_LINE_WIDTH to tu_rast_state.
Dynamic graphics state for line width changing did not trigger a
re-emission of A6XX_GRAS_SU_CNTL.

fixes:
dEQP-VK.dynamic_state.*.blit
dEQP-VK.dynamic_state.*.clear
dEQP-VK.dynamic_state.*.resolve

For A7XX.

Signed-off-by: Amber Harmonia <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28206>
2024-03-18 11:15:58 +00:00
Eric Engestrom
f455ac88b8 vc4/ci: add flake
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56377699
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56392947
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56421981

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28238>
2024-03-18 10:37:13 +00:00
Benjamin Tissoires
ba2af1dc36 CI: add mr-label-maker.yml config
We are currently relying on `mr-label-maker` to automatically tag MRs
or issues. However, the config of the bot was done in the python project
itself as a python class.

Since https://gitlab.freedesktop.org/freedesktop/mr-label-maker/-/merge_requests/25,
we can have an external yaml config file that can be included as an URL
from the bot point of view.

This means that we can now keep the configuration of the bot in the mesa
project itself, lowering the difficulties to include a change in this
configuration.

Note: https://gitlab.freedesktop.org/freedesktop/fdo-bots/-/merge_requests/19
needs to be merged so that this whole mechanic is in place.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28126>
2024-03-18 10:26:19 +00:00
David Rosca
4b7b185711 radv/video: Set maxActiveReferencePictures to 16 for H264/5
H265 supports 16 reference frames too.

Fixes validation errors when decoding H265 stream with more than 8 reference
frames.

Cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27541>
2024-03-18 10:04:52 +00:00
Nikita Popov
99f0449987 Pass no-verify-fixpoint option to instcombine in LLVM 18
When LLVM 18 is used, pass the no-verify-fixpoint option when
running the instcombine pass. Otherwise LLVM may abort with an
error.

The background here is that this option is enabled by default for
testing purposes, because instcombine is normally only explicitly
invoked like this inside tests. If it is used in an actual
production pipeline, the no-verify-fixpoint option needs to be
enabled.

This should fix the issue reported at
https://bugzilla.redhat.com/show_bug.cgi?id=2268800.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28101>
2024-03-18 09:27:15 +00:00
Eric Engestrom
7982751307 ci/deqp: backport fix for dEQP-VK.wsi.direct_drm.* bug
Fixes these tests:
- dEQP-VK.wsi.direct_drm.full_screen_exclusive.*
- dEQP-VK.wsi.direct_drm.maintenance1.*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28229>
2024-03-17 11:09:30 +00:00
Eric Engestrom
eac703f691 Revert "nouveau: add missing vl lib"
This reverts commit 4e3f3c10e1.

That commit turns out to be breaking the build in some cases.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10830
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28226>
2024-03-16 20:51:15 +00:00
Faith Ekstrand
7bd1d4848c Revert "nvk: Enable VK_KHR_shader_subgroup_uniform_control_flow"
This reverts commit ac5d529c65.  We're
failing 4 of the tests:

dEQP-VK.reconvergence.subgroup_uniform_control_flow_ballot.compute.nesting4.1.2
dEQP-VK.reconvergence.subgroup_uniform_control_flow_elect.compute.nesting4.1.2
dEQP-VK.reconvergence.workgroup_uniform_control_flow_ballot.compute.nesting4.1.2
dEQP-VK.reconvergence.workgroup_uniform_control_flow_elect.compute.nesting4.1.2

This is because we aren't guaranteeing re-convergence for loop
continues.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28221>
2024-03-15 21:46:00 -05:00
Marek Olšák
f424ef1801 r300: enable tiling for scanout to fix DRI3 performance
Also don't use square tiling for scanout because the DDX doesn't use it
either.

Reviewed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28209>
2024-03-15 22:20:54 +00:00
Marek Olšák
58b773bd9a r300: port scanout pitch alignment from the DDX to fix DRI3
This wasn't needed with DRI2 because only the DDX allocates scanout
surfaces with DRI2.

Fixes: d779a5d16a - r300g: cleanup texture creation code
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2780

Reviewed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28209>
2024-03-15 22:20:54 +00:00
Faith Ekstrand
3bed7b22fe nvk: Always set SET_ATTRIBUTE_POINT_SIZE
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28217>
2024-03-15 21:08:35 +00:00
Iván Briano
446f652cde intel/cmat: fix stride calculation in cmat load/store
The stride given in the shader is in number of elements of the of the
type pointed by the given pointer, which may not match the matrix own
element type.
Since we cast the pointer to match the element type, the stride needs to
be ajusted accordingly.

v2:
 - Fix mismatching bit-width in matrix element type and pointer type (Caio)
 - Do the stride calculation in one place

Fixes dEQP-VK.compute.pipeline.cooperative_matrix.khr_*.multicomponent.*

Fixes: 3a35f8b29b ("intel/cmat: Lower cmat_load and cmat_store")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10820

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27903>
2024-03-15 20:34:43 +00:00
Marek Olšák
ba6dfb6ca4 amd/ci: update stoney results
The dEQP failures are expected.
The occlusion query ones are new flakes, but I don't know what introduced them.
The checksum changes are expected due to new optimizations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
9b819adbd8 glsl/linker,st/mesa: enable nir_opt_varyings and lower IO in the linker
The varying linker isn't changed. The passes are executed after linking
varyings and before linking uniforms if nir->options->lower_io_variables
is true. nir_opt_varyings can move uniforms between shaders and cause them
to be DCE'd.

It requires moving IO deref lowering from st/mesa into the GLSL linker
and nir_opt_varyings should be added at the same time because IO deref
lowering alone would disable IO optimizations in st/mesa such as
compaction.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
70fd817278 st/mesa: skip a few NIR passes that don't work with lowered IO
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
b48188e46c st/mesa: lower sysvals slightly sooner
This will make a later commit simpler. No change in behavior.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
a3de3a5c32 st/mesa: get dual slot input info from NIR if IO is lowered
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
f28f8bba9f radeonsi: add test failures due to incorrect tests for nir_opt_varyings
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
abf0de57ab radeonsi: enable uniform propagation for varyings except VP/Energy
It regresses performance of VP/Energy.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
db5cf460d7 radeonsi: set trivial NIR options for nir_opt_varyings
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
5bbb279e7d radeonsi: set the lower_mediump_io callback for GLSL
It will be called by the GLSL linker before nir_opt_varyings.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
6dbd1dcd93 nir/tests: add tests for nir_opt_varyings
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
c66967b5cb nir: add nir_opt_varyings, new pass optimizing and compacting varyings
Highlights:
- all shader stages and all input/output types are handled, including
  inputs and outputs with multiple vertices
- the optimizations performed are: unused input/output removal, constant
  and uniform propagation, output deduplication, inter-shader code motion,
  and compaction
- constant and uniform propagation and output deduplication work even
  if a shader contains multiple stores of the same output, e.g. in GS
- the same optimizations are also performed between output stores and
  output loads (for TCS)
- FS inputs are packed agressively. Only flat, interp FP32, and interp
  FP16 can't be in the same vec4. Also, if an output value is
  non-divergent within a primitive, the corresponding FS input is
  opportunistically promoted to flat.

The big comment at the beginning of nir_opt_varyings.c has a detailed
explanation, which is the same as:
    https://gitlab.freedesktop.org/mesa/mesa/-/issues/8841

dEQP and GLCTS have incorrect tests that fail with this, see:
    https://gitlab.freedesktop.org/mesa/mesa/-/issues/10361

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Marek Olšák
ba54099dce nir: add a utility computing post-dominance of SSA uses
The massive comment explains it.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
2024-03-15 19:55:46 +00:00
Yogesh Mohan Marimuthu
9d76ba37e8 winsys/amdgpu: add more comments for winsys create in header file
v2: add data diagram (Pierre-Eric)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Yogesh Mohan Marimuthu
f93f7f8f3a winsys/amdgpu: remove tab space
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Yogesh Mohan Marimuthu
efbd602b63 winsys/amdgpu: use _destroy_locked() for failure to create winsys
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Yogesh Mohan Marimuthu
5b6c0fdc97 winsys/amdgpu: aws instead of ws for amdgpu_winsys
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Yogesh Mohan Marimuthu
c7e8486130 winsys/amdgpu: rws instead of ws for radeon_winsys
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Yogesh Mohan Marimuthu
f2275eed44 winsys/amdgpu: sws instead of ws for amdgpu_screen_winsys
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27968>
2024-03-15 18:06:55 +00:00
Valentine Burley
92879e9da8 docs/features: Add missing VK_EXT_surface/swapchain_maintenance1 entry
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28203>
2024-03-15 17:48:30 +00:00
Valentine Burley
5bde82b353 nvk: Expose VK_EXT_swapchain_colorspace
This extension is basically a no-op exposing some new enums.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28203>
2024-03-15 17:48:29 +00:00
Valentine Burley
68e93cce5e nvk: Expose VK_EXT_surface/swapchain_maintenance1
Passes dEQP-VK.wsi.*.maintenance1.*.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28203>
2024-03-15 17:48:29 +00:00
Valentine Burley
547636dc43 nvk: Expose VK_EXT_display_control
Use the common implementation.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28203>
2024-03-15 17:48:29 +00:00
Valentine Burley
3da1c0b6c9 nvk: Fix missing implementation of creating images from swapchains
These pNext structs are part of VK_KHR_swapchain which is core Vulkan
1.1 but they were missing. Based on ANV and RADV.

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

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28203>
2024-03-15 17:48:29 +00:00
Pavel Ondračka
092299f18a r300: remove some late NIR passes
Some of those are no longer needed after moving the sin/cos input fixups
to finalize_nir, while others were are just some unneeded remnants from
nir_to_tgsi era.

Almost no shader-db change on RV530:
total instructions in shared programs: 128940 -> 128939 (<.01%)
instructions in affected programs: 154 -> 153 (-0.65%)
helped: 3
HURT: 2
total cycles in shared programs: 197402 -> 197401 (<.01%)
cycles in affected programs: 263 -> 262 (-0.38%)
helped: 3
HURT: 2

or RV370:
total instructions in shared programs: 83946 -> 83944 (<.01%)
instructions in affected programs: 32 -> 30 (-6.25%)
helped: 2
HURT: 0
total cycles in shared programs: 132829 -> 132827 (<.01%)
cycles in affected programs: 93 -> 91 (-2.15%)
helped: 2
HURT: 0

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28070>
2024-03-15 17:28:32 +00:00
Pavel Ondračka
d430225b29 r300: move sin/cos input fixups to finalize_nir
RV530 shader-db (and similarly R420):
total instructions in shared programs: 129022 -> 128940 (-0.06%)
instructions in affected programs: 4142 -> 4060 (-1.98%)
helped: 48
HURT: 10
total cycles in shared programs: 197475 -> 197402 (-0.04%)
cycles in affected programs: 4906 -> 4833 (-1.49%)
helped: 45
HURT: 10
total temps in shared programs: 17551 -> 17543 (-0.05%)
temps in affected programs: 71 -> 63 (-11.27%)
helped: 8
HURT: 0
total consts in shared programs: 94392 -> 94358 (-0.04%)
consts in affected programs: 2963 -> 2929 (-1.15%)
helped: 35
HURT: 1

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28070>
2024-03-15 17:28:32 +00:00
Pavel Ondračka
ba1bc94233 r300: explicitly check if sin/cos input is already in correct range
before applying the input range normalization. This allows to move the pass
to finalize nir later without worrying we would apply the fixup twice and
also saves few instructions in wined3d shaders, where d3d9 already
guarantees the correct input range.

RV530 shader-db (and similarly for R4xx) improves few Anno1404 shaders:
total instructions in shared programs: 129040 -> 129022 (-0.01%)
instructions in affected programs: 310 -> 292 (-5.81%)
helped: 5
HURT: 0

no change on RV370

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28070>
2024-03-15 17:28:32 +00:00
Samuel Pitoiset
67fd490fe5 radv: add a GPU hang workaround for legacy tess+GS for GFX10.3
Ported from RadeonSI ea94cb95e4
("radeonsi/gfx10.3: add a GPU hang workaround for legacy tess+GS")

Fixes: a23802bcb9 ("ac,radeonsi: start adding support for gfx10.3")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28165>
2024-03-15 16:38:14 +00:00
Samuel Pitoiset
96e9c3fe77 radv: program SAMPLE_MASK_TRACKER_WATERMARK optimally for GFX11 APUs
Ported from RadeonSI 6ce3a95852
("radeonsi/gfx11: program SAMPLE_MASK_TRACKER_WATERMARK optimally for APUs")

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28165>
2024-03-15 16:38:14 +00:00
Samuel Pitoiset
d81809618f radv: fix programming of PA_SC_BINNER_CNTL_1.MAX_ALLOC_COUNT on GFX11
Ported from RadeonSI 7d3a414662
("radeonsi/gfx11: fix programming of PA_SC_BINNER_CNTL_1.MAX_ALLOC_COUNT")

Fixes: 25a66477d0 ("radeonsi/gfx11: register changes")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28165>
2024-03-15 16:38:14 +00:00
Samuel Pitoiset
8203284c03 radv: disable binning correctly on GFX11.5
Ported from RadeonSI 20445f296b
("radeonsi: disable binning correctly on gfx11.5").

Fixes: b44a886b84 ("amd/common: add registers for gfx11.5")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28165>
2024-03-15 16:38:14 +00:00
Yonggang Luo
680e707534 treewide: Replace the invalid usage #if DEBUG with #ifdef DEBUG
This is done by find&replace and exclude the following folders in vscode
docs,*.rs,addrlib,src/imgui,*.sh,src/intel/vulkan/grl/gpu

This is a prepare step for re-working https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21946

These issues are found when to try switch DEBUG to MESA_DEBUG=0|1 in MR

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28083>
2024-03-15 16:08:18 +00:00
Friedrich Vock
3f1cb470f0 radeonsi: Only enable SEs that the device reports
Matches PAL behavior.

Cc: mesa-stable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28196>
2024-03-15 13:23:34 +00:00
nyanmisaka
bad41f4db7 frontends/va: Report vendor and device ID through VADisplayPCIID
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18718>
2024-03-15 13:05:27 +00:00
Eric Engestrom
7c480c2066 nouveau/ci: only trigger jobs for relevant changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28204>
2024-03-15 12:49:20 +00:00
Eric Engestrom
67bb74863d nouveau/ci: fix yaml indentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28204>
2024-03-15 12:49:20 +00:00
Eric Engestrom
4e3f3c10e1 nouveau: add missing vl lib
It's always been missing since the conversion to meson.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10792
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28133>
2024-03-15 12:28:13 +00:00
Rohan Garg
656f590bf5 iris,anv: WA 1509820217 is no impact for Xe2+
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28201>
2024-03-15 12:02:45 +00:00
Eric Engestrom
5b3cb226b1 ci: include all the src/**/gitlab-ci.yml files
No risk of getting it wrong, and this means adding the upcoming ones
will no longer trigger a full CI.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28202>
2024-03-15 11:22:54 +00:00
duncan.hopkins
5fabb66f59 dri: guarded DRI code.
Added code guards that isolate DRM code paths so platformss that do not have DRM libraries can compile.
MacOS does not have vf86drm library and headers.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
fcd0b4c94a util: Updated util/libdrm.h stubs with drmGetMagic()
Update adds in missing items that MacOS code needs to compile and run the DRI2 code.

New code is copied from the public repository: https://gitlab.freedesktop.org/mesa/drm/-/blob/main/xf86drm.h

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
8ad4862126 gallium/dri: Added XCB dependency to frontends/dri/libdrm build. Fix header issues with xcb.h being used.
On systems where the xcb.h is not in the standard prefixed location,
meson needs to be told where to find it.
Adding the `dep_xcb` to the `libdri`build fixes this.

This issue happened on macOS when the brew package manager was not in the default location.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
00e1562f5b gallium/dri: Switch xf86drm.h for util/libdrm.h to allow for the no-op shim to be used.
This patch allows MacOS to compile the dri[2] systems by switching from direct xf86drm.h to
the pre-existing util/libdrm.h.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
1d9215f904 egl: Changed EGLNativeDisplayType size check to make sure it is big enough instead of exactly the same size.
MacOS uses a smaller EGLNativeDisplayType than 'void*', which is big enough for the storage.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:12 +00:00
duncan.hopkins
4477139ec2 egl: Added DRI3 code guards.
MacOS does not have any DRI3 libraries, these code guards hide the code paths
the fail to compile without DRI3.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:11 +00:00
duncan.hopkins
275fdf709d egl: MacOS platform guard around pthread_condattr_setclock()
This patch disabled the call to pthread_condattr_setclock on MacOS/Apple platforms.
This funciton is missing from the the Xcode pthread implemetation.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:11 +00:00
duncan.hopkins
8387deff87 compiler/clc: fix compiler issue on MacOS with st_mtim[e] in stat.
MacOSs 'sys/stat.h' version of 'stat' doe snot have the 'st_mtim' that is used on other systems.
The change allows MacOS to use 'st_mtime' without affecting the behaviour on any other platform.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
2024-03-15 10:50:11 +00:00
Samuel Pitoiset
6146a1651a radv: emit VGT_GS_OUT_PRIM_TYPE as part of the dynamic primitive topology
With pipelines, the topology class is known at creation time but with
ESO this needs to be re-emitted when the topology change and not only
when graphics shaders are emitted.

This fixes spec@nv_primitive_restart@primitive-restart-* with Zink
when shader object is enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28179>
2024-03-15 09:26:33 +00:00
Samuel Pitoiset
ccf894f29c radv: fix RADV_PERFTEST=dmashaders with ESO
Update the shader upload sequence when individual shaders are bound
to fix that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28154>
2024-03-15 08:10:59 +00:00
Samuel Pitoiset
dd0b4f05ad radv: add helpers to bind the GS copy shader and the RT prolog
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28154>
2024-03-15 08:10:59 +00:00
Friedrich Vock
cc61409ea6 radv: Only enable SEs that the device reports
Matches PAL behavior.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28195>
2024-03-15 07:31:34 +00:00
Caio Oliveira
bfdcddfda9 intel/tools: Make intel_stub_gpu work when using meson devenv
When `meson devenv` is used, the shim library that is meant to be
preloaded is not necessarily available at the installation dir.  So
when running in that mode both the script and the shim library will
be in the same (build) directory, so adjust the ld_preload to pick
that.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10798
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28134>
2024-03-15 03:25:46 +00:00
Jordan Justen
6922f421f4 intel/compiler: nib_ctrl no longer exists on Xe2+
Ref: cfb34dc695 ("intel/eu/validate: Validate that the ExecSize is a factor of chosen ChanOff")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28191>
2024-03-15 03:01:53 +00:00
Jordan Justen
72d289b8d1 intel/compiler/fs: Restore SIMD32 restriction for ray_queries on Xe2
In 96e0d979a7, the restriction was dropped because we don't compile a
SIMD8 program on Xe2. This change moves it to run_fs() so the
restriction will be added when compiling SIMD16 on Xe2.

Fixes: 96e0d979a7 ("intel/fs: Check fs_visitor instance before using it")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28191>
2024-03-15 03:01:53 +00:00
Marcin Ślusarz
2ad4d5f8dd intel/compiler/xe2: fix decoding of sampler simd mode
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28191>
2024-03-15 03:01:53 +00:00
Lionel Landwerlin
4df58ef503 intel/fs: bump max simd size of some messages for xe2
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28191>
2024-03-15 03:01:53 +00:00
Caio Oliveira
e5bc5bba7c anv: Enable VK_KHR_shader_maximal_reconvergence
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27278>
2024-03-15 02:10:21 +00:00
Yiwei Zhang
d56f65f7ca venus: ensure shmem is attached to renderer before use for guest vram
For guest vram, there's already roundtrip to protect device memory alloc
ordering. This change adds the same protection for shmem used in below
scenarios and optimize to wait for new shmem only.
- reply shmem
- indirect upload shmem
- cmd stream shmem

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28147>
2024-03-15 01:51:16 +00:00
Yiwei Zhang
72b124031b venus: minor naming cleanups
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28147>
2024-03-15 01:51:16 +00:00
Yiwei Zhang
362ba3f007 venus: roundtrip now belongs to ring
A roundtrip is to ensure a cmd via virtqueue happens on the renderer
side before a ring relies on it. Since venus is now with multi-ring, the
roundtrip submit and wait should belong to ring instead of instance, and
each ring owns its own roundtrip seqno to synchronize with virtqueue.

No behavior change.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28147>
2024-03-15 01:51:16 +00:00
Faith Ekstrand
160aa8ba48 nvk: Ignore rasterizationSamples when handling sampleShadingEnable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28192>
2024-03-15 01:31:55 +00:00
Timothy Arceri
20db9b77aa glsl: move invariant builtin validation to the nir linker
We don't attempt to recreate a nir implementation of the symbol table
instead here we simply use location to find the variables we need to
validate.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28142>
2024-03-15 00:01:34 +00:00
Yiwei Zhang
1bc25f4754 venus: optimize to further batch query records
Below is the common client pattern (app, angle, zink, etc):
- a few resets for queries to be used in this batch
  - optional, depending on EXT_host_query_reset
- a few queries
  - incremental
  - can cross query pool boundary

The HW drivers normally have faster shader path when there are too many
individual reset and copies. Without further resolving, this ends up
with linear overhead on the 2d engines. This change has largely
optimized that:
- angle: many copies => 1 copy (or 2)
- zink: many resets and copies => 1 reset and 1 copy (or 2)

and again...some more renamings around

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
7c221e65a4 venus: add vn_queue_submission_get_resolved_query_records
This new split is for the getting the resolved query records, which is
to prepare for further query records resolving.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
e868fc0b1e venus: refactor vn_queue_submission_add_query_feedback
Drop vn_combine_query_records_and_record_feedback to save the lines of
codes for args preparing. Also refactor to avoid the cmd stride trick,
but use indexing.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
a6bc116f84 venus: rewrite qfb vn_feedback helpers
1. move record into alloc to simplify caller handling, which aligns
   with ffb and sfb as well
2. simplify locking to reduce lock overhead
3. remove unbalanced free from record helper
4. move reset to alloc

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
aabb52979a venus: refactor query record recycle
Add a new free helper while renaming the alloc one as well. During query
record resolving, use a dropped list to store those records being reset.
This is to prepare for later further query record resolving.

This change also simplifies a query pool compare.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
2a7085584e venus: simplify vn_cmd_reset and apply more code sharing
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
5dbd88ad2a venus: drop vn_get_temp_cmd_ptr
It's more robust to base on original batch cmds instead of assuming
various constraints on copied cmds in the temp storage.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
9e7797c8c1 venus: minor cmd count related refactors
This is to prepare for qfb refactor, so that we can distinguish the
current batch's cmd count and the appended new cmd count

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:44 +00:00
Yiwei Zhang
4bab7344a8 venus: massive qfb renamings
Summary:
- vn_feedback_query_batch => vn_cmd_query_record
- combined_batches => resolved_batches
- vn_feedback_query => vn_query_feedback

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:43 +00:00
Yiwei Zhang
25be8e721d venus: combine query record and reset
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:43 +00:00
Yiwei Zhang
71bf46fa5d venus: qfb to track cmd handle directly
since all usages are with vk handle

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28112>
2024-03-14 23:40:43 +00:00
Mike Blumenkrantz
e931ef4884 zink: iterate all the modes when doing separate shader fixups
otherwise this might only do the inputs without also handling outputs

Fixes: 0a12cedec9 ("zink: add a special separate shader i/o mode for legacy variables")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28185>
2024-03-14 23:17:02 +00:00
Faith Ekstrand
b68f2e747c zink: Rework sparse texture lowering
Instead of the previous fragile attempt to handle sparse_resident_and
by crawling deref chains, we now insert an is_sparse_resident_zink
intrinsic immediately after the tex or sparse_load intrinsic and define
Zink's sparse resident codes to always be 0/1.  Then sparse_resident_and
becomes iand and is_sparse_texels_resident becomes != 0 and everything
is well-defined and robust.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28123>
2024-03-14 22:37:51 +00:00
Eric Engestrom
8a5120003c ci/deqp: document which build produces which binary
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28181>
2024-03-14 22:06:05 +00:00
Corentin Noël
51593c6b34 dri/kopper: Assume a non-null drawable in flush_frontbuffer
It is expected that drawable is non-null here so don't add check for it.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28180>
2024-03-14 21:30:31 +00:00
Kenneth Graunke
484246ea0a iris: Eliminate prototype introduced in the previous patch
By moving iris_flush_resource() below.  This is done separately to
make the diff for the actual change in the previous patch easier to
follow.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
2024-03-14 20:37:09 +00:00
Kenneth Graunke
fa24ff24dd iris: Remove suballocation in iris_flush_resource()
pipe->flush_resource() is called from eglCreateImageKHR in order to
prepare images to be shared.  It also has a valid context.  We can
just remove suballocation there, rather than doing it on the first
dri_image_query like radeonsi does.

This is much simpler and seems to work fine.

Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
2024-03-14 20:37:09 +00:00
Sviatoslav Peleshko
a330ecc48a dri: Flush the context after flush_resource when creating shareable image
This makes sure that we'll be done with any pending preparations before
the actual export of the resource.

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
2024-03-14 20:37:09 +00:00
Nanley Chery
27d35588f5 iris: Copy main ISL surf when reallocating in place
When reallocating a resource in place, we make sure to pass the
PIPE_BIND_SHARED flag for the new resource. On ACM, this generally
changes the allocation of the resource from tiled to linear. To pick up
the new layout of the resource, copy the new ISL surf.

This enables ACM to pass piglit's egl-ext_egl_image_storage
test.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10367
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154>
2024-03-14 20:37:09 +00:00
Valentine Burley
98690db847 tu: Reorder device features
Sort device features by KHR, EXT, vendor and then alphabetically within that.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28095>
2024-03-14 19:13:23 +00:00
Valentine Burley
1726e03df4 tu: Advertise VK_KHR_vertex_attribute_divisor
This is a promotion from the EXT, except the new property
supportsNonZeroFirstInstance which should already be supported.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28095>
2024-03-14 19:13:23 +00:00
Valentine Burley
355dd782c5 tu: Implement VK_KHR_map_memory2
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28080>
2024-03-14 18:50:19 +00:00
Corentin Noël
e7de9ab62a zink: Make sure to initialize all the fields of VkMemoryBarrier
Fixes several random validation errors as the value of dstAccessMask could be
anything.

Cc: mesa-stable
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28166>
2024-03-14 18:29:14 +00:00
Danylo Piliaiev
2aab8e0806 meson: Correctly get sizeof_pointer with cross-compilers
"native : true" used build system's compiler to determine
sizeof void*, which is wrong - we need to use host compiler.

Found when using pure NIX cross-compilation environment.

Fixes: ad34c932cd
("glapi: pass pointer size to python for glthread from meson")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.co
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28177>
2024-03-14 17:49:18 +00:00
Yonggang Luo
d2229304dc panfrost/meson: remove redundant gallium include from meson files
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24439>
2024-03-14 17:23:55 +00:00
Yonggang Luo
13ce0358b0 panfrost/shared: avoid use gallium helper in pan_minmax_cache.*
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24439>
2024-03-14 17:23:55 +00:00
Lionel Landwerlin
20df1d2b1f anv: ignore descriptor alignment for inline uniforms
For this particular case only it doesn't matter. Fixes some new CTS
tests with small inline uniform sizes.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28040>
2024-03-14 16:54:30 +00:00
Corentin Noël
812be09cd2 st_pbo/compute: Use the correct structure type when allocating a specialized key
Use pbo_spec_async_data instead of pbo_async_data.

Cc: mesa-stable
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28173>
2024-03-14 16:18:13 +00:00
José Roberto de Souza
27ab5fcf9f anv: Set VM control to true in Xe KMD
Xe KMD needs VMs to be created to work.
Setting this on Xe KMD code path allow us to simply a feature check
in init_queue_families().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28161>
2024-03-14 15:53:22 +00:00
José Roberto de Souza
c20388d617 anv: Set VK_QUEUE_PROTECTED_BIT during queue families initialization
Don't make sense to only set it in VkGetPhysicalDeviceQueueFamilyProperties2().
Not setting it to the code path without pdevice->engine_info because
the protected support landed on i915 after DRM_I915_QUERY_ENGINE_INFO.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28161>
2024-03-14 15:53:22 +00:00
José Roberto de Souza
9102cb972a anv: Replace the 2 sparse booleans by 1 enum
Having just one place to check the Sparse type is less error prone.
For example in i915 it was always setting sparse_uses_trtt to true
even if running in gfx 9 that don't support sparse.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28161>
2024-03-14 15:53:22 +00:00
Rhys Perry
ec892c4d2b aco: don't reuse misaligned attribute destination VGPRs in VS prologs
Since we split misaligned attributes, we could overwrite one of these
VGPRs in the middle of loading the attribute.

For example:
   v_add_u32_e32 v4, vcc, s7, v1
   s_waitcnt lgkmcnt(0)
   buffer_load_dword v4, v4, s[32:35], 0 idxen
   buffer_load_dword v5, v4, s[32:35], 0 idxen offset:4
can overwrite the vertex index in the load of the first component.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27920>
2024-03-14 15:30:12 +00:00
Rhys Perry
df7024bcdd radv,aco: allow VS prologs to increase VGPR usage
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27920>
2024-03-14 15:30:12 +00:00
Samuel Pitoiset
1a20942f6a radv: fix wave32 support with ESO
For example when RADV_PERFTEST=gewave32 is used, the vgt shader key
was incorrect.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28151>
2024-03-14 14:56:45 +00:00
Samuel Pitoiset
e1c73db01c radv: rework generating vgt_shader_key for pipelines
This new helper will also be used for ESO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28151>
2024-03-14 14:56:45 +00:00
Samuel Pitoiset
c6485f560d radv: determine radv_vgt_shader_key::has_ngg_xxx with the last VGT shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28151>
2024-03-14 14:56:44 +00:00
Samuel Pitoiset
9ccbd459c6 radv: fix determining if PrimId is used for merged shaders compiled separately
For ESO when TES and GS are compiled separately,
BREAK_WAVE_AT_EOI/IA_SWITCH_ON_EOI must be enabled if the GS uses
PrimID.

This fixes
tests/spec/arb_tessellation_shader/execution/gs-primitiveid-instanced.shader_test
on RDNA2 when shader object is enabled with Zink.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28149>
2024-03-14 14:34:19 +00:00
Guilherme Gallo
e052e30b29 r300/ci: Update xfiles based on nightly run
Refer to:
- https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1125483
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164946

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00
Guilherme Gallo
3d45451fb4 etnaviv/ci: Update xfiles based on nightly run
Refer to:
- https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1125483

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00
Guilherme Gallo
7d9ba366d4 freedreno/ci: Update xfiles based on nightly run
Refer to:
- https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1125483
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164985
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164987
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164988
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164989
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164989
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164990
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164990

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00
Guilherme Gallo
c6b65ac639 v3d/ci: Update xfiles based on nightly run
Refer to:
- https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1125483
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164970

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00
Guilherme Gallo
4350c7cb30 radv/ci: Update xfiles based on nightly run
Refer to:
- https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1125483
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56167363

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00
Guilherme Gallo
697a5a7b91 radv+zink/ci: Update xfiles based on nightly run
Refer to: https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56164998

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28145>
2024-03-14 13:53:45 +00:00
Mike Blumenkrantz
0f5b0dbc25 zink: handle image_deref_samples when stripping MS image instrs
fixes #10812

Fixes: 660671d462b ("zink: add a pass to strip out multisample storage image ops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28160>
2024-03-14 13:17:45 +00:00
Mike Blumenkrantz
b46479d443 zink: don't deref swapchain image array with UINT32_MAX
this indicates an unacquired swapchain

Fixes: 8fb83c0935 ("zink: only update swapchain readback cache on create if necessary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28160>
2024-03-14 13:17:45 +00:00
Boris Brezillon
9f2b23dd85 panvk: Get rid of fields we already have in vk_xxx objects
There's no point adding our own pointer when the base vk_xxx object
already provides a way to get back to the parent. Replace those
fields by _get_xxx() helpers.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 11:32:39 +01:00
Boris Brezillon
d5ed77800e panvk: Fix GetPhysicalDeviceProperties2() to report accurate info
Fix GetPhysicalDeviceProperties2 to report accurate information, and
add comment explaining the reasoning behind the new limits.

While at it, stop using the MAX_xxx definitions since some of them
will be per-gen, and this file is not.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 11:32:33 +01:00
Boris Brezillon
783172add3 panvk: Make panvk_sampler inherit from vk_sampler
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
203f1a35a7 panvk: Implement {Map,Unmap}Memory2KHR
The core provides wrappers for {Map,Unmpa}Memory().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
d9c0c728a2 panvk: Add extra checks to panvk_MapMemory()
While at it, add error messages to the existing error paths.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
88930cd95d panvk: Make pan_AllocateMemory() robust to errors
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
db1fde16d7 panvk: Make panvk_device_memory inherit from vk_device_memory
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
4dc5613be6 panvk: Make panvk_buffer_view inherit from vk_buffer_view
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
567324749c panvk: Get rid of panvk_pipeline_cache
We use the vk runtime stubs.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
e7b68cdef1 panvk: Drop panvk_framebuffer
vk_framebuffer provides exactly the same thing, so let the core
implement the VkFramebuffer entry points for us.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
39204afde1 panvk: Kill panvk_{Create,Destroy}SamplerYcbcrConversion()
The vk runtime provides a default implementation, drop the stubs we
had.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
d2e6dbf0f6 panvk: Get rid of unused panvk_cmd_buffer fields
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
b91c8543c0 panvk: Don't pass a device where we don't need one
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
cab8f19361 panvk: Allocate descriptor set arrays using vk_multialloc_zalloc()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 10:26:13 +01:00
Boris Brezillon
1f69f99b2c panvk: s/panvk_event_op/panvk_cmd_event_op/
Make sure the object name reflects the fact this object is related
to vkCmdEvent not vkEvent.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Boris Brezillon
b59d2a5137 panvk: Don't allocate a TEXTURE descriptor in CreateImageView()
The texture descriptor is stored in a CPU-only template that gets copied
to the descriptor set. No need to reserve space in the texture payload
BO.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Boris Brezillon
40c1d0d322 panvk: Don't open-code panvk_cmd_open_batch() in CmdBeginRenderPass2()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Boris Brezillon
c4f7aa549c panvk: Add missing util_dynarray_init() in panvk_cmd_open_batch()
Doesn't make a difference in practice, because we are allocating with
zalloc, but let's explicitly call util_dynarray_init() for correctness.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Boris Brezillon
c73e2f984c panvk: Fix allocation scope of command buffer sub-objects
SCOPE_COMMAND means the allocation last only for the vkXxx call. Both
batches and clear values live longer than that.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Boris Brezillon
ff9c47f463 panvk: Get rid of the custom device lost handling
No panvk_device_set_lost() users yet, and if we start reporting
device-lost events, we will use vk_device_set_lost() directly.

Replace the only call to panvk_device_is_lost() by a vk_device_is_lost()
call.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Boris Brezillon
3aa02232a5 panvk: Get rid of unused panvk_image_get_plane_size() helper
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Boris Brezillon
ac61d6d0c0 panvk: Do not handle invalid NULL memory object in BindImageMemory2()
VkDeviceMemory objects passed to BindImageMemory2() are not allowed to
bu VK_NULL_HANDLE, so let's drop the if (mem) test and assert()
instead.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Boris Brezillon
b7d30f10f9 panvk: Add VKAPI_{ATTR,CALL} specifiers to all panvk-specific entrypoints
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Boris Brezillon
0136e8aec9 panvk: Kill the panvk_pack_color() prototype
The implementation was removed in 62e902101b ("panvk: Use
pan_pack_color").

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Boris Brezillon
43bb5acf26 panvk: clang-format the source files
We recently stopped enforcing clang-format in CI, but we still want to
be able to use it on new changes without pulling unrelated formatting
changes. Let's run it one more time to fix the existing formatting
issues.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Boris Brezillon
2d2820349a panvk: Fix call ordering in panvk_DestroyDevice()
Destroy the decode context when all private BOs attached to the device
have been destroyed, otherwise we a have use-after-free situation when
panvk_priv_bo_destroy() calls pandecode_inject_mmap().

Fixes: 211aa20194 ("panvk: Move away from panfrost_{bo,device}")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
2024-03-14 09:51:41 +01:00
Jordan Justen
ce900dcbb1 intel/dev: Add ATS-M PCI ID for Data Center GPU Flex 170G
Ref: bspec 44477
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28141>
2024-03-14 08:01:56 +00:00
Jordan Justen
59e0c38427 intel/dev: Adjust device strings for ATS-M devices
Ref: https://ark.intel.com/content/www/us/en/ark/products/230020/intel-data-center-gpu-flex-140.html
Ref: https://ark.intel.com/content/www/us/en/ark/products/230019/intel-data-center-gpu-flex-170.html
Ref: e00230a6c2/shared/source/dll/devices/devices_base.inl (L58-L59)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28141>
2024-03-14 08:01:56 +00:00
Eric Engestrom
9b6d6c1d2d docs: add sha256sum for 24.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28163>
2024-03-14 01:08:02 +00:00
Eric Engestrom
c0a40e724b docs: add release notes for 24.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28163>
2024-03-14 01:08:02 +00:00
Faith Ekstrand
7604697ec6 nvk: Implement shaderStorageImageMultisample
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9660
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:12 +00:00
Faith Ekstrand
357720c5a7 nvk: Use different descriptor layouts for storage vs. sampled images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:12 +00:00
Faith Ekstrand
86a462fb96 nvk: Stop pretending to handle Intel image intrinsics
This is probably just a copy+paste from ANV when I wrote the descriptor
code.  There's no actual point to pretending to do anything with these.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:12 +00:00
Faith Ekstrand
bd9836a0b8 nvk: Use a HW generation names instead of chipsets
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:12 +00:00
Faith Ekstrand
be1ef1a8d8 nil: Expose nil_pix_extent_sa()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:11 +00:00
Faith Ekstrand
418f8be9ea nil: Add a helper to view a MSAA image as samples
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:11 +00:00
Faith Ekstrand
ed6fd25a62 nil: Add support for larger textures on Pascal+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:11 +00:00
Faith Ekstrand
c3177e4fc2 nil: Whitespace fix
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:11 +00:00
Valentine Burley
72e1a57752 nvk: Reorder device features
Sort device features by KHR, EXT, vendor and then alphabetically within that.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28094>
2024-03-13 23:30:46 +00:00
Valentine Burley
94622ae491 nvk: Advertise VK_KHR_vertex_attribute_divisor
This is a promotion from the EXT, except the new property
supportsNonZeroFirstInstance which is already supported.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28094>
2024-03-13 23:30:46 +00:00
Dave Airlie
133c73da85 nvk: enable a mappable bar heap when rebar is disabled.
Now that we've resolved the kernel side issues, this should be fine
to expose on non-rebar systems.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28144>
2024-03-13 23:13:40 +00:00
Pavel Ondračka
647a2d1f6b r300/ci: enable nine tests
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27434>
2024-03-13 22:31:26 +00:00
Pavel Ondračka
98b36e02b9 ci: build nine tests
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27434>
2024-03-13 22:31:26 +00:00
Pavel Ondračka
96640b142e ci: build nine in debian-testing
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27434>
2024-03-13 22:31:26 +00:00
Pavel Ondračka
da28579633 ci: install xwayland in x86_64_test-gl
X is needed for the incoming nine tests.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27434>
2024-03-13 22:31:26 +00:00
David Heidelberg
13812cc91d ci: reduce irrelevant output to a simple list of libraries
Fixes: 90b6f84c5e ("ci: when specifying a driver remove all other ones")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28048>
2024-03-13 22:28:34 +01:00
David Heidelberg
045bc86ac9 ci/freedreno: mark fails resolved by "drm/msm/gem: Add metadata uapi"
This fails can be resolved by:
 - using https://patchwork.freedesktop.org/series/126031/ patchset on
   top of 6.6 (in our case)
 - using 6.8 or later kernel

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28048>
2024-03-13 21:43:17 +01:00
David Heidelberg
f1680f58b1 ci/freedreno: disable workarounds for Adreno 618, 630, and 660
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28048>
2024-03-13 21:42:59 +01:00
David Heidelberg
ab690f25e8 ci: uprev kernel to 6.6.21
Including new https://patchwork.freedesktop.org/series/126031/ from 6.8
to get rid of spammed logs with:
```
TU: warning: Failed to set BO metadata with DRM_MSM_GEM_INFO: -22
```

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28048>
2024-03-13 21:25:05 +01:00
Yiwei Zhang
e0da118ab1 anv/hasvk: default image_read_without_format to true
The spv cap has the correct requirements to be satisfied before an app
can use it, so we can drop the redundant check here to be more robust.
Either of below is needed:
- VkPhysicalDeviceFeatures::shaderStorageImageReadWithoutFormat
- VK_VERSION_1_3
- VK_KHR_format_feature_flags2

v2: dropped unused variable

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28117>
2024-03-13 19:29:04 +00:00
David Heidelberg
9c770f06c6 nine: drop useless and a bit too long line
Acked-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: lorn10 <kle@bluewin.ch>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27971>
2024-03-13 18:58:15 +00:00
David Heidelberg
5b6a4b1c79 nine: fill missing licenses headers and copyrights
Acked-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: lorn10 <kle@bluewin.ch>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27971>
2024-03-13 18:58:14 +00:00
David Heidelberg
81d3de71cd nine: convert licenses block to SPDX
Convert licensing information using ISO/IEC 5962:2021 to SPDX format.

Acked-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: lorn10 <kle@bluewin.ch>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27971>
2024-03-13 18:58:14 +00:00
Valentine Burley
ac5d529c65 nvk: Enable VK_KHR_shader_subgroup_uniform_control_flow
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9622

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28033>
2024-03-13 18:40:17 +00:00
David Tobolik
376d1e6667 rusticl: implement cl_khr_suggested_local_work_size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28020>
2024-03-13 17:59:09 +00:00
José Roberto de Souza
de94d98940 iris: Set BO_ALLOC_NO_SUBALLOC when allocating bo for slab
Without setting BO_ALLOC_NO_SUBALLOC iris_bo_alloc() will attempt to
get bo from slabs again.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27734>
2024-03-13 16:02:46 +00:00
Karol Herbst
4f165117dc nouveau/drm: remove nouveau_client::id
No idea what was the original purpose, but in the imported code we don't
need any of that.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:08 +00:00
Karol Herbst
9583fb8d00 nouveau/drm: drop unsued chan argument from nouveau_pushbuf_kick
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:08 +00:00
Karol Herbst
2101c9f2ac nouveau/drm: rely on nouveau_pushbuf::channel being always set
Now with the immediate flag being removed, we can rely on this and drop
some code.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Karol Herbst
a28cd6b1de nouveau/drm: drop immediate parameter from nouveau_pushbuf_new
It was always set to true.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Karol Herbst
1a4c2cba95 nouveau: call glsl_type_singleton_init_or_ref earlier
Fixes: 91029b7e87 ("nouveau: take glsl_type ref unconditionally")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Karol Herbst
821f4c8d99 nouveau: import libdrm_nouveau
Most of the code is copied as is, but there are a couple of changes:
- drop pre nvif code
- nouveau_list -> list_head
- pthread_mutex_t -> simple_mtx_t
- nvif_unwrap removed
- no assignments in if statements
- nouveau_object_mthd -> nouveau_device_info
- reworked object allocation UAPI calls

Most of the reworked code was copied from NVK or a previous version of it

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Karol Herbst
a62fba6b62 nvk: use c.get_supported_arguments for compiler flags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Karol Herbst
c398bc5909 drm-uapi: Sync nouveau_drm.h
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Lionel Landwerlin
b7719a9ed8 intel/fs: remove some unused send helpers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28152>
2024-03-13 14:37:48 +00:00
Erik Faye-Lund
0eaf7cca35 mesa: prefer read-format of RG for snorm
There's no good reason we want to read RGBA for SNORM RB textures. Let's
correct the preferred read-format here.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28120>
2024-03-13 10:19:33 +00:00
Corentin Noël
c9e66df39f zink: Add error logging on surface creation failure
Allows to differenciate which step has failed from the log message.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:31 +00:00
Corentin Noël
28854743dc zink: Change zink_get_surface to return a zink_surface
Allows to avoid systematic casting of its return value.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:31 +00:00
Corentin Noël
207db01829 zink: Make sure to not leak anything on surface creation failure
Change wrap_surface to always take the ownership of the wrapped surface and
always check for an allocated value to make sure to not crash here.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:31 +00:00
Corentin Noël
948695e1a4 zink: Move zink_surface_destroy before zink_create_surface
This will allow to reuse it inside zink_create_surface.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:30 +00:00
Corentin Noël
27bde4b420 zink: Return early if the source could not have been acquired
Make the success case the main one.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:30 +00:00
Corentin Noël
2c22e78619 zink: Separate the template from the wrapped surface
Allow to better understand the case when needs_mutable is true, differenciate
`base` from `surf` even if they are the same variable in most cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:30 +00:00
Corentin Noël
55cdde758c zink: Use an intermediary variable for create_surface
Allows to NULL-check it afterwards.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:30 +00:00
Corentin Noël
faaa65a1a3 zink: Make wrap_surface return a zink_ctx_surface directly
Avoids to cast if back to zink_ctx_surface afterwards.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:30 +00:00
Lionel Landwerlin
2a77a46837 anv: return unsupported for FSR images on Gfx12.0
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28131>
2024-03-13 08:52:24 +02:00
Caio Oliveira
e324fbbe68 intel/brw: Fix validation of accumulator register
The `stride` and `offset` attributes are meaningful for the "virtual"
register files (VGRFs, UNIFORMs and ATTRs).  Accumulator is an ARF so
validation should check `hstride` (part of the <V,W,H> triple) and `subnr`
instead.

Fixes: 12d7aaf2b8 ("intel/compiler: add more validation for acc register usage")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28059>
2024-03-13 03:23:30 +00:00
Caio Oliveira
db8022dc4d intel/brw: Use helper to create accumulator register
This ensure the region triple <V,W,H> is set correctly, in this case the
desired region is a sequential like <8,8,1>.  Without the helper the
sequence we get is <0,1,0> -- which the generator currently partially
adjusts when emitting code, but is not sufficient when doing validation
earlier.

The code generated code is slightly modified.  From crucible test
func.shader.subtractSaturate.uint in the fragment shader for SIMD8, the
diff looks like

```
 mov(8)          acc0<1>UD       g21<8,8,1>UD                    { align1 1Q $0.dst };
-add.sat(8)      g22<1>UD        -acc0<0,1,0>UD  g16<8,8,1>UD    { align1 1Q @1 $0.dst };
+add.sat(8)      g22<1>UD        -acc0<8,8,1>UD  g16<8,8,1>UD    { align1 1Q @1 $0.dst };
```

Note that without the patch generator adjusted the hstride for acc0 used
as destination (see brw_set_dest), but kept the src region as is.  For
the source, it is not clear to me why the <0,1,0> would work correctly
here since it is a scalar, but using <8,8,1> it is correct.

Fixes: 58907568ec ("intel/fs: Add SHADER_OPCODE_[IU]SUB_SAT pseudo-ops")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28059>
2024-03-13 03:23:30 +00:00
Mike Blumenkrantz
90cf8d14d6 zink: add a pass to strip out multisample storage image ops
ARB_shader_image_load_store requires that drivers can compile shaders
containing these tokens, but it doesn't require that they can execute
them. thus, deleting the multisample component is fine since these
shaders will never be executed

affects/fixes:
KHR-GL46.gl_spirv.spirv_validation_capabilities_test

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28078>
2024-03-13 03:03:24 +00:00
Mike Blumenkrantz
3f122761a1 zink: remove stale comments for DRLR usage
EXT_dynamic_rendering_local_read has arrived to rescue us from renderpasses
once and for all, so this is no longer necessary

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:38 +00:00
Mike Blumenkrantz
e7e55dcfaf zink: be even stricter with shader object usage about blocking invalid usage
in some cases (e.g., ZINK_DEBUG=noopt), this will still need to compile a
full pipeline in order to provide valid behavior

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:38 +00:00
Mike Blumenkrantz
485b4d9abe zink: add even more strict checks for separate shader usage
this blocks e.g., shader object usage with sample shading which
cannot be used with current vk spec

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:38 +00:00
Mike Blumenkrantz
5910ce4b86 zink: always sync and replace separable progs even with ZINK_DEBUG=noopt
this otherwise breaks when shader variants are needed and aren't created

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:38 +00:00
Mike Blumenkrantz
460c7eeecb zink: use the sanitized key in update_gfx_program_optimal()
this otherwise pulls in unused state values that are otherwise
sanitized away

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:38 +00:00
Mike Blumenkrantz
daf2f4a583 zink: rename optimal_key in update_gfx_program_optimal()
no functional changes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:37 +00:00
Lynne
ee476f3eda radv/av1: limit profile and bit depth to supported values
Same as with other codecs.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28143>
2024-03-13 02:20:59 +00:00
Paulo Zanoni
18df1a81a8 anv/trtt: update GFX_TRTT_VA_RANGE for LNL
This register has changed a little bit for LNL.

While this fixes sparse with TR-TT, it is worth remembering that LNL
is using sparse with vm_bind by default.

v2: Use the proper value instead of hardcoding 0xF (Lionel).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27316>
2024-03-13 01:50:35 +00:00
Jordan Justen
f0769f5d8a intel/compiler: Adjust fs_visitor::emit_cs_terminate() for Xe2
Fixes: 97bf3d3b2d ("intel/brw: Replace CS_OPCODE_CS_TERMINATE with SHADER_OPCODE_SEND")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28110>
2024-03-13 00:25:55 +00:00
Eric R. Smith
caabd41cd1 panfrost: make sure blends always have 4 components
bi_emit_blend_op has a hardcoded assumption that 4 components were used
for blending. This causes validation errors in some situations where
fewer components were actually used, because the number of staging
registers did not match the number of registers in the actual input.
Fix this by extending the source to 4 components.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28057>
2024-03-12 23:38:04 +00:00
Eric R. Smith
b2cedf5b56 panfrost: make drm-shim work again for panfrost
The new panthor support needs some additional ioctl() calls. Added some
defaults for these to drm-shim, so that we can use drm-shim again for
testing shaders.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28132>
2024-03-12 23:23:17 +00:00
Marek Olšák
02b6f4ef6b radeonsi: don't test so many wave limits for AMD_TEST=testdmaperf
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28119>
2024-03-12 23:00:00 +00:00
Marek Olšák
e99765df08 radeonsi: fix the DMA compute shader
It was correct for the parameters that the driver was using, but incorrect
for other parameters.

1. The address computation must multiply the workgroup size (wave size)
   by num_mem_ops to fix the case when num_dwords_per_thread > 4.
2. nir_load_ssbo shouldn't set the number of components to 4 when
   num_dwords_per_thread < 4.

Fixes: 6584088cd5 - radeonsi: "create_dma_compute" shader in nir

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28119>
2024-03-12 23:00:00 +00:00
Marek Olšák
e589833ee1 ac/llvm: fix SSBO bounds checking by using raw instead of struct opcodes
Setting vindex != NULL (even if it's 0) selects a struct.buffer.load opcode,
which causes LLVM to look for "index * stride + offset" in voffset and
moves "index" to vindex (i.e. not 0 anymore), but the bounds checking
(OOB_SELECT) is set to ignore vindex. Setting vindex = NULL selects
a raw.buffer.load opcode.

Fixes: 6b573c00c9 - ac/nir: use ac_build_buffer_load() for SSBO load operations
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10794

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28119>
2024-03-12 23:00:00 +00:00
José Roberto de Souza
31920cb60c intel: Enable Xe KMD support by default
Xe KMD landed on drm-next, uAPI is now stable and we can remove
the build time parameter to enable support to it but platforms
older than Lunar lake will have experimental support with Xe KMD.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20418>
2024-03-12 22:22:50 +00:00
Kenneth Graunke
97aec40111 intel/brw: Emit better code for read_invocation(x, constant)
For something as basic as read_invocation(x, 0), we were emitting:

   mov(8) vgrf67:D, 0d
   find_live_channel(8) vgrf236:UD, NoMask
   broadcast(8) vgrf237:D, vgrf67:D, vgrf236+0.0<0>:UD NoMask
   broadcast(8) vgrf235+0.0:W, vgrf197+0.0:W, vgrf237+0.0<0>:D NoMask
   mov(8) vgrf234+0.0:W, vgrf235+0.0<0>:W

This is way overcomplicated - if the invocation is a constant, we can
simply emit a single MOV which reads the desired channel index.  Not
only that, but it's difficult to clean up:

1. If this expression appears multiple times, CSE will find all the
   redundant emit_uniformize(invocation) and get rid of the duplicate
   (find_live_channel+broadcast) on future instructions.
2. Copy propagation will put the 0d directly in the first broadcast.
3. Dead code elimination will get rid of the vgrf67 temp holding 0.
4. Algebraic will replace the first broadcast(x, 0) with a MOV.
5. Copy propagation will put the 0d directly in the second broadcast.
6. Dead code elimination will get rid of the vgrf237 temp.
7. Algebraic will replace the second broadcast(x, 0) with a MOV.
8. Copy propagation will finally combine the two MOVs

That's at least 7-8 optimization passes and several loops through the
same passes just to clean up something we can do trivially.

Cuts 25% of the of the optimizer steps in pipeline 22200210259a2c9c
of fossil-db/google-meet-clvk/BgBlur.1f58fdf742c27594.1 (31 to 23).

Shortens compilation time of the google-meet-clvk/Relight pipeline by
-2.87717% +/- 0.509162% (n=150).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28097>
2024-03-12 21:58:27 +00:00
Ian Romanick
e87881f616 intel/brw: Avoid a silly add with zero in assign_curb_setup
No shader-db changes.

fossil-db:

DG2
Totals:
Instrs: 161008251 -> 161004452 (-0.00%)
Cycles: 13894249509 -> 13893050101 (-0.01%); split: -0.01%, +0.00%

Totals from 3804 (0.58% of 652145) affected shaders:
Instrs: 2232984 -> 2229185 (-0.17%)
Cycles: 7124966553 -> 7123767145 (-0.02%); split: -0.02%, +0.00%

No fossil-db changes on any other platform.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27552>
2024-03-12 21:31:30 +00:00
Ian Romanick
d9674cbe7d intel/brw: Combine constants for src0 of POW instructions too
I tried this when I was working on MR !7698, and it didn't have much
affect back then. Maybe I've added more stuff to my fossil-db?

Gfx12 platforms (Tiger Lake and DG2) are unaffected because the POW
instruction was removed.

shader-db:

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20301933 -> 20301900 (<.01%)
instructions in affected programs: 9077 -> 9044 (-0.36%)
helped: 33 / HURT: 0

total cycles in shared programs: 842797624 -> 842799471 (<.01%)
cycles in affected programs: 1361911 -> 1363758 (0.14%)
helped: 35 / HURT: 111

LOST:   0
GAINED: 9

fossil-db:

Ice Lake and Skylake had similar results. (Ice Lake shown)
Totals:
Instrs: 165510222 -> 165510163 (-0.00%)
Cycles: 15125195835 -> 15125194484 (-0.00%); split: -0.00%, +0.00%
Spill count: 45204 -> 45196 (-0.02%)
Fill count: 74157 -> 74149 (-0.01%)

Totals from 65 (0.01% of 656118) affected shaders:
Instrs: 57426 -> 57367 (-0.10%)
Cycles: 1667918 -> 1666567 (-0.08%); split: -0.11%, +0.03%
Spill count: 137 -> 129 (-5.84%)
Fill count: 515 -> 507 (-1.55%)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27552>
2024-03-12 21:31:30 +00:00
Ian Romanick
e7480f94c1 intel/brw: Combine constants for src0 of integer multiply too
The majority of cases that would have been affected by this actually
had both sources as integer constants. The earlier commit "intel/rt:
Don't directly generate umul_32x16" allowed those to be constant
folded.

v2: Move the a*-1 block to be near the existing a*-1 block.

No shader-db changes on any Intel platform.

fossil-db results:

All Intel platforms had similar results. (Ice Lake shown)
Totals:
Instrs: 165510246 -> 165510222 (-0.00%)
Cycles: 15125198238 -> 15125195835 (-0.00%); split: -0.00%, +0.00%

Totals from 46 (0.01% of 656118) affected shaders:
Instrs: 36010 -> 35986 (-0.07%)
Cycles: 2613658 -> 2611255 (-0.09%); split: -0.17%, +0.07%

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27552>
2024-03-12 21:31:30 +00:00
Ian Romanick
dd3bed1d92 intel/brw: Integer multiply w/ DW and W sources is not commutative
The DW source must be first on all platforms since Gfx7. On previous
platforms it's the other way around.

Unsurprisingly, no shader-db or fossil-db changes. This change is
necessary for the next commit.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27552>
2024-03-12 21:31:30 +00:00
Ian Romanick
93478c095e intel/compiler: Enforce 64-bit RepCtrl restriction in eu_validate
For some reason, this wasn't always caught in fs_visitor::validate.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27552>
2024-03-12 21:31:30 +00:00
Ian Romanick
31f640bc5f intel/brw: Correctly dump subnr for FIXED_GRF in INTEL_DEBUG=optimizer
v2: Also update printing FIXED_GRF as destionation. Suggested by Lionel.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27552>
2024-03-12 21:31:30 +00:00
Ian Romanick
f89d9cc53d intel/brw: Silence "statement may fall through" warning
src/intel/compiler/brw_lower_logical_sends.cpp: In member function ‘bool fs_visitor::lower_logical_sends()’:
src/intel/compiler/brw_lower_logical_sends.cpp:3170:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
 3170 |          if (devinfo->has_lsc) {
      |          ^~
src/intel/compiler/brw_lower_logical_sends.cpp:3174:7: note: here
 3174 |       case SHADER_OPCODE_DWORD_SCATTERED_READ_LOGICAL:
      |       ^~~~

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27552>
2024-03-12 21:31:30 +00:00
Mike Blumenkrantz
c85768e380 zink: delete faked_e5sparse
this never actually worked, and I'm not sure why I added it from testing

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28115>
2024-03-12 20:39:56 +00:00
Mike Blumenkrantz
8fa413fef0 zink: set the sparse format usage flags directly based on queried props
this should yield more consistent results and avoid weird cases where
various formats are queried for things they don't support and won't use

Fixes: 9a412c10b7 ("zink: set all usage flags when querying sparse features")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28115>
2024-03-12 20:39:56 +00:00
Mike Blumenkrantz
ba2731941f zink: nvk baseline updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28115>
2024-03-12 20:39:56 +00:00
Mike Blumenkrantz
c248411907 zink: only add STORAGE bit for sparse images based on multisample usage
if the driver doesn't support multisample storage images, don't create them

Fixes: d320e8328d ("zink: set up image create bits for sparse textures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28115>
2024-03-12 20:39:56 +00:00
Mike Blumenkrantz
63f5a6cbe3 u/inlines: constify util_res_sample_count()
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28115>
2024-03-12 20:39:56 +00:00
Mike Blumenkrantz
61e5b6ad9d zink: try getting sparse page size again without storage bit on fail
only certain formats are required to have the storage bit, so be more
tolerant of failure in the case where drivers actually check flags
and reject storage usage when it's actually unsupported

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28115>
2024-03-12 20:39:56 +00:00
Mary Guillemard
80eac1337d nvk: Always copy conditional rendering value before compare
The spec requires a compare on 32-bit but the hardware actually compare 64-bit.

As such, we are required to copy the value to a temporary buffer before
the compare.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 8c25cd307a ("nvk: EXT_conditional_rendering")
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28106>
2024-03-12 20:22:27 +00:00
Alyssa Rosenzweig
8a3e85776a glsl_types: derive ht
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28056>
2024-03-12 19:41:50 +00:00
Alyssa Rosenzweig
c29110ef99 v3d: derive ht
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28056>
2024-03-12 19:41:49 +00:00
Alyssa Rosenzweig
2d32239b7a radeonsi: derive ht
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28056>
2024-03-12 19:41:49 +00:00
Alyssa Rosenzweig
3f287d100c nvk: derive ht
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28056>
2024-03-12 19:41:49 +00:00
Alyssa Rosenzweig
da59672e2b asahi: derive ht
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28056>
2024-03-12 19:41:49 +00:00
Alyssa Rosenzweig
be5c288dbf panfrost: derive ht
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28056>
2024-03-12 19:41:49 +00:00
Alyssa Rosenzweig
93879b1920 util/hash_table: add DERIVE macro
we typically use a hash table with a fixed struct key, but this requires tedious
boilerplate. add a macro that generates all the boilerplate for you so you can
just create a table and go.

naming inspired by Rust #![derive].

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28056>
2024-03-12 19:41:49 +00:00
Alyssa Rosenzweig
49a89911c4 nir/print: do not print empty lists on intrinsics
before:

  32     %0 = @load_vertex_id () ()

after:

   32     %0 = @load_vertex_id

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27925>
2024-03-12 19:00:26 +00:00
Alyssa Rosenzweig
ec9b6b5cfa util: add _mesa_hash_table_u64_num_entries
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27925>
2024-03-12 19:00:26 +00:00
Alyssa Rosenzweig
a6123a80da nir/opt_shrink_vectors: shrink some intrinsics from start
If the backend supports it, intrinsics with a component() are straightforward to
shrink from the start. Notably helps vectorized I/O.

v2: add an option for this and enable only on grown up backends, because some
backends ignore the component() parameter.

RADV GFX11:
Totals from 921 (1.16% of 79439) affected shaders:
Instrs: 616558 -> 615529 (-0.17%); split: -0.30%, +0.14%
CodeSize: 3099864 -> 3095632 (-0.14%); split: -0.25%, +0.11%
Latency: 2177075 -> 2160966 (-0.74%); split: -0.79%, +0.05%
InvThroughput: 299997 -> 298664 (-0.44%); split: -0.47%, +0.02%
VClause: 16343 -> 16395 (+0.32%); split: -0.01%, +0.32%
SClause: 10715 -> 10714 (-0.01%)
Copies: 24736 -> 24701 (-0.14%); split: -0.37%, +0.23%
PreVGPRs: 30179 -> 30173 (-0.02%)
VALU: 353472 -> 353439 (-0.01%); split: -0.03%, +0.02%
SALU: 40323 -> 40322 (-0.00%)
VMEM: 25353 -> 25352 (-0.00%)

AGX:

total instructions in shared programs: 2038217 -> 2038049 (<.01%)
instructions in affected programs: 10249 -> 10081 (-1.64%)

total alu in shared programs: 1593094 -> 1592939 (<.01%)
alu in affected programs: 7145 -> 6990 (-2.17%)

total fscib in shared programs: 1589254 -> 1589102 (<.01%)
fscib in affected programs: 7217 -> 7065 (-2.11%)

total bytes in shared programs: 13975666 -> 13974722 (<.01%)
bytes in affected programs: 65942 -> 64998 (-1.43%)

total regs in shared programs: 592758 -> 591187 (-0.27%)
regs in affected programs: 6936 -> 5365 (-22.65%)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> (v1)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28004>
2024-03-12 18:17:17 +00:00
Alyssa Rosenzweig
aa99753a28 nir/opt_shrink_vectors: hoist alu helpers
to be used earlier in the file in the next commit

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28004>
2024-03-12 18:17:17 +00:00
José Roberto de Souza
d1916432ab intel/dev: Nuke display_ver
It is not used.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28128>
2024-03-12 17:44:46 +00:00
José Roberto de Souza
b09ffe48f2 intel/dev: Nuke 'ver == 10' check
There is no intel_device_info with ver 10 anymore.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28128>
2024-03-12 17:44:46 +00:00
Rhys Perry
a977a51a21 radv: stop using 5/8 component SSBO stores
These apparently work, but I'm not sure they were supposed to.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28108>
2024-03-12 17:23:29 +00:00
Rhys Perry
cc7e3efc7c radv: don't advertise DGC with LLVM
The meta shaders for this feature don't compile with LLVM because of 5/8
component SSBO stores. I'm not sure this was ever expected to work.

This seemed to break vkd3d-proton.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28108>
2024-03-12 17:23:29 +00:00
Christian Gmeiner
3409c60099 etnaviv: isa: Support multiple encodings for texldb
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
20678b9204 etnaviv: isa: Fix #instruction-tex-src0-src1-src2 bitset
src1 got wrong values.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
ccc99bd42d etnaviv: isa: Support multiple encodings for texldl
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
8d117b46ea etnaviv: isa: Support unary texkill instruction
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
86de104d07 etnaviv: isa: Support unary branch instruction
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
0aa737018e etnaviv: isa: Combine branch and branch_if
As we want to use the new asm as a drop-in replacement we
need to combine branch and branch_if back to one bitset.

This is caused by the fact that we need to replicate the defines
in isa.xml.h.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
48e1589b44 etnaviv: isa: Correct #instruction-alu-no-dst-has-src0-src1 expr name
This expression only checks if src0 and src1 are in use.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
10a7cf3121 etnaviv: isa: Correct #instruction-alu-no-dst-maybe-src1-src2 name
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
dfb2fcf652 etnaviv: isa: Correct #instruction-cf-src1-src2 bitset name
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
c2ffc7a09b etnaviv: isa: Correct SRC0_AMODE
It is 3 bit long and not one.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
b1cbd35bb5 etnaviv: isa: Move {TEX_SWIZ}
Should have never been there.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
d8f6de7314 etnaviv: isa: Add movar opcode
I was unable to grab this opcode from blob, so lets just
document it as the Gallium driver makes use of it.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
e77fbe2bcc etnaviv: isa: Add internal register group
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
f416bb3f8c etnaviv: isa: Rename reg_group u2 to u
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
cf3fa2fd8c etnaviv: isa: Reorder instructions
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
9c6378abec etnaviv: isa: Add div opcode
Encoded instruction is taken from blob running the following CL kernel:

 __kernel void simple(__global float *out, __global float *in)
{
    int iGID = get_global_id(0);
    out[iGID] = 4.5f / in[iGID];
}

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
e2a9bc73f5 etnaviv: isa: Remove note about GC3000
All the encoded instructions in the Opcodes test are comming
from blob running on different GPU models.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
fa3d2bc486 etnaviv: isa: Add texldd opcode
Encoded instruction is taken from blob running:
- dEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler2d_float_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
0701f3ef9b etnaviv: isa: Add texldl opcode
Encoded instruction is taken from blob running:
- dEQP-GLES3.functional.shaders.texture_functions.texturegrad.isampler2d_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
8c86bd0209 etnaviv: isa: Add texldb opcode
Encoded instruction is taken from blob running:
- dEQP-GLES3.functional.texture.mipmap.2d.bias.linear_nearest

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
3c72596ebf etnaviv: isa: Add bit_rev opcode
Encoded instruction is taken from blob running:
- dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.int_lowp_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
2e2a0e8059 etnaviv: isa: Add movai opcode
Encoded instruction is taken from blob running:
- dEQP-GLES3.functional.shaders.struct.uniform.dynamic_loop_struct_array_fragment

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
73584cf46a etnaviv: isa: Name cond enum value 22
Blob told me about it when running:
- dEQP-GLES3.functional.ubo.random.scalar_types.4

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:44 +00:00
Christian Gmeiner
20022f5389 etnaviv: isa: Add branch_any opcode
Encoded instruction is taken from blob running:
- dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.basic.bvec3_api_int_both

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
6a71636179 etnaviv: isa: Correct dp2 opcode
Encoded instruction is taken from blob running:
- dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec2_float_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
47106e0f80 etnaviv: isa: Add bit_extract opcode
Encoded instruction is taken from blob running:
- dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract.int_lowp_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
3b4cbbf0d2 etnaviv: isa: Add norm_dp2, norm_dp3 and norm_dp4 opcodes
Encoded instructions are taken from blob running:
- dEQP-GLES2.functional.shaders.operator.geometric.normalize.mediump_vec2_vertex
- dEQP-GLES2.functional.shaders.operator.geometric.normalize.mediump_vec3_vertex
- dEQP-GLES2.functional.shaders.operator.geometric.normalize.mediump_vec4_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
4cd779af3f etnaviv: isa: Add frc opcode
Encoded instruction is taken from blob running:
- dEQP-GLES2.functional.shaders.operator.common_functions.fract.mediump_vec4_vertex

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
ede0008c16 etnaviv: isa: Add dsx and dsy opcodes
Encoded instructions are taken from blob running:
- dEQP-GLES3.functional.shaders.derivate.dfdx.texture.basic.float_highp
- dEQP-GLES3.functional.shaders.derivate.dfdy.texture.basic.float_highp

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Christian Gmeiner
031c2c26df etnaviv: isa: Remove duplicate #instruction-alu-atomic
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27871>
2024-03-12 17:02:43 +00:00
Mike Blumenkrantz
0f66589c2a mesa: force rendertarget usage on required-renderable formats
the existing guesswork during format selection for teximage is
accurate most of the time, but it's not accurate all of the time.
GL/ES each have a set of sized formats that are required to be
color renderable, and so any time one of these is allocated as a
texture, it MUST have the rendertarget usage bit attached so that
it can later be bound as a framebuffer attachment

an alternative might be to relax this and then try to do migration
to a different format/buffer later if necessary, but that's hard and
probably not actually as useful

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28055>
2024-03-12 14:22:17 +00:00
Erik Faye-Lund
d7def3ccdf panfrost: add pan_force_afbc_packing driconf
This is useful for forcing AFBC-P to be used in applications where it's
know to work well. This can significantly reduce memory consumption and
bandwidth, leading more applications working in the first place, and
also better performance.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27916>
2024-03-12 12:44:49 +00:00
Erik Faye-Lund
2bcdc4939c panfrost: add driconf infrastructure
This is the boiler-plate code needed to support driver-specific driconf
variables in Panfrost.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27916>
2024-03-12 12:44:49 +00:00
Erik Faye-Lund
d861bd1563 panfrost: give afbc-packing its own flag
There's no point in querying this over and over again for each
resource, especially not when this test is about to become more
complicated. So let's give this its own flag.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27916>
2024-03-12 12:44:49 +00:00
Karol Herbst
7487ac2046 rusticl/device: support query_memory_info to retrieve available memory
Some drivers implement query_memory_info, but not the MAX_GLOBAL_SIZE
compute cap.

Long term we should drop the compute cap anyway.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28122>
2024-03-12 12:24:31 +00:00
Karol Herbst
2df640c4f6 rusticl/kernel: assign sampler locations before DCEing variables
This fixes an issue hit by one of darktable's kernels, where the sampler
argument got assigned the location of a dead kernel parameter turning it
into a zombie and leading us to trash the kernel input buffer's layout.

Fixes: 25b8a34b48 ("rusticl/kernel: inline samplers")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28121>
2024-03-12 11:30:48 +01:00
Tapani Pälli
493d5764e3 iris: setup distribution granularity with Wa_14019166699
Workaround describes that we need to set instance level distribution
granularity when primitive id is used by the draw.

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/27955>
2024-03-12 09:25:32 +00:00
Tapani Pälli
da3d5d1064 iris: refactor function that checks primitive id usage
We will need this for another workaround, make it more generic.

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/27955>
2024-03-12 09:25:32 +00:00
Tapani Pälli
275bcbd7a7 anv: setup distribution granularity with Wa_14019166699
Workaround describes that we need to set instance level distribution
granularity when primitive id is used by the draw.

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/27955>
2024-03-12 09:25:32 +00:00
Lionel Landwerlin
75c6ad9907 intel/fs: fixup sampler header message
If you look at the sampler message header on Gfx9+, you'll see that we
mostly only use 2 dwords (dw2 & dw3). DW2 has a bunch of sampler
parameters, DW3 is the sampler handle.

On Gfx9 we can micro optimize by copying r0 into the header because
the HW mostly doesn't care about other DWs. We just have to clear dw2
on non VS/FS stages.

On Gfx11+, we always have to do a careful copy of the r0.3 bits to
mask out the bottom unrelated bits. So there, just clearing the entire
header makes more sense.

On Xe2+, the dw4 of the header references the sampler feedback surface
handle and bit0 is a boolean to know whether to use that surface or
not. So it *REALLY* matters to have that as 0. If we copy r0, we'll
get random bits in dw4, leading to enable that surface.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28082>
2024-03-12 07:25:45 +00:00
Hyunjun Ko
db8eaa3620 anv/video: fix scan order for scaling lists on H265 decoding.
The default scan order of scaling lists is up-right-diagonal
according to the spec. But the device requires raster order,
so we need to convert from the passed scaling lists.

Fixes: 8d519eb ("anv: add initial video decode support for h265")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28063>
2024-03-12 03:33:49 +00:00
Timothy Arceri
182bff5c05 glsl: remove unrequired do_lower_jumps() call
We were using this to remove unreachable instructions following
jumps. The previous patch allowed glsl to nir to handle these
instructions so this call is no longer needed.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27288>
2024-03-12 01:43:03 +00:00
Timothy Arceri
1391bc3721 glsl_to_nir: never convert instructions after jump
Unlike in GLSL IR it is illegal to add an instruction to a block
following a jump in NIR. Here we add code to the glsl_to_ir pass
to remove any such instructions before they are processed i.e.
we remove them as soon as we process the jumps.

Handling this in glsl to nir allows us to avoid depending on the
lower_jumps() pass being called directly before glsl to nir when
it otherwise doesn't need to be called an additional time.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27288>
2024-03-12 01:43:03 +00:00
Timothy Arceri
f06aed8e1d glsl: make an explicitly safe version of visit_exec_list()
visit_exec_list() has always called foreach_in_list_safe() here
were rename that version to visit_exec_list_safe() and create
a version that calls the non-safe foreach call.

There are only 2 users of visit_exec_list() we change lower_jumps
to use the renamed version and leave glsl_to_nir() to use the
non-safe version as it never deletes the current instruction and
in the following patch we will add code that may delete the next
instruction meaning the safe version would be unsafe to use.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27288>
2024-03-12 01:43:03 +00:00
Faith Ekstrand
626502d7c7 nil: Advertise support for PIPE_FORMAT_R5G6B5_UNORM
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28103>
2024-03-12 01:20:18 +00:00
Faith Ekstrand
edd3379c09 nvk: Manually offset array and Z slices in BeginRendering
We can't trust the hardware above about 4095 so we're better off just
offsetting manually now that we have the code to do so.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10655
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28103>
2024-03-12 01:20:18 +00:00
Faith Ekstrand
81db82bd8c nvk: Add a nil_image helper variable in BeginRendering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28103>
2024-03-12 01:20:18 +00:00
Faith Ekstrand
696e2064bd nil: Move Z slice offset calculations to a helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28103>
2024-03-12 01:20:18 +00:00
Marek Olšák
813f37a8ed nir: add nir_block::divergent to indicate a divergent entry condition
to be used by nir_opt_varyings

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28049>
2024-03-12 00:29:03 +00:00
Marek Olšák
936690f733 nir: print nir_io_semantics::invariant
this was missing

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28049>
2024-03-12 00:29:03 +00:00
Marek Olšák
867a0a7db9 nir/divergence_analysis: handle derefs of system values
needed by GLSL compiler optimizations that have unlowered sysvals

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28049>
2024-03-12 00:29:03 +00:00
Marek Olšák
eb670d6eaf nir/divergence_analysis: load_instance_id is convergent within a primitive
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28049>
2024-03-12 00:29:03 +00:00
Marek Olšák
310b13b7f0 nir/divergence_analysis: load_primitive_id is convergent within a primitive
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28049>
2024-03-12 00:29:03 +00:00
Marek Olšák
1621d4a0d3 nir/divergence_analysis: change function prototypes
for following commits

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28049>
2024-03-12 00:29:03 +00:00
Qiang Yu
6b1fd20780 radeonsi: split RADEON_USAGE_NEEDS_IMPLICIT_SYNC into CB and DB flags
it will be required in the future

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
123e0b4240 radeonsi: add radeonsi_cache_rb_gl2 option enabling GL2 caching for CB and DB
for perf testing

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
2347259f1d radeonsi/gfx11: add missing DCC_RD_POLICY setting
Fixes: 5acff16ce4 ("radeonsi: add a separate gfx10_init_gfx_preamble_state function")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
82aca689c1 ac: use the gfx11 shadowed register tables for gfx11.5
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
6ce3a95852 radeonsi/gfx11: program SAMPLE_MASK_TRACKER_WATERMARK optimally for APUs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
bd71d62b8f radeonsi: program tessellation rings right before draws
so that we only wait for idle right before draw packets and all preceding
SET packets can be processed in parallel with draws from the previous IB.

This way we also don't need to update the preamble and flush the context
just to emit the preamble. It's a normal state now.

Use the new state atom that is emitted last.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
b9b7d34d05 radeonsi/gfx11: program the attribute ring right before draws
This way, we only wait for idle right before draw packets,
so that all preceding SET packets can be processed in parallel
with draws from the previous IB.

Add a new state atom that is emitted last. It only contains code for gfx11,
but some code for older chips will be added by the next commit.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
9e08569d6a radeonsi: allocate only one set of tessellation rings per device
Move them to si_screen. The "has_tessellation" context flag indicates that
the screen has valid tess rings, so that we don't have to lock the mutex
to check whether the rings are valid.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
ea94cb95e4 radeonsi/gfx10.3: add a GPU hang workaround for legacy tess+GS
Fixes: a23802bcb9 - ac,radeonsi: start adding support for gfx10.3

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
7d3a414662 radeonsi/gfx11: fix programming of PA_SC_BINNER_CNTL_1.MAX_ALLOC_COUNT
Fixes: 25a66477d0 - radeonsi/gfx11: register changes

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
20445f296b radeonsi: disable binning correctly on gfx11.5
Fixes: b44a886b84 - amd/common: add registers for gfx11.5

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
62d360c287 amd/registers: add correct gfx11.x enums for BINNING_MODE
Fixes: ced3fbbcf9 - amd/registers: add gfx11.json

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27943>
2024-03-11 23:36:55 +00:00
Marek Olšák
74c28b93c8 glthread: invert _mesa_glthread_has_no_{un}pack_buffer by removing the negation
transform _mesa_glthread_has_no_unpack_buffer into
_mesa_glthread_has_unpack_buffer, etc.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27490>
2024-03-11 22:44:42 +00:00
Marek Olšák
9939f20a49 glthread: execute small glDrawPixels asynchronously
Compute the image size and copy the image into the batch.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27490>
2024-03-11 22:44:41 +00:00
Marek Olšák
b43b111b19 glthread: execute small glBitmap asynchronously
Compute the bitmap size and copy the bitmap into the batch.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27490>
2024-03-11 22:44:41 +00:00
Marek Olšák
ada351f2ea glthread: track glPixelStore(GL_UNPACK_*)
so that glthread can compute the size of images passed to GL functions.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27490>
2024-03-11 22:44:41 +00:00
Marek Olšák
c76efafc0d mesa: move struct gl_pixelstore_attrib into glthread.h
it will be used there

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27490>
2024-03-11 22:44:41 +00:00
Marek Olšák
9fe8ef1282 mesa: deduplicate initialization of gl_pixelstore_attrib
the new helper will be used later

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27490>
2024-03-11 22:44:41 +00:00
Mike Blumenkrantz
6a52c50a65 zink: simplify vb masking on bind
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28118>
2024-03-11 22:22:39 +00:00
Mike Blumenkrantz
068973b069 zink: set VkExternalMemoryBufferCreateInfo for opaque fds too
this fixes (VVL) issues with EXT_external_object usage

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28118>
2024-03-11 22:22:39 +00:00
Mike Blumenkrantz
7fd12a446d zink: destroy batch states after copy context
the copy context contains its own batch states, so these must
not be destroyed yet

Fixes: b06f6e00fb ("zink: fix heap-use-after-free on batch_state with sub-allocated pipe_resources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28118>
2024-03-11 22:22:39 +00:00
José Roberto de Souza
9227d63c19 anv: Fix Xe KMD userptr unbind
Userptr don't have a valid gem fd so it can't use DRM_XE_VM_BIND_OP_UNMAP_ALL.
Current code was unbinding workaround_bo or returning error when
workaround_bo size was smaller than userptr address.

So here doing a regular DRM_XE_VM_BIND_OP_UNMAP, without setting
xe_bind->obj and setting xe_bind->range and xe_bind->addr.

Fixes: 19439624 ("anv: Use DRM_XE_VM_BIND_OP_UNMAP_ALL to unbind whole bos")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28114>
2024-03-11 22:00:51 +00:00
Faith Ekstrand
a56d2b8dad zink: Remove interpolateAtSample() when not multi-sampling
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28113>
2024-03-11 21:30:26 +00:00
Mike Blumenkrantz
4bc1bf1625 zink: apply zink_shader::uses_sample to fs variant updating
not actually doing the shader rewriting yet

also add a helper for checking this value

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28113>
2024-03-11 21:30:26 +00:00
Mike Blumenkrantz
b061ab7198 zink: track whether shaders use load_barycentric_at_sample
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28113>
2024-03-11 21:30:26 +00:00
Iván Briano
e1b66f9707 compiler/types: fix serialization of cooperative matrix
Encoding of cmat_desc is overwriting the base_type with the type of the
elements of the matrix.

Fixes: 2d0f4f2c17 ("compiler/types: Add support for Cooperative Matrix types")

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28086>
2024-03-11 20:35:16 +00:00
Eric Engestrom
fc2b619621 ci/image-tags: re-generate all the images building deqp-runner
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27420>
2024-03-11 19:43:08 +00:00
Eric Engestrom
fcd43ee243 ci/deqp-runner: fix list of image tags to update
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27420>
2024-03-11 19:43:07 +00:00
Eric Engestrom
2d80f35562 ci/deqp-runner: update repo url
Repo was moved from its original author (anholt) to mesa.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27420>
2024-03-11 19:43:07 +00:00
Eric Engestrom
810586279c ci/deqp-runner: bring "install from crate" & "install from git" to feature parity
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27420>
2024-03-11 19:43:07 +00:00
Eric Engestrom
9eb50036d4 ci/deqp-runner: set android rust target in the caller (debian/x86_64_test-android.sh)
This also allows non-x86 android which I hope to add some day.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27420>
2024-03-11 19:43:07 +00:00
Eric Engestrom
8fd86519a1 ci/deqp-runner: do a release build instead of debug
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27420>
2024-03-11 19:43:07 +00:00
Paulo Zanoni
4c92084ed9 anv/trtt: invalidate the TLB after writing TR-TT entries
We're changing the memory address translation tables, we should
invalidate their cache.

It seems i915.ko is already doing this for us in between batches.  The
xe.ko driver only adds invalidates to the ring before submissions if
scratch page is enabled in the VM (which it is today, but may change
in the future), and after some vm_bind and all vm_unbind ioctls, but
we don't use vm_bind for TR-TT. Still, it won't hurt to have it here
righ tnow.

v2: Use PIPE_CONTROL_length (José).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27928>
2024-03-11 19:17:20 +00:00
Paulo Zanoni
3e5dfd668d anv: add an anv_pipe_bits bit to allow invalidating the TLB
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27928>
2024-03-11 19:17:20 +00:00
José Roberto de Souza
52ced4008c intel: Drop pre-production steppings
Workaround tool was already updated with MTL production stepping so no
need to return any stepping value for MTL.

For TGL it was also updated a long time ago, so no need to check for
revision 0.

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27399>
2024-03-11 18:52:44 +00:00
Juston Li
80f532a636 venus: fix VkDeviceGroupSubmitInfo cmd counts from feedback
Per v1.3.279 spec "VUID-VkDeviceGroupSubmitInfo-commandBufferCount-00083
commandBufferCount must equal VkSubmitInfo::commandBufferCount"

When adding feedback, need to check for vkDeviceGroupSubmitInfo in the
SubmitInfo pNext to update their commandBufferCount and
pCommandBufferDeviceMasks to include feedback cmds.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28029>
2024-03-11 18:31:06 +00:00
Mike Blumenkrantz
577085ef0e zink: update nv baseline
all format selection bugs in core mesa

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28111>
2024-03-11 18:09:57 +00:00
Faith Ekstrand
cda4ca53b8 nvk: Drop nvk_device::pdev
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28105>
2024-03-11 17:46:15 +00:00
Faith Ekstrand
4b38ba5d70 nvk: Replace more dev->pdev with nvk_device_physical()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28105>
2024-03-11 17:46:15 +00:00
Faith Ekstrand
9ddaa4ea10 nvk: Add and use more cmd_buffer_*_cls helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28105>
2024-03-11 17:46:15 +00:00
Faith Ekstrand
f55bb91159 nvk: Drop a bunch of dev->pdev and just use pdev
In all these cases, we already have a pdev temporary, we're just not
using it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28105>
2024-03-11 17:46:15 +00:00
Friedrich Vock
4c35828933 radv,driconf: Remove active accel struct workaround
Now unused and enabled by default.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28077>
2024-03-11 17:08:09 +00:00
Friedrich Vock
217072d25f radv/rt: Force active leaves for every updateable accel struct
We can't rely on games getting updates right. To avoid adding
workarounds for tons of games, be more robust by default.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28077>
2024-03-11 17:08:09 +00:00
Samuel Pitoiset
d12984edb8 ac/nir: fix exporting NGG streamout outputs with implicit PrimId from VS/TES
With RADV, when VS/TES and FS are compiled separately, the PrimitiveId
is exported unconditionally because it's not possible to know if the
FS reads it or not. This happens with fast-link GPL and shader object.

Though, the PrimitiveID should be ignored when it's implicitly exported
because otherwise the stream output LDS offset is incorrect.

This fixes a bunch of failures with transform feedback and Zink/RADV
when shader object is enabled on RDNA3.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27981>
2024-03-11 16:28:32 +00:00
Eric Engestrom
6d287943d1 vk/update-aliases: drop VK_ERROR_ prefix substitution
There is no code currently concatenating that string so it is not useful
to have it here, and it is triggering a loop because a substitution is
becoming itself if we remove this prefix.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28102>
2024-03-11 14:48:14 +00:00
Mike Blumenkrantz
9a57b1df53 driconf: add radv_zero_vram for Crystal Project (1637730)
fixes #10666

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28079>
2024-03-11 14:14:52 +00:00
Mike Blumenkrantz
c19edbb6af zink: update nvk baseline with nvk changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28100>
2024-03-11 13:55:19 +00:00
Samuel Pitoiset
7e3056e21c zink/ci: update list of flakes for RADV jobs
Mostly auto-generated with ci-collate.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28039>
2024-03-11 13:32:04 +00:00
Samuel Pitoiset
e0f9cd882c radv/ci: update list of flakes for VKCTS jobs
Using ci-collate, no wildcards because this has been auto generated.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28039>
2024-03-11 13:32:04 +00:00
Samuel Pitoiset
91579236dc ci: use Linux kernel 6.6 for RADV
Because .b2c-test is used by other farms, this needs to be overwritten
elsewhere.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28039>
2024-03-11 13:32:04 +00:00
Juan A. Suarez Romero
69fbd5cb90 v3d: fix line coords with perspective projection
The algorithm used to rendering smooth lines worked under the assumption
that line coords were in the [0, 1] range. This was correct when using
an orthogonal projection, but not when using a perspective projection.

With a perspective projection (where the value for 1/Wc set in the VPM
is not 1.0), line coords values are also affected by this projection, so
the values are not in this range.

To deal with this, we normalize the line coords using the Wc value so
the range becomes [0, 1], and the smooth line rendering works as
expected.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10496
Fixes: ee4d51f8b2 ("v3d: Add a lowering pass for line smoothing")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28072>
2024-03-11 12:42:50 +00:00
Juan A. Suarez Romero
62e1dff256 v3d: add load_fep_w_v3d intrinsic
This intrinsic helps to read the W coordinate stored in the QPU register
when initializing the input data for the fragment shaders.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28072>
2024-03-11 12:42:49 +00:00
Eric Engestrom
4e720f1fef docs: delay 24.1 branchpoint by 2 weeks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28098>
2024-03-11 12:34:54 +00:00
Juan A. Suarez Romero
d38ff02c03 v3dv: mark some promoted extensions as supported
There are few EXT_ extensions that were promoted to KHR_, but we didn't
enabled them as supported.

This makes some CTS tests to be run as unsupported when they should be
supported instead.

For example, we were passing 16/108 line rasterization tests instead of
40/108 because we did not enabled KHR_line rasterization.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28090>
2024-03-11 12:17:43 +00:00
Boris Brezillon
6fab8abebb vk/meta: Fix base_type selection in build_{clear,blit}_shader()
vk_format_is_int() returns true for both signed and unsigned integers,
which means unsigned types will always be assigned a GLSL_TYPE_INT type,
which causes some backend compilers (like bifrost) to pick a wrong
register type.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28073>
2024-03-11 11:52:13 +00:00
Boris Brezillon
c722265c16 vk/meta: Add the PUSH_DESCRIPTOR_BIT flag when creating blit pipeline layouts
Descriptors are updated with CmdPushDescriptorSet(), we need to reflect
that with a VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR when
the DescriptorSetLayout is created.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28073>
2024-03-11 11:52:13 +00:00
Luigi Santivetti
24cedcf838 pvr: return the OS page size for minMemoryMapAlignment
The driver was returning the wrong limit. The spec says that after calling
vkMapMemory: "subtracting offset bytes from the returned pointer will
always produce an integer multiple of this limit", which is in fact the OS
page size.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10767
Fixes 8991e6464 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28044>
2024-03-11 11:32:53 +00:00
Samuel Pitoiset
433a3c262a util/u_debug: fix parsing of "all" again
The current implementation is incorrect if the string starts with "all"
like "RADV_DEBUG=allbos".

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10741
Fixes: 0c42c79edf ("utils/u_debug: Fix parse of "all,<something else>")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28051>
2024-03-11 10:44:12 +00:00
Juan A. Suarez Romero
7eae0e03f1 broadcom/compiler: fix SFU check for 7.1
Avoid SFU op when the result would land in other thread.

total instructions in shared programs: 691634 -> 691928 (0.04%)
instructions in affected programs: 44888 -> 45182 (0.65%)
helped: 17
HURT: 211
helped stats (abs) min: 1 max: 2 x̄: 1.06 x̃: 1
helped stats (rel) min: 0.19% max: 1.96% x̄: 0.74% x̃: 0.71%
HURT stats (abs)   min: 1 max: 8 x̄: 1.48 x̃: 1
HURT stats (rel)   min: 0.06% max: 14.29% x̄: 2.15% x̃: 1.11%
95% mean confidence interval for instructions value: 1.14 1.44
95% mean confidence interval for instructions %-change: 1.62% 2.24%
Instructions are HURT.

total max-temps in shared programs: 133794 -> 133804 (<.01%)
max-temps in affected programs: 237 -> 247 (4.22%)
helped: 0
HURT: 10
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 1.72% max: 12.50% x̄: 6.52% x̃: 4.63%
95% mean confidence interval for max-temps value: 1.00 1.00
95% mean confidence interval for max-temps %-change: 3.37% 9.66%
Max-temps are HURT.

total sfu-stalls in shared programs: 818 -> 766 (-6.36%)
sfu-stalls in affected programs: 164 -> 112 (-31.71%)
helped: 79
HURT: 26
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 10.00% max: 100.00% x̄: 76.52% x̃: 100.00%
HURT stats (abs)   min: 1 max: 2 x̄: 1.04 x̃: 1
HURT stats (rel)   min: 0.00% max: 100.00% x̄: 12.18% x̃: 0.00%
95% mean confidence interval for sfu-stalls value: -0.67 -0.32
95% mean confidence interval for sfu-stalls %-change: -64.00% -45.11%
Sfu-stalls are helped.

total inst-and-stalls in shared programs: 692452 -> 692694 (0.03%)
inst-and-stalls in affected programs: 36509 -> 36751 (0.66%)
helped: 9
HURT: 181
helped stats (abs) min: 1 max: 2 x̄: 1.11 x̃: 1
helped stats (rel) min: 0.19% max: 1.96% x̄: 0.74% x̃: 0.71%
HURT stats (abs)   min: 1 max: 8 x̄: 1.39 x̃: 1
HURT stats (rel)   min: 0.06% max: 6.25% x̄: 1.57% x̃: 1.09%
95% mean confidence interval for inst-and-stalls value: 1.12 1.43
95% mean confidence interval for inst-and-stalls %-change: 1.27% 1.66%
Inst-and-stalls are HURT.

total nops in shared programs: 25075 -> 25154 (0.32%)
nops in affected programs: 529 -> 608 (14.93%)
helped: 3
HURT: 76
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 5.26% max: 50.00% x̄: 21.75% x̃: 10.00%
HURT stats (abs)   min: 1 max: 6 x̄: 1.08 x̃: 1
HURT stats (rel)   min: 1.04% max: 200.00% x̄: 48.08% x̃: 50.00%
95% mean confidence interval for nops value: 0.84 1.16
95% mean confidence interval for nops %-change: 36.45% 54.40%
Nops are HURT.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28009>
2024-03-11 10:23:48 +00:00
Juan A. Suarez Romero
9b1008f3bc v3d: disable Early Z for multisampled 16-bit depth buffers
Besides disabling early-z when a frame is an odd width or height, we
need to disable it if the buffer is 16-bit and multisampled.

Note that the ZS state can change after we decided globably the early-Z.
In this case, we need to re-evaluate the decision.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28009>
2024-03-11 10:23:48 +00:00
Juan A. Suarez Romero
08af5f2703 v3dv: disable Early Z for multisampled 16-bit depth buffers
Besides disabling early-z when a frame is an odd width or height, we
need to disable it if the buffer is 16-bit and multisampled.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28009>
2024-03-11 10:23:48 +00:00
Juan A. Suarez Romero
33e77c9041 v3d,v3d: use new simulator
The new simulator provides a new API, so we need to adapt the code.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28009>
2024-03-11 10:23:48 +00:00
Samuel Pitoiset
75a940c949 radvi/ci: enable RADV_PERFTEST=shader_object for RENOIR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28069>
2024-03-11 09:45:58 +00:00
Samuel Pitoiset
898f28f790 radv: allow RADV_PERFTEST=shader_object on all GFX9 GPUs
Renoir used to hangs in CI but it's fixed now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28069>
2024-03-11 09:45:58 +00:00
Mary Guillemard
fbe820f5a0 panfrost, pan/lib: Move pan_resource_table to panfrost
pan_blitter now uses its own table definition.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27846>
2024-03-11 09:23:56 +00:00
Mary Guillemard
4a4698733b pan/bi: Lower ubo table in indices for Valhall
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27846>
2024-03-11 09:23:56 +00:00
Mary Guillemard
652e1c2e13 pan/bi: Rework indices for attributes on Valhall
This also fix missing encoding of indice with non immediate index.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27846>
2024-03-11 09:23:56 +00:00
Mary Guillemard
27031910f7 pan/bi: Rework indices for image on Valhall
Lower image table in indices on panfrost.
Also implement indirect texture index support.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27846>
2024-03-11 09:23:56 +00:00
Mary Guillemard
ce52b6d359 pan/bi: Rework indices for tex on Valhall
Lower tex/sampler table in indices on panfrost.

This also implement wide indices and change the format of texture and sampler
indices received by the compiler.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27846>
2024-03-11 09:23:56 +00:00
Mary Guillemard
181891495a pan/lib: Remove variables in blitter
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27846>
2024-03-11 09:23:56 +00:00
Mary Guillemard
05607311fe pan/bi: assert indices when offsets are present in bi_emit_tex_valhall
This should always be 0 as lower_index_to_offset is expected to be set.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27846>
2024-03-11 09:23:56 +00:00
Samuel Pitoiset
c7202751ad radv: fix emitting default blend state for PS without epilogs and ESO
When a fragment shader doesn't have any written color outputs it
doesn't need a PS epilog because it's unnecessary. Though, with ESO
the driver still needs to emit the default blend state like graphics
pipelines.

This fixes a bunch of flakes with ESO and Zink.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28008>
2024-03-11 08:51:47 +00:00
Samuel Pitoiset
7ebff681db radv: re-emit RB+ state with PS epilogs only when the col format changes
RB+ was re-emitted every time a new PS epilog was requested even if
the non-compacted color format was equal.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28008>
2024-03-11 08:51:47 +00:00
Samuel Pitoiset
c1307184d2 radv: stop using the custom blend mode for PS epilogs
Internal operations that set the custom blend mode are monolithic
pipelines only, and the value should always be zero.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28008>
2024-03-11 08:51:47 +00:00
Tapani Pälli
e592ab466f anv: use workaround framework for Wa_16013000631
This should drop it from MTL as there it should apply only for a0
stepping.

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/28047>
2024-03-11 08:18:26 +00:00
Christian Gmeiner
93255abe30 etnaviv: Fix how we determine the max supported number of varyings
The driver is written that we should support ETNA_NUM_VARYINGS and reporting
a bigger number will cause some troubles. I had a quick look at galcore's
hw database and there are entries that report a higher value.

So I think what we want is to the minimum value of what kernel driver reports
and what the gallium driver should be able to handle.

Fixes: 84816c22e4 ("etnaviv: ask kernel for max number of supported varyings")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27923>
2024-03-11 07:30:51 +00:00
Yonggang Luo
14e9894a19 glx: Remove DEBUG code in xfont.c
This is the result of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21946#note_1836697

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/28093>
2024-03-11 00:09:58 +00:00
Faith Ekstrand
cc74a819e4 nvk: Disable the Out Of Range Address exception
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Faith Ekstrand
0ed7bce8e5 nvk: Always wait for the FALCON in set_priv_reg
The previous version had an optimization where, instead of actually
waiting on the FALCON to return, it would just do a bunch of nops in
some cases.  This seems broken at least on Turing+ and results in
registers not ending up with the right values.  It only really shows up
when you set two registers back-to-back in which case the second
SET_PRIV_REG may mess up the first.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Faith Ekstrand
df90d80d9d nvk: Document the register name for the helper load workaround
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Faith Ekstrand
cbcef73668 nil: Fix a typo in a comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Echo J
f8f9bceb17 nak: Rip out a few dead_code statements
This is a far less radical solution (but I still removed a decent
amount of them)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27991>
2024-03-10 16:28:14 +00:00
Caio Oliveira
e1afffe7fa intel/brw: Use hstride instead of stride for accumulator
The `stride` field is not meant to be used by ARFs (like the
accumulator), and is always 1.  Use the `hstride` instead.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28064>
2024-03-09 18:26:24 +00:00
Marek Olšák
e01266335b amd: update addrlib
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27954>
2024-03-09 16:56:56 +00:00
Mike Blumenkrantz
2cd192f879 mesa: fix CopyTexImage format compatibility checks for ES
the ES spec imposes additional requirements for copy commands,
specifically that the formats have matching component sizes

the existing check used the driver's internal formats to check
for a match, which is broken since the spec requires the match be
between the passed internalFormat and the buffer's effective internal
format (i.e., this has no relation to what the driver supports)

fixes KHR-GLES3.copy_tex_image_conversions.forbidden* on a bunch of drivers

cc: mesa-stable

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28030>
2024-03-09 15:23:07 +00:00
David Heidelberg
a5010f5f03 ci/deqp: add EGL patch for correct suite (GLES, not GL)
Fixes: 9ab02222d0 ("ci/deqp: backport Implement support for the EGL_EXT_config_select_group extension GL-CTS patch")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28091>
2024-03-09 12:45:37 +01:00
Mohamed Ahmed
3b05ebaa62 nvk: advertise shader resource residency
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
410de4bf69 nak: wire up sparse image loads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
b17f139281 nak: Wire up sparse residency for texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
140cf8d616 nak/nir: Add sparse support to shrink_image_load()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
671c6334bf nak: Plumb is_sparse through from NIR for texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
75390a7aeb nak: wire up shader resource residency intrinsics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
09e2917ee8 nak: Rename resident to fault
The predicate returns true if the requisite pixels are NOT resident.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
48803ac53d nvk: enable sparse residency features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
db45b29f5f nvk/queue: Add support for non-opaque sparse binds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
80b417d557 nvk: Refactor opaque image binds
This adds a helper for iterating over the various planes separate from
the actual bind operation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
97de81af13 nvk/queue: Add a push_bind helper
This automatically combines consecutive bind ranges so we potentially
pass a smaller set of binds to the kernel.  It also does the assert that
everything is in-bounds.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
bd6940a68d nvk: add sparse queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
23f2cfe8fb nil: Add support for sparse resident images
These have to use one of the Vulkan specified sparse image block sizes
for the tiling and have concept of a mip tail start LOD which we need to
calculate as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
3700e58692 nvk: Use "real" 3D image views
Now that we have NAK and codegen isn't messing about with 3D images
behind our back, 3D storage images "just work".

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
e5a2a9b60e nil: Add a concept of sliced 3D image views
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand
c809e85832 nil: Add a concept of width to tile sizes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand
f406206fee nil: Rework tiling calculations
Instead of calling choose_tiling once per LOD, we now call it once at
the top and then simply clamp at every LOD like the hardware does.  This
means all heuristic decisions get made up-front and the mip level walk
simply emulates the hardware.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand
1a2f23439b nvk: Use row_stride_B instead of width for render and copies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
301e707db5 nil: Expose tiling_extent_B()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
7a314170f7 nil: Add helpers for conversion from pixel values to tiles
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
132516d702 nil: Add helper function to get tile size in pixels
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
ad62f87045 nil: change image_level_size() to take tiling in account
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Paulo Zanoni
a8f7d26c2b anv: change the vm_bind-related kmd_backend vfuncs to return VkResult
All these vfuncs funnel down to either stubs or the xe_vm_bind_op()
function. By returning int we're shifting VkResult generation to the
callers, which are simply not doing the correct job. If they get
VkResult they can simply throw the errors up the stack without having
to erroneously try to figure out what really happened.

Today the callers are returning either VK_ERROR_UNKNOWN or
VK_ERROR_OUT_OF_DEVICE_MEMORY, but after the patch we're returning
either VK_ERROR_OUT_OF_HOST_MEMORY or VK_ERROR_DEVICE_LOST.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
Paulo Zanoni
4863e12679 anv/sparse: don't use the bind_timeline when doing sparse binding
The bind_timeline is used to guarantee that non-sparse objects will
be bound when batches use them (although any batch will wait on the
most recent bind, even if that's not necessary). For sparse binding
resources, it's up to the user to guarantee synchronization: do not
force every single batch buffer to wait on the latest sparse binding
operation, as that adds unnecessary synchronization points.

v2: Document how each of the vfuncs interacts with bind_timeline
    (José).

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
Paulo Zanoni
8051919b3c anv/sparse: leave the semaphore waits and signals to the vm_bind ioctl
We can now finally leave the semaphore waits and signals to the
vm_bind ioctl, making vm_bind operations truly asynchronous.

This was previously done for TR-TT in 18bd00c024 ("anv/trtt: don't
wait/signal syncobjs using the CPU anymore").

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
Paulo Zanoni
aa07d8a04c anv/sparse: don't issue a single bind operation per vm_bind ioctl
The xe.ko driver finally fixed bug 746, which means we can finally
pass multiple bind operations in a single ioctl. There's a dEQP test
that issues 960 bind operations in a single call, so our gains here
have potential, although most real-world apps are not even remotely
close to this.

Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/746
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
David Heidelberg
dd6301935e ci/freedreno: update expectations comment
Fixes: c91bd82b4b ("Uprev Piglit to 1e631479c0b477006dd7561c55e06269d2878d8d")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28060>
2024-03-08 22:12:18 +00:00
David Heidelberg
9ab02222d0 ci/deqp: backport Implement support for the EGL_EXT_config_select_group extension GL-CTS patch
This will be useful for finishing the
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9989

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28060>
2024-03-08 22:12:18 +00:00
Yiwei Zhang
c9d3cc2615 vulkan: refactor the runtime header gen order dependency
Summary:
- ensure headers used outside runtime are included in dependency source
- drop redundant idep_vulkan_common_entrypoints_h
- drop redundant icd side tricks for the order of header gen

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang
d857f10574 vulkan: remove header files from lib source files
The generated "astc_spv.h" is for runtime internal use, so leave it
inside the runtime files to ensure the header is generated before being
used to compile.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang
90824e07a2 vulkan: properly ensure wsi_entrypoints header gen order
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang
872c9fabeb vulkan: remove unused wsi_common_entrypoints include and dep
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang
8af267eb00 venus: fix ffb batch prepare for a corner case and avoid a memcpy UB
Batches must be ignored if batch count is zero, so all batch inspections
have to be gated behind batch count. For memcpy, it's UB if either src
or dst is NULL even when size is zero.

Side note:
- For original commit, this fixes just the memcpy UB
- For current codes, this fixes to not skip ffb batch prepare

Fixes: 493a3b5cda ("venus: refactor batch submission fixup")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28071>
2024-03-08 21:26:18 +00:00
David Heidelberg
f5532f8bab intel/tools: avoid invalid time and file bits combination
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10780

Fixes: cc41603d6d ("intel/tools: new intel_sanitize_gpu tool")
Reported-by: Fabio Pedretti <pedretti.fabio@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28081>
2024-03-08 21:01:38 +00:00
Collabora's Gfx CI Team
c91bd82b4b Uprev Piglit to 1e631479c0b477006dd7561c55e06269d2878d8d
2a1c49a81c...1e631479c0

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28003>
2024-03-08 19:12:56 +00:00
Sil Vilerino
803f7f5398 d3d12: Video Encode - Add driver workaround for rate control reconfiguration
Adds a driver workaround for IHVs actually supporting rate control
reconfiguration but not reporting it in the DX12 driver support flags,
and later having crashes/hangs in the driver when the rate control
reconfiguration happens using the fallback method that includes re-creating
the encoder state and encoder heap objects upon new rate control params

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28075>
2024-03-08 18:19:45 +00:00
Sil Vilerino
830561c575 d3d12: Only check D3D12_FEATURE_DATA_PLACED_RESOURCE_SUPPORT_INFO for D3D_FEATURE_LEVEL_1_0_GENERIC
Fixes: 55e377e965 ("d3d12: Add partial media, compute, graphics support with CORE and GENERIC feature levels")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28074>
2024-03-08 18:02:03 +00:00
Sil Vilerino
1b6d7ab80b d3d12: Add GetDesc wrapper for ID3D12Heap
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10779
Fixes: 55e377e965 ("d3d12: Add partial media, compute, graphics support with CORE and GENERIC feature levels")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28074>
2024-03-08 18:02:03 +00:00
Valentine Burley
089cb522be docs: Update features.txt for anv, nvk and tu
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28052>
2024-03-08 16:56:38 +00:00
Valentine Burley
fbd3269756 tu: Promote VK_EXT_line_rasterization to KHR
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28052>
2024-03-08 16:56:37 +00:00
Valentine Burley
465ff8114c tu: Promote VK_EXT_load_store_op_none to KHR
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28052>
2024-03-08 16:56:37 +00:00
Valentine Burley
2d3ed6853d tu: Promote VK_EXT_index_type_uint8 to KHR
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28052>
2024-03-08 16:56:37 +00:00
José Roberto de Souza
7ea5d1ed7d anv: Skip cmd_buffer_emit_bt_pool_base_address() in blitter and video engines
Blitter and video engines don't support PIPE_CONTROL and
3DSTATE_BINDING_TABLE_POOL_ALLOC.
I'm not 100% sure if something else should be called instead but this
is doing the same as cmd_buffer_emit_state_base_address() and this
fixes the test that was crashing in
unreachable("Trying to emit unsupported PIPE_CONTROL command.");

Fixes: dEQP-VK.pipeline.monolithic.timestamp.misc_tests.two_cmd_buffers_secondary_transfer_queue_with_availability_bit
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28053>
2024-03-08 14:39:09 +00:00
José Roberto de Souza
cccb5e36f1 anv: Call flush_pipeline_select_gpgpu() for compute engines in compute code paths
These 2 compute code paths were checking for
anv_cmd_buffer_is_render_queue() before calling
flush_pipeline_select_gpgpu() causing cmd_buffer->state.current_pipeline
to never to be set to GPGPU, trigerring
assert(cmd_buffer->state.current_pipeline == GPGPU) when running in
the compute engine.

So here just dropping the anv_cmd_buffer_is_render_queue() check.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28053>
2024-03-08 14:39:09 +00:00
Zan Dobersek
a13860e5df tu: add RMV support
Add RMV support for Turnip. The internal RMV layer is added and integrated
into the VkDevice entrypoint dispatch tables. As elsewhere, memory tracing
is put into action when enabled through the MESA_VK_TRACE environment
variable.

Similar to other implementations of RMV support in Mesa, tracing points are
added across Turnip to report on different types of RMV events, calling
into tu_rmv logging functions to emit the relevant RMV token data.

TU_BO_ALLOC_INTERNAL_RESOURCE allocation flag is added. When used, in RMV
output such an allocation will be associated with an internal resource
of the VK_RMV_RESOURCE_TYPE_MISC_INTERNAL type.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27631>
2024-03-08 11:34:17 +00:00
Zan Dobersek
e29677b16d vulkan/rmv: enable logging miscellaneous internal resources
Add the vk_rmv_misc_internal_description struct and list the misc_internal
member of that type in the vk_rmv_resource_create_token union, allowing
logging of different internal resources in RMV dumps.

The vk_rmv_common.h header also has the C-linkage block added in order to
enable its inclusion in C++ files.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27631>
2024-03-08 11:34:17 +00:00
Samuel Pitoiset
6965c569cc radv/ci: mark dEQP-VK.shader_object.binding.mesh_swap_task as flake on NAVI21
Can't reproduce locally.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27895>
2024-03-08 08:43:15 +00:00
Samuel Pitoiset
fbdf99d01b radv/ci: enable RADV_PERFTEST=shader_object for VKCTS jobs on GFX10+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27895>
2024-03-08 08:43:15 +00:00
Felix DeGrood
26da033c91 intel/ds: add pipe control reasons to perfetto flushes
Add up to four reasons per flush to perfetto flushes. PC reasons
will help debuggers understand why flushes were required, and
perhaps provide hints as to how they can be avoided.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27400>
2024-03-08 07:52:20 +00:00
Samuel Pitoiset
3f8ff988fa radv: add a helper to emit PS/TCS epilogs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28042>
2024-03-08 07:28:47 +00:00
Samuel Pitoiset
0ed6aba85a radv,aco: stop duplicating PS/TCS epilog fields
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28042>
2024-03-08 07:28:47 +00:00
Samuel Pitoiset
974d1395a2 radv: allow RADV_PERFTEST=shader_object on GFX10/GFX10.3
VK_EXT_shader_object is now supported on all GPUs! It's still not
enabled by default because it needs more testing and more fixing (Renoir
still hangs for some reasons and Zink/RADV on Polaris10 still has
flakes).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27880>
2024-03-08 07:09:40 +00:00
Samuel Pitoiset
86e4c56dbb radv: implement has_vgt_flush_ngg_legacy_bug for ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27880>
2024-03-08 07:09:39 +00:00
Samuel Pitoiset
62e6132284 radv: disable NGG in more situations with ESO on GFX10/GFX10.3
NGG streamout isn't supported on GFX10/GFX10.3, so NGG GS must be
disabled when pre-rasterization stages are compiled separately because
it's not possible to know that when compiling VS/TES only.

Also GFX10/GFX10.3 needs to disable NGG when extreme geometry are used
with tessellation and we can't know the previous stage if the GS is
compiled separately.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27880>
2024-03-08 07:09:39 +00:00
Yiwei Zhang
bffdd05a79 vulkan: fix runtime libraries' dep against generated headers
This change adds a new generated header dep to the runtime internal
library dependencies. This ensures the headers are generated before the
below libraries are compiled:
- libvulkan_lite_runtime (already satisfied due to file sources)
- libvulkan_lite_instance
- libvulkan_runtime
- libvulkan_instance

Fixes: fe2ec50844 ("vulkan: allow building venus without libcompiler")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28062>
2024-03-07 22:17:12 -08:00
Jesse Natalie
c75c485d7d dzn: Support bufferDeviceAddress
Flip on the caps/extensions, use their presence to turn on bindless just like
descriptor_indexing, use the buffer flag to indicate UAV access, and fix up
the getter to return the kind of data we want.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28028>
2024-03-07 22:35:09 +00:00
Jesse Natalie
68f43aa3ec spirv2dxil: Support buffer_device_address
This works similarly to the CL compiler, where a 64-bit address is
decomposed into a 32-bit index and offset. But unlike CL, where the
index is into a per-kernel array of bound buffers, for Vulkan it points
into the global device-wide descriptor heap.

For all global deref chains that terminate in a load/store/atomic, create
a parallel deref chain that begins by decomposing the pointer to a vec2,
followed by a load_vulkan_descriptor, and then an SSBO deref chain. Any instance
where the original deref chain was used for something else will remain as
global derefs, so also run lower_explicit_io for global to produce appropriate
pointer math.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28028>
2024-03-07 22:35:09 +00:00
Corentin Noël
57d914b757 ci: Update virglrenderer and crosvm
Update virglrenderer to test EXT_attachment_feedback_loop_layout

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28014>
2024-03-07 21:19:05 +00:00
Yonggang Luo
fe2ec50844 vulkan: allow building venus without libcompiler
This is done by introduce idep_vulkan_lite_runtime, and only venus
depends on  idep_vulkan_lite_runtime.

Modify the meson and source files to allow building venus without
the compiler.

See details Venus build metrics at the MR description.

gfxstream-vulkan forwards the shader to the host, and doesn't
need to convert into NIR in the guest.  This results in faster
builds and less parts of Mesa to build.  Also venus does the
same thing too, that's what the build is keyed on right now
as an in-tree user.

v7: By Yonggang Luo <luoyonggang@gmail.com>
  Add idep_vulkan_common_entrypoints_h into vulkan_lite_runtime_deps because
  vk_instance.c depends on idep_vulkan_common_entrypoints_h but vk_common_entrypoints is
  not compiled in library `vulkan_lite_instance`.
  Rename idep_vulkan_runtime_headers to idep_vulkan_lite_runtime_headers because
  both lite/full runtime library depends on this, but lite should not depends on full
  vk_meta_private.h added into vulkan_runtime_files

v6: By Yonggang Luo <luoyonggang@gmail.com>
  get vulkan_lite_runtime_files and vulkan_runtime_files sorted

v5: By Yiwei Zhang <zzyiwei@chromium.org>
  both vk_sampler and vk_ycbcr_conversion can stay in the lite runtime

v4: By Yonggang Luo <luoyonggang@gmail.com>
  only build vk_instance.(c|h) twice for reduce compiling time

v3: By Yiwei Zhang <zzyiwei@chromium.org>
  less code changes by introduce libvulkan_lite_runtime

v2: By Yonggang Luo <luoyonggang@gmail.com>
  allow building Vulkan without libcompiler without compiling flags, the
  venus is always built without libcompiler

v1: By Gurchetan Singh <gurchetansingh@google.com>
  allow building Vulkan without libcompiler

Signed-off-by: Gurchetan Singh <gurchetansingh@google.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26574>
2024-03-07 20:33:28 +00:00
Yonggang Luo
a367cd4931 Revert "meson/vulkan/util: allow venus to drop compiler deps"
This reverts commit 3923d43908.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26574>
2024-03-07 20:33:28 +00:00
Konstantin Seurer
12c71ef847 radv/rt: Fix raygen_imported condition
This can cause GPU hangs if the imported raygen shader is the first
shader of the library.

Fixes: 0f87d40 ("radv/rt: Skip compiling a traversal shader")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27137>
2024-03-07 20:07:07 +00:00
Konstantin Seurer
0e8f2eca9e radv/rt: Inline constant information about ray flags
Totals from 4 (1.06% of 379) affected shaders:
Instrs: 2868 -> 2588 (-9.76%)
CodeSize: 15184 -> 13544 (-10.80%)
Latency: 69280 -> 86922 (+25.46%)
InvThroughput: 11546 -> 14486 (+25.46%)
Copies: 680 -> 592 (-12.94%)
Branches: 148 -> 128 (-13.51%)
PreSGPRs: 216 -> 172 (-20.37%)

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27137>
2024-03-07 20:07:07 +00:00
Konstantin Seurer
b4735a944a radv/rt: Inline constant trace_ray srcs into the traversal shader
Totals from 4 (1.06% of 379) affected shaders:
Instrs: 2864 -> 2868 (+0.14%)
CodeSize: 15232 -> 15184 (-0.32%)
Latency: 69074 -> 69280 (+0.30%)
InvThroughput: 11512 -> 11546 (+0.30%)
VClause: 124 -> 116 (-6.45%)
Copies: 676 -> 680 (+0.59%)
PreVGPRs: 316 -> 312 (-1.27%)

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27137>
2024-03-07 20:07:07 +00:00
Konstantin Seurer
843d19a995 radv/rt: Avoid passing unused data to the next stage
We can gather the args used by all other stages and use that to optimize
the traversal shader.

Totals from 4 (1.06% of 379) affected shaders:
Instrs: 2912 -> 2864 (-1.65%)
CodeSize: 15424 -> 15232 (-1.24%)
Latency: 69342 -> 69074 (-0.39%)
InvThroughput: 11558 -> 11512 (-0.40%)
Copies: 712 -> 676 (-5.06%)
Branches: 152 -> 148 (-2.63%)
PreVGPRs: 324 -> 316 (-2.47%)

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27137>
2024-03-07 20:07:07 +00:00
Konstantin Seurer
eb249bb18e aco: Only fix used variables to registers
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27137>
2024-03-07 20:07:07 +00:00
Konstantin Seurer
348d13f06e radv/rt: Fixup constant args
They are fixed up automatically right now, which will change in the next
patch.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27137>
2024-03-07 20:07:07 +00:00
Konstantin Seurer
0597906ada radv/rt: Add radv_ray_tracing_stage_info
Useful for gathering more information about used args and traces.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27137>
2024-03-07 20:07:07 +00:00
Konstantin Seurer
a44765606c radv/rt: Implement RADV_DEBUG=shaderstats
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27137>
2024-03-07 20:07:07 +00:00
Konstantin Seurer
f3fe1f2f18 vulkan: Implement DebugMarkerSetObjectNameEXT
DebugMarkerSetObjectNameEXT is just a less powerful version of
SetDebugUtilsObjectNameEXT. Fixes the objectType cast warning as well.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27975>
2024-03-07 19:28:53 +00:00
Iván Briano
d039764410 anv, hasvk: pMutableDescriptorTypeLists can be out of range on pool creation
The spec for vkCreateDescriptorPool says:
   If VkMutableDescriptorTypeCreateInfoEXT does not exist in the pNext
   chain, or VkMutableDescriptorTypeCreateInfoEXT::pMutableDescriptorTypeLists[i]
   is out of range, the descriptor pool allocates enough memory to be
   able to allocate a VK_DESCRIPTOR_TYPE_MUTABLE_EXT descriptor with any
   supported VkDescriptorType as a mutable descriptor.

So check that mutableDescriptorTypeListCount is in range of the binding
we are asking for instead of just 0.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28031>
2024-03-07 18:56:57 +00:00
Eric R. Smith
0e1862a2ab panfrost: protect alpha calculation from accessing non-existent component
We had a "Don't read out-of-bounds" sanity check for creating an alpha
when ATEST was needed, but that check happened only after we already
did a bi_extract(), which meant that the bi_extract could get into
trouble and assert() when there weren't enough components. Fixed by
re-arranging the calculation.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund>@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28045>
2024-03-07 17:29:09 +00:00
Timur Kristóf
a6f270c160 radv: Lower mesh shader draw ID to zero when they have a task shader.
This prevents potential app bugs causing GPU hangs and other issues.
Note that the draw ID is undefined in mesh shaders when also
using a task shader.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27879>
2024-03-07 17:07:24 +00:00
Caio Oliveira
7a038cc097 intel/elk: Clean up unused code in elk_compiler.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:19 +00:00
Caio Oliveira
be73fa1434 intel/elk: Remove multi-polygon support
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:19 +00:00
Caio Oliveira
fd3a815a5b intel/elk: Remove remaining Gfx9+ code
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:19 +00:00
Caio Oliveira
ea12b38602 intel/elk: Remove uses of intel_device_info_is_9lp()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
9f5213923e intel/elk: Remove Gfx9+-only passes
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
fb2eee2aaa intel/elk: Remove use_tcs_multi_patch
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
abbb7d64f5 intel/elk: Remove Gfx9+ from NIR auxiliary code
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
64ff9fa5ae intel/elk: Remove Gfx9+ from disasm
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
566e3c675e intel/elk: Remove Gfx9+ from asm grammar
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
936528cda5 intel/elk: Remove Gfx9+ from Reg related code
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
f170d8395b intel/elk: Remove Gfx9+ from FS generator
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
3d867e2fc7 intel/elk: Remove coarse pixel handling
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
7bce435dca intel/elk: Remove Gfx9+ from EU emission
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
d9e7682ccc intel/elk: Remove Gfx9+ from thread payload
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
241a03b8ec intel/elk: Remove Gfx9+ from passes
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
2b6b786feb intel/elk: Remove FB_WRITE_LOGICAL_SRC_SRC_STENCIL
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
7b651ac6c3 intel/elk: Remove Gfx9+ from compile/run functions
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
cb2d96af6a intel/elk: Remove Gfx9+ from nir conversion
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
6b6de68b1c intel/elk: Remove validation code for Gfx9+
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
9f80fc3d70 intel/elk: Remove unused SEND features
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
2b15a90cc3 intel/elk: Remove unused sources from ELK_SHADER_OPCODE_SEND
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
e44bacfa91 intel/elk: Remove Xe2 logical sends lowering
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
ff64e68ef4 intel/elk: Remove ex_desc and ex_mlen from elk_inst
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
75e13ac705 intel/elk: Remove Gfx12.5 URB message
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
a3f67c2d3a intel/elk: Remove FB_READ opcodes
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
77ba6f5dcd intel/elk: Remove Gfx9+ dataport messages
Note GFX9_DATAPORT_DC_PORT1_A64_SCATTERED_READ is marked as Gfx9 but
it is in the bspec and the PRM does mention it (although not in the
list), so keep it around since we've been using it for a while now.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
59c5c67d22 intel/elk: Rename symbols for A64 OWord Block R/W messages
These are also present in Gfx8, so use the GFX8 instead of
GFX9 as prefix to avoid confusion.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
05d78994a7 intel/elk: Remove Gfx9+ sampler messages and modes
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
9b709e31cb intel/elk: Remove Gfx12 SFIDs and related LSC code
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
43b2261ab5 intel/elk: Remove SYNC opcode and SWSB annotations
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
37cd18e30e intel/elk: Remove encoding for Gfx9+
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
accac95c0d intel/elk: Remove EU compaction logic for Gfx9+
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:18 +00:00
Caio Oliveira
e8c4104362 intel/elk: Remove IADD3 opcode
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:17 +00:00
Caio Oliveira
d1049408b5 intel/elk: Remove ROR and ROL opcodes
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:17 +00:00
Caio Oliveira
28a7265b10 intel/elk: Remove DP4A opcode
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:17 +00:00
Caio Oliveira
9e58170f84 intel/elk: Remove BTD and RT opcodes
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:17 +00:00
Caio Oliveira
24569b8079 intel/elk: Remove DPAS opcode
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:17 +00:00
Caio Oliveira
7b90470ca1 intel/elk: Remove split sends
They are not supported in Gfx8-.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
2024-03-07 15:53:17 +00:00
Gert Wollny
b7d6d90dab zink/nir-to-spirv: Make sure sampleid for InterpolateAtSample is int
This fixes the validation error

  VUID-VkShaderModuleCreateInfo-pCode-08737

triggered by piglit:
  spec@arb_gpu_shader5@execution@built-in-functions@fs-interpolateatsample-block-array:

  GLSL.std.450 InterpolateAtSample: expected Sample to be 32-bit integer
    %47 = OpExtInst %float %1 InterpolateAtSample %45 %float_0

Fixes: 9f6be8effb
   zink: store and use alu types for ntv defs

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28043>
2024-03-07 13:26:31 +00:00
Rhys Perry
dea8b02b03 aco: don't pass constant to is_overwritten_since()
Fixes usage of uninitialised value in dead_space/065515347dca4851 and
other dead_space shaders.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: def0c275c4 ("aco: Eliminate SCC copies when possible.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28011>
2024-03-07 12:17:39 +00:00
Samuel Pitoiset
c383739cfc radv/ci: remove dEQP-VK.robustness.* from the VANGOGH skip list
These no longer hangs the GPU since 4c05ebf3a5 ("radv: Set SCRATCH_EN
for RT pipelines based on dynamic stack size").

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28037>
2024-03-07 11:51:42 +00:00
Samuel Pitoiset
52be850d7f radv/ci: remove RT tests from the VANGOGH skip list
I thought the recent scratch fix for RT would have fixed it but even
with it reverted everything is passing. A bunch of RT fixes landed
since, who knows.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9208
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28037>
2024-03-07 11:51:42 +00:00
Friedrich Vock
7792ee1c15 radv/rt: Fix frontface culling with emulated RT
We need to preserve the divisor's sign for front/backface detection to
work correctly.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28034>
2024-03-07 10:34:52 +00:00
David Heidelberg
23441f7f4a drm-shim: Avoid invalid file and time bits combination
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065153

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10721
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27967>
2024-03-07 09:55:06 +00:00
Kenneth Graunke
9e5fd49cbe iris: Fix tessellation evaluation shaders that use scratch
The code path for emitting tessellation commands when the TES needed
scratch space was failing to emit 3DSTATE_TE, and instead only emitting
3DSTATE_DS.  This meant that you could get HS and DS enabled with
tessellation itself turned off, which is utter nonsense and would
cause a GPU hang.

Alchemist and later takes a different path and don't take this bug,
but all earlier hardware would hit it.  Discovered while working on
compiler changes that caused a single piglit test to spill minorly,
and thus break entirely.

Fixes: 4256f7ed58 ("iris: Fill out scratch base address dynamically")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28032>
2024-03-07 09:32:51 +00:00
Chris Rankin
f9358cb105 frontends/vdpau: Add support for VDPAU AV1 decoding.
Signed-off-by: Chris Rankin <rankincj@gmail.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27825>
2024-03-07 07:55:19 +00:00
Chris Rankin
f64e8ca7f4 meson: bump the minimal required vdpau version to 1.5
Signed-off-by: Chris Rankin <rankincj@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27825>
2024-03-07 07:55:19 +00:00
Mike Blumenkrantz
2665badcfe util/blitter: iterate samples in stencil_fallback
this matches handling in do_blits and fixes multisampled stencil blits

fixes (nv):
GTF-GL45.gtf44.GL31Tests.texture_stencil8.texture_stencil8_gl44

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27988>
2024-03-07 04:44:58 +00:00
Timothy Arceri
981900055c glsl: remove now unused glsl ir lower discard pass
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28005>
2024-03-07 04:02:45 +00:00
Timothy Arceri
8ceb10a1bd glsl: make use of nir lower discard flow
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28005>
2024-03-07 04:02:45 +00:00
Timothy Arceri
8317a37ea7 glsl: implement nir version of lower discard flow
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28005>
2024-03-07 04:02:45 +00:00
Teng, Jin Chung
ef45417690 d3d12: HEVC Encode - Query slice config mode based on user slice setting
Queries D3D12_FEATURE_VIDEO_ENCODER_SUPPORT1 for HEVC setting
D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1.SubregionFrameEncoding as
D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_UNIFORM_PARTITIONING_SUBREGIONS_PER_FRAME
or D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_FULL_FRAME depending on
the frontend number of slices requested.
Doing this avoids d3d12_video_encoder_config_dirty_flag_slices from
being set on every frame otherwise, triggering a reconstruction of the
encoder objects on every frame on some platforms.

Signed-off-by: Teng, Jin Chung <jin.chung.teng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28007>
2024-03-07 03:43:10 +00:00
Jesse Natalie
cda6877cb6 nir_lower_tex_shadow: For old-style shadows, use vec4(result, 0, 0, 1)
If the app requests a swizzle on the shadow sampler which doesn't just
return the red channel or literal 0s/1s, we'll crash attempting to build
the result vector. Use something that's probably valid.

Cc: mesa-stable
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28001>
2024-03-07 01:15:46 +00:00
Mike Blumenkrantz
4b7bf9a6db zink: update nvk baseline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28026>
2024-03-07 00:21:05 +00:00
Sil Vilerino
2074da0c39 d3d12: Refactor graphics functions from context and blit to separate files
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27997>
2024-03-06 23:06:59 +00:00
Sil Vilerino
55e377e965 d3d12: Add partial media, compute, graphics support with CORE and GENERIC feature levels
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27997>
2024-03-06 23:06:59 +00:00
Sil Vilerino
0cd023bf6a frontend/va: Use get_resources in VaDeriveImage for media only devices without get_surfaces support
Reviewed-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27997>
2024-03-06 23:06:59 +00:00
Sil Vilerino
bf6a415841 frontend/va: Support media only post proc without compositor using shaders or surfaces
Reviewed-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27997>
2024-03-06 23:06:59 +00:00
Lionel Landwerlin
0b6a2c24d6 anv: don't copy the null descriptor from the GPU memory
Performance regression with vkd3d-proton.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9506d3f338 ("anv: implement data write entry points for EXT_descriptor_buffer")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Felix DeGrood felix.j.degrood@intel.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28010>
2024-03-06 22:45:13 +00:00
Faith Ekstrand
d20b547e8e nvk: Report official GPU names from NVIDIA when we have them
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28024>
2024-03-06 22:28:22 +00:00
Faith Ekstrand
1069b216ac nouveau: Import g_nv_name_released.h from NVIDIA OGK
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28024>
2024-03-06 22:28:22 +00:00
Sil Vilerino
43b857a015 d3d12: HEVC encode - Update CQP using current frame type as per VA frontend change
Fixes: 8c9445896f ("frontends/va: Separate QP for I/P/B frames")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28018>
2024-03-06 22:09:45 +00:00
Sil Vilerino
f8274eea76 d3d12: H264 encode - Update CQP using current frame type as per VA frontend change
Fixes: 8c9445896f ("frontends/va: Separate QP for I/P/B frames")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28018>
2024-03-06 22:09:45 +00:00
Sil Vilerino
e3e593d721 d3d12: AV1 encode - Configure CQP using qp and new qp_inter parameters
Fixes: 8c9445896f ("frontends/va: Separate QP for I/P/B frames")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28018>
2024-03-06 22:09:45 +00:00
Vasily Khoruzhick
4762d03391 lima: update expected CI failures
Backport-to: 23.3
Backport-to: 24.0
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24855>
2024-03-06 21:43:43 +00:00
Vasily Khoruzhick
feccf4121b lima: gpir: abort compilation if load_uniform instrinsic src isn't const
GP supports indirect indexing of uniforms, but it's never been
implemented in GPIR, so just abort compilation instead of crashing an
app with assertion failure.

Backport-to: 23.3
Backport-to: 24.0
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24855>
2024-03-06 21:43:43 +00:00
Vasily Khoruzhick
6998c48f77 lima: ppir: use dummy program if FS has empty body
As per spec, any colors, or color components, associated with a fragment
that are not written by the fragment shader are undefined.

So we might as well just write vec4(1.0) to output, since HW doesn't allow
us to have an empty FS.

Backport-to: 23.3
Backport-to: 24.0
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24855>
2024-03-06 21:43:43 +00:00
Vasily Khoruzhick
b999e41250 lima: ppir: always use vec4 for output register
gl_FragDepth is a float, but the hardware still uses a vec4 register,
.x component for depth and another component for stencil, so we have to
always allocate a vec4 for output.

Backport-to: 23.3
Backport-to: 24.0
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24855>
2024-03-06 21:43:43 +00:00
Felix DeGrood
f6c908293e iris: Increase target batch size to 128 KB
Doubling batch size speeds up GFXBench Manhattan +0.5% by
reducing batches / frame from 3 -> 2.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28002>
2024-03-06 21:22:17 +00:00
Danylo Piliaiev
a76fcebfc0 tu: Fix dynamic state not always being emitted
We precompile static state and count it as dynamic, so we have to
manually clear bitset that tells which dynamic state is set, in order to
make sure that future dynamic state will be emitted. The issue is that
framework remembers only a past REAL dynamic state and compares a new
dynamic state against it, and not against our static state masquaraded
as dynamic.

Example:
 - Set dynamic state S with value A
 - Bind pipeline with dynamic state S
 - Draw
 - Bind pipeline with static state S with value B
 - Draw
 - Set dynamic state S with value A
 - Bind pipeline with dynamic state S
 - Draw

Previously, at the last draw the dynamic state S was not dirty and
current dynamic state was equal to the past dynamic state, so
it was not emitted, while GPU used value B from static pipeline.

This fix, at the point of static pipeline binding, clears the
bitset which tells that dynamic state S was previously set.
This forces the next dynamic state to be re-emitted.

Fixes broken rendering in Arma 3, and probably some other
games running through DXVK.

Fixes: 97da0a7734
("tu: Rewrite to use common Vulkan dynamic state")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27961>
2024-03-06 20:57:35 +00:00
Lionel Landwerlin
6823ffe70e anv: try to keep the pipeline in GPGPU mode when buffer transfer ops
To avoid ping-ponging between 3D & GPGPU in the following sequence :

  vkCmdDispatch(...)
  vkCmdCopyBuffer(...)
  vkCmdDispatch(...)

We can try to keep the pipeline in GPGPU mode when doing blorp buffer
operations (we have blorp support for the CCS and can use the same
shaders on RCS).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27956>
2024-03-06 20:33:12 +00:00
Lionel Landwerlin
194afe8416 anv/iris/blorp: use the right MOCS values for each engine
There are multiple problems currently :

   - blorp blitter commands overwrite the protection value coming from
     the driver
   - anv & iris are using render target MOCS for compute commands

Driver already have the ability to pass the MOCS values so we choose
to stick to that in this change. But now the driver need to select the
right MOCS depending on the engine the commands are going to run onto.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27956>
2024-03-06 20:33:12 +00:00
Lionel Landwerlin
c40f14bb31 anv: fix incorrect ISL usage in buffer view creation
We need to use the usage parameter.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 64f20cec28 ("anv: prepare image/buffer views for non indirect descriptors")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27956>
2024-03-06 20:33:12 +00:00
Faith Ekstrand
33bf7ca710 nvk: Return os_page_size for minMemoryMapAlignment
Fixes: 8017ac0e79 ("nvk: add some limits/features from binary driver.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28019>
2024-03-06 19:21:20 +00:00
Gert Wollny
1882527f78 zink: decrease aggressiveness of increasing descriptor data space adaptive
An increase by factor 10 with each re-allocation is a bit aggressive and
we hit the available limit easily on lavapipe.

By starting of with an initial larger scale, but decreasing this over time
this error can be avoided.

Specifically with
  "spec@arb_shader_texture_lod@execution@tex-miplevel-selection *gradarb 1d"
originally the buffer sizes would be 250, 2500, 25000, and 250000,
with the patch it's 250, 4000, and 32000.

v2: use minimum scale of 4 instead of 2 (Mike)
v3: fix typo (Mike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27977>
2024-03-06 18:50:46 +00:00
Gert Wollny
8e239dda41 zink: use only ZINK_BIND_DESCRIPTOR
ZINK_BIND_RESOURCE_DESCRIPTOR and ZINK_BIND_SAMPLER_DESCRIPTOR are
always used together, so that we can replace these two values with
ZINK_BIND_DESCRIPTOR and use only one bit to represent the value.
With that we can also remove the aliasing of ZINK_BIND_DESCRIPTOR with
PIPE_BIND_CONST_BW.

Fixes:  13c6ad0038
    zink: use a single descriptor buffer for all non-bindless types

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28016>
2024-03-06 18:15:21 +00:00
Konstantin Seurer
1bcb7f1eb8 docs: Document lavapipe ray tracing features
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25616>
2024-03-06 16:34:26 +00:00
Konstantin Seurer
b55580cab8 lavapipe/ci: Document ray query failures
This is the same issue as RADV+emulate_rt has. (Except the jit timeout
of course)

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25616>
2024-03-06 16:34:26 +00:00
Konstantin Seurer
c2646c6bbc lavapipe: Advertise VK_KHR_ray_query
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25616>
2024-03-06 16:34:26 +00:00
Konstantin Seurer
32e86e1bff lavapipe: Advertise VK_KHR_acceleration_structure
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25616>
2024-03-06 16:34:26 +00:00
Konstantin Seurer
09bf35e3c4 lavapipe: Advertise VK_KHR_deferred_host_operations
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25616>
2024-03-06 16:34:26 +00:00
Konstantin Seurer
ed6c0a7443 lavapipe: Implement VK_KHR_ray_query
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25616>
2024-03-06 16:34:26 +00:00
Konstantin Seurer
b69ae8b355 lavapipe: Add ray traversal code
Basically the software implementation in radv_rt_common without
traversal stack.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25616>
2024-03-06 16:34:26 +00:00
Konstantin Seurer
897ccbd180 lavapipe: Implement VK_KHR_acceleration_structure
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25616>
2024-03-06 16:34:25 +00:00
Konstantin Seurer
ff09e95080 vulkan/cmd_queue: Implement CmdBuildAccelerationStructuresKHR
This is needed for copying the arguments properly.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25616>
2024-03-06 16:34:25 +00:00
Amber
48da361eb7 tu: wideLines support for a7xx.
Passes dEQP-VK.clipping.clip_volume.clipped.wide_lines_*

Signed-off-by: Amber Harmonia <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27775>
2024-03-06 16:01:09 +00:00
Rhys Perry
beb07fafba nir/search: fix nir_replace_instr() debug code
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27335>
2024-03-06 15:23:18 +00:00
Rhys Perry
a93bd52f4f nir/lower_int64: allow 64-bit comparisons when lowering minmax
RADV doesn't need these to be lowered.

fossil-db (navi31):
Totals from 1 (0.00% of 79242) affected shaders:
Instrs: 28 -> 26 (-7.14%)
CodeSize: 140 -> 128 (-8.57%)
Latency: 605 -> 604 (-0.17%)
Copies: 5 -> 6 (+20.00%)
VALU: 14 -> 13 (-7.14%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27335>
2024-03-06 15:23:18 +00:00
Rhys Perry
b37804c8de nir/algebraic: optimize 64-bit comparisons with zero'd halves to 32-bit
These expect nir_lower_int64 to replace u2u64 to pack_64_2x32_split(, 0).

fossil-db (navi31):
Totals from 149 (0.19% of 79242) affected shaders:
Instrs: 433095 -> 431830 (-0.29%); split: -0.29%, +0.00%
CodeSize: 2165980 -> 2160284 (-0.26%); split: -0.27%, +0.00%
SpillSGPRs: 689 -> 688 (-0.15%)
Latency: 3801497 -> 3799901 (-0.04%); split: -0.05%, +0.01%
InvThroughput: 1547916 -> 1546567 (-0.09%); split: -0.09%, +0.01%
VClause: 4698 -> 4693 (-0.11%)
SClause: 9981 -> 9977 (-0.04%); split: -0.05%, +0.01%
Copies: 66148 -> 65431 (-1.08%); split: -1.09%, +0.01%
PreSGPRs: 6732 -> 6729 (-0.04%)
PreVGPRs: 7976 -> 7945 (-0.39%)
VALU: 252936 -> 252336 (-0.24%)
SALU: 51794 -> 51274 (-1.00%); split: -1.03%, +0.02%

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/27335>
2024-03-06 15:23:18 +00:00
Rhys Perry
417eb390c6 nir/algebraic: remove duplicated iand(ien, ine)/ior(ieq, ieq) patterns
These don't seem useful, since they're already done in the early optimizations.

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/27335>
2024-03-06 15:23:18 +00:00
Rhys Perry
6952bb359c nir/algebraic: don't create 64-bit min/max/ior if lowered
fossil-db (navi31):
Totals from 58 (0.07% of 79242) affected shaders:
Instrs: 11692 -> 11304 (-3.32%)
CodeSize: 65836 -> 62412 (-5.20%)
VGPRs: 1320 -> 1344 (+1.82%)
Latency: 51712 -> 50234 (-2.86%)
InvThroughput: 10190 -> 10160 (-0.29%)
Copies: 460 -> 688 (+49.57%)
VALU: 6130 -> 5897 (-3.80%)
SALU: 1231 -> 1284 (+4.31%); split: -0.32%, +4.63%

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/27335>
2024-03-06 15:23:18 +00:00
Daniel Schürmann
61854009f3 aco: rematerialize constants in every basic block during optimizer
Totals from 16837 (21.25% of 79242) affected shaders: (GFX11)

MaxWaves: 441634 -> 444546 (+0.66%); split: +0.66%, -0.00%
Instrs: 25908303 -> 25838469 (-0.27%); split: -0.36%, +0.09%
CodeSize: 133943168 -> 135446948 (+1.12%); split: -0.04%, +1.16%
VGPRs: 985332 -> 977440 (-0.80%); split: -0.83%, +0.03%
SpillSGPRs: 9133 -> 7535 (-17.50%); split: -17.74%, +0.24%
SpillVGPRs: 1418 -> 1359 (-4.16%); split: -4.58%, +0.42%
Scratch: 5047552 -> 5040640 (-0.14%)
Latency: 204330340 -> 204179212 (-0.07%); split: -0.32%, +0.25%
InvThroughput: 36584220 -> 36508856 (-0.21%); split: -0.40%, +0.19%
VClause: 437847 -> 437344 (-0.11%); split: -0.34%, +0.22%
SClause: 771311 -> 771013 (-0.04%); split: -0.42%, +0.38%
Copies: 1774950 -> 1712070 (-3.54%); split: -4.46%, +0.91%
Branches: 580595 -> 580478 (-0.02%); split: -0.03%, +0.01%
PreSGPRs: 877017 -> 817549 (-6.78%)
PreVGPRs: 852747 -> 846966 (-0.68%); split: -0.68%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26875>
2024-03-06 15:02:21 +00:00
Rohan Garg
9baa57158d intel/genxml: update PIPE_CONTROL so that we can decode it on the CCS
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28013>
2024-03-06 14:37:11 +00:00
Rhys Perry
3b28ba8239 aco: optimize for purely linear VGPR copies
fossil-db:
Totals from 2 (0.00% of 79242) affected shaders:
Instrs: 1344 -> 1340 (-0.30%)
CodeSize: 6968 -> 6952 (-0.23%)
Latency: 4414 -> 4410 (-0.09%)
InvThroughput: 1018 -> 1020 (+0.20%)
Copies: 60 -> 56 (-6.67%)
SALU: 40 -> 36 (-10.00%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:46 +00:00
Rhys Perry
8cd3a3a520 aco/tests: add tests for linear VGPR register allocation
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:46 +00:00
Rhys Perry
f9b37723d0 aco/ra: emit linear VGPR parallel copy separately
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:46 +00:00
Rhys Perry
d9b69a7cbf aco/ra: disable live range splitting of linear vgprs
These shouldn't happen anymore.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:46 +00:00
Rhys Perry
b7738de4f9 aco/ra: rework linear VGPR allocation
We allocate them at the end of the register file and keep them separate
from normal VGPRs. This is for two reasons:
- Because we only ever move linear VGPRs into an empty space or a space
  previously occupied by a linear one, we never have to swap a normal VGPR
  and a linear one. This simplifies copy lowering.
- As linear VGPR's live ranges only start and end on top-level blocks, we
  never have to move a linear VGPR in control flow.

fossil-db (navi31):
Totals from 5493 (6.93% of 79242) affected shaders:
MaxWaves: 150365 -> 150343 (-0.01%)
Instrs: 7974740 -> 7976073 (+0.02%); split: -0.06%, +0.08%
CodeSize: 41296024 -> 41299024 (+0.01%); split: -0.06%, +0.06%
VGPRs: 283192 -> 329560 (+16.37%)
Latency: 64267936 -> 64268414 (+0.00%); split: -0.17%, +0.17%
InvThroughput: 10954037 -> 10951735 (-0.02%); split: -0.09%, +0.07%
VClause: 132792 -> 132956 (+0.12%); split: -0.06%, +0.18%
SClause: 223854 -> 223841 (-0.01%); split: -0.01%, +0.01%
Copies: 559574 -> 561395 (+0.33%); split: -0.24%, +0.56%
Branches: 179630 -> 179636 (+0.00%); split: -0.02%, +0.02%
VALU: 4572683 -> 4574487 (+0.04%); split: -0.03%, +0.07%
SALU: 772076 -> 772111 (+0.00%); split: -0.01%, +0.01%
VOPD: 1095 -> 1099 (+0.37%); split: +0.73%, -0.37%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:46 +00:00
Rhys Perry
2d49c79c7e aco/ra: change get_reg_bounds() helper
We will have a separate bounds for linear VGPRs.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:46 +00:00
Rhys Perry
a38bc9e165 aco/ra: move parallelcopy creation into helper
This is almost a direct copy+paste into it's own function.

This is useful both for future work and the make the caller smaller.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:46 +00:00
Rhys Perry
a8b72082cf aco/ra: constify various RegisterFile
This makes it more obvious that these functions don't change it.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:45 +00:00
Rhys Perry
6a195bb521 aco: only allow linear vgpr kills in top-level blocks
This is already the case, and requiring it will be useful in the future.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:45 +00:00
Rhys Perry
07eab4ab40 aco: require linear vgpr uses to be late kill
This also removes some linear VGPR tests which will be replaced soon
anyway.

fossil-db (navi31):
Totals from 107 (0.14% of 79242) affected shaders:
Instrs: 66203 -> 66211 (+0.01%); split: -0.09%, +0.10%
CodeSize: 354644 -> 354588 (-0.02%); split: -0.08%, +0.07%
VGPRs: 4476 -> 4452 (-0.54%); split: -0.80%, +0.27%
Latency: 513863 -> 513877 (+0.00%); split: -0.08%, +0.08%
InvThroughput: 68871 -> 68870 (-0.00%); split: -0.02%, +0.02%
SClause: 1589 -> 1590 (+0.06%)
PreVGPRs: 3404 -> 3415 (+0.32%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:45 +00:00
Rhys Perry
5e17a39b15 aco: allow p_start_linear_vgpr to use multiple operands
Merging the p_create_vector into the p_start_linear_vgpr is useful since
we stopped attempting to place the p_start_linear_vgpr definition in the
same registers as the operand.

fossil-db (navi31):
Totals from 927 (1.17% of 79242) affected shaders:
MaxWaves: 26412 -> 26442 (+0.11%)
Instrs: 938328 -> 938181 (-0.02%); split: -0.14%, +0.13%
CodeSize: 4891448 -> 4890820 (-0.01%); split: -0.11%, +0.10%
VGPRs: 47016 -> 47004 (-0.03%); split: -0.13%, +0.10%
SpillSGPRs: 222 -> 226 (+1.80%)
Latency: 5076065 -> 5075191 (-0.02%); split: -0.12%, +0.10%
InvThroughput: 712316 -> 712421 (+0.01%); split: -0.09%, +0.10%
SClause: 27992 -> 27972 (-0.07%); split: -0.09%, +0.02%
Copies: 38042 -> 38104 (+0.16%); split: -1.95%, +2.12%
PreVGPRs: 39448 -> 39369 (-0.20%)
VALU: 570157 -> 570224 (+0.01%); split: -0.13%, +0.14%
SALU: 51672 -> 51678 (+0.01%); split: -0.01%, +0.02%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:45 +00:00
Rhys Perry
f764f6848a aco/ra: disable p_start_linear_vgpr allocation hint
As this is, this will become useless soon.

fossil-db (navi31):
Totals from 176 (0.22% of 79242) affected shaders:
Instrs: 101932 -> 102413 (+0.47%); split: -0.01%, +0.49%
CodeSize: 541352 -> 543256 (+0.35%); split: -0.01%, +0.36%
VGPRs: 7884 -> 7896 (+0.15%)
Latency: 588129 -> 588559 (+0.07%); split: -0.07%, +0.15%
InvThroughput: 83349 -> 83689 (+0.41%); split: -0.01%, +0.42%
Copies: 4324 -> 4691 (+8.49%)
VALU: 61431 -> 61798 (+0.60%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:45 +00:00
Rhys Perry
f99443a68b aco: don't combine linear and normal VGPR copies
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27697>
2024-03-06 12:55:45 +00:00
Christian Gmeiner
599de4b47c etnaviv: Remove not used etna_assemble_set_imm(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27950>
2024-03-06 12:40:02 +00:00
Jonathan Gray
2777a4c692 intel/dev: update DG2 device names
Ref: https://ark.intel.com/content/www/us/en/ark/products/codename/226095/products-formerly-alchemist.html
Ref: DG2 PRM, Volume 4: Configurations, Steppings and Device IDs
Fixes: 99354efe31 ("intel/dev: Add DG2 G12 PCI IDs")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27944>
2024-03-06 11:23:02 +00:00
Rohan Garg
731ffa0737 anv, blorp: Set COMPUTE_WALKER Message SIMD field
Fixes: d95bbf35 ('anv: Set COMPUTE_WALKER Message SIMD field')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27983>
2024-03-06 10:58:27 +00:00
Lionel Landwerlin
0de856ecef anv: fix companion command buffer initialization
Currently the command buffer is completely empty, which is not good.
There are a few of things that should be programmed, but we've
probably been okay due to the default engine initialization.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: edcde0679c ("anv: Add helper to create companion RCS command buffer")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27979>
2024-03-06 10:23:34 +00:00
Lionel Landwerlin
67c9f94b05 anv: delay internal shader upload to when needed
People reported an increase in device initialization affecting some
Android tests [1].

So delay the internal shader upload (similar to what we do for blorp
shaders, and what RADV seems to be doing too) until actually needed.

[1] : https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25361#note_2305129

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27946>
2024-03-06 09:58:53 +00:00
Patrick Lerda
11ce5b1a9f r300: enable R400 cos and sin hardware vertex shader opcodes
The R400 has working hardware opcodes for cos and sin at
the vertex shader level. This change enables these features.

This change was tested on an ATI R430 (0x554d).

Here is the shader-db summary:
total instructions in shared programs: 103863 -> 103552 (-0.30%)
instructions in affected programs: 5610 -> 5299 (-5.54%)
helped: 38
HURT: 24
total temps in shared programs: 16836 -> 16830 (-0.04%)
temps in affected programs: 42 -> 36 (-14.29%)
helped: 6
HURT: 0
total cycles in shared programs: 162448 -> 162139 (-0.19%)
cycles in affected programs: 5760 -> 5451 (-5.36%)
helped: 38
HURT: 24

LOST:   0
GAINED: 3

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10504
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27970>
2024-03-06 09:38:27 +00:00
Eric Engestrom
158e5882e9 ci/lavapipe: fold DEQP_VER: vk and drop .deqp-test-vk
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27936>
2024-03-06 08:54:11 +00:00
Eric Engestrom
54254ae3f2 ci/venus-lavapipe: drop unused DEQP_VER that's being overwritten by DEQP_SUITE anyway
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27936>
2024-03-06 08:54:11 +00:00
Samuel Pitoiset
4a2a261a79 radv: stop passing radv_cmd_buffer to draw functions with task shaders
In order to remove the ambiguity because for task shaders the driver
needs to emit to both the GFX CS and the ACE CS but all states come
from the main cmdbuf (ie. GFX) from the application point of view.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27819>
2024-03-06 08:24:39 +00:00
Samuel Pitoiset
c2288ad43d radv: allocate a 32-bit value for the MEC fw bug with indirect mesh+task earlier
This workaround will be removed soon but in order to pass only
radv_cmd_state+cs+ace_cs to the functions that draw with mesh+task, the
32-bit value needs to be allocated earlier.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27819>
2024-03-06 08:24:39 +00:00
Samuel Pitoiset
d18c50856a radv: refactor emitting the view index for task shaders
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27819>
2024-03-06 08:24:39 +00:00
Samuel Pitoiset
1f8cfb2b2e radv: always use ace_cs for the gang CS variable
For consistency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27819>
2024-03-06 08:24:39 +00:00
qbojj
4b7f4724f8 vulkan: Fix calculation of flags in vk_graphics_pipeline_state_fill
Fixes: 2b62d90158 ("vk/graphics_state: Support VK_KHR_maintenance5")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10705
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27929>
2024-03-06 07:54:28 +00:00
Mark Janes
597c1c1c18 intel/dev: declare workarounds required by ATSM platforms
INTEL_PLATFORM_ATSM_G10 requires the same workarounds as INTEL_PLATFORM_DG2_G10
INTEL_PLATFORM_ATSM_G11 requires the same workarounds as INTEL_PLATFORM_DG2_G11

Closes: #10749
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27987>
2024-03-05 22:49:14 -08:00
Dave Airlie
ac391536eb nvk: only unmap heap bos that were mapped
Otherwise we munmap(0, size) and remove the cts binary maps

Also add an assert, though NULL is legal for munmap in theory,
nothing should be using it in practice on Linux.

Fixes: e6f137e9ed ("nvk: Only map heaps that explicitly request maps")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28006>
2024-03-06 15:20:25 +10:00
Faith Ekstrand
2feb3c6e30 nak: Support F2I for 8-bit integers on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
Faith Ekstrand
11de561395 nak/sm50: Use OpBfe instead of OpBRev for nir_op_find_lsb
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
Faith Ekstrand
3d13d190e6 nak/sm50: Fix encoding of immediates in OpFFma
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
Faith Ekstrand
21de61b1ac nak: Fix printing of OpIsberd
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
David Heidelberg
1316854e74 ci/intel: split asus-cx9400-volteer into acer-cp514-2h-11{30,60}g7-volteer
Cc: mesa-stable
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27877>
2024-03-06 01:52:49 +00:00
David Heidelberg
861c123ba0 ci/intel: move machine definition to the intel-tgl-skqp job
Cc: mesa-stable
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27877>
2024-03-06 01:52:49 +00:00
David Heidelberg
f9ba492647 ci/intel: add acer-cp514-2h-11{30,60}g7-volteer
Originally asus-cx9400-volteer, but now we can choose machine regarding
to available CPU within.

Cc: mesa-stable
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27877>
2024-03-06 01:52:49 +00:00
David Heidelberg
ed73137d35 ci/intel: decompose anv-tgl-test so we can specify custom devices for TGL
No functional changes.

Cc: mesa-stable
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27877>
2024-03-06 01:52:49 +00:00
Felix DeGrood
a2bd99f521 driconf: add SotTR DX12 to Intel XeSS workaround
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27610>
2024-03-06 01:12:54 +00:00
Jesse Natalie
9c4c1796d7 d3d12: Point sprite lowering pass needs to handle arrays
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27999>
2024-03-06 00:54:31 +00:00
Jesse Natalie
788c106ea1 wgl: Initialize DEVMODE struct
Otherwise the dmDriverExtra field might be uninitialized and have a nonzero
value, which can cause the API implementation to smash the stack when copying
to the output struct.

Cc: mesa-stable
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27998>
2024-03-06 00:33:58 +00:00
Faith Ekstrand
d1cf01dc52 vulkan/pipeline: Always init pipeline cache objects
vk_shader_init_cache_obj() is fast enough and the already-found case is
rare enough that there's no good reason to avoid the init.  This allows
us to use vk_shader_unref instead of vk_shader_destroy which is probably
a touch safer over-all.  It also fixes the assert that the two shaders
have matching keys.

Fixes: bb8b11d806 ("vulkan/pipeline: Handle fully compiled library shaders properly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10752
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27993>
2024-03-05 23:12:34 +00:00
Timur Kristóf
def0c275c4 aco: Eliminate SCC copies when possible.
Foz-DB Navi31:
Totals from 2517 (3.22% of 78112) affected shaders:
Instrs: 5992126 -> 5972611 (-0.33%); split: -0.33%, +0.00%
CodeSize: 30986404 -> 30914536 (-0.23%); split: -0.23%, +0.00%
Latency: 43221112 -> 43217422 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 6675983 -> 6674598 (-0.02%); split: -0.02%, +0.00%
SClause: 181987 -> 181976 (-0.01%); split: -0.01%, +0.00%
Copies: 538852 -> 519419 (-3.61%)

Co-authored-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27072>
2024-03-05 22:51:01 +00:00
Mike Blumenkrantz
9a53e3b1fd nvk: bump NVK_PUSH_MAX_SYNCS to 256
technically this needs to be MUCH higher since there's no limitation
on the number of semaphore waits that can be submitted, but this is
enough to handle zink usage

fixes KHR-GL46.sparse_buffer_tests.BufferStorageTest

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27992>
2024-03-05 22:34:58 +00:00
Jesse Natalie
ba17f5ca6a microsoft/compiler: Remove code after discard/terminate in later optimization steps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27996>
2024-03-05 21:40:09 +00:00
Chia-I Wu
3d4dfae7eb aco: fix nir_op_pack_32_4x8 handling
I started seeing

  ACO ERROR:
      In file ../src/amd/compiler/aco_validate.cpp:98
      Operand and Definition types do not match:  s1: %44 = p_parallelcopy %158
  test_basic: ../src/amd/compiler/aco_interface.cpp:85: void validate(aco::Program*):
      Assertion `is_valid' failed.

since commit 52ee4cf229 ("nir/builder: Teach nir_pack_bits and
nir_unpack_bits about 32_4x8").

Fixes: e0d232c2fc ("aco: implement nir_op_pack_32_4x8").  I
Suggested-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27972>
2024-03-05 20:38:34 +00:00
Georg Lehmann
482137402a aco/ssa_elimination: check if pseudo scratch reg overwrittes regs used for v_cmpx opt
Cc: mesa-stable

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/27855>
2024-03-05 20:16:21 +00:00
Georg Lehmann
e7d6cd9216 aco/post-ra: track pseudo scratch sgpr/scc clobber
Foz-DB Navi31:
Totals from 1439 (1.84% of 78112) affected shaders:
Instrs: 1994854 -> 1996650 (+0.09%)
CodeSize: 11376864 -> 11383384 (+0.06%)
Latency: 14996299 -> 14999317 (+0.02%); split: -0.00%, +0.02%
InvThroughput: 2061294 -> 2061518 (+0.01%); split: -0.00%, +0.01%

Cc: mesa-stable

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/27855>
2024-03-05 20:16:21 +00:00
Georg Lehmann
1eb067ee9f aco: store if pseudo instr needs scratch reg
Cc: mesa-stable
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/27855>
2024-03-05 20:16:21 +00:00
Georg Lehmann
bd93e8372d aco/post-ra: assume scc is going to be overwritten by phis at end of blocks
Cc: mesa-stable
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/27855>
2024-03-05 20:16:21 +00:00
Georg Lehmann
a5056b2f93 aco/post-ra: rename overwritten_subdword to allow additional uses
Cc: mesa-stable
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/27855>
2024-03-05 20:16:21 +00:00
Georg Lehmann
b0554ab0a1 aco: create pseudo instructions with correct struct
Cc: mesa-stable
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/27855>
2024-03-05 20:16:21 +00:00
Job Noorman
8d0f9c8fcd ir3: fix returning false instead of NULL
Fixes: 9de628b65c ("ir3: fold and/or and negations into branches")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27986>
2024-03-05 19:50:32 +00:00
Job Noorman
9cfc44532b ir3: fix freeing incorrect register in loops
While processing loop back edges, current live defs were freed through
their def pointer instead of correctly using get_def(). This may cause
the wrong register being freed when the current live def was reloaded.

Fixes: 21cd9b9557 ("ir3: implement RA for predicate registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27986>
2024-03-05 19:50:32 +00:00
Yonggang Luo
1e97fded47 vulkan/runtime: Mark vk_default_dynamic_graphics_state to be private
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27526>
2024-03-05 19:05:00 +00:00
Yonggang Luo
2f57834d27 freedreno/vulkan: Use vk_dynamic_graphics_state_init instead of direct assignment
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27526>
2024-03-05 19:05:00 +00:00
Yonggang Luo
db103c56ab treewide: Remove vulkan/runtime vulkan/util prefix in include path
This is for unify the include style of shared vulkan headers

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27526>
2024-03-05 19:05:00 +00:00
Mike Blumenkrantz
ea9d87bf75 zink: call CmdSetRasterizationStreamEXT when using shader objects
required by spec

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27990>
2024-03-05 18:41:44 +00:00
Mike Blumenkrantz
0736c212b5 zink: fix PIPE_CAP_MAX_SHADER_PATCH_VARYINGS
maxTessellationControlPerPatchOutputComponents is the per-patch limit,
maxTessellationControlPerVertexOutputComponents is the per-vertex limit

fixes #10750

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27990>
2024-03-05 18:41:44 +00:00
Friedrich Vock
4c05ebf3a5 radv: Set SCRATCH_EN for RT pipelines based on dynamic stack size
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27899>
2024-03-05 18:15:00 +00:00
Mike Blumenkrantz
ac4e60b9c9 lavapipe bump descriptor buffer address space limits
lavapipe is the only driver that advertises the spec minimum, which is
stupidly small

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27989>
2024-03-05 17:43:53 +00:00
Rob Clark
850267ef99 freedreno/a6xx: Add dual_color_blend_by_location
Needed by unigine heaven.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27969>
2024-03-05 16:53:29 +00:00
Rohan Garg
c82edb4e8f anv: drop duplicated 3DSTATE_SLICE_TABLE_STATE_POINTERS emission
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27985>
2024-03-05 15:49:41 +00:00
Georg Lehmann
1d8b2b159e nir/divergence_analysis: fix subgroup mask
These depend on the subgroup invocation id, so they are divergent.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

Fixes: df86c5ffb3 ("nir: add divergence analysis pass.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27962>
2024-03-05 14:52:17 +00:00
Georg Lehmann
230743da2e nir: remove rotate scope
All other subgroup operations do not have a scope in NIR, so for consistency
rotate shouldn't have one either.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27964>
2024-03-05 14:12:21 +00:00
Kenneth Graunke
edf14f4b7c intel/brw: Unindent code after previous change
I kept things indented in the previous patch to make the diffs easier to
read, but there's no reason to continue doing so.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27959>
2024-03-05 12:03:31 +00:00
Kenneth Graunke
4c10613625 intel/brw: Remove SIMD lowering to a larger SIMD size
On Gfx4, we had to emulate SIMD8 texturing with SIMD16 for some message
types.  This ceased to be a thing with Gfx5 and hasn't come up again.

So, we can simply assert that we are truly "SIMD splitting", and assume
that the lowered size is smaller than the original instruction size.
This avoids some mental complexity as we can always think of the split
instructions as taking apart, operating on, and recombining subsets of
the original values.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27959>
2024-03-05 12:03:31 +00:00
Kenneth Graunke
bb191e3af5 intel/brw: Call constant combining after copy propagation/algebraic
This copy propagation can create MADs with immediates in src1, which
need to be cleaned up by constant combining (which puts them back in
VGRFs).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27876>
2024-03-05 11:39:26 +00:00
Kenneth Graunke
e8ef184677 intel/brw: Make register coalescing obey the g112-g127 restriction
opt_register_coalesce can sometimes unpleasantly coalesce both
SENDS payload sources into the larger of the two registers.
This can break the assumption that the VGRFs for sources 2-3
must occupy no more than 16 registers, so they fit in g112-127.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27876>
2024-03-05 11:39:26 +00:00
Kenneth Graunke
1c1e79d75a intel/brw: Copy the smaller payload in fixup_sends_duplicate_payload
Sometimes one source can be a larger register than the other, especially
since opt_register_coalesce can sometimes coalesce those sources into
larger registers.

Copy the smaller of mlen and ex_mlen.  It's less copying.

shader-db and fossil-db on Alchemist show 47 shaders affected with
small 1-2 instruction improvements each, and no regressions.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27876>
2024-03-05 11:39:26 +00:00
Kenneth Graunke
91252c98a8 intel/brw: Add assertions that EOT messages live in g112+
The validator already catches this, but asserting here makes it easier
to catch the problem earlier in a debugger.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27876>
2024-03-05 11:39:26 +00:00
Kenneth Graunke
f6ac6c94a9 intel/brw: Handle SHADER_OPCODE_SEND without src[3] in copy prop
We construct some SENDs with only 3 sources (such as FB writes).
This code could read out of bounds.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27876>
2024-03-05 11:39:26 +00:00
Kenneth Graunke
49606ab067 intel/brw: Avoid copy propagating any fixed registers into EOTs
We were handling FIXED_GRF, but we probably also ought to handle ATTR
(pushed inputs) and UNIFORM (pushed constants).  Just check if file
isn't VGRF to handle everything.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27876>
2024-03-05 11:39:26 +00:00
Kenneth Graunke
97bf3d3b2d intel/brw: Replace CS_OPCODE_CS_TERMINATE with SHADER_OPCODE_SEND
There's no need for special handling here, it's just a send message
with a trivial g0 header and descriptor.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27924>
2024-03-05 11:16:20 +00:00
Patrick Lerda
f93f215898 radeonsi/gfx10: fix main_shader_part_ngg_es memory leak
Indeed, main_shader_part_ngg_es was not freed.

For instance, this issue is triggered on a radeonsi/gfx10 gpu with
"piglit/bin/arb_gpu_shader5-tf-wrong-stream-value -auto -fbo":
Direct leak of 1464 byte(s) in 1 object(s) allocated from:
    #0 0x7f17904b99a7 in calloc (/usr/lib64/libasan.so.6+0xb19a7)
    #1 0x7f1785d65ac2 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3132
    #2 0x7f1783af67d8 in util_queue_thread_func ../src/util/u_queue.c:309
    #3 0x7f1783b51dfa in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
    #4 0x7f178f69d38a  (/lib64/libc.so.6+0x8438a)

Indirect leak of 2024 byte(s) in 1 object(s) allocated from:
    #0 0x7f17904b97ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7f1785d5443a in read_chunk ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:221
    #2 0x7f1785d62cf5 in si_load_shader_binary ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:293
    #3 0x7f1785d65255 in si_shader_cache_load_shader ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:423
    #4 0x7f1785d65ef9 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3169
    #5 0x7f1783af67d8 in util_queue_thread_func ../src/util/u_queue.c:309
    #6 0x7f1783b51dfa in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
    #7 0x7f178f69d38a  (/lib64/libc.so.6+0x8438a)

Fixes: 8f72f137ad ("radeonsi/gfx10: add as_ngg variant for TES as ES to select Wave32/64")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27958>
2024-03-05 10:50:22 +00:00
Christian Gmeiner
516a2a3a0e isaspec: encode: Constify bitset_params
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27965>
2024-03-05 07:29:08 +00:00
Christian Gmeiner
381d19d138 isaspec: encode: Constify encode.type
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27965>
2024-03-05 07:29:08 +00:00
Lionel Landwerlin
dde2527afb anv: add support for VK_EXT_map_memory_placed
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27963>
2024-03-05 07:03:13 +00:00
Lionel Landwerlin
6ad2a03ffd anv: remove some wrapping around mmap
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27963>
2024-03-05 07:03:13 +00:00
Tapani Pälli
0df9571bfb crocus: make sure aux is disabled for memory objects
Cc: mesa-stable
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/27948>
2024-03-04 20:36:43 +02:00
Tapani Pälli
9d18cde8ed hasvk: make sure aux is disabled for memory objects
Cc: mesa-stable
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/27948>
2024-03-04 20:36:34 +02:00
Yiwei Zhang
aaa2d13181 venus: add VK_KHR_fragment_shading_rate
Notes:
- handle the property interop with VK_EXT_sample_locations
- handle the interop with pipeline creation

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27942>
2024-03-04 10:11:16 -08:00
Yiwei Zhang
9edf180796 venus: sync protocol for VK_KHR_fragment_shading_rate
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27942>
2024-03-04 10:11:16 -08:00
Eric Engestrom
78ea3bb43d ci/deqp: use the proper gl/gles releases for deqp-gl*, deqp-gles*, deqp-egl
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27473>
2024-03-04 16:53:58 +00:00
Eric Engestrom
8bb59f16ec ci/deqp-runner: inline never-used DEQP_VARIANT variable
It has never been used, and we're about to change some of them and not others,
so we need to distinguish them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27473>
2024-03-04 16:53:58 +00:00
Eric Engestrom
e9fb4d951b ci/deqp: split vk/gl/gles patches
All files are identical copies for now, but this allows changing one
without touching the others.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27473>
2024-03-04 16:53:58 +00:00
Eric Engestrom
74bcb91a91 ci/deqp: drop zlib url patch
It's no longer necessary, and removing it now simplifies the diff later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27473>
2024-03-04 16:53:57 +00:00
Lionel Landwerlin
f3b0330fbc anv: fix helper usage for CmdUpdateBuffer()
We created a new helper for things that don't need to be indexed from
the dynamic state pool. This allocation got missed.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 82d772fa9b ("anv: create new helper for small allocations")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27966>
2024-03-04 16:24:24 +00:00
Oskar Viljasaar
f9acfeeb59 compiler/types: Fix glsl_dvec*_type() helpers
Commit 90e364edb0 contained a typo in the glsl_dvec4_type() helper,
instead returning a glsl_ivec4_type. As an ivec4 is 2x smaller than
a dvec4, this also broke piglit sanity on crocus/hsw.

This also fixes the dvec2 helper, though it has not been specifically
tested anywhere.

Fixes: 90e364edb0 ("compiler/types: Add a few more helpers to get builtin types")

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27917>
2024-03-04 15:22:32 +00:00
Sathishkumar S
0fe5ad708d radeonsi/vcn: avoid hard-coding the number of jpeg instance
use the number of jpeg instances from query to create as many submission ctx

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27884>
2024-03-04 13:41:56 +00:00
Sathishkumar S
f3ab454f07 ac/gpu_info: query the number of ip instance
query the number of ip instances for VCN and JPEG

v2: use num_queues and remove new variable (Marek)
v3: remove whitespace (Leo)
v4: remove redundant print jpeg_decode (Marek)

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27884>
2024-03-04 13:41:56 +00:00
Patrick Lerda
29df85788a r300: fix constants_remap_table memory leak
For instance, this issue is triggered with
"piglit/bin/object-namespace-pollution glBitmap program -auto -fbo":
Direct leak of 112 byte(s) in 7 object(s) allocated from:
    #0 0x7f472540e7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7f471a9ce18f in rc_remove_unused_constants ../src/gallium/drivers/r300/compiler/radeon_remove_constants.c:101
    #2 0x7f471a9b0836 in rc_run_compiler_passes ../src/gallium/drivers/r300/compiler/radeon_compiler.c:476
    #3 0x7f471a9b0ad5 in rc_run_compiler ../src/gallium/drivers/r300/compiler/radeon_compiler.c:498
    #4 0x7f471a9ec862 in r3xx_compile_fragment_program ../src/gallium/drivers/r300/compiler/r3xx_fragprog.c:172
    #5 0x7f471a9e1ab2 in r300_translate_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:516
    #6 0x7f471a9e6303 in r300_pick_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:591
    #7 0x7f471a9544fe in r300_create_fs_state ../src/gallium/drivers/r300/r300_state.c:1073
    #8 0x7f4718f2ebe5 in st_create_fp_variant ../src/mesa/state_tracker/st_program.c:1070
    #9 0x7f4718f374b5 in st_get_fp_variant ../src/mesa/state_tracker/st_program.c:1116
    #10 0x7f4718f38273 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1281
    #11 0x7f4718f38273 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1345
    #12 0x7f4718f389e9 in st_program_string_notify ../src/mesa/state_tracker/st_program.c:1378
    #13 0x7f47199d9f99 in set_program_string ../src/mesa/main/arbprogram.c:413

Fixes: 1c2c4ddbd1 ("r300g: copy the compiler from r300c")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27957>
2024-03-04 13:00:00 +00:00
Eric Engestrom
dfc9656425 softpipe: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27951>
2024-03-04 12:01:04 +00:00
David Heidelberg
31ef5b203f ci: re-enable Collabora farm after maintenance
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27949>
2024-03-04 11:40:35 +01:00
Eric Engestrom
1e8642ebbe zink+radv: update navi31 expectations (one test fixed)
Fixed by some commit between 0c95d39309 and 3d38c9597f.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27947>
2024-03-04 09:26:58 +00:00
Corentin Noël
b6962bbfc8 zink: Return early if the file descriptor could not have been duplicated/acquired
Do not continue and call drmIoctl on an invalid file descriptor.

Fix defect reported by Coverity Scan.

Argument cannot be negative

The negative argument will be interpreted as a very large unsigned value.

CID: 1544377
Cc: mesa-stable
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27788>
2024-03-04 09:10:29 +00:00
Corentin Noël
da2f393dda venus: enable VK_EXT_attachment_feedback_loop_layout
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27886>
2024-03-04 08:52:07 +00:00
Corentin Noël
6746c3483b venus: sync protocol for VK_EXT_attachment_feedback_loop_layout
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27886>
2024-03-04 08:52:07 +00:00
Corentin Noël
bc11e6ee8d glsl: Ensure that we are dealing with ir_variable and ir_rvalue
Use the built-in function from ir_instruction to make sure that we are actually
not casting to anther type by mistake.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27114>
2024-03-04 08:03:55 +00:00
Erik Faye-Lund
d795bd380a glsl: Make error_value a real ir_rvalue type
It exposes a type so let it be a real ir_rvalue instead of abusing ir_type_unset.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27114>
2024-03-04 08:03:55 +00:00
Samuel Pitoiset
a38e7f127a radv: preserve streamout_buffers user SGPR for VS/TES + GS compiled separately
Otherwise, VS or TES could overwrite it but it needs to be preserved
if GS reads it.

This fixes the remaining NGG streamout bug on RDNA3 with VKCTS and ESO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27914>
2024-03-04 07:38:06 +00:00
Timothy Arceri
eefd836ebc glsl: make use of nir recursion detection
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27841>
2024-03-04 05:40:55 +00:00
Timothy Arceri
38eb850883 glsl: move function inlining out of glsl_to_nir()
This will allow us to do more of the function linking work in nir
in the future.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27841>
2024-03-04 05:40:55 +00:00
Timothy Arceri
f7a664754f glsl: add nir version of function recursion detection
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27841>
2024-03-04 05:40:55 +00:00
Timothy Arceri
eecd7504a8 glsl: add missing define to linker_util.h
Avoids compiler warning in files that use linker_util.h but not
the set util.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27841>
2024-03-04 05:40:55 +00:00
Timothy Arceri
edf242f825 nir: add some nir_parameter fields
These will be used in future to do more validation on functions as
the glsl nir linker is expanded. The first use is in the following
patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27841>
2024-03-04 05:40:55 +00:00
Saleemkhan Jamadar
4ed4058910 radeonsi/vcn: set jpeg reg version for gfx 1151
select appropriate jpeg reg version for gfx 1151

Co-authored-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Acked-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/27811>
2024-03-04 04:43:53 +00:00
Yifan Zhang
4ed8931164 radv: initialize video decoder for GFX11.5.1
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Acked-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/27811>
2024-03-04 04:43:53 +00:00
Yifan Zhang
8446604dd4 amd: Add code to enable gfx11.5.1
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Acked-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/27811>
2024-03-04 04:43:53 +00:00
Vignesh Raman
e4d8b4592f ci: disable Collabora's farm due to maintenance
Planned downtime in the farm as follows:
* Start: 2024-03-04 08:00 UTC
* End: 2024-03-04 14:00 UTC

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27915>
2024-03-04 03:16:11 +00:00
Timothy Arceri
39052dabf9 glsl: don't inline functions in glsl ir
Everthing is now in place for nir and glsl to nir to handle this
stuff for us.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27108>
2024-03-04 11:31:21 +11:00
Timothy Arceri
c6c150b4cd glsl_to_nir: support conversion of opaque function params
Here we can assume anything that is not an input is bindless.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27108>
2024-03-04 11:31:21 +11:00
Timothy Arceri
de7574f70a glsl_to_nir: support conversion of struct/array function returns
This adds support for array and struct function returns in the glsl
to nir pass allowing us to avoid extra calls to the glsl IR
optimisation loop.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27108>
2024-03-04 11:31:20 +11:00
Timothy Arceri
fac9b1c594 glsl_to_nir: support conversion of struct/array function params
This adds support for array and struct function params in the glsl
to nir pass allowing us to avoid extra calls to the glsl IR
optimisation loop.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27108>
2024-03-04 11:31:20 +11:00
Timothy Arceri
7afce96b80 glsl_to_nir: merge function param handling
Here we remove the special handling for input params that was hard
to work with and unite it with the output and inout params.

Here a mediump test needs to be updated to what is a more expected
outcome anyway.

We also need to update the code that inserts software f64 to the
new way input params are handled.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27108>
2024-03-04 11:31:20 +11:00
Eric Engestrom
5a852bd24c radeonsi/ci: add vangogh piglit flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27941>
2024-03-03 20:34:59 +00:00
Eric Engestrom
176f9b2fbe r300/ci: add flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27940>
2024-03-03 19:45:25 +00:00
Eric Engestrom
7ba43413b9 zink+anv: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27937>
2024-03-02 20:57:11 +00:00
Eric Engestrom
59cccade3a freedreno/ci: add another a618 flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27935>
2024-03-02 15:48:15 +00:00
Eric Engestrom
f703aac4ee rpi3/ci: update expectations for vc4-rpi3-gl-piglit-full:arm32 2/4
This job very often hangs (hence why it's split into 4), but it managed
to finish once and failed because this test is now skipped instead of
failing:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/55772960

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27934>
2024-03-02 15:24:22 +00:00
Eric Engestrom
7016538cf0 panfrost/ci: skip dEQP-GLES31.functional.copy_image.non_compressed.* on t760 as they hang
e.g. https://gitlab.freedesktop.org/mesa/mesa/-/jobs/55771063

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27933>
2024-03-02 13:33:08 +00:00
Eric Engestrom
e5bbf4975f iris/ci: add pbuffer flakes for amly, same as apl and glk
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27932>
2024-03-02 13:08:24 +00:00
Eric Engestrom
3328e9cf0f r300/ci: add another tex-miplevel-selection flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27930>
2024-03-02 12:44:07 +00:00
Eric Engestrom
4be5cb2ccb r300/ci: group tex-miplevel-selection flakes together
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27930>
2024-03-02 12:43:50 +00:00
Kenneth Graunke
63d2aa4eb6 intel/brw: Mark FIND[_LAST]_LIVE_CHANNEL as not writing the flag
brw_lower_find_live_channel doesn't actually write a flag register,
but elk_find_live_channel notes that the flag was used on Gfx7.

This allows more CSE on FIND[_LAST]_LIVE_CHANNEL.

shader-db and fossil-db on Alchemist show minor reductions in cycles
and instruction count, a few minor increases, but it doesn't seem to
be a large effect in either direction.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27862>
2024-03-01 17:18:30 -08:00
Anton Bambura
2ece531e33 docs/panfrost: Document Mali-T600 support
Signed-off-by: Anton Bambura <jenneron@postmarketos.org>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27519>
2024-03-01 23:26:57 +00:00
Anton Bambura
0129b3ff79 panfrost: Enable Mali-T600
It works since !27515

Signed-off-by: Anton Bambura <jenneron@postmarketos.org>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27519>
2024-03-01 23:26:57 +00:00
Caio Oliveira
337641cfcc intel/compiler: Fix SIMD lowering when instruction needs a larger SIMD
When lower_simd_width() encounters an instruction that needs a larger
SIMD, for example SHADER_OPCODE_TXS_LOGICAL in Gfx4 needs at least
SIMD16.  In this case the builder needs to be at least as large as
max_width, otherwise the group() setup will assert.

Turns out this did not assert before "by accident", since it was
relying on the default fs_visitor builder that had a dispatch width of 64,
a bogus placeholder value, expected not to be used.

However, when we changed the code to remove that builder (and the bogus
value), we created a new builder in the pass shader dispatch_width --
which work fine except in the case where we want to "lower" the SIMD above
the shader dispatch width.  The fix is to also consider the already
calculated max_width when creating the builder.

Fixes: 5b8ec015f2 ("intel/compiler: Don't use fs_visitor::bld in remaining places")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10338
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27782>
2024-03-01 22:54:57 +00:00
Kenneth Graunke
ad37622a8f intel/brw: Delete legacy texture opcodes
We first generate the logical opcodes, and these days fully lower to
SHADER_OPCODE_SEND.  In the past, we lowered to a non-logical variant
and handled that in the generator.  These days, we were just using the
non-logical opcodes as an awkward intermediate opcode change during
the lowering...which isn't really necessary at all.

This patch eliminates them by using the original logical opcodes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27908>
2024-03-01 22:19:51 +00:00
Kenneth Graunke
19248f48eb intel/brw: Allow CSE on TXF_CMS_W_GFX12_LOGICAL
This was missed when adding the new XeHP variant of the opcode.

Fixes: 261dd6c8 ("intel/compiler: Add new variant for TXF_CMS_W")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27908>
2024-03-01 22:19:51 +00:00
Kenneth Graunke
45a5e4c0c4 intel/brw: Delete SHADER_OPCODE_TXF_UMS
Nothing seems to generate this anymore.  I guess we always use CMS.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27908>
2024-03-01 22:19:51 +00:00
Kenneth Graunke
601ef12467 intel/brw: Delete SHADER_OPCODE_TXF_CMS[_LOGICAL]
We always use the wide variant (_W) on hardware this compiler supports.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27908>
2024-03-01 22:19:50 +00:00
Kenneth Graunke
494eee1337 intel/brw: Change unit tests to use TEX_LOGICAL instead of TEX
We're not really doing any fancy texturing here, just emitting a TEX
instruction that writes multiple destination registers.  I plan to
remove the non-logical TEX instruction in the next commit, so we swap
these over to use the logical version instead.  It should work just as
well for the purposes of the test.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27908>
2024-03-01 22:19:50 +00:00
Roland Scheidegger
e03e593143 auxiliary/rtasm: fix unaligned stores
Unaliged stores are unspecified behavior according to C rules, hence
address sanitizers may complain. Even though this worked fine in
practice (it's almost impossible here for the compiler to do something
"wrong" even if it assumes the store is aligned, given such stores work
just fine on x86), we should follow the rules.
The widely accepted solution for this (it may be somewhat surprising
you can't actually do unaligned assignments explicitly somehow in C)
nowadays is to just use memcpy(). The compiler should figure out (at
least with optimizations enabled) it's just a trivial store and
optimize it back to a single cpu instruction, while still satisfying
asan. (I've verified that even in debug builds the memcpy() is actually
optimized away anyway, I suspect there's some compiler flags somewhere
forcing this behavior.)

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

Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27896>
2024-03-01 21:44:52 +00:00
Friedrich Vock
e7d78a7b87 vulkan/runtime: Allow more than 8 DRM devices
Some people seem to have systems with more than 8 GPUs installed at
once. 256 is the maximum number of devices returned by libdrm, so using
this seems like a good choice for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27901>
2024-03-01 21:18:44 +00:00
Jesse Natalie
4ccbaa2cd8 microsoft/compiler: Remove deref load/store/atomic ops that statically go out of array bounds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27919>
2024-03-01 20:49:17 +00:00
Jesse Natalie
941d83ded4 spirv2dxil: Set push constant register space to nonzero
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27919>
2024-03-01 20:49:17 +00:00
Luca Bacci
fe520ecfbf meson,windows: Use relative paths in Vulkan ICD manifest files
See https://github.com/msys2/MINGW-packages/issues/16065

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27468>
2024-03-01 20:09:59 +00:00
Nanley Chery
a1e3c93ff7 isl: Pick a better initial state for zeroed MCS
Pick the compressed-no-clear aux state instead of aux-invalid state to
reduce ambiguates in iris. Hopefully this will help debug the issues
seen around MCS-enabling on ACM.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27881>
2024-03-01 19:40:03 +00:00
Sagar Ghuge
5775bc0c53 anv/xe: Consider pat_index while unbinding the bo
Xe KMD also checks if cpu_caching caching set during bo creationg
matches with caching of the PAT index set in the VM unbind.

This was being unnoticed until now by luck and lack of testing in MTL.

So here always setting PAT index for all VM operations that has a bo
associated.

v2: (Jose)
- Move pat_index little bit up
- Copy commit message from iris patch

Fixes: 19439624d9 ("anv: Use DRM_XE_VM_BIND_OP_UNMAP_ALL to unbind whole bos")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27893>
2024-03-01 19:08:19 +00:00
José Roberto de Souza
963c08b623 iris/xe: Consider pat_index while unbinding the bo
Xe KMD also checks if cpu_caching caching set during bo creationg
matches with caching of the PAT index set in the VM unbind.

This was being unnoticed until now by luck and lack of testing in MTL.

So here always setting PAT index for all VM operations that has a bo
associated.

Fixes: eb18a92ef9 ("iris: Fill PAT fields in Xe KMD gem_create and vm_bind uAPIs")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27893>
2024-03-01 19:08:19 +00:00
Konstantin Seurer
6380118d13 radv/meta: Add shader - device mapping for radv_build_printf
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27817>
2024-03-01 18:46:41 +00:00
Konstantin Seurer
d9a1882daa radv/rra: Avoid reading past the ray history buffer
The loop exit condition did not take the token size into account.

Fixes: 767f628 ("radv/rra: Dump basic ray history tokens")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27815>
2024-03-01 18:20:13 +00:00
Caio Oliveira
082735750b intel/brw: Simplify usage of reg immediate helpers
Use fs_reg and don't take the type as argument.  In all uses the type
passed is the type of the register.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27904>
2024-03-01 17:52:09 +00:00
Caio Oliveira
fb1d871714 intel/brw: Fold backend_reg into fs_reg
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27904>
2024-03-01 17:52:09 +00:00
Sil Vilerino
67c461dbe0 d3d12: Do not use PIPE_BIND_DISPLAY_TARGET for d3d12_video_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27918>
2024-03-01 17:29:12 +00:00
Samuel Pitoiset
570ebe1b37 radv: enable radv_zero_vram for RAGE2
Another native Vulkan game which doesn't properly initialize memory.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10701
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27845>
2024-03-01 16:49:16 +00:00
Rohan Garg
73d98848fa intel/compiler: Xe2+ can do URB load/store with a byte offset
Thanks to Ken for suggesting this URB refactoring change and pointing
out that the LSC can operate on the byte offset granularity.

This should fix the geometry shader test cases where we have more than
32 vertices since previously we were failing to write the correct
control data bits because of incorrect write mask.

Shader-db results for Xe2:

total instructions in shared programs: 153475 -> 153437 (-0.02%)
instructions in affected programs: 1374 -> 1336 (-2.77%)
helped: 11
HURT: 0
helped stats (abs) min: 3 max: 5 x̄: 3.45 x̃: 3
helped stats (rel) min: 1.67% max: 4.92% x̄: 3.23% x̃: 2.70%
95% mean confidence interval for instructions value: -3.92 -2.99
95% mean confidence interval for instructions %-change: -4.10% -2.36%
Instructions are helped.

total loops in shared programs: 140 -> 140 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total cycles in shared programs: 16002649 -> 16002329 (<.01%)
cycles in affected programs: 9174 -> 8854 (-3.49%)
helped: 11
HURT: 0
helped stats (abs) min: 22 max: 38 x̄: 29.09 x̃: 32
helped stats (rel) min: 2.62% max: 5.54% x̄: 3.78% x̃: 3.85%
95% mean confidence interval for cycles value: -33.56 -24.62
95% mean confidence interval for cycles %-change: -4.48% -3.08%
Cycles are helped.

total spills in shared programs: 52 -> 52 (0.00%)
spills in affected programs: 0 -> 0
helped: 0
HURT: 0

total fills in shared programs: 94 -> 94 (0.00%)
fills in affected programs: 0 -> 0
helped: 0
HURT: 0

total sends in shared programs: 4240 -> 4240 (0.00%)
sends in affected programs: 0 -> 0
helped: 0
HURT: 0

LOST:   0
GAINED: 0

Rework: (Sagar)
- Adjust offset/indirect offset calculation.
- Add shader-db results
- Always calculate dword index
- Drop changes for indirect writes

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27602>
2024-03-01 16:11:30 +00:00
Eric Engestrom
2ef7b4dfc1 ci/deqp: control the GLES release independently of GL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:11 +00:00
Eric Engestrom
3c9cba1085 ci/deqp: control the GL release independently of VK
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:11 +00:00
Eric Engestrom
c59f0ca97e ci/deqp: make deql-egl for android less of a special case
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:11 +00:00
Eric Engestrom
3fb95a9457 ci/deqp: build deqp-egl using mold as well
Just like the build for the rest of the components.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:10 +00:00
Eric Engestrom
07b8b410a8 ci/deqp: only apply the android patches to the android build
They are unnecessary otherwise, so let's skip them

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:10 +00:00
Eric Engestrom
d63e7b4403 ci/image-tags: move KERNEL_ROOTFS_TAG to group the test images together
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27465>
2024-03-01 15:33:10 +00:00
Bas Nieuwenhuizen
3b15a9c52c radv: Expose VK_EXT_map_memory_placed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
7e029735e6 radv: Implement reserving the VA range on unmap.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
a6a31538c5 radv: Support for mapping a buffer at a fixed address.
Doing the separate bool to support mapping at 0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
d779cda0ae radv/amdgpu: Use mmap directly.
To give more control.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
cccbe1527c radv/winsys: Use radv_buffer_map wrapper.
So we can have 1 function ptr and then have a version with default
args.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00
Bas Nieuwenhuizen
f7e8fdf35d radv: Add winsys argument to buffer map/unmap.
To use later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27689>
2024-03-01 15:07:09 +00:00
Samuel Pitoiset
4e95d1cc12 radv: allow RADV_PERFTEST=shader_object on GFX11
It should be working now on RDNA3.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27724>
2024-03-01 14:45:05 +00:00
Samuel Pitoiset
426d8b5216 radv: add support for emitting NGG shaders with ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27724>
2024-03-01 14:45:05 +00:00
Samuel Pitoiset
85d682b318 radv: lower lds_ngg_{gs_out_vertex_base,_scratch_base} with ESO
These values will be computed at draw time when both shaders are known
in case it's VS+GS or TES+GS as NGG.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27724>
2024-03-01 14:45:05 +00:00
Samuel Pitoiset
2a9b466299 radv: add a new user SGPR for NGG shaders compiled separately with ESO
The esgs ring size and the scratch lds base can't be known at compile
time when NGG shaders are merged separately.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27724>
2024-03-01 14:45:05 +00:00
Samuel Pitoiset
4d87a05d34 radv: add a helper to emit PKT3_COND_EXEC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27746>
2024-03-01 14:19:48 +00:00
Samuel Pitoiset
f21cc55dae radv: add missing conditional rendering for indirect dispatches on GFX6
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27746>
2024-03-01 14:19:48 +00:00
Samuel Pitoiset
cdf7e35618 radv: fix conditional rendering on compute queue on GFX6
PKT3_SET_PREDICATION is GFX only, even on GFX6.

This fixes recent
dEQP-VK.conditional_rendering.dispatch.*_compute_queue.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27746>
2024-03-01 14:19:48 +00:00
Job Noorman
0b953bdbb8 freedreno/ci: Update pixmark-piano-v2 hash
Minor irrelevant change.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:11 +00:00
Job Noorman
9de628b65c ir3: fold and/or and negations into branches
Fold and/or into braa/brao when profitable. Only do this when the and/or
is not used for any non-branch instructions as this would increase total
instruction count.

Add an algebraic nir pass that performs the inverse DeMorgan's laws to
try to bring and/or in front of branches. Again, only do this when the
original inot in only used for branches. This should always decrease
instruction count since the extra inots can be folded into the branch.

Fold inot into branches by using the inv1/inv2 cat0 fields.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:11 +00:00
Job Noorman
96c2fe3e1a nir: add search helper is_only_used_by_if
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:11 +00:00
Job Noorman
ddd5f6abae ir3: fold negations into cmps.ne zero
It was already implemented for sel so pull that functionality into a
helper function which can be used from ir3_get_predicate.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:11 +00:00
Job Noorman
c43d0e4e4f ir3: insert predicate conversions after their source
Instead of creating a cmps.s.ne for every use of a predicate, create
just one and insert it after the instruction whose def is tested. This
reduces the number of compares or, when they are folded into bitwise
operations, those operations.

It also decreases register pressure on GPRs by increasing pressure on
predicate registers. This should be preferred in general since at worst,
the predicate register will be spilled to a GPR again.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:11 +00:00
Job Noorman
c6a6902e4d ir3: optimize bitwise ops that can directly write predicates
On a6xx+, bitwise operations can directly write to predicate registers.
The result will be 1 iff the result of the non-predicate operation would
be non-zero.

When generating instructions that need a predicate source, ir3 will
insert a cmps.s.ne 0 instruction to guarantee a predicate can be
produced. This is kept in place by this patch and we add a pass that
tries to optimize useless comparisons away.

Concretely:
- Look through chains of multiple cmps.s.ne instructions and remove all
  but the first.
- If the source of the cmps.s.ne can write directly to predicates,
  remove the cmps.s.ne.

In both cases, no instructions are actually removed but clones are made
and we rely on DCE to remove anything that became unused. Note that it's
fine to always make a clone since even in the case that the original
instruction is also used for non-predicate sources (so it won't be
DCE'd), we replaced a cmps.ne.s with another instruction so this pass
should never increase instruction count.

Note that this pass replaces the double-comparison folding that was
performed by ir3_cp before.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:11 +00:00
Job Noorman
9905b6f2f4 ir3: integrate predicates into RA validation
In principle, validating the result of predicate RA works exactly the
same as for normal RA. There is one slight issue: spilling is
implemented by cloning the instruction that produced the original def
which might cause different defs to legitimately reach the same source.
For example:

bool b = ...;
if (...) {
    // b gets spilled and reloaded
} else {
    // b is not spilled
}
use b;

The use of b might see different reaching defs. To solve this, RA will
store a pointer to the original def in the instruction's data field.
Validation then uses the original def.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:11 +00:00
Job Noorman
96dc227988 ir3: validate no registers are invalid after RA
This would already be caught by another check but would produce a
message that was difficult to interpret. Better to check for it
explicitly.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:11 +00:00
Job Noorman
21cd9b9557 ir3: implement RA for predicate registers
Up to now, ir3 only supported one predicate register (p0.x). However,
since a6xx, four predicate registers are available. This patch adds a
register allocator for predicate registers that allows all of them to be
used. The RA also works for older generations with only one register.

The use of p0.x was hard-coded in many places in ir3. This has been
replaced by a new flag, IR3_REG_PREDICATE, to indicate that an SSA value
should be allocated to a predicate register.

The RA uses the standard liveness analysis available in ir3. Using this,
registers are allocated in a single pass over all blocks. For each block
we keep track of currently live defs in the registers. Predicate
destinations allocate a new register and sources take the register from
their def.

The live defs of a block are initialized with the intersection of the
live-out defs of their predecessors: if all predecessors have the same
live-out def in the same register, it is used as live-in. However, we
only do this for defs that are actually live-in according to the
liveness analysis.

This doesn't work for loops: since predecessors from back edges are
processed after their successors, we don't know their live-out state
yet. We solve this by ignoring such predecessors while calculating the
live-in state. When this predecessor is later processed, we fix-up its
live-out state to match what its successor expects by reloading defs if
necessary.

Spilling is implemented by reloading, or rematerializing, the
instruction that produced the def. Whenever we need a new register while
none are available, we simply free one. If the freed def is later needed
again, we clone the original instruction in front on the new use. We
keep track of the original def the reload is cloned from so that
subsequent uses can reuse the reload.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:11 +00:00
Job Noorman
49f5a73312 ir3: allow finding SSA uses for a subset of uses
Predicate RA only needs uses of predicate registers so we don't need to
calculate the uses of all instructions.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:10 +00:00
Job Noorman
f55a44d88b ir3: allow liveness calculation for different register types
This allows us to only calculate the liveness for predicate registers
during predicate RA.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:10 +00:00
Job Noorman
49b2fbe2f0 ir3: remove comp1/2 from cat0
Just take the component values from the source registers.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:10 +00:00
Job Noorman
a720eef12d ir3: remove OPC_B and brtype from cat0
We currently have a bit of a confusing situation where we have both
opcodes for the different branches (OPC_BR, OPC_BRAA,...) and branch
types which are supposed to be used with OPC_B (BRANCH_PLAIN,
BRANCH_AND,...). However, not every kind of branch has a corresponding
type. For example, getone is represented by OPC_GETONE instead of a
branch type.

This patch proposes to get rid of the branch types and use opcodes
everywhere. I think this makes the representation of branches more
consistent. It also removes the for the encoder to translate branch
types into opcodes.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:10 +00:00
Job Noorman
7a66523124 ir3: print branch sources
Now that branches are always inserted at the end of blocks, it's
convenient to see their sources when printed.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:10 +00:00
Job Noorman
846c813355 ir3: fix instruction count before kill_sched
It uses the start- and end IPs of blocks but never counts instructions.
It probably just accidentally works most of the time.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:10 +00:00
Job Noorman
eefb1d9d3f ir3: add terminators to blocks
Instead of using brtype and condition fields in blocks, explicitly add
terminator branches in their instruction lists. This makes it more
uniform to deal with branches in passes. This will be especially useful
for passes that need to deal with predicate registers like the new
register allocator.

Note that only a single terminator is added to blocks: either an
unconditional jump in case of a single successor, or a conditional
branch in case of two successors. In the latter case, the unconditional
jump to the second successor is implicit. This makes it slightly easier
to handle terminators since there is always exactly one.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:10 +00:00
Job Noorman
1aa1036525 ir3: validate instruction block pointer
When moving instructions between blocks, it's easy to forget to update
the block pointer resulting in obscure errors later. Let's add a
validation check to improve error reporting.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:10 +00:00
Job Noorman
4d0445d914 ir3: fix alignment of spill slots
Alignment was set in units of half registers instead of bytes causing
spill slots to sometimes be under-aligned.

Fixes: 613eaac ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:10 +00:00
Job Noorman
cef867edc5 ir3: update a0/a1 users when cloning instructions
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:10 +00:00
Job Noorman
a38f7ea125 ir3: add disassembly for flat.b
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
2024-03-01 13:45:10 +00:00
Eric Engestrom
54cb45cc6c ci: uprev mold to the latest release
The mold version we've been using is very old by now, and we've
now encountered some mold bugs, so let's uprev it to see it things
work better now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27905>
2024-03-01 13:02:58 +00:00
Eric Engestrom
140480974e ci: document which image tags to bump when touching build-mold.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27905>
2024-03-01 13:02:58 +00:00
Erik Faye-Lund
3711964f33 panvk: do not handle illegal null
The Vulkan spec says that VkBindBufferMemoryInfo::memory must be a valid
VkDeviceMemory handle, see

https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkBindBufferMemoryInfo-memory-parameter

So let's assert instead here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27910>
2024-03-01 12:34:27 +00:00
Lionel Landwerlin
5a7e58a430 anv: fix non matching image/view format attachment resolve
Let's say you have an image in R32_UINT format, a view is created in
R32_SFLOAT and used as color attachment.

When resolving the attachment, our current code uses the image format
(R32_UINT in this case). But resolve mode might apply only to SFLOAT,
so we currently run into an assert in blorp.

We should instead use the view format. There is an exception for
depth/stencil view because the format we want to resolve is actually
the depth/stencil format, not just the depth or stencil aspect.

This fixes vkd3d-proton's test_multisample_resolve_formats.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27875>
2024-03-01 12:10:28 +00:00
Eric Engestrom
2106092e63 ci/android: use a specific version of android-cuttlefish
Using whatever version is the latest at the time of the image build is
bad practice from a stability & reproducibility point of view, and the
latest version is currently broken, preventing any change that rebuilds
the android image from being merged.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27911>
2024-03-01 11:16:41 +00:00
Boris Brezillon
fab675956a panfrost: Update the release note to mention G310/G610 addition
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
d778df1a60 panfrost: Advertize G310 support
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
d17d076cc6 panfrost: Advertize G610 support
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Bob Beckett
f54c8413e6 panfrost: Add the gallium glue to get panfrost loaded when panthor is detected
Needed if we don't want to force users to pass GALLIUM_DRIVER=panfrost.

Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Bob Beckett
a29443dc6b panfrost: Add an entry for panthor in the renderonly_drivers[] array
Same as panfrost, but the kernel driver has a different name.

Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
4943002a2c panfrost: Enable v10 in the gallium driver
Now that everything is in place to support v10, add it to the
panfrost_versions array in meson.build and patch panfrost_create_screen()
to hook up pipe_screen initialization.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Alyssa Rosenzweig
447075eeee panfrost: Add support for the CSF job frontend
CSF-specific implementation of the job-frontend helpers.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
e6a97a2b4a panfrost: Add a cleanup_batch() method to panfrost_vtable
We have to do some cleanup on v10+. Let's add a new hook to allow
per-arch batch cleanup procedures.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
5b53db5f60 panfrost: Add a panfrost_context_reinit() helper
Will be needed for v10, so we can re-instantiate a context when an
unrecoverable error is reported on a group or VM.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
5e3771ab5a panfrost: Add arch-specific context init/cleanup hooks
This will allow us to defer some CSF-specific initialization to
pan_csf.c, keeping pan_context.c job-frontend agnostic.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
1b93524605 panfrost: Relax position result alignment constraint on v10+
Looks like the alignment constraint is gone on v10...

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Alyssa Rosenzweig
3b82448f47 panfrost: Add a library to build CSF command streams
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
8e303b9350 pan/genxml: Make sure pan_pack() evaluates 'dst' only once
Will be useful for the cs_builder, where we have

and we don't want cs_alloc_ins() to be called more than once.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
2d44800079 panfrost: Don't allocate a tiler heap buffer on v10+
Heap management is completely different on CSF hardware, and the heap
buffer remain unused in that case. Make the tiler heap BO creation
conditional to reflect that.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
ce24f78603 pan/decode: Introduce the concept of usermode queue
This way we allow JUMPs to be decoded when the decode function is
passed an indirect CS buffer that's called from a kernelmode queue.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
2e9450f49f pan/genxml: Various CS related improvements in v10.xml
Various improvements to the CS related definitions:

- make the field name consistent across all instructions using the same
  pattern
- define missing fields,
- replace the CEU prefix by a CS prefix
- define enums where it makes sense
- re-order instruction definitions by IDs
- add missing instructions

While at it, extend decode_csf.c to support all known instructions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
729f6b28a6 panfrost: Add v10 support to libpanfrost
The code has already been patched to support v10, we just need to add
v10 to the version array when compiling per-arch files.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
97f6a62f7e pan/kmod: Add a backend for panthor
Panthor is a new kernel driver handling CSF-based GPUs. It's designed
around the new VM model where:

- VM management is all explicit (you get to choose where objects are
  mapped in the GPU VA space)
- synchronization is explicit too (there's not BO_WAIT, and we don't
  pass BOs around to serve as implicit deps)

We add a few panthor specific helpers (those exposed in panthor_kmod.h)
too:

- panthor_kmod_xxx_sync_point() are needed to make pan_kmod_bo_wait()
  work with the new synchronization/VM model
- panthor_kmod_get_flush_id() is exposing the LATEST_FLUSH_ID register
- panthor_kmod_vm_handle() is providing a way to query the VM handle
  attached to the pan_kmod_vm object (needed for a few panthor ioctls)

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
fe76c22aeb drm-uapi: Add panthor uAPI
Import panthor uAPI header from the drm-misc-next branch, commit
0f25e493a246 ("drm/panthor: Add uAPI").

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
89ea39c09d pan/perf: Reject panthor kernel driver
Make sure we reject perfcnt users when the kernel driver is not panfrost.
We might decide to abstract perf counters at the kmod level at some
point, but we're not there yet.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
1519d613c8 panfrost: Prepare support for GPU variants
Some GPU gens have variants impacting the GPU capabilities. Let the
kmod backend report a variant ID through a new
pan_kmod_dev_props::gpu_variant field, and patch the panfrost_model
logic to match both the gpu_id and the gpu_variant.

All existing entries are assumed to have no variant, hence the
gpu_variant field assigned to zero.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
4477daf957 panfrost: Rework the way we compute thread info
Rework the way we compute thread info to make it mostly GPU-agnostic
outside of the kmod backend.

The new logic is based on the following information extracted from
GPU registers:

- mximum number of threads per core
- maximum number ot threads per workgroup
- number of registers per core

If the GPU doesn't provide this information (registers are zero), we
pick the per-arch defaults we had in panfrost_max_thread_count().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
73da66706e pan/kmod: Reject pre 1.1 panfrost kernel drivers
Panfrost kernel driver has been around long enough to bump the minimal
requirement to 1.1. This allows us to get rid of the texture_features
hack we had to cope with the absence of
DRM_PANFROST_PARAM_TEXTURE_FEATURES[0-3] kernel side.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Suggested-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
0b5f1b6cb1 pan/kmod: Add a PAN_KMOD_VM_FLAG_TRACK_ACTIVITY flag
This flag reflects whether the backend should track the VM activity or
not. Needed if PAN_KMOD_VM_OP_MODE_DEFER_TO_NEXT_IDLE_POINT is used, so
we can insert proper dependencies on our VM operations.

Patch the gallium driver to set this flag at VM creation time since it
calls pan_kmod_vm_bind() with
mode=PAN_KMOD_VM_OP_MODE_DEFER_TO_NEXT_IDLE_POINT in the BO
destruction path.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Boris Brezillon
812035b2d2 pan/kmod: Fix typo in pan_kmod_vm_op_check() helper
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
2024-03-01 10:42:43 +00:00
Karol Herbst
36fb256e9a rusticl/event: we need to call the CL_COMPLETE callback on errors as well
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10673
Fixes: 47a80d7ff4 ("rusticl/event: proper eventing support")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27777>
2024-03-01 09:44:10 +00:00
Daniel Schürmann
67ea2eb97a radv: fix initialization of radv_shader_layout->use_dynamic_descriptors
Fixes: 66eaca3a0a ('radv: introduce radv_shader_layout for per-stage descriptor layout')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27898>
2024-03-01 09:06:33 +00:00
Christian Gmeiner
0a3a80a4ca etnaviv: Remove no_oneconst_limit from etna_inst
It makes no sense to store no_oneconst_limit in struct etna_inst as this
flag is not instruction specific. This is a flag that affects every instruction.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27887>
2024-03-01 07:38:57 +00:00
Samuel Pitoiset
529efb1f9b radv: enable deviceGeneratedComputePipelines
This is supported now and it's passing
dEQP-VK.dgc.nv.compute.layout.pipeline_*.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27495>
2024-03-01 06:59:59 +00:00
Samuel Pitoiset
cbeb88012c radv: force shader BOs to be local BOS with DGC indirect compute pipelines
To make sure the compute shader BO is always part of the DGC execute
submission. This is more like a workaround but this ext is currently
only exposed for vkd3d-proton and it doesn't use indirect compute
pipeline binds.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27495>
2024-03-01 06:59:59 +00:00
Samuel Pitoiset
c253a76f5d radv: handle indirect pipeline binds with scratch and DGC
vkCmdUpdatePipelineIndirectBufferNV() can be called on any queue
supporting transfer operations and it's not required to call it on the
same queue as DGC execute. This is very annoying if the compute shader
has scratch because it needs to be configured per queue.

The solution is to gather the maximum possible scratch size used by
indirect compute pipelines and use that to configure scratch.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27495>
2024-03-01 06:59:59 +00:00
Samuel Pitoiset
a2d67adff1 radv: implement indirect compute pipeline binds with DGC
This also supports push constants.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27495>
2024-03-01 06:59:59 +00:00
Samuel Pitoiset
12b015940f radv: implement vkCmdUpdatePipelineIndirectBufferNV()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27495>
2024-03-01 06:59:59 +00:00
Samuel Pitoiset
74ff7fe02f radv: implement vkGetPipelineIndirectXXX() for DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27495>
2024-03-01 06:59:59 +00:00
Samuel Pitoiset
91c21c8cba radv: add support for VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV
This stores the VA/size of the indirect buffer to be used in
vkCmdUpdatePipelineIndirectBufferNV.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27495>
2024-03-01 06:59:59 +00:00
Samuel Pitoiset
6d8f88d12f radv: add a function to get compute pipeline metadata for DGC
This struct will be used to emit a compute pipeline from the prepare
DGC shader.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27495>
2024-03-01 06:59:59 +00:00
Samuel Pitoiset
7409d7ec29 radv: add a helper to calculate the compute resource limits
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27495>
2024-03-01 06:59:58 +00:00
Samuel Pitoiset
1cddf59165 radv: get the pipeline layout info from the push constant token with DGC
They must be compatible and this allows us to remove some pipeline
references (useful for experimenting pipeline binds).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27495>
2024-03-01 06:59:58 +00:00
Caio Oliveira
97759ef139 intel/brw: Remove typedefs from fs_builder
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27866>
2024-02-29 21:14:13 -08:00
Caio Oliveira
0f5f3fddd4 intel/brw: Fold backend_instruction into fs_inst
Since we are touching it, change fs_inst to use struct instead of
class so its forward declaration is C compatible.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27866>
2024-02-29 21:14:13 -08:00
Caio Oliveira
e5c5a983f7 intel/brw: Move functions from backend_instruction into fs_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27866>
2024-02-29 21:14:13 -08:00
Caio Oliveira
f5a593ade7 intel/brw: Use fs_inst in disasm_annotate()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27866>
2024-02-29 21:14:13 -08:00
Caio Oliveira
db322554a7 intel/brw: Use fs_inst explicitly in various passes
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27866>
2024-02-29 20:47:48 -08:00
Caio Oliveira
692021cad7 intel/brw: Use fs_inst in cfg_t
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27866>
2024-02-29 20:47:48 -08:00
Caio Oliveira
d5ed82b97c intel/brw: Hide the definition of cfg_t et al from C code
Will make easier to flatten the IR.  We can revert this back later
if we need to.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27866>
2024-02-29 20:47:48 -08:00
Caio Oliveira
1f975e7af7 intel/brw: Use C++ for brw_disasm_info.c
This code uses cfg_t which we are going to rework a bit as part of
flattening the IR types.  It is easier if it can see C++ types for now.
At the end we can change this back if needed.

To avoid casting and be consistent with existing structs,
use int for some offset parameters in the functions.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27866>
2024-02-29 20:47:48 -08:00
Caio Oliveira
6e33b39b46 intel/compiler: Remove nir_print_instr hack in disasm_info
The compilers (brw and elk) static libraries depend only on
idep_nir_headers instead of idep_nir.  This was done to
increase the parallelism in the build.  One side effect is that
consumers of the compilers must depend on idep_nir themselves to
ensure nir symbols are resolved.

Various intel tools don't use NIR directly, so don't depend on it,
and only use a few functions of the compiler, that *mostly* don't
depend on linking NIR functions except for the case of nir_print_instr.

The current code adds a weak empty function to take its place in case
it is not linked.  This is sort of a hack because if we change the
compiler in ways that use NIR differently, or we use different functions
of the compiler in the tools, we will end up having to add other
dummy definitions.

A better solution here (suggested by Dylan) is to add the idep_nir
to the list of dependencies of the compilers idep's.  The static
libraries of the compilers still don't depend directly on NIR,
but any user of idep_compiler_* will get that dependency.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27865>
2024-02-29 23:08:16 +00:00
Caio Oliveira
1ba5e9432d intel/meson: Add dependencies for brw and elk
Instead of link_with, use meson dependency for the compilers.  Will
be useful later to propagate some extra dependencies.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27865>
2024-02-29 23:08:16 +00:00
Dave Airlie
d5b6f8a414 nvk: free leaked cmd_buffer descriptors state.
This wasn't been freed, free it in reset and destroy paths.

Spotted with valgrind

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27870>
2024-02-29 22:51:56 +00:00
Friedrich Vock
b588cb29a3 radv/rt: Handle monolithic pipelines in capture/replay
If monolithic shaders were inlined, there might not be a radv_shader
associated with some stages. Zero out the shader allocation info in that
case, the shader will get identified by hash instead.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27890>
2024-02-29 22:21:12 +00:00
Derek Foreman
7f72eb9e6c vulkan/wsi/wayland: More descriptive name for swapchain queue
We can have multiple swapchains, and we can also have retired swap chains
that can continue to deliver events briefly after being replaced. It's
helpful to have both a surface id and a per surface swapchain id.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27852>
2024-02-29 21:45:57 +00:00
Hans-Kristian Arntzen
73c1fbfc79 wsi/wayland: Replace surface pilfer with retired bool.
PresentWait can still be called on a retired swapchain, and pilfering
the WSI surface can cause issues. To avoid retired swapchains
interfering with non-retired swapchain event queue, flag a swapchain as
retired instead and immediately return OUT_OF_DATE from acquire and
present.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27851>
2024-02-29 21:08:59 +00:00
Derek Foreman
c7dc82e3e8 vulkan/wsi/wayland: Use wl_display_dispatch_queue_timeout
Instead of coding our own polling function, use the (new) wayland
wl_display_dispatch_queue_timeout() function instead.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27851>
2024-02-29 21:08:59 +00:00
Derek Foreman
7eaceb0392 vulkan/wsi/wayland: Adjust presentation id locking
If we want to use the new wl_display_dispatch_queue_timeout function
in libwayland we lose the ability to drop the lock while we poll
and pick it up again to dispatch.

That would cause other waiters to potentially block past their
timeouts while waiting for the dispatching thread's timeout.

Prepare for this change now by dropping the lock for the entire
dispatch, and reacquiring the lock in the functions being dispatched.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27851>
2024-02-29 21:08:59 +00:00
Derek Foreman
fb22b69df3 vulkan/wsi/wayland: Remove confusing comment
We do own the lock if there's a timeout, and the code is written with that
in mind - but the comment seems to imply otherwise.

Drop it.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27851>
2024-02-29 21:08:59 +00:00
Jesse Natalie
f96d31bc8a wgl: Check for stw_device->screen before trying to destroy it
The stw_device and its screen are set up independently. It's possible
to have a device without a screen if the DLL is loaded but never
called into, since DllMain for PROCESS_ATTACH sets up the stw_device,
but the screen is initialized later on the first call to get pixel
formats. If the DLL is loaded and then unloaded, don't crash.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27892>
2024-02-29 20:51:32 +00:00
Chia-I Wu
2c10767732 radv: set VK_SYNC_FEATURE_GPU_MULTI_WAIT
I think amdgpu always supports multi wait since syncobj is just a
container of dma-fences.  Fixes

  Assertion `!(req_features & ~ttype->point_sync_type->features)' failed.

in vk_sync_timeline_type_validate on older kernels.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27838>
2024-02-29 20:20:37 +00:00
Chia-I Wu
f9907733e3 radv: hide the sparse queue on older kernels
On older kernels without timeline syncobjs, the timeline and the submit
modes are VK_DEVICE_TIMELINE_MODE_EMULATED and
VK_QUEUE_SUBMIT_MODE_DEFERRED respectively.  They are incompatible with
the sparse queue which requires VK_QUEUE_SUBMIT_MODE_THREADED.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27838>
2024-02-29 20:20:37 +00:00
Chia-I Wu
dd84a575c0 radv: hide the sparse queue when radv_legacy_sparse_binding
This change is unnecessary but should be harmless.  We will have other
reasons to hide the sparse queue so do it here for
radv_legacy_sparse_binding as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27838>
2024-02-29 20:20:37 +00:00
Jesse Natalie
0ac7ea7578 dzn: Fix conditions for barrier in texture-converting copy case
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27864>
2024-02-29 19:56:59 +00:00
Caio Oliveira
865ef36609 intel/brw: Remove brw_shader.h
Find a better home for its existing content.  Some functions are
now just static functions at the usage sites.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27861>
2024-02-29 19:28:06 +00:00
Caio Oliveira
d9552fccf2 intel/brw: Remove extra stage_prog_data field in fs_visitor
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27861>
2024-02-29 19:28:06 +00:00
Caio Oliveira
634dff403f intel/brw: Fold backend_shader into fs_visitor
The base class was used when we had vec4, but now we can fold it with
its only subclass.  Declare fs_visitor now as a struct to be able to
forward declare for C code without causing errors due to class/struct
being mixed.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27861>
2024-02-29 19:28:05 +00:00
Caio Oliveira
f3e9a5c719 intel/brw: Move dump_* functions into fs_visitor
Make them non-virtual and update the parameter to use fs_inst.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27861>
2024-02-29 19:28:05 +00:00
Caio Oliveira
20dfee69c3 intel/brw: Change cfg_t to refer to fs_visitor
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27861>
2024-02-29 19:28:05 +00:00
Caio Oliveira
1e3fbb1afe intel/brw: Fold fs_instruction_scheduler into instruction_scheduler
And use fs_inst instead of backend_instruction.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27861>
2024-02-29 19:28:05 +00:00
Caio Oliveira
559d94cd0d intel/brw: Use fs_visitor instead of backend_shader in various passes
And since we are touching them, rename a couple of passes
to follow same name convention as existing ones.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27861>
2024-02-29 19:28:05 +00:00
Ian Romanick
1b890825f6 i915: Fix value returned for PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS
Found by inspection. Original code was returning the size instead of the
number of levels. This was probably an over zealous search-and-replace
when PIPE_CAP_MAX_TEXTURE_2D_LEVELS was changed to _SIZE.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Fixes: 0c31fe9ee7 ("gallium: Redefine the max texture 2d cap from _LEVELS to _SIZE.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27800>
2024-02-29 19:12:20 +00:00
Faith Ekstrand
3ea1d4787d nil: Enable A8_UNORM for storage buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27889>
2024-02-29 18:55:22 +00:00
Daniel Stone
a3418105b9 egl/wayland: Remove EGL_WL_create_wayland_buffer_from_image
This extension was originally intended to complement
EGL_WL_bind_wayland_display.

The idea behind bind_wayland_display was that libEGL.so on the server
side could register Wayland extensions for libEGL.so on the client side
to use to create buffers, with eglQueryWaylandBufferWL being used to
query the buffer properties, and EGL_WAYLAND_BUFFER_WL added as an
EGLImage target for texturing.

eglCreateWaylandBufferFromImageWL was then to be used for nested
compositors to perform passthrough: it would take an EGLImage created by
the magical libEGL secret handshake, and make it usable in the parent
compositor by doing the same secret handshake again.

Since that original idea, we've just standardised dmabuf across the
Wayland ecosystem instead. The last known user of this extension was a
sample client in the Weston tree, which was broken quite some years ago
and never ported to the Meson build system when we moved.

Given it won't affect anyone, let's just remove this extension so no-one
thinks it would be a good idea to use it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27793>
2024-02-29 18:26:53 +00:00
Kenneth Graunke
f159a7943c intel/brw: Delete brw_eu_util.c
This was just a bunch of helpers for the Gfx4-6 fixed-function shaders.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
655cb9c61f intel/brw: Delete some swizzling functions
Not needed in the align1 world, apparently.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
bbcd35141b intel/brw: Delete unnecessary brw_wm_prog_data fields
Register blocks and interp_mode[] were for Gfx4-5.

The binding table section doesn't seem to be used anymore, nor does
color_outputs_written.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
0eeeab16a8 intel/brw: Delete brw_wm_prog_key::line_aa
Not used on modern hardware.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
bfb12def74 intel/brw: Delete enum gfx6_gather_sampler_wa
Only needed on Gfx6, which we don't support anymore.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
5fbba530cf intel/brw: Delete compiler->supports_shader_constants
True for all drivers using this compiler.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
485b2bca17 intel/brw: Delete constant_buffer_0_is_relative
This was only for old kernels on old hardware.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
eebd24680c intel/brw: Delete SINCOS
Only existed on Gfx4-5.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
292e424162 intel/brw: Delete more unused compression stuff
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
a18030305c intel/brw: Delete SIMD4x2 URB opcodes
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
288b966e3e intel/brw: Delete legacy SFIDs
This involves a little rework in the assembler to treat "math" as an
opcode token rather than an SFID.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
afae5e78ca intel/brw: Delete more unused defines
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
Kenneth Graunke
3202f3fdbe intel/brw: Delete enum brw_urb_write_flags
This was used by the vec4 backend.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
2024-02-29 18:00:14 +00:00
David Rosca
cbbed6ca3e radeonsi/vcn: Implement separate QP for I/P/B frames
This also fixes max_au_size as a side effect of using new IB.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27558>
2024-02-29 16:12:13 +00:00
David Rosca
252ba4bbdd radeonsi/vcn: Use temporal_layer_index to select temporal layer
Don't change enc_pic.temporal_id as that is used in AV1 encode.

Fixes: 8d44a11508 ("radeonsi/vcn: Don't reinitialize encode session on bitrate/fps change")

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27558>
2024-02-29 16:12:13 +00:00
David Rosca
8c9445896f frontends/va: Separate QP for I/P/B frames
For H264/HEVC this needs to calculate init_qp + slice_qp_delta.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27558>
2024-02-29 16:12:13 +00:00
Faith Ekstrand
c69f76170e docs/nvk: Document NAK_DEBUG
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27885>
2024-02-29 16:03:41 +00:00
Faith Ekstrand
d6638e89fd docs/nvk: Update the NVK_DEBUG docs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27885>
2024-02-29 16:03:41 +00:00
Faith Ekstrand
bc8df338ca docs/nvk: Update the conformance status section
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27885>
2024-02-29 16:03:41 +00:00
Mike Blumenkrantz
532d43881f zink: stop enabling EXT_conservative_rasterization
this isn't used

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27882>
2024-02-29 15:32:05 +00:00
David Heidelberg
2ca6d044c1 ci: enable Collabora farm
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27883>
2024-02-29 14:54:18 +00:00
Eric Engestrom
64f037e079 vk/util: print a nice error in vk_icd_gen.py when VK_HEADER_VERSION is not defined
Shouldn't be reachable in normal case, but when messing with vk.xml it's
nicer than the current:

    TypeError: can only concatenate str (not NoneType) to str

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27779>
2024-02-29 14:25:49 +00:00
Eric Engestrom
3f2790adcd vk/util: trivial cleanups in vk_icd_gen.py
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27779>
2024-02-29 14:25:49 +00:00
Eric Engestrom
bc38b68ab8 ci_run_n_monitor: read job logs as utf-8
Fixes regular crashes like this one:

    Traceback (most recent call last):
      File "bin/ci/ci_run_n_monitor.py", line 478, in <module>
        print_log(cur_project, target_job_id)
      File "bin/ci/ci_run_n_monitor.py", line 270, in print_log
        lines = job.trace().decode("raw_unicode_escape").splitlines()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    UnicodeDecodeError: 'rawunicodeescape' codec can't decode bytes in position 6090-6091: truncated \uXXXX escape
    decoding with 'raw_unicode_escape' codec failed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27653>
2024-02-29 14:17:02 +00:00
Eric Engestrom
656e329fa2 ci_run_n_monitor: fix handling of optional jobs again
Looks like a recent rework broke this again, so let's add the existence check back.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27874>
2024-02-29 14:11:32 +00:00
Mike Blumenkrantz
e4d45c582b glx: only print zink failure-to-load messages if explicitly requested
if zink is inferred, let it fail silently

ref #10293

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27836>
2024-02-29 13:13:09 +00:00
Mike Blumenkrantz
571effdf08 egl/dri2: use the right egl platform enum
this is otherwise completely broken and allows loading zink in all cases

Fixes: 0fd066a1d7 ("egl: only check dri3 on X11")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27836>
2024-02-29 13:13:09 +00:00
David Heidelberg
75f186f3c4 ci: temporarily disable Collabora farm
need to restart gitlab-runner

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27878>
2024-02-29 13:09:42 +00:00
Nanley Chery
6d76d46154 iris: Enable pass-through state init for gfx12 CCS
The previous patch changed the gfx12 CCS initial aux state from
pass-through to compressed-no-clear. This isn't always accurate.

This patch determines if a CCS is in the pass-through state by
inspecting the associated resources' bo field. In order to do that
clearly, move aux-state initialization out of
iris_resource_configure_aux (which can be called before BO creation).
Split up that logic and move the pieces into iris_resource_from_handle,
iris_resource_init_aux_buf, and a new function in ISL.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27835>
2024-02-29 12:32:11 +00:00
Nanley Chery
06dff45abb iris: Don't memset CCS on integrated gfx12
There are no illegal CCS values on integrated gfx12 platforms.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27835>
2024-02-29 12:32:11 +00:00
Nanley Chery
e1443074f3 iris: Don't memset the extra_aux memory range
The extra_aux memory range holds the CCS portion of surfaces using
MCS_CCS or HiZ+CCS on integrated gfx12.x. Avoid memsetting because:

* There's no known CCS initialization requirement for MCS_CCS.

* ACM has the same documented initialization requirements for HIZ+CCS on
  TGL/MTL, but iris doesn't initialize the CCS portion on discrete. For
  TGL+, anv does not initialize the CCS portion of HiZ+CCS. Let's be
  consistent with these other cases and avoid initialization.

If we end up needing to initialize the CCS, we can try come up with
something that will work for both integrated and discrete gfx12.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27835>
2024-02-29 12:32:11 +00:00
Danylo Piliaiev
8567d02682 tu: Update prim restart state when we switch from/to indexed draw
Previously, if first draw call with wasn't indexed but pipeline
had primitive restart enabled - primitive restart would be disabled
for draw calls, even indexed, that follow.

However, prim restart index works in non-indexed draw calls, but since
we don't emit fresh PC_RESTART_INDEX for them - they may use stale
value if prim restart is enabled for non-indexed draw calls.

So we have track the switch between indexed and non-indexed draw calls
and emit PC_PRIMITIVE_CNTL_0 for them.

Fixes car rear window in Need for Speed: Most Wanted (2012)

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27821>
2024-02-29 11:56:01 +00:00
Mike Blumenkrantz
d4f3770ea2 zink: use uncompacted vk_dispatch_table
the dispatch table doesn't know which extensions zink wants to use,
so let zink use the extensions it wants to use

fixes #10513

cc: mesa-stable

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27834>
2024-02-29 11:18:18 +00:00
Mike Blumenkrantz
5d91db9666 vulkan/dispatch_table: add an uncompacted version of the table
this is a bandaid fix that allows users (zink) to actually call the
functions intended to be called. the real fix would be to figure out
which extensions are enabled on the device and then only GPA the
functions associated with those extensions

that's too hard though so I'm slapping some flex tape on it

cc: mesa-stable

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27834>
2024-02-29 11:18:18 +00:00
Tapani Pälli
185d420b27 anv: make sure aux is disabled for memory objects
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9248
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10608
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/27614>
2024-02-29 07:44:09 +00:00
Tapani Pälli
9058a2a78e iris: make sure aux is disabled for external objects
Cc: mesa-stable
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/27614>
2024-02-29 07:44:09 +00:00
Lionel Landwerlin
fe037dec6e anv: expose VK_EXT_descriptor_buffer
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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
454d381243 anv: disable mutable combined image/sampler in descriptor buffer
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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
ab7641b8dc anv: implement descriptor buffer binding
And barriers for them.

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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
349c46c553 anv: handle push descriptor writes with descriptor buffers
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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
1de44b1951 anv: add pipeline/shader support for descriptor buffers
Lowering/layout is pretty much the same as direct descriptors. The
caveats is that since the descriptor buffers are not visible from the
binding tables we can't promote anything to the binding table (except
push descriptors).

The reason for this is that there is nothing that prevents an
application to use both types of descriptors and because descriptor
buffers have visible address + capture replay, we can't merge the 2
types in the same virtual address space location (limited to 4Gb max,
limited 2Gb with binding tables).

If we had the guarantee that both are not going to be used at the same
time, we could consider a 2Gb VA for descriptor buffers.

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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
8090bd78b8 anv: add descriptor set layout support for descriptor buffers
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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
7ba059854c anv: add new helper to update binding table pool offset
We'll want to differentiate STATE_BASE_ADDRESS from
3DSTATE_BINDING_TABLE_POOL updates.

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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
ef8f09148f anv: add embedded sampler support
Those samplers live in the dynamic state base address and their offset
can be directly baking into the shaders.

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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
259cdc5496 nir: add additional flag to resource_intel for embedded samplers
This will enable specific lowering of embedded samplers.

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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
99047451c9 intel/fs: add plumbing for embedded samplers
We can address samplers from 3 different locations :
   - binding table
   - dynamic state base address
   - bindless sampler base address (only Gfx11+)

Here we allow samplers to be address from the dynamic state base
address with the embedded sampler flag.

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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
3f25b2826f anv: add embedded sampler parameters in descriptor set layout hash
The way we implement embedded samplers will be to have the sampler
handle as a relocated constant in the shader.

This implies that 2 identical shaders with different embedded sampler
parameters must have different hash as we cannot reuse the final
shader binary.

So add the sampler hash to the descriptor set layout hash when the set
has embedded samplers.

This has the effect of creating multiple shader entries in the cache
unfortunately. An improvement over this would be to have a anv_device
map of (embedded samplers hash + shader hash) to shader in instruction
heap, so that pipeline caches only have a single entry regardless of
embedded sampler parameters.

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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
6d59168dc9 anv: compute a sampler hash based on parameters
To be used for embedded samplers.

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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
9506d3f338 anv: implement data write entry points for EXT_descriptor_buffer
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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
ec73db3b8c anv: allocate fsr states for descriptor buffer
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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
44bf552704 anv: allocate border colors for descriptor buffers
Because we have 2 dynamic state heaps, we need to duplicate values.

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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
271f0b8b9c anv: allocate slice_hash for descriptor buffer
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
859f087c0b anv: move aux-tt to general state pool
We're about to use 2 different location for the dynamic state heap.
Which means at least on i915 we need 2 copies of all the fixed
(CPS_STATE, border colors, slice hash) stuff on the dynamic state
heap.

Let's avoid having the aux-tt tables in there too.

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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
226c519f28 anv: add a second dynamic state heap for descriptor buffers
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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
82d772fa9b anv: create new helper for small allocations
A number of allocations during command buffer building are sourced
from the dynamic state heap. They're not actually access using an
offset in the dynamic state heap, it just happens to be a conveninent
place.

Use different helpers for thoses so we dynamically change the dynamic
state heap location in the next commits.

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/22151>
2024-02-29 07:05:06 +00:00
Lionel Landwerlin
c6a91f1695 anv: add new heap/pool for descriptor buffers
We'll use a new heap & a new pool for descriptor buffers. The heap
will hold descriptor buffers, while the pool will only be used on
Gfx12.5+ for push descriptors.

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/22151>
2024-02-29 07:05:05 +00:00
Lionel Landwerlin
fc1aeb57bb anv: optimize push descriptor updates
vkd3d-proton uses a descriptor set with a single descriptor, so we
don't even need to copy the old data where there is an update.

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/22151>
2024-02-29 07:05:05 +00:00
Mike Blumenkrantz
3d38c9597f zink: hook up KHR_partial_update
this just requires clamping the renderArea to the passed damage rect,
which is composed by merging all the passed rects into a single large
region

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27867>
2024-02-29 03:26:14 +00:00
Mike Blumenkrantz
e0131cd371 zink: use VK_KHR_incremental_present to propagate damage rects
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27867>
2024-02-29 03:26:14 +00:00
Mike Blumenkrantz
4fe88170ce zink: hook up VK_KHR_incremental_present
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27867>
2024-02-29 03:26:14 +00:00
Mike Blumenkrantz
738fbddca8 zink: use a slab allocator for zink_kopper_present_info
this improves perf slightly at extremely high fps

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27867>
2024-02-29 03:26:14 +00:00
Mike Blumenkrantz
cdd1ce140d zink: make zink_kopper_present_info public
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27867>
2024-02-29 03:26:14 +00:00
Faith Ekstrand
4c73e52933 nvk: Advertise VK_KHR_pipeline_library
This is required by VK_EXT_graphics_pipeline_library

Fixes: fb564040a7 ("nvk: Advertise VK_KHR_graphics_pipeline_library")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27860>
2024-02-29 02:49:42 +00:00
Faith Ekstrand
bb8b11d806 vulkan/pipeline: Handle fully compiled library shaders properly
In the fast-link case, we should just use the library shader and assume
that it's correct.  We have to do this because we may not have a
precompiled shader in this case so we can't even generate the shader
hash.

In the link optimization case, we could still have a library shader
coming in from some library pipeline.  That shader may happen to be
correct, in which case we can just use it and not even bother digging
around in the cache.  In the more likely case, the keys won't match and
we should throw it away before we look up a different shader in the
cache and leak our reference.

Fixes: 9308e8d90d ("vulkan: Add generic graphics and compute VkPipeline implementation")
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27860>
2024-02-29 02:49:42 +00:00
Faith Ekstrand
d9908af9d2 vulkan/pipeline: Whitespace fix
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27860>
2024-02-29 02:49:42 +00:00
José Roberto de Souza
283d8ca98a iris: Force lmem cpu accessible for bos with clear-color
KMD needs to be able to read and write the clear-color from CPU.
i915 can workaround it but Xe KMD will reject page flips with
clear-color bos that can be read from CPU.

So here it make sure that bos with the clear color information
are placed in a lmem portion that is CPU-visible, that is important in
PCIe small bar systems.
And as CCS in discrete GPUs are only supported in lmem this bo can't
become a IRIS_HEAP_DEVICE_LOCAL_PREFERRED(lmem + smem).

So here the IRIS_HEAP_DEVICE_LOCAL_CPU_VISIBLE_SMALL_BAR heap is selected.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26700>
2024-02-29 02:20:43 +00:00
José Roberto de Souza
8a9168584c iris: Add IRIS_HEAP_DEVICE_LOCAL_CPU_VISIBLE_SMALL_BAR heap type
This is intented to be used in cases where BOs can only be placed in
lmem but needs to accesible from CPU side.

Actual usage will be added in the next patch, here just adding the
heap type and all the handling.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26700>
2024-02-29 02:20:43 +00:00
Mike Blumenkrantz
f55ed175eb zink: fix stencil-only blitting with stencil fallback
these shouldn't do extra depth blits

fixes (nvidia):
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_stencil_only,Fail
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_stencil_only,Fail
spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit stencil gl_depth24_stencil8,Fail

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27859>
2024-02-29 01:53:38 +00:00
Mike Blumenkrantz
f0430b095b egl/wayland: delete swrast references to zink
this is an entirely separate path now

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
17355e737d egl/wayland: split out kopper update_buffers
no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
1959691033 egl/wayland/kopper: actually call kopper swapbuffer functions
this allows passing through the zsbuf discard flag

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
2a8c6cf7ac kopper: set drawable buffer age
this fixes buffer age reporting with lavapipe

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
9cf22c5fd0 egl/kopper: call swrast buffer age query for kopper+swrast
with zink+lavapipe, this is actually how it works since the vtable is
different

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
1bd28d62e4 egl/wayland: split out kopper swapbuffers functions
no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
76f74f55a4 egl/wayland: add a separate hook for kopper buffer age
this otherwise hits the swrast one which is wrong

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
4345c415d7 egl/wayland: split out kopper vtable
no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
1188178811 egl/kopper: advertise EXT_swap_buffers_with_damage only in non-sw mode
this isn't actually damage-ful otherwise

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
ad8794884c egl/kopper: plumb through SwapBuffersWithDamage
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
0c82a67ea6 drisw: pass all frontend swapbuffer damage rects through
this is really stupid because EGLRect is int[4] but pipe_box is not,
requiring conversion from one to the other

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
cda627eb48 drisw/winsys: loop over all the boxes in display()
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
389e83c4fe drisw/xlib: loop over all the boxes in display() hook
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
c83768c76c egl/wayland/sw: clamp putimage geometry to surface size
this otherwise writes oob

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
fa465e34ca egl/wayland/sw: pass damage region through from put_image2 to wl_surface_damage
this propagates damage from drisw to wayland; y inversion matches protocol

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
d90b14c768 egl/wayland/sw: fix no-op updating of current backbuffer
if the frontbuffer is the backbuffer then its contents are up-to-date

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
75cf82005d egl/wayland/sw: move partial->full copy promotion to swapbuffers
this will ensure that the wl_buffer data is always fully updated

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
425d919b0a egl/wayland/sw: trigger damage from put_image2
no functional changes currently

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
e4db8c6e8d egl/wayland/sw: call dri2_wl_swrast_attach_backbuffer() before swap
should be no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
448cd2cd37 egl/wayland/sw: split out surface attach from dri2_wl_swrast_commit_backbuffer()
no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
cce12981e4 egl/wayland: unify back/current swapping between zink and swrast
these are functionally the same, they just happened in different places

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
73a3a1c646 egl/wayland/sw: move dri2_wl_swrast_commit_backbuffer() directly into swapbuffers
no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
81e5f9c398 egl/wayland/sw: move swrast_update_buffers() directly into swapbuffers
no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
fd6f7e3f16 drisw: plumb through a swapBuffersWithDamage interface
currently the same as regular swap

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
3aea0e31a4 winsys/sw: propagate nboxes to displaytarget_display()
only a single box region is used

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:22 +00:00
Mike Blumenkrantz
3cca761934 gallium: add a nboxes param to flush_frontbuffer
this allows conveying damage regions through the sw presentation interface

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:22 +00:00
Boyuan Zhang
74f6392545 meson: bump the minimal required vdpau version to 1.4
VDP_YCBCR_FORMAT_P010 and VDP_YCBCR_FORMAT_P016 require ver 1.4 or above

Fixes: c3ceec6cd8 ("vdpau: Refactor query for video surface formats.")

Cc: mesa-stable

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27857>
2024-02-29 00:32:45 +00:00
Eric Engestrom
cdab305e36 docs: update calendar for 24.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27858>
2024-02-29 00:25:04 +00:00
Eric Engestrom
d4de363278 docs: add sha256sum for 24.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27858>
2024-02-29 00:25:04 +00:00
Eric Engestrom
64eb09cd7c docs: add release notes for 24.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27858>
2024-02-29 00:25:04 +00:00
Yiwei Zhang
83f3b1d76a venus: mandate a few venus capsets long required before 1.0
Just a clean up. Venus driver can no longer work without those.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27842>
2024-02-29 00:05:13 +00:00
José Roberto de Souza
661ddf6084 intel/nullhw: Fix 32bits compilation warnings
../src/intel/nullhw-layer/intel_nullhw.c: In function ‘new_device_data’:
../src/intel/nullhw-layer/intel_nullhw.c:65:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   65 | #define HKEY(obj) ((uint64_t)(obj))
      |                    ^
../src/intel/nullhw-layer/intel_nullhw.c:193:15: note: in expansion of macro ‘HKEY’
  193 |    map_object(HKEY(data->device), data);

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27854>
2024-02-28 23:37:43 +00:00
José Roberto de Souza
209ae6bd41 intel/tools: Fix compilation in 32 bits
u64 is long long in 32 bits.

Fixes: 90e38bbb3b ("intel/tools/error_decode: Parse Xe KMD error dump file")
Reviewed-by: Mark Janes <markjanes@swizzler.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27854>
2024-02-28 23:37:43 +00:00
Mark Collins
1ba6ccc51a tu: Unconditionally enable GMEM on A7XX
GMEM is at parity with A7XX sysmem in terms of functionality so it's
safe to enable it without any conditions now.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
de3dc30a29 tu: Add blit cache flushing for input attachments
Input attachments which read GMEM via the UCHE aperture need to
flush the blit cache on A7XX and wait for the writes to land, this
implements it as access flags and a pending flush with special
semantics.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
0cf27a7236 tu: Clear VSC_UNKNOWN_0D08 on A7XX
This register is set by the proprietary driver along with other VSC state
for binning, the stale value of this register set by the prop driver was
being used by Turnip resulting in crashes that were exclusive to Android
due to only running the prop driver alongside Turnip there.

The fix is to emit this new register alongside all other VSC state inside
the `update_vsc_pipe` function.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
71918f7cff tu: Fix CP_BLIT sync on A7XX
A7XX needs the CCU blit caches to be flushed before a CP_BLIT to
ensure any writes from a CP_EVENT_WRITE::BLIT have landed, without
this the source buffer may have an incomplete load/clear when the
2D blit starts resulting in what's written out being broken.

The corruption can be seen with GMEM passes using CP_BLIT especially
when forced using `TU_DEBUG=gmem,unaligned_store`.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
9a67f00398 tu: Set RB_CCU_CNTL during HW init on A7XX
On A7XX, A6XX_RB_CCU_CNTL was broken into two registers, A7XX_RB_CCU_CNTL which
has static properties that can be set once, this requires a WFI to take effect.
As a result, it's now set during `tu6_hw_init` rather than being set every time.

While the newly introduced register A7XX_RB_CCU_CNTL2 has properties that may
change per-RP and don't require a WFI to take effect, only CCU inval/flush
events are required. This is now the only register set in `emit_rb_ccu_cntl`.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
265eb463b5 tu: Disable LRZ properly on A7XX
LRZ wasn't entirely disabled due to the register `A7XX_GRAS_LRZ_DEPTH_BUFFER_INFO`
not being set to `0` in all circumstances, this register affects rendering even
when LRZ is disabled so needs to be set to `0` until LRZ is properly implemented.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
3188c1b5c7 tu: Use Z24_UNORM_S8_UINT_AS_R8G8B8A8 for A7XX GMEM D24S8 blits/clear
A7XX has corruption when 2D blits are performed on D24S8 images
from GMEM when the source format is FMT6_8_8_8_8_UNORM, this is
fixed by using FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8.

Fixes VK-CTS: dEQP-VK.pipeline.monolithic.multisample.misc.*

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
1714e0c240 tu: Fix 2D blit path for GMEM stores on A7XX
These were broken due to the new window offset register not being
set for every tile, even with this the 2D blit path is broken for
MSAA D24S8 resolves but since outside of FDM that should be handled
by the event blit path it's not a major concern but should be fixed.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
9e699afa9b tu: Allow event blit to resolve depth stencil formats
This seemingly works on A7XX with no issues and the comment there
prior suggests that it should work on A6XX so this case is now
allowed to go through the event blit rather than the slow path.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
cc6399de31 tu: Update CCU layout selection logic for seperate stencil stores
The CCU layout logic needed to match the full `use_fast_path` case
in `tu_store_gmem_attachment`, not just unaligned but also for the
stencil storage logic.

The current code works since depth/stencil formats are forced to use the
slow path by `blit_can_resolve`. However, that will be removed since only
seperate stencil stores are unable to use the fast path while combined
stores can use it without any issues. This change prevents a regression
due to no longer choosing the sysmem CCU layout for seperate stencil
stores when fast-path resolves are allowed for DS formats.

Fixes VK-CTS cases (when fast-path stores for DS formats are enabled):
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint.compatibility_depth_zero_stencil_zero_testing_stencil
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_stencil

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
b44474407d tu: Use full size color CCU in sysmem mode
Only a fraction of GMEM was being used by the color CCU even in
sysmem mode where it would go unused aside from the portion used by
the depth CCU. This can help with color CCU bottlenecks on both
A6XX and A7XX.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
40b3a38951 freedreno/devices: Update A7XX tile values
The tile align size was incorrect resulting in certain invalid bins
being selected that would cause rendering to entirely break down. In
addition, the maximum tile size has been further increased on A7XX.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
120779f009 tu: Set RB_UNKNOWN_88E4 for A7XX event blits
Event blits on A7XX are entirely broken without setting the first
bit of this register.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Danylo Piliaiev
f0ae416fc1 tu/autotuner: Use CP_EVENT_WRITE7 for submission fence
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
4e6a1f8852 tu/autotune: Use CP_EVENT_WRITE7::ZPASS_DONE on A7XX
The `RB_SAMPLE_COUNT_ADDR` register no longer exists on A7XX and
the address is provided as a part of `CP_EVENT_WRITE7`.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
45b415a044 tu: Use CP_SET_PSEUDO_REG for A7XX VSC stream regs
VSC stream registers on A7XX are psuedo-registers rather than actual
registers and need to be set via `CP_SET_PSEUDO_REG`.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
2c78d104b0 tu: Only set PC/VFD PWR_CNTL regs on A6XX
These are no longer used on A7XX and should not be emitted.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
0b2df4ca26 tu: Set CP_THREAD_CONTROL::CONCURRENT_BIN_DISABLE in A7XX HW init
Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
1af86d5a6a tu: Set A7XX registers in tu6_tile_render_begin
These are mostly copied from the sysmem registers with the values
based off prop GMEM traces.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
9759222282 tu: Allow GMEM on A7XX when TU_DEBUG=gmem
GMEM is entirely non-functional on A7XX, however, it is useful to be
able to test intermediary commits as support is added. This is still
put behind an explicit `TU_DEBUG` gmem flag to avoid regressions from
bisecting sysmem issues.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Rohan Garg
3dbc15e74e anv: add a command streamer stall on Xe2+ when switching pipelines
Xe2+ gets rid of PIPELINE_SELECT, so we need to make sure we add a stall
when switching pipelines

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27823>
2024-02-28 22:24:39 +00:00
Simon Ser
af41fad1e9 egl/wayland: explain why implicit modifier downgrade is allowed
We break the rule that an explicit modifier cannot be stripped.
Fixing this would require a bit of effort and wl_drm is reaching
its end of life anyways, so leave a TODO instead.

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26346>
2024-02-28 21:30:55 +00:00
Simon Ser
35143febba egl/wayland: ensure wl_drm is available before use
Avoid crashing if wl_drm is unavailable. Instead, gracefully error
out.

Signed-off-by: Simon Ser <contact@emersion.fr>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: c60fea8c22 ("Revert "egl/wayland: deprecate drm_handle_format() and drm_handle_capabilities()"")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26346>
2024-02-28 21:30:55 +00:00
Rohan Garg
1f36cc6ca3 anv: cleanup duplicate robustness flag calculations
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27850>
2024-02-28 21:05:44 +00:00
Mike Blumenkrantz
2b1d12b104 zink: force max buffer alignment on return ptrs for mapped staging buffers
this guarantees the alignment matches what the API expects

fixes KHR-GL4*.map_buffer_alignment.functional on nvk

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Mike Blumenkrantz
f7d6a75d6b zink: delete unused buffer map conditional
this is now handled in the block above

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Mike Blumenkrantz
80456abff7 zink: fix unsynchronized read-mapping of device-local buffers
these can use the copy context to enable readback on systems without BAR

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Mike Blumenkrantz
91f99f82ab zink: null out bo usage when allocating from slab
avoids weird cases with stale usage

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Mike Blumenkrantz
689a80704a zink: emit SpvCapabilityImageMSArray for ms arrayed storage images
required by spec

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Mike Blumenkrantz
701ee4be91 zink: apply all storage memory masks to control barriers if no modes are specified
fixes VUID-StandaloneSpirv-OpControlBarrier-04650 errors

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Faith Ekstrand
75785749ef meson: Rename nouveau-experimental to nouveau and build by default on x86
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27832>
2024-02-28 19:58:28 +00:00
Faith Ekstrand
e32c36df07 nvk: Don't print the NVK_I_WANT_A_BROKEN_VULKAN_DRIVER warning in release builds
The environment variable is still there and it still works but this
means that release builds will simply silently fail to enumerate rather
than throwing confusing warnings at users.

Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27832>
2024-02-28 19:58:28 +00:00
Faith Ekstrand
b5dab7c965 nvk: Drop the non-conformant warning on Turing-Ada
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27832>
2024-02-28 19:58:28 +00:00
Faith Ekstrand
4ce4560a45 nvk: Advertise a CTS version of 1.3.7.3
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27832>
2024-02-28 19:58:28 +00:00
Martin Roukala (né Peres)
81230513a8 radv/ci: add a vkd3d-tahiti job
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27844>
2024-02-28 17:54:47 +00:00
Samuel Pitoiset
778ef9b133 radv: move conditional rendering for compute in radv_cmd_state
Like other conditional rendering states.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27818>
2024-02-28 17:33:29 +00:00
Samuel Pitoiset
536c44d946 radv: fix conditional rendering with direct mesh+task draws and multiview
Having to compute the predication size manually is VERY prone to errors.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27818>
2024-02-28 17:33:29 +00:00
Samuel Pitoiset
ba7b7e2d3f radv: add missing RADV_DEBUG_NO_NGG_GS to the physical device cache key
This affects shaders and they need to be recompiled.

Fixes: 69d734a8d5 ("radv: add RADV_DEBUG=nongg_gs for GFX10/GFX10.3")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27820>
2024-02-28 17:07:26 +00:00
Danylo Piliaiev
be46639974 freedreno/a7xx: Fix base_align for non-UBWC depth-stencil
A7XX appears to require alignment of 4096 for DS in both
UBWC and non-UBWC cases.

Fixes rendering with TU_DEBUG=noubwc

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27848>
2024-02-28 16:30:15 +00:00
Zan Dobersek
25a0eadcae tu: tu_device should clean up its global bo
The global buffer object is allocated and mapped during tu_device creation.
Correspondingly it should also be cleaned up during device destruction.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27814>
2024-02-28 15:51:00 +00:00
Chia-I Wu
f623c27eab meson: fix a build ereror
Fixes

  src/vulkan/wsi/meson.build:71:13:
  ERROR: Unknown variable "libloader_wayland_helper".

for headless vulkan-only builds.

Fixes: a00f9c401b ("loader/wayland: Add fallback wl_display_dispatch_queue_timeout")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27837>
2024-02-28 15:03:05 +00:00
Robert Beckett
9c096e23c0 vulkan/wsi: fix force_bgra8_unorm_first
fixes: 7c16a1ae vulkan/wsi: Add a driconf option to force WSI to advertise BGRA8_UNORM first

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23991>
2024-02-28 13:20:56 +00:00
Pierre-Eric Pelloux-Prayer
224ff11617 egl/wayland: use __DRI_IMAGE_PRIME_LINEAR_BUFFER in get_back_bo
Some drivers (radeonsi, iris) relies on this hint to detect DRI_PRIME
blits and implement a special path (eg: SDMA copy for radeonsi).

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27719>
2024-02-28 12:47:54 +00:00
Danylo Piliaiev
55e99728e0 tu: Do not emit zero-sized fs params
The comparison change accidentally slipped in.

Fixes a crash in:
  dEQP-VK.subgroups.size_control.framebuffer.fragment_allow_varying_subgroup_size

Fixes: 76e417ca59
("turnip,ir3/a750: Implement consts loading via preamble")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27829>
2024-02-28 12:00:33 +00:00
Samuel Pitoiset
b3064f9cf4 radv: clean up MAX_ALLOWED_TILES_IN_WAVE programming
To match RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27789>
2024-02-28 11:39:33 +00:00
Derek Foreman
61cfabda5d vulkan/wsi/wayland: Give names to our Wayland event queues
Named queues just add a little bit more debugging information.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27824>
2024-02-28 11:01:31 +00:00
Derek Foreman
235144cf51 egl/wayland: Give names to our Wayland event queues
Named queues just add a little bit more debugging information.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27824>
2024-02-28 11:01:31 +00:00
Derek Foreman
eb1235f343 loader/wayland: Add named queue fallback
If libwayland isn't new enough to create event queues with names, just
throw away the name. It's just a debug feature anyway.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27824>
2024-02-28 11:01:31 +00:00
Collabora's Gfx CI Team
4e219a22e2 Uprev Piglit to 2a1c49a81cd9a6bf5d0c3a9b87225be94771ca96
e9316bcd12...2a1c49a81c

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27375>
2024-02-28 10:22:38 +00:00
Mike Blumenkrantz
150525980e ci: disable clang-format job
this is still killing merge pipelines

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27831>
2024-02-28 09:05:07 +00:00
Caio Oliveira
803a1a5ada intel/brw: Remove automatic_exec_sizes
As Ken describes: "This was only used by legacy SF/Clip/FFGS programs."

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
dae59e7078 intel/brw: Remove runtime_check_aads_emit
It was used for Gfx4 payload.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
35b07ab035 intel/brw: Use a single register set
Different sets were needed for SIMD8/SIMD16 in old Gfx versions, but now
we can use a single one regardless of the SIMD size.

Suggested by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
3ef6fa3767 intel/brw: Remove Gfx8- fields from *_prog_data structs
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
aff961f423 intel/brw: Remove Gfx8- fields from *_prog_key structs
Those are not used or relevant anymore.  Also update Iris accordingly.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
63a4a4400a intel/brw: Remove edgeflag_is_last VS parameter
Suggested by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
5a3f65e678 intel/brw: Remove unused attrib workarounds
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
d3e451780b intel/brw: Inline brw_nir_apply_sampler_key code
It doesn't use the prog_key anymore, so just move the nir_lower_tex
call pass to the single callsite.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
8f3c52c1da intel/brw: Remove MRF type
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
5c93a0e125 intel/brw: Remove Gfx8- remaining opcodes
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
3ef1ed73d3 intel/brw: Remove Gfx8- code from visitor
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
c793644ce9 intel/brw: Remove Gfx8- code from SIMD lowering
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
e0d767f5fe intel/brw: Remove Gfx8- code from VUE map
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
3b3931daec intel/brw: Remove Gfx8- code from fs_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
b6098676fa intel/brw: Remove Gfx8- code from builder
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
071e9f49f1 intel/brw: Remove F16TO32 and F32TO16 opcodes
These are done with MOVs and appropriate types in Gfx9+.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
866a2f88df intel/brw: Replace inst FF macro with F or F20 macros
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
625338389e intel/brw: Update comments for FK macro
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
4e16c565f4 intel/brw: Remove Gfx8- code from inst FFDC, FDC and FD macros
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
b2822bc8d4 intel/brw: Remove Gfx8- code from inst BRW_IA*_ADDR_IMM macros
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
a7da7e4e69 intel/brw: Remove Gfx8- code from inst FI macros
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
7b523a9f8e intel/brw: Remove Gfx8- code from inst FD20 and FV20 macros
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
e684ab6a06 intel/brw: Remove Gfx8- code from inst F20 macros
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
72a73eca96 intel/brw: Replace inst F8 macro with F macro
F8 had a case for 4+, 8+ and 12+.  Its uses now can be replaced
with F that has a case for 9+ and 12+.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
add6ea8a22 intel/brw: Remove Gfx8- code from inst FC and F macros
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
ccece38623 intel/brw: Remove Gfx8- specific EU inst helpers
The "generic" macros will be handled in a separate patch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
e8ee44e8f1 intel/brw: Remove Gfx8- code from register type helpers
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
0a637dce05 intel/brw: Remove Gfx8- code from NIR options
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
d61d6fc3bc intel/brw: Remove Gfx8- code from EU codegen helpers
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
99d41ca90d intel/brw: Remove Gfx4-5 manual compression selection
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
a1e694a890 intel/brw: Remove Gfx8- code from NIR passes
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
99f173ddd2 intel/brw: Remove Gfx8- code from EU validation
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
f321e555b6 intel/brw: Remove Gfx8- code from EU emission
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
91c05d990a intel/brw: Remove Gfx8- code from IR performance analysis
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
5765c7b80c intel/brw: Remove Gfx8- code from EU compaction
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
7ac5696157 intel/brw: Remove Gfx8- code from backend passes
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
9569ea82a8 intel/brw: Remove Gfx8- code from generator
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
371468c013 intel/brw: Remove Gfx8- code from lower logical sends
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
1ee29f82d2 intel/brw: Remove Gfx8- code from lower storage image pass
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
6a03280af1 intel/brw: Remove Gfx8- code from NIR conversion
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
2a1c2a1bf1 intel/brw: Remove Gfx8- code from thread payload
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
ed6f0665e0 intel/brw: Remove Gfx8- code from register allocator
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
85eb672325 intel/brw: Remove Gfx8- code from scheduler
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
6e88fa8a77 intel/brw: Remove Gfx8- code from brw_compile_* functions
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
a4bf016582 intel/brw: Remove Gfx8- code from assembler
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
83d7ddebcb intel/brw: Remove Gfx8- code from disassembler
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
15469b0a63 intel/brw: Remove unused legacy shader stages
CLIP, STRIP-FAN and FF Geometry don't apply to Gfx9+.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
c621f75e7b intel/brw: Remove now unused vec4-only opcodes
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:38 +00:00
Caio Oliveira
a641aa294e intel/brw: Remove vec4 backend
It still exists as part of ELK for older gfx versions.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:37 +00:00
Caio Oliveira
7c23b90537 intel/brw: Always use scalar shaders
Remove scalar_stage[] array, since now it is always scalar.  This
removes any usage of vec4 shaders in brw.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:37 +00:00
Caio Oliveira
303fd4e935 intel/brw: Move type_size_* functions out of vec4-specific file
Will make easier later to delete vec4 files.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:37 +00:00
Caio Oliveira
9bfccc1935 intel/brw: Move brw_compile_* functions out of vec4-specific files
These contain code that is both fs and vec4.  Will make easier later to
delete vec4 files.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:37 +00:00
Caio Oliveira
c11d7743b3 intel/blorp: Remove Gfx8- references in BRW code
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:37 +00:00
Vinson Lee
6c190bdfe9 intel/clc: Fix file descriptor leak
Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable fp going out of scope leaks the storage it points to.

Fixes: 4fd7495c69 ("intel/clc: add ability to output NIR")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27778>
2024-02-28 04:30:33 +00:00
Faith Ekstrand
41722c6137 nak: Add support for imad on Volta+ and enable it in simple cases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27159>
2024-02-27 21:51:30 -06:00
Faith Ekstrand
a747cd1bd5 nak: Move NAK_FS_OUT_COLOR next to the enum
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27159>
2024-02-27 21:51:30 -06:00
Faith Ekstrand
f4fb5277c3 nir: Add an imad opcode
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27159>
2024-02-27 21:51:30 -06:00
Faith Ekstrand
1881d97c27 nak: Implement nir_op_iadd3 on SM70+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27159>
2024-02-27 21:51:29 -06:00
Mike Blumenkrantz
0c95d39309 zink: add nvk baseline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27843>
2024-02-27 21:50:47 -05:00
Mike Blumenkrantz
9ffb7e0179 zink: update nv blob baseline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27843>
2024-02-27 21:50:47 -05:00
Daniel Almeida
efc4ac0d27 nak/sm50: sprinkle OpAnnotate in optimization passes
Not only do we want to know where an Op originated from, but also how it got
transformed along the way if possible. Preferably all the way to the final
machine code emitted.

This commit inserts OpAnnotates in some of the optimization passes when
map_instr() or Instr::new_boxed is used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27158>
2024-02-28 01:12:03 +00:00
Daniel Almeida
feb2d3e1da nak/sm50: support annotations through OpAnnotate
Add a new op to annotate the IR. This will help debugging and is only
in effect when NAK_DEBUG=annotate is set.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27158>
2024-02-28 01:12:03 +00:00
Daniel Almeida
a69bd9a70a nak/sm50: add an annotate debug flag
Add a flag so that users can enable debug annotations when printing the IR.
This does nothing for now. A follow-up commit will actually implement
annotations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27158>
2024-02-28 01:12:03 +00:00
Daniel Almeida
02774be708 nak/sm50: add a memstream abstraction
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27158>
2024-02-28 01:12:03 +00:00
Juston Li
e57cf175e2 venus: move feedback on empty last batch to prior batch
For submissions with an empty last batch containing no cmd buffers but
with semaphores as zink does, adding feedback to that batch would make
it no longer empty and increase submission overhead on some drivers.

Since feedback order is enforced by barriers, the feedback cmds can
instead be appended to the previous batch (if it exists) so that the
last batch remains empty.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27830>
2024-02-28 00:56:26 +00:00
Thong Thai
0586a3fb22 frontends/va/postproc: do not use efc if image is to be translated
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10658

Signed-off-by: Thong Thai <thong.thai@amd.com>
Tested-by: Andrej Benz <hello@benz.dev>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27802>
2024-02-27 22:56:04 +00:00
Faith Ekstrand
b8c3d18fba nvk: Advertise VK_EXT_shader_object
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9648
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
fb564040a7 nvk: Advertise VK_KHR_graphics_pipeline_library
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9635
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
813b253939 nvk: Switch to shader objects
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
4001658c18 nvk: Use vk_render_pass_state::attachments for write masks
This pulls everything into nvk_cmd_draw.c where it's a bit easier to
manage.  When the time comes for switching to EXT_shader_object, this
will let us handle VK_EXT_dynamic_rendering_unused_attachments via the
common vk_pipeline code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
839629634f nvk: Move nir_lower_patch_vertices to nvk_lower_nir()
As long as it happens after we merge tess info between the two stages
(it does) then there's no need to have it in the pipeline code.  It's
just an optimization anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
bd76444257 nvk: Pass an array of descriptor sets to nvk_lower_nir
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
a4f519d72d nvk: Move populate_fs_key to nvk_shader.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
045741ac30 nvk/shader: Refactor some helpers
This puts them in the form we need for vk_shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
626f38e25e nvk: Populate vk_descriptor_set_layout::blake3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
9308e8d90d vulkan: Add generic graphics and compute VkPipeline implementations
These implementations are built on top of vk_shader.  For the most part,
the driver shouldn't notice a difference between draws consuming
pipelines vs. draws consuming shaders.  The only real difference is
that, when vk_driver_shader_ops::compile() is called for pipelines, a
struct vk_graphics_pipeline_state is provided.  For shader objects, the
state object will be NULL indicating that all state is unknown.  Besides
that, all the rest of the differences between Vulkan 1.0 pipelines,
VK_EXT_graphics_pipeline_library, and VK_EXT_shader_object are handled
by the Vulkan runtime code.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
c488dc9f50 vulkan: Add a BLAKE3 hash to vk_descriptor_set_layout
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
682b99a63f vulkan: Add push constant ranges to vk_pipeline_layout
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
e2cb395a1f vulkan: Add a vk_pipeline base struct
We need to be able to thunk through a destroy callback if we want to
have different kinds of pipelines implemented in different parts of the
stack.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
5e71e6f3f6 vulkan: Add a new dynamic state for render pass attachments
This is useful for implementing VK_EXT_dynamic_rendering_unused_attachments

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
6ec177b116 vulkan: Rework vk_render_pass_state::attachments
The new bitfield has a separat flag for each of the color attachments.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
c09c086c12 vulkan: Add a vk_render_pass_state_has_attachment_info() helper
We already have a helper like this internally.  Give it a better name
and expose it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
9f62008bff vulkan: Add runtime code for VK_EXT_shader_object
This adds a new base vk_shader object along with vtables for creating,
binding, and working with shader objects.

Unlike other parts of the runtime, the new shader object code is a bit
more sanitized and opinionated than just handing you the Vulkan
entrypoints.  For one thing, the create_shaders() calback takes a NIR
shader, not SPIR-V.  Conversion of SPIR-V into NIR, handling of magic
meta NIR shaders, etc. is all done in common code.  [De]serialization is
done via `struct blob` and the common code does a checksum of the binary
and handles rejecting invalid binaries based on shaderBinaryUUID and
shaderBinaryVersion.  This should make life a bit easier for driver
authors as well as provides a bit nicer interface for building the
common pipeline implementation on top of shader objects.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Connor Abbott
0d225c9e43 vk/graphics_state: Add stubs required by VK_EXT_shader_objects
Because these functions were introduced by VK_EXT_shader_objects, we
technically have to expose them even though they have to do with NV
extensions that no one else supports.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Connor Abbott
657b8e5264 vk/graphics_state: Remove bogus assert in CmdSetSampleMaskEXT
We're supposed to just ignore samples above what we support, and there's
no VU matching this assert. Fixes a crash in
dEQP-VK.pipeline.shader_object_unlinked_spirv.extended_dynamic_state.misc.sample_shading_dynamic_sample_count.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:08 +00:00
Faith Ekstrand
6ad294202e vulkan: Move the descriptor set limit to vk_limits.h
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:08 +00:00
Faith Ekstrand
498d58a5f8 vulkan: Add a vk_get_subgroup_size() helper
No reason to duplicate this logic between pipelines and shader objects.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:08 +00:00
M Henning
af2cea8f84 nak: Remove assert on nir->info.outputs_written
nir->info.outputs_written isn't used for fragment shaders except as an
early out a few lines above this, so we don't rely on this property.

My best guess is that this was intended to check if the information
from nir_gather_info is stale, but dead variables fail the assert
even if the info is up to date.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27595>
2024-02-27 21:58:08 +00:00
David Rosca
82ff9204ab frontends/va: Only set VP9 segmentation fields when segmentation is enabled
Workaround for ffmpeg setting segmentation_update_map to 1 with
segmentation_enabled == 0.

Fixes decoding sample from https://github.com/mpv-player/mpv/issues/13533

Cc: mesa-stable

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27816>
2024-02-27 20:54:48 +00:00
Ruijing Dong
eb74aa8515 frontends/va: get av1 encoding ref frame infos for L0.
Reference frame list is formed by each of the provided
recon_frame, while the assumption here is to use the API
provided by VAAPI interface, when a frame is marked as
"long term reference" by

av1->picture_flags.bits.long_term_reference

Its recon_frame will be kept in DPB marked by its
recon_frame as signature. When a future input requests
refering to it, it can go this way:

1. set av1->ref_frame_ctrl_l0.field.search_idx2 to indicate
   which ref_frame_idx slot will be used.
   x = av1->ref_frame_ctrl_l0.field.search_idx2;
2. n = av1->ref_frame_idx[x-1];
   av1->reference_frames[n] as the signature to compare with.
   if av1->reference_frames[n] is pointing to the
   same video buffer (signature) as the one marked as
   "long term reference". Then the new input is refering to
   it only.
3. in SVC case, long terms are used for temproal_id 0 only,
   because using long term means potentially scene change
   could happen.
4. the "long term reference" recon_frame should be kept,
   instead of being reused until it is no longer needed to
   avoid signature duplication.

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/27771>
2024-02-27 20:20:46 +00:00
Ruijing Dong
4b92fa9e10 radeonsi/vcn: vcn4 av1 long term ref support
Add vcn4 av1 long term reference support.

So that frames can be controlled from application
side to refer to the identified reference, which
usually could provide better coding efficiency in
the case of scene chagne back and forth, just it
needs to identify and mark these frames before
using them.

We assume 2 long term reference frames should be
good in a key frame period, and these long term
references can be overwritten by marking new ones.

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/27771>
2024-02-27 20:20:46 +00:00
Ruijing Dong
5663221bdb radeonsi/vcn: data structure av1 enc long term reference.
Here it borrowed the term "long term reference" to represent
the customized reference frame rather than the default ones used.

To enable that, it needs application to leverage VAAPI existing
interface to mark a frame as "long term reference", and then
it will be preserved in the DPB for later usage. This preserved
frame later could be refered to by having its signature used in
the ref_frame_idx[] list, and the index can be indicated by
RefFrameCtrl index2, which has not been used for other purpose.

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/27771>
2024-02-27 20:20:45 +00:00
Hans-Kristian Arntzen
2d3e7b6e9a wsi/wl: Fix deadlock in dispatch_queue_timeout.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: a00f9c401b ("loader/wayland: Add fallback wl_display_dispatch_queue_timeout")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27828>
2024-02-27 19:09:28 +00:00
Ian Romanick
a2292f53b5 nir: Optimize uniform vote_all and vote_any
No shader-db changes on any Intel platform.

fossil-db:

All Ice Lake and newer platforms had similar results. (Ice Lake)
Totals:
Instrs: 165513303 -> 165511820 (-0.00%)
Cycles: 15125314947 -> 15125211500 (-0.00%); split: -0.00%, +0.00%

Totals from 82 (0.01% of 656120) affected shaders:
Instrs: 544627 -> 543144 (-0.27%)
Cycles: 22616493 -> 22513046 (-0.46%); split: -0.46%, +0.00%

No fossil-db changes on Gfx9.

Suggested-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27044>
2024-02-27 09:44:32 -08:00
Ian Romanick
535caaf3e0 nir: Optimize uniform iadd, fadd, and ixor reduction operations
This adds optimizations for iadd, fadd, and ixor with reduce,
inclusive scan, and exclusive scan.

NOTE: The fadd and ixor optimizations had no shader-db or fossil-db
changes on any Intel platform.

NOTE 2: This change "fixes" arb_compute_variable_group_size-local-size
and base-local-size.shader_test on DG2 and MTL. This is just changing
the code path taken to not use whatever path was not working properly
before.

This is a subset of the things optimized by ACO. See also
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3731#note_682802. The
min, max, iand, and ior exclusive_scan optimizations are not
implemented.

Broadwell on shader-db is not happy. I have not investigated.

v2: Silence some warnings about discarding const.

v3: Rename mbcnt to count_active_invocations. Add a big comment
explaining the differences between the two paths. Suggested by Rhys.

shader-db:

All Gfx9 and newer platforms had similar results. (Ice Lake shown)
total instructions in shared programs: 20300384 -> 20299545 (<.01%)
instructions in affected programs: 19167 -> 18328 (-4.38%)
helped: 35 / HURT: 0

total cycles in shared programs: 842809750 -> 842766381 (<.01%)
cycles in affected programs: 2160249 -> 2116880 (-2.01%)
helped: 33 / HURT: 2

total spills in shared programs: 4632 -> 4626 (-0.13%)
spills in affected programs: 206 -> 200 (-2.91%)
helped: 3 / HURT: 0

total fills in shared programs: 5594 -> 5581 (-0.23%)
fills in affected programs: 664 -> 651 (-1.96%)
helped: 3 / HURT: 1

fossil-db results:

All Intel platforms had similar results. (Ice Lake shown)
Totals:
Instrs: 165551893 -> 165513303 (-0.02%)
Cycles: 15132539132 -> 15125314947 (-0.05%); split: -0.05%, +0.00%
Spill count: 45258 -> 45204 (-0.12%)
Fill count: 74286 -> 74157 (-0.17%)
Scratch Memory Size: 2467840 -> 2451456 (-0.66%)

Totals from 712 (0.11% of 656120) affected shaders:
Instrs: 598931 -> 560341 (-6.44%)
Cycles: 184650167 -> 177425982 (-3.91%); split: -3.95%, +0.04%
Spill count: 983 -> 929 (-5.49%)
Fill count: 2274 -> 2145 (-5.67%)
Scratch Memory Size: 52224 -> 35840 (-31.37%)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27044>
2024-02-27 09:44:11 -08:00
Ian Romanick
c63ea755fe intel/fs: Use nir_opt_uniform_subgroup
shader-db:

All Skylake and newer platforms had similar results. (Ice Lake shown)
total instructions in shared programs: 20300435 -> 20300384 (<.01%)
instructions in affected programs: 303 -> 252 (-16.83%)
helped: 2 / HURT: 0

total cycles in shared programs: 842810326 -> 842809750 (<.01%)
cycles in affected programs: 8374 -> 7798 (-6.88%)
helped: 2 / HURT: 0

fossil-db:

All Intel platforms (note below) had similar results. (Ice Lake shown)
Instrs: 165559735 -> 165551893 (-0.00%)
Cycles: 15133083961 -> 15132539132 (-0.00%); split: -0.00%, +0.00%
Spill count: 45262 -> 45258 (-0.01%)
Fill count: 74293 -> 74286 (-0.01%)

Totals from 854 (0.13% of 656120) affected shaders:
Instrs: 3461998 -> 3454156 (-0.23%)
Cycles: 154252729 -> 153707900 (-0.35%); split: -0.36%, +0.01%
Spill count: 2655 -> 2651 (-0.15%)
Fill count: 3881 -> 3874 (-0.18%)

DG2 did not see changes in spills or fills.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27044>
2024-02-27 08:38:45 -08:00
Ian Romanick
f10d1ef372 nir: Initial framework for optimizing uniform subgroup operations
The first commit just optimizes operation where the result of the
subgroup operation is the same as each of the individual channel
results.

This is a subset of the things optimized by ACO. See also
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3731#note_682802.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27044>
2024-02-27 08:38:31 -08:00
Ian Romanick
8fb37ef985 intel/fs: Add fast path for ballot(true)
This doesn't help very much now. A later commit adds a NIR optimization
pass, tentatively called nir_opt_uniform_subgroup, that converts many
kinds of subgroup operations to things involving
bitCount(ballot(true)). This commit makes a huge difference in the
results of that later commit.

No shader-db changes on any Intel platform.

Fossil-db results:

All Intel platforms had similar results. (Ice Lake shown)
Totals:
Instrs: 165558033 -> 165557519 (-0.00%)
Cycles: 15156188362 -> 15156178922 (-0.00%); split: -0.00%, +0.00%

Totals from 299 (0.05% of 656117) affected shaders:
Instrs: 88293 -> 87779 (-0.58%)
Cycles: 3709498 -> 3700058 (-0.25%); split: -0.28%, +0.03%

v2: Rebase on splitting ELK from BRW. Remove devinfo->ver >= 8 check.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27044>
2024-02-27 08:37:46 -08:00
Ian Romanick
c42830c64a intel/fs: Use constant of same type to write flag
Otherwise the compiler generates an extra MOV to load the constant into
a register first because reasons. 🤷 vote_any, vote_all, vote_ieq,
and vote_feq handling already do this.

No shader-db changes on any Intel plaform.

Fossil-db results:

All Intel platforms had similar results. (Ice Lake shown)
Totals:
Instrs: 165592451 -> 165557937 (-0.02%)
Cycles: 15133282615 -> 15133059360 (-0.00%); split: -0.00%, +0.00%

Totals from 33779 (5.15% of 656115) affected shaders:
Instrs: 4396576 -> 4362062 (-0.79%)
Cycles: 86867412 -> 86644157 (-0.26%); split: -0.37%, +0.11%

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27044>
2024-02-27 08:37:15 -08:00
Ian Romanick
b22fff90d5 intel/fs: Enable nir_opt_uniform_atomics in all shader stages
The problem seems to have been related to
nir_intrinsic_load_global_block_intel being marked as non-divergent.

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

v2: Rebase on splitting ELK from BRW. Remove devinfo->ver >= 8 check.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27044>
2024-02-27 08:37:05 -08:00
Ian Romanick
75de4458a1 nir: Mark nir_intrinsic_load_global_block_intel as divergent
This is divergent because it specifically loads sequential values into
successive SIMD lanes.

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

Fixes: 9f44a26462 ("nir/divergence: handle load_global_block_intel")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27044>
2024-02-27 08:36:42 -08:00
Ian Romanick
56a3f031f4 intel/fs: Delete stale comment in nir_intrinsic_ballot implementation
Discard actually uses f1.x, so this implementation of ballot is fine.

Trivial.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27044>
2024-02-27 08:36:34 -08:00
Ian Romanick
5da5106727 nir: Add documentation for subgroup_.._mask
v2: Fix reference to GL_ARB_shader_ballot. Noticed by Lionel.

Suggested-by: Lionel
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27044>
2024-02-27 08:36:09 -08:00
Samuel Pitoiset
727170fee0 radv/ci: enable RADV_PERFTEST=shader_object for vkcts-tahiti-valve
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27812>
2024-02-27 14:28:54 +00:00
Martin Roukala (né Peres)
83efcd6a72 radv/ci: add a vkcts-tahiti job
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27812>
2024-02-27 14:28:54 +00:00
Sebastian Wick
0fe7e06f5f vulkan/wsi/wayland: Use dispatch_queue_timeout in acquire_next_image
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27511>
2024-02-27 13:10:13 +00:00
Sebastian Wick
a00f9c401b loader/wayland: Add fallback wl_display_dispatch_queue_timeout
This is almost a 1:1 copy of the same function in libwayland. If the version
with the symbol propagates far enough the fallback can be removed again.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27511>
2024-02-27 13:10:13 +00:00
Sebastian Wick
df801bec1e util: Add timespec_sub_saturate to avoid negative time for deadlines
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27511>
2024-02-27 13:10:13 +00:00
Connor Abbott
a80a23dc49 tu: Enable UBWC for storage images on a7xx
I'm not sure exactly when this was introduced. It doesn't work on a650,
but does work on a7xx, I'm not sure whether it works on the a660
generation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27506>
2024-02-27 07:34:15 -05:00
Connor Abbott
b9e04f8293 tu: Enable UBWC for SNORM formats on a740+
The fast-clear value is now the same for SNORM and UNORM, so our trick
of reinterpreting SNORM as UNORM when copying now works with UBWC. We
can also freely reinterpret UNORM, SNORM, and UINT formats, as tested by
dEQP-VK.image.mutable.*.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27506>
2024-02-27 07:33:59 -05:00
Connor Abbott
4529b2ea54 tu: Reenable MSAA UBWC on a6xx gen1
This passes a full CTS run now, probably due to other fixes in the
meantime.

Closes: #7438
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27506>
2024-02-27 07:17:29 -05:00
Daniel Stone
dcbf61f5df egl/dri: Use pipe_format instead of DRI_IMAGE_FORMAT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
68eaf820e1 st/dri: Use pipe_format from config directly
The driver already stores the pipe_format within the mode, so we can
just reuse that rather than trying to re-derive it back from a hardcoded
set of masks.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
832d814852 egl: Remove shifts/sizes from dri2_add_config argument
All the callers now do their own filtering on driver configs to decide
whether or not to add them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
e66305d681 egl/x11: Compare config shifts/sizes locally
Rather than getting the egl_dri2 core to compare our shift/size arrays,
do it in the caller, as X11 is the only caller that constructs configs
like this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
273e54391a egl/android: Remove hard-coded color-channel data
We don't need to write out tables of the shift/size of every colour
channel, because we already have that as part of the format description
if we use pipe_format.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
d8d153d4c2 gbm: Remove hardcoded color-channel data
We don't need to write out the shifts and sizes everywhere; we already
have them as part of the format description.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
a10f10c4ce gbm/dri: Query DRIImage for FourCC directly
No need to go through the DRIImage format query when we can just get the
FourCC directly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
6b04b64a21 egl: Use pipe_format for pbuffer configs
There's no need to pass shifts and masks now; we can just take a list of
pbuffer configs to add.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
630fda2492 egl: Automatically set EGLConfig ID
There's no reason to make the users go through and count all their
configs; just set it ourselves in the core.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
487016796b egl/{surfaceless,device}: Remove check for EGLConfig presence
We now check in the EGL core that we actually have some configs for the
display, so no need to do it in the platform.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
e12a55c979 egl/android: Remove check for EGLConfig presence
We now check in the EGL core that we actually have some configs for the
display, so no need to do it in the platform.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
ac304d0393 egl/x11: Remove check for EGLConfig presence
We now check in the EGL core that we actually have some configs for the
display, so no need to do it in the platform.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
6770921918 egl/gbm: Remove check for EGLConfig presence
We now check in the EGL core that we actually have some configs for the
display, so no need to do it in the platform.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
bf7ebe6ff8 egl/wayland: Remove check for EGLConfig presence
We now check in the EGL core that we actually have some configs for the
display, so no need to do it in the platform.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
cbb6f62135 egl: Fail display creation if no EGLConfigs created
If we failed to create any EGLConfigs, throw an error and refuse to
create the display. This lets us eliminate a bunch of copy-and-wasted
code throughout the drivers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
97c435c926 egl/wayland: Remove shift/size masks
We don't need these anymore.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
7889c9dc92 egl/wayland: Use pipe_format for format names
We don't need to carry our own strings.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
84bb6d0e0a egl/wayland: Remove WL_SHM_* format listings
We don't need to type all of these out, because they're exactly the same
as the DRM ones, with the exception of ARGB8888 and XRGB8888 which carry
their own format codes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
5ac70182e8 egl/wayland: Simplify alternate-format fallback for configs
Rather than doing everything to add the config twice, we can simply
reuse the helpers to check if the different formats are supported, then
add the config only once.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
ee04cc5d2b egl/wayland: Eliminate double loop for configs
We used to loop like this:

foreach (config_supported_by_driver) {
   foreach (config_wl_knows_about) {
      dri2_add_config(wl_config.rgba_masks, wl_config.rgba_shifts)) {
         if (wl_config.rgba_masks != driver_config.rgba_masks ||
	     wl_config.rgba_shifts != driver_config.rgba_shifts) {
            return NULL; /* driver config != wl config */
         }
      }
   }
}

This is a pretty painful way to discover the relationship between the
different sets of configs, especially as we can just look up our Wayland
visual entry directly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
f63e676370 egl/wayland: Use helper to look up visual
No functional change.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
ebdf9ad85c egl/wayland: Add helper to check server format support
Often when we look up a dri2_wl_visual, the only thing we want to do
with it is check whether or not the server supports it. Add a helper for
this common pattern.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
a34d3c290e egl/wayland: Use FourCC to look up wl_buffer support
No point in using a DRI_IMAGE_FORMAT, since we'll need to get a FourCC
for dmabuf/wl_drm support anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
6a084e2b08 egl/wayland: Use pipe_format to look up configs
Instead of using the sizes and shifts to look up a dri2_wl_visual from a
config, just use the pipe_format we stash in the config.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
9ea9a963aa egl/wayland: Fix EGL_EXT_present_opaque
This extension has been broken ever since the initial commit. It created
an XRGB DRIImage for the driver to render to, so whilst the presentation
was opaque, the buffer also completely lacked an alpha channel.

Fix it by making sure we only modify the FourCC we send to the Wayland
server when creating a buffer.

Closes: mesa/mesa#5886
Fixes: 9aee7855d2 ("egl: implement EGL_EXT_present_opaque on wayland")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
c74f480391 egl/wayland: Add opaque-equivalent FourCCs
Add a mapping for the opaque version of an alphaful format (e.g.
ARGB8888 -> XRGB8888) to better support EGL_EXT_present_opaque.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
084fea1e7d egl/wayland: s/DRI_IMAGE_FORMAT/pipe_format/g
All the DRI_IMAGE_FORMATs we use are now pipe_formats, so eliminate the
old type names.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
ba3b867552 egl/wayland: Query image FourCC for linear copies
This entire pattern really wants to be a shared helper, to allocate a
shadow linear image from another device and then import it across into
the rendering GPU. Querying the FourCC from the DRIImage makes it easier
to pull out into shared code.

This temporarily makes the implementation more ugly, however it's
already pretty hard on the eyes, so probably no great loss.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
57c3343c2d dri/kopper: Flatten pipe_format/DRIImage/FourCC conversion
No need to go through DRI_IMAGE_FORMAT_* tokens; we can just directly
convert from pipe_format to FourCC.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
3c46252570 dri/kopper: Reorder format tables
Just make it more obvious that they're identical.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
d60415bad5 dri/kopper: Add translations for sRGB formats
There was DRI_IMAGE_FORMAT -> FourCC format translation, but this was
unreachable as we only ever called image_format_to_fourcc() on the
result of get_dri_format().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
ca0f94c805 dri/kopper: Move format -> FourCC translation up a level
There's no reason to use DRIImage formats here, given that it's only
ever used to immediately convert to a FourCC.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
a8cb490193 st/dri: Reuse stored texture format
When we create a texture, we allocate a pipe_resource for it with a
given format. When we export the texture to an EGLImage, we go look
up what the GL format was and try to re-derive the pipe_format back
again.

Instead of doing that, just immediately reuse the pipe_format for the
image's format.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
858ad38f8b st/dri: Reuse stored renderbuffer format
When we create a renderbuffer, we allocate a pipe_resource for it with a
given format. When we export the renderbuffer to an EGLImage, we go look
up what the GL format was and try to re-derive the pipe_format back
again.

Instead of doing that, just immediately reuse the pipe_format for the
image's format.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
303b935dbd egl/wayland: Remove format-query fallback
The DRI2 frontend should always be responsible for answering a FourCC
query, so just remove one use of DRI formats here.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
216d4613c3 st/dri: Store pipe_format in gl_config
When the DRI frontend generates configs to pass to the APIs, store the
pipe_format in the internal gl_config structure. Doing this allows us to
nuke a few places where we try to retcon our way back from the config to
a pipe_format.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
ad0edea53a st/dri: Check format properties from format helpers
When populating DRI configs, driconf allows us to exclude
10bpc/RGBA/float configs. Rather than having a hardcoded set of formats
which satisfy those properties, just check the actual format
definitions.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
4025845137 st/dri: Use pipe_format for Z/S modes
Rather than just passing down the depth/stencil bits, pass the
pipe_format for the depth/stencil modes down to driCreateConfigs so we
retain the explicit information as long as possible.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
69d64812e2 st/dri: Rework depth/stencil format selection
When we're building configs, be a bit more explicit about which format
we're using, as a prelude to passing the formats down explicitly to
driCreateConfigs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
4816cdd204 st/dri: Add transient HAS_ZS() helper
Just saves a load of redundant typing.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
e018c91384 st/dri: Completely remove mesa_format from config setup
We don't need to have mesa_format here at all, we can just work entirely
on pipe_format.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
4515bcf5af st/dri: Remove format tables from driCreateConfigs
Just get all the information we need from u_format, rather than keeping
it in hand-written tables.

If you have bisected any kind of failure to this commit, please build
the previous commit in debug mode (so that assertions are enabled) and
check if there are any runtime failures. If so, there is a difference
between the u_format descriptions and the handwritten descriptions that
this commit deletes.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
d3ed00f38a util: Add util_format_get_component_shift
Similar to util_format_get_component_bits, get the bit offset for a
particular channel in a given format.

Use this to calculate the shift/mask sets for formats when creating DRI
configs, as a prelude to ripping out and replacing the hardcoded table.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:03 +00:00
Daniel Stone
b3d419ad24 st/dri2: Use u_format to get config format information
Now that we have both the pipe_format and the mesa_format available to
us, prefer the former so we don't need to map between the two worlds.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:02 +00:00
Daniel Stone
87955b67ae st/dri2: Pass pipe_format to driCreateConfigs
Gently start removing some of the open-coded format work here.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:02 +00:00
Daniel Stone
5cdfc9a811 st/dri2: Remove __DRI_IMAGE_FORMAT conversion
It's now just a PIPE_FORMAT, so we can use that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:02 +00:00
Daniel Stone
7e10601786 dri: Redeclare __DRI_IMAGE_FORMAT_* as PIPE_FORMAT_*
These aren't used by any external DRI callers, so unexport them and
redeclare them in terms of PIPE_FORMAT_*, so we can flatten them down
later.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:02 +00:00
Daniel Stone
e9891f9cf1 st/dri: Use correct pipe_resource for GL texture image export
When we're binding a GL texture to an EGLImage, we have to be sure to
check the right resource. A GL texture resource can contain multiple
pipe_resources on different levels; so once we get the texture object,
we have to chase that down to a texture image before we use the
pipe_resource.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
2024-02-27 10:51:02 +00:00
Juan A. Suarez Romero
5d71eb60f3 v3dv/ci: remove crashes from expected list
These are now fixed.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27813>
2024-02-27 10:07:17 +01:00
Samuel Pitoiset
450b375b69 radv: disable VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 with minmax filter on GFX6
This doesn't seem supported and introduced regressions on
Pitcairn/Tahiti, but it seems fine on Bonaire (GFX7).

Fixes: 926d9f1cef ("radv: support minmax filter for more formats")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27760>
2024-02-27 09:23:53 +01:00
Tapani Pälli
1b1afd7b24 iris: make sure DS and TE are sent in pairs on >= gfx125
We have couple of dynamic fields used on >= gfx125, ScratchSpaceBuffer
and TessellationDistributionMode. There are also 2 workarounds dealing
with TessellationDistributionMode. These changes make sure that we
always emit both DS and TE together when the dynamic fields need to be
changed.

This fixes KHR-Single-GL46.arrays_of_arrays_gl.AtomicUsage on MTL.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10636
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-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/27753>
2024-02-27 06:48:45 +00:00
Dave Airlie
d103b76ad6 radv/video: add VK_KHR_video_decode_av1 support.
This adds support for AV1 decode to radv, there are likely some
cleanups necessary.

Co-author: Charlie Turner <cturner@igalia.com>
(I wrote the initial mesa extension, and Charlie ported it to
the KHR extension and kept it up to date and fixed CTS things)

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27424>
2024-02-27 15:03:54 +10:00
Dave Airlie
7c0e0b7462 radv/video: use proper struct sizes for decoder structs.
This just cleans it up before av1 lands.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27424>
2024-02-27 15:00:52 +10:00
Dave Airlie
0466453d31 radv: rename it_ptr to it_probs_ptr in advance of adding av1
This is just a rename, just to make the name more meaningful.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27424>
2024-02-27 15:00:39 +10:00
Dave Airlie
d599391ac9 radv/video: use vcn ip version in more places.
This parallels changes made to the radeonsi code, but since we have uvd
in here as well we still use family in some places.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27424>
2024-02-27 14:59:42 +10:00
Dave Airlie
03f18be607 radv/video: fix filling out decode operations.
This just makes it consistent with the extension.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27424>
2024-02-27 14:59:42 +10:00
Yiwei Zhang
e9290ec0bb venus: fix to ensure sfb cmds can get recycled
The prior refactor has missed a case that timeline sempahore can be
ping-pong'ed between device signal and host wait.

Fixes: d63432012d ("venus: refactor semaphore feedback")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reported-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27807>
2024-02-27 03:05:32 +00:00
José Roberto de Souza
90e38bbb3b intel/tools/error_decode: Parse Xe KMD error dump file
There is more to do but this is able to parse batch buffers, including
fetch and parse other bos like shader programs.

Some functions used by read_i915_data_file() could be shared with Xe
so I have moved those to aubinator_error_decode_lib.c/h.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27661>
2024-02-27 01:04:16 +00:00
José Roberto de Souza
7e88176b0b intel/tools/error_decode: Move code that can be shared between i915 and Xe error decoders
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27661>
2024-02-27 01:04:16 +00:00
José Roberto de Souza
6f9a5f4811 iris/xe: Add VMs to error dump
To ask Xe KMD to dump BO/VMA content to error state it is necessary to
set DRM_XE_VM_BIND_FLAG_DUMPABLE during VM bind, so places that were
setting 'bo.real.capture = true' after the VM bind were useless for
Xe KMD.

To fix that BO_ALLOC_CAPTURE was added, alloc_fresh_bo() will set
'bo.real.capture = true' automaticacly for new bos before vm bind.
alloc_bo_from_cache() also required to check if capture states matches
between asked bo and bo in cache.

Only slabs might be left out of error dump if DEBUG_CAPTURE_ALL is not
set but that was already happening for i915.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27661>
2024-02-27 01:04:15 +00:00
José Roberto de Souza
c26663eede anv/xe: Add VMs to error dump
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27661>
2024-02-27 01:04:15 +00:00
José Roberto de Souza
d40c48cac1 intel: Sync xe_drm.h
Syncs xe_drm.h with b2121f2bd223 ("drm/xe: Extend uAPI to query HuC micro-controler firmware version").

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27661>
2024-02-27 01:04:15 +00:00
Sagar Ghuge
5e800ab6f7 anv: Implement VK_AMD_texture_gather_bias_lod
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27447>
2024-02-27 00:22:46 +00:00
Sagar Ghuge
269d2c4a3f intel/compiler: Enable packing of offset with LOD or Bias
Move intel_nir_lower_texture just before nir_lower_tex since we need to
operate on the offset and those are getting lowerd.

v2: (Ian)
- Rename variable name to intel_tex_options

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27447>
2024-02-27 00:22:46 +00:00
Sagar Ghuge
30ead72e80 nir: Allow nir_texop_tg4 in implicit derivative
This allow us to invoke the quad helper.

v2: (Georg)
- Add check for is_gather_implicit_lod

Fixes: 48158636bf ("nir: add is_gather_implicit_lod")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27447>
2024-02-27 00:22:46 +00:00
Sagar Ghuge
6f0ab5e4d5 intel/compiler: Add texture gather offset LOD/Bias message support
v2: (Ian)
- Space formatting on conditional statement

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27447>
2024-02-27 00:22:46 +00:00
Sagar Ghuge
79af0ac29a intel/compiler: Add gather4_i/l/[_c]/b sampler message
v2: (Ian)
- Format comment

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27447>
2024-02-27 00:22:46 +00:00
Sagar Ghuge
3c7f1feebf intel/compiler: Add helper method to decide if header is required
v2: (Ian)
- Return immediately from the switch case

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27447>
2024-02-27 00:22:46 +00:00
Sagar Ghuge
2ea041e04a intel/compiler: Pack texture LOD and offset to a single 32-bit value
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27447>
2024-02-27 00:22:46 +00:00
Sagar Ghuge
9b37b3ba73 intel/compiler: Pack LOD/bias and array index on TG4 messages
Bspec: 56996

Programming note:
When doing cube arrays on gather4_l and gather4_b with SIMD16 or
SIMD32 the AI parameters is combined with the LOD/bias parameter on
the 9 LSBs.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27447>
2024-02-27 00:22:46 +00:00
Sagar Ghuge
b34b2bdff3 intel/compiler: Adjust sample_b parameter according to new layout
On Xe2+, we need to pack LOD with array index for cube array surfaces,
with that mlod parameter gets adjusted to different indices based on the
layout.

So track if we are packing LOD with array index in fs_inst and propogate
that to sampler lowering code to adjust param location.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27447>
2024-02-27 00:22:46 +00:00
Sagar Ghuge
d4ce848476 intel/compiler: Trim vector properly till array index
This fixes the off-by one mistake, we want to trim the vector till the
array index not till the coordinates last component.

v2: (Ian)
- Use tex->coord_component - 1 in nir_trim_vector

Fixes: 73a3257968 ("intel/compiler: Add texture operation lowering pass")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27447>
2024-02-27 00:22:46 +00:00
Connor Abbott
db0291c235 tu: Follow pipeline compatibility rules for dynamic descriptors
When we bind a descriptor set with dynamic descriptors, we can't ignore
dynamic descriptors in previously-bound higher descriptor sets. For
example, assume we have descriptor sets A and B, each of which has one
dynamic storage buffer, and we do:

CmdBindDescriptorSets(firstSet=1, descriptorSetCount=1, A)
CmdBindDescriptorSets(firstSet=0, descriptorSetCount=1, B)

and in the first CmdBindDescriptorSets the pipeline layout includes a
descriptor set layout compatible with B in set 0. Then, following
"Pipeline Layout Compatibility," set 0 is disturbed:

   When binding a descriptor set to set number N, a previously bound
   descriptor set bound with lower index M than N is disturbed if the
   pipeline layouts for set M and N are not compatible for set M.
   Otherwise, the bound descriptor set in M is not disturbed

When it's disturbed, it's effectively turned into a set with 1 undefined
dynamic storage buffer:

   When a descriptor set is disturbed by binding descriptor sets, the
   disturbed set is considered to contain undefined descriptors bound
   with the same pipeline layout as the disturbing descriptor set.

This disturbed set is compatible with B, so in the second
CmdBindDescriptorSets this clause doesn't apply:

   If, additionally, the previously bound descriptor set for set N was
   bound using a pipeline layout not compatible for set N, then all
   bindings in sets numbered greater than N are disturbed.

and A remains valid to access. The code before 88db7364 worked only if
the pipeline layout when binding B contained a descriptor layout
compatible with A in set 1, because it used the pipeline layout's total
size when allocating the internal dynamic descriptors array, but that
isn't actually a requirement, so the previous code was already broken.
After 88db7364 we only allocate as much space as required by the current
descriptors being bound, because I misread the rules here, which made it
more broken and broke 3DMark Wildlife Extreme that does something like
this.

In order to properly fix this we need to keep track of the maximum ever
seen dynamic descriptor size, similar to what we already do for
descriptor sets, and use that. We have no idea what needs to be
preserved when binding a descriptor set with dynamic descriptors, so we
have to be conservative.

Fixes: 88db7364 ("tu: Rework dynamic offset handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27750>
2024-02-26 23:52:41 +00:00
Yiwei Zhang
8c86690072 venus: add vn_set_temp_cmd helper to initialize feedback batch cmd
This way the feedback cmd info init for sync2 is done once at one place.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27758>
2024-02-26 21:54:36 +00:00
Yiwei Zhang
d63432012d venus: refactor semaphore feedback
1. move feedback helpers into vn_feedback
2. rename related structs, helpers, etc
3. only recycle wait semaphores is enough for the submission. Later we
   can further optimize to only recycle each timeline sempahore once

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27758>
2024-02-26 21:54:36 +00:00
Yiwei Zhang
3c166710f6 venus: simplify to drop the struct vn_feedback_cmds accessor
We can add the accessor to vn_queue_submission and bump the offset in
the temp cmds directly upon batch setup.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27758>
2024-02-26 21:54:36 +00:00
Yiwei Zhang
fa8c7dcb5a venus: refactor to add vn_queue_submission_setup_batch
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27758>
2024-02-26 21:54:36 +00:00
Yiwei Zhang
72fd719698 venus: massive feedback renamings for consistency and clarity
No behavior change, and below is the summary:
1. simplify to drop _timeline_ from semaphore feedback naming
2. update feedback structs to use obj_handle naming
3. for vn_feedback_cmd_pool, use fb_cmd_pool variable naming
4. for vn_feedback_buffer, use fb_buf variable naming
5. for query_feedback_cmd, use qfb_cmd variable naming (already use ffb)
6. s/submit_batches2/submit2_batches/
7. s/cmd_buffer_count/cmd_count/
8. use total_cmd_size instead of cmd_buffer_size if applicable
9. update vn_queue_submission's feedback_cmd_count to cmd_count
10. update setup time local feedback_cmd_count to extra_cmd_count
11. update feedback_event_cmd to event_feedback_cmd
12. other trivial renames

Most semaphore and query feedback cmd renamings are deferred to later
commits.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27758>
2024-02-26 21:54:36 +00:00
Caio Oliveira
e3dc608db9 intel/brw: Move workarounds to a separate file
All the workarounds are relatively small, so keep them in a single file.
Promote (or add) them to a separate file if they get large -- like it is
done for opt and lower.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
c25803880e intel/brw: Move lower_simd_width to its own file
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
c989ad09f1 intel/brw: Expose flag_mask/bit_mask fs helpers
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
404630ad2e intel/brw: Move lower_integer_multiplication to its own file
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
4fe3498e72 intel/brw: Move small lowering passes into brw_fs_lower.cpp
Larger lowering passes will go to their own files.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
bbffe124fc intel/brw: Move fs algebraic to its own file
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
df013738db intel/brw: Move virtual GRF opts into their own file
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
f3b7f4726a intel/brw: Move optimize and small optimizations to brw_fs_opt.cpp
Remaining optimizations in brw_fs.cpp will get their own files.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
7451c0f5d6 intel/brw: Pull optimize() out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
254312b9dd intel/brw: Pull lower_scoreboard out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
5a5a242210 intel/brw: Pull emit_dummy_mov_instruction out of fs_visitor
Remove references to the workaround number from the callsites.  Instead
the function has "workaround" as part of the name and the number is
in its definition.  Return bool for consistency with other passes.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
755d6e8c44 intel/brw: Pull emit_dummy_memory_fence_before_eot out of fs_visitor
Rename to workaround_memory_fence_before_eot and return the already
present progress value for consistency.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
a7e0eec62b intel/brw: Pull fixup_3src_null_dest out of fs_visitor
Rename fixup to lower and return the already present
progress value for consistency.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
a073116091 intel/brw: Simplify OPT macro usage in fs_visitor::optimize
All passes now take `*this`, so change the macro to implicitly pass it.

The `##__VA_ARGS__` makes it work when there's no extra arguments
(will make the comma disappear), same approach is taken by NIR_PASS.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
de6a798577 intel/brw: Use references for a couple of backend_shader passes
This will allow simplify the OPT macro for fs_visitor::optimize().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
19b28ee44a intel/brw: Pull lower_load_payload out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
7397d3c950 intel/brw: Pull lower_find_live_channel out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
619888e077 intel/brw: Pull lower_uniform_pull_constant_loads out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
6b00719513 intel/brw: Pull fixup_sends_duplicate_payload out of fs_visitor
Rename it to lower_sends_overlapping_payload.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
06272d4883 intel/brw: Pull lower_regioning out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
89866b6259 intel/brw: Pull lower_derivatives out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
7b7da31c45 intel/brw: Pull lower_sub_sat out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
058b723d14 intel/brw: Pull lower_integer_multiplication out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
e8dd8b461e intel/brw: Pull fixup_nomask_control_flow out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
1bdfa5230f intel/brw: Pull lower_logical_sends out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
422b4bead6 intel/brw: Pull lower_barycentrics out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
af2b3c478c intel/brw: Pull lower_simd_width out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
14954cbd58 intel/brw: Pull lower_pack out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
f6b82b0270 intel/brw: Pull lower_constant_loads out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
a1c35563ae intel/brw: Pull register_coalesce out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
ce10130f09 intel/brw: Pull remove_extra_rounding_modes out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
73fe658456 intel/brw: Pull eliminate_find_live_channel out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
4f314f89f7 intel/brw: Pull opt_zero_samples out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
838d6d5cd2 intel/brw: Pull opt_split_sends out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
8dcbdc8fac intel/brw: Pull split/compact virtual_grf opts out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
1947a38680 intel/brw: Pull opt_algebraic out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
d849c2ecff intel/brw: Pull redundant_halt out of fs_visitor
And call it "remove redundant halts".

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
96c4aa8545 intel/brw: Pull peephole_sel out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
10489b418c intel/brw: Pull bank_conflicts out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
13c312431c intel/brw: Pull opt_cse out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:25 +00:00
Caio Oliveira
4f09ad9dee intel/brw: Pull opt_combine_constants out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:24 +00:00
Caio Oliveira
59bff8adf4 intel/brw: Pull dead_code_eliminate out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:24 +00:00
Caio Oliveira
1bd175f458 intel/brw: Pull opt_saturate_propagation out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:24 +00:00
Caio Oliveira
dc33a8fb06 intel/brw: Pull opt_cmod_propagation out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:24 +00:00
Caio Oliveira
6a3329a6c4 intel/brw: Pull opt_copy_propagation out of fs_visitor
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:24 +00:00
Caio Oliveira
0b73d163d4 intel/brw: Remove Gfx8- passes from optimize()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
2024-02-26 20:54:24 +00:00
Tapani Pälli
1a4f220c29 intel/blorp: disable use of REP16 independent of format
Previously we were optimistic and tied this to certain format but wa
description lists other formats and bspec clearly disallows the usage.

Issue can be seen with different 16bpp tests, effect looks a bit like
dithering pattern but it is not, it is just rep16 failing.

Fixes:
   GTF-GL46.gtf42.GL3Tests.texture_storage.texture_storage_texture_as_framebuffer_attachment

on DG2 and MTL, some 565 EGL tests on Android and internal issue on game
that displays a dither like pattern on the background while it's not
supposed to do that.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10646
Cc: mesa-stable
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/27794>
2024-02-26 19:30:31 +00:00
Eric R. Smith
1adb2e9e95 panfrost: support multi-sampled image load/store
On panfrost we can treat 2DMS image access like 3D access.
Use a lowering pass to do this to implement 2DMS image
load/store.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by:   Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27626>
2024-02-26 19:01:32 +00:00
Eric R. Smith
c9831a4d34 panfrost: add lowering pass for multisampled images
Panfrost generally treats 2D multisampled images like 3D images,
with the R coordinate holding the sample index. This commit adds
a lowering pass to convert 2DMS images to 3D for the compiler. It
is not actually invoked yet.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by:   Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27626>
2024-02-26 19:01:32 +00:00
Pierre-Eric Pelloux-Prayer
a8a4bcec36 wsi/wl: check wsi_wl_surface's validity before use
Fixes: 9a00a360ad ("wsi/wl: flush connection on swapchain failure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27767>
2024-02-26 16:56:27 +00:00
Faith Ekstrand
8ab337047c nvk: Advertise VK_KHR_maintenance5
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9616
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:08 +00:00
Faith Ekstrand
509fdf4fe4 nvk: Use VkPipelineCreateFlags2 flag names
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:08 +00:00
Faith Ekstrand
a72bcc0a26 vulkan/meta: Handle VK_REMAINING_ARRAY_LAYERS in blit and resolve
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:08 +00:00
Faith Ekstrand
8ed3aa7b1a nvk/copy: Handle VK_REMAINING_ARRAY_LAYERS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:08 +00:00
Faith Ekstrand
a120022b02 nvk: Handle missing gl_PointSize in the last geometry stage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:07 +00:00
Faith Ekstrand
4287d04e98 nak: Add writes_point_size to nak_shader_info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:07 +00:00
Faith Ekstrand
828b3c18fb nil: Add PIPE_FORMAT_R5G5B5A1_UNORM
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:07 +00:00
Alyssa Rosenzweig
6825902bb6 treewide: use ralloc_memdup
@@
expression memctx, dst, src, size;
@@

-dst = ralloc_size(memctx, size);
-memcpy(dst, src, size);
+dst = ralloc_memdup(memctx, src, size);

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27762>
2024-02-26 15:37:58 +00:00
Alyssa Rosenzweig
66b00e2966 util/ralloc: add memdup
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27762>
2024-02-26 15:37:58 +00:00
Alyssa Rosenzweig
d964f57a48 util/hash_table: add u64 foreach macro
needs some nontrivial wrapping but can mostly fallback to the regular impl.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27762>
2024-02-26 15:37:58 +00:00
Timur Kristóf
cc1501628f nir: Clean up divergence analysis for TES patch input loads.
Just make the code a little bit easier to follow.

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/27680>
2024-02-26 14:53:23 +00:00
Timur Kristóf
870a2e4197 nir: Cleanup divergence analysis for mesh shaders.
1. Mesh shaders don't have inputs (only task payload),
so remove them from handling load_input.

2. Clarify in comments that loading any mesh shader
output is an NV_mesh_shader only feature.

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/27680>
2024-02-26 14:53:23 +00:00
Timur Kristóf
9553d67373 nir: Fix divergence analysis of load_patch_vertices_in.
load_patch_vertices_in can only occur in tessellation shaders,
and contains the number of vertices in an input patch.

* TCS: patch_vertices_in is equal to the input patch size
* TES: patch_vertices_in is equal to the TCS output patch size

The patch sizes may be set by a pipeline or dynamic states,
however in both cases it is definitely uniform within a subgroup.

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/27680>
2024-02-26 14:53:23 +00:00
Timur Kristóf
537c0029dd nir: Fix divergence of reductions.
By accident, the function would return without setting
the divergence information.

Cc: mesa-stable
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/27680>
2024-02-26 14:53:23 +00:00
Alyssa Rosenzweig
9548cba8ab anv,hasvk: use vk_index_to_restart
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27764>
2024-02-26 14:13:08 +00:00
Alyssa Rosenzweig
9da77e6c97 tu: use vk_index_to_restart
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27764>
2024-02-26 14:13:08 +00:00
Alyssa Rosenzweig
a97966b840 vulkan: add vk_index_type_to_restart helper
from nvk

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27764>
2024-02-26 14:13:07 +00:00
Patrick Lerda
4d00edda00 r300: fix memory leaks when register allocation fails
For instance, this issue is triggered with
"piglit/bin/ext_framebuffer_multisample-accuracy all_samples color depthstencil -auto -fbo":
Direct leak of 1160 byte(s) in 1 object(s) allocated from:
    #0 0x7fbe8897d7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7fbe7e7abfcc in rc_constants_copy ../src/gallium/drivers/r300/compiler/radeon_code.c:47
    #2 0x7fbe7e7ec902 in r3xx_compile_fragment_program ../src/gallium/drivers/r300/compiler/r3xx_fragprog.c:174
    #3 0x7fbe7e7e1b22 in r300_translate_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:516
    #4 0x7fbe7e7e6373 in r300_pick_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:591
    #5 0x7fbe7e75456e in r300_create_fs_state ../src/gallium/drivers/r300/r300_state.c:1073
    #6 0x7fbe7cd2ebe5 in st_create_fp_variant ../src/mesa/state_tracker/st_program.c:1070
    #7 0x7fbe7cd374b5 in st_get_fp_variant ../src/mesa/state_tracker/st_program.c:1116
    #8 0x7fbe7cd38273 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1281
    #9 0x7fbe7cd38273 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1345
    #10 0x7fbe7d798ca8 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:724
    #11 0x7fbe7d798ca8 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:952
    #12 0x7fbe7d6790d5 in link_program ../src/mesa/main/shaderapi.c:1336
    #13 0x7fbe7d6790d5 in link_program_error ../src/mesa/main/shaderapi.c:1447
...
SUMMARY: AddressSanitizer: 2528456 byte(s) leaked in 1057 allocation(s).

Fixes: 54f6e72b27 ("r300: better register allocator for vertex shaders")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27792>
2024-02-26 13:55:53 +00:00
Patrick Lerda
b11ecacb93 r300: fix r300_destroy_context() related memory leaks
For instance, with "piglit/bin/fcc-blit-between-clears -auto -fbo"":
SUMMARY: AddressSanitizer: 70512 byte(s) leaked in 497 allocation(s).

Fixes: e01f86c67b ("r300: set PIPE_BIND_CONSTANT_BUFFER for const_uploader")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27791>
2024-02-26 12:56:30 +01:00
Samuel Pitoiset
4071c399a2 radv: compute the total LDS usage in gfx10_get_ngg_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
d85311b120 radv: compute NGG scratch LDS base in gfx10_get_ngg_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
0570d40d5b radv: determine NGG culling info before NGG info
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
e3863a22bb radv: pass radv_shader_info to gfx10_get_ngg_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
4db0952639 radv: pass gfx10_ngg_info to gfx10_get_ngg_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
beb2e7df68 radv: determine NGG query info before linking shader info
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
64f46c83a3 radv: use so.num_outputs to determine if NGG shaders need XFB queries
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
7f8a84a024 radv: do not set gs.has_pipeline_stat_query twice for NGG GS
It's already initialized in gather_shader_info_gs().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
6c1e82e309 radv: remove unused parameter in gfx10_get_ngg_query_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722>
2024-02-26 10:42:37 +00:00
Lionel Landwerlin
e9169881db anv: add missing generated file dep
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10672
Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27786>
2024-02-26 07:56:50 +00:00
Mike Blumenkrantz
5816b5961f zink: use new flag to determine whether swapchain readback cache is usable
the resource-valid flag isn't ideal for this since it doesn't convey
whether the swapchain cache is up-to-date

this should fix cases where the cache may have been erroneously used when
it hadn't been updated

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
01c9199cb8 zink: only update swapchain readback cache when necessary
this avoids modifying the cache for cases where the acquired image was
never modified

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
8fb83c0935 zink: only update swapchain readback cache on create if necessary
minor optimization

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
417a1986fb zink: set and manage a flag indicating that swapchain readback needs updating
not currently used, but this is more coherent than relying on other flags

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
114a5da790 zink: update swapchain readback cache on create
ensure this can be used immediately

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
7486aaa1c0 zink: make readback attempts count towards ZINK_READBACK_THRESHOLD
readback is readback even if the app is being "smart" (swapchain readback
is never smart)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
d5d5f54fe9 zink: add a swapchain readback case for reading differently-acquired image
if a swapchain is shared between multiple resources, a deadlock and/or invalid
data will result from readback attempts if one resource holds a swapchain
image that the other resource must read from

to avoid this, allow accessing the acquiring resource directly since this is
the only sane way to perform readback

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
ae80f9ce65 zink: make kopper_swapchain_image::acquired the resource that acquired it
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
d2ed77072c zink: flag acquired swapchain image as readback target on acquire, not present
readback should trigger on the current backbuffer, not the most recently
presented buffer. if e.g., a clear is only triggered through glFlush,
this clear should be read back rather than the contents of the last-presented
buffer

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
c3a2e2f9f2 zink: lock buffer age when chundering swapchain for readback
this sequence doesn't count as SwapBuffers calls, so age cannot be modified

Fixes: c123ab2137 ("kopper: Implement {EGL,GLX}_EXT_buffer_age")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
9fa2d9bd50 zink: fix swapchain readback conditional
this check is intended to determine whether the current backbuffer has
data, which correlates to (is_acquired && has_data). here, that corresponds
better to checking for a valid image index && nonzero buffer age

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
50b671c1c3 zink: fix (dynamic rendering) execution of scissored clears during flush
in the case where the renderpass did not change, this would
otherwise have skipped the mask composition for in-rp clears

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
e602035596 zink: clamp in_rp clears to fb size
this was almost sort of clamping except that it wasn't

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
e032e7f6cc zink: don't pre-init null fbfetch info
fbfetch is never used, so this just pointlessly wastes a bunch of
vram

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27684>
2024-02-26 02:07:02 +00:00
Mike Blumenkrantz
5fdbb0868a zink: start out with 256x256 sized dummy surfaces
4096 is huge.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27684>
2024-02-26 02:07:02 +00:00
Mike Blumenkrantz
aaf78eadf3 zink: create/resize dummy surfaces on-demand
4096 was used here as a placeholder because it "always works", but
this ends up wasting a ton of vram

instead, start out more conservatively and create new dummy surfaces
if needed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27684>
2024-02-26 02:07:02 +00:00
Mike Blumenkrantz
1ea64063c8 zink: break out null fbfetch init for descriptor buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27684>
2024-02-26 02:07:02 +00:00
Mike Blumenkrantz
263d262025 zink: also set null fbfetch surfaces when no fb surface is bound
if nullDescriptor is supported, of course

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27684>
2024-02-26 02:07:02 +00:00
Mike Blumenkrantz
f3347a4603 zink: don't pre-init dummy fbfetch surface when missing nullDescriptor feature
this should be handled automatically when updating fbfetch state anyway

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27684>
2024-02-26 02:07:02 +00:00
Mike Blumenkrantz
fe13841a99 zink: move flagging rp_changed in zink_update_fbfetch() to caller
this avoids recursive flagging when starting a renderpass

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27684>
2024-02-26 02:07:01 +00:00
Mike Blumenkrantz
35185ad9df zink: assert that batch_id is valid in zink_screen_check_last_finished()
0 is never a valid batch_id

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27729>
2024-02-26 01:42:23 +00:00
Mike Blumenkrantz
3283415bbd zink: fix longstanding issue with active batch state recycling
the previous code could recycle a currently-submitting state by hitting
a race condition where zink_screen_check_last_finished(batch_id) returned
true because batch_id was 0

this can no longer recycle the current batch, but the race should still be
eliminated for consistency: check 'submitted' since this guarantees batch_id
is valid

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27729>
2024-02-26 01:42:22 +00:00
Mike Blumenkrantz
16103b61e7 zink: only scan active batch states for free states if > 1 exist
trying to recycle the current active batch state is never going to be
productive

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27729>
2024-02-26 01:42:22 +00:00
Sean Anderson
2179a7f4d7 Add Xilinx ZynqMP KMSRO entrypoint
Add support for the Xilinx ZynqMP DPSub display driver, used with the
onboard Mali-400 GPU.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27370>
2024-02-25 22:16:27 +00:00
Faith Ekstrand
4499871e34 nvk: Advertise VK+KHR_incremental_present
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27785>
2024-02-25 14:44:20 -06:00
Faith Ekstrand
b3fd66c889 nvk: Only expose VK_KHR_present_id/wait when we have WSI
Also update docs/features.txt

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27785>
2024-02-25 14:44:20 -06:00
Juan A. Suarez Romero
726ae2570c v3dv/ci: update expected list
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27781>
2024-02-25 18:44:56 +01:00
Sean Anderson
423add61e2 gallium: lima: Don't round height when checking alignment
Height does not affect alignment, so don't modify it. This fixes
failures if the buffer height is not an exact multiple of 16.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27371>
2024-02-24 19:55:27 +00:00
Lionel Landwerlin
642b12baef anv: limit depth flush on dynamic render pass suspend
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27745>
2024-02-24 13:21:09 +00:00
Lionel Landwerlin
abeac8cf96 intel/nir: only consider ray query variables in lowering
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27752>
2024-02-24 12:56:30 +00:00
Caio Oliveira
373130a66c intel/compiler: Remove has_render_target_reads from wm_prog_data
This was used only by the classic i965 driver.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27772>
2024-02-24 02:34:59 +00:00
Caio Oliveira
10230d2eec intel/brw: Assert Gfx9+
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27768>
2024-02-24 02:10:56 +00:00
Caio Oliveira
40437bea86 intel/brw: Remove pass test cases for Gfx8-
And update the mock devinfo versions to be at least Gfx9.

Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27768>
2024-02-24 02:10:56 +00:00
Caio Oliveira
8c3165f0ff intel/brw: Remove EU validation tests for Gfx8-
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27768>
2024-02-24 02:10:56 +00:00
Caio Oliveira
a5b67d4bea intel/brw: Remove EU compaction tests for Gfx8-
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27768>
2024-02-24 02:10:56 +00:00
Caio Oliveira
9bc670509c intel/brw: Remove assembler tests for Gfx8-
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27768>
2024-02-24 02:10:56 +00:00
Caio Oliveira
80de55801e intel/elk: Remove tests for Gfx9+
These are covered in the regular "brw" compiler.

Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27770>
2024-02-24 01:41:31 +00:00
Konrad Dybcio
1f508a5dac freedreno/registers: Add some HWCG regs
A702 sets even more of these.. Follow suit!

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27700>
2024-02-24 01:15:04 +00:00
Rob Clark
e7ee2c8ca5 tu: Give suballoc bo's a name
So they show up in gem debugfs with a more useful label.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27700>
2024-02-24 01:15:04 +00:00
Rob Clark
bcc5ddcc3b freedreno/crashdec: Find potential fault buffers
Denote if a buffer we know about is covering the fault address (kernel
issue), or if the fault address is within the 2 * size range, indicating
that the buffer is potentially the one the GPU read past the end of.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27700>
2024-02-24 01:15:04 +00:00
Caio Oliveira
32db7a9533 intel/elk: Use anonymous namespace in fs_combine_constants
Certain GitLab CI build use a combination of LTO and -Werror=odr that
will fail if both ELK and BRW share the same names for those helpers,
so wrap the ELK ones around anonymous namespace.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:32 +00:00
Caio Oliveira
2bc18fe46f intel-clc: Use correct set of nir_options when building for Gfx8
Use the correct set of nir_options when building for Gfx8.  Note this is
only used in the NIR codepath.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:32 +00:00
Caio Oliveira
c83f92087b intel/elk: Move nir_options to its own c/h file pair
This will allow intel-clc tool to use the ELK nir_options in its NIR
codepath without having to link with the entire ELK compiler.  That way
an Anv only build doesn't need to compile ELK.

Iris uses that codepath for Gfx8.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:32 +00:00
Caio Oliveira
6f83b1dddc intel/tools: Add extra compiler device sha only for Gfx9+
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:32 +00:00
Caio Oliveira
8abfbc9cca intel/meson: Rename libintel_compiler to libintel_compiler_brw
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:32 +00:00
Caio Oliveira
255a411450 intel: Use _brw suffix for genX headers that rely on brw
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:32 +00:00
Caio Oliveira
23e0cff907 intel/tools: Add ELK support for intel_hang_viewer
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:32 +00:00
Caio Oliveira
d641ca5b86 intel/tools: Add ELK support for aubinator_viewer
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:32 +00:00
Caio Oliveira
9d379f08af intel/tools: Add ELK support for intel_hang_replay
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:32 +00:00
Caio Oliveira
c9a6b49b4b intel/tools: Add ELK support for aubinator_error_decode
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:32 +00:00
Caio Oliveira
5338a24fe0 intel/tools: Add ELK support for aubinator
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
9796b56e41 iris: Use ELK compiler for Gfx8
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
4c3b65ccf9 iris: Rename screen->compiler to screen->brw
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
9294afe7fd hasvk: Use ELK compiler
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
4968d1a925 crocus: Use ELK compiler
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
0669210ef4 intel/decoder: Add ELK support
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
80cfc3d712 intel/blorp: Remove Gfx9+ references in elk code
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
0e582f0dfd intel/blorp: Add ELK support
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
f5149e025e intel/blorp: Explicitly include brw_compiler.h header
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
4eb63a0137 intel/blorp: Move brw specific code to a separate file
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
4866649052 intel/elk: Create separate header for opcodes
This allow us to not include elk_eu_defines.h (mostly internal
information) in elk_isa_info.h (that's used by other modules).
This will help when using both brw and elk in Iris later.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
77f52417c5 intel/elk: Don't include elk_eu_defines.h in elk_nir.h
Those definitions are not needed by the drivers (client code), so
reduce the exposure.  This will help when using both brw and elk in
Iris later.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
6648e0ebd3 intel/elk: Rename symbols
Either replace the BRW prefix with ELK or add an extra ELK prefix.  Used
the following sed script to perform the renames in this patch:

```
    # Simple prefix changes.
    s/\<BRW_/ELK_/g
    s/\<brw_/elk_/g
    s/nir_to_brw/nir_to_elk/g
    s/\<as_brw_reg\>/as_elk_reg/g
    s/\<_brw_/_elk_/g

    # Add prefix to various symbols.
    #
    # Initially I've considered using C++ namespaces here, but in various
    # cases the structs or functions had to be also visible from C code.
    # So added explicit prefix instead.
    s/\<backend_instruction/elk_\0/g
    s/\<backend_reg/elk_\0/g
    s/\<backend_shader/elk_\0/g
    s/\<bblock_t\>/elk_\0/g
    s/\<bblock_link\>/elk_\0/g
    s/\<cfg_t\>/elk_\0/g
    s/\<fs_visitor\>/elk_\0/g
    s/\<fs_reg\>/elk_\0/g
    s/\<fs_instruction_scheduler\>/elk_\0/g
    s/\<vec4_instruction_scheduler\>/elk_\0/g
    s/\<instruction_scheduler\>/elk_\0/g
    s/\<schedule_node\>/elk_\0/g
    s/\<schedule_node_child\>/elk_\0/g
    s/\<\([a-z]*_\)\?thread_payload\>/elk_\1thread_payload/g
    s/\<fs_generator\>/elk_\0/g
    s/\<fs_inst\>/elk_\0/g
    s/\<fs_reg_alloc\>/elk_\0/g
    s/\<disasm_info\>/elk_\0/g
    s/\<gfx._math\>/elk_\0/g
    s/\<gfx7_block_read_scratch\>/elk_\0/g
    s/\<gfx6_IF\>/elk_\0/g
    s/\<gfx9_fb_READ\>/elk_\0/g
    s/\<gfx6_resolve_implied_move\>/elk_\0/g

    # Opcodes.
    s/\<opcode op\>/elk_\0/g
    s/\<opcode mov_op\>/elk_\0/g
    s/\<opcode opcode\>/elk_\0/g
    s/enum opcode\>/enum elk_opcode/g
    s/static opcode\>/static elk_opcode/g
    s/\<opcode elk_op/elk_opcode elk_op/g
    s/struct opcode_desc/struct elk_opcode_desc/g
    s/NUM_BRW_OPCODES/NUM_ELK_OPCODES/g
    s/\<.._OPCODE_/ELK_\0/g
    s/\<T.._OPCODE_/ELK_\0/g
    s/\<VEC4_OPCODE_/ELK_\0/g
    s/\<VEC4_...\?_OPCODE_/ELK_\0/g
    s/\<SHADER_OPCODE_/ELK_\0/g

    # Remaining specific cases.
    s/\<wm_prog_data_barycentric_modes\>/elk_\0/g
    s/\<encode_slm_size\>/elk_\0/g
    s/\<intel_calculate_slm_size\>/elk_\0/g
    s/\<gfx6_gather_sampler_wa\>/elk_\0/g
    s/\<is_3src\>/elk_\0/g
    s/\<WA_/ELK_\0/g
    s/\<conditional_modifier\>/elk_\0/g
    s/\<pred_ctrl_align16\>/elk_\0/g
    s/\<shuffle_from_32bit_read\>/elk_\0/g
    s/\<shuffle_src_to_dst\>/elk_\0/g
    s/\<setup_imm_..\?\>/elk_\0/g

    s/\<opt_predicated_break\>/elk_\0/g
    s/\<has_bank_conflict\>/elk_\0/g
    s/\<dead_control_flow_eliminate\>/elk_\0/g

    s/\<disasm_new_inst_group\>/elk_\0/g
    s/\<disasm_initialize\>/elk_\0/g
    s/\<dump_assembly\>/elk_\0/g
    s/\<disasm_insert_error\>/elk_\0/g
    s/\<disasm_annotate\>/elk_\0/g

    s/\<enum lsc_opcode\>/enum elk_lsc_opcode/g
    s/\<lsc_opcode_/elk_lsc_opcode_/g
    s/\<lsc_aop_[a-z_]\+\>/elk_\0/g

    s/\<type_size_vec4\>/elk_\0/g
    s/\<type_size_dvec4\>/elk_\0/g
    s/\<type_size_xvec4\>/elk_\0/g
    s/\<type_size_[a-z4]\+_bytes\>/elk_\0/g

    s/\<gfx12_systolic_depth\>/elk_\0/g
```

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
f677485ad4 intel/elk: Rename C++ namespace
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
ed89a42f7a intel/elk: Update doxygen-like file comments
Not sure if we use them, but updated.

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
783f3d0b4f intel/elk: Rename header guards
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
e6022281f2 intel/elk: Rename files to use elk prefix
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
b02712efc2 intel/elk: Remove DPAS lowering
This is meant for Gfx9+.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
b743ab7acc intel/elk: Remove stages not used in Gfx8-
OpenCL, Mesh and RayTracing stages are not supported, so removing them
and related code.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:31 +00:00
Caio Oliveira
8a57012ff4 intel/elk: Use common code in intel/compiler
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:30 +00:00
Caio Oliveira
dcf29202d4 intel/elk: Remove a bunch of files that don't apply for Gfx8-
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:30 +00:00
Caio Oliveira
06b553f02c intel/elk: Remove compiler specific devinfo hash
This more coarse-grained hash information for compiler (vs. full
devinfo), used only by Iris and Anv, and relevant for more recent
platforms.  Remove it from elk.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:30 +00:00
Caio Oliveira
0083585fc5 intel/elk: Compile ELK library, tests and tools
For now is not linked to any driver.  The tools were renamed to use elk
prefix to avoid conflicting with the brw ones.  The run-test.py script
was also updated due to that change.

Before the new compiler can be linked together with the old (going to be
done for Iris and other tools), the symbol conflicts need to be fixed
first.  This will happen in a later commit.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:30 +00:00
Caio Oliveira
d44462c08d intel/elk: Fork Gfx8- compiler by copying existing code
Based on code from commit c3ceec6cd8.

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
2024-02-24 00:24:30 +00:00
Faith Ekstrand
a9214460ee nvk: Expose a host-visible VRAM type when we have REBAR
We use host maps of VRAM all over the driver on Maxwell+ so we know they
work.  This exposes it to applications for use for data upload.  To
avoid thrashing, we only expose this on systems with properly a
configured PCI controllwer with resizable BAR support.

We already choose whether or not to set the MMAP bit when creating the
BO based on memory type properties so we just need to add the type.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26622>
2024-02-23 16:27:21 -06:00
Faith Ekstrand
f5cb1eed26 nvk: Upload shaders on the CPU when we have ReBAR
Without without resizable BAR, we're limited as to how much VRAM we can
map and we sometimes run out of maps for games with large numbers of
shaders.  We keep using the DMA engine fallback in that case.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26622>
2024-02-23 16:25:49 -06:00
Faith Ekstrand
9ed7f8c54e nvk/heap: Upload shaders on the CPU when we have a map
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26622>
2024-02-23 16:25:49 -06:00
Faith Ekstrand
d4623da9a3 nouveau/winsys: Getch the BAR size from the kernel
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26622>
2024-02-23 16:25:49 -06:00
Faith Ekstrand
85849ed9cb nvk: implement EXT_memory_budget
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27662>
2024-02-23 21:27:13 +00:00
Faith Ekstrand
db2162efa6 nvk: Add an available query to nvk_memory_heap
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27662>
2024-02-23 21:27:13 +00:00
Faith Ekstrand
bbb458be8d nvk: Use 3/4 of total system memory for the VRAM heap
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27662>
2024-02-23 21:27:13 +00:00
Faith Ekstrand
e9bd005c44 nvk: Add a hand-rolled nvk_memory_heap struct
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27662>
2024-02-23 21:27:13 +00:00
Faith Ekstrand
6a8c60d674 nvk: Add a nouveau_ws_device to nvk_physical_device
We don't want to use it for anything because we want VM isolation
per-device but we need the device open for VK_EXT_memory_budget.

Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27662>
2024-02-23 21:27:13 +00:00
Faith Ekstrand
b887c9ba2c nouveau/winsys: Add a vram_used query
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27662>
2024-02-23 21:27:13 +00:00
Faith Ekstrand
6e08a84936 drm-uapi: Sync nouveau_drm.h
From https://cgit.freedesktop.org/drm/

    commit 72fa02fdf83306c52bc1eede28359e3fa32a151a
    Author: Dave Airlie <airlied@redhat.com>
    Date:   Wed Jan 24 14:24:25 2024 +1000

        nouveau: add an ioctl to report vram usage

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27662>
2024-02-23 21:27:12 +00:00
Christian Gmeiner
028080c716 isaspec: encode.py: Include util/log.h
Generated encode functions are making use of mesa_loge(..).

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27714>
2024-02-23 20:29:57 +00:00
Marek Olšák
c9abb7ff6e glthread: generate packed versions of gl*Pointer/Offset calls
The pointer/offset parameter is often NULL or a small number with VBOs.

The idea is:
- If the pointer/offset parameter is NULL/0, use a different cmd structure
  and unmarshal function that doesn't contain the pointer/offset parameter
  to save 8 bytes per call.
- If the cmd structure has a hole and the pointer/offset parameter is
  a small number that fits into the hole, use a different cmd structure
  and unmarshal function that stores the value within the hole using
  a smaller type to save 8 bytes per call.

This implements those ideas. It will continue generating the most optimal
code even if we change the packing of other parameters.

This decreases the size of 1 frame in glthread batches by 21%
in Viewperf2020/Catia1.

Example of generated code for glVertexPointer with and without the pointer
parameter if it's NULL. See the arrows for comments.

/* VertexPointer: marshalled asynchronously */
struct marshal_cmd_VertexPointer
{
   struct marshal_cmd_base cmd_base;
   GLpacked16i size;
   GLenum16 type;
   GLclamped16i stride;
   const GLvoid * pointer;
};
struct marshal_cmd_VertexPointer_packed
{
   struct marshal_cmd_base cmd_base;
   GLpacked16i size;
   GLenum16 type;
   GLclamped16i stride;                                 // <------- no "pointer"
};
uint32_t _mesa_unmarshal_VertexPointer(struct gl_context *ctx, const struct marshal_cmd_VertexPointer *restrict cmd)
{
   GLpacked16i size = cmd->size;
   GLenum16 type = cmd->type;
   GLclamped16i stride = cmd->stride;
   const GLvoid * pointer = cmd->pointer;
   CALL_VertexPointer(ctx->Dispatch.Current, (size, type, stride, pointer));
   return align(sizeof(struct marshal_cmd_VertexPointer), 8) / 8;
}
uint32_t _mesa_unmarshal_VertexPointer_packed(struct gl_context *ctx, const struct marshal_cmd_VertexPointer_packed *restrict cmd)
{
   GLpacked16i size = cmd->size;
   GLenum16 type = cmd->type;
   GLclamped16i stride = cmd->stride;
   const GLvoid * pointer = (const GLvoid *)(uintptr_t)0;       // <------- using NULL
   CALL_VertexPointer(ctx->Dispatch.Current, (size, type, stride, pointer));
   return align(sizeof(struct marshal_cmd_VertexPointer_packed), 8) / 8;
}
static void GLAPIENTRY
_mesa_marshal_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
{
   GET_CURRENT_CONTEXT(ctx);
   if (!pointer) {                              // <------- the condition
      int cmd_size = sizeof(struct marshal_cmd_VertexPointer_packed);
      struct marshal_cmd_VertexPointer_packed *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexPointer_packed, cmd_size);
      cmd->size = size < 0 ? UINT16_MAX : MIN2(size, UINT16_MAX);
      cmd->type = MIN2(type, 0xffff); /* clamped to 0xffff (invalid enum) */
      cmd->stride = CLAMP(stride, INT16_MIN, INT16_MAX);
   } else {
      int cmd_size = sizeof(struct marshal_cmd_VertexPointer);
      struct marshal_cmd_VertexPointer *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexPointer, cmd_size);
      cmd->size = size < 0 ? UINT16_MAX : MIN2(size, UINT16_MAX);
      cmd->type = MIN2(type, 0xffff); /* clamped to 0xffff (invalid enum) */
      cmd->stride = CLAMP(stride, INT16_MIN, INT16_MAX);
      cmd->pointer = pointer;
   }
   _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_POS, MESA_PACK_VFORMAT(type, size, 0, 0, 0), stride, pointer);
}

Example of generated code for glNormalPointer using a smaller type:

/* NormalPointer: marshalled asynchronously */
struct marshal_cmd_NormalPointer
{
   struct marshal_cmd_base cmd_base;
   GLenum16 type;
   GLclamped16i stride;
   const GLvoid * pointer;
};
struct marshal_cmd_NormalPointer_packed
{
   struct marshal_cmd_base cmd_base;
   GLenum16 type;
   GLclamped16i stride;
   GLushort pointer;                                    // <-------- truncated "pointer"
};
uint32_t _mesa_unmarshal_NormalPointer(struct gl_context *ctx, const struct marshal_cmd_NormalPointer *restrict cmd)
{
   GLenum16 type = cmd->type;
   GLclamped16i stride = cmd->stride;
   const GLvoid * pointer = cmd->pointer;
   CALL_NormalPointer(ctx->Dispatch.Current, (type, stride, pointer));
   return align(sizeof(struct marshal_cmd_NormalPointer), 8) / 8;
}
uint32_t _mesa_unmarshal_NormalPointer_packed(struct gl_context *ctx, const struct marshal_cmd_NormalPointer_packed *restrict cmd)
{
   GLenum16 type = cmd->type;
   GLclamped16i stride = cmd->stride;
   const GLvoid * pointer = (const GLvoid *)(uintptr_t)cmd->pointer;  // <-------- upcasting
   CALL_NormalPointer(ctx->Dispatch.Current, (type, stride, pointer));
   return align(sizeof(struct marshal_cmd_NormalPointer_packed), 8) / 8;
}
static void GLAPIENTRY
_mesa_marshal_NormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
{
   GET_CURRENT_CONTEXT(ctx);
   if (((uintptr_t)pointer & 0xffff) == (uintptr_t)pointer) {        // <-------- the condition
      int cmd_size = sizeof(struct marshal_cmd_NormalPointer_packed);
      struct marshal_cmd_NormalPointer_packed *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NormalPointer_packed, cmd_size);
      cmd->type = MIN2(type, 0xffff); /* clamped to 0xffff (invalid enum) */
      cmd->stride = CLAMP(stride, INT16_MIN, INT16_MAX);
      cmd->pointer = (uintptr_t)pointer; /* truncated */             // <-------- the truncation
   } else {
      int cmd_size = sizeof(struct marshal_cmd_NormalPointer);
      struct marshal_cmd_NormalPointer *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NormalPointer, cmd_size);
      cmd->type = MIN2(type, 0xffff); /* clamped to 0xffff (invalid enum) */
      cmd->stride = CLAMP(stride, INT16_MIN, INT16_MAX);
      cmd->pointer = pointer;
   }
   _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_NORMAL, MESA_PACK_VFORMAT(type, 3, 1, 0, 0), stride, pointer);
}

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
24f14f8daa glthread: add a packed version of DrawElementsUserBuf
The reduces the call size by 24 bytes.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
c566df8b39 glthread: add a packed variant of glDrawElements with 16-bit count and indices
This is just to decrease the size of glDrawElements by 8 more bytes.
This packed glDrawElements call occupies only 1 slot in glthread_batch.

This decreases the size of 1 frame in glthread batches by 13%
in Viewperf2020/Catia1.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
5925a864b5 glthread: rewrite glBindBuffer packing
We always reserved space for a doubled glBindBuffer call, occupying
2 slots. Thanks to the removal of cmd_size, we can finally represent
glBindBuffer in only 1 slot, so do that. This saves space if there is
only 1 glBindBuffer call.

The combining of back-to-back BindBuffer calls is preserved by keeping
track of 2 last BindBuffer calls.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
1f9b554839 glthread: use marshal_count instead of count for more functions
Same as the previous commit, just applied to more functions.
This removes safe_mul and checking whether cmd_size is too large
because the size is always small with these functions.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
e8721fefcd glthread: don't check cmd_size for small variable-sized calls
This removes the size checking, syncing, and direct execution if
the variable-sized call is always small. Don't use safe_mul in that case
either. Only calls already using marshal_count are affected. Example:

Before:

static void GLAPIENTRY
_mesa_marshal_PointParameterfv(GLenum pname, const GLfloat *params)
{
   GET_CURRENT_CONTEXT(ctx);
   int params_size = safe_mul(_mesa_point_param_enum_to_count(pname), 1 * sizeof(GLfloat));
   int cmd_size = sizeof(struct marshal_cmd_PointParameterfv) + params_size;
   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
      _mesa_glthread_finish_before(ctx, "PointParameterfv");
      CALL_PointParameterfv(ctx->Dispatch.Current, (pname, params));
      return;
   }
   struct marshal_cmd_PointParameterfv *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PointParameterfv, cmd_size);
   cmd->num_slots = align(cmd_size, 8) / 8;
   cmd->pname = MIN2(pname, 0xffff); /* clamped to 0xffff (invalid enum) */
   char *variable_data = (char *) (cmd + 1);
   memcpy(variable_data, params, params_size);
}

After:

static void GLAPIENTRY
_mesa_marshal_PointParameterfv(GLenum pname, const GLfloat *params)
{
   GET_CURRENT_CONTEXT(ctx);
   int params_size = _mesa_point_param_enum_to_count(pname) * 1 * sizeof(GLfloat);
   int cmd_size = sizeof(struct marshal_cmd_PointParameterfv) + params_size;
   assert(cmd_size >= 0 && cmd_size <= MARSHAL_MAX_CMD_SIZE);
   struct marshal_cmd_PointParameterfv *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PointParameterfv, cmd_size);
   cmd->num_slots = align(cmd_size, 8) / 8;
   cmd->pname = MIN2(pname, 0xffff); /* clamped to 0xffff (invalid enum) */
   char *variable_data = (char *) (cmd + 1);
   memcpy(variable_data, params, params_size);
}

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
798f430777 glthread: deduplicate batch finalization code
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
5d70c21d82 glthread: pack uploaded user vertex buffers and offsets better
glthread_attrib_binding has 2 fields and 4 bytes of padding, which is
arranged in array. This removes the padding by splitting the structure
into 2 arrays, one for each field.

This also fixes the pointer alignment.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
97532db988 glthread: fix multi draws with a negative draw count
This fixes the invalid pointers when draw_count is invalid.
I don't know if it had any adverse affect.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
eda0b9f8d4 glthread: pack glVertexAttribPointer calls better
These parameters can use 8 bits.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
ad34c932cd glapi: pass pointer size to python for glthread from meson
glthread (the python generator) needs to know the pointer size at compile
time to sort structure fields of calls for optimal structure packing based
on the CPU.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
610bc4d115 glthread: remove "if True" from print_marshal_async_code
This only changes indentation. No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
e299473968 glthread: separate marshal code generation into print_marshal_async_code
I added "if True" to make the diff readable.

No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
2d796de157 glthread: separate unmarshal function generation into print_unmarshal_func
No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
dd6b0ea015 gltrhead: merge 3 blocks conditional on marshal_sync in print_async_body
There are 3 blocks next to each other that check marshal_sync. Merge them.

No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
e9819744b3 glthread: precompute fixed_params and variable_params lists
This removes functions get_fixed_params and get_variable_params.

No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
6eef0c60f8 glthread: move global marshal_XML.py functions into class marshal_function
No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
aea16b5ae9 glthread: sort fixed-sized parameters before returning them
No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
ee0d869d66 glapi: fix type names for glthread and handle all types
glthread will compare the whole type string, so the string must not have
trailing spaces.

No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
12754aec1a glthread: rewrite glDrawArrays call packing
Since changing 1 field to 8 bits and the removal of cmd_size, call sizes
have decreased, so we have 4 unused bytes in 2 DrawArrays structures
So far we use:

- DrawArrays
- DrawArraysInstancedBaseInstance
- DrawArraysInstancedBaseInstanceDrawID

Change them to these by either removing 4 more bytes or adding 4 bytes,
so that we don't waste space, which drops the number of used calls by 1:

- DrawArraysInstanced
- DrawArraysInstancedBaseInstanceDrawID

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
5e5d91671e glthread: rewrite glDrawElements call packing
Since changing 2 fields to 8 bits and the removal of cmd_size, call sizes
have decreased by 4 bytes, so we have 4 unused bytes in most DrawElements
structures. So far we have used these calls for all DrawElements variants:

- DrawElementsBaseVertex
- DrawElementsInstanced
- DrawElementsInstancedBaseVertexBaseInstance
- DrawElementsInstancedBaseVertexBaseInstanceDrawID

Change them to these by either removing 4 more bytes or adding 4 bytes,
so that we don't waste space.

- DrawElements
- DrawElementsInstancedBaseVertex
- DrawElementsInstancedBaseInstance
- DrawElementsInstancedBaseVertexBaseInstanceDrawID

This decreases the size of 1 frame in glthread batches by 12%
in Viewperf2020/Catia1.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
99f8f01dfb glthread: pack the index type to 8 bits
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
15bc7e1d62 glthread: pack the primitive type to 8 bits
The maximum valid enum is only 14.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
39edcd695a mesa: deduplicate is_index_type_valid code
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
259a0a9aeb mesa: deduplicate get_index_size_shift code
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
1388be4d39 glthread: pack "size" in Pointer calls as 16 bits
The only legal values are {1, 2, 3, 4, GL_BGRA}.
We need GLpacked16i to be unsigned, not signed, because GL_BGRA is
greater than 0x8000.

This decreases the size of 1 frame by 10% in Viewperf2020/Catia1.
It decreases the size of many Pointer calls by 8 bytes.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
13a8efcb2c glthread: clean up how vertex stride is packed
Use a better type name. Also check the function name more accurately
(no change in behavior).

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
617cdedd35 glthread: remove cmd_size from constant-sized calls
Only variable-sized calls keep cmd_size in their structures, and it's
renamed to num_slots because it's in units of 8-byte elements.

The motivation is to make room for reducing call sizes.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
acfefc1f14 glthread: add no_error variants of glDrawArrays*
The main motivation is that no_error allows us to drop count==0 draws
at the beginning of the marshal function, instead of forwarding them
to the frontend thread. Such draws are plentiful with Viewperf.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
138804fdfc glthread: add no_error variants of glDrawElements*
The main motivation is that no_error allows us to drop count==0 draws
at the beginning of the marshal function, instead of forwarding them
to the frontend thread. Such draws are plentiful with Viewperf.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
c52e1f916a glthread: use _mesa_glthread_fence_call() instead of duplicating that code
no change in behavior

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
47d589e7d4 glthread: re-enable thread scheduling in st/mesa when glthread is disabled
This happens when GL_DEBUG_OUTPUT_SYNCHRONOUS is enabled.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Chris Rankin
c3ceec6cd8 vdpau: Refactor query for video surface formats.
Cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10614
Signed-off-by: Chris Rankin <rankincj@gmail.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27730>
2024-02-23 16:26:27 +00:00
Biju Das
174b715391 gallium: Add Renesas rzg2l-du DRM entry point
RZ/{G2L,G2LC,V2L} SoCs implements an ARM Mali-G31[1]. Add an entry point
for Renesas rzg2l-du DRM vendor, so mesa can be used with it.

[1] https://lore.kernel.org/all/20211208104026.421-3-biju.das.jz@bp.renesas.com/

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27763>
2024-02-23 15:47:56 +00:00
Karol Herbst
d096523af0 rusticl/kernel: make builds private
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:19 +00:00
Karol Herbst
14ccfb41bc rusticl/meson: remove -Aclippy::arc-with-non-send-sync flag
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:19 +00:00
Karol Herbst
ce06bdf916 rusticl/icd: verify all cl classes are Send and Sync
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:19 +00:00
Karol Herbst
e202903007 rusticl/kernel: make it Send and Sync
There are a few APIs which don't have to be thread-safe, but we can
optimize it later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:19 +00:00
Karol Herbst
59cba70751 rusticl/spirv: mark SPIRVBin as Send and Sync
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:19 +00:00
Karol Herbst
17e97a8f06 rusticl/event: make EventSig Send + Sync
The code was effecitvely that already, but now we can have the compiler
actually verify this.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:18 +00:00
Karol Herbst
a97108d3c7 rusticl/memory: make closures Send and Sync
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:18 +00:00
Karol Herbst
aa3b44c02b rusticl/memory: store host_ptr as usize
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:18 +00:00
Karol Herbst
1753b59cfd rusticl/context: complete conversion of SVM pointers to usize
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:18 +00:00
Danylo Piliaiev
ebde7d5e87 tu/a7xx: Write even more magic regs to fix rendering issues on Android
We have to write all the same regs blob is writing or we risk using
stale reg value written by blob.

I went through blob trace again and added all missing magic regs,
I hope for the last time.

This fixes screen corruption for Mobox users and in some cases
for different emulators users. The reg which caused the issue
is HLSQ_UNKNOWN_A9AC.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27721>
2024-02-23 14:19:11 +00:00
Antonio Gomes
38ffdb883d rusticl/device: Verify for PIPE_CAP_CL_GL_SHARING when enabling gl_sharing
I think it's better to keep the other checks (check for dmabuf, uuid,
...) as we can use them to know the features required.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00
Antonio Gomes
d43f9f9c60 radeonsi: Set PIPE_CAP_CL_GL_SHARING to true
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00
Antonio Gomes
6e7d1725a3 iris: Set PIPE_CAP_CL_GL_SHARING to true
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00
Antonio Gomes
12f1a4c311 gallium: Add new PIPE_CAP_CL_GL_SHARING
We have a situation where some drivers have all the required features,
but they are not working with gl_sharing, so we end up advertising it
wrongly. Add this cap to ensure this driver was tested to work with
cl_khr_gl_sharing.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00
Antonio Gomes
50f6478e3d rusticl/gl: Bump mesa_glinterop_device_info to version 4
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00
Antonio Gomes
a7272a6f24 mesa/st: Skip querying PCI values in interop_query_device_info if version >= 4
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00
Oskar Viljasaar
89622f5089 tu: Use common physical device properties infrastructure
Use the same intializing trick as in 27d5543: first we initialize our
properties struct to { false }, then we fill the fields in one by one.
C++ does not allow assigning to an array from an initializer list, so
the properties exposed as an array in the struct are initialized either
one by one, or assigned in a chain.
As the properties are initialized at init time, move tu_get_properties
and tu_get_physical_device_properties_* before tu_physical_device_init,
so get_properties() would be callable by it.

This lets us delegate the physical device property entrypoints to
common runtime code.

Tested with drm-shim, doing a diff on vulkaninfo output. Differing
fields were pipelineCacheUUID, driverInfo and driverUUID, i.e. the
actual properties do not differ.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27723>
2024-02-23 13:03:03 +00:00
Danylo Piliaiev
f4c40fc89c tu: Add workaround for D3D11 games accessing UBO out of bounds
Some D3D11 games rely on out-of-bounds indirect UBO loads to return
real values from underlying bound descriptor. This workaround would
prevent us from lowering indirectly accessed UBOs to consts.

Later DXVK would declare dynamically indexed uniforms with upper
size bound, to make the accesses spec compliant. But for now
we need our own workaround.

Known affected games:
- Dark Souls 3
- Sekiro: Shadows Die Twice
- Final Fantasy Type-0 HD
- Ultrakill
- Dishonored 2

DXVK discussions:
- https://github.com/doitsujin/dxvk/issues/405
- https://github.com/doitsujin/dxvk/issues/3861

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27727>
2024-02-23 12:08:53 +00:00
Michel Dänzer
7a6836611e egl/wayland: Flush after blitting to linear copy
We need to flush after blitting to the linear copy, or the Wayland
compositor may not see the correct linear buffer contents.

v2:
* Keep blitImage call in the same place (Daniel Stone)
* Add second flush for the blit to linear copy

Fixes: 58f90fd03f ("egl/wayland: fix glthread crashes")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9816
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27718>
2024-02-23 08:43:54 +00:00
Faith Ekstrand
f890b515ef nvk: Don't use WAIT_AVAILABLE in nvk_upload_queue_sync
This was a copy+paste error, probably from vk_drm_syncobj.c.  If we do
WAIT_AVAILABLE, it only waits for the dma_fence to exist, not for it to
signal.  Instead, we want WAIT_FOR_SUBMIT.  (Technically, that's not
necessary but it is typical for CPU waits to also wait for the time
point to materialize.)

Fixes: 2074e28a0d ("nvk: Add an upload queue")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27757>
2024-02-23 03:31:57 +00:00
Joshua Ashton
6767ad9c86 meson: Enable d3d12 in gallium_drivers by default on Windows
This is pretty much the only usable one that isn't
swrast for some people, eg. WoA + QCom.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27737>
2024-02-23 02:28:29 +00:00
Joshua Ashton
5a6de45bd5 meson: Enable zink in gallium_drivers by default
Zink is the only way to use hw accelerated GL on
a7xx and the preferred way for hw supporting NVK.

Start building Zink by default everywhere that we
would build swrast by default, except for Mac +
Cygwin + Haiku.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27737>
2024-02-23 02:28:29 +00:00
Karol Herbst
2b9c0e3768 zink: lower unaligned memory accesses
Fixes `vload_half` in OpenCL

Fixes: 0288cb0a0c ("zink: lower vec8/16")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27754>
2024-02-23 00:26:56 +00:00
Benjamin Lee
944ef1771e nvk: disable shaderResourceMinLod on pre-sm70
The hardware's TEX instruction doesn't support this when using indirect
texture access, which we're currently using for everything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27733>
2024-02-22 21:17:17 +00:00
Benjamin Lee
a7166386db nak: fix tex offset encoding on SM50
It should be bit 36, not bit 54. Bit 54 probably came from the direct
variant.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27733>
2024-02-22 21:17:16 +00:00
Benjamin Lee
59d6645c6b nak: fix lod mode encoding for SM50 tld op
The bit flag was backwards, set=ll and cleared=lz. This fixes
dEQP-VK.glsl.texture_functions.texelfetch.* from the CTS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27733>
2024-02-22 21:17:16 +00:00
Charlie Turner
639a9a1c05 amd, radeonsi: Lower minimum supported video dimensions for AV1
For AV1, the hardware supports decoding at 16x16, but for AVC & HEVC,
64 is the minimum.

The following Fluster tests used to check this,

av1-1-b8-01-size-16x16.ivf
av1-1-b8-01-size-32x32.ivf

Signed-off-by: Charlie Turner <cturner@igalia.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27085>
2024-02-22 19:49:28 +00:00
Konstantin Seurer
d95c30b6ec ac/parese_ib: Handle more packets
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27451>
2024-02-22 19:25:39 +00:00
Konstantin Seurer
ebbbca005e ac/parse_ib: Handle 32bit PKT3_DISPATCH_INDIRECT addrs
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27451>
2024-02-22 19:25:39 +00:00
Konstantin Seurer
fea21e5649 ac/parse_ib: Annotate addresses with UAF/OOB info
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27451>
2024-02-22 19:25:39 +00:00
Konstantin Seurer
badd2131b5 ac/parse_ib: Dump the ADDR field of PKT3_SET_BASE
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27451>
2024-02-22 19:25:39 +00:00
Konstantin Seurer
160d18b273 ac/parse_ib: Add and use print_addr
Writes the whole address on one line.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27451>
2024-02-22 19:25:39 +00:00
Mike Blumenkrantz
dfe331930c zink: don't destroy the current batch state on context destroy
these are owned by the screen now

should fix some flakiness with shared contexts

Fixes: b06f6e00fb ("zink: fix heap-use-after-free on batch_state with sub-allocated pipe_resources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27749>
2024-02-22 19:04:09 +00:00
Mark Janes
dd0f6d70ba pan/va: Add missing valhall_enums dep to bifrost_tests
bifrost_tests compilation fails if the valhall_enums.h has not been
generated.

Acked-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27738>
2024-02-22 18:43:37 +00:00
Louis-Francis Ratté-Boulianne
439fce0c17 panfrost: Add AFBC packing support for RG formats
Only a matter of enabling it as packing itself works the same no
matter the number of components.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27471>
2024-02-22 18:23:51 +00:00
Sagar Ghuge
c3244135fa anv: Set timestampValidBits to 64bits
On Xe2+, timestamp register can hold value upto 64-bit.

This change also fixes the timestamp related tests on Xe2 platform.

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/27713>
2024-02-22 17:58:38 +00:00
Samuel Pitoiset
3004923ae3 radv: add support for conditional rendering on the compute queue with DGC
Conditional rendering is annoying to implement on ACE because there is
no predication packet like on GFX. With DGC it's even worse because
ACE is missing the IB2 packet which means it's not possible to predicate
the DGC IB entirely.

The provided solution is to always run the DGC prepare shader if
conditional rendering is enabled in order to generate a cmdbuf which
only contains NOPs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27673>
2024-02-22 17:32:58 +00:00
Samuel Pitoiset
f843027c22 radv: store/reset conditional rendering user info in the helpers
This also correctly initialize predication_op when the hw doesn't
support 32-bit predicate.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27673>
2024-02-22 17:32:58 +00:00
Konstantin Seurer
3fed272da7 ci: Update llvmpipe trace checksums
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27603>
2024-02-22 16:33:49 +00:00
Konstantin Seurer
41b5ff46aa lavapipe: Advertise VK_KHR_shader_maximal_reconvergence
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27603>
2024-02-22 16:33:49 +00:00
Konstantin Seurer
4d7beb22fa gallivm: Consider the initial mask when terminating loops
Partial subgroups can lead to infinite loops otherwise.

cc: mesa-stable

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27603>
2024-02-22 16:33:49 +00:00
Konstantin Seurer
eb3c96d5ed llvmpipe: Use full subgroups when possible
Fixes computeFullSubgroups on lavapipe.

cc: mesa-stable

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27603>
2024-02-22 16:33:48 +00:00
Jose Maria Casanova Crespo
277a5856e2 v3d: Implement GL_ARB_texture_barrier
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27550>
2024-02-22 15:42:30 +00:00
Jose Maria Casanova Crespo
51ccba82ce v3d: Early return if job is not writing the resource
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27550>
2024-02-22 15:42:30 +00:00
Jose Maria Casanova Crespo
6f138819f4 v3d: Only flush jobs that write texture from different job submission.
Avoids flushing jobs that write a texture that is read by a job in the
same job submission.

Now we need to handle the case where a texture is written by the
graphics pipeline and it is read by a compute pipeline.

Before this patch, glTextureBarrier() could be implemented as a NOP in
v3d. So the driver was doing more flushing than needed when
glTextureBarrier was not used.

v2: Use V3D_FLUSH_ALWAYS for resources written by graphics pipeline
    and read by compute insead of V3D_FLUSH_DEFAULT. (Iago Toral)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27550>
2024-02-22 15:42:30 +00:00
Jose Maria Casanova Crespo
7cbb47a86f v3d: Fix indentation at v3d_flush_jobs_writing_resource
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27550>
2024-02-22 15:42:30 +00:00
Pierre-Eric Pelloux-Prayer
c41f6ad764 mesa: deal with vbo_save_vertex_list::modes being NULL
This case was forgotten in the 9aa205668b.

Fixes: 9aa205668b ("mesa: inline {Create,Draw}GalliumVertexState callbacks")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10619
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27695>
2024-02-22 15:01:41 +00:00
Pierre-Eric Pelloux-Prayer
9a00a360ad wsi/wl: flush connection on swapchain failure
wayland-client stores up to MAX_FDS_OUT (28) outgoing fds and
then release them in batch later through close_fds.

While this is not a problem in normal situation, because the
app would also have a reference to the same buffers, this is
an issue when these buffers are released (eg: because the
swapchain creation failed).
In this situation wayland-client owns the last ref to these
buffers and prevent their deletion.

This is an issue with dEQP-VK.wsi.wayland.swapchain.simulate_oom.image_extent
because it creates swapchains in a fast loop with a failing allocator
to fail the swapchain creation.
Without this change, on a 16GB dGPU the test peaks at 95% VRAM / 60% GTT and
completes in 1.5 sec.
With this change, the max usage is 65% VRAM / 10% GTT and  completes it
in 0.3 sec.

Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27592>
2024-02-22 14:32:26 +00:00
Samuel Pitoiset
f9787864e0 radv: remove a TODO about adding mesh/task queries on GFX11
It's implemented and it's passing dEQP-VK.mesh_shader.ext.query.*.
Though, it's not enabled yet because task shader can still randomly
hang on RDNA3.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26304>
2024-02-22 14:12:00 +00:00
Samuel Pitoiset
35e0c88f49 radv: add support for task shader invocations queries on GFX11
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26304>
2024-02-22 14:12:00 +00:00
Samuel Pitoiset
b24e07e9ed radv: add support for mesh primitives queries on GFX11
This is natively supported with new pipeline statistics.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26304>
2024-02-22 14:12:00 +00:00
Samuel Pitoiset
4a6c18f503 radv: only enable emulated mesh/task shader invocations on GFX10.3
This shouldn't be enabled on GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26304>
2024-02-22 14:12:00 +00:00
Jose Maria Casanova Crespo
babb82d81a ci: Adds /usr/local/bin to PATH at piglit-traces.sh
yq and ci-fairy are installed in /usr/local/bin but on
script execution that route is not included by default
for all runners.

Identified on RPI4 runners.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27748>
2024-02-22 13:26:07 +00:00
Samuel Pitoiset
c1418dcb3d radv: re-emit more states when a shader compiled separately is bound
Shader configs are combined and they need to be re-emitted. Doesn't
fix anything known but this was obviously incorrect.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27699>
2024-02-22 13:05:28 +00:00
Samuel Pitoiset
dc42ad4c6a radv: simplify emitting VGT_ESGS_RING_ITEMSIZE for ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27699>
2024-02-22 13:05:28 +00:00
Samuel Pitoiset
78be19fc72 radv: rename radv_emit_shaders() to radv_emit_graphics_shaders()
Also RADV_CMD_DIRTY_SHADERS to ~ADV_CMD_DIRTY_GRAPHICS_SHADERS for
consistency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27699>
2024-02-22 13:05:28 +00:00
Samuel Pitoiset
76ccf71587 radv: simplify binding the GS copy shader with ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27699>
2024-02-22 13:05:28 +00:00
Erik Faye-Lund
3b23e9d89d mesa/main: allow GL_BGRA for FBOs
The EXT_texture_format_BGRA8888 spec clearly defines GL_BGRA as a
color-renderable format, so we need to support it here as well.

This has been broken since the day support for the extension was added.
Oh well, let's fix it up!

Fixes: 1d595c7cd4 ("gles2: Add GL_EXT_texture_format_BGRA8888 support")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27720>
2024-02-22 12:35:17 +00:00
Lionel Landwerlin
fa34241932 intel/ci: bump anv/tgl fraction to 6
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27693>
2024-02-22 08:30:32 +00:00
Lionel Landwerlin
da5a6d185c ci/anv: add more testing for optimization paths
Anv implements optimization paths for large numbers of queries
clears/copies and indirect draws.

We would like to make sure those don't break.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27693>
2024-02-22 08:30:32 +00:00
Samuel Pitoiset
59b0f7b6b7 radv: free NIR shaders when creating linked shaders with ESO
This was leaking memory too.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27715>
2024-02-22 07:48:02 +00:00
Samuel Pitoiset
77f036d574 radv: fix a big memleak with VK_EXT_shader_object
Shaders and binaries weren't freed at all!

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27715>
2024-02-22 07:48:02 +00:00
Samuel Pitoiset
e88a5842b2 radv: remove the union in radv_shader_object
It's actually more annoying to deal with.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27715>
2024-02-22 07:48:02 +00:00
Samuel Pitoiset
9ae8f0f9d7 radv: fix indirect dispatches on compute queue with conditional rendering on GFX7
COND_EXEC needs to happen right before PKT3_DISPATCH_INDIRECT.

Like this combination will probably never happen but better to have
it fixed anyways.

Fixes: 5c03cdbd02 ("radv: fix indirect dispatches on the compute queue on GFX7")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27655>
2024-02-22 07:23:43 +00:00
Samuel Pitoiset
776f4523f9 radv: fix binary shaders compatibility with ESO
RADV needs to assume that all features that affect shaders might be
enabled. Note that disable_trunc_coord is specific to DXVK and
mesh_shader_queries is still disabled by default.

This fixes dEQP-VK.shader_object.binary.device_features.* on GFX10+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27632>
2024-02-22 07:03:04 +00:00
Samuel Pitoiset
f123a04256 radv: introduce a per physical device cache key
This introduces a new level cache key for physical device. The main
motivation is for shader object because the Vulkan spec says:

"Guaranteed compatibility of shader binaries is expressed through a
 combination of the shaderBinaryUUID and shaderBinaryVersion members of
 the VkPhysicalDeviceShaderObjectPropertiesEXT structure queried from a
 physical device. Binary shaders retrieved from a physical device with
 a certain shaderBinaryUUID are guaranteed to be compatible with all
 other physical devices reporting the same shaderBinaryUUID and the
 same or higher shaderBinaryVersion."

Meaning that with ESO, the driver needs to compile shaders for the
worst case with every possible logical device features enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27632>
2024-02-22 07:03:04 +00:00
Samuel Pitoiset
c303d399ff radv: initialize disk cache slightly later when creating a physical device
This will allow us to use a per physical device cache key.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27632>
2024-02-22 07:03:04 +00:00
Samuel Pitoiset
0543394bfa radv: move mesh_fast_launch_2 to radv_physical_device
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27632>
2024-02-22 07:03:04 +00:00
Timothy Arceri
0f0fa64eed glsl: move some lowering to the compiler
Rather than doing this lowering potentially multiple times when a
shader is relinked we can instead do it once in the compiler.

This change also gets us closer to converting to NIR at compile
time.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27690>
2024-02-22 05:26:16 +00:00
Timothy Arceri
82d617e8b1 glsl: fix potential crash in expression flattening
The base_ir variable used by this pass is set via visit_list_elements()
however this pass was skipping visit_list_elements() for the initial
list of instructions i.e. it was skipping it for globals so if we
ended up trying to flatten an expression on a global we would segfault.

To quote the code comment on the base_ir variable:

   "This is implemented by visit_list_elements -- if the visitor is
   not called by it, nothing good will happen"

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27743>
2024-02-22 04:44:44 +00:00
Mike Blumenkrantz
ac45d893d6 zink: handle stencil_fallback in zink_clear_depth_stencil
ctx->blitting will already be set at this point, meaning the flag
should not be modified and no barriers are required

fixes stencil blitting on nvk

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27735>
2024-02-22 02:13:35 +00:00
Iván Briano
e3d4897dfe anv: flush query clears for all gens
Fixes: f733215c12 ("anv: enable query clear/copy using shaders on MTL/ARL")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27741>
2024-02-22 01:45:45 +00:00
Dave Airlie
62f65f4bfd egl/dri2: if zink is preferred from dri3 skip dri2 paths.
This just avoids some error prints.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27739>
2024-02-21 23:39:06 +00:00
Paulo Zanoni
a590a8ef45 anv+zink/ci: remove recently fixed tests from the crash list
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26410>
2024-02-21 22:58:42 +00:00
Paulo Zanoni
2526308dcd anv/sparse: allow binding operations to match the resource size
The resource size doesn't need to match the binding granularity. For
example, if the user wants to create a 32kb buffer, Anv will require
its memory to have 64kb, but the buffer size will still be the
original 32kb. And the spec says:

  VUID-VkSparseMemoryBind-size-01100:
    "size must be less than or equal to the size of the resource minus
     resourceOffset"
  VUID-VkSparseMemoryBind-size-01102:
    "size must be less than or equal to the size of memory minus
     memoryOffset"

So when binding such buffer, size should actually be the lesser of the
two values: 32kb, and we have to accept that. Since our binding
granularity is 64kb, we're safe to simply extend the requested size to
match our binding granularity, since we already require the memory to
be appropriately sized.

None of this is exercised by dEQP. This was caught by
piglit/arb_sparse_buffer-basic using Zink.

Testcase: piglit/arb_sparse_buffer-basic
Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10220
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26410>
2024-02-21 22:58:42 +00:00
Paulo Zanoni
a501a840a3 anv/sparse: add an extra step before anv_sparse_bind_resource_memory()
I need to add some sparse-related checks that require having the
anv_buffer and anv_image, and putting them directly inside
anv_queue_submit_sparse_bind_locked() doesn't feel like the right
thing to do. Here we change the interface so now we have
anv_sparse_bind_buffer() and anv_sparse_bind_image_opaque() as the
main interface into anv_sparse.c, so they both can call the lower
level anv_sparse_bind_resource_memory() function.

In the next patch we'll be adding changing the code of the functions
we just created, justifying their addition.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26410>
2024-02-21 22:58:42 +00:00
Paulo Zanoni
c3aa7e42ba zink: fix bind size handling in buffer_bo_commit()
What we're checking in the assertion we're changing seems to be what
the OpenGL spec describes as:

  "<offset> must be an integer multiple of the implementation
   dependent constant SPARSE_BUFFER_PAGE_SIZE_ARB, and <size> must
   either be a multiple of SPARSE_BUFFER_PAGE_SIZE_ARB, or extend to
   the end of the buffer's data store"

There are two sizes in question here: the size of the VkBuffer and the
size of its corresponding VkDeviceMemory. It looks like
bo->base.base.size corresponds to VkDeviceMemory, while res->obj->size
corresponds to VkBuffer. Here we're really talking about the VkBuffer
size, so fix the assertion.

On Anv, we're hitting this issue because piglit's
arb_sparse_buffer-basic creates a buffer of size 32k and tries to
issue a bind operation with size 32k. The catch here is that Anv
requires the memory to be 64kb, so Zink gets confused and hits the
assertion.

Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10220
Testcase: piglit/arb_sparse_buffer-basic
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26410>
2024-02-21 22:58:42 +00:00
Karol Herbst
83895d4025 intel: Only build shaders with anv and iris
This allows crocus and hasvk to be built without needing any of the OpenCL
stuff.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10634
Fixes: b52e25d3a8 ("anv: rewrite internal shaders using OpenCL")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27663>
2024-02-21 20:53:36 +00:00
Karol Herbst
815a6647eb meson: do not pull in clc for clover
Fixes: 01d0d94319 ("meson: Simplify clc expression")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27663>
2024-02-21 20:53:36 +00:00
Karol Herbst
6474f8c2ce clc: include opencl-c.h for extensions needing it
This also allows tools build on clc to drop their workaround to include
it themselves. Rusticl might need it once it supports extensions which
need this file pulled in.

Later if the need to include it changes based on llvm version, we can
easily handle this in clc.

The main reason to include it only conditionally is the massively
reduction in compilation time. It also removes the mental burden from
users of clc to deal with any of this themselves.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10633
Fixes: 37a1346347 ("meson: remove opencl-external-clang-headers option and rely on shared-llvm")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
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/27663>
2024-02-21 20:53:36 +00:00
Marek Olšák
11dbdedf46 st/mesa: optimize st_update_arrays using lots of C++ template variants
This adds the following template options:
- add an option to fill TC set_vertex_buffers from st_update_array directly
  (always true without u_vbuf, so always used with radeonsi)
- add an option saying that there are no zero-stride attribs
- add an option saying that there are no user buffers
  (always true with glthread, so always used with radeonsi)
- add an option saying that there is an identity mapping between vertex
  buffers and vertex attribs

I have specifically chosen those options because they improve performance.
I also had other options that didn't, like unrolling the setup_arrays loop.

This adds a total of 42 variants of st_update_array_templ for various cases.
Usually only a few of them are used in practice.

Overhead of st_prepare_draw in VP2020/Catia:
    Before: 8.5% of CPU used
    After: 6.13% of CPU used

That's 2.37% improvement. Since there are 4 threads using the CPU and
the percentage includes all threads in the system, the improvement for
the GL thread is about 8% (roughly 2.17% * 4; each thread at 25% of global
utilization means 100% utilization in 4 cores).

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27731>
2024-02-21 18:36:44 +00:00
Marek Olšák
045b1cda57 st/mesa: add VAO fast path C++ template variants for st_update_array callback
This way we execute 1 half of setup_arrays with the fast path enabled,
and the other half with the fast path disabled, so it's not that much
of code duplication, and it will facilitate further optimizations.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27731>
2024-02-21 18:36:44 +00:00
Marek Olšák
7a5ddd29c2 mesa: don't use the slow VAO path except for drivers that want to use it
The fast path is the only focus of optimizations, so let's stop using
the slow one if the fast path is allowed. Only display lists with drivers
lacking draw_vertex_state use it, and drivers not exposing
PIPE_CAP_ALLOW_DYNAMIC_VAO_FASTPATH use it.

This changes gl_constants::AllowDynamicVAOFastPath to UseVAOFastPath
because it's no longer turned on/off dynamically, but only one of them
is always used per VAO. It also removes the IsDynamic and NumUpdates
fields of VAOs.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27731>
2024-02-21 18:36:44 +00:00
Marek Olšák
f8cd9604f9 d3d12: make DrawTransformFeedback not depend on the vertex buffer offset
Suggested by Jesse Natalie to fix an issue where this worked with
buffer_offset == 0 and src_offset != 0, but not the other way around.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27731>
2024-02-21 18:36:44 +00:00
José Roberto de Souza
341d0fcbf6 intel/tools/error_decode: Detect and split error dump file parsing by KMD
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27728>
2024-02-21 18:10:54 +00:00
José Roberto de Souza
1b07bb12d3 intel/tools/error_decode: Add support to search for Xe KMD error dumps
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27728>
2024-02-21 18:10:54 +00:00
José Roberto de Souza
77484ab6cf intel/tools/error_decode: Simply error message handling
In the code path without arguments it tries 3 different paths and error
messages are overwritten one by other, in this case any of those
error messages are irrelevant.

For the code path with arguments is similar, as it already have a
fprintf(stderr) in the caller of open_error_state_file().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27728>
2024-02-21 18:10:54 +00:00
José Roberto de Souza
70e2384f8f intel/tools/error_decode: Add function to try to open error dump file
Just to simply a bit open_error_state_file().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27728>
2024-02-21 18:10:54 +00:00
José Roberto de Souza
7cd677c491 intel/common: Remove more i915_drm.h includes from common code
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27728>
2024-02-21 18:10:54 +00:00
José Roberto de Souza
1b61786ac7 intel: Move intel_define.h to i915/intel_define.h
This file defines i915 context priorities, all users in Iris and ANV
have moved to i915 specific files, so the only remaining for this file
is move it to i915 folder so it do not gets included in common code
by mistake.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27728>
2024-02-21 18:10:54 +00:00
José Roberto de Souza
a862b34b28 iris: Remove more i915_drm.h includes from common code
Iris now has just one i915_drm.h include in the common code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27728>
2024-02-21 18:10:54 +00:00
José Roberto de Souza
b48311adce iris: Move i915 set and get tiling uAPI calls to i915 specific code
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27728>
2024-02-21 18:10:54 +00:00
José Roberto de Souza
c15ae2532d iris: Remove iris_bo::kflags
This field was being set with i915 specific flags, replacing it
by a capture boolean we can have the same behavior with less
i915_drm.h usage in the common code.

This also allow us to implement VM capture in Xe KMD.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27728>
2024-02-21 18:10:54 +00:00
José Roberto de Souza
af22779438 iris: Set (EXEC_OBJECT_SUPPORTS_48B_ADDRESS | EXEC_OBJECT_PINNED) in a single place
(EXEC_OBJECT_SUPPORTS_48B_ADDRESS | EXEC_OBJECT_PINNED) is set in every
place that setups a iris_bo, so here moving it to a single and i915
specific place.

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/27728>
2024-02-21 18:10:54 +00:00
Matt Turner
9f32e1a489 anv/drirc: Add option to control implicit sync on external BOs
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10546
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27704>
2024-02-21 17:19:26 +00:00
Caio Oliveira
cfc8cf198c intel/meson: Fix warning about broken str.format
Meson complains:

../src/intel/decoder/meson.build:67: DEPRECATION: Project uses feature that was always broken, and is now deprecated since '1.3.0': str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof..

So instead of trying to format a file, change gentest_xml to store just
the string.  Need to adapt genxml_path to consider the current source
dir, but everything else works like before.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27706>
2024-02-21 17:02:04 +00:00
Caio Oliveira
8f38757067 intel/meson: Remove usage of meson.source_root and meson.build_root
Both are deprecated and the alternatives are already being used in
the project, so start using those here too:

```
../src/intel/shaders/meson.build:64: WARNING: Project targets '>= 1.1.0' but uses feature deprecated since '0.56.0': meson.source_root. use meson.project_source_root() or meson.global_source_root() instead.
../src/intel/shaders/meson.build:65: WARNING: Project targets '>= 1.1.0' but uses feature deprecated since '0.56.0': meson.build_root. use meson.project_build_root() or meson.global_build_root() instead.
```

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27706>
2024-02-21 17:02:04 +00:00
Marek Olšák
a3d7c71ac2 mesa: replace _mesa_HashTable::ht with util_sparse_array for faster lookups
This reduces the overhead of _mesa_HashLookupLocked by 19% according to
sysprof, which could be inaccurate.

While this commit inlines _mesa_HashLookupLocked for a better gain,
the testing was done without inlining to make it fair.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27494>
2024-02-21 16:04:51 +00:00
Marek Olšák
bccc983012 mesa: use util_idalloc_foreach for looping in _mesa_HashTable
We'll have to do this when we switch to util_sparse_array, so do it
now just to test this.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27494>
2024-02-21 16:04:51 +00:00
Marek Olšák
19111ea8e6 mesa: remove isGenName parameter from _mesa_HashInsert
Make it behave like it's always true.

There is no disadvantage in keeping it always true, but when it's
incorrectly false, things break.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27494>
2024-02-21 16:04:51 +00:00
Marek Olšák
1acfc0fc8e mesa: declare _mesa_HashTable inside structures instead of as a pointer
This removes the pointer indirection every time we access the hash table.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27494>
2024-02-21 16:04:51 +00:00
Marek Olšák
da0761f333 mesa: declare _mesa_HashTable::id_alloc as non-pointer
split from "mesa: enable GL names reuse for _mesa_HashTable, remove the alternative"

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27494>
2024-02-21 16:04:51 +00:00
Marek Olšák
0589dfe4e2 util/idalloc: optimize foreach by tracking the greatest non-zero element
also add util_idalloc_foreach_no_zero_safe.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27494>
2024-02-21 16:04:51 +00:00
Chris Rankin
e1e84b0721 vdpau: Declare texture object as immutable using helper function.
Cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10618
Signed-off-by: Chris Rankin <rankincj@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27681>
2024-02-21 14:54:48 +00:00
Rhys Perry
d0595e4805 aco/ra: fix GFX9- writelane
061b8bfd29 moved handling of fixed operands earlier, but it should have
moved the fixing of writelane operands earlier too.

This fixes Crucible's func.uniform-subgroup.exclusive.imin64 on GFX8.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 061b8bfd29 ("aco/ra: rework fixed operands")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27583>
2024-02-21 12:40:14 +00:00
Rhys Perry
53800191a3 aco/ra: don't initialize assigned in initializer list
According to Valgrind, vcc/m0 are uninitialized and this fixes it.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27583>
2024-02-21 12:40:14 +00:00
Mike Blumenkrantz
30b7771aa9 ci: make clang-format job warn on failure instead of killing the pipeline
it's insane to fail a pipeline over formatting errors.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27702>
2024-02-21 12:04:08 +00:00
Lionel Landwerlin
137b7e874f anv: disable Wa_16013994831
We've implemented another workaround completely disabling high
priority preemption.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e6e320fc79 ("anv: make Wa_16013994831 to use intel_needs_workaround")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27716>
2024-02-21 11:39:50 +00:00
Samuel Pitoiset
78ea304a06 spirv: only consider IO variables when adjusting patch locations for TES
With TES, the primitive ID is an input variable but it's considered a
sysval by SPIRV->NIR. Though, its value is greater than
VARYING_SLOT_VAR0 which means its location was adjusted by mistake.

This fixes compiling a tessellation evaluation shader in debug build
with Enshrouded.

Fixes: dfbc03fa88 ("spirv: Fix locations for per-patch varyings")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27413>
2024-02-21 10:36:07 +00:00
Kenneth Graunke
c12300844d intel/fs: Don't rely on CSE for VARYING_PULL_CONSTANT_LOAD
In the past, we didn't have a good solution for combining scalar loads
with a variable index plus a constant offset.  To handle that, we took
our load offset and rounded it down to the nearest vec4, loaded an
entire vec4, and trusted in the backend CSE pass to detect loads from
the same address and remove redundant ones.

These days, nir_opt_load_store_vectorize() does a good job of taking
those scalar loads and combining them into vector loads for us, so we
no longer need to do this trick.  In fact, it can be better not to:
our offset need only be 4 byte (scalar) aligned, but we were making it
16 byte (vec4) aligned.  So if you wanted to load an unaligned vec2,
we might actually load two vec4's (___X | Y___) instead of doing a
single load at the starting offset.

This should also reduce the work the backend CSE pass has to do,
since we just emit a single VARYING_PULL_CONSTANT_LOAD instead of 4.

shader-db results on Alchemist:
- No changes in SEND count or spills/fills
- Instructions: helped 95, hurt 100, +/- 1-3 instructions
- Cycles: helped 3411 hurt 1868, -0.01% (-0.28% in affected)
- SIMD32: gained 5, lost 3

fossil-db results on Alchemist:
- Instrs: 161381427 -> 161384130 (+0.00%); split: -0.00%, +0.00%
- Cycles: 14258305873 -> 14145884365 (-0.79%); split: -0.95%, +0.16%
- SIMD32: Gained 42, lost 26

- Totals from 56285 (8.63% of 652236) affected shaders:
- Instrs: 13318308 -> 13321011 (+0.02%); split: -0.01%, +0.03%
- Cycles: 7464985282 -> 7352563774 (-1.51%); split: -1.82%, +0.31%

From this we can see that we aren't doing more loads than before
and the change is pretty inconsequential, but it requires less
optimizing to produce similar results.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27568>
2024-02-20 23:16:27 -08:00
Iago Toral Quiroga
1880e7cfed v3d,v3dv: fix BO allocation for shared vars
We need to allocate "shared size" bytes for each workgroup but
we were incorrectly multiplying by the number of workgroups in
each supergroup instead, which would typically cause us to allocate
less memory than actually required.

The reason this issue was not visible until now is that the kernel
driver is using a large page alignment on all BO allocations and
this causes us to "waste" a lot of memory after each allocation.
Incidentally, this wasted memory ensured that out of bounds
accesses would not cause issues since they would typically land
in unused memory regions in between aligned allocations, however,
experimenting with reduced memory aligments raised the issue,
which manifested with the UE4 Shooter demo as a GPU hang caused
by corrupted state from out of bounds memory writes to CS
shared memory.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27675>
2024-02-21 06:17:55 +00:00
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
Samuel Pitoiset
2deaf632e2 radv: use radv_shader_info for computing NGG LDS layout
This should be similar.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
21577bfacb radv: store the number of outputs for VS/TES as NGG
To compute NGG info without relying on NIR.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
5e1da1d10f radv: determine the number of invocations only for VS/TES as NGG
To make it clear that this doesn't depend on GS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
12b5c3f00e radv: set radv_vgt_shader_key::ngg_streamout for ESO
Not used yet, but will be needed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
9f660d8c72 radv: prefix radv_vgt_shader_key::streamout with ngg
This is only for NGG streamout (GFX11).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
b98a7abcd6 radv: determine the ES stage for merged NGG shaders compiled separately
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
eea75777be radv: pass the ES stage when emitting geometry shader with ESO
Not used yet, but will be needed for NGG support.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Karol Herbst
9dcc20bccc meson/rusticl: import rust instead of unstable-rust
The rust module has been stabilized since meson 1.0 and we require 1.3.1

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10627
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27679>
2024-02-19 15:44:59 +00:00
Mike Blumenkrantz
fba34ae5f5 zink: add a750 baseline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27683>
2024-02-19 15:27:48 +00:00
Corentin Noël
dd6decfaba zink: do not use undefined stage mask if on missing KHR_synchronization2
VK_PIPELINE_STAGE_NONE can only be set as dstStageMask if KHR_synchronization2
is defined.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27682>
2024-02-19 15:04:04 +00:00
Corentin Noël
7cafe65ea1 zink: use symbolic values instead of 0
Just make it easier to remember which parameter is accepting which type.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27682>
2024-02-19 15:04:04 +00:00
Patrick Lerda
3b90c46bdf r300: fix vertex_buffer related refcnt imbalance
Indeed, vertex_buffer was not properly freed.

For instance, this issue is triggered with:
"piglit/bin/fcc-read-after-clear blit rb -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: 8a963d122d ("r300g/swtcl: don't do stuff which is only for HWTCL")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27678>
2024-02-19 14:48:18 +00:00
Mike Blumenkrantz
fb97141131 zink: always enable glsl_correct_derivatives_after_discard
this matches radeonsi behavior and eliminates the driconf handling

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27489>
2024-02-19 14:26:49 +00:00
Lionel Landwerlin
63676ed502 anv: fix Wa_16013994831 macros
The commit that switched to the WA framework forgot to update one of
the ifdef section.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e6e320fc79 ("anv: make Wa_16013994831 to use intel_needs_workaround")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27676>
2024-02-19 12:48:33 +00:00
Lionel Landwerlin
682c23aa06 anv: remove unused definition
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
Lionel Landwerlin
27a7c5447d anv: reenable ANV_ALWAYS_BINDLESS
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
Lionel Landwerlin
dbee85713f anv: factor out descriptor buffer flushing
Take the opportunity to fix the flush of the descriptor buffer surface
when needed. Previously we would only flush it if the shader used one
of the push descriptor.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
Lionel Landwerlin
cf193af762 anv: fixup push descriptor shader analysis
There are a couple mistakes here :

   - using a bitfield as an index to generate a bitfield...

   - in anv_nir_push_desc_ubo_fully_promoted(), confusing binding
     table access of the descriptor buffer with actual descriptors

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ff91c5ca42 ("anv: add analysis for push descriptor uses and store it in shader cache")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
Joshua Ashton
735fe243a7 android: Use system = 'android' in crossfile
Fixes the following libarchive error when building with the libarchive wrap subproject:

In file included from ../subprojects/libarchive-3.7.2/libarchive/archive_write_open_memory.c:33:
../subprojects/libarchive-3.7.2/libarchive/archive.h:101:10: fatal error: 'android_lf.h' file not found

This also removes the version suffixes from the .so's that are referenced
in the mesa3d_cross.mk file as those are not present on the Android target.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27648>
2024-02-19 08:42:26 +00:00
Samuel Pitoiset
10b8e52780 radv: disable conditional rendering if enabled when preprocessing DGC
vkCmdPreprocessGeneratedCommandsNV() shouldn't be affected by
conditional rendering. Confirmed with Ricardo after writing some
tests against NVIDIA.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27658>
2024-02-19 08:07:41 +01:00
Samuel Pitoiset
5b0e4dd6e8 radv: stop using conditional rendering internally when preprocessing DGC
Preprocess and execute can be executed on different queue families. If
preprocess is executed on GFX and the indirect count optimization is
enabled, this will generate an empty cmdbuf. Expect GPU hangs if this
DGC IB is then executed on ACE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27658>
2024-02-19 08:05:13 +01:00
Mike Blumenkrantz
893780b362 mesa: check driver format support for certain GetInternalformativ queries
according to spec, these should return NONE if the format is
not supported for a given texture target, but mesa was incorrectly
returning a hardcoded value for all cases without checking the driver

instead, check whether the driver can create a texture for a given
format to correctly handle this non-support case

cc: mesa-stable

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27621>
2024-02-17 16:27:20 +00:00
Bas Nieuwenhuizen
c7b2ac3377 radv: Remove ray_launch_size_addr_amd system value.
Not used anymore, so clean it up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27664>
2024-02-17 11:08:16 +00:00
Marek Olšák
f933536517 winsys/amdgpu: enable unlimited number of parallel queues for VCN
This fixes a VCN performance regression introduced by the new BO fence
tracking mechanism.

VCN can have many queues. The current BO fence tracking mechanism only
supports 1 queue per IP, and there is an interest to use all VCN queues via
VAAPI. This introduces an alternative BO fence tracking mechanism that is
only enabled for VCN, supports unlimited parallel queues, is similar to
the previous system, can co-exist with the current queue system, and has no
negative impact on CPU overhead as long as it's only used by VCN.

Since we want an unlimited number of queues, we can't generate our own
sequence numbers for those queues. Instead, each buffer will have a new
field "alt_fence", which means an alternative fence. This fence is the last
use of that buffer on any VCN queue. If any other queue wants to use that
buffer, it has to insert alt_fence as a dependency, and replace alt_fence
with the new submitted fence, so that it's always equal to the last use.

Only VCN uses and updates alt_fence when an IB is submitted. Other IPs only
use alt_fence as a fence dependency. alt_fence is NULL when VCN isn't used,
so there is no negative impact on CPU overhead in that case.

It uses a C++ template for amdgpu_cs_submit_ib due to different BO loop
bodies between normal queues and VCN. Those loop bodies execute for every
BO, so they shouldn't have extra code for alt_fence if the queue doesn't
update it.

Acked-and-Tested-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27627>
2024-02-17 03:06:32 +00:00
Marek Olšák
3e118c6d2f winsys/amdgpu: convert amdgpu_cs.c to .cpp
it will use a C++ template

Acked-and-Tested-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27627>
2024-02-17 03:06:32 +00:00
José Roberto de Souza
7475b105d2 docs/anv: Add recommended GuC firmware version
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-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/27657>
2024-02-17 01:34:27 +00:00
Yiwei Zhang
0ec231cb51 venus: simplify feedback types tracking during submission
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Yiwei Zhang
c320203f4c venus: misc cleanups for queue submission
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Yiwei Zhang
7a6979f937 venus: use vn_cached_storage for vn_queue_submission allocs
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Yiwei Zhang
1e122861da venus: refactor to add vn_cached_storage
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Yiwei Zhang
0973590579 venus: rewrite fence feedback interception to minimize batches
Previously we always put fence feedback cmd in a new batch appended,
which ends up with a separate execbuf for most drivers. This change
updates to avoid that separate eb except for empty submission with just
a feedback fence.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Yiwei Zhang
55224006b7 venus: fix the cmd stride used for qfb recording
Not a real issue since the dispatchable handle size is the same.

Fixes: d2a626787e ("venus: track/recycle appended query feedback cmds")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Echo J
017818a8bf nvk: Implement the VR-related display extensions
xrgears in Monado direct mode seems to work (I haven't tried running
CTS tests though)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27654>
2024-02-16 22:58:58 +00:00
Caio Oliveira
5feb326d80 intel/isl: Include compiler generic header
Instead of including a brw-specific one.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27644>
2024-02-16 22:35:05 +00:00
Caio Oliveira
ae50ac46d1 intel: Remove brw_ prefix from process debug function
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27644>
2024-02-16 22:35:05 +00:00
Caio Oliveira
c773898f39 intel/compiler: Rename brw_gfx_ver_enum.h to intel_gfx_ver_enum.h
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27644>
2024-02-16 22:35:05 +00:00
Caio Oliveira
d8f9a05f32 intel/compiler: Rename the passes and files related to intel_nir.h
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27644>
2024-02-16 22:35:05 +00:00
Caio Oliveira
dc76cfc781 intel/compiler: Collect NIR-only passes in intel_nir.h
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27644>
2024-02-16 22:35:05 +00:00
Sagar Ghuge
24db040a49 anv: Drop warnings for engine initialization failure
We don't have to spit out warnings for the end users. For compute if we
fail to initialize, we are falling back to render for compute operation,

Anyway end-user applications can query what the engines/queues are
supported based on that they can choose to use a specific queue.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27660>
2024-02-16 20:48:17 +00:00
Dylan Baker
876db91350 meson: rework intel-rt option to be a feature
This allows intel-rt to be turned on in cases where we're on x86_64 and
we're building anv, but otherwise default to off, while still giving
users the power to ignore those defaults if they want to.

Because of the use of `feature.disable_if` this bumps the Meson
requirement to 1.1. I can get rid of that, but it just makes for a lot
more code than using the helper methods

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27645>
2024-02-16 18:28:58 +00:00
Dylan Baker
6a126b75e0 meson: drop intel-cl deprecation of 'false'
It maps to `disabled`, which isn't actually an option.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27645>
2024-02-16 18:28:58 +00:00
Faith Ekstrand
19cd3bb721 nvk: Implement VK_EXT_map_memory_placed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27599>
2024-02-16 17:31:04 +00:00
Faith Ekstrand
4092685057 nouveau/winsys: Add a fixed_addr to nouveau_ws_bo_map
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27599>
2024-02-16 17:31:04 +00:00
Faith Ekstrand
be9685e4e7 nvk: Use nouveau_ws_bo_new_mapped() for descriptors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27599>
2024-02-16 17:31:04 +00:00
Faith Ekstrand
08d13a55e4 vulkan: Update XML and headers to 1.3.278
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27599>
2024-02-16 17:31:04 +00:00
Chia-I Wu
ec5d0ffb04 radv: fix pipeline stats mask
Left-shifting by 11*8 or 14*8 is undefined.  This fixes many
dEQP-VK.query_pool.statistics_query.* failures (but not pre-existing
flakes) for release builds using clang.

Fixes: 48aabaf225 ("radv: do not harcode the pipeline stats mask for query resolves")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27651>
2024-02-16 17:04:30 +00:00
Caio Oliveira
805d45e916 intel/decoder: Move decoder to a separate module
Depends on both intel/common and intel/compiler.  Breaks circular
dependency between these two modules.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27647>
2024-02-16 16:37:31 +00:00
Samuel Pitoiset
7009f00ae0 radv: re-enable GS_FAST_LAUNCH=2 by default on GFX11
The performance issue is fixed. This adds RADV_DEBUG=nogsfastlaunch2
to disable it in case users still report issues with it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27636>
2024-02-16 15:58:31 +00:00
Samuel Pitoiset
3713f27260 radv: only configure {XYZ_DIM,DRAW_INDEX}_REG for mesh shaders if enabled
This seems to be the root cause of the huge performance issue with
GS_FAST_LAUNCH=2 on RDNA3 dGPUs. Probably a firmware bug, but on dGPUs
only, because on RDNA3 APUs this is just working...

With that GS_FAST_LAUNCH=2 can be re-enabled by default on GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27636>
2024-02-16 15:58:31 +00:00
Boyuan Zhang
0db2d13af1 radeonsi/vcn: only use multi slices reflist when available
Some frontends interface doesn't provide ref pic lists for HEVC. Therefore
ONLY enabling multislices reflist for frontends that support direct ref pic
list by checking the flag.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10599
Cc: mesa-stable

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27642>
2024-02-16 14:34:09 +00:00
Martin Roukala (né Peres)
dce2069054 radv/ci: switch vkcts-polaris10 from mupuf to KWS' farm
The DUT that currently hosts the Polaris10 will be used for NVK
testing, so let's move the polaris10 job to another farm.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27652>
2024-02-16 14:08:33 +00:00
José Roberto de Souza
19439624d9 anv: Use DRM_XE_VM_BIND_OP_UNMAP_ALL to unbind whole bos
For non-sparse usage there is no difference between
DRM_XE_VM_BIND_OP_UNMAP_ALL and DRM_XE_VM_BIND_OP_UNMAP but for sparse
the same bo can be bound to more than one virtual address.

Then in a case like:
img = vkCreateImage()
mem = vkAllocateMemory()
vkQueueBindSparse(img, mem)
vkFreeMemory(mem)

Note that the sparse VMA bind still points to the closed bo(done in
vkFreeMemory()), but with DRM_XE_VM_BIND_OP_UNMAP_ALL all VMAs
over the bos are removed.

Access to a unbound VMA has a defined behavior(page fault) while
access to a bound VMA without backing gem/bo don't have defined
behavior.

Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27601>
2024-02-16 13:43:45 +00:00
Eric Engestrom
3acb00290d ci_run_n_monitor: allow detached heads as well
When running on a detached head (eg. checkout of a tag or a specific
commit), there is no active branch, so we can't perform this check; just
skip it and assume the user knows what they're doing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27578>
2024-02-16 11:39:50 +00:00
Eric Engestrom
ef744fa589 ci_run_n_monitor: explain why/when there might be no tracked remote
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27578>
2024-02-16 11:39:50 +00:00
Karol Herbst
a4f77ce2d4 rusticl/program: fix CL_PROGRAM_BINARIES for devs with no builds
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10611
Fixes: e028baa177 ("rusticl/program: implement clCreateProgramWithBinary")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27633>
2024-02-16 10:08:17 +00:00
Samuel Pitoiset
6894692d27 radv: enable GS_FAST_LAUNCH=2 by default for RDNA3 APUs (Phoenix)
GS_FAST_LAUNCH=1 shouldn't be used on GFX11 but it's still needed for
dGPUs (eg. NAVI31) because it destroys performance for unknown reasons.

On RDNA3 APUs, GS_FAST_LAUNCH=2 seems to be required for working
mesh shaders and performance is fine. There is possibly a firmware bug
on APUs that would explain why GS_FAST_LAUNCH=1 doesn't work on Phoenix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10583
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10397
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27618>
2024-02-16 07:32:18 +00:00
Samuel Pitoiset
0c2213cbbd radv: fix setting the rasterized primitive for ESO
This was missing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:36 +00:00
Samuel Pitoiset
b199aa1bda radv: fix selecting shader variants with ESO
The shader BO for variants (like as LS) wasn't added to the BO list.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:36 +00:00
Samuel Pitoiset
a47de04ff3 radv: make sure to reset the GS copy shader with ESO
It should be NULL when not used. This is also slightly more optimal
than doing it in the loop.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:36 +00:00
Samuel Pitoiset
b1d4a7a95e radv: fix re-emitting DB_RENDER_CONTROL when resetting gfx pipeline state
This is only used by internal operations but the state wasn't
re-emitted.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:36 +00:00
Samuel Pitoiset
64e18b04d9 radv: clear the custom blend mode when resetting gfx pipeline state
This custom blend mode is only used by internal operations and they
don't use shader objects.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:35 +00:00
Samuel Pitoiset
b0a31a62e4 radv: clear RADV_CMD_DIRTY_SHADERS when resetting the shader object state
Binding a pipeline resets the shader object state and it's more optimal
to clear this flag here.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:35 +00:00
Mike Blumenkrantz
5e813a15f8 zink: update vvl expectations
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mike Blumenkrantz
c163a38a8e ci: bump VVL to snapshot-2024wk06
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mike Blumenkrantz
7c1916b98f zink: add a ci skip
avoids having to add vvl exceptions for the rest of the run

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mike Blumenkrantz
4c08db5501 zink: don't add VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT for sparse textures
according to VUID-VkImageCreateInfo-flags-09403, this is illegal

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mike Blumenkrantz
e8ce53a33d zink: promote gpl libs freeing during shader destroy out of prog loop
now that zink_gfx_lib_cache::stages_present exists (and is correct),
this value can be used directly to effect cache eviction instead of depending
on the prog->stages_present value, which may not even be the same prog that
owns a given zink_gfx_lib_cache instance

this fixes the case where a shader used in multiple progs with differing shader
masks would never have all its gpl pipelines freed

fixes leaks with caselist:
KHR-Single-GL46.arrays_of_arrays_gl.InteractionUniformBuffers1
KHR-Single-GL46.subgroups.quad.framebuffer.subgroupquadbroadcast_3_float_vertex

Fixes: d786f52f1f ("zink: prevent crash when freeing")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mike Blumenkrantz
36e7350e0b zink: clamp zink_gfx_lib_cache::stages_present for generated tcs
this otherwise does not reflect reality

Fixes: d786f52f1f ("zink: prevent crash when freeing")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mike Blumenkrantz
d2dafa3289 zink: promote a conditional on gfx shader destroy
it only makes sense to run these loops in the cases where they might
be true

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mark Janes
08176d9d16 intel/tools: add shader compiler hash key to json devinfo format
Offline shader compilation will use json as the source configuration
to accurately instantiate mesa for target hardware.  Similar platforms
generate identical shader binaries even though intel_device_info
differs inconsequenially.

Include the shader compilation hash key to device info json files, so
these platforms can be deduplicated.

Closes: #6746

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26844>
2024-02-15 16:59:25 -08:00
Mark Janes
aa649dfa5f intel/tools: move intel_dev_info to intel/tools
This is a more sensible home for intel_dev_info.

Offline shader compilation will take intel_dev_info json files as
input.  For that use case, the shader compiler hash value is needed in
the json file.

intel_dev_info will depend on intel/compiler, and must be located in
intel/tools to break a circular meson dependency.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26844>
2024-02-15 16:59:15 -08:00
Mark Janes
9b1ae760a8 anv: use intel_device_info to set device UUID
For anv, use the intel device info hash function instead of
device PCI ID when generating a UUID for the pipeline cache.

PCI ID can vary between on devices which are comparable from the
perspective of the shader compiler.  A more precise key eliminates
redundant entries in a multiplatform shader cache.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26844>
2024-02-15 16:58:20 -08:00
Mark Janes
48bf7ad3b8 iris: use device info sha in device renderer string
For iris, use the intel device info hash function instead of PCI ID in
the renderer name.  The renderer is incorporated into the gallium disk
cache for programs, as part of the key for looking up cache entries.

PCI ID can vary between on devices which are comparable from the
perspective of the shader compiler.  A more precise key eliminates
redundant entries in a multiplatform shader cache.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26844>
2024-02-15 16:58:18 -08:00
Mark Janes
c4ce1ca847 intel/compiler: generate a hash function to use with the shader cache
Currently, Intel's shader cache incorporates PCI ID into shader cache
keys.

Many devices with different PCI IDs have identical shader compilation
functionality.  Using PCI ID as a component of the shader cache hash
means that a multi-platform shader cache will have redundant,
identical entries for similar platforms.

All Intel compiler functionality is selected based on device
configuration in `struct intel_device_info`.  intel_device_info.py
flags all fields accessed by intel/compiler.

This commit generates a hash function incorporating intel/compiler
device info fields.  Using this hash function in place of PCI ID will
produce a multiplatform cache with no duplicated content.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26844>
2024-02-15 16:58:15 -08:00
Caio Oliveira
5a88267366 intel: Add missing dependencies on blorp
Various components implicitly depend on blorp, make this explicit.

Checked by setting a 'compiler_args' on idep_intel_blorp and verifying
it on blorp_priv.h header.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27643>
2024-02-16 00:08:42 +00:00
Caio Oliveira
3b48b7df1f intel/blorp: Use a Meson dependency for blorp
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27643>
2024-02-16 00:08:42 +00:00
Sagar Ghuge
f55f9272e4 intel/compiler: Fix disassembly of URB message descriptor on Xe2+
URB messages follow the LSC message descriptor so we are already
disassembling the descriptor/extended descriptor, we don't have to
duplicate it.

Without this change:
   urb MsgDesc: ( store, a32, d32, V4, L1UC_L3WB dst_len = 0, src0_len = 2, src1_len = 8 flat )  mlen 2 ex_mlen 8 rlen 0 { align1 1H $1 };

with this change:
   urb MsgDesc: ( store, a32, d32, V4, L1UC_L3WB dst_len = 0, src0_len = 2, src1_len = 8 flat )  base_offset 0  { align1 1H $1 };

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27498>
2024-02-15 19:46:55 +00:00
Eric Engestrom
7a366c0de2 docs: update calendar for 24.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27641>
2024-02-15 18:34:35 +00:00
Eric Engestrom
daa3512048 docs: add sha256sum for 23.3.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27639>
2024-02-15 18:33:24 +00:00
Eric Engestrom
cfffd3f744 docs: update calendar for 23.3.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27639>
2024-02-15 18:33:24 +00:00
Eric Engestrom
b294e9aed1 docs: add release notes for 23.3.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27639>
2024-02-15 18:33:24 +00:00
Jesse Natalie
5c85cdd378 d3d12: Support R16G16B16A16_FLOAT display targets
Since GDI doesn't support this format, we need a fallback path to
get contents on-screen if we're not using DXGI. For that scenario,
we allocate a proxy display target and blit during frontbuffer flush.

Once we have that fallback in place, we can override the sw winsys
format support check for that format.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:45 +00:00
Jesse Natalie
6a60270336 winsys/d3d12: Support single-buffered mode
When the frontend asks for the front buffer, we return an offscreen
surface, when the frontend asks us to flush that surface, we copy it
to the swapchain, and then present remains unchanged.

This means the only reason we need to avoid using a swapchain is if
the app asks for GDI compatibility.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:45 +00:00
Jesse Natalie
5879684a46 wgl: Add HDR pixel formats
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:44 +00:00
Jesse Natalie
f97060bc14 wgl: Enable WGL_ARB_pixel_format_float
We already implement all of the relevant bits of this extension, which
is just handling WGL_TYPE_RGBA_FLOAT_ARB for WGL_PIXEL_TYPE_ARB in
wglGetPixelFormatAttrib[i/f]vARB and wglChoosePixelFormatARB. We just
didn't have any float formats enumerated so it was never seen in
practice.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:44 +00:00
Jesse Natalie
c432fbe534 wgl: Add no-gdi-single-buffered and gdi-double-buffered PFDs
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:44 +00:00
Jesse Natalie
610dcc178a wgl: Flush frontbuffer when calling swapbuffers on single-buffered fb
Some apps don't look at what kind of PFDthey get, and if they
get a single-buffered one, they only ever call swap and never flush,
so nothing shows up on-screen.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:44 +00:00
Jesse Natalie
b6a2972455 wgl: Support a single-buffered winsys framebuffer
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27512>
2024-02-15 17:56:44 +00:00
Lionel Landwerlin
f733215c12 anv: enable query clear/copy using shaders on MTL/ARL
It seems like an L3 setting is different between DG2 & MTL, breaking
the L3 coherency with CS.

We can apply the same tile cache flush as we do on TGL for now until
we figure out how to configure L3 properly to avoid this.

Tested with :

 $ query_clear_with_blorp_threshold=0 query_copy_with_shader_threshold=0 ./deqp-vk -n dEQP-VK.query_pool.*

to force the shader optimizations.

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/27597>
2024-02-15 17:25:37 +00:00
Karol Herbst
53df391d27 rusticl/kernel: recalculate scratch and shared memory after opts
Turns out we have to do it regardless as opts after explicit_types could
get rid of even more scratch and shared memory.

Fixes: ea023ff5cd ("rusticl/kernel: no need to reset the scratch size anymore")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27634>
2024-02-15 15:09:23 +00:00
Georg Lehmann
ad5fbc4407 aco: use fmamk/ak instead of fma with inline constant for more VOPD
Foz-DB navi31, forced wave32:
Totals from 24438 (31.29% of 78112) affected shaders:
Instrs: 21632788 -> 21551766 (-0.37%); split: -0.38%, +0.01%
CodeSize: 126181860 -> 126083848 (-0.08%); split: -0.10%, +0.02%
Latency: 162491062 -> 162516234 (+0.02%); split: -0.05%, +0.07%
InvThroughput: 31121194 -> 31002125 (-0.38%); split: -0.40%, +0.02%
VClause: 420176 -> 420169 (-0.00%); split: -0.00%, +0.00%
SClause: 791844 -> 791762 (-0.01%); split: -0.01%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27523>
2024-02-15 12:38:55 +01:00
Caio Oliveira
62a8de99ac intel/blorp: Move brw_compiler.h include to where is needed
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
f4df4be7e7 intel/blorp: Avoid brw types in blorp_priv.h
Abuse void* here so there's one less file dependent on specific brw
types.  We can revisit if there's a need later, if we ever end up with
a common type for prog_data.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
b28cf9123b intel/blorp: Move brw_blorp_get_urb_length helper
Moving to blorp_genX_exec.h to help make blorp_priv.h independent of brw
types.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
b34df9f801 intel/blorp: Remove outdated reference in comment
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
9377dc417d intel/blorp: Use a struct to return blorp_compile_*() results
Allocate the prog_data instead of expecting one from the user, also
explicitly return both kernel and prog_data size, so that the
plumbing code isn't required to use the exact prog_data type.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
82ecc219e0 intel/blorp: Simplify blorp_compile_cs() interface
No need to take brw_prog_cs_key.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:19 +00:00
Caio Oliveira
cfad85eed0 intel/blorp: Simplify blorp_compile_fs() interface
Take multisample_fbo parameter instead of a brw_wm_key.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:18 +00:00
Caio Oliveira
16ba2478fa intel/blorp: Remove brw_ prefix when not applicable
Remove the brw_ prefix from some blorp functions and structs to avoid
confusion with what's related to brw and what's not.  Some of those will
become independent of brw in upcoming patches.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:18 +00:00
Caio Oliveira
c8fda63378 intel/blorp: Don't require specific prog_data type in callback
Make interface less dependent on brw types.  If we care, later
might make sense to add a tagged union for the possible types here.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27581>
2024-02-15 10:29:18 +00:00
Pavel Ondračka
d78a913bda r300: add explicit flrp lowering
Even though we set .lower_flrp32 = true there is no actuall flrp
lowering in nir_opt_algebraic. Mesa does not produce any but nine does,
so lower it explicitly to fix nine.

Fixes: f8a5cba3b4
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27467>
2024-02-15 10:11:51 +00:00
Caio Oliveira
0b751a2134 intel: Rename i965_{asm,disasm} tools to brw_{asm,disasm}
And move them inside the compiler since they (especially asm) rely on
a bunch of internal types.

Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27579>
2024-02-15 09:26:46 +00:00
Caio Oliveira
5992185c8d intel/compiler: Merge intel_disasm.[ch] into corresponding brw files
Rename the functions to match the existing ones.

Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27579>
2024-02-15 09:26:46 +00:00
Caio Oliveira
468a0ffe9c intel/compiler: Include brw_disasm_info.h where its used
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27579>
2024-02-15 09:26:46 +00:00
Caio Oliveira
ff95f00883 intel/compiler: Move disassemble functions to own header file
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27579>
2024-02-15 09:26:46 +00:00
Hans-Kristian Arntzen
786c1b8322 radv: export multiview in VS/TES/GS for depth-only rendering
For depth-only rendering, a VS would not export layer properly.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10606
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27615>
2024-02-15 09:07:42 +00:00
Jordan Justen
62b72b6be9 intel/dev: Add 2 additional ADL-N PCI ids
Ref: https://patchwork.freedesktop.org/patch/578271/?series=129901&rev=1
Ref: bspec 68397
Cc: mesa-stable
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27625>
2024-02-15 08:07:15 +00:00
Caio Oliveira
5732c9d269 intel/compiler: Rename brw_cs_dispatch_info to intel_cs_dispatch_info
And move to the intel_shader_enums.h file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Caio Oliveira
c5b80de583 intel/compiler: Rename brw_vue_map to intel_vue_map
And move to the intel_shader_enums.h file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Caio Oliveira
7d85d2c7fd intel/compiler: Rename DISPATCH_MODE_* enums to INTEL_DISPATCH_MODE_*
And move to the intel_shader_enums.h file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Caio Oliveira
aeda865b6d intel/compiler: Rename BRW_TESS_* enums to INTEL_TESS_*
And move to the intel_shader_enums.h file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Caio Oliveira
26dd1f0bba intel/compiler: Rename BRW_WM_MSAA_* enums to INTEL_MSAA_*
And move to the intel_shader_enums.h file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Caio Oliveira
a88084f8be intel/compiler: Rename brw_image_param to isl_image_param
And move them to ISL.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27475>
2024-02-14 22:31:23 -08:00
Jesse Natalie
1314c5b357 microsoft/compiler: Fix wave size control for SM6.8+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27624>
2024-02-15 00:29:50 +00:00
Jesse Natalie
e21774eb0a microsoft/compiler: Fix wave size control for SM6.6+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27624>
2024-02-15 00:29:50 +00:00
Jesse Natalie
0daad70f9f microsoft/compiler: For emulating scan, ensure all threads are active when reading cross-lane
HLSL docs say WaveReadLaneAt is undefined if the target lane is inactive. This makes
sense since the target lane may need to *send* the data, rather than it being pulled
by the calling lane. So don't early-out on the loop, iterate through the whole wave
on all threads and read the cross-lane data before branching.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27624>
2024-02-15 00:29:50 +00:00
Timothy Arceri
219be55807 glsl: add missing error check for half float varying
We should never get here currently as the parser should not even
process float16_t without half float enabled. However it seems
like a good idea to add this for completeness.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27585>
2024-02-14 23:50:21 +00:00
Eric Engestrom
66f36a79ef docs: add sha256sum for 24.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27622>
2024-02-14 22:00:59 +00:00
Eric Engestrom
c9bc04180d docs: add release notes for 24.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27622>
2024-02-14 22:00:59 +00:00
Alyssa Rosenzweig
1ca256b762 docs: update for GL4.6 and ES3.2 on asahi
https://rosenzweig.io/blog/conformant-gl46-on-the-m1.html

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
c7bec0d3c8 asahi: advertise GL4.6 and ES3.2
https://rosenzweig.io/blog/conformant-gl46-on-the-m1.html

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
c116d1efbb agx: add "is helper program?" key bit
so we can enforce correctness a bit more at build-time. if the helper program
does not fit in the required RA, spilling will be broken in the driver; now this
is a build-time failure instead of a silent runtime one.

Closes https://gitlab.freedesktop.org/asahi/mesa/-/issues/36

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
a3f647fde1 asahi: precompile helper program
1. avoids cluttering shaders,internal print
2. reduces screen create overhead. this cuts average "glxinfo" runtime by about
   25%, and seems to shave maybe 0.5% off the CTS job.
3. enforces helper program builds successfully as a build-time assertion
4. reduces the libagx generated blob for now, since g13 binaries are more
   compact than serialized NIR

Closes https://gitlab.freedesktop.org/asahi/mesa/-/issues/37

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
e1644a2307 asahi: reorder compiler before clc
so clc can call the compiler.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
020e2959d2 agx: decouple from libagx
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
4a3b905bb8 agx: move texture lowering into lib
This is a bit annoying, but it gets rid of the libagx dep which is preventing
precompiling helper programs.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
0fa6901f32 agx: call texture lowering in the driver
libagx dependency.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
beb8aca7a2 agx: move SSBO lowering
agxv uses a different path

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
1f465d72dd asahi: split out genxml/ directory
src/asahi/lib is creating dependency hell, let's start splitting it up so we can
ease some of the clc related pains.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
35c671ecef asahi: clean up format table renderability
infer renderability from whether we specify a renderable format. nfc now that
rgb9e5 is fixed.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
0ee0969f79 asahi: use #pragma once
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
951219a4fc ail: use #pragma once
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
3333c2cdeb asahi/lib: use #pragma once
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
a296e7ec3a agx: use #pragma once
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
af04176860 agx: decouple compiler from genxml
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
23b77d3329 agx: rm ridiculous dependency
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
4e8a42645b asahi: quelch gcc warning
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
b39de8bb4a asahi: Implement ARB_texture_barrier by decompression
Your perf goes not stonks, sorry. Passes
KHR-GL40.texture_barrier_ARB.*.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
589338e8fc agx: sink wait_pix
No reason not to, noticed when poking at the earlier parts of the series.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
6c5d3fe1b5 agx: rm unused opt_ixor_bcsel
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
2dc1189a9c agx: rm unused backend nr_samples
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
27ddcea2b3 agx: call agx_nir_lower_sample_mask earlier
A given sample needs depth testing to happen before writing its colour, which
requires shuffling pass order.

To do so, merge agx_nir_opt_ixor_bcsel into regular late alg pass
now that we can, which is actually a small shader-db win.

Closes https://gitlab.freedesktop.org/asahi/mesa/-/issues/30

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
9cb03ba5c7 agx: rm dead sample count argument
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
fd0068612f agx: remove discard -> zs_emit lower
doesn't seem to be necessary, the Sonoma compiler uses
sample_mask-based discards even with zs_emit.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
0eb9b62199 asahi: rm ia key
fully dynamic in GS now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
cb0b027c59 asahi: make clip_halfz dynamic
we could move this to the linker but meh, this is good enough for now

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
beb7ddba2b asahi: always support ARB_clip_control
perf impact has been neglible.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
9aa8bac229 asahi: support GS in shaderdb
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
6673924b7e asahi: make gs topology dynamic
even with shobjs, we know the class of topology statically, so we just need to
select between the (up to) 3 compatible topologies, and luckily there are common
subexpressions we can factor out when calculating all 3 at once.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
049434f89c asahi: make provoking vertex dynamic
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
dbb2b25ef9 asahi: eliminate tri fan %
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
7ab1755b54 asahi: avoid silly psiz writes even with gs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
43dd8b87cb asahi: simplify expressions involving xfb
post-invert cleanup

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
b44630aa94 asahi: rm dead
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
159d85d32c asahi: implement GS disk caching
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
86782156e7 asahi: invert geometry shaders
instead of dumping GS outputs to memory and using a GS copy vertex shader,
invert the GS to get a hardware vertex shader to use directly. theoretically,
reduces mem bandwidth at the cost of repeated work if we don't optimze well.
perhaps more importantly, it should reduce heap usage.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:32 +00:00
Alyssa Rosenzweig
1ac3e48fcc asahi: fix vertex out size calc
expression underallocates if var31 is actually used!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
141e084f55 asahi: use load_instance_id in gs lowering
it will lower differently in the prepass vs the rast shader

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
3641a37e8f asahi: set gs_grid[0] even for direct draws
gs rast program needs to know the # of input primitives

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
200ca69086 asahi: support stage override in sysval lower
for gs rast program. should clean up later but for now this will do

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
3bd400a2b4 asahi: collapse indirection with GS
1. compile the gs rast program with the rest of the GS. this requires
   duplicating some shader key stuff but this will be improved soon, and
   actually this makes it easier to reason about caching imo.

2. don't recurse into draw_vbo, collapse the GS launches into the draw. again
   this duplicates some code but makes it easier to reason about things and is
   probably faster. and makes part #1 feasible without piling on hacks (my
   original goal)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
2da426afe0 asahi: allow lowering bindings after lowering textures
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
17896f1699 nir: rm load_vert_id_in_prim_agx
now unused since we separate vs/gs

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
b26409246c asahi: be a bit more methodical with shader stages
the mapping between descriptor stages and hardware stages is about to get even
more complicated, so clean up the driver ahead-of-time to stay ahead of the mess

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
6154d65714 asahi: infer stage in descriptor update
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
37fa7bff58 asahi: shrink GS key
no functional change, just dropping the unused index size field

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
f4a187bc89 asahi: allow bindful GS textures
no longer merging GS so it's fine

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
e13d001160 asahi: rm arrayed output lowering
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
d96fbd4618 asahi: separate GS from VS
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
af7084efa7 asahi: rework shader stage handling a bit
prep for separable vs/gs

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
0b30777028 asahi: add geometry parameters for separable GS
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
b2d547b361 asahi: add shader_info::outputs for gs lower
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
cdd1b012e9 asahi: simplify IA mode handling
we'll solve the IA variants problem a different way, for now make more
straightforward.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
e1783fc083 libagx: generalize vertex_id_for_topology
so we can use it in separable GS

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
c9f55166dc libagx: static assert some sizes
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
aaa609f030 libagx: use real PACKED macro
hopefully end these alignment bugs for good

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
fc929d9318 libagx: use native static_assert on host
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
bfaa3691e1 asahi: make GS flatshade_first more dynamic
baby step

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
4036c710bd libagx: fix buggy align macro
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
784323cf0f asahi: rip out existing MDI+GS implementation
I don't love deleting working code without a working replacement. But this impl
is deeply questionable as-is, and will only balloon in complexity for shader
objects. We need to go back to the drawing board with MDI and lower to real
draws, possibly with control stream looping.

Good news is that this is GL so we can prototype all this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
21403278ac asahi: fix dirty tracking issue
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
beabd93c13 asahi,agx: use hw clip distance
rather than lowering in the fragment shader. this is what we're "supposed" to
do, what apple does, and it saves a byte of the fs key

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
9aeaf99259 agx: fix buffer overflow with varying slots
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
de31b28053 asahi: allow vertex/geom/tess side effects
seems to work ok now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
de786a1c5c asahi: drop xfb hack
now that we can spill it's unnecessary. it also breaks things (-:

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
5361b1f331 asahi: bump max threads per wg
gl4.3 min.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
8a2c1d337e agx: add =spill debug option
to force spilling so we can exercise the new code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
42084d50e5 agx: add parallel copy printing
useful for debugging.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
871f3d3f7d agx: unit test spill/fill lowering
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
a5ff85e782 agx: unit test memory parallel copies
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
14e1bb78ae agx: add spill/fill lowering pass
This simple pass turns moves of memory registers (outputted by RA from the
spiller produced moves/phis of memory variables) into concrete stack load/store
instructions. it's a lot more convenient to do this as a dedicated post-RA pass
than trying to fold this into the hairball that is RA proper.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
40da539d01 agx: introduce "memory variables"
in order to spill, we need to be able to assign spill slots. this is equivalent
to register allocation, so we borrow NAK's neat solution: add "memory variables"
into the IR which get RA'd to "memory registers" that correspond directly to
stack slots. then we can just spill by inserting moves.

this requires extensions to RA, parallel copy lowering, and the IR itself. but
it makes competent spilling so much more straightforward.

to exercise this code path, the commit also includes a trivial spiller that
simply moves every source/destination between memory variables and general
variables, which has the effect of spilling everything. to be replaced by
Braun-Hack eventually, this is just foundations.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
06eb552baa agx: print register vectors
easier dbg

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
282f2ac1aa agx: allow 16-bit immediate on stack load/store
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
485e17e01e asahi: allocate preamble scratch
needed for preamble spilling

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
f97b041e87 agx: set nr_preamble_gprs for preamble scratch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
94b9200042 asahi: add has_scratch to shader key
some stages are unspillable

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
9445005c87 agx: improve scratch size accounting
- prep for preamble scratch
- only include scratch actually used
- prep for spilling scratch

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
a2328820f7 agx: clamp register file based on workgroup size
once we allow workgroup sizes larger than 384 threads, we need to restrict the
register file to ensure we fit.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
bb37b072a5 asahi,agx: use intrinsics pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
e34a707d78 asahi: optimize memory_barrier
don't flush everything, only flush batches that could actually need a flush.

this eliminates memory barrier flushes in an apitrace of ryujinx, although perf
impact there seems neglible.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
745c9d8bdc asahi: track batches with incoherent writes
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
98ffbf4cf6 asahi: rm blank
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:31 +00:00
Alyssa Rosenzweig
53e820f20e asahi: hoist layer id code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
bbe6689108 asahi: hoist xfb code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
ae6e1e3609 asahi: collapse if
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
757fd8be56 asahi: fix instance count with indirect draw
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
facc4b9a5e asahi: drop any_draws
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
ae3544eccd asahi: move some code into dirty tracking
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
c19325c229 asahi: optimize no changes descriptor case
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
1362ae38d4 asahi: optimize "no changes" case
drawoverhead case 1

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
8fc373370f asahi: collapse stage uniform upload
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
8ba151aa16 asahi: dirty track stage uniforms
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
6be7c5f889 asahi: split up stage uniform upload
so we can update incrementally

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
23b4503225 asahi: rewrite queries
1. always keep the query in gpu memory, so we can implement qbos properly.

2. use a lightweight data structure for tracking writers to reduce overhead

3. allow many writers per query to eliminate stalls

4. use context-wide occlusion heap, to satisfy #1 without introducing
   flushes or silly copies. this is what the pvr mesa driver does :-)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
ca58bc239a asahi: drop silly else
default

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
6ffbf77983 asahi: assert invariant
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
24b7fbca9d asahi: allow disk cache with compblit
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
8ab443d549 asahi: enable compblit behind dbg flag
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
07a4ff5810 asahi: track bit count, not word count
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
0aa3eaa944 asahi: rm dead
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
46c70b72ca asahi: skip set if tested
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
7eac18b1bc asahi: force inline ppp update logic
benefits a lot from constant folding.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
5982ae9025 asahi: fix vbo dirty track
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
668bf461b1 asahi: don't use util_resource_size
drawoverhead.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
d9c4fcce5f asahi: log geometry shaders separate from xfb
different perf issues.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
c6c8262ce1 asahi: implement pipeline stats as a checkbox
real impl is blocked on uapi to plumb thru hw perf counters.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
27d39bf544 agx: reassociate bcsel with ior/iand
fairly dramatic improvement to citra shaders, citra seems to be a % faster with
this.

total instructions in shared programs: 2910477 -> 2909192 (-0.04%)
instructions in affected programs: 983562 -> 982277 (-0.13%)
helped: 529
HURT: 1
Instructions are helped.

total bytes in shared programs: 19400010 -> 19392214 (-0.04%)
bytes in affected programs: 6785058 -> 6777262 (-0.11%)
helped: 529
HURT: 58
Bytes are helped.

total halfregs in shared programs: 519553 -> 519429 (-0.02%)
halfregs in affected programs: 1877 -> 1753 (-6.61%)
helped: 37
HURT: 12
Halfregs are helped.

total spills in shared programs: 135040 -> 135022 (-0.01%)
spills in affected programs: 135040 -> 135022 (-0.01%)
helped: 6
HURT: 0

total fills in shared programs: 342326 -> 342308 (<.01%)
fills in affected programs: 342326 -> 342308 (<.01%)
helped: 6
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
b45d54a388 agx: optimize b2x(inot)
easier to do as algebraic rules.

total instructions in shared programs: 2915611 -> 2910477 (-0.18%)
instructions in affected programs: 285251 -> 280117 (-1.80%)
helped: 1245
HURT: 5
Instructions are helped.

total bytes in shared programs: 19439752 -> 19400010 (-0.20%)
bytes in affected programs: 1881556 -> 1841814 (-2.11%)
helped: 1244
HURT: 6
Bytes are helped.

total halfregs in shared programs: 519253 -> 519553 (0.06%)
halfregs in affected programs: 5509 -> 5809 (5.45%)
helped: 24
HURT: 107
Halfregs are HURT.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
34ca925064 agx: don't inline imms into stack_store
we need opt_large_consts..

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
f6c17cbe48 ail: use template for tiled memcpy
less macro hell

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
075e595058 ail: port tiling routines to c++
to fix macro hell

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
104ba72547 ail: add tests for linear<-->twiddled copies
based on the panfrost tests.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
2c9189434f docs/asahi: fix strided linear note
turns out linear 2d arrays work

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
f836d573e4 agx: only run early tests if needed
if it'd be early anyway don't bother, speeds up dolphin with spec shaders

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
7825044c39 asahi: honour discard_whole | persistent
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
793ac04077 asahi: handle read-only SSBOs
reduces silliness in Yuzu.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
97a945246c asahi: fix valid buffer tracking for SSBO/image/XFB
smaller ranges.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
6689b083d8 asahi: don't sync for uninitialized buffer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
9e8ce4550c asahi: enable tcs caching
works fine

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
19da2f6d30 asahi: sync with query mismatches
otherwise the following assertion can fail. fixes crash in yuzu trace.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Alyssa Rosenzweig
3b927567ac Revert "asahi: don't canonicalize nans/flush denorms when copying"
This reverts commit ab7fb3d400.

This breaks ./arb_copy_image-formats -auto --samples=4 since we need the blit
path for compression transitions. The correct thing to do is cast the formats.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Asahi Lina
74110ef21d asahi: batch: Trace before waiting for syncobj
If the render hangs, at least this way we get the trace.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Asahi Lina
ff900ceffe asahi: Enable scratch debugging
Via ASAHI_MESA_DEBUG=scratch. This will assert if enabled and the
scratch workgroup allocation count turns out not to be sufficient (that
is, there were failed allocations), to help debug the max occupancy
calculation.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Asahi Lina
8845702f8c asahi: Allocate scratch for shaders
Finally, now that scratch is available, tell the hardware how much we
need and allocate the scratch buffers as necessary.

We only do the max subgroup calculation for compute right now, and it's
probably conservative (we could probably calculate a reduced occupancy
depending on register pressure). Getting this too low won't break, the
GPU will just be less efficient if there is not enough scratch
allocated. Vertex and fragment just get the max 96 for now.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Asahi Lina
bb5277aa3d asahi: Hook up scratch
Instantiate our 3 scratch managers for each shader type, and pass them
to the hardware if a batch uses scratch.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Asahi Lina
fa475c1b56 asahi: scratch: Add feature to debug core IDs
Define SCRATCH_DEBUG_CORES to a raw core count to bypass the mapping
machinery and allocate memory for many cores, so we can work out how the
core IDs are mapped.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:30 +00:00
Asahi Lina
494399c65c asahi: Implement scratch allocation
Implement our helper program to map scratch blocks into stack memory,
and the driver side that allocates these blocks as necessary.

Alloction is grow-only right now. Drivers are expected to instantiate
scratch memory managers for each shader type (VS, FS, CS) and the same
buffers are reused across commands for each one, growing as necessary.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Asahi Lina
da9677f14b asahi: cmdbuf: Fix scratch bucket offset/size
This is 4 bits. It is an opaque value that gets passed to the
helper, except 0 means no scratch.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Asahi Lina
d6cc820d1a asahi: libagx: Move PACKED and GLOBAL macros to libagx.h
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Asahi Lina
eec7c4beb8 agx: compiler: Enable stack_adjust
We'll need this once we start using scratch.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Asahi Lina
1f1751d258 agx: compiler: Export scratch size to the driver
So it can configure the pipeline correctly, and allocate the required
scratch space.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Asahi Lina
b89da92a5e agx: compiler: Add fence_helper_exit_agx barrier
This is used by the helper program on exit.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Asahi Lina
c406ce793b agx: Add scaffolding to build the helper shader at device init
Add the scaffolding to compile our helper program, and load it at device
init time.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Asahi Lina
05c8b59f5b agx: Hook up helper intrinsics into CL
So we can use these intrinsicts from libagx.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Asahi Lina
30862d7189 agx: Hook up AGX helper NIR intrinsics
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Asahi Lina
b07dbf7b0f nir: Add AGX-specific helper opcodes
These opcodes are used by the helper program to fetch the current
operation info and core ID.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Asahi Lina
5d0f1ca77f agx: Rename some SRs
I think these better represent what these SRs actually do.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Asahi Lina
28d34f6352 asahi: libagx: introduce AGX_STATIC_ASSERT
Using the array size trick, this works in both OpenCL and C.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
8661006ef0 agx: add some more bitop tests
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Mary Guillemard
923767a968 agx: Add a bitop optimizer pass
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Mary Guillemard
2b89eb979e agx: Fuse not into and/or/xor
Signed-off-by: Mary Guillemard <mary@mary.zone>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Mary Guillemard
ba508fe854 agx: Remove and/or/xor pseudo ops
Switch back to bitop while keeping the aliases on agx_print_instr.

Also add all variants of 2 args of agx_bitop_table.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Mary Guillemard
a5b6ff3ccc agx: Add more bitops in agx_bitop_table
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
62001e175f asahi: fix UB in qbo's
upper bits may be uninitialized. fixes
KHR-GL46.transform_feedback_overflow_query_ARB when built with gcc (passed by
chance with clang).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
a06b51559b asahi: plug geometry heap leak
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
877c180677 asahi: plug glsl type leak
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
06cf222830 asahi: plug so target leak
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
e2c5a93358 asahi: plug early_serialized_nir leak
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
ffac4e7179 asahi: plug pre-gs leak
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
7b44d15e5f asahi: plug geometry shader leaks
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
1e973dd5a9 asahi: rework meta shader infra
this fixes the leaks, and is also a lot more pleasant to work with.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
7eda3da983 asahi: plug passthrough tcs leak
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
e91c0b6423 asahi: delete bogus assertion
dEQP-GLES3.functional.fragment_ops.scissor.outside_render_line at certain render
sizes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
5261962186 asahi: fix prim restart unrolling with indirects
need to account for draw->start.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
c0d3bf3608 agx: optimize vote_eq
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
0de7018879 agx: optimize first_invocation
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
fb81201a34 agx: implement active_subgroup_invocation_agx
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
311070f7af nir: add active_subgroup_invocation_agx sysval
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
da924e2f03 agx: fuse ballot+cmp
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
def00f7bf0 agx: introduce ballot pseudo
for more opts

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
92dcf75fcd agx: lower more subgroups
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
f52e0bd70b agx: implement load_subgroup_invocation
There's an sr.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
6f7511b522 asahi: decode uniform_high records
print them like low uniforms.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
1ee9b8b668 asahi: optimize more when linking libagx
Otherwise we get spurious scratch from lower_vars_to_explicit_types on dead
vars.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
9287bec892 asahi: fix unbound ssbos
fixes null ptr dereference in arb_shader_storage_buffer_object-array-ssbo-binding

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
3a6083dea3 asahi: enable robustness
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
591ce607e0 asahi: implement reset queries
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
5dc0f5ccba asahi: implement VBO robustness
GL semantics. GLES (weaker) and VK (stronger) semantics are left as a todo, with
explanations given. Enabled always to deal with null VBOs, this should be
optimized once we have soft fault.

This necessitates a rework of VBO keys, but hopefully for the best.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:29 +00:00
Alyssa Rosenzweig
4aadf67523 asahi: fix metadata for images with VS lowered to GS
KHR-GL46.shader_image_load_store.basic-allTargets-atomicVS

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:28 +00:00
Alyssa Rosenzweig
9753cd44f7 asahi: Implement skeleton for tessellation
This implements a rough skeleton of what's needed for tessellation. It contains
the relevant lowerings to merge the VS and TCS, running them as a compute
kernel, and to lower the TES to a new VS (possibly merged in with a subsequent
GS). This is sufficient for both standalone tessellation and tess + geom/xfb
together. It does not yet contain a GPU accellerated tessellator, simply falling
back to the CPU for that for now. Nevertheless the data structures are
engineered with that end goal in mind, in particular to be able to tessellate
all patches in parallel without needing any prefix sums etc (using simple
watermark allocation for the heap).

Work on fleshing out the skeleton continues in parallel. For now, this does pass
the tests and lets the harder stuff get regression tested more easily. And
merging early will ease rebase.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:28 +00:00
Alyssa Rosenzweig
2d37d1b704 asahi: lower poly stipple
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:28 +00:00
Alyssa Rosenzweig
2d913892b2 asahi: gut macOS related code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:28 +00:00
Alyssa Rosenzweig
5e8168f1b7 asahi: add more uapi stubs
for scratch

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:28 +00:00
Alyssa Rosenzweig
db144685a9 compiler: add a vs.tes_agx bit
So we can distinguish lowered tess eval shaders masquerading as hardware vertex
shaders from actual software vertex shaders, for determining what stage to pull
descriptors.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
2024-02-14 21:02:28 +00:00
Jordan Justen
c6e855b64b intel/compiler: Verify SIMD16 is used for xe2 BTD/RT dispatch
Ref: HSD 14011192593

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27529>
2024-02-14 20:07:13 +00:00
Jordan Justen
820e04ead4 intel/compiler: Implement nir_intrinsic_load_topology_id_intel for xe2
Rework:
 * Sagar: Rework BRW_TOPOLOGY_ID_DSS, BRW_TOPOLOGY_ID_EU_THREAD_SIMD
   calculations

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27529>
2024-02-14 20:07:13 +00:00
Sagar Ghuge
8f880d0ad7 intel/dev: Update max_subslices_per_slice comment
Mention that max_subslices_per_slice relates to GT_SS_PER_SLICE in SKU.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27529>
2024-02-14 20:07:13 +00:00
Jordan Justen
b533bf7361 intel/compiler: Set branch shader required-width as 16 for xe2
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27529>
2024-02-14 20:07:13 +00:00
José Roberto de Souza
5022e5f4bf iris: Fix iris_batch_is_banned() check
iris_batch_is_banned() expects that errno is negative.

Fixes: 665d30b544 ("iris: Wait for drm_xe_exec_queue to be idle before destroying it")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27619>
2024-02-14 19:43:55 +00:00
thfrwn
460d2c46a9 mesa: fix off-by-one for newblock allocation in dlist_alloc
Cc: mesa-stable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27556>
2024-02-14 18:11:49 +00:00
José Roberto de Souza
4423454daa intel/common: Implement xe_engines_is_guc_semaphore_functional()
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25233>
2024-02-14 17:29:54 +00:00
José Roberto de Souza
ac941b13f1 intel: Sync xe_drm.h
Sync xe_drm.h with 9bc36e58d162 ("drm/xe: Add uAPI to query GuC firmware submission version").

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25233>
2024-02-14 17:29:54 +00:00
José Roberto de Souza
dff96257da intel/common: Implement i915_engines_is_guc_semaphore_functional()
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25233>
2024-02-14 17:29:54 +00:00
José Roberto de Souza
731121c982 intel: Sync i915_drm.h
Sync i915_drm.h with commit b11236486749 ("drm/i915: Add GuC submission interface version query").

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25233>
2024-02-14 17:29:54 +00:00
José Roberto de Souza
0a129d8e1f iris: Use intel_engines_supported_count()
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25233>
2024-02-14 17:29:54 +00:00
José Roberto de Souza
29ee85c203 anv: Use intel_engines_supported_count()
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25233>
2024-02-14 17:29:54 +00:00
José Roberto de Souza
fe2982278f intel/common: Add intel_engines_supported_count()
This function is intented to check for KMD, platform or debug options
and return the number of engines that can actually be used.

Next patches will implement i915/xe_engines_is_guc_semaphore_functional()
functions.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25233>
2024-02-14 17:29:54 +00:00
José Roberto de Souza
ffca423472 intel: Remove circular dependency between intel/dev and intel/common
intel/common has a build dependency on intel/dev so the later should
not have any dependendies on the first.

So here moving the definition of intel_engine_class to
intel_device_info.h because it is used in intel_device_info struct
and then including intel_device_info.h in intel_engine.h.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25233>
2024-02-14 17:29:54 +00:00
José Roberto de Souza
6b5c446556 intel/common: Fix location of C++ support macro in intel_gem.h
'extern "C" {' must be added before any includes otherwise the braces
would not match when 'extern "C" {' is defined in other headers.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25233>
2024-02-14 17:29:54 +00:00
José Roberto de Souza
398bdb46ba anv: Drop include to common/i915/intel_gem.h
Common code should not directly include KMD specific files.
At least there was no usage from symbols defined in this file.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25233>
2024-02-14 17:29:54 +00:00
Georg Lehmann
e136a0629d radv/gfx11+: add rtwave32 perftest option
Useful for testing compiler changes and performance considerations.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27584>
2024-02-14 17:11:01 +00:00
Karol Herbst
90eae30bcb rusticl/mem: move pipe_image_host_access into Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
9ce9ddc5e8 rusticl/mem: reorganize MemBase::from_gl a little
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
b834d41d4b rusticl/mem: move Buffer and Image specific fields into the subtypes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
cf73ac8096 rusticl/mem: move tx_raw_async methods into Buffer and Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
f9b05dfd77 rusticl/mem: move MemBase::map into the users
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
d3c3892088 rusticl/mem: reorganize Image::map
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
97680ca861 rusticl/mem: move comment describing how mapping works
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
a9a928cbf9 rusticl/mem: remove get_res
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
687dea4fde rusticl/mem: move tx into Buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
d18333889e rusticl/mem: move is_parent_buffer into Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
bfa342e16e rusticl/image: call tx on the parent buffer directly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
6a15d5baee rusticl/mem: fold tx_raw into tx
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
790d00d3e1 rusticl/mem: move tx_image into Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
e39b6288f6 rusticl/mem: get rid of pixel_size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
2db23aa207 rusticl/mem: split Image::copy_to into Buffer and Image versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
c0c6eca095 rusticl/mem: split Buffer::copy_to into Buffer and Image versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
28bff68d98 rusticl/mem: split copy_to into Buffer and Image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
dd4096e7fd rusticl/mem: move copy_to_rect into Buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
e048d8c796 rusticl/mem: split write_from_user_rect into buffer and image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
efc803175a rusticl/mem: split read_to_user_rect into Buffer and Image versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
fdfde8a189 rusticl/mem: move copy and write buffer impls into Buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
aaa05ffc1d rusticl/mem: split unmap into Buffer and Image versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
a840a75d17 rusticl/mem: move shadow sync methods into concrete types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
553a9e38bd rusticl/mem: move map methods into concrete types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
219d8e0dae core/memory: drop Arc for &Arc<Queue> function parameters
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
5a1089b811 rusticl/mem: move fill methods into concrete types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
58c042f439 rusticl/mem: use pattern matching in is_parent_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:39 +00:00
Karol Herbst
d705307a72 rusticl/mem: split into Buffer and Image
No implementation is moved yet, but doing this first makes it easier to
move things.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
0125e865a1 rusticl/icd: actually allow dispatching CL types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
aa5b0e7883 rusticl/device: get rid of pointless Arc overhead
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
7f77f91929 rusticl/icd: split Arc part out of CLObject into new trait
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
4807573ba7 rusticl/icd: move get_arc() and rename it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
3be4f60f97 rusticl/event: drop from_cl_arr and use arcs_from_arr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
57e5d377da rusticl/icd: move from_arc() and rename it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
51afd7a00c rusticl/device: deduplicate devices with sorting
a HashSet was kinda overkill here to begin with.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
e63e21ac74 rusticl/icd: move get_ref()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
13241264f1 rusticl/icd: fold leak_ref into its only consumer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
4ca11d5f06 rusticl/icd: move get_arc_vec_from_arr and rename it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
9b5bcbb60f rusticl/icd: move retain() and release()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
45b9fdb4e5 rusticl/icd: move refcnt() and get rid of needless atomic ops
The old impl used `get_arc` which internally calls into
`Arc::increment_strong_count` in order to protect against Arc::drop
deallocating our objects. We could also just not do that :)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
7564b81749 rusticl/icd: move get_ref_vec_from_arr into the Rusticl type
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
46227bf44c rusticl/api: allow CLObjectBase to be placed anywhere
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
6d8b0a53c6 rusticl/util: support nested structs in offset_of!
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Karol Herbst
0287aa4b34 rust/api: add RustTypes enum
We want to move away from a 1:1 mapping between CL and Rusticl types, so
that we can differentiate better between different memory types.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27376>
2024-02-14 14:15:38 +00:00
Lionel Landwerlin
e54638ddf5 anv: fix buffer marker cache flush issues on MTL
For some yet unknown reason the CS L3 coherency setting is different
on MTL than DG2.

Fixes issues in tests from the subgroup :

  dEQP-VK.api.buffer_marker.*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c8e122a738 ("anv: Implement rudimentary VK_AMD_buffer_marker support")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27613>
2024-02-14 13:45:46 +00:00
Matt Turner
88d0c6c26a meson: Limit intel_vk_rt to x86_64
Fixes: a512c2a8b5 ("meson: enforce build of intel-clc with anv/iris")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10610
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27608>
2024-02-14 13:08:55 +00:00
Lionel Landwerlin
34078b67ed anv: don't allocate aux padded BOs with host pointers
We can't allocate additional space with host pointers anyway. These
are already allocated pieces of memory by the application.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 646a7c864d ("anv: re-introduce BO CCS allocations")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10608
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27612>
2024-02-14 11:51:33 +00:00
Lionel Landwerlin
feb7cf82dc anv: remove redundant asserts
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27611>
2024-02-14 11:07:10 +00:00
Iago Toral Quiroga
cc7934a89b broadcom/compiler: fix lane selection for subgroups in fragment shaders
It seems the hardware behavior for this is as per-spec and we are
supposed to identify as active entire quads. Particularly, there
are some derivative tests with dynamic control flow that use
subgroup ballot and require this.

However, we still need to exclude terminted lanes (OpTerminate). For
that, we keep track of the sample mask at the start of a fagment
shader start and compare it with the current sample mask.

Fixes: ('broadcom/compiler: support subgroup reduction operations from fragment shaders')
Fixes: dEQP-VK.glsl.derivate.dynamic_loop.*
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27409>
2024-02-14 08:02:41 +01:00
Mark Janes
2143da6d5a intel/dev: improve meson invocation for intel_device_info gen
Review for related code-generation commits advised that the use of an
--outdir parameter was undesirable.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27557>
2024-02-13 19:38:36 +00:00
Mark Janes
f95b87a3dc intel/tools: load json device info in drm_shim
Enable drm_shim to parse a serialized intel_device_info structure from
json.  When overriding the gpu hardware, drm_shim provides the stubbed
intel_device_info structure to mesa through an unused ioctl.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27557>
2024-02-13 19:38:36 +00:00
Mark Janes
56da473b6f intel/dev/tools: add json as an output format for intel_dev_info
intel_dev_info prints out struct intel_device_info in a user-friendly
format.  Json format enables this information to be used as input for
tools.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27557>
2024-02-13 19:38:36 +00:00
Mark Janes
1f725a222a intel/dev: implement json serialization for intel_device_info
Generate intel_device_serialize.c from a mako template, providing
functions to dump and parse intel_device_info.

intel_device_info.py declares python objects representing all type
declarations associated with intel_device_info.  It is used as a data
source for intel_device_serialize_c.py

intel_device_serialize_c.py emits a c++ file with routines to dump
or load all struct members to/from json.  The json format is a direct
translation of the c structure, with 2 exceptions:

 - When parsing json, the no_hw member is always set to true to
   indicate that the driver's intel_device_info does not correspond to
   the current platform.

 - When dumping to json, devinfo_type_sha1 is calculated to be a
   checksum which changes whenever intel_device_info is updated.  This
   checksum is encoded in json.  When parsing json, the driver verifies
   that the checksum matches before loading data into
   intel_device_info.  This verifies compatibility.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27557>
2024-02-13 19:38:36 +00:00
Casey Bowman
d124542b55 anv: Override VendorID for Hitman 3
XeSS workaround is required for Hitman 3 to launch for Intel cards.

The following was observed during launch, coming from libxess.dll:
"Intel Plugin Extension ERROR: INTC_LoadExtensionsLibrary failed"

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27477>
2024-02-13 19:02:24 +00:00
Mark Janes
e56f810316 intel/tools: add intel device meson dependencies
idep_intel_dev ensures that headers are generated before dependent
source files are compiled.  Some tools have been building without that
dependency, and encounter intermittent compilation errors on
sufficiently parallel builds.

Any target which depends on idep_intel_dev will link with
libintel_dev.  Redundant link instructions can be removed.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10604
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27600>
2024-02-13 18:37:19 +00:00
Jesse Natalie
161a90abbd dzn: Add a driconf option to disable dzn for specific apps and use it for RDR2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531>
2024-02-13 17:53:42 +00:00
Jesse Natalie
660c7fe6a7 dzn: Fix tessellation shader insertion into PSO desc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531>
2024-02-13 17:53:42 +00:00
Jesse Natalie
d5131e5f86 dzn: Simultaneous-access is mutually exclusive with MSAA
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531>
2024-02-13 17:53:42 +00:00
Jesse Natalie
32c6caffd7 spirv2dxil: Trivial fixes for tessellation shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531>
2024-02-13 17:53:42 +00:00
Jesse Natalie
a3c45306e2 spirv2dxil: Remove dead branches early during shader compilation
Apparently spiregg can produce not-taken branches that somehow try
to access textures that aren't actually declared. These branches
need to be trimmed before any texture lowering is done.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531>
2024-02-13 17:53:42 +00:00
Jesse Natalie
a8758afabd microsoft/compiler: Relax assert for SPIR-V barriers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531>
2024-02-13 17:53:42 +00:00
Erik Faye-Lund
b6b980a904 mesa/main: work around chrome/firefox bug
Due to flawed logic, Chromium and Firefox thinks EXT_texture_storage
allows using GL_BGRA8_EXT for *all* texturing, including things like
glTexSubImage2D, which it does not.

However, this bug was introduced in Chromium back in 2016, and there's
also a lot of Electron apps that bundle outdated versions of Chromium.
This means it's going to be a *mess* to fix this properly while staying
within the spec.

I've opened a ticket with Khronos to consider changing the spec to make
this legal, because it seems most other OpenGL implementations allow it.

But in the mean time, let's complain a bit, but accept the behavior.
This way people can at least run browsers with hardware acceleration
again. If we decide to change the spec, we can remove this wording.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10550
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27521>
2024-02-13 17:08:27 +00:00
Erik Faye-Lund
d0cc0e74dd mesa/main: mark GL_BGRA8_EXT as color-renderable
While this is not quite as clear as in the previous commit, I still
believe this is the case, but in a bit of an indirect way:

1. EXT_texture_storage defines that GL_BGRA8_EXT is allowed to be used
   in certain sitations if *either* EXT_texture_format_BGRA8888 *or*
   APPLE_texture_format_BGRA8888 is supported.

2. Surprisingly, EXT_texture_format_BGRA8888 (which we do support) does
   not even mention GL_BGRA8_EXT, only GL_BGRA_EXT.

3. APPLE_texture_format_BGRA8888 on the other hand (which we *don't*
   support) *does* introduce GL_BGRA8_EXT, and is pretty clear about it
   being intended for rendering-purposes. But it's written against GLES
   1.1 instead of GLES 2 or later, so it doesn't explicitly add it to
   the required tables.

I think the above tells us that GL_BGRA8_EXT is *supposed* to be a
color-renderable format, even if the way we currently support it is
rather underspecified.

It should also be texture-filterable, for the same reason as in the
previous commit.

In the longer run, we should probably add support for
APPLE_texture_format_BGRA8888, which would make things a bit clearer.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27521>
2024-02-13 17:08:27 +00:00
Erik Faye-Lund
2b2a6a238e mesa/main: mark GL_BGRA as color-renderable
The EXT_texture_format_BGRA8888-spec is quite clear that this format is
color-renderable, so let's mark it properly as such.

It should also be texture-filterable, because in the version of OpenGL
ES it was written against all texture-formats were filterable to begin
with.

While we're at it, use the non-EXT version of the enum; it's been in the
headers since OpenGL 1.2...

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27521>
2024-02-13 17:08:27 +00:00
Erik Faye-Lund
a7e8dc6835 mesa/main: fix _mesa_base_tex_format for BGRA
This function needs the GLES fix for all APIs now. And it should also
handle the sized internal format.

Fixes: 4de62731f4 ("mesa/main: add support for EXT_texture_storage")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27521>
2024-02-13 17:08:27 +00:00
Mike Blumenkrantz
b7e39657f6 zink: only add arrays to indirect non-tcs variables
these are already sized accurately

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27534>
2024-02-13 16:13:13 +00:00
Mike Blumenkrantz
9e2c7314f2 nir/lower_io: fix handling for compact arrays with indirect derefs
this logic relies on constant indexing for compact arrays, but this is
frequently not the case for compact array builtins (e.g., gl_TessLevelOuter).
the usual strategy of lowering to temps isn't viable in TCS, which means
io lowering has to be able to handle indirect access to these builtins
without crashing

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27534>
2024-02-13 16:13:13 +00:00
Lionel Landwerlin
a512c2a8b5 meson: enforce build of intel-clc with anv/iris
If we do a native build, regardless of the host architecture and we
build Anv or Iris, we need intel-clc. So force building that tool.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10601
Fixes: b52e25d3a8 ("anv: rewrite internal shaders using OpenCL")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27593>
2024-02-13 15:31:10 +00:00
José Roberto de Souza
d0fba810b3 intel: Fix intel_get_mesh_urb_config()
The round up in 'next_address_8kb = DIV_ROUND_UP(push_constant_kb, 8)'
was not decreasing the amount of URB available for Mesh and Task, what
could cause an over allocation of URB.

There was also no minimum entries enforcement for Mesh and Task, what
could cause 0 r.mesh_entries to be set in a case where tue_size_dw is
90% > than mue_size_dw. Same for r.task_entries when Task is enabled.

Also adding a few more asserts to help debug.

This fixes at least dEQP-VK.mesh_shader.ext.properties.mesh_payload_size
in LNL but it has potential to fixes other Mesh tests as well.

Cc: mesa-stable
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/27555>
2024-02-13 15:06:32 +00:00
Samuel Pitoiset
32c1e45718 radv: fix emitting VS prologs for merged shaders compiled separately on GFX10+
RSRC1 isn't equal to the VS RSRC1 and both config registers need to
be re-emitted.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27574>
2024-02-13 14:01:42 +00:00
Samuel Pitoiset
6762307698 radv: cleanup radv_shader_combine_cfg_vs_tcs()
To match radv_shader_combine_cfg_vs_gs().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27574>
2024-02-13 14:01:42 +00:00
Georg Lehmann
6121497228 aco/gfx11+: limit hard clauses to 32 instructions
https://github.com/llvm/llvm-project/pull/81287

Foz-DB Navi31:
Totals from 406 (0.52% of 78112) affected shaders:
Instrs: 585342 -> 585750 (+0.07%)
CodeSize: 3077856 -> 3079456 (+0.05%); split: -0.00%, +0.05%
Latency: 3263165 -> 3263326 (+0.00%); split: -0.00%, +0.01%
InvThroughput: 664092 -> 664114 (+0.00%); split: -0.00%, +0.00%
VClause: 11143 -> 11537 (+3.54%)
SClause: 11878 -> 11884 (+0.05%)
Copies: 39807 -> 39815 (+0.02%)

Cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27569>
2024-02-13 13:40:52 +00:00
Karol Herbst
3f7b344930 rusticl/mem: support GL_TEXTURE_BUFFER
Fixes: 2645003bdc ("rusticl: Create CL mem objects from GL")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27385>
2024-02-13 10:12:13 +00:00
Karol Herbst
117291332c rusticl/mem: properly handle buffers
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10505
Fixes: 2645003bdc ("rusticl: Create CL mem objects from GL")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27385>
2024-02-13 10:12:13 +00:00
Karol Herbst
727cddd338 nir/lower_cl_images: record image_buffers and msaa_images
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27385>
2024-02-13 10:12:13 +00:00
Tapani Pälli
29a6beb36e anv: revert cache flushing changes for indirect commands
This reverts commit d699600da1.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10600
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/27591>
2024-02-13 09:47:32 +00:00
Samuel Pitoiset
0c05bdf1c1 radv/ci: enable RADV_PERFTEST=shader_object on VEGA10
Renoir currently hangs in Mesa CI. Needs to be investigated.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27433>
2024-02-13 09:14:21 +00:00
Samuel Pitoiset
bead3f2ec3 radv: allow RADV_PERFTEST=shader_object on GFX9/VEGA10
It's passing VKCTS on VEGA10 but for some reasons RENOIR currently
hangs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27433>
2024-02-13 09:14:21 +00:00
Friedrich Vock
afab80bdb6 radv,driconf: Enable active AS leaf workaround for Jedi Survivor
Another game that can't get AS updates right.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27590>
2024-02-13 08:37:20 +00:00
Marek Olšák
14c85196fc mesa: use util_idalloc_alloc_range for _mesa_HashFindFreeKeyBlock
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27588>
2024-02-13 01:51:59 -05:00
Marek Olšák
ec65dfaabd mesa: fix incorrect _mesa_HashInsertLocked parameter in _mesa_EndList
This fixes random behavior when we turn on GL names reuse for display lists.
(ctx->Const.ForceGLNamesReuse)

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27588>
2024-02-13 01:51:59 -05:00
Marek Olšák
72a38b3792 st/mesa: remove !obj checking in _mesa_get_bufferobj_reference when it's useless
There is at least one case in a future commit where the compiler can't do
this automatically.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27587>
2024-02-13 04:39:13 +00:00
Marek Olšák
9747cf2c8f st/mesa: merge 3 unlikely blocks in _mesa_get_bufferobj_reference
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27587>
2024-02-13 04:39:13 +00:00
Marek Olšák
bfe6d389a0 mesa: remove _mesa_HashTable::InDeleteAll
It's not necessary if we don't remove entries from the hash table,
which we don't have to do because we are going to destroy it anyway.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586>
2024-02-13 03:53:27 +00:00
Marek Olšák
8ca750a8b6 mesa: fold _mesa_HashDeleteAll into _mesa_DeleteHashTable
They are always called back-to-back. This is simpler.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586>
2024-02-13 03:53:27 +00:00
Marek Olšák
d33bffd708 mesa: re-format main/hash.h, move inlines to the end, some code to main/hash.c
the assertions also didn't do anything

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586>
2024-02-13 03:53:26 +00:00
Marek Olšák
cf2692fa24 mesa: clean up unnecessary _mesa_HashTable locked/unlocked wrappers
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586>
2024-02-13 03:53:26 +00:00
Marek Olšák
70b65fe09b mesa: remove unused _mesa_HashTable code
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586>
2024-02-13 03:53:26 +00:00
Marek Olšák
716e483cfb util/idalloc: make deleting invalid IDs a no-op
This happens with piglit tests if we enable ForceGLNamesReuse
for everything.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586>
2024-02-13 03:53:26 +00:00
Lionel Landwerlin
5438b19104 iris: enable generated indirect draws
This mirror the ring buffer mode we have in Anv.

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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
d754ed5330 iris: add an option for not emit draw parameters
When we start generating indirect draws, we'll generate values ourself
and point the HW vertex buffer entries to right location from the
device.

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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
96439b7dfb iris: factor out index buffer emission
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/26797>
2024-02-13 00:06:45 +00:00
Kenneth Graunke
1caf42d92e iris: Implement INTEL_DEBUG=heaps
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
725817f429 iris: make URB programming available outside iris_state.c
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
84e1f8ae70 iris: make KSP helper available outside iris_state.c
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
bde1c76655 iris: make binding table shifting values available outside iris_state.c
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
f192ea630a intel/shaders: enable gfx8 support
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
76c3d97c84 intel/shaders: add iris variant of indirect draws generation shader
Iris does not use Gfx11+ SGVS extended parameters, so we have to rely
on the old Gfx9 method of providing the parameters through vertex
buffers.

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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
b52e25d3a8 anv: rewrite internal shaders using OpenCL
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
da391650f5 ci: build a host version of mesa for cross builds
We're about to introduce a hard dependency on OpenCL functions in Iris
& Anv to generate commands. Intel-clc has been modified to generate
serialized NIR.

A number of builders are doing cross builds, so we can't use the
intel-clc built in that cross build. Other builds like ASAN/MSAN also
complain when running the built version of intel-clc because of
uninitialized values in the packaged LLVM libraries from the
x86_64-base image.

To solve those problems we build a host version of intel-clc and use
that binary in the cross build to generate the serialized NIR.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
1e31fd5f42 meson: add option to install intel-clc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
a26c7b0b03 intel/ds: new tracepoints for generated commands
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
472f49ef43 genxml: remove NDEBUG_UNUSED
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
41b2ed65e2 genxml: generate opencl packing headers
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
2a0328ba8b genxml: enable opencl code generation
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
e6b5196079 intel-clc: print text input
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
4fd7495c69 intel/clc: add ability to output NIR
This will be used to generate a serialized NIR of functions for
internal shaders.

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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
2bae1b6b66 intel-clc: move ISA generation to its own function
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
2a1ff08376 intel/compiler: make default NIR compiler options visible
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/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
012489e55c meson: add a new option to enable intel-clc without building RT shaders
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/26797>
2024-02-13 00:06:44 +00:00
Lionel Landwerlin
c53a4711cb anv: fix incorrect flushing on shader query copy
When doing query result copies in 3D mode, we're flushing the render
target cache, but the shader writes go through the dataport.

Fixes flakes/fails in piglit with shader query copies forced with Zink :

  $ query_copy_with_shader_threshold=0 ./bin/arb_query_buffer_object-coherency -auto -fbo

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b3b12c2c27 ("anv: enable CmdCopyQueryPoolResults to use shader for copies")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26797>
2024-02-13 00:06:44 +00:00
Lionel Landwerlin
2437556d83 intel/fs: rerun divergence prior to lowering non-uniform interpolate at sample
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 74a40cc4b6 ("intel/fs: move lower of non-uniform at_sample barycentric to NIR")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26797>
2024-02-13 00:06:44 +00:00
Lionel Landwerlin
8f5a7f57df intel/fs: indent lowering code to make it more readable
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/26797>
2024-02-13 00:06:44 +00:00
Lionel Landwerlin
c517088cf1 anv: factor out post submit queue debug code
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/26797>
2024-02-13 00:06:44 +00:00
Lionel Landwerlin
67f3fa896e intel/dev: fix missing dependency on generated packing heaers
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/26797>
2024-02-13 00:06:44 +00:00
Lepton Wu
04d26ceb0a llvmpipe: Set "+64bit" for X86_64
Without this, on some "buggy" qemu cpu setup, LLVM could crash
if LLVM detects the wrong CPU type.

Fixes: f92cadccc6 ("llvmpipe: Always using util_get_cpu_caps to get cpu caps for llvm on x86")

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27539>
2024-02-12 22:43:46 +00:00
Danylo Piliaiev
5dd5d4c4b5 tu: Exclude more a7xx regs from stomping
Stomping these regs even for a short time leads to crashes.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Danylo Piliaiev
e4631bee61 freedreno/devices: Update magic regs for a7xx
These regs are written by blob, for some of them blob could
write non-zero values. So executing Turnip after blob without
writing these regs could lead to nasty GPU crashes.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Danylo Piliaiev
eb1e71e707 freedreno,tu: Move varying interp and varying repl modes to xml
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Danylo Piliaiev
78c843230c tu/a750: Consider vertex attr buff in gmem allocation
A750 added a new optimization - placement of vertex attributes
into GMEM, so part of GMEM is carved out for it and needs to
be considered during GMEM allocations.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Mark Collins
5266815ca9 tu/a7xx: Update CCU layout logic for A7XX
A7XX introduces some changes into the CCU such as having different
amounts of memory per CCU for depth and color and dividing up CCU
control into two registers A7XX_RB_CCU_CNTL and A7XX_RB_CCU_CNTL2
where CNTL2 no longer requires a complete flush to be updated, we
currently don't take advantage of this as any CCU updates set both
registers but it's a potential optimization we can add in the future.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Danylo Piliaiev
98d6d93a82 turnip,ir3/a750: Implement inline uniforms via ldg.k
Inline consts suffer the same issue as driver params, so they also
should be preloaded via preamble. There is special instruction to
load from global memory into consts.

Co-Authored-By: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Connor Abbott
6a744ddebc ir3: Initial support for pushing globals with ldg.k
Add a separate pass which uses the analyze_ubo_ranges machinery to
construct ranges of readonly globals accessed in the shader and push
them to constants in the preamble, using ldg.k if possible. This is
enough to handle inline uniforms in turnip but also provides a base for
OpenCL, although the pass would need further work for that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Connor Abbott
513fa1873c ir3/a7xx: Fix load_global_ir3 with immediate offset
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Connor Abbott
45c71803f9 tu: Add more info to ldg inline uniform path
This will let us push the ldg into the preamble.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Danylo Piliaiev
b87b8fdf73 tu: Use SS6_INDIRECT for VS params
a750 has SS6_DIRECT path broken, we should either use UBO lowering
or SS6_INDIRECT path.

It is implemented as INDIRECT load even on a750+ because with UBO
lowering it would be tricky to get const offset for to use in multidraw,
also we would need to ensure the offset is not 0.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Danylo Piliaiev
76e417ca59 turnip,ir3/a750: Implement consts loading via preamble
A750 expects driver params loaded through the preamble, old path
does work but has issues when the same LOAD_STATE is used between
several draw calls (it seems that LOAD_STATE is executed only for
the first draw call).

To solve this we now lower driver params to UBOs and let NIR deal with
them.

Notes:
- VS params are loaded via old path since blob do the same and there
  are no issues observed.
- FDM is not supported at the moment.
- For now driver params data is emitted via CP_NOP because it's tricky
  to allocate space for the data. (It is emitted when we are already in
  sub_cs)

Co-Authored-By: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Danylo Piliaiev
7429ca3115 tu: Use SS6_INDIRECT consts upload path for 3d blits
3d blits used DIRECT consts upload path, which doesn't work
properly on a750+, however uploading them via SS6_INDIRECT
seem to be working.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Danylo Piliaiev
30597970a5 tu/a7xx: Do not preload shaders, HW does it by default
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Danylo Piliaiev
ac75edb8c4 tu/a7xx: Correctly set A7XX_HLSQ_UNKNOWN_A9AE.SYSVAL_REGS_COUNT
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Danylo Piliaiev
bc6b847017 ir3: Add ldg.k instruction
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:13 +00:00
Danylo Piliaiev
ad52f92cb8 tu: Define and set to zero all SP_*_VGPR_CONFIG regs
SP_FS_VGPR_CONFIG was found to be correlated with blob using avgs/uvgs.
Other SP_*_VGPR_CONFIG where undefined per-stage regs and it was tested
via rddecompiler that they "fix" hangs in respective shader stage,
when such stage uses the following instructions pattern:

  avgs.s.1.tex.0
  (ss) avgs.e;
  uvgs.s.tex.0;
  uvgs.e

The exact meaning of SP_*_VGPR_CONFIG is to be investigated.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:12 +00:00
Jonathan Marek
c166c5100b tu/a750: Basic a750 support
Could run vkcube.

Based on changes from Jonathan Marek <jonathan@marek.ca>

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:12 +00:00
Danylo Piliaiev
cdadead230 tu/a7xx: Make A7XX_RB_UNKNOWN_8E06 value configurable per-gen
It is some kind of DBG register which has different value
on different gens.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26934>
2024-02-12 22:05:12 +00:00
Sagar Ghuge
98b62434bd intel/compiler: Lower texture operation to combine LOD and AI
We have to push the lowering of texture operations a bit further in
pipeline since nir_lower_tex gets invoked twice and if there is no LOD
source present, nir_lower_tex adds that as a source. Once that's all
done we can easily combine the LOD and array index into a single 32-bit
value.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27458>
2024-02-12 21:25:48 +00:00
Sagar Ghuge
c984d6e2fc nir: Drop intel specific lowering code
In previous patches, we have moved the Intel specific lowering code in
brw_nir_lower_texture file. We can go ahead and drop the Intel specific
texture source too.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27458>
2024-02-12 21:25:48 +00:00
Sagar Ghuge
15129c7634 intel/compiler: Use nir_tex_src_backend1 to pack LOD and array index
Since this lowering is totally Intel specific, we don't have to
introduce the new texture source. We can use the nir_tex_src_backend1
source to pack LOD/LOD Bias and array index into 32 bit single value.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27458>
2024-02-12 21:25:48 +00:00
Sagar Ghuge
73a3257968 intel/compiler: Add texture operation lowering pass
This pass combines the LOD or LOD bias and array index into a single
32-bit value since Xe2+ sampler messages requires us to do that.

v2: (Alyssa)
- Use nir_iand_imm instead of nir_iand and nir_imm_int
- Use nir_trim_vector instead of nir_swizzle

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27458>
2024-02-12 21:25:48 +00:00
Lionel Landwerlin
646a7c864d anv: re-introduce BO CCS allocations
On Gfx12.0, CCS allocations have to be allocated per image because the
format of the image goes into the AUX-TT PTEs. The effect on memory
allocations is limited since the main surface granularity in the
AUX-TT PTE is 64KB.

On Gfx12.5, the granularity of the AUX-TT PTE is 1MB. This creates a
lot of waste in the application memory allocations. Fortunately the HW
doesn't care about the format put into the PTEs anymore. So it becomes
possible to have 2 images share the same PTE.

To implement this we bring back an earlier version of AUX-TT mappings
where we used to allocate additional CCS space at the end of the
VkDeviceMemory objects. On Gfx12.5, if the BO has additional CCS
space, we will now map the main surface to that space.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26822>
2024-02-12 21:00:27 +00:00
Lionel Landwerlin
bd197c6bcf intel/aux_map: add helper to compute offset in aux data
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26822>
2024-02-12 21:00:27 +00:00
Lionel Landwerlin
c0889a127b intel/aux_map: add BSpec reference
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26822>
2024-02-12 21:00:27 +00:00
Lionel Landwerlin
da6484a8a4 anv: use address helper to compute address u64 value
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26822>
2024-02-12 21:00:27 +00:00
Lionel Landwerlin
7763e75eea anv: move ALLOC_HOST_CACHED_COHERENT as define
That way gdb can decode the other flags when looking at the variables.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26822>
2024-02-12 21:00:27 +00:00
Lionel Landwerlin
3f64ec141e isl: add a no-aux-align usage flag
This flag signals that the driver will be dealing with aux-tt
alignment requirements on its own.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26822>
2024-02-12 21:00:27 +00:00
Lionel Landwerlin
44515bb92c isl: printout sparse usage
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26822>
2024-02-12 21:00:27 +00:00
Rhys Perry
926d9f1cef radv: support minmax filter for more formats
Support should be the same as AMDVLK, except for these formats:
- VK_FORMAT_R4G4_UNORM_PACK8
- VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT
- VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT
- VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR
- VK_FORMAT_A8_UNORM_KHR
- VK_FORMAT_X8_D24_UNORM_PACK32
- VK_FORMAT_D24_UNORM_S8_UINT
And the various emulated compressed formats.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27551>
2024-02-12 20:05:27 +00:00
Faith Ekstrand
05cf04ac97 nvk: Convert shader addresses to offsets in nvk_shader.c
Fixes: e162c2e78e ("nvk: Use VM_BIND for contiguous heaps instead of copying")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27565>
2024-02-12 18:47:07 +00:00
Faith Ekstrand
afd42f5951 nvk/heap: Rework over-allocation
Instead of making it part of every BO, just reserve a bit of space at
the end of the top buffer as part of setting up our vma_heap.  This
reduces our memory allocation by nvk_heap::overalloc per BO and means
that the over-allocation is taken into account when sparse binding heap
BOs in the contiguous case.

Fixes: e162c2e78e ("nvk: Use VM_BIND for contiguous heaps instead of copying")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27565>
2024-02-12 18:47:07 +00:00
Faith Ekstrand
728256e994 nvk/heap: Use nvk_heap_bo::addr instead of bo->offset
Fixes: e162c2e78e ("nvk: Use VM_BIND for contiguous heaps instead of copying")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27565>
2024-02-12 18:47:07 +00:00
Faith Ekstrand
83521dd486 nvk: Don't set CONSTANT_BUFFER_SELECTOR with a zero size
Kepler complains about this and it's unnecessary since we set
ENABLE_FALSE whenever we have a zero size anyway.

Fixes: 55413e33dc ("nvk: Disable all cbufs in nvk_queue_init_context_draw_state()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27565>
2024-02-12 18:47:07 +00:00
Sviatoslav Peleshko
28ad2f488a anv: Store host-located copy of NULL surface state for faster memcpy
Real null_surface_state is located in the GPU memory, so copying from
there will be slow for dGPUs.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10594
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27577>
2024-02-12 17:48:15 +00:00
Neil Armstrong
48a0a3112f freedreno: Add a750 clock gating control related registers
The A750 doesn't have an HWCFG clock gating control but instead a set
of additionnal RBBM registers, add them to allow setting up hardware clock
gating on the A750 GPU.

Registers definitions are used from [0] and [1].

[0] https://git.codelinaro.org/clo/la/platform/vendor/qcom/opensource/graphics-kernel/-/blob/gfx-kernel.lnx.14.0.r3-rel/gen7_reg.h#L636
[1] https://git.codelinaro.org/clo/la/platform/vendor/qcom/opensource/graphics-kernel/-/blob/gfx-kernel.lnx.14.0.r3-rel/adreno_gen7.c#L490

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27576>
2024-02-12 17:10:09 +00:00
Konstantin Seurer
097e543c0a Revert "zink: always force flushes when originating from api frontend"
This reverts commit 03f049f497.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27560>
2024-02-12 16:47:30 +00:00
Konstantin Seurer
aed5e4e1f2 zink: Always set mfence->submit_count to the fence submit_count
Fixes glFinish not finishing all GPU work.

cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8257
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27560>
2024-02-12 16:47:30 +00:00
David Rosca
8d44a11508 radeonsi/vcn: Don't reinitialize encode session on bitrate/fps change
When bitrate or fps change is detected, only update rate control
parameters instead of completely reinitializing encode session.

This fixes an issue where if application changed bitrate or fps often,
the output bitrate would significantly overshoot the target bitrate in some
cases. In other cases, the output bitrate would be extremely low instead.

Cc: mesa-stable

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27548>
2024-02-12 16:00:39 +00:00
Lionel Landwerlin
e0b4dfbbda anv: don't unmap AUX ranges at BO delete
It is possible to free memory backing images before images are
destroyed :

   VkFreeMemory:

   "Memory can be freed whilst still bound to resources, but those
    resources must not be used afterwards."

The spec leaves us the option to keep a reference on the associated
memory and free it only when all the bound resources have been
destroyed. Here we choose to free memory immediately.

One particular test in the CTS
(dEQP-VK.synchronization.internally_synchronized_objects.pipeline_cache_graphics)
does the following :

   imgA = vkCreateImage()
   imgB = vkCreateImage()
   memA = vkAllocateMemory()
   vkBindImageMemory(imgA, memA) # Aux mapping with ref count = 1
   vkFreeMemory(memA)            # Aux mapping removed, ref count = 0
   memB = vkAllocateMemory()     # Same address as memA
   vkBindImageMemory(imgB, memB)
   vkDestroyImage(imgA)	         # Removes the mapping of imgB-memB

   vkQueueSubmit()               # hang with pagefault in AUX-TT

The solution implemented in this change is to not do anything AUX-TT
related in vkFreeMemory(). This soluation has some consequences,
because a virtual memory address range freed and reallocated cannot be
rebound in the AUX-TT until all the associated resources have released
their AUX-TT mapping (to bring back the AUX-TT refcount of the range
to 0). This should still be better than keeping the memory allocated
through refcounting of the anv_bo.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7b87e1afbc ("anv: track & unbind image aux-tt binding")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10528
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27566>
2024-02-12 15:37:18 +00:00
Konstantin Seurer
fb62bffcda radv: Wire up ac_gather_context_rolls
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27322>
2024-02-12 14:04:24 +00:00
Konstantin Seurer
ba6d6e5ee1 amd/common: Use the correct register table for GFX10_3
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27322>
2024-02-12 14:04:24 +00:00
Timothy Arceri
1098afd7fb gallium: add PIPE_CAP_FP16 for AMD_gpu_shader_half_float
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
6fbf336788 compiler/types: Add a contains_32bit helper
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
5f1f6d7496 glsl: add half float AMD_shader_trinary_minmax functions
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
d619c16c3f glsl: add half float derivative functions
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
14de2eff89 glsl: add half float interpolation functions
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
9dc5eec02c glsl: allow half float varyings
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
3dc67c2c7e glsl: add half float vector relational functions
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
e7f1be1ceb glsl: add half float matrix functions
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
99a80ac930 glsl: add half float geometric functions
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
6a170051a9 glsl: add support for half float packing functions
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
c386d56915 glsl: add half float support for common functions
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
eea1c1fa7b glsl: add f2f16() helper to ir_builder
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
94865a45f8 glsl: add half float exponential functions
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:14 +00:00
Timothy Arceri
829c99def1 glsl: add half float angle and trigonometry functions
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:13 +00:00
Timothy Arceri
3ff22ee4ae glsl: add some new helpers for half float builtin functions
These helpers will be used in the following patches.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:13 +00:00
Timothy Arceri
9dc651a13f glsl: skip conversion of half float back to float for GL queries
This is only needed for GLES where floats have been lowered to
half floats internally. We don't do that in desktop GL and we
need to skip it to return the correct enums for the
AMD_gpu_shader_half_float extension.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:13 +00:00
Timothy Arceri
66633dbbd0 glsl: add ubo packing support for half floats
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:13 +00:00
Timothy Arceri
5803417c67 glsl: add implicit half float conversions
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:13 +00:00
Timothy Arceri
b83477973f glsl: add glsl_type_is_float_16() helper
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:13 +00:00
Timothy Arceri
5eea4c42f5 glsl: update assert to allow for half float support
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:13 +00:00
Timothy Arceri
b2a7717717 glsl: add explicit half float conversion support
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:13 +00:00
Timothy Arceri
edbe1b5bb4 glsl: add half float support to the parser
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:13 +00:00
Timothy Arceri
72fb49516e glsl: add basic params for AMD_gpu_shader_half_float extension
This sets us the basic infrastructure to required to add an
extension.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18540>
2024-02-12 13:23:13 +00:00
Jani Nikula
d8e4a4e44b docs: fix doc build 'intel/dev/intel_device_info_gen.h' file not found
Commit a52c1994aa ("intel/dev: generate declarations for struct
intel_device_info") started generating and including
intel/dev/intel_device_info_gen.h, but it's not present in the
documentation build, leading to errors:

docs/isl/formats.rst:222: ERROR: src/intel/dev/intel_device_info.h:39: 'intel/dev/intel_device_info_gen.h' file not found
docs/isl/tiling.rst:87: ERROR: src/intel/dev/intel_device_info.h:39: 'intel/dev/intel_device_info_gen.h' file not found

Add an empty header stub under docs/header-stubs to fix the build.

Fixes: a52c1994aa ("intel/dev: generate declarations for struct intel_device_info")
Signed-off-by: Jani Nikula <jani@nikula.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27573>
2024-02-12 14:09:39 +02:00
Corentin Noël
b0af2b30ab ci_run_n_monitor: Allow the upstream format to not exist
When pushing directly to a fork, the upstream branch does not exist and thus
returns an empty string.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27567>
2024-02-12 10:52:53 +01:00
Corentin Noël
72886cbefa zink: Only call reapply_color_write if EXT_color_write_enable is available
Allows to use zink with drivers that do not expose this extension.

Backport-to: 23.3 24.0
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27516>
2024-02-12 09:19:47 +00:00
Timothy Arceri
62fa5c8d0f Revert "ci: Enable GALLIUM_DUMP_CPU=true only in the clang job"
Rob worded it well in 9e8450b65c.

"We don't want util_cpu to vomit cpu caps all over the test output."

This reverts commit c6979d97e4.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27564>
2024-02-12 08:43:31 +00:00
Samuel Pitoiset
6cab5559f9 radv: add support for emitting TES+GS compiled separately on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27432>
2024-02-12 08:09:28 +00:00
Samuel Pitoiset
dd92f5f664 radv: bind the vertex input SGPR only for relevant stages
Otherwise, user_data_0 is wrong if merged shaders are compiled
separately and if we have GS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27432>
2024-02-12 08:09:28 +00:00
Samuel Pitoiset
d64d7373f3 radv: declare AC_UD_TES_STATE for separate compilation of GS on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27432>
2024-02-12 08:09:28 +00:00
Samuel Pitoiset
e15d1ed7cb radv: declare streamout buffers for TES+GS compiled separately on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27432>
2024-02-12 08:09:28 +00:00
Samuel Pitoiset
83bc7e27a5 radv: force GS stage for TES as ES compiled separately on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27432>
2024-02-12 08:09:28 +00:00
Samuel Pitoiset
b58de424f4 radv: fix RGP barrier reason for RP barriers inserted by the runtime
Without that, RGP is confused and it's reporting CmdPipelineBarrier()
instead of CmdRenderPassSync().

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27546>
2024-02-12 07:50:16 +00:00
M Henning
d98ff2cc4a nvk: Don't clobber vb0 after repeated blits
If a program does two blits in a row, we internally do a sequence of
operations that involves binding vb0.

Previously, the vb0 state after each operation would look something like:

| operation                    | cmd->state.gfx.vb0 | hardware  | save->vb0 |
| ---------------------------- | ------------------ | --------- | --------- |
|                              | user               | user      |           |
| nvk_meta_begin()             | user               | user      | user      |
| BindVertexBuffers(internal0) | internal0          | internal0 | user      |
| nvk_meta_end()               | internal0          | user      |           |
| nvk_meta_begin()             | internal0          | user      | internal0 |
| BindVertexBuffers(internal1) | internal1          | internal1 | internal0 |
| nvk_meta_end()               | internal1          | internal0 |           |

That is, CmdBindVertexBuffers() would update cmd->state.gfx.vb0, but
nvk_meta_end() would not. This meant that the last operation would bind a
driver-internal buffer instead of the original value that the user set.

This change fixes the issue by tracking cmd->state.gfx.vb0 in
nvk_cmd_bind_vertex_buffer(), which both CmdBindVertexBuffers() and
nvk_meta_end() call into.

After this commit, the state looks like:

| operation                    | cmd->state.gfx.vb0 | hardware  | save->vb0 |
| ---------------------------- | ------------------ | --------- | --------- |
|                              | user               | user      |           |
| nvk_meta_begin()             | user               | user      | user      |
| BindVertexBuffers(internal0) | internal0          | internal0 | user      |
| nvk_meta_end()               | user               | user      |           |
| nvk_meta_begin()             | user               | user      | user      |
| BindVertexBuffers(internal1) | internal1          | internal1 | user      |
| nvk_meta_end()               | user               | user      |           |

To test this commit, build gtk4 commit 87b66de1, run:

    GSK_RENDERER=vulkan gtk4-demo --run=image_scaling

then select trilinear filtering in the dropdown and check for rendering
artifacts.

Fixes: e1c66501 ("nvk: Use vk_meta for CmdClearAttachments")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27559>
2024-02-12 05:14:38 +00:00
David Heidelberg
53ff663874 ci/etnaviv: update expectations
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27562>
2024-02-12 01:25:24 +01:00
David Heidelberg
3f7a388d48 ci/freedreno: add fail found by new Piglit
Fixes: 1c29869c20 ("Uprev Piglit to e9316bcd12544aaf7e753ce37fe50d64165d9598")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27562>
2024-02-12 01:16:58 +01:00
David Heidelberg
a16033b6a7 ci: bump kernel to 6.6.16 + enable X2APIC
Should lead to slightly better reliability + eventual performance boost
on Intel HW.

Also reverted:

 - `ae795abe7b3e ("drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks")`
 - `78a1eb102c7f ("drm/msm/dsi: Enable runtime PM")`

so a306 testing won't break.

Acked-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27532>
2024-02-11 16:07:20 +01:00
Hans-Kristian Arntzen
bd23753991 wsi/x11: Rewrite logic for how we consider minImageCount.
MAILBOX reduced from 5 to 4 to be more inline with WL.

With xwayland_wait_ready = false now being the default,
add some extra consideration for non-FIFO present modes.
Add a lengthy rationale for why minImageCount = 3 is exposed on Xwl.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27074>
2024-02-10 11:47:22 +00:00
Hans-Kristian Arntzen
8b4259e69b wsi/x11: Disable vk_xwayland_wait_ready by default on most drivers.
Venus is special and still requires extra waits.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27074>
2024-02-10 11:47:22 +00:00
Błażej Szczygieł
fc8a83c96d gallivm/ssbo: mask offset with exec_mask instead of building the 'if'
It prevents reading the invalid out-of-bounds offset if exec_mask
is 0 without building the 'if' condition. We can do it only when
reading the memory. It's faster than run time 'if' condition

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27302>
2024-02-10 08:20:54 +00:00
Błażej Szczygieł
9ff3bec484 gallivm/ssbo: replace run time loop by compile time loop
Unrolled loop is notably faster.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27302>
2024-02-10 08:20:53 +00:00
Marek Olšák
bab4399970 mesa: add gl_vertex_array_object::NonIdentityBufferAttribMapping
It will be used to skip the indirection from vertex attribs to vertex
buffers.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27525>
2024-02-10 04:55:35 +00:00
Marek Olšák
10f08c2733 mesa: inline _mesa_set_vao_immutable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27525>
2024-02-10 04:55:35 +00:00
Marek Olšák
9aa205668b mesa: inline {Create,Draw}GalliumVertexState callbacks
They are always constant.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27525>
2024-02-10 04:55:35 +00:00
Marek Olšák
8618062b3c st/mesa: constify the pipe_draw_info parameter and remove obsolete comments
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27525>
2024-02-10 04:55:35 +00:00
Caio Oliveira
bf30127941 crocus: Call blorp_finish() when destroying context
Reviewed-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/27502>
2024-02-09 23:09:50 +00:00
Caio Oliveira
083ef7e338 iris: Call blorp_finish() when destroying context
Reviewed-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/27502>
2024-02-09 23:09:50 +00:00
Lionel Landwerlin
d699600da1 anv: reduce cache flushing for indirect commands on Gfx12.5+
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/27257>
2024-02-09 22:46:07 +00:00
Georg Lehmann
36f23bf96d aco: print exec/vcc_lo/hi for single dword access
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27455>
2024-02-09 22:14:44 +00:00
Georg Lehmann
684014ff12 aco: print permlane16 bc/fi
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27455>
2024-02-09 22:14:44 +00:00
Georg Lehmann
f469fda44c aco: don't print hi() for permlane opsel
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27455>
2024-02-09 22:14:44 +00:00
Georg Lehmann
b59f5f9c85 aco: print neg prettier for packed math
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27455>
2024-02-09 22:14:44 +00:00
Georg Lehmann
767eb15ddc aco/print_ir: don't use alloca for input modifiers
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27455>
2024-02-09 22:14:44 +00:00
Georg Lehmann
cd6d9c5918 aco: don't remove branches that skip v_writelane_b32
Cc: mesa-stable

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27537>
2024-02-09 21:55:02 +00:00
Georg Lehmann
2c4980716f aco: add packed fma dpp note to README-ISA
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27533>
2024-02-09 21:36:53 +00:00
Georg Lehmann
e927c5004f aco/gfx11+: disable v_pk_fmac_f16_dpp
Public docs are apparently wrong: https://github.com/llvm/llvm-project/pull/79598#issuecomment-1933988048

Cc: mesa-stable

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27533>
2024-02-09 21:36:52 +00:00
Mark Janes
a52c1994aa intel/dev: generate declarations for struct intel_device_info
Serialization of intel_device_info requires the specification of all
aspects of the type declaration in Python.

To avoid duplication, use the Python type information to generate the
struct as well as the serialization implementation.

This step is implemented first, because it provides explicit types for
some anonymous structures within intel_device_info.  For example, the
'urb' member struct within intel_device_info cannot be serialized in a
C function unless we give it a type (eg, intel_device_info_urb_desc).

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27540>
2024-02-09 21:01:05 +00:00
Mark Janes
13c7194525 intel/dev: specify struct intel_device_info type details in python
In preparation for generating struct intel_device_info, provide all
necessary details via python objects that describe it, including:

 - integer macro definitions
 - comments
 - array sizes
 - correct int types
 - enumeration groups
 - meaningful type names for inline struct members

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27540>
2024-02-09 21:01:05 +00:00
Mark Janes
c40dacd4a8 util: add parson for handling json files
Release 1.5.3 (ba29f4eda9ea7703a9f6a9cf2b0532a2605723c3)
from https://github.com/kgabis/parson

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27540>
2024-02-09 21:01:05 +00:00
Mark Janes
fb7240bef9 hasvk: add missing linker arguments
vulkan_icd_link_args was added for other vulkan drivers but not hasvk.
Without it, statically linked json-c symbols are wrongly exported.

Ref: 2b1e9b0fd6 ("anv: add linker script to fix android symbols")
Fixes: 78578a6ddb ("vk: move radv's linker symbols scripts for use in all drivers")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27540>
2024-02-09 21:01:05 +00:00
José Roberto de Souza
bde9a16ce8 iris: Switch to truly asynchronous VM binding in Xe KMD
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/26805>
2024-02-09 20:24:48 +00:00
José Roberto de Souza
3579413aed anv: Switch to truly asynchronous VM binding in Xe KMD
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/26805>
2024-02-09 20:24:48 +00:00
José Roberto de Souza
63abbb24ad iris: Start to use intel_bind_timeline
With this patch, VM binds remain synchronous in relation to vm_bind()
KMD backend calls. However, the syscalls required for VM bind is
reduce in 2(in the optimal cases), the syncobj create and destroy
syscall are replaced by he usage a timeline syncobj.

Next step will be make this completely asynchronous.

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/26805>
2024-02-09 20:24:48 +00:00
José Roberto de Souza
f23395e2b9 anv: Start to use intel_bind_timeline
With this patch, VM binds remain synchronous in relation to vm_bind()
KMD backend calls. However, the syscalls required for VM bind is
reduce in 2(in the optimal cases), the syncobj create and destroy
syscall are replaced by he usage a timeline syncobj.

Next step will be make this completely asynchronous.

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/26805>
2024-02-09 20:24:48 +00:00
José Roberto de Souza
e905bfe81b intel/common: Add functions to handle async vm bind
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/26805>
2024-02-09 20:24:48 +00:00
Felix DeGrood
11465e4b3a mesa-overlay: defer listening to socket until first frame
mesa-overlay with control arg fails to setup socket properly when multiple
adapters launched. First adapter listens to socket, blocking all remaining
adapters. This is a common occurrence with games using lauchers where the
launcher is also a vulkan app. Fixed by deferring socket listening to first
frame rendered, which should be the game.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27538>
2024-02-09 16:16:24 +00:00
Eric Engestrom
9beb9081fc ci_run_n_monitor: print the target regex before adding the X/N bit
To avoid showing something too complex to the user, especially since this isn't something they added themselves or can remove.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27530>
2024-02-09 15:58:10 +00:00
Eric Engestrom
7154c1eb77 ci_run_n_monitor: implicitly include parallel: jobs
This avoids the surprising behaviour where `--target jobname` works for
some jobs but not others, because gitlab adds `X/N` at the end of these
job names.

If the user does specify something like `jobname 1/.*` to only run the
first, the extra `\d+/\d+` is ignored, just like if the job isn't
`parallel:` and therefore doesn't end with `X/N`.

If the user really wants to fail to match parallel jobs (previous
behaviour), they can simply add a `$` at the end of the job name/regex
(but also, I don't see why someone would want that behaviour).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27530>
2024-02-09 15:58:10 +00:00
Erik Faye-Lund
f40d32770a targets/va: override LIBVA_DRIVERS_PATH in devenv
This is really the right thing to do; it makes libva pick up the driver
we just built in a meson devenv. Not doing so can be kinda fatal;
otherwise we can end up loading different gallium-drivers for OpenGL and
VA-API, which can end up being pretty fatal.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27514>
2024-02-09 14:57:11 +00:00
Alyssa Rosenzweig
9c006d5dce nir/passthrough_gs: flesh out gs_in_prim
geometry shaders don't specify the input topology, only the class of topology.
normalize when generating a passthrough gs.

asahi will be more picky about this in the future.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27457>
2024-02-09 11:53:31 +00:00
Alyssa Rosenzweig
3c3f7cb747 compiler,gallium: move u_decomposed_prim to common
nir will use

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27457>
2024-02-09 11:53:31 +00:00
Pierre-Eric Pelloux-Prayer
ac426e1164 winsys/amdgpu: remove unused amdgpu_fence_is_syncobj
Unused since !24724.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27412>
2024-02-09 09:21:07 +01:00
Pierre-Eric Pelloux-Prayer
f7facda322 winsys/amdgpu: unmap user fence BO before destroy
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27412>
2024-02-09 09:21:00 +01:00
Pierre-Eric Pelloux-Prayer
6c3a294eef radv: don't remove the blit queue from the device queues
I don't remember why I implemented it like this in !13959, but
AFAICT there's no need to manually remove this queue from vk_device's
queues list.

On the other hand, this hack causes issues if syncobj timeline isn't
supported; amdgpu always support timeline, but amdgpu over virtio-gpu
doesn't.

The issue is as follow: the sequence in vk_queue.c:

   case VK_QUEUE_SUBMIT_MODE_DEFERRED:
      vk_queue_push_submit(queue, submit);
      return vk_device_flush(queue->base.device);

Would fail to produce the expected result, because vk_device_flush would
fail to realize that the blit queue has some pending work because
"vk_foreach_queue(queue, device)" would never process the queue.

Then, the call to vk_drm_syncobj_export_sync_file() would fail, because
the syncobj handle was never used in a submit.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27412>
2024-02-09 09:20:52 +01:00
Eric Engestrom
716ed7d62a gitlab_gql: print error returned by server in --print-merged-yaml
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27535>
2024-02-09 08:01:20 +00:00
Samuel Pitoiset
61a125647b radv: add radv_disable_ngg_gs and enable it for Persona 3 Reload
Persona 3 Reload is largely affected by the way amplification works with
NGG GS and disabling it drastically improve performance.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27518>
2024-02-09 07:24:16 +00:00
Samuel Pitoiset
69d734a8d5 radv: add RADV_DEBUG=nongg_gs for GFX10/GFX10.3
NGG GS doesn't perform well in some cases and having an option to
disable it for performance experiments is very useful.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27518>
2024-02-09 07:24:16 +00:00
Samuel Pitoiset
877d9678f5 docs: fix RADV_DEBUG=nonggc description
NGG culling is only enabled by default on GFX10.3.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27518>
2024-02-09 07:24:16 +00:00
Daniel Schürmann
932b9e6a23 radv: enable VK_KHR_shader_quad_control
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27277>
2024-02-09 05:32:35 +00:00
Daniel Schürmann
312d0784c5 spirv: implement SPV_KHR_quad_control
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27277>
2024-02-09 05:32:35 +00:00
Daniel Schürmann
e546f2a55d radv: enable VK_KHR_shader_maximal_reconvergence
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27277>
2024-02-09 05:32:35 +00:00
Daniel Schürmann
2649717a36 aco: enable WQM if demote is used with maximal reconvergence
If otherwise no helper lanes are required by the shader, then demote
behaves like discard and immediately terminates the invocations.
With maximal reconvergence, however, we need to ensure that helper lanes
are not terminated unless the entire quad was demoted.
In order to fix this, generally enable helper lanes in this unlikely
corner case and avoid a major refactor.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27277>
2024-02-09 05:32:35 +00:00
Daniel Schürmann
6588f5a123 spirv: implement SPV_KHR_maximal_reconvergence
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27277>
2024-02-09 05:32:35 +00:00
Mike Blumenkrantz
0a243a7241 zink: adjust swizzled deref loads by the variable component offset
this code is intended to transform a block like:

```
  32    %306 = @load_interpolated_input (%34, %0 (0x0)) (base=3, component=2, dest_type=float32, io location=VARYING_SLOT_VAR3 slots=1)
  32x2  %307 = fsub %305, %306.xx
```

into derefs. the existing code generates this:

```
decl_var shader_in INTERP_MODE_NONE none vec2 #7 (VARYING_SLOT_VAR3.zw, 0, 0)
  32    %516 = deref_var &#7 (shader_in vec2)
  32x2  %517 = @load_deref (%516) (access=none)
  32    %518 = mov %517.z
error: src->swizzle[i] < num_components (../src/compiler/nir/nir_validate.c:216)
```

the problem is attempting to reapply the component offset to a variable which is
already at an offset

fixes #10567

Fixes: 17a35412dc ("zink: re-rework i/o variable handling to make having variables entirely optional")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27522>
2024-02-09 02:29:22 +00:00
Mike Blumenkrantz
fab5c706fe mesa: plumb errors through to texture allocation
the spec allows this and tests like spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch
expect it

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25931>
2024-02-08 23:30:23 +00:00
Eric Engestrom
45df652d0b ci_run_n_monitor: refresh job state when starting it
Avoids job staying in 'manual' state and making the script think there's
nothing left running.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27499>
2024-02-08 22:22:54 +00:00
Eric Engestrom
8a05cb8da7 ci_run_n_monitor: track new job when retrying a job
When retrying a job, we are creating a new job, so we need to keep track
of this new job now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27499>
2024-02-08 22:22:54 +00:00
Eric Engestrom
5bc1a62fbb ci_run_n_monitor: add method to get a pipeline job by its id
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27499>
2024-02-08 22:22:54 +00:00
Eric Engestrom
bce1230587 ci_run_n_monitor: update job when it goes through enable_job()
`enable_job()` modifies the job, so we need to make sure we get the
updated job back out of it.

The next two commits take care of the two specific code paths.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27499>
2024-02-08 22:22:54 +00:00
Eric Engestrom
5758a5d660 ci_run_n_monitor: add some types for gitlab objects
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27499>
2024-02-08 22:22:54 +00:00
Eric Engestrom
044c51b6bf ci_run_n_monitor: warn user if they forgot to push the branch
Only perform this check if they set `--rev HEAD` (or don't specify it);
let's assume if they select another commit, they know what they're
doing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26969>
2024-02-08 21:38:21 +00:00
Jesse Natalie
6d8461f545 d3d12: Subgroup ballot
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27528>
2024-02-08 20:41:58 +00:00
Jesse Natalie
94e0091190 microsoft/compiler: Only use simplified subgroup ID algorithm for compute
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27528>
2024-02-08 20:41:58 +00:00
Danylo Piliaiev
c8cc7c5c18 tu: Do not print anything on systems without Adreno GPU
Output debug info only when explicitly requested with
TU_DEBUG=startup otherwise we should be silent.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10213
Fixes: a669147689
("tu: Always print startup failure messages")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27527>
2024-02-08 18:57:40 +00:00
Philip Rebohle
7b0fd4cc05 radv: Remove dead shared variables after optimization loop.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27104>
2024-02-08 18:27:57 +00:00
Samuel Pitoiset
63b238e84e radv: only load 3x32-bit elements when emitting draws with mesh shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27488>
2024-02-08 18:04:15 +00:00
Samuel Pitoiset
0296196d32 radv: remove unused radv_indirect_command_layout::state_offset
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27488>
2024-02-08 18:04:15 +00:00
Samuel Pitoiset
7bdf9f5002 radv/ci: remove VKD3D_CONFIG=dxr11 for navi21/navi31
The vkd3d-proton version in CI has this enabled by default.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27520>
2024-02-08 17:39:59 +00:00
Boris Brezillon
49069a1243 pan/va: Add missing valhall_enums dep to valhall_disasm
valhall_disasm compilation fails if the valhall_enums.h has
not be generated.

Fixes: 619566dea1 ("pan/va: Generate header containing enums")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10553
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27524>
2024-02-08 15:04:34 +01:00
Samuel Pitoiset
bde272349d radv: add support for emitting VS+GS compiled separately on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27388>
2024-02-08 13:33:34 +00:00
Samuel Pitoiset
416b20d381 radv: force GS stage for VS as ES compiled separately on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27388>
2024-02-08 13:33:34 +00:00
Samuel Pitoiset
8ef4c049ec radv: declare streamout buffers for VS+GS compiled separately on GFX9+
The shader input arguments must match.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27388>
2024-02-08 13:33:34 +00:00
Samuel Pitoiset
a68e19204e radv: rework shader arguments for separate compilation of VS+GS on GFX9+
The shader input args must match for VS+GS compiled separately.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27388>
2024-02-08 13:33:34 +00:00
Samuel Pitoiset
482dbacdeb radv/nir: lower esgs_vertex_stride for GS compiled separately on GFX9+
The ESGS vertex stride would be emitted at draw time using the number
of VS/TES outputs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27388>
2024-02-08 13:33:34 +00:00
Samuel Pitoiset
d777cbf66c radv: add a new user SGPR for the ESGS ring item size
With shader object, when VS+GS or TES+GS are compiled separately and
the VS has written (but unused) outputs, the ESGS vertex stride
must be passed through an user SGPR. This is because when the GS is
compiled we can't know the number of ES outputs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27388>
2024-02-08 13:33:34 +00:00
Boris Brezillon
5b1b76e9cd panfrost: Pad compute jobs with zeros on v4
Apparently, Midgard GPUs don't like when the last 2 words of
compute/vertex jobs contain garbage. Extend the compute job definition
to include a padding section thus aligning the job on a 64-byte boundary,
and add the according pan_section_pack() calls where we have a
compute job filled.

Fixes: b76420be1f ("panfrost: Split command stream descriptor definitions per-gen")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10558
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Anton Bambura <jenneron@postmarketos.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27515>
2024-02-08 12:49:33 +00:00
Boris Brezillon
0bc26efdc4 panfrost: v4 doesn't have Blend descriptors
Drop the Blend descriptor definition in v4.xml, and adjust
pan_blitter accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27515>
2024-02-08 12:49:33 +00:00
Rhys Perry
5f0226d82f aco/tests: use raw strings in form_hard_clauses.nsa
Like cad2c0915d.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27485>
2024-02-08 12:15:23 +00:00
Rhys Perry
d59d00ebf8 aco/tests: add tests for VOPD operand swapping
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27485>
2024-02-08 12:15:23 +00:00
Rhys Perry
24c02dbfa6 aco: improve printing of VOPD instructions
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27485>
2024-02-08 12:15:23 +00:00
Rhys Perry
ea92aea9f2 aco: turn v_mov_b32 into addition to create VOPD instructions
fossil-db (navi31, wave32):
Totals from 15655 (19.76% of 79242) affected shaders:
Instrs: 10699119 -> 10688239 (-0.10%); split: -0.11%, +0.00%
CodeSize: 61290308 -> 61288596 (-0.00%); split: -0.01%, +0.00%
Latency: 89159743 -> 89150355 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 16966295 -> 16955427 (-0.06%); split: -0.07%, +0.00%
VALU: 5484626 -> 5473993 (-0.19%); split: -0.20%, +0.00%
VOPD: 1446725 -> 1457358 (+0.73%); split: +0.74%, -0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27485>
2024-02-08 12:15:23 +00:00
Rhys Perry
65dfb27f8f aco: swap operands to create VOPD instructions
fossil-db (navi31, wave32):
Totals from 61565 (77.69% of 79242) affected shaders:
Instrs: 34874995 -> 34439344 (-1.25%); split: -1.27%, +0.02%
CodeSize: 200611536 -> 200564028 (-0.02%); split: -0.12%, +0.10%
Latency: 242520024 -> 242120510 (-0.16%); split: -0.28%, +0.11%
InvThroughput: 50236383 -> 49588742 (-1.29%); split: -1.31%, +0.02%
VClause: 713308 -> 712902 (-0.06%); split: -0.07%, +0.01%
SClause: 1184865 -> 1184620 (-0.02%); split: -0.03%, +0.01%
VALU: 18235068 -> 17803847 (-2.36%); split: -2.37%, +0.00%
VOPD: 3930904 -> 4362125 (+10.97%); split: +10.99%, -0.02%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27485>
2024-02-08 12:15:23 +00:00
Rhys Perry
96d8b7c59c aco: refactor create_vopd_instruction
Prepare for operand swapping.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27485>
2024-02-08 12:15:23 +00:00
Marek Olšák
50c3e9f87b st/mesa: move st_update_functions into st_context
st_update_array will be set differently based on driver CAPs.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27198>
2024-02-08 11:28:30 +00:00
Marek Olšák
5fd80f4fae st/mesa: change the update enum of vertex elements
more enums will be added following the ON/OFF pattern.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27198>
2024-02-08 11:28:30 +00:00
Marek Olšák
1d9585331e st/mesa: cosmetic touchups in st_atom_array.cpp
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27198>
2024-02-08 11:28:30 +00:00
Marek Olšák
7dd66244af st/mesa: move a piece of _mesa_draw_array_attrib out of the loop in setup_arrays
This inlines _mesa_draw_array_attrib and moves attribute_map out of
the loop. The compiler doesn't do this automatically.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27198>
2024-02-08 11:28:30 +00:00
Marek Olšák
3363d41a20 st/mesa: do (inputs_read & ~enabled_arrays) outside st_setup_current
also move dual_slot_inputs before inputs_read to match st_setup_array.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27198>
2024-02-08 11:28:30 +00:00
Marek Olšák
c4ba65a33b st/mesa: do (inputs_read & enabled_arrays) outside setup_arrays
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27198>
2024-02-08 11:28:30 +00:00
Marek Olšák
000f4c710c st/mesa: rename attribs -> arrays in st_atom_array to indicate non-zero strides
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27198>
2024-02-08 11:28:30 +00:00
Marek Olšák
0ac5dc5ab5 gallium/u_threaded: expose helpers for filling set_vertex_buffers externally
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27198>
2024-02-08 11:28:30 +00:00
Juan A. Suarez Romero
0d2dfe49fe v3d/ci: add new failures
Add new failures related with subgroups for Rpi5.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27517>
2024-02-08 10:26:35 +00:00
Sviatoslav Peleshko
0a1c8779e8 driconf: Apply dual color blending workaround to Dying Light
The game uses shader with `location=0` and `location=1` outputs where
it wants dual source blending and should've used `location=0, index=0`
and `location=0, index=1`.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10413
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27509>
2024-02-08 09:30:09 +00:00
Kenneth Graunke
24d3c83212 driconf: Advertise GL_EXT_shader_image_load_store on iris for SVP13
SPECviewperf creo-03 needs GL_EXT_shader_image_load_store in order for
its shaders to compile but we don't support a few corner cases that
didn't make it into the ARB variant.  It seems to run fine with an
override, so just do that for now.

Cc: mesa-stable
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27429>
2024-02-07 23:17:14 +00:00
Rob Clark
c3062e3402 freedreno: Fix MSAA z/s layout in GMEM
A bit surprised that this didn't show up in any piglit or deqp.

Fixes: cf0c7258ee ("freedreno/a5xx: MSAA")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27508>
2024-02-07 20:26:25 +00:00
Rob Clark
3fbbd79d9c freedreno/decode: Fix prefetch handling for IB1 crash
Found this while investigating iova faults, with impossibly low iova
(ie. fault addresses like 0x0000000000181800).  Looks like fetching
past the end of memory mapped GMEM when doing a CP_BLIT resolve blit.
But because the fault GPU is waiting in a CP_WAIT_FOR_ME in IB1 after
the resolve blit, crashdec wasn't correctly finding the location.

We should just skip all the complicated bits working backwards in IB1
to find the jump into IB2 if we see that the crash is actually in IB1.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27508>
2024-02-07 20:26:24 +00:00
Pavel Ondračka
0ac6801970 r300: fix vs output register indexing
Vertex shaders were writing TEXCOORDs before GENERICS, however
fragment shaders were reading it the opposite way, so this caused
problems for shaders that used both TEXCOORD and GENERIC varyings.

Fixes: d4b8e8a481
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10489
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27469>
2024-02-07 16:24:52 +00:00
Pavel Ondračka
e4ccfde123 r300/ci: add two more observed piglit flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27469>
2024-02-07 16:24:52 +00:00
José Roberto de Souza
665d30b544 iris: Wait for drm_xe_exec_queue to be idle before destroying it
Xe KMD don't refcount anything, so resources could be freed while they
are still in use if we don't wait for exec_queue to be idle.

This issue was found with Xe KMD error capture, VM was already
destroyed when it attemped to capture error state but it can also
happen in applications that did not hang.

This fixed the '*ERROR* GT0: TLB invalidation' errors when running
piglit all test list.

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/27500>
2024-02-07 13:56:17 +00:00
José Roberto de Souza
138303fb9d iris: Fix return of iris_wait_syncobj()
iris_wait_syncobj() succeed if IOCTL return is 0 otherwise it failled.

Cc: mesa-stable
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/27500>
2024-02-07 13:56:17 +00:00
Pavel Ondračka
b243b1eddc r300: remove compiler tests
There are only three very simple tests but several hundreds of lines of
corresponding infrastructure. The tests never helped me to catch a real
issue and in fact I've only seen them fail when I changed the
corresponding pass semantics and forgot to update the tests (or like
when we enabled r300 in debian-testing and AddressSanitizer complained
that there was not a single free in the tests).

We now have a real CI and both piglit and dEQP contain tests that cover
the regalloc and presub testing here and a shader-db run should catch
if we fail the one omod optimization the optimize test is testing. So I
think its time we just get rid of the tests.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27501>
2024-02-07 13:57:19 +01:00
Connor Abbott
aeed5fd98d ir3/ra: Fix bug with collect source handling
It can be the case that a collect and one of its sources are assigned
to non-overlapping parts of the same merge set, for example:

	ssa_1 = ...
	ssa_2 = ...
	ssa_3 = ...

	ssa_4 = collect ssa_1, ssa_2 (kill), ssa_3
	... = ssa_4 (kill)

	ssa_5 = collect ssa_1, ssa_3

	... = ssa_1 (kill)
	... = ssa_3 (kill)
	... = ssa_5 (kill)

If we merge the first collect first, we get a merge set:

	ssa_1 (offset 0)
	ssa_2 (offset 2)
	ssa_3 (offset 4)
	ssa_4 (offset 0)

Now, we decide to merge ssa_1 and ssa_5:

	ssa_1 (offset 0)
	ssa_2 (offset 2)
	ssa_3 (offset 4)
	ssa_4 (offset 0)
	ssa_5 (offset 0)

ssa_3 cannot become a child of ssa_5 in the interval tree, just like a
source not in the same merge set, so we should not remove it and then
reinsert it assuming that RA will make it a child of ssa_5.

This fixes an RA validation error in Farming Simulater.

Fixes: 0ffcb19 ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27497>
2024-02-07 10:38:46 +00:00
Juan A. Suarez Romero
cdb8020f16 vc4/ci: update expected list
Add new piglit failure

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27503>
2024-02-07 10:18:21 +00:00
Juan A. Suarez Romero
0fb490630b Revert "v3d/ci: update expected list"
This reverts commit 31c9e17bf2.

The added failure happens actually in the vc4 driver, not v3d.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27503>
2024-02-07 10:18:21 +00:00
Marek Olšák
72948d9ff9 radeonsi,aco: remove the VS prolog
The upside is that this removes 600 lines of code. The downside is
that if instance divisors are used, we will compile the VS on demand.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27120>
2024-02-07 09:50:53 +00:00
Marek Olšák
0496cd5e5a gallium/noop: don't leak resources due to take_ownership
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
47c1f389ed gallium: remove take_ownership from set_vertex_buffers, assume it's true
This removes the take_ownership parameter and defines the behavior as if
take_ownership was always true, which is the fast path. This way, we don't
have to have 2 codepaths in set_vertex_buffers of every driver.

The old behavior is optionally available through util_set_vertex_buffers.

It also documents a new constraint that count in set_vertex_buffers must be
equal to the number of vertex buffers referenced by vertex elements or 0.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
b23f52b7e4 gallium/u_threaded: allow drivers to change tc_call_set_vertex_buffers function
Move the execute function pointers to struct threaded_context, so that
drivers can change it. Also move struct tc_vertex_buffers into the header
file, so that drivers can implement their own function.

This allows drivers to inline pipe_context::set_vertex_buffers for TC.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
b66ee99bc2 gallium/u_threaded: remove the count=0 path from tc_call_set_vertex_buffers
The default path has the same behavior.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
6ab25f5cde cso: remove CSO_UNBIND_VERTEX_BUFFER0
It has no effect other than unreferencing buffers, which are then
immediatelly re-bound by st/mesa, so it doesn't do anything.
The name is also incorrect because it unbound all vertex buffers.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
47b15d83a2 gallium/hud: set take_ownership=true for set_vertex_buffers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
7fbb758e56 st/mesa: set take_ownership=true for set_vertex_buffers in st_pbo_draw
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
3186131ea5 st/mesa: set take_ownership=true for util_draw_vertex_buffer in st_DrawTex
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
e271d342a4 gallium/util: add take_ownership parameter into util_draw_vertex_buffer
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
0ee35cc443 st/mesa: set take_ownership=true for set_vertex_buffers in st_draw_quad
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
ab3e029e40 gallium/u_blitter: set take_ownership=true for set_vertex_buffers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:41 +00:00
Marek Olšák
f0b31858e1 gallium: always set vertex elements before setting vertex buffers
Drivers can use this constraint to merge vertex elements and vertex
buffers in set_vertex_buffers instead of in draw_vbo.

Suggested by: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8142

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:41 +00:00
Erik Faye-Lund
2683038b1c glapi: move EXT_texture_storage to the right position
I somehow thought this list was sorted roughly alphabetical, but it's
actually sorted by the extension number. Whoops, let's fix that.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27452>
2024-02-07 08:48:20 +00:00
Marek Olšák
fff6d332d9 radeonsi/ci: add gfx11 flakes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:45 -05:00
Marek Olšák
33aac684b4 radeonsi: use num_vertex_buffers instead of ARRAY_SIZE
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:42 -05:00
Marek Olšák
0e02149ac9 winsys/amdgpu: don't ref/unref slab BOs in amdgpu_cs_submit_ib
It's pointless to increase the refcount of the backing BO and then decrease
it in the same function when we already reference the slab entry BO that
holds the reference of the backing BO.

amdgpu_do_add_buffer is inlined in amdgpu_cs_submit_ib, so the new parameter
doesn't cost anything.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:39 -05:00
Marek Olšák
04de7cc985 winsys/amdgpu: simplify amdgpu_do_add_buffer to remove memset
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:36 -05:00
Marek Olšák
c79697fec5 winsys/amdgpu: skip code checking RADEON_USAGE_SYNCHRONIZED for slabs
We unset RADEON_USAGE_SYNCHRONIZED, but we still checked it.
Iterate over such buffers separately without checking
RADEON_USAGE_SYNCHRONIZED.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:25 -05:00
Marek Olšák
0911aea126 winsys/amdgpu: merge 2 loops iterating over real BOs in amdgpu_cs_submit_ib
The first loop updates sequence numbers. The second loop creates the BO list.
Do both in the same loop.

Each loop has to reload the whole BO list from the L2 cache or higher, so we
do it twice. By merging the loops, we only load the BO list from the L2
cache once.

The final result is actually 2 loops, but they iterate over different ranges
of the BO list, so each element is read only once.

If global_bo_list is enabled, it overwrites the BO list after all is done.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:22 -05:00
Marek Olšák
d704f92b13 winsys/amdgpu: merge 2 loops iterating over sparse BOs in amdgpu_cs_submit_ib
The first loop is inside amdgpu_add_sparse_backing_buffers. The second loop
iterates over sparse BOs to update sequence numbers.

Each loop has to reload the whole BO list from the L2 cache or higher, so we
do it twice. By merging the loops, we only load the BO list from the L2
cache once.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:20 -05:00
Marek Olšák
32625c7903 winsys/amdgpu: merge 2 loops iterating over slab entries in amdgpu_cs_submit_ib
The first loop is inside amdgpu_add_slab_backing_buffers. The second loop
iterates over BOs to update sequence numbers.

Each loop has to reload the whole BO list from the L2 cache or higher, so we
do it twice. By merging the loops, we only load the BO list from the L2
cache once.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:18 -05:00
Marek Olšák
77e96cec6e winsys/amdgpu: move code out of amdgpu_add_bo_fences_to_dependencies for reuse
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:16 -05:00
Marek Olšák
436ebe4ef6 winsys/amdgpu: change the signature of amdgpu_add_bo_fences_to_dependencies
for future work

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:14 -05:00
Marek Olšák
75ffd738ac winsys/amdgpu: add real buffers of slab entries in the CS thread
This removes the overhead from the driver thread and simplifies
amdgpu_cs_add_buffer.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:12 -05:00
Marek Olšák
41f6d24fc8 winsys/amdgpu: fix a race condition when reading ws->num_buffers
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:10 -05:00
Jordan Justen
4957d352dd intel/dev: Add device info for ARL
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
Jordan Justen
964042d50c anv/query: Follow MTL code paths on ARL
Ref: 0a52002a1c ("anv: disable reset query pools using blorp opt on MTL")
Ref: b3b12c2c27 ("anv: enable CmdCopyQueryPoolResults to use shader for copies")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
Jordan Justen
c1ffd0a037 anv/drirc: Extend option to disable FCV optimization to ARL
Ref: 01046cd6ad ("anv/drirc: add option to disable FCV optimization")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
Jordan Justen
c3a0483f5b intel/compiler: Lower DPAS instructions on ARL except ARL-H
Ref: bspec 55414
Ref: 951e08fc18 ("intel/compiler: Disable DPAS instructions on MTL")
Suggested-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
Jordan Justen
e2b09b8559 isl: Handle ARL in isl_drm_modifier_get_score()
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
Jordan Justen
9ce0fe460a isl: Define MOCS for ARL
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
Jordan Justen
362ccd3874 intel/dev: Define engine prefetch for ARL
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
Jordan Justen
c616ce8153 intel/i915: ARL also supports the set-PAT uapi
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
Jordan Justen
edf93db5ee iris: Extend MTL modifiers to ARL devices
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
Jordan Justen
a443a824ad intel/l3: Define l3 config for ARL
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
Jordan Justen
546652b31a intel/dev: Add intel_device_info_is_mtl_or_arl()
MTL and ARL share many code paths, and this macro will make it easier
to check for either of them.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
Jordan Justen
1d08282060 intel/dev: Add ARL platform enums
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
David Rosca
fa8e0ba3f7 frontends/va: Fix updating AV1 rate control parameters
Follow the same logic as H264.

Fixes: 5edbecb856 ("frontends/va: adding va av1 encoding functions")

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27481>
2024-02-06 21:07:28 +00:00
Eric Engestrom
cff5bc5af7 pvr: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:39 +00:00
Eric Engestrom
58e7085cb0 lvp: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:39 +00:00
Eric Engestrom
bb0791535a vn: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:38 +00:00
Eric Engestrom
7667802b7d panvk: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:38 +00:00
Eric Engestrom
64081b9f46 nvk: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:38 +00:00
Eric Engestrom
5f373dec88 dzn: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:38 +00:00
Eric Engestrom
b10f61f98e hasvk: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:38 +00:00
Eric Engestrom
32800aa1d7 anv: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:38 +00:00
Eric Engestrom
6407d0f0a2 tu: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:38 +00:00
Eric Engestrom
11cf6965ea v3dv: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:38 +00:00
Eric Engestrom
faad4ffe97 radv: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:38 +00:00
Samuel Pitoiset
ffbd3e5b2d radv: change the user SGPR idx of AC_UD_TES_STATE
When GS will be compiled separately, we will have to always declare
both VS and TES user SGPRs because we can't know the previous stage,
and the shader input arguments must match and mustn't overlap.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27431>
2024-02-06 20:12:38 +00:00
Samuel Pitoiset
3e9815173a radv: set the default workgroup size for VS/TES as ES
If shaders are linked, the optimal value would be computed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27431>
2024-02-06 20:12:38 +00:00
Samuel Pitoiset
90e354afb0 radv: determine the workgroup size for GS non-NGG earlier
The wavesize for VS/TES/GS is always the same, so this can be computed
earlier.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27431>
2024-02-06 20:12:38 +00:00
Samuel Pitoiset
35c9631162 radv: determine the ES stage earlier when processing binary config
This will help implementing VS+GS and TES+GS compiled separately on
GFX9+ because the shader config will need to be combined.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27431>
2024-02-06 20:12:38 +00:00
Samuel Pitoiset
03314b2a86 radv: check for MESA_SHADER_TESS_EVAL in radv_fill_shader_info_ngg()
This seems clearer to me.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27470>
2024-02-06 19:53:24 +00:00
Samuel Pitoiset
34572d535e radv: use next_stage to determine the NGG stage
This shouldn't change anything, except that it will help for ESO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27470>
2024-02-06 19:53:24 +00:00
Samuel Pitoiset
31f006d352 radv: always set GS as NGG if present on GFX11
GFX11 is full NGG.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27470>
2024-02-06 19:53:24 +00:00
Samuel Pitoiset
55093270ed radv: squash GFX10/GFX10.3 NGG restrictions in the same condition
They don't apply on GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27470>
2024-02-06 19:53:24 +00:00
Samuel Pitoiset
237ab5db86 radv: remove one indentation level in radv_fill_shader_info_ngg()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27470>
2024-02-06 19:53:24 +00:00
David Heidelberg
010272b62e util: use crc32_z instead of crc32 and bump zlib dep to 1.2.9
1.2.9 has been released in January 2017, so let's assume
we'll find it everywhere.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27311>
2024-02-06 19:22:53 +00:00
David Heidelberg
56f31d1847 meson: upgrade zlib wrap to 1.3.1
`$ meson wrap update zlib`

Cc: mesa-stable
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27311>
2024-02-06 19:22:53 +00:00
Pavel Ondračka
238c3d593b r300/ci: update piglit fails
Most likely changed by recent piglit uprev.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27493>
2024-02-06 17:32:13 +00:00
Eric Engestrom
f9acd9e659 v3dv/ci: test the WSI on rpi4 and rpi5
Add a few tests to the skip list because they take over a minute to finish.

All the other new tests run in less than 50 seconds.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27315>
2024-02-06 17:15:07 +00:00
Christian Gmeiner
7c198d4404 isaspec: encode.py: Include assert.h
pack_field(..) makes use of assert(..).

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27491>
2024-02-06 16:38:01 +00:00
Zan Dobersek
c3b667d488 tu/msm: fix RD_CHIP_ID size used when dumping RD
The chip ID field size is 8 bytes across fd_dev_id and different RD tools.
The call to fd_rd_output_write_section for RD_CHIP_ID should be fixed to
use the proper size as well.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27430>
2024-02-06 16:01:20 +00:00
Rhys Perry
4f6aac1589 aco/tests: fix to_hw_instr.swap_linear_vgpr
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27436>
2024-02-06 15:40:58 +00:00
Rhys Perry
174e37afb9 aco: fix >8 byte linear vgpr copies
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27436>
2024-02-06 15:40:58 +00:00
Hsieh, Mike
33d88f797b amd/vpelib: Add UID for 3d Lut and control logic
[WHY]
3D lut generation takes time, we need to cache it and identify it as it
updated.

[HOW]
Add unique id when new 3d lut is generated.
Add control logic with UID.

Reviewed-by: Jesse Agate <jesse.agate@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27239>
2024-02-06 14:55:02 +00:00
Agate, Jesse
039b1e0a1e amd/vpelib: Refactor norm factor logic
Moved norm factor logic out of moveable CM.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jesse Agate <Jesse.Agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27239>
2024-02-06 14:55:02 +00:00
Shih, Jude
e0863dbb74 amd/vpelib: Solve link error due to missing static for one function
is_target_rect_equal_to_dest_rect is used in color_bg.c only. Therefore,
it needs keyword as static in front of it. This issue is reported from
diag team.

Reviewed-by: Bichao Wang <bichao.wang@amd.com>
Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27239>
2024-02-06 14:55:02 +00:00
Agate, Jesse
2d02c75324 amd/vpelib: Add PQ Norm to VPE interface
Rename the variable and add PQ Norm to VPE interaface.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jesse Agate <Jesse.Agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27239>
2024-02-06 14:55:02 +00:00
Agate, Jesse
1dd28d6766 amd/vpelib: VPE integration for HLG
Added external and internal enums for HLG and some related house keeping.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jesse Agate <Jesse.Agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27239>
2024-02-06 14:55:02 +00:00
Hsieh, Mike
5fd59c83ef amd/vpelib: geometric scaling fix
[WHY & HOW]
Color adjustment needs to be controled by user.
Remove blending check if target rect equeal to dest rect for 1st stream.

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27239>
2024-02-06 14:55:02 +00:00
Hsieh, Mike
c8b2e28b66 amd/vpelib: skip gamma remap and cs conversion when geometric scaling
[WHY]
When geomtric scaling is enabled, many color features will be skipped.

[HOW]
Skip gamma remap, gamut conversion, blending, tone mapping and color adjustment.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27239>
2024-02-06 14:55:02 +00:00
Mike Hsieh
cb6d928327 amd/vpelib: Add param check for geometric scaling and refactor
[WHY]
Param check for geometric scaling is required.
3dlut for geometric scaling case is too complicate.

[HOW]
Add Param check for geometric scaling.
Refactor 3dlut for geometric scaling case.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27239>
2024-02-06 14:55:02 +00:00
Hsieh, Mike
4893afd427 amd/vpelib: add new tf enum and add flag for geometric scaling
[WHY] 1. Need tf enum for SRGB and BT709
      2. Add required flag and logic for geometric scaling

[HOW] Add new enum, skip tone mapping when geometric scaling is enabled

Reviewed-by: Jesse Agate <jesse.agate@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27239>
2024-02-06 14:55:02 +00:00
Juan A. Suarez Romero
31c9e17bf2 v3d/ci: update expected list
Add new piglit failure

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27484>
2024-02-06 13:33:39 +00:00
Samuel Pitoiset
d15a43c9a9 radv: limit maxIndirectCommandsTokenCount to 512
512 is already large enough but UIN32_MAX is definitely too large.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27466>
2024-02-06 11:23:29 +00:00
Sviatoslav Peleshko
0a44f6319e anv,driconf: Add sampler coordinate precision workaround for AoE 4
AoE4 samples texture on the edge between texels, which can cause
unexpected texel to be returned, and cause misrenderings. This workaround
enables coordinate rounding even in NEAREST mode, which fixes the problem.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9864
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27337>
2024-02-06 10:29:15 +00:00
Juston Li
e48645250c venus: image format properties cache
Cache for vkGetPhysicalDeviceImageFormatProperties2 as it is observed
to be called repeatedly with zink/proton layers.

Cache design is the same as the image requirements cache, generating
a hash key from pImageFormatInfo and storing pImageFormatProperties
into a hash table.

There are a couple differences though:
- VkResult gets cached when the query returns NOT_SUPPORTED.
- Unlike pMemoryRequirements that returns VkMemoryRequirements2 and
possibly VkMemoryDedicatedRequirements, VkImageFormatProperties2
has various pNext chains that can be optionally passed in. Hash
the existence of these pNext so that they are considered different
queries and the underlying pNext struct can be optionally cached.
The alternative would be to modify the query to always chain these
pNext so all of them would be cached, but it is unlikely for queries
to only differ in pNext chains.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27401>
2024-02-06 00:26:45 +00:00
Juston Li
680c912977 venus: extract cache hash/equals functions into common
drop the unnecessary casting in the equals function as well

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27401>
2024-02-06 00:26:45 +00:00
Juston Li
f3de6f17c1 venus: fix image reqs cache store locking
lock the entire scope when storing image reqs cache entry to prevent
entry being added between the split locks.

Fixes: b51ff22fbe ("venus: support caching image memory requirements")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27401>
2024-02-06 00:26:44 +00:00
Tapani Pälli
5178ad761c anv: flush tile cache independent of format with HIZ-CCS flush
Cc: mesa-stable
Fixes: ba87656079 ("anv: implement undocumented tile cache flush requirements")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10420
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10530
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27440>
2024-02-05 21:50:26 +00:00
Mike Blumenkrantz
af51e5f7a9 zink: split out sparse_residency_code_and lowering
the lowering for is_sparse_texels_resident must run after all the instances of
sparse_residency_code_and have been eliminated in order to effectively guarantee
that there are no remaining cases of tex.e (sparse) component access

fixes #10548

Fixes: f0ca477b500 ("zink: run sparse lowering after all optimization passes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27474>
2024-02-05 21:28:47 +00:00
Mike Blumenkrantz
f5174593c1 zink: add back (safe) optimizations after sparse lowering
this cleans up the sparse_residency_code_and disaster

Fixes: f0ca477b500 ("zink: run sparse lowering after all optimization passes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27474>
2024-02-05 21:28:47 +00:00
Caio Oliveira
40d119979a iris: Remove unused paramater
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27476>
2024-02-05 21:07:20 +00:00
Caio Oliveira
a4dc5bd9fd iris: Remove prototypes for unsupported Gfx versions
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27476>
2024-02-05 21:07:20 +00:00
Caio Oliveira
8ff26271a7 iris: Remove unused brw_* includes
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27476>
2024-02-05 21:07:20 +00:00
Friedrich Vock
d4c094dfb4 radv/rt: Optimize update shader VGPR usage
Brings VGPR allocation down from 72 (absolutely insane) to 32.

We can now reach the theoretical maximum occupancy of 16 waves per SIMD.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27472>
2024-02-05 21:14:45 +01:00
Max R
585836f2b5 d3d10umd: Rename d3d10sw target to d3d10umd
Other drivers such as virgl are planned to be added to d3d10... target.
As it is not a purely software driver d3d10sw target is renamed to
d3d10umd target to reflect that.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27416>
2024-02-05 16:59:22 +00:00
Max R
67da5a8f08 d3d10umd, meson: Allow naming d3d10umd DLLs
For graphics drivers on windows it is beneficial to have usermode DLLs
names matching driver overall name, example being vm3dum_10.dll and
nvwgf2um.dll for d3d10 usermode drivers from VMWare and Nvidia.

To implement that new meson option `gallium-d3d10-dll-name` that
names the resulting d3d10umd target DLL is introduced. Additionaly,
to avoid confusion `gallium-dll-name` is renamed to `gallium-wgl-dll-name`
as it corresponds to the name used in wgl target.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27416>
2024-02-05 16:59:22 +00:00
Tapani Pälli
5ae2b4882a blorp: implement Wa_16014912113 callback for drivers
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/26920>
2024-02-05 13:50:58 +00:00
Tapani Pälli
1693d0b857 anv: implement Wa_16014912113
When URB state for DS changes, we need to emit URB setup for VS with
256 handles and 0 for rest, commit this using a HDC flush before
setting real values.

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/26920>
2024-02-05 13:50:58 +00:00
Tapani Pälli
263f693760 iris: implement Wa_16014912113
When URB state for DS changes, we need to emit URB setup for VS with
256 handles and 0 for rest, commit this using a HDC flush before
setting real values.

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/26920>
2024-02-05 13:50:58 +00:00
Tapani Pälli
bdc7d32e93 blorp/crocus: refactor blorp_emit_urb_config
Patch changes blorp_emit_urb_config to use intel_urb_config so that we
can use it later to communicate blorp urb configuration for drivers.

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/26920>
2024-02-05 13:50:58 +00:00
Tapani Pälli
829e4fe877 intel/common: provide a helper for urb setup comparison
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/26920>
2024-02-05 13:50:58 +00:00
Tapani Pälli
a1b885b482 intel: refactor urb configuration, add intel_urb_config
Patch adds a structure holding urb configuration. This makes it nicer
to pass it around as example for blorp. We need to be able to sometimes
compare with last urb configuration to be able to implement some
workaround.

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/26920>
2024-02-05 13:50:58 +00:00
Christian Duerr
49c1b404e5 panfrost: Fix dual-source blending
If dual blending is enabled, only 1 output is supported. Multiple
outputs confuse the write combining pass in this case, leading to
incorrect output and/or an assert failure in emit_fragment_store.

The fix is straightforward, just skip the speculative emitting of
multiple outputs in the case where dual source blending is enabled.

This also adds an extra sanity check in `pan_nir_lower_zs_store` to
check for only one blend store being present.

Fixes: c65a9be421 ("panfrost: Preprocess shaders at CSO create time")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9487
Co-Authored-By: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26474>
2024-02-05 13:25:56 +00:00
Sergi Blanch Torne
084f81fd52 Revert "ci: disable Collabora's farm due to maintance"
This reverts commit 3a2e5c1b77.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27360>
2024-02-05 12:48:30 +00:00
Job Noorman
29fa1d7f25 ir3: set reconvergence for scan_clusters.macro
The introduction of block::reconvergence_point happened at the same time
as scan_clusters.macro so we forgot to set it correctly.

Fixes: 60413e11c2 ("ir3: optimize subgroup operations using brcst.active")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27463>
2024-02-05 12:28:10 +00:00
Georg Lehmann
cc7400e49c anv: report rotate subgroup feature bits
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27444>
2024-02-05 11:20:28 +00:00
Georg Lehmann
2ad3b83d23 radv: report rotate subgroup feature bits
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27444>
2024-02-05 11:20:28 +00:00
Rhys Perry
48461c0d9e aco: enable VOPD scheduler
fossil-db (navi31, wave32):
Totals from 75237 (94.95% of 79242) affected shaders:
Instrs: 40383337 -> 36522907 (-9.56%); split: -9.56%, +0.00%
CodeSize: 209282312 -> 209883000 (+0.29%); split: -0.18%, +0.46%
Latency: 256898944 -> 257834204 (+0.36%); split: -0.23%, +0.60%
InvThroughput: 59105835 -> 52725948 (-10.79%); split: -10.90%, +0.11%
VClause: 759487 -> 758151 (-0.18%); split: -0.18%, +0.01%
SClause: 1264895 -> 1263230 (-0.13%); split: -0.14%, +0.01%
VALU: 22886416 -> 18837085 (-17.69%)
VOPD: 0 -> 4049331 (+inf%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23367>
2024-02-05 10:51:15 +00:00
Rhys Perry
75a76ec3fd aco: implement VOPD scheduler
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23367>
2024-02-05 10:51:15 +00:00
Rhys Perry
1fb79b4aa2 aco: refactor schedule_ilp main loop
Besides switching to "ctx.active_mask" as the condition, this is basically
the same.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23367>
2024-02-05 10:51:14 +00:00
Rhys Perry
c66d42b9ed aco: add VOPD statistic
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23367>
2024-02-05 10:51:14 +00:00
Rhys Perry
6547e17e60 aco: add VOPD format
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23367>
2024-02-05 10:51:14 +00:00
Max R
54c52932d4 virgl: Pass cmd_buf to flush_frontbuffer
Required by gdi virgl winsys.

Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27308>
2024-02-05 08:41:23 +00:00
Max R
15c21eafc2 virgl: Allow importing resources without known templ
On windows when external resources are imported
there is no information about them. And in such cases
resource_from_hanlde templ argument is equal NULL.

To support such case on virgl, virgl winsys can now
fill in template for resource, that will be used if
templ=NULL. Additionally helper functions were
added to convert virgl encoded enums to pipe.

Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27308>
2024-02-05 08:41:23 +00:00
Max R
8b7fa26b39 virgl: Implement PIPE_QUERY_GPU_FINISHED
Implemented using fences, similarly to zink.
Requierd by d3d10umd frontend.

Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27308>
2024-02-05 08:41:23 +00:00
Max R
6427dd9056 virgl: Fix crash when no VE bound
While OpenGL requires that VE must be bound,
other mesa frontends, f.e. d3d10umd, can emit draw
without any VE bound. Which led to vctx->vertex_elements
to be null, which lead to null derefence. Add check
for ve not being null to avoid that.

Supported by virglrenderer@b8ac10db

Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27308>
2024-02-05 08:41:23 +00:00
Max R
468c750c53 virgl: Fix compilation on MSVC
* Cast to uint8_t* before doing pointer arithmetics
* Add zero to initializer list to initialize zeroed structs
* Don't include linux sepcific headers on WIN32
* Don't use build_id when it isn't available

Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27308>
2024-02-05 08:41:22 +00:00
Dave Airlie
47c725b53e radv: don't submit 0 length on UVD either.
The kernel checks for UVD msgs and if there aren't any gets upset,
so don't submit 0 length on UVD rings either to avoid that.

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27186>
2024-02-05 08:14:26 +00:00
Dave Airlie
df9bc11589 radv/uvd: uvd kernel checks for full dpb allocation.
The CTS image allocation sometimes doesn't try to allocate a complete
DPB, but the amdgpu kernel module checks for this, so always make
the DPB max sized on uvd instances.

Fixes part of video decode on Fiji/Polaris

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27186>
2024-02-05 08:14:26 +00:00
Dave Airlie
bba36df84d radv: init decoder ip block earlier.
This makes the queue decisions later correct.

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27186>
2024-02-05 08:14:26 +00:00
Dave Airlie
6065671a7f radv: fix correct padding on uvd
Fixes: 8a29291dbe ("radv/video: add h264 support for uvd")

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27186>
2024-02-05 08:14:26 +00:00
Sergi Blanch Torne
3a2e5c1b77 ci: disable Collabora's farm due to maintance
Planned downtime in the farm:
* Start: 2024-02-05 08:00 UTC
* End: 2024-02-05 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27359>
2024-02-05 08:11:50 +00:00
Samuel Pitoiset
c6286e39ec radv/sqtt: fix describing queue submits for RGP
The submit_sub_index field is used by RGP to determine the number of
submits. Previously, it was incorrectly reporting the same number of
submits than command buffers.

Fixes: 88cbe32048 ("radv: add support for RGP queue events")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27439>
2024-02-05 07:32:48 +00:00
Gert Wollny
8368a97294 r600: handle indirect access to kcache 14 and 15
r600 can't handle indirect access to kcache 14 and 15, so
if the shader has more than 14 UBOs and there is indirect UBO
access load the values from kcache 14 (and 15) directly and do
a bcsel based on the buffer id to return the right value.

v2: - replace superfluous check with an assert (Triang3l)
    - change the lowering pass to work on load_ubo

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

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27372>
2024-02-03 19:27:54 +00:00
Emmanuel Vadot
464e8aaff4 util: Allow kcmp on FreeBSD
FreeBSD now have kcmp(2) syscall, use it.

Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27184>
2024-02-03 17:19:31 +00:00
Sergi Blanch Torne
3a00d80c67 Revert "ci: disable Collabora's farm due to maintance"
This reverts commit fcce9cc835.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27427>
2024-02-03 17:16:30 +01:00
Sergi Blanch Torne
fcce9cc835 ci: disable Collabora's farm due to maintance
Planned downtime in the farm as follows:
* Start: 2024-02-03 13:00 UCT
* End: 2024-02-03 17:00 UTC

Signed-o-f-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27426>
2024-02-03 12:50:48 +00:00
Konstantin Seurer
b10ee44308 radv/rra: Implement ahit/isec counters
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25548>
2024-02-03 12:59:47 +01:00
Konstantin Seurer
82a5cc788b docs: Document RADV_RRA_TRACE_HISTORY_SIZE
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25548>
2024-02-03 12:59:47 +01:00
Konstantin Seurer
767f628079 radv/rra: Dump basic ray history tokens
This only dumps the begin tokens. Tokens are written to a buffer
containing a 12 byte header at the beginning.

We use an intermediate format for the ray history tokens because the RRA
format is very inefficient.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25548>
2024-02-03 12:59:47 +01:00
Konstantin Seurer
26939f016d radv/rra: Refactor error handling
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25548>
2024-02-03 11:29:58 +01:00
Konstantin Seurer
46dddb57f9 radv/rra: Remove useless variable
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25548>
2024-02-03 11:29:58 +01:00
Konstantin Seurer
dc813288c3 radv/rra: Use memcpy for chunk descriptions
The identifier is not null terminated. "HistoryTokensRaw" does not fit
otherwise.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25548>
2024-02-03 11:29:58 +01:00
Konstantin Seurer
71c363acc3 radv/rra: Rename rra_chunk_type to rra_chunk_version
Found by inspecting RRA source.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25548>
2024-02-03 11:29:58 +01:00
Yiwei Zhang
d32d010c24 venus: update tracepoints to align with later optimizations
We can remove redundant TPs no longer needed while updating and adding
some trivial ones helpful for next things.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27450>
2024-02-03 00:35:39 +00:00
Eric Engestrom
a81189c796 ci: build nvk in debian-vulkan job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27442>
2024-02-02 23:36:59 +00:00
Eric Engestrom
2d21a1bf79 nouveau/tests: fix null dereference
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27442>
2024-02-02 23:36:59 +00:00
Gurchetan Singh
0525dac7f8 vk_image.c: #ifndef _WIN32 --> DETECT_OS_LINUX + DETECT_OS_BSD
DRM modifiers are a BSD/Linux phenomenon.

We can also remove a bunch of these checks too.  No Linux specific
symbol or header is **actually** used, and the DRM modifier is
just represented as uint64_t.  But kept the style of the file
as is.

Reviewed-by: Serdar Kocdemir <kocdemir@google.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27425>
2024-02-02 23:11:21 +00:00
Gert Wollny
1fa171650a zink: remove invalid scope in bo allocation loop
The braces resulted in the never demoting the heap type
which resulted in an infinite loop if this become a necessity.

Fixes:  eb394f5316
    zink: redesign the allocation try loop to test all heaps

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27446>
2024-02-02 22:43:02 +00:00
Marek Olšák
e98bbcad17 nir: add vertex divergence into nir_divergence_analysis
This is a prerequisite for the new nir_opt_varyings pass.
It reuses the same divergent field in nir_def and nir_loop.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26918>
2024-02-02 16:45:52 -05:00
Marek Olšák
5ffa4d879c nir: add a lower_mediump_io callback into options
This will be called by the GLSL linker before nir_opt_varyings.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26918>
2024-02-02 16:45:51 -05:00
Marek Olšák
ecf0fe09f0 nir: replace lower_io_variables with a GLSL NIR flag
This stops using it in nir_lower_io_passes because all callers call it
only when it's true.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26918>
2024-02-02 16:45:49 -05:00
Marek Olšák
c4acab77a8 nir: remove and replace underused option pack_varying_options
This will also be used by nir_opt_varyings.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26918>
2024-02-02 16:45:47 -05:00
Marek Olšák
c844b5dc85 nir: relax validation failure for generic TCS outputs with no_varying
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26918>
2024-02-02 16:45:45 -05:00
Marek Olšák
d84a616d4d nir: remove INTERP_MODE_COLOR
It's only used by radeonsi and doesn't have to be public.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26918>
2024-02-02 16:45:35 -05:00
Rob Clark
1d5dbde522 freedreno/drm: Fix teardown crash harder
We need to unref the device *after* submit cleanup, so that
fd_submit_sp_destory() can still reference the device.

Fixes: d558cb664a ("freedreno/drm: Submit should hold ref to device")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27445>
2024-02-02 20:28:58 +00:00
Job Noorman
60413e11c2 ir3: optimize subgroup operations using brcst.active
Follow the blob and optimize subgroup operation using brcst.active and
getlast when supported.

The transformation consists of two parts. First, a NIR transform
replaces subgroup operations with a sequence of new brcst_active_ir3
intrinsics followed by a new [type]_clusters_ir3 intrinsic (where type
can be reduce, inclusive_scan, or exclusive_scan).

The brcst_active_ir3 intrinsic is lowered directly to a brcst.active
instruction. The other intrinsics get lowered to a new macro
(OPC_SCAN_CLUSTERS_MACRO) which later gets emitted as a loop (using
getlast/getone) that iterates all clusters and produces the requested
scan result.

OPC_SCAN_CLUSTERS_MACRO has a number of optional arguments. First, since
the exclusive scan result is not a natural by-product of the loop but
has to be calculated explicitly, its destination is optional. This is
necessary since adding it unconditionally will produce unused
instructions that won't be DCE'd anymore at this point. Second, when
performing 32b MUL_U reductions (that expand to multiple instructions),
an extra scratch register is necessary.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6387
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26950>
2024-02-02 19:49:22 +00:00
Job Noorman
6148e38a09 ir3: fix printing of brcst.active and quad_shuffle
Make sure they aren't treated as a texture instructions. For
brcst.active, also print its cluster size.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26950>
2024-02-02 19:49:22 +00:00
Job Noorman
6fa99abac0 ir3: optimize read_first.macro to a mov
Moves to shared registers keep the value written by the lowest active
fiber. This means that read_first.macro can simply be turned into a mov
and doesn't need a getone block.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26950>
2024-02-02 19:49:22 +00:00
Job Noorman
5c41a95e48 ir3: fix setting shared flag on parallel copy arguments
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26950>
2024-02-02 19:49:22 +00:00
Eric Engestrom
5ef744c660 ci: build panvk in debian-vulkan job
With !26116, !24610, and !27437 merged, we can now enable build-testing
of panvk with these extra checks, and prevent bugs like these from
happening again.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27441>
2024-02-02 19:14:29 +00:00
Daniel Schürmann
4fa27845e5 aco/insert_exec_mask: Reduce latency when switching to WQM.
Change pattern:
s_mov_b64 s[0:1], exec         s_mov_b64 s[0:1], exec
s_wqm_b64 exec, s[0:1]   ->    s_wqm_b64 exec, exec

Totals from 16667 (21.03% of 79242) affected shaders: (GFX11)

Instrs: 11317502 -> 11307484 (-0.09%); split: -0.09%, +0.00%
CodeSize: 60194272 -> 60155088 (-0.07%); split: -0.07%, +0.00%
Latency: 94345873 -> 94338374 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 13568872 -> 13568683 (-0.00%); split: -0.00%, +0.00%
Copies: 808334 -> 808332 (-0.00%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27112>
2024-02-02 18:55:15 +00:00
Daniel Schürmann
e89977ff71 aco: always terminate quads if they have been demoted entirely
Previously, quads got only terminated in top-level control flow.
This patch makes the behavior consistent.

Totals from 7811 (9.86% of 79242) affected shaders: (GFX11)

Instrs: 7859667 -> 7850757 (-0.11%); split: -0.18%, +0.07%
CodeSize: 41642280 -> 41611836 (-0.07%); split: -0.13%, +0.06%
Latency: 73692815 -> 73707588 (+0.02%); split: -0.02%, +0.04%
InvThroughput: 10672160 -> 10672323 (+0.00%); split: -0.01%, +0.01%
VClause: 137478 -> 137469 (-0.01%); split: -0.02%, +0.02%
SClause: 314905 -> 314924 (+0.01%); split: -0.19%, +0.20%
Copies: 587014 -> 576039 (-1.87%); split: -2.10%, +0.23%
Branches: 213101 -> 213123 (+0.01%); split: -0.01%, +0.02%
PreSGPRs: 313588 -> 313355 (-0.07%); split: -0.09%, +0.01%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27112>
2024-02-02 18:55:15 +00:00
Daniel Schürmann
a42b83e3fb aco/insert_exec_mask: tiny refactor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27112>
2024-02-02 18:55:15 +00:00
Tapani Pälli
5bea69cdd6 intel/blorp: add a TODO note about stencil buffer resolve
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/27355>
2024-02-02 18:28:39 +00:00
Samuel Pitoiset
9698d5f0fd radv: add a workaround for mipmaps and minLOD on GFX6-8
This is spurious and it looks like we should be able to uses non-zero
base level everytime on GFX6-8 but it doesn't always work.

This fixes the remaining CTS failures on GFX6-8.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26290>
2024-02-02 18:06:25 +00:00
Connor Abbott
dc1a3f9555 ir3: Fix comment thinko
Noticed when working on another commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22072>
2024-02-02 17:39:35 +00:00
Connor Abbott
c40bc48252 ir3: Calculate physical edges correctly
A block can have more than one extra physical successor, a fact that I
missed initially. Now that we've fixed up RA to handle it, we can
finally handle this correctly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22072>
2024-02-02 17:39:35 +00:00
Connor Abbott
9dbe511f18 ir3: Rewrite (jp) and branchstack handling
This pass will later also serve as a way to accurately insert physical
edges, which is the original motivation. However it also lets us put
branchstack handling on a more solid footing.

There was an off-by-one in the old branchstack handling because it
didn't consider that a single if-else actually has two reconvergence
points active at the same time, so it undercounted the branchstack by 1
for pretty much every shader. We change the HW formula to produce the
same result, which now makes it much more sensible.

We can also delete the physical predecessor handling in ir3_legalize,
because it was only needed to handle (jp) which is now handled earlier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22072>
2024-02-02 17:39:35 +00:00
Connor Abbott
6ad0cbafe8 ir3: Set branchstack earlier
We were relying on it in RA to tell us whether we could give more
registers to the shader mostly "for free" (because occupancy is bounded
by the branchstack), but it turns out it was actually 0 so we weren't
taking advantage of it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22072>
2024-02-02 17:39:35 +00:00
Connor Abbott
fa22b0901a ir3/ra: Add specialized shared register RA/spilling
There are two problems with shared register allocation at the moment:

1. We weren't modelling physical edges correctly, and once we do, the
   current hack in RA for handling them won't work correctly. This means
   live-range splitting doesn't work. I've tried various strategies but
   none of them seems to fix this.
2. Spilling of shared registers to non-shared registers isn't
   implemented.

Spilling of shared regs is significantly simpler than spilling
non-shared regs, because (1) spilling and unspilling is significantly
cheaper, just a single mov, and (2) we can swap "stack slots" (actually
non-shared regs) so all the complexity of parallel copy handling isn't
necessary. This means that it's much easier to integrate RA and
spilling, while still using the tree-scan framework, so that we can
spill instead of splitting live ranges. The other issue, of phi nodes
with physical edges, we can handle by spilling those phis earlier. For
this to work, we need to accurately insert physical edges based on
divergence analysis or else every phi node would involve physical edges,
which later commits will accomplish.

This commit adds a shared register allocation pass which is a
severely-cut-down version of RA and spilling. Everything to do with live
range splitting is cut from RA, and everything to do with parallel copy
handling and for spilling we simply always spill as long as soon as we
encounter a case where it's necessary. This could be improved,
especially the spilling strategy, but for now it keeps the pass simple
and cuts down on code duplication. Unfortunately there's still some
shared boilerplate with regular RA which seems unavoidable however.

The new RA requires us to redo liveness information, which is
significantly expensive, so we keep the ability of the old RA to handle
shared registers and only use the new RA when it may be required: either
something potentially requiring live-range splitting, or a too-high
shared register limit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22072>
2024-02-02 17:39:34 +00:00
Samuel Pitoiset
f977501a7c radv: do not allow to enable VK_EXT_shader_object with LLVM
This isn't expected to work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27415>
2024-02-02 17:14:56 +00:00
Konstantin Seurer
c925b6019d radv/rt: Lower ray payloads like hit attribs
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27051>
2024-02-02 16:36:15 +00:00
Erik Faye-Lund
4f0c33196c mesa: fix error-handling for ETC2/RGTC textures
It seems we missed an error-case that got introduced in OpenGL 4.4.

While this error doesn't *technically* exist as-is in OpenGL ES before
version 3, neither does 3D textures. And while OES_texture_3D introduces
it to OpenGL ES 2.0 without adding the same error for ETC2 textures,
that is likely an omission in the spec; 3D ETC2 texture was never a
thing.

This fixes a regression in the confidential Khronos CTS, specifically
GL46.gtf42.GL3Tests.texture_storage.texture_storage_compressed_texture_data

Fixes: 652a898d316 ("mesa/main: add support for EXT_texture_storage")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10545
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27428>
2024-02-02 16:06:19 +00:00
Eric Engestrom
5d293f01cc ci_run_n_monitor: avoid spamming a ton of "new status: created" for all the jobs at the beginning
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27419>
2024-02-02 15:25:22 +00:00
Eric Engestrom
6250885640 panfrost: fix UB caused by shifting signed int too far
Fixes: 13d7ca1300 ("pan/va: Optimize add with imm to ADD_IMM")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27437>
2024-02-02 14:56:20 +00:00
Mike Blumenkrantz
2085d60438 zink: run sparse lowering after all optimization passes
some passes (e.g., opt_shrink_vector) operate on the assumption that
sparse tex ops have a certain number of components and then remove components
and unset the sparse flag if they can optimize out the sparse usage

zink's sparse ops do not have the standard number of components, which
causes such passes to make incorrect assumptions and tag them as
not being sparse, which breaks everything

fix #10540

Fixes: 0d652c0c8d ("zink: shrink vectors during optimization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27414>
2024-02-02 14:36:25 +00:00
Mike Blumenkrantz
6a8cd7a64f zink: move sparse lowering up in file
no functional changes

Fixes: 0d652c0c8d ("zink: shrink vectors during optimization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27414>
2024-02-02 14:36:25 +00:00
Mike Blumenkrantz
aacc4e1c68 zink: zero allocate resident_defs array in ntv
this makes assert(def!=0) more reliable

Fixes: 73ef54e342 ("zink: handle residency return value from sparse texture instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27414>
2024-02-02 14:36:25 +00:00
Mike Blumenkrantz
3b025d6b42 zink: fix sparse bo placement
the util function here takes a bitmask of memory type indices, not properties.
rename the function and correct the usage

fixes sparse on nvidia blob

Fixes: c71287e70c ("zink: correct sparse bo mem_type_idx placement")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27414>
2024-02-02 14:36:25 +00:00
Konstantin Seurer
bb14ee53a5 radv/sqtt: Handle ray tracing pipelines with no traversal shader
Fixes: 0f87d40 ("radv/rt: Skip compiling a traversal shader")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27383>
2024-02-02 14:14:16 +01:00
Samuel Pitoiset
0aa9afa8e1 radv: add support for emitting VS+TCS compiled separately on GFX9+
With a VS prolog, we end up with 3 long jumps (VS prolog->VS->TCS->TCS
epilog), super annoying.

The shaders config must also be combined between VS and TCS.

This is for VK_EXT_shader_object.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27336>
2024-02-02 10:16:59 +01:00
Samuel Pitoiset
397a08b407 radv: always emit PGM_RSRC1_HS when emitting the TCS epilog state
This will simplify upcoming changes and it doesn't matter much because
this is for ESO only.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27336>
2024-02-02 10:16:59 +01:00
Samuel Pitoiset
542b9aaf18 radv: force TCS stage for VS as LS compiled separately on GFX9+
When VS as LS is compiled separately on GFX9+, the stage/previous_stage
must be VERTEX/TESS_CTRL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27336>
2024-02-02 10:16:59 +01:00
Samuel Pitoiset
3d5d163693 radv: always mark drawid/base_instance used with ESO
The user SGPR is always declared for merged shaders compiled separately
because the args must match.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27336>
2024-02-02 10:16:59 +01:00
Samuel Pitoiset
3c23ae8547 radv: rework shader arguments for separate compilation of VS+TCS on GFX9+
When VS or TCS are compiled separately on GFX9+, the shader input args
must match. This is implemented using a complete separate path, it's
duplicated but it seems cleaner than adding a ton of checks here and
there.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27336>
2024-02-02 10:16:59 +01:00
Samuel Pitoiset
1e55d91c82 radv: only merge shader info stages if both stages exist on GFX9+
With shader objects, both stages might not exist and if the src stage
doesn't, this will copy garbage data because it's unitialized.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27336>
2024-02-02 10:16:59 +01:00
Samuel Pitoiset
0018faf384 radv: check active NIR stages before trying to merge shaders on GFX9+
For shader object.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27336>
2024-02-02 10:16:59 +01:00
Samuel Pitoiset
1fe8770bbe radv: constify radv_device in radv_emit_shader_pointer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27336>
2024-02-02 10:16:59 +01:00
Samuel Pitoiset
3b2452da3c radv: set the default workgroup size for VS as LS
This will be optimized during shader info linking if TCS is present.
The main motivation for this change is ESO because the next stage
might not exist.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27396>
2024-02-02 08:53:20 +00:00
Samuel Pitoiset
2a58bbbed8 radv: determine the workgroup size for TCS earlier
This can be done before linking shader info pass.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27396>
2024-02-02 08:53:20 +00:00
Samuel Pitoiset
c6ca7fcc25 radv: remove radv_graphics_state_key::dynamic_patch_control_points
When the state isn't dynamic, the patch control points value must
greater than 0. Having a separate field isn't necessary.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27396>
2024-02-02 08:53:20 +00:00
Blisto
3bc6f95e3d driconf: set vk_x11_strict_image_count for Atlas Fallen Vulkan
Prevents crash with vsync turned off on xwayland.

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27122>
2024-02-02 07:48:22 +00:00
Mike Blumenkrantz
7b7a581a52 zink: prune dmabuf export tracking when adding resource binds
this avoids invalid access for the stack resource in add_resource_bind()
when adding a new bind to an exportable resource

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27395>
2024-02-02 03:51:52 +00:00
Dave Airlie
60d2ea83e8 vulkan/video: add AV1 decode support to common code
This adds the av1 decode parameters handling.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27423>
2024-02-02 03:18:52 +00:00
Ian Romanick
68da9e4dff intel/compiler/xe2: Set SIMD mode for sampler messages
Since SIMD8 no longer exists, the SIMD modes enums have different names
and different values.

v2 (Francisco Jerez): Rebase on 07b9bfacc7 ("intel/compiler: Move
logical-send lowering to a separate file").

v3: Update brw_disasm.c with SIMD descriptions.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27305>
2024-02-02 02:39:10 +00:00
Ian Romanick
84de7a88d3 intel/compiler/xe2: Emit texture instructions w/ combined LOD and array index
The extra assertions are just there to help validate
pack_lod_and_array_index (in nir_lower_tex.c).

v2: Split got_lod_or_bias into two variables. This simplifies some
changes that Sagar is working on. Suggested by Sagar.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27305>
2024-02-02 02:39:10 +00:00
Ian Romanick
c8ba2bc2f0 nir: Pack texture LOD and array index to a single 32-bit value
v2: Fix clamped_ai calculation in nir_lower_tex.c. Add
nir_tex_src_combined_lod_and_array_index_intel to
print_tex_instr. Suggested by Sagar.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27305>
2024-02-02 02:39:10 +00:00
Ian Romanick
78e7f7b377 intel/compiler/xe2: Use new sample_*_mlod messages
Note: a future commit will expand the sampler message type to the 6 bits
used on Xe2.

v2 (Francisco Jerez): Rebase on 07b9bfacc7 ("intel/compiler: Move
logical-send lowering to a separate file").

v3: Drop XE2_SAMPLER_MESSAGE_SAMPLE_BIAS_MLOD as it does not actually
exist. This resulted in some bigger changes in brw_disasm.c. Noticed
by Sagar.

v4: Now that XE2_SAMPLER_MESSAGE_SAMPLE_MLODc conflicts with
GFX7_SAMPLER_MESSAGE_SAMPLE_GATHER4_PO_C, the determination of
min_lod_is_first must include devinfo->ver or previous platforms will
break.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27305>
2024-02-02 02:39:09 +00:00
Sagar Ghuge
8690a6b546 intel/compiler/xe2: Handle 6-bit message type for Gfx20+
Message types are expanded to 6-bit encoding now. 5 bits are still the
same field from the Sampler Message Descriptor. The most significant bit
is now bit 31 of the Sampler Message Descriptor. The messages that have
'1 in bit 6 are only to support programmable offsets and those would
require message header. If a sampler type shows only 5 bits encoding, it
is implied bit 6 equal to 0 and there is no requirement for header.

v2 (idr): Trivial formatting changes.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27305>
2024-02-02 02:39:09 +00:00
Ian Romanick
a9ed9cf88b intel/fs: Move opcode modification before the switch that emits srcs
This small refactor simplifies a later commit that will optionally emit
some opcodes before the switch (as is already done with the shadow
comparitor).

v2 (Francisco Jerez): Rebase on 07b9bfacc7 ("intel/compiler: Move
logical-send lowering to a separate file").

v3 (Jordan): SHADER_OPCODE_TXL => SHADER_OPCODE_TXL_LZ (was
SHADER_OPCODE_TXF_LZ).

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27305>
2024-02-02 02:39:09 +00:00
Ian Romanick
7441af803f intel/compiler/xe2: Update get_sampler_lowered_simd_width
The Bspec also says, "The table below describes the SIMD modes which
are supported. SIMD32 and SIMD64 are used for media-type operations
only."  Perhaps this commit should just add

    if (devinfo->ver >= 20)
        return 16;

instead.

v2: Use reg_unit in get_sampler_lowered_simd_width. Suggested by Sagar.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27305>
2024-02-02 02:39:09 +00:00
Mike Blumenkrantz
24a7f6cd16 zink: add a tu flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27422>
2024-02-02 02:23:02 +00:00
Dave Airlie
59fb425e1c vulkan: update registry/includes to 1.3.277
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27421>
2024-02-02 01:46:24 +00:00
Jesse Natalie
559f31e202 dzn: Use blits for all non-averaging resolves
Trying to do min/max resolves on depth/stencil is failing for me on
hardware, just simplify things and always use a manual resolve for
modes that aren't average.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348>
2024-02-02 01:19:52 +00:00
Jesse Natalie
70fa127c97 dzn: Use correct format for depth/stencil resolves
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348>
2024-02-02 01:19:52 +00:00
Jesse Natalie
973c5bd047 dzn: Don't resolve for RESOLVE_MODE_NONE
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348>
2024-02-02 01:19:52 +00:00
Jesse Natalie
dd7cfd5255 dzn: Add a debug flag for forcing off native view instancing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348>
2024-02-02 01:19:52 +00:00
Jesse Natalie
a85e8058cb dzn: Support non-static samplers for meta
Some hardware that doesn't support true static samplers, emulates it
by copying all static samplers into a reserved portion of every descriptor
heap. To support Vulkan's required 4000 live sampler limit in bindless
mode, D3D is now able to create descriptor heaps which do not have a reserved
portion. Any descriptor heaps above the MaxSamplerDescriptorHeapSizeWithStaticSamplers
limit will not have that reserved portion and cannot be used with static samplers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348>
2024-02-02 01:19:51 +00:00
Jesse Natalie
c286c01136 dzn: Add barrier to copy source for DispatchIndirect copies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348>
2024-02-02 01:19:51 +00:00
Jesse Natalie
581a23c0cc dzn: Add missing handling of VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348>
2024-02-02 01:19:51 +00:00
Jesse Natalie
60aad6ef07 spirv2dxil: Lower the Vulkan memory model and coherent loads/stores
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348>
2024-02-02 01:19:51 +00:00
Jesse Natalie
003d2da2dc microsoft/compiler: Add a pass for promoting ACCESS_COHERENT on loads/stores
DXIL doesn't have instruction-level coherency. We have 3 options:
1. Promote the instruction to an atomic instruction. We can only do this
   for 32-bit or 64-bit ops.
2. If using bindless, declare the local resource declaration as globally-coherent.
3. If not using bindless, add globally-coherent to the global resource declaration.

This pass does all 3 of these, stopping at the intrinsic level for supported types
of atomics, otherwise assigning to the global resource declaration, which will be
unused if we're doing bindless, where instead we'll get it from the instruction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348>
2024-02-02 01:19:51 +00:00
Jesse Natalie
b74cd405d3 microsoft/compiler: Respect ACCESS_COHERENT in UAV variable data
DXIL has a globally-coherent field for UAVs. When emitting UAV metadata
based on a resource variable, respect the relevant bit in the var data.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5628
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27348>
2024-02-02 01:19:51 +00:00
Ian Romanick
118e0bdc1f intel/rt: Don't directly generate umul_32x16
The optimization pass will (eventually) turn the imul into a
umul_32x16. In many cases, the multiply will be converted to something
else.

I also tried cloning a bunch of existing imul algebraic patterns for
[iu]mul_32x16. This produced the same result, but it was a lot more
churn.

All of the shaders affected were ray tracing shaders in Q2RTX. This is
the only ray tracing workload in my fossil-db.

DG2
Totals:
Instrs: 191995626 -> 191995079 (-0.00%); split: -0.00%, +0.00%
Cycles: 14003803561 -> 14003798040 (-0.00%); split: -0.00%, +0.00%
Spill count: 108320 -> 108288 (-0.03%)
Fill count: 200695 -> 200663 (-0.02%)
Scratch Memory Size: 8755200 -> 8754176 (-0.01%)

Totals from 7 (0.00% of 652118) affected shaders:
Instrs: 14998 -> 14451 (-3.65%); split: -3.94%, +0.29%
Cycles: 137222 -> 131701 (-4.02%); split: -4.10%, +0.07%
Spill count: 32 -> 0 (-inf%)
Fill count: 32 -> 0 (-inf%)
Scratch Memory Size: 19456 -> 18432 (-5.26%)

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27161>
2024-02-02 00:02:05 +00:00
Timothy Arceri
bc0178af57 glsl: don't tree graft globals
As per this optimisations description:

"Takes assignments to variables that are dereferenced only
once and pastes the RHS expression into where the variables
dereferenced."

However the optimisation is run at compile time before multiple
shaders from the same stage could have been pasted together.
So this optimisation can incorrectly assume a global is only
referenced once since it cannot see the other pieces of the
shader stage until link time.

Here we skip the optimisation if the variable is a global. We
could change it to only run at link time however this
optimisation is only run at link time if we are being forced
to use GLSL IR to inline a function that glsl to nir cannot
handle and this will also be removed in a future patchset.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10482
Fixes: d75a36a9ee ("glsl: remove do_copy_propagation_elements() optimisation pass")

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27351>
2024-02-01 23:15:24 +00:00
Eric Engestrom
98197e15cc ci: explain purpose of the word after the date in image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27379>
2024-02-01 22:10:09 +00:00
Eric Engestrom
b6d70eb099 ci: reduce maximum image tags length from 30 to 20
To keep a margin in case we need to add something more in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27379>
2024-02-01 22:10:09 +00:00
Eric Engestrom
b6fceeaa9f ci: enforce maximum image tag length
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27379>
2024-02-01 22:10:09 +00:00
Eric Engestrom
73dcdc50d2 ci: drop dash in image tags dates
I put dashes in the dates when I first introduced the image tags; it
made sense to improve date readability as we had only a handful of these
and they barely combined.

Nowadays we combine a lot of these tags to form the docker image tags,
and we often run out of space.

Let's remove these dashes, making dates slightly harder to read, and
instead allow these two extra characters to be used in the
unique/descriptive part of the tag.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27379>
2024-02-01 22:10:09 +00:00
Gert Wollny
dd267ab434 zink: move zink_resource_copies_reset out of exportable_lock
The function takes care of synchronization by itself, so no need to also
protect the call by ctx->batch.state->exportable_lock.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27327>
2024-02-01 21:22:25 +01:00
Gert Wollny
01e64bbf36 zink/sync: remove duplicate assignments in UNSYNCHRONIZED case
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27327>
2024-02-01 21:22:25 +01:00
Gert Wollny
ef548bf040 zink: extract update_unordered_access_and_get_cmdbuf
Use template specialization to handle the static control flow based
on template parameters during code generation instead of relying
on the optimizer to remove the unused code path.

v2: - Fix function opening brace location (zmike)
    - remove accidently added dead code

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27327>
2024-02-01 21:22:25 +01:00
Gert Wollny
ceca832662 zink: extract emit_memory_barrier::for_buffer from zink_resource_buffer_barrier
Use template specialization to handle the static control flow based
on template parameters during code generation instead of relying
on the optimizer to remove the unused code path.

v2: - move function opening braces to new line and fix indetion (zmike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27327>
2024-02-01 21:22:25 +01:00
Gert Wollny
8c1ddcace9 zink: extract emit_memory_barrier from zink_resource_image_barrier
Replace the generic true/false by an enum to make the intent clearer.

Factor out the emission of the barrier, and use template specialization
to pick the type of barrier that is to be emitted, because with template
specialization the control flow is avoided altogether, whereas with
the static code flow it is up to the optimizer to remove the unused bits -
which may not happen in debug builds.

v2: Fix function start braces (zmike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27327>
2024-02-01 21:22:25 +01:00
Gert Wollny
2cac3adf31 zink: remove duplicate check and assignment in zink_resource_image_needs_barrier
zink_resource_image_barrier already checks and sets the
pipeline and the flags.

v2: make zink_resource_image_needs_barrier private (zmike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27327>
2024-02-01 21:22:25 +01:00
Gert Wollny
de354a48b9 zink: extract check_unordered_exec from zink_get_cmdbuf
Avoid some code duplication and interleaving of resource checks

v2: Use ALWAYS_INLINE (zmike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27327>
2024-02-01 21:22:25 +01:00
Yiwei Zhang
558aca10b4 meson: drop -DANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
53d9debcf4 util: refactor to use DETECT_OS_ANDROID
except leaving u_endian.h behind to use __ANDROID__ directly to be
consistent with the rest in that file, which deserves a different
refactor

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
569437221d gallium: refactor to use DETECT_OS_ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
8762b2fca1 egl: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
5a37340689 turnip: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
5df083eff7 radv: refactor to use DETECT_OS_ANDROID instead of ANDROID
Include a tiny refactor in radv_physical_device_get_supported_extensions
to avoid a false formatting issue.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
4fd4a6109d anv: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
a678b7434a hasvk: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
f245339120 venus: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
f06d7f6942 v3dv: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
2dd95bc4b7 vulkan/runtime: refactor to use DETECT_OS_ANDROID instead of ANDROID
Also update vk_android_native_buffer.h to use __ANDROID__ directly.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
f7d35be362 vulkan/util: drop redundant code gen from vk_extensions_gen.py
driver is now always 'vk'.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:48 +00:00
Yiwei Zhang
1e80a426c2 anv: extend implicit fencing support for case requiring implicit write
This change extends the coverage to ANV being the producer while
consumer is hardware encoder backed by iHD. So we'd apply implicit write
to bos backing render target images, which is mostly aligned with
i915_batch_submit tracking of the bos being writtern to.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27398>
2024-02-01 18:53:28 +00:00
Yiwei Zhang
be3af5acf6 anv: optimize the implicit fencing support of external memory
Previously we apply implicit sync to all external memory, which is a bit
redundant since we only need it for the dedicated image scenario (media
image imported into Vulkan). This change optimizes just like that while
also excluding wsi which has its own way of synchronizing with the
compositor.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27398>
2024-02-01 18:53:28 +00:00
Yiwei Zhang
55ac9a08b5 anv: refactor wsi_memory_allocate_info handling
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27398>
2024-02-01 18:53:28 +00:00
Eric Engestrom
f8078e278c docs/calendar: add 24.1 branchpoint and release schedule
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27403>
2024-02-01 18:02:46 +00:00
Roland Scheidegger
e04eed2827 auxiliary/draw: fix streamout overflow calculation
If the stride is larger than the component with the largest offset plus
the size of that component, it is still considered an overflow if there's
not enough space in the buffer to fit the whole stride-sized thing,
even when there would be enough space to actually write all components.
This is actually much simpler too, since we don't need to verify the
individual components at all (stride is guaranteed to be larger or equal
to the component with the largest offset plus the size of that component).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27368>
2024-02-01 17:10:40 +00:00
Eric Engestrom
eb4effeead v3d-rpi4-gl: reduce the parallelism from 10 to 8
We are slightly over-subscribed right now, with 21 merge jobs (10 vk
+ 10 gl + 1 traces) for 20 RPi4, so let's split the tests between
slightly fewer RPi4 and make each split job run for slightly longer,
because it also means that all the jobs start immediately, reducing the
overall delay in merging any MR that triggers this job.

The typical run time for this job was around 8 min with a 10-split; with
an 8-split it is now 9 min, which is still within the 10 min target and
well below the 15min limit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27391>
2024-02-01 13:45:59 +00:00
Lionel Landwerlin
03490ec019 vulkan/runtime: rework VK_KHR_dynamic_rendering_local_read state tracking
I missed a bunch of things like input tracking. Also take the
opportunity to rename things.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: fe19405c46 ("vulkan/runtime: handle new dynamic states for attachment remapping")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27380>
2024-02-01 13:20:21 +00:00
Lionel Landwerlin
d7f5a815e3 vulkan/multialloc: bump max number to 16
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27380>
2024-02-01 13:20:21 +00:00
Erik Faye-Lund
4de62731f4 mesa/main: add support for EXT_texture_storage
It's sometimes really, really useful if GL_BGRA8 can be used as a
sized internal format, and the combination of EXT_texture_storage
and EXT_texture_format_BGRA8888 allows this (only when using
texture-storage, which is good enough in some cases). Until now,
we've only implemented ARB_texture_storage, and not the EXT
version.

So let's implement the EXT version as well, so we get the benefit
of the interaction here. This pulls in a lot of other similar
interactions as well, which also seems useful.

...because the ARB version is created from the EXT version, let's move
the EXT function definitions to the EXT extension. These should probably
have been suffixed with ARB in the ARB-version, but things seems to have
just ended up kinda confused. Oh well.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27222>
2024-02-01 12:30:58 +00:00
Alejandro Piñeiro
16f6f50ce4 v3dv: expose VK_EXT_depth_clip_enable
We already had the logic implemented, but it was never really tested
(there was a comment about that)

So the advantage of this is that we now test that code (in fact, there
were a small typo on that code).

There aren't too much CTS tests for this feature, but we gets tests
like this working:
dEQP-VK.clipping.clip_volume.depth_clip.*

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

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27386>
2024-02-01 11:33:38 +00:00
Luc Ma
03371887d5 gallium/u_blitter: Fix a few uninitialized fb_state
An uninitialized pipe_framebuffer_state maybe causes some issues
if someone is about to use its members such as `fb_state.layers`.

Signed-off-by: Luc Ma <luc@sietium.com>
Reported-by: Mark Zhou <mark@sietium.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27332>
2024-02-01 10:59:53 +00:00
Pierre-Eric Pelloux-Prayer
6f47e87a60 egl/drm: flush before calling get_back_bo
Similar to what was done for Wayland in 58f90fd03f:
the glthread unmarhsal thread needs to be idle to avoid
concurrent calls to get_back_bo.

Also the existing code flushed after setting dri2_surf->back
to NULL so a new back buffer was always allocated by the
glthread flush:

|---------------> dri2_drm_swap_buffers
| get_back_bo (back=0x55eb93c6c488) >       # First get_back_bo call
| get_back_bo (back=0x55eb93c6c488 age: 0)<
|                                           # dri2_surf->back = NULL
|-----> FLUSH
| get_back_bo (back=nil) >                  # Another get_back_bo call
| get_back_bo (back=0x55eb93c6c4c8 age: 3)<
|-----< FLUSH
|---------------< dri2_drm_swap_buffers

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10437
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27143>
2024-02-01 09:26:33 +00:00
Pierre-Eric Pelloux-Prayer
d9f15f8d9b meson: require libelf when radeonsi is built
radeonsi has a hard dependency on libelf so tell meson about this
requirement.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10240
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27295>
2024-02-01 09:28:41 +01:00
Pierre-Eric Pelloux-Prayer
e4f7754977 radeonsi: try to disable dcc if compute_blit is the only option
COMPUTE contexts have no blitter so there are no fallback to
si_can_use_compute_blit failing.

One solution would be to disable DCC globally when a COMPUTE context is
created but I'm not 100% sure it's a good idea.

Until then this commit can fix a number of cases and will also prevent
crashing if si_compute_blit fails.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10296
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27295>
2024-02-01 09:28:31 +01:00
Friedrich Vock
f66055a6a6 radv/rt: Write inactive node data in ALWAYS_ACTIVE workaround
Fixes: a9831caa ("radv/rt: Add workaround to make leaves always active")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27340>
2024-02-01 05:42:59 +00:00
Faith Ekstrand
60071f94e5 nvk: Use the upload queue for shader uploads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
aea4c9a913 nvk: Add an upload queue to nvk_device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
2074e28a0d nvk: Add an upload queue
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
e6f137e9ed nvk: Only map heaps that explicitly request maps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
e162c2e78e nvk: Use VM_BIND for contiguous heaps instead of copying
This gets rid of our (fairly sketchy) heap resizing via stall-and-copy
and replaces it with VM_BIND.  We couldn't do this on the old nouveau
API but now that we can assume VM_BIND, it makes everything simpler.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
f0fad6ed17 nvk/queue: Only initialize the necessary engines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
ced7c5193e nvk/queue: Rework context state init
The queue now owns the nv_push and just invokes the per-engine functions
to fill it with context state init data.  This also splits out 3D and
compute into separate helpers and pulls M2MF off into its own thing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
b02f83e5c6 nvk: Add an array of queue families to nvk_physical_device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
86e79cd744 nvk: Move the nouveau_ws_context to nvk_queue
Otherwise, different queues aren't actually going to run independently.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
3273eaf52a nvk/queue: Refactor the push builder a bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
88b19ccc3f nvk/queue: Pull DRM specfc stuff into nvk_queue_drm.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
88445fc12a nouveau/winsys: Allow only allocating a subset of engines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
c4ea8ab527 nouveau/winsys: Re-order channel creation
Also, rework the fail gotos so they make a little more sense.  Since we
were already calling dealloc the first time a subchan fails, we may as
well just always use dealloc.  Worst case the ioctl fails.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Timothy Arceri
ec4990ef41 glsl: remove now unused GLSL IR validate_geometry_shader_emissions()
We now use the nir version of this validation pass instead.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27377>
2024-02-01 01:53:15 +00:00
Timothy Arceri
ce3420394c glsl: use nir version of geom stream validation
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27377>
2024-02-01 01:53:15 +00:00
Timothy Arceri
f21e2e6229 glsl: add nir version of validate_geometry_shader_emissions()
We will use this to replace the GLSL IR version.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27377>
2024-02-01 01:53:15 +00:00
Eric Engestrom
cdfbd3323d docs: add sha256sum for 23.3.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27405>
2024-02-01 01:46:55 +00:00
Eric Engestrom
f140c5ed64 docs: update calendar for 23.3.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27405>
2024-02-01 01:46:55 +00:00
Eric Engestrom
7217e62b3e docs: add release notes for 23.3.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27405>
2024-02-01 01:46:55 +00:00
Dave Airlie
ff50e80574 zink: use sparse residency for buffers.
GL ARB_sparse_buffer allows unbound regions in buffers.
VK sparseBinding insists all regions must be bound before first use.

This means we need to use sparseResidencyBuffer to back GL
sparse buffers to get the same semantics.

Fixes GL and piglit sparse buffer tests on zink/nvk.

Fixes: c90246b682 ("zink: implement sparse buffer creation/mapping")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27404>
2024-02-01 01:08:22 +00:00
Eric Engestrom
4f6e4ae3d6 docs/release-calendar: add planned 24.0.x bugfix releases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27402>
2024-02-01 00:29:43 +00:00
Eric Engestrom
dd141af19e docs: add sha256sum for 24.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27402>
2024-02-01 00:18:15 +00:00
Eric Engestrom
8aa0ef0d01 docs: add release notes for 24.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27402>
2024-02-01 00:18:15 +00:00
Eric Engestrom
331e6f5b5e docs: update calendar for 24.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27402>
2024-02-01 00:11:28 +00:00
Dave Airlie
1d1a7f9d56 nvk: mem cannot be null in binding buffers/images.
Tom on discord pointed out a coverity warning in this area about
mem dereferences. Vulkan API states that mem must be non-NULL,
so remove those paths that are unused.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27255>
2024-01-31 22:57:57 +00:00
José Roberto de Souza
44b4fee786 iris: Avoid read of uninitialized value in blorp_clear_stencil_as_rgba()
In clear_depth_stencil() stencil_surf is defined but not initiaized.
Then in the same function if stencil_mask is calculated and if != 0
stencil_surf is initialized.
But blorp_clear_stencil_as_rgba() access stencil_surf before checking
stencil_mask, what could cause a read of a uninitialized valued.

clear_depth_stencil()
	struct blorp_surf stencil_surf;
	...
	uint8_t stencil_mask = clear_stencil && stencil_res ? 0xff : 0;
	if (stencil_mask) {
		...
		iris_blorp_surf_for_resource(&stencil_surf);
	}
	...
	blorp_clear_depth_stencil(stencil_mask, stencil_surf)
		blorp_clear_stencil_as_rgba(stencil_mask, stencil)
			if (surf->surf->format ...)
				....

Just inverting the order and checking stencil_mask first in
blorp_clear_stencil_as_rgba() fixes the issue.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27390>
2024-01-31 22:29:31 +00:00
Eric Engestrom
90b6f84c5e ci: when specifying a driver remove all other ones
If we need to specify a driver, it means several drivers could pick up this gpu;
ensure that the other driver can't accidentally be used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25434>
2024-01-31 21:50:03 +00:00
Tapani Pälli
a53af34664 anv: use workaround framework for Wa_22018402687
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/27384>
2024-01-31 21:24:14 +00:00
Eric Engestrom
c35247ab20 vk/util: fix 'beta' check for physical device properties
`--beta` is a string, not a bool (although really it should be, but that's a bigger change).

Fixes: 083793a39d ("vulkan: Allow beta extensions for physical device properties")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27394>
2024-01-31 20:47:30 +00:00
Eric Engestrom
794ec7f0a1 vk/util: fix 'beta' check for physical device features
`--beta` is a string, not a bool (although really it should be, but that's a bigger change).

Fixes: a7141a6f8a ("vulkan: Allow beta extensions for physical device features")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27394>
2024-01-31 20:47:30 +00:00
Max R
253968fc60 d3d10umd: Use flush_frontbuffer for Present
This is required to allow gallium drivers to display instead of
forcing software display. On llvmpipe/softpipe for sw display
gdi_sw_winsys will be used. While "hardware" drivers will be
able to call pfnPresentCb to present without CPU copy.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27333>
2024-01-31 20:04:38 +00:00
Max R
2b5e257690 winsys/gdi: Custom acquisition of hDC
In d3d10umd it is required to pass D3DKMT_PRESENT in
context_private of flush_frontbuffer, but wgl passes HDC in it.
To accomidate this when gdi_sw_winsys is created functions that
acquire and release hdc from context_private are passed.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27333>
2024-01-31 20:04:38 +00:00
Max R
be4b1c2639 winsys/gdi: Handle R8G8B8 formats
R8G8B8 is often used by d3d11 applications.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27333>
2024-01-31 20:04:37 +00:00
Sagar Ghuge
01636ee700 anv: Disable compression if we have concurrent sharing mode
If a resource is created with sharing mode CONCURRENT when multiple
queues are supported, we can't support the compression since we can't do
FULL_RESOLVE/PARTIAL_RESOLVE to construct the main surface data without
barriers.

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/27349>
2024-01-31 19:28:12 +00:00
Sagar Ghuge
9a4d951ef9 vulkan/runtime: Track VkSharingMode in vk_image
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/27349>
2024-01-31 19:28:12 +00:00
Dylan Baker
4cd5b2b542 intel/hasvk: assume() we don't get ISL_NUM_FORMATS
Because coverity

CID: 1559412
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27369>
2024-01-31 18:59:16 +00:00
Dylan Baker
3d4ef6f983 intel/vulkan: assume() that we don't use "ISL_NUM_FORMATS"
Which coverity thinks will happen, even though we never return
ISL_NUM_FORMATS.

CID: 1559463
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27369>
2024-01-31 18:59:16 +00:00
Mike Blumenkrantz
529e7ab975 lavapipe: RM2024 extension promotions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27296>
2024-01-31 18:17:55 +00:00
Friedrich Vock
1c01fd0286 util/disk_cache: Use secure_getenv to determine cache directories
Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:12 +00:00
Friedrich Vock
e8b0e5cac9 radv: Use secure_getenv for RADV_THREAD_TRACE_TRIGGER
Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:12 +00:00
Friedrich Vock
c01a07f2e4 radv: Use secure_getenv in radv_builtin_cache_path
Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:12 +00:00
Friedrich Vock
72f95a8364 mesa/main: Use secure_getenv for shader dumping
Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:12 +00:00
Friedrich Vock
321e2cee53 vtn: Use secure_getenv for shader dumping
Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:12 +00:00
Friedrich Vock
f3b892b74a aux/trace: Guard triggers behind __normal_user
Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:11 +00:00
Friedrich Vock
7ea96ff75b vulkan: Use secure_getenv for trigger files
Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:11 +00:00
Friedrich Vock
8b209a6200 util: Provide a secure_getenv fallback for platforms without it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:11 +00:00
Eric Engestrom
0fa4ea98ca ci: always skip dEQP-VK.info.device_extensions
Exclude this test which might fail when a new extension is implemented.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27389>
2024-01-31 16:48:16 +00:00
Gert Wollny
4824238dd9 zink: Fix return type and values of create_buffer and create_images
Fixes: f6383e03f9
    zink: use enums as return values in resource_object_create

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10532
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27387>
2024-01-31 14:56:55 +00:00
Daniel Schürmann
c309d20172 aco/insert_exec_mask: Fix unconditional demote at top-level control flow.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27362>
2024-01-31 13:50:46 +00:00
Dave Airlie
4097df29f6 nvk: allow 3d compressed textures
Fixes KHR-GL45.packed_pixels.varied_rectangle.compressed_*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26990>
2024-01-31 13:32:32 +00:00
Faith Ekstrand
9ddf647eab nvk: Fix whitespace in nvk_image.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26990>
2024-01-31 13:32:32 +00:00
Faith Ekstrand
e8bec58de0 nil: Set the level offset to 0 in nil_image_for_level
The offset_B member of levels[0] should always be 0.  In this case,
we're copying the level from the previous image but we've already taken
the offset into account via the offset_B_out parameter.  Leaving the
offset non-zero risks it getting added in twice if nil_image_for_level
gets called again.  In particular, NVK can hit this with 3D compressed
textures with VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT set.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26990>
2024-01-31 13:32:32 +00:00
Antoine Coutant
445aacb421 clc: retrieve libclang path at runtime.
LLVM_LIB_DIR is a variable used for runtime compilations.
When cross compiling, LLVM_LIB_DIR must be set to the
libclang path on the target. So, this path should not
be retrieved during compilation but at runtime.

dladdr uses an address to search for a loaded library.
If a library is found, it returns information about it.
The path to the libclang library can therefore be
retrieved using one of its functions. This is useful
because we don't know the name of the libclang library
(libclang.so.X or libclang-cpp.so.X)

v2 (Karol): use clang::CompilerInvocation::CreateFromArgs for dladdr
v3 (Karol): follow symlinks to fix errors on debian

Fixes: e22491c832 ("clc: fetch clang resource dir at runtime")
Signed-off-by: Antoine Coutant <antoine.coutant@smile.fr>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by (v1): Jesse Natalie <jenatali@microsoft.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25568>
2024-01-31 12:23:49 +00:00
Karol Herbst
8efd11fce9 clc: force fPIC for every user when using shared LLVM
As we want to start using `dladdr`, this is needed to prevent `dladdr`
returning information of the wrong file.

Fixes tag as it's required by the actual fix.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Fixes: e22491c832 ("clc: fetch clang resource dir at runtime")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25568>
2024-01-31 12:23:49 +00:00
Karol Herbst
37a1346347 meson: remove opencl-external-clang-headers option and rely on shared-llvm
Setting opencl-external-clang-headers to enabled while using shared LLVM
was broken and this option was mostly used for windows to force static
inclusion of opencl base headers.

Simply relying on the shared-llvm option here is enough to get what we
want.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25568>
2024-01-31 12:23:49 +00:00
Eric Engestrom
501f78fdba util: check for setgid() as well in __normal_user()
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27378>
2024-01-31 11:42:56 +00:00
Eric Engestrom
afd4e633ee util: simplify logic in __normal_user()
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27378>
2024-01-31 11:42:55 +00:00
Iago Toral Quiroga
6c570f7a98 v3dv: allow subgroup operations in fragment shaders
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
e5bfce6f46 broadcom/compiler: support subgroup reduction operations from fragment shaders
In fragment shaders these instructions consider a lane active when
any lane in the same quad is active, which is not what we want, so
we need to include the current sample mask in the condition mask
used with these instructions to limit lane selection to those that
are really active.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
3544113ee2 brodcom/compiler: implement non-compute TSY barrier
The BARRIER_ID instruction is only available in compute
and tessellation, implement an equivalent barrier that we
can use from other stages.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
5b269814fc broadcom/compiler: be more careful with unifa in non-uniform control flow
If the lane from which the hardware writes the unifa address
is disabled, then we may end up with a bogus address and invalid
memory accesses from follow-up ldunifa.

Instead of always disabling unifa loads in non-uniform control
flow we can try to see if the address is prouced from a nir
register (which is the only case where we do conditional writes
under non-uniform control flow in ntq_store_def), and only
disable it in that case.

When enabling subgroups for graphics pipelines, this fixes a
GMP violation in the simulator with the following test
(which has non-uniform control flow writing unifa with lane 0
disabled, which is the lane from which the unifa takes the
address):
dEQP-VK.subgroups.ballot_broadcast.graphics.subgroupbroadcastfirst_int

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
31e8740808 v3dv: expose more subgroup features on V3D 7.x
The hardware included additional instructions to support more
subgroup features, so let's put them to use.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
93df9800e8 broadcom/compiler: support subgroup quad
These can all be implemented as specialized shuffles, so we
use the NIR lowering to do that.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
69d3b90839 broadcom/compiler: support subgroup vote
We don't rely in any lowerings for these (other than
scalarization). The only noteworthy aspect is that these
instructions, like ballot, use the condition mask to
filter out valid invocations that are inactive because of
control flow.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
3222fd71a1 broadcom/compiler: support subgroup shuffle
This maps to our native shuffle instruction. For shuffle relative
and shuffle xor, we rely on the nir lowering to lower this to
ALU and regular shuffle.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
29a5e3e615 broadcom/compiler: support subgroup ballot
This adds support in our compiler for the subgroup ballot
feature. To this end we start using the NIR lowering for
subgroups which can lowers some of these intrinsics into
things more amenable to our hardware and takes care of
scalarization.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
295f906517 broadcom/compiler: don't move subgroup reduction instructions above setmsf
These use the sample mask to decide about active lanes, so we need
to make sure we don't move them above a previous setmsf instruction.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
9bbfbc2089 broadcom/compiler: add new SFU instructions in V3D 7.x
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
7bdc8898b1 broadcom/compiler: fix incorrect flags update for subgroup elect
c->execute is 0 (not the block index) for lanes currently active
under non-uniform control flow.

Also this simplifies a bit the instructions we emit for flag
generation, both for uniform and non-uniform control flow.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
29d4924e5e broadcom/compiler: fix incorrect flags setup in non-uniform if path
If the ELSE block is cheap then we don't emit the branch instruction
but we still want to generate the flags, since these are setting
the flags for the THEN block too.

Fixes: e401add741 ("broadcom/compiler: skip jumps in non-uniform if/then when block cost is small")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Konstantin Seurer
13ca3d0eeb radv/sqtt: Set SeparateCompiled for monolithic RT pipelines
RGP can not handle how we implement "Unified" ray tracing pipelines and
only shows the prolog.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:24:24 +01:00
Konstantin Seurer
6d2926c54e radv: Skip unused acceleration structure build paths
If the whole batch doesn't use a path, we can skip binding the pipeline
and writing an user event.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:24:20 +01:00
Konstantin Seurer
93b1eec09b radv: Emit user events during acceleration structure builds
This way, we can see exactly which dispatches belong to acceleration
structure builds and which dispatches were caused by the app. We loose
the red coloring in RGP for this, but we get way more information.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:24:15 +01:00
Konstantin Seurer
22b719b445 radv: Make radv_write_user_event_marker non-static
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:24:11 +01:00
Konstantin Seurer
f43099ecf5 radv: Reduce the amount of radv_device_to_handle calls
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:24:06 +01:00
Konstantin Seurer
41e78330e7 radv/radix_sort: clang-format
The formatting was changed and those files were missed.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:23:51 +01:00
Hyunjun Ko
d0d2cf549b anv/video: fix out-of-bounds read
Since STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE is 19.

Fixes: 8d519eb5 ("anv: add initial video decode support for h265")
Closes: mesa/mesa#10529

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27373>
2024-01-31 08:24:22 +00:00
Samuel Pitoiset
31e29f7304 radv: enable deviceFaultVendorBinary if RADV_DEBUG=hang is set
Ideally, if deviceFaultVendorBinary is enabled by the app,
RADV_DEBUG=hang should be enabled behind the scene, but this isn't
possible right now because CTS always enables the feature.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27293>
2024-01-31 08:45:08 +01:00
Samuel Pitoiset
a778d5fd0d radv: export GPU hang reports through VK_EXT_device_fault
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27293>
2024-01-31 08:45:08 +01:00
Samuel Pitoiset
8c3d1c9140 radv: add support for keeping GPU hang reports in memory
To be exported through VK_EXT_device_fault when the feature is enabled
by app, otherwise it's saved on disk.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27293>
2024-01-31 08:45:08 +01:00
Samuel Pitoiset
c710cba0c7 radv: refactor dumping GPU hang reports by using chunks
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27293>
2024-01-31 08:41:54 +01:00
Samuel Pitoiset
7a20946579 radv: add a helper to know if device fault detection is enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27293>
2024-01-31 08:41:54 +01:00
Zan Dobersek
f9c4e25483 freedreno: add fd_rd_output facilities for gzip-compressed RD dumps
Provide fd_rd_output facilities which enable constructing RD dumps that are
stored into gzip-compressed output. This matches the default behavior of
libwrap. Enabling and adjusting the behavior of functionality is done
through the FD_RD_DUMP environment variable.

Integration into Turnip's MSM backend is covered, replacing the previous
RD dump that was enabled through TU_DEBUG=rd. That debug option still
works and is the same as using FD_RD_DUMP=enable.

By default the dumps are created for each submission, using the provided
submit index. FD_RD_DUMP=combine enables gathering dumps for submissions
for the given logical device into a single file.

In the Turnip integration, FD_RD_DUMP=full will force dumping contents of
any buffer object. Additionally, with that option enabled any previous
submit will be waited on.

Specifying FD_RD_DUMP=trigger sets up a trigger file that can be used to
activate dumping manually. Writing zero or some non-integer value to the
file will disable dumping. Writing a positive integer value to it will
enable dumps for that many future submissions. Writing -1 to it will enable
dumps until disabled.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27230>
2024-01-31 07:59:30 +01:00
Mike Blumenkrantz
0a97d1ebfa zink: fix descriptor buffer unmaps on screen destroy
descriptor buffer uses mapped buffers. mapping/unmapping buffers
uses a ctx in the function params, but at this time there is no ctx.
since the ctx is not actually used for unmapping descriptor buffers,
this can instead use a special buffer unmap function to avoid invalid access

Fixes: b06f6e00fb ("zink: fix heap-use-after-free on batch_state with sub-allocated pipe_resources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27344>
2024-01-31 04:08:20 +00:00
Mike Blumenkrantz
c900cca96c zink: always map descriptor buffers as COHERENT
this is already implied since the buffers must be BAR-allocated,
but it ensures the context isn't accessed during unmap

Fixes: b06f6e00fb ("zink: fix heap-use-after-free on batch_state with sub-allocated pipe_resources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27344>
2024-01-31 04:08:20 +00:00
Bas Nieuwenhuizen
3f119a1fd8 util/disk_cache: Add marker on cache usage.
To be able to delete it later if it isn't used. Checking the mtime
on e.g. the index doesn't work if we always hit the cache so add
something that writes unconditionally.

Only once per day to avoid excessive writes.

(See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22339)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27173>
2024-01-31 03:14:02 +00:00
Yiwei Zhang
5fbb00dbc7 venus: use obj handle instead of id in device memory report
Now the id is separately assigned in venus, while the test expects
handle.

Fixes: 7f9381782f ("venus: ensure object id is unique")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27285>
2024-01-31 02:58:57 +00:00
Felix DeGrood
8c87657fbd driconf: Fake vendorid for RDR2
Change force_vk_vendor=-1 for Red Dead Redemption 2 to avoid
pop up driver warning on launch. Warning only applies to Windows
driver.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27364>
2024-01-31 02:11:18 +00:00
Sil Vilerino
01a99f5d4d d3d12: d3d12_video_encoder_negotiate_current_h264_slices_configuration to use correct mode when intra-refresh is on
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27367>
2024-01-31 01:49:52 +00:00
Faith Ekstrand
45a6e1dc89 nak/nir: Stop lowering load_local_invocation_index
NAK_SV_COMBINED_TID is not gl_InvocationIndex. It's just gl_InvocationID
with the three components all crammed into one 32-bit value.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27365>
2024-01-31 01:23:23 +00:00
Faith Ekstrand
ac11cb0f72 nvk: Call lower_compute_system_values after zer_initialize_workgroup_memory
Fixes: 184bcfdc1c ("nvk: Implement VK_KHR_zero_initialize_workgroup_memory")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27365>
2024-01-31 01:23:23 +00:00
Yiwei Zhang
1718980e85 venus: force async pipeline create on threads creating descriptor pools
This works around some Unity engine behaivor with ANGLE-on-Venus, when
cmd pools are created on main thread once while the render thread only
does descriptor pool creation for set allocations during recording time.

This change also explicitly forces async pipeline create for threads
creating the device instead of implicitly via feedback cmd pool create.
This ensures intended behavior when feedback is disabled.

Fixes: d17ddcc847 ("venus: dispatch background shader tasks to secondary ring")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27347>
2024-01-30 23:50:47 +00:00
Martin Roukala (né Peres)
62797f036f zink/ci: update polaris10's expectations after piglit uprev
Fixes: 1c29869c20 ("Uprev Piglit to e9316bcd12544aaf7e753ce37fe50d64165d9598")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27357>
2024-01-30 23:32:00 +00:00
Martin Roukala (né Peres)
a0bf21e72f zink/ci: update navi31's expectations after piglit uprev
Fixes: 1c29869c20 ("Uprev Piglit to e9316bcd12544aaf7e753ce37fe50d64165d9598")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27357>
2024-01-30 23:32:00 +00:00
Martin Roukala (né Peres)
a6ea0f1762 radeonsi/ci: update vangogh's expectations after piglit uprev
Fixes: 1c29869c20 ("Uprev Piglit to e9316bcd12544aaf7e753ce37fe50d64165d9598")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27357>
2024-01-30 23:32:00 +00:00
Daniel Schürmann
faf3bb644d spirv: Update headers and grammar JSON
1.3.276.0

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27273>
2024-01-30 22:51:52 +00:00
Konstantin Seurer
e3c2dc2324 nir/print: Rename workgroup-size to workgroup_size
Every other field uses _ instead of -.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27318>
2024-01-30 21:19:40 +00:00
Konstantin Seurer
449e44d6d3 nir/print: Don't print shared_size twice
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27318>
2024-01-30 21:19:40 +00:00
Gert Wollny
0ab3b3c641 nir/builder: Fix compilation with gcc-13 when tsan is enabled
../src/compiler/nir/nir_builder.h: In function ‘nir_build_deref_follower’:
../src/compiler/nir/nir_builder.h:1607:1: error: control reaches end of non-void function [-Werror=return-type]
 1607 | }

Fixes: 4a4e175738
    nir: Support deref instructions in lower_var_copies

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27345>
2024-01-30 20:42:07 +00:00
Gert Wollny
80a1b91601 nir/lower_int64: Fix compilation with gcc-13 and tsan enabled
../src/compiler/nir/nir_lower_int64.c: In function ‘lower_int64_intrinsic’:
../src/compiler/nir/nir_lower_int64.c:1347:1: error: control reaches end of non-void function [-Werror=return-type]
1347 | }

Fixes: bf7a114246
   nir/lower_int64: Add lowering for some 64-bit subgroup ops

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27345>
2024-01-30 20:42:07 +00:00
Gert Wollny
ca47138fb1 radv: Fix compilation with gcc-13 and tsan enabled
../src/amd/vulkan/radv_sampler.c: In function ‘radv_tex_wrap’:
../src/amd/vulkan/radv_sampler.c:50:1: error: control reaches end of non-void function [-Werror=return-type]
   50 | }
      | ^
../src/amd/vulkan/radv_sampler.c: In function ‘radv_tex_compare’:
../src/amd/vulkan/radv_sampler.c:76:1: error: control reaches end of non-void function [-Werror=return-type]
   76 | }
      | ^

Fixes: 4de305cb8a
   radv: move sampler related code to radv_sampler.c

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27345>
2024-01-30 20:42:07 +00:00
Gert Wollny
f6383e03f9 zink: use enums as return values in resource_object_create
(As suggested by Mike).

With that replace the goto statements for error cleanup by
a switch/case.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
3d203b5477 zink: remove duplicate arguments and use VkMemoryRequirements locally
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
9c3e733779 zink: simplify call to get_export_flags
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
472bca9469 zink: Move more code to create_image and create_buffer
With that resource_object_create only contains the common
initzialization, the error handling and then calls seperate
functions to create buffers or images.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
0b88f68067 zink: extract allocate_bo_and_update_obj from resource_object_create
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
df9cbe431e zink: drop duplicate assignment to obj->alignment
The value resource_object_create obj->alignment is set again in
allocate_bo and the assignment uses a few more tests there.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
063949063c zink: extract debug_resource_mem from resource_object_create
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
7180670e28 zink: extract update_obj_info from resource_object_create
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
081e5d1109 zink: extract function update_alloc_info from resource_object_create
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
1d0e9001cd zink: extract function create_image from resource_object_create
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
eb394f5316 zink: redesign the allocation try loop to test all heaps
Before the first time an allocation failed the heap was changed,
now we only change the heap type when checking all heaps results
in allocation failure.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
252e877a87 zink: extract function allocate_bo from resource_create_object
v2: move reworking the loop to a new commit (Mike)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
3806586c6e zink: extract get_export_flags from resource_object_create
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
e22c525aa0 zink: reduce number of #ifdefs in resource_create_object
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
a5fd408a74 zink: factor out get_image_memory_requirement in resource_object_create
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
55f3941076 zink: factor out get_format_feature_flags in resource_object_create
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
6664fdaf48 zink: Factor out create sampler conversion in resource_object_create
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
b2ce61b91d zink: shorten lifetime of success variable in resource_object_create
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:32 +00:00
Gert Wollny
7cf77c553c zink: Factor out create buffer from resource_object_create
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27155>
2024-01-30 20:17:31 +00:00
Leo Liu
46f5a226d6 radeonsi: fix video processing path without VPE enabled
Fixes: 6b441ef6ab (amd, radeonsi: supports post processing entrypoint)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10495
Cc: mesa-stable

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27339>
2024-01-30 19:53:53 +00:00
Daniel Schürmann
26c8f13ff5 vulkan: enable VK_KHR_shader_expect_assume
This implementation ignores the hints.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27265>
2024-01-30 19:09:42 +00:00
Daniel Schürmann
5df7be8017 spirv: Fix SpvOpExpectKHR
This instruction behaves the same as *OpCopyObject* by making a copy of _Value_.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27265>
2024-01-30 19:09:42 +00:00
Samuel Pitoiset
9b5ea35158 radv: add support for VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27237>
2024-01-30 18:29:51 +00:00
Samuel Pitoiset
9211eef738 radv: init the shader key in radv_shader_stage_init() for ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27237>
2024-01-30 18:29:51 +00:00
Samuel Pitoiset
13add95beb radv: prevent crashes when a task shader is compiled unlinked with ESO
That means the mesh shader stage would be NULL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27237>
2024-01-30 18:29:51 +00:00
Samuel Pitoiset
f23efd7093 radv: bind and emit mesh/task shaders with ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27237>
2024-01-30 18:29:51 +00:00
Samuel Pitoiset
29491d36aa radv: determine the last VGT api stage with mesh shaders and ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27237>
2024-01-30 18:29:51 +00:00
Samuel Pitoiset
6adea03a3e radv: ignore unneeded dynamic states with mesh shaders and ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27237>
2024-01-30 18:29:51 +00:00
Samuel Pitoiset
9157087d43 radv: determine next stage for mesh/task with ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27237>
2024-01-30 18:29:51 +00:00
Samuel Pitoiset
64aa84eaf7 radv: rebind mesh/task shaders when restoring meta context
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27237>
2024-01-30 18:29:51 +00:00
Christian Gmeiner
1602129465 etnaviv/isa: Add missing dep of encode.py/decode.py calls on isa.py
Changing src/compiler/isaspec/*.py did not cause rebuilds of
etnaviv-isa.c and etnaviv-isa.h.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27134>
2024-01-30 18:05:43 +00:00
Eric Engestrom
944aefa933 zink+anv/ci: add a couple more flakes
`UnexpectedImprovement(Pass)` in https://gitlab.freedesktop.org/mesa/mesa/-/jobs/54381879

Expected `Fail` in https://gitlab.freedesktop.org/mesa/mesa/-/jobs/54386127

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27361>
2024-01-30 15:37:13 +00:00
Mike Blumenkrantz
f0aca7e7c9 lavapipe: KHR_dynamic_rendering_local_read
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27282>
2024-01-30 13:59:11 +00:00
Eric Engestrom
92c24191d4 tree-wide: use __normal_user() everywhere instead of writing the check manually
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27346>
2024-01-30 12:45:54 +00:00
Eric Engestrom
3e00558ef0 util: rename __check_suid() to __normal_user()
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27346>
2024-01-30 12:45:54 +00:00
Samuel Pitoiset
2d91b870fb radv: emit required programming for tess on GFX10+ in radv_emit_hw_vs()
This is required on GFX10+ with legacy pipeline (no NGG) and without
a geometry shader. So this can be moved to radv_emit_hw_vs() because
if we have a TES+GS, TES would be NULL and if we have TES as NGG it
would be emitted from radv_emit_hw_ngg().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27301>
2024-01-30 11:47:29 +00:00
Samuel Pitoiset
f870e5ff11 radv: fix emitting tess domain origin for merged TES+GS on GFX9
For merged TES+GS, TES is NULL and this state wasn't emitted.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27301>
2024-01-30 11:47:29 +00:00
Samuel Pitoiset
d9b61de2f7 radv: fix detecting invalid binaries with ESO
On GFX9+, if linked shaders are created and shaders are merged (for
example VS to GS).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27301>
2024-01-30 11:47:29 +00:00
Juan A. Suarez Romero
3304c6ca01 v3d/ci: update expected results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27356>
2024-01-30 11:17:06 +00:00
Konstantin Seurer
9acc869b57 llvmpipe: Fix building with llvm11
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27223>
2024-01-30 10:14:45 +00:00
Konstantin Seurer
f27a973283 radv/rt: Use doubles inside intersect_ray_amd_software_tri
Increasing precision lets us avoid duplicate hits on shared edges. The
previous biasing WA made a bunch of tests fail.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27243>
2024-01-30 10:26:43 +01:00
Haihao Xiang
29d18f3ca9 anv: Fix typo in transition_color_buffer
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27330>
2024-01-30 07:39:01 +00:00
Daniel Almeida
8ff3a13e4d nak: sm50: fix some legalization issues
Match the sm50 legalization pass with the requirements expressed in
encode_sm50.rs. Make sure the SrcTypes passed in the legalization
pass are correct while we're at it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26987>
2024-01-30 02:36:57 +00:00
Daniel Almeida
b18472c718 nak/sm50: add support for brev
Fixes dEQP-VK.spirv_assembly.type.vec3.u32.bit_reverse_comp

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26723>
2024-01-30 01:49:59 +00:00
Daniel Almeida
84a7e94f31 nak/sm50: legalize: display instruction on panic
This makes it faster to know what is broken from logs

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26723>
2024-01-30 01:49:59 +00:00
Daniel Almeida
c1614913d9 nak: sm50: fadd: ensure src[0] is in a register
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26723>
2024-01-30 01:49:59 +00:00
Daniel Almeida
2ac28dd9a9 nak: sm50: add support for OpOut
Geometry shaders are broken otherwise.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26723>
2024-01-30 01:49:59 +00:00
Daniel Almeida
8b40a8715d nak/sm50: add support for isberd
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26723>
2024-01-30 01:49:59 +00:00
Rob Clark
d558cb664a freedreno/drm: Submit should hold ref to device
Prevent the device from being deleted prior to submit cleanup.
Otherwise submit cleanup can try to reference an already free'd
device (and use already closed rendernode fd, etc).

Fixes: ("e6b2785811c2 freedreno/drm/virtio: Use userspace IOVA allocation")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27343>
2024-01-29 22:16:09 +00:00
Corentin Noël
fe8c2dd43a zink: Avoid variable shadowing everywhere
Allows to build the zink driver with -Wshadow and makes sure that we are actually
dealing with the right variable when requested.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27259>
2024-01-29 21:49:50 +00:00
Corentin Noël
86aef4a3c4 zink: Do not shadow the variable ret
Allows to actually return `true` when requested.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27259>
2024-01-29 21:49:50 +00:00
Corentin Noël
edc56f944a zink: Initialize pipe_query_result
Avoid reading garbage from memory.

Found by the clang static analyzer

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27259>
2024-01-29 21:49:50 +00:00
Corentin Noël
66cc73a304 zink: Initialize zink_bindless_descriptor to zero on creation
Make sure to have all fields to 0 as we are then using pipe_resource_reference
on some of its fields.

Fix defect reported by Coverity Scan.

Uninitialized pointer read

Incorrect values could be read from, or even written to, an arbitrary memory location, causing incorrect computations.

CID: 1520759

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27259>
2024-01-29 21:49:50 +00:00
Corentin Noël
3f0af613d0 zink: Initialize zink_shader_object
Fix defect reported by Coverity Scan.

Uninitialized scalar variable

The variable will contain an arbitrary value left from earlier computations.

CID: 1528166

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27259>
2024-01-29 21:49:50 +00:00
Sil Vilerino
9710fca612 frontends/va, d3d12: Fix PIPE_VIDEO_SLICE_MODE_MAX_SLICE_SICE -> PIPE_VIDEO_SLICE_MODE_MAX_SLICE_SIZE typo
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27342>
2024-01-29 20:19:42 +00:00
Marek Olšák
e28d52e761 gallium/hud: add "csv" option to print values to stdout as CSV
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27247>
2024-01-29 19:40:46 +00:00
Marek Olšák
0f79f9ac4d glthread: apply the thread scheduling policy when a batch executes synchronously
before this, when no batch was executed asynchronously, the policy wasn't
applied

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27247>
2024-01-29 19:40:46 +00:00
Marek Olšák
c8c926d776 glthread: apply the thread scheduling policy when the context is created
instead of after 128 batches

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27247>
2024-01-29 19:40:46 +00:00
Marek Olšák
787ddadf73 util: add mesa_pin_threads environment variable that sets a static affinity mask
This is required for deterministic benchmark results.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27247>
2024-01-29 19:40:46 +00:00
Marek Olšák
ea08690d1c st/mesa: rename ST_L3_PINNING_DISABLED -> ST_THREAD_SCHEDULER_DISABLED
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27247>
2024-01-29 19:40:46 +00:00
Marek Olšák
386822c1b0 gallium: rename PIPE_.._PIN_THREADS_TO_L3_CACHE -> .._UPDATE_THREAD_SCHEDULING
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27247>
2024-01-29 19:40:46 +00:00
Marek Olšák
d230434ae3 mesa,gallium: move the thread scheduler to src/util
The only change in behavior is that setting the affinity mask is skipped
when it has no effect, which happens when the app thread hasn't been moved
under a different L3 cache by the kernel (the sched_state variable tracks
that). This improves performance because setting the affinity mask incurs
measurable CPU overhead even if it has no effect.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27247>
2024-01-29 19:40:46 +00:00
Collabora's Gfx CI Team
1c29869c20 Uprev Piglit to e9316bcd12544aaf7e753ce37fe50d64165d9598
f7db20b03d...e9316bcd12

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25449>
2024-01-29 18:27:07 +00:00
Eric Engestrom
2d290eda36 Reapply "bin/ci: Add GitLab basic token validation"
This reverts commit e39fed5737.

One change from the original commit (cd8b546205):
- in `validate_gitlab_token()`, `raise ValueError` was replaced with
  `return False`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27331>
2024-01-29 18:21:29 +00:00
Jesse Natalie
24f14bfacc dzn: Add missing blit source barriers for enhanced barriers
I was under the impression these would never be needed, since the source
should already be in the right GENERIC_READ layout, but when resolving
rendering attachments with a blit, the source is still in the layout that
it was in at the end of rendering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27313>
2024-01-29 17:46:11 +00:00
Jesse Natalie
f91ac2ff41 dzn: Add missing condition to immutable sampler init loop
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27313>
2024-01-29 17:46:11 +00:00
Jesse Natalie
fd89ca82a6 dzn: Add a stencil blit fallback
Not all D3D hardware supports specifying the stencil ref value from the
pixel shader. For such hardware, stencil blits need to do the awful
8-pass one-bit-per-pass discard-to-not-write blit approach.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27313>
2024-01-29 17:46:11 +00:00
Jesse Natalie
5cdcb7134a microsoft/compiler: Use double pack/unpack instead of int for reduce ops on doubles
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27313>
2024-01-29 17:46:11 +00:00
David (Ming Qiang) Wu
b75ee1a067 frontends/va: make vlVaSyncSurface blocking
According to VA documentation, vaSyncSurface should block,
so this mapping function vlVaSyncSurface is changed to be blocking.
add vlVaSyncSurface2 which can be used as non-blocking version.

Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27309>
2024-01-29 14:02:47 +00:00
Lionel Landwerlin
c4b32f9e90 docs/features: synchronize new features for Anv
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27325>
2024-01-29 10:35:32 +00:00
Lionel Landwerlin
c258e02e66 docs/features: drop gen8+/gen9+ on Anv
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27325>
2024-01-29 10:35:31 +00:00
Samuel Pitoiset
dc1b16c010 radv: export alpha-to-coverage via MRTZ for ESO on GFX11
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27236>
2024-01-29 09:47:01 +00:00
Samuel Pitoiset
6a2b264526 radv: emit more default states for ESO on GFX10.3+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27236>
2024-01-29 09:47:01 +00:00
Samuel Pitoiset
b7fdfdc901 radv: do not ignore RADV_DYNAMIC_FRAGMENT_SHADING_RATE for ESO on GFX10.3+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27236>
2024-01-29 09:47:01 +00:00
Samuel Pitoiset
9a7c551f95 radv: set NGG fields in vgt_shader_key for ESO on GFX10+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27236>
2024-01-29 09:47:01 +00:00
Samuel Pitoiset
70c288558a radv: fix the late scissor emission workaround with ESO on GFX9
graphics_pipeline is NULL when ESO is used.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27236>
2024-01-29 09:47:01 +00:00
Samuel Pitoiset
411e23e193 radv: use the non-emitted graphics pipeline for the needed dynamic states
This is similar but it will allow us to re-use the helper for the
late scissor bug on GFX9.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27236>
2024-01-29 09:47:01 +00:00
Samuel Pitoiset
bbcdd1dc09 radv: refactor gfx103_pipeline_emit_vrs_state()
For using it with ESO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27236>
2024-01-29 09:47:01 +00:00
Samuel Pitoiset
e7b4dcd522 radv: refactor gfx103_pipeline_emit_vgt_draw_payload_cntl()
For using it with ESO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27236>
2024-01-29 09:47:01 +00:00
Gert Wollny
5ccc40cbd5 ci: Upref virglrenderer
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27106>
2024-01-29 09:01:26 +00:00
Gert Wollny
b9fea5ea6b virgl: Use better reporting for mirror_clamp features
Fixes: 9efe50c83b
    virgl: report MIRROR_CLAMP features better

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27106>
2024-01-29 09:01:26 +00:00
Lionel Landwerlin
fe19405c46 vulkan/runtime: handle new dynamic states for attachment remapping
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27307>
2024-01-29 08:24:14 +00:00
Samuel Pitoiset
0105cfd93c radv/ci: enable RADV_PERFTEST=shader_object for vkcts-polaris10-valve
This now runs +571k tests for ESO in ~34 minutes compared to ~30 minutes
without shader_object support. Definitely acceptable for a manual job.

Note that the next VKCTS uprev will reduce the number of ESO tests by
a lot because most of them weren't useful for coverage.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27139>
2024-01-29 07:50:39 +00:00
Samuel Pitoiset
c68f96878c radv: fix segfault when getting device vm fault info
pFaultInfo can be NULL.

Fixes: 8097becc7f ("radv: add initial VK_EXT_device_fault support")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27292>
2024-01-29 07:26:28 +00:00
Eric Engestrom
e39fed5737 Revert "bin/ci: Add GitLab basic token validation"
This validation code has 2 bugs, the main one being that it is wrong and
is refusing perfectly valid codes. Let's remove this until we come up
with a valid check.

This reverts commit cd8b546205.

Fixes: cd8b546205 ("bin/ci: Add GitLab basic token validation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27312>
2024-01-29 01:44:43 +00:00
Hans-Kristian Arntzen
2f4d6df372 wsi/common: Allow KHR_present_wait on WL.
The fallback in place ensures a good enough solution.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27275>
2024-01-28 23:14:36 +00:00
Hans-Kristian Arntzen
0d51cd4808 wsi/wl: Improve fallback for present_wait.
When presentation feedback protocol is not supported,
fallback to using frame callbacks.
In some sense, frame callbacks functions like
present complete + latch delay, so it's a reasonable approach, given the
alternative.

Xwl uses frame callback for COMPLETE events, so it's not a new approach.

To guard against lack of forward progress guarantee,
add a timeout for present complete to avoid deadlocking applications.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27275>
2024-01-28 23:14:36 +00:00
Hans-Kristian Arntzen
1af7f41174 wsi/wl: Refactor out code to update current present ID.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27275>
2024-01-28 23:14:36 +00:00
Gert Wollny
820859a6ab r600: lower dround_even also on hardware that supports fp64
Fixes: aed6a39c10
  glsl: Retire dround lowering.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27329>
2024-01-28 22:33:30 +00:00
David Heidelberg
324ddd0919 ci: Valve farm (Keywords location) works again
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27328>
2024-01-28 21:45:18 +01:00
David Heidelberg
4a23b28623 ci/VK-GL-CTS: add patches to fix dEQP-VK.glsl.derivate crashes
Acked-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27324>
2024-01-28 20:41:37 +01:00
David Heidelberg
299aebaa55 ci: bump libdrm to 2.4.120
Acked-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27324>
2024-01-28 20:41:37 +01:00
David Heidelberg
7965483b4c ci: disable Valve farm in Keywords
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27326>
2024-01-28 20:36:20 +01:00
Max R
68b3b1573b d3d10umd: Fix compilation
Commit eb20ef92 changed signature of cso_set_vertex_buffers.
But this change wasn't reflected in d3d10umd.
Update call to cso_set_vertex_buffers to fix it.

Fixes: eb20ef927 ("gallium: remove unbind_trailing_count from set_vertex_buffers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27238>
2024-01-27 18:18:35 +00:00
Faith Ekstrand
55413e33dc nvk: Disable all cbufs in nvk_queue_init_context_draw_state()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27320>
2024-01-27 17:54:19 +00:00
Faith Ekstrand
35bd36c1b0 nvk: Whitespace fixes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27320>
2024-01-27 17:54:19 +00:00
Faith Ekstrand
c4254f374f nvk: Do a second submit to check for errors in the sync case
With NVK_DEBUG=push_sync, we signal and immediately wait on a syncobj
to better detect whitch push failed and then print it.  However, the
syncobj wait itself isn't enough to check for errors.  We have to try
pushing again.  Adding an empty push lets us get errors immediately and
print the actually failing pushbuf to stderr.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27320>
2024-01-27 17:54:19 +00:00
Thomas H.P. Andersen
38aba351f1 docs: update features.txt for nvk
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27297>
2024-01-27 17:38:58 +00:00
Thomas H.P. Andersen
614e4269cf nvk: promote load_store_op_none to KHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27297>
2024-01-27 17:38:58 +00:00
Thomas H.P. Andersen
132b3a79f4 nvk: promote VK_EXT_line_rasterization to KHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27297>
2024-01-27 17:38:58 +00:00
Thomas H.P. Andersen
da910fc2fd nvk: promote VK_EXT_index_type_uint8 to KHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27297>
2024-01-27 17:38:58 +00:00
Echo J
32babbc416 nvk: Set ICD version to 1.3
This should complete the Vulkan 1.3 puzzle

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27319>
2024-01-27 16:19:10 +00:00
Sebastian Wick
c467a87e06 radeonsi: Destroy queues before the aux contexts
Otherwise the queue might access the already destroyed aux contexts

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27300>
2024-01-27 14:59:11 +00:00
Faith Ekstrand
a0a453e43f nvk: Advertise Vulkan 1.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27317>
2024-01-27 06:30:08 +00:00
Faith Ekstrand
25d40e8e2c nvk: Stop requiring dedicated allocations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27317>
2024-01-27 06:30:08 +00:00
Juston Li
305256e344 venus: handle empty resolved query feedback list
On the off chance the combined list resolves to empty due to resets,
skip adding query feedback by not increasing the total cmd buffer
count for query feedback.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Juston Li
df1cd20096 venus: recycle linked query feedback immediately during submission
Instead of just recyling 1 linked query feedback cmd for use and
defering the actualy recycle, recycle all linked cmds found when
setting up submission immediately.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Juston Li
decc5d4539 venus: add comments for query feedback batch free list
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Juston Li
e2c4bafccc venus: free query batches for VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT
When a pool is reset with VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT,
free up all query batches in the pool.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Juston Li
aceda1f5f6 venus: acquire mutex when recycling query feedback cmds
Fixes: 5b24ab91e4 ("venus: switch to unconditionally deferred query feedback")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Juston Li
c3417c5bb8 venus: refactor query feedback cmds
The list free_query_feedback_cmds for recycling query feedback cmds was
only used in vn_command_pool when it was a vn_feedback_cmd_pool.

For clarity, refactor and store this list in vn_feedback_cmd_pool
instead and introduce a new struct vn_query_feedback_cmd that references
the feedback cmd and the feedback cmd pool for tracking.

Refactor out the allocation portion of query feedback cmds into its own
function for allocating the new vn_query_feedback_cmd struct.

Fixes: 5b24ab91e4 ("venus: switch to unconditionally deferred query feedback")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Eric Engestrom
7bc5646609 ci: bump the image tags to rebuild all the deqp variants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
52b784dbc5 ci/deqp: only keep the mustpass lists that are relevant to the build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
e0c564dd0b ci/deqp: only compile the test binaries that are relevant to the build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
969b430a23 ci/deqp: only compile EGL tests in GL builds, not VK builds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
d9833b89a2 ci/deqp: drop the implicit DEQP_TARGET; explicitly set default in VK builds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
fb326ef27f ci/deqp: split vk and gl builds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
24161160e5 ci/deqp: move editable part to the top of the file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
86bf197bf7 ci/deqp: avoid storing the huge list of vk tests on android builds
Same as we do with GL mustpass lists.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
3cc1c71148 ci/deqp: simplify version log dump
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
115ab467c6 ci/deqp: fix default target check when target is not specified
Fixes: 27a1b4e4f3 ("ci/deqp: ensure that in `default` builds, wayland + x11 + xcb are all built")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Lionel Landwerlin
3b9466dd51 anv: fix transfer barriers flushes with compute queue
Transfer operation are implemented differently on the compute engine
and require a different kind of cache flush.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27233>
2024-01-26 20:47:18 +00:00
Ryan Neph
9f99685c1b virgl: use PIPE_MAX_SAMPLERS in bind_samplers_states
Fix incorrect use of PIPE_MAX_SHADER_SAMPLER_VIEWS in
virgl_bind_samplers_states.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27251>
2024-01-26 18:20:13 +00:00
Javier Martinez Canillas
5275df0cfe gallium: Add ssd130x to the list of kmsro drivers
Add an entry point for the ssd130x modesetting driver, to expose a _dri.so
and allow Solomon panels to display the contents rendered by a GPU driver.

Suggested-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27135>
2024-01-26 17:52:45 +00:00
Lionel Landwerlin
9d31680e79 anv: retain ccs image binding address
Memory can be free before images it is bound to. When unmapping the
CCS range in the AUX-TT, we cannot rely on the anv_bo::offset field
because the anv_bo might have been freed.

Just save the mapping address/size and use those values at unmapping
time.

Fixes an assert on CI with :

  dEQP-VK.synchronization.internally_synchronized_objects.pipeline_cache_graphics

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e519e06f4b ("anv: add missing alignment for AUX-TT mapping")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27304>
2024-01-26 17:29:31 +00:00
Lionel Landwerlin
eead86ad8e anv: rename aux_tt image field
We'll add more to the sub-struct

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27304>
2024-01-26 17:29:31 +00:00
Lionel Landwerlin
fdc2f0a52e anv: factor out aux-tt binding logic for future reuse
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27304>
2024-01-26 17:29:30 +00:00
Faith Ekstrand
6260fa47ff nak: Loop to ensure we get accurate shader clocks
Even though CS2R can fetch a whole 64 bits at a time, that doesn't mean
it does so atomically.  Instead, we need to loop, alternating high and
low until we fetch the same high value twice.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27303>
2024-01-26 16:55:50 +00:00
Faith Ekstrand
48ebfeba34 nak: Add a source barrier intrinsic
This just inserts a GPU stall until the given source is available.  We
need this in order to properly implement shader clock.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27303>
2024-01-26 16:55:50 +00:00
Faith Ekstrand
d57c79846d nak: Choose S2R vs CS2R based on sysval index
CS2R is only allowed for SV_CLOCK

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27303>
2024-01-26 16:55:50 +00:00
Lionel Landwerlin
e121d873bd anv/hasvk: don't report error when intel_get_device_info_from_fd fails
A side effect of the previous change is that we started getting
failures from that function but that only says the device is not
supported, so silently fail and return.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3fd44345c4 ("intel: Skip ioctls for querying device info when hardware is unsupported")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27294>
2024-01-26 16:30:25 +00:00
Pierre-Eric Pelloux-Prayer
02fe3c32cd ac, radeonsi: remove has_syncobj, has_fence_to_handle
syncobj support is now required so these features are always
available.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24724>
2024-01-26 16:02:26 +00:00
Pierre-Eric Pelloux-Prayer
d25201903d winsys/amdgpu: use syncobj rather than amdgpu fence
syncobjs provide the same features and allow to unify code
paths because we don't need to handle imported syncobj
separately.

This simplifies the code and doesn't seem to have any perf
impact.

Syncobjs are supported in amdgpu since kernel commit 660e855813f78
during 4.12 cycle but the minor version wasn't bumped so use
the next bump value asthe minimum supported version.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24724>
2024-01-26 16:02:26 +00:00
Samuel Pitoiset
d14ecd6d89 radv: use device->vk.enabled_features instead of iterating twice
vk_device already has the list of enabled features, no need to iterate
twice on the pNext structs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27276>
2024-01-26 15:16:26 +00:00
Pierre-Eric Pelloux-Prayer
cce5920025 radeonsi: adjust flags for si_compute_shorten_ubyte_buffer
- no need to flush anything before as we're working on a clean
  buffer (SI_OP_SKIP_CACHE_INV_BEFORE)
- L2 must be flushed after the job to avoid rendering artifacts.
  Instead of setting it manually, use SI_OP_SYNC_AFTER +
  SI_COHERENCY_NONE.

Fixes: 1a99f50c7f ("radeonsi: use a compute shader to convert unsupported indices format")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27095>
2024-01-26 14:13:55 +00:00
Pierre-Eric Pelloux-Prayer
0e16da89fe radeonsi: emit cache flushes before draw registers
This fixes #9807 but I don't understand why.

Emitting cache flushes before VGT_PRIMITIVE_TYPE is what makes
the problem go away but changing the order in si_draw() is clearer.

The only cases where sctx->flags is modified in si_emit_draw_registers
is handled using si_emit_cache_flush_direct so we can move cache
flushing up without any addtional conditionals.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9807
Fixes: 1e4b539042 ("radeonsi: handle deferred cache flushes as a state (si_atom)")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27095>
2024-01-26 14:13:55 +00:00
Lionel Landwerlin
72dc596aa0 anv: implement VK_EXT_attachment_feedback_loop_dynamic_state
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/23523>
2024-01-26 13:39:02 +00:00
Faith Ekstrand
a9d72609d9 anv: Advertise VK_EXT_attachment_feedback_loop_layout
Reviewed-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/23523>
2024-01-26 13:39:02 +00:00
Lionel Landwerlin
dda8c2b8be anv: handle image feedback loop usage
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/23523>
2024-01-26 13:39:02 +00:00
Faith Ekstrand
bd285a6ad5 anv: Add helpers for getting the surface state from an image view
Gets rid of some duplicated logic.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23523>
2024-01-26 13:39:02 +00:00
Lionel Landwerlin
16391645ef anv: add check that in renderpass barriers apply to attachments
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/23523>
2024-01-26 13:39:02 +00:00
Lionel Landwerlin
eed788213b anv: ensure consistent layout transitions in render passes
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/23523>
2024-01-26 13:39:02 +00:00
Lionel Landwerlin
76cf391255 vulkan/runtime: add helper to query attachment layout
The runtime is turning GENERAL layouts into FEEDBACK_LOOP ones when it
detects feedback loops in a render pass. This is breaking drivers that
would like to use a different HW layout for those 2 layouts because if
the application inserts barrier in the render pass, the barriers the
driver sees are inconsistent.

This could lead to barrier of this type :
   - GENERAL       -> FEEDBACK_LOOP (runtime)
   - GENERAL       -> GENERAL       (app)
   - FEEDBACK_LOOP -> GENERAL       (runtime)

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/23523>
2024-01-26 13:39:01 +00:00
Lionel Landwerlin
f92bff9198 intel/ds: track predication of blorp operations
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/23523>
2024-01-26 13:39:01 +00:00
Vlad Schiller
97efa57531 pvr: Implement VK_EXT_memory_budget
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27189>
2024-01-26 12:06:55 +00:00
Tatsuyuki Ishi
991ae339f5 radv: Implement NIR caching behind RADV_PERFTEST=nircache.
NIR caching is useful for two use cases:
- Shader permutations involving reused VS or FS.
- GPL-like engine that compiles a separate (library) variant and an
  optimized (monolithic) variant, e.g. DXVK.

By caching the result of radv_shader_spirv_to_nir, permutations hitting
the cache can have their compilation time reduced by 50% or more.

There are still open questions about the memory and storage footprint of
NIR caches, which is why this is gated behind a perftest flag. In
particular, Steam doesn't want to ship NIR cache since they are
unnecessary in presence of a full precompiled shader cache. In this
commit, the cache entries do not reside in memory and are immediately
written to the disk. Further design around how the caches are stored and
how to coordinate cache type with Steam etc. is left as future work.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26696>
2024-01-26 11:46:18 +00:00
Tatsuyuki Ishi
2ed5f2cace radv: Re-sort RADV_PERFTEST env vars in docs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26696>
2024-01-26 11:46:18 +00:00
Tatsuyuki Ishi
8bf5c33c9c radv: Rename cache_search_nir to cache_lookup_nir_handle.
A future commit will introduce cache_lookup_nir (which does not create
an intermediate vk_pipeline_cache_object), so rename it for consistency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26696>
2024-01-26 11:46:18 +00:00
Tatsuyuki Ishi
70b0c5909b radv: Add radv_spirv_to_nir_options that summarize early gfx states.
radv_shader_spirv_to_nir now takes a more minimal struct instead of gfx
states. This struct will be used for NIR cache hashing in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26696>
2024-01-26 11:46:18 +00:00
Lionel Landwerlin
e519e06f4b anv: add missing alignment for AUX-TT mapping
Buffers that are not dedicated can also be used for CCS mapped images,
so they need to be aligned to the AUX-TT requirements.

GTK+ is running into such case where it creates an image with a CCS
modifier. When requesting the alignment through
vkGetImageMemoryRequirements() the 64KB/1MB alignment is returned, but
the binding fails with an assert because the VkDeviceMemory has not
been aligned to the AUX-TT requirement and we cannot disable CCS since
the modifier requires it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4cdd3178fb ("anv: Meet CCS alignment reqs with dedicated allocs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10433
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27258>
2024-01-26 11:20:17 +00:00
Pavel Ondračka
337fbab9ce r300: remove backend support for SUB
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27089>
2024-01-26 11:06:06 +00:00
Pavel Ondračka
18a0ff121e r300: remove the remaining of backend constant folding
This was needed to clean up after the comparison opcode lowering which
has now beed moved earlier to NIR. We just need to clean up the special
case of add a,0 manually as this happens way too late for any other
standard algebraic pass.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27089>
2024-01-26 11:06:06 +00:00
Pavel Ondračka
553e841d7c r300: remove SGE, SNE, SLT, SGE lowering in the backend
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27089>
2024-01-26 11:06:06 +00:00
Pavel Ondračka
5115cebd5d r300: lower comparison ops early in NIR
The HW can't do comparison opcodes in the FS, so the old way was to
lower all to ADD and CMP in the backend. However, the comparison bool
result is used either in if (where we can encode the comparions in the
aluresults calculation) or is uses in another bcsel. Therefore, we now
end with two CMPs, one from the original bcsel and one from the lowered
comparison.

This patch fixes it by doing the comparison lowering early for some nice
shader-db gains. Similarly to vertex shaders, we need some special
passes for this, because we can't nir_lower_bool_to_float too early, so
we just manually lower the most common patterns in the main opt loop and
than clean up the rest later.

Shader-db RV530:
total instructions in shared programs: 130797 -> 130400 (-0.30%)
instructions in affected programs: 34591 -> 34194 (-1.15%)
helped: 203
HURT: 133
total presub in shared programs: 8175 -> 8220 (0.55%)
presub in affected programs: 1738 -> 1783 (2.59%)
helped: 62
HURT: 53
total omod in shared programs: 414 -> 412 (-0.48%)
omod in affected programs: 4 -> 2 (-50.00%)
helped: 2
HURT: 0
total temps in shared programs: 17570 -> 17566 (-0.02%)
temps in affected programs: 1122 -> 1118 (-0.36%)
helped: 41
HURT: 43
total consts in shared programs: 94362 -> 94359 (<.01%)
consts in affected programs: 381 -> 378 (-0.79%)
helped: 13
HURT: 10
total lits in shared programs: 2951 -> 2961 (0.34%)
lits in affected programs: 104 -> 114 (9.62%)
helped: 3
HURT: 9
total cycles in shared programs: 198965 -> 198744 (-0.11%)
cycles in affected programs: 55784 -> 55563 (-0.40%)
helped: 177
HURT: 144

LOST:   0
GAINED: 1

Shader-db RV380:
total instructions in shared programs: 84224 -> 84109 (-0.14%)
instructions in affected programs: 6039 -> 5924 (-1.90%)
helped: 106
HURT: 38
total presub in shared programs: 1401 -> 1372 (-2.07%)
presub in affected programs: 113 -> 84 (-25.66%)
helped: 27
HURT: 10
total temps in shared programs: 13231 -> 13224 (-0.05%)
temps in affected programs: 303 -> 296 (-2.31%)
helped: 22
HURT: 12
total consts in shared programs: 82484 -> 82505 (0.03%)
consts in affected programs: 271 -> 292 (7.75%)
helped: 4
HURT: 25
total cycles in shared programs: 132957 -> 132840 (-0.09%)
cycles in affected programs: 12696 -> 12579 (-0.92%)
helped: 101
HURT: 43

LOST:   0
GAINED: 1

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27089>
2024-01-26 11:06:06 +00:00
Pavel Ondračka
99abd9ad30 r300: optimize out more modifiers produced later
The code handling NIR to TGSI translation can't handle multiple
chained modifiers.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27089>
2024-01-26 11:06:06 +00:00
Pavel Ondračka
bdf42690f6 r300: add r300_is_only_used_as_float helper
This is slightly different from the stock is_only_used_as_float since
that one will return false when called for uses of bcsel if any of the
uses actually uses uint, like vec or another bcsel. This version will
recursivelly go further in such cases and return false only if it sees
any instructions specifically neededing bools or ints.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27089>
2024-01-26 11:06:06 +00:00
Pavel Ondračka
b1a669be75 r300: remove backend SLE and SGT support
NIR doesn't know them, so there is no way we can ever end with one.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27089>
2024-01-26 11:06:06 +00:00
Lionel Landwerlin
d46bbf727d anv: promote EXT_load_store_op_none to KHR
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27274>
2024-01-26 10:38:53 +00:00
Lionel Landwerlin
87acc6b59b anv: promote EXT_line_rasterization to KHR
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27274>
2024-01-26 10:38:53 +00:00
Lionel Landwerlin
976d5b9551 anv: promote EXT_index_type_uint8 to KHR
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27274>
2024-01-26 10:38:53 +00:00
Louis-Francis Ratté-Boulianne
1aa832e5f5 panfrost: Legalize before updating part of a AFBC-packed texture
When updating an AFBC-packed resource, we need to make sure it is
legalized before blitting the staging resource to it. We can't rely
on the blit to properly convert the resource as it will result in
blit recursion and a crash.

If the whole texture is updated however, there is no need to unpack
as the content can be discarded. Just create a new BO with the right
format.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 33b48a5585 ("panfrost: Add debug flag to force packing of AFBC textures on upload")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27208>
2024-01-26 10:19:22 +00:00
Louis-Francis Ratté-Boulianne
ee77168d57 panfrost: add can_discard flag to pan_legalize_afbc_format
There might be a more efficient path when legalizing a resource if
we don't need to worry about its content. For example, it doesn't
make sense to copy the resource content when converting the modifier
if the resource content is discarded anyway.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 33b48a5585 ("panfrost: Add debug flag to force packing of AFBC textures on upload")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27208>
2024-01-26 10:19:22 +00:00
Louis-Francis Ratté-Boulianne
62ed14b386 panfrost: add copy_resource flag to pan_resource_modifier_convert
When converting the modifier for a resource, it's not always
needed to blit the content as well. Creating a new resource with
the right format/modifier might be enough.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 33b48a5585 ("panfrost: Add debug flag to force packing of AFBC textures on upload")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27208>
2024-01-26 10:19:21 +00:00
Louis-Francis Ratté-Boulianne
22a7637b08 panfrost: factor out method to check whether we can discard resource
The logic is gonna be re-used to determine whether we need to
unpack a AFBC-packed texture before updating it (when unmapping).

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 33b48a5585 ("panfrost: Add debug flag to force packing of AFBC textures on upload")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27208>
2024-01-26 10:19:21 +00:00
Samuel Pitoiset
c53d0a6a6d radv: advertise VK_KHR_index_type_uint8
Promoted from the EXT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27262>
2024-01-26 10:00:48 +00:00
Samuel Pitoiset
30f2802e31 radv: promote VK_EXT_index_type_uint8 to KHR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27262>
2024-01-26 10:00:48 +00:00
Samuel Pitoiset
0ceeb67b3b radv: advertise VK_KHR_line_rasterization
Promoted from the EXT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27262>
2024-01-26 10:00:48 +00:00
Samuel Pitoiset
df3fbe3b33 radv: promote VK_EXT_line_rasterization to KHR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27262>
2024-01-26 10:00:48 +00:00
Samuel Pitoiset
701a37e863 radv: advertise VK_KHR_load_store_op_none
Promoted from the EXT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27262>
2024-01-26 10:00:48 +00:00
Krzysztof Kurek
e6156df53a panfrost: fix shift overflow in bi_fold_constant
closes https://gitlab.freedesktop.org/mesa/mesa/-/issues/9517

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26116>
2024-01-26 09:40:48 +00:00
Rohan Garg
b703e0be53 anv: factor out common code for determining surface usage from a VkDescriptorType
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27268>
2024-01-26 09:17:03 +00:00
Samuel Pitoiset
2972590a53 radv: advertise VK_EXT_shader_object on GFX6-8
This extension can be enabled with RADV_PERFTEST=shader_object.
GFX9+ support and improvements will happen shortly.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
f0e7714d0d radv: add support for binding/emitting shader objects
Only GFX6-8 support for now because merged shaders make it harder to
implement but I have a bunch of local work for that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
2b93647d7f radv: make some pipeline graphics helpers non-static for ESO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
37d7c2172b radv: add support for creating/destroying shader objects
Only GFX6-8 support for now and no shaders cache.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
2f1902d4df radv: add radv_shader_layout::dynamic_offset_count
This will be used to initialize the shader layout for ESO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
1dbb859b3b radv: add radv_shader_stage::next_stage field
This allows to init radv_shader_info correctly when the next stage is
known, this is mostly for ESO. Though, next_stage could be used in
other places too.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
a12019cc91 radv: initialize default dynamic state when beginning a new cmdbuf
With ESO everything is dynamic and the default dynamic state must be
initialized when beginning a new command buffer.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
482ca4b074 radv: add required NV entrypoints for VK_EXT_shader_object
Even if the implementation doesn't support the extensions, the
entrypoints must exist.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
de1805faed radv: enable prologs/epilogs in-memory cache for shader objects
Shader objects always use VS prologs/PS epilogs/TCS epilogs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
9351a4c51a radv: re-emit the TCS epilog when a new TCS is bound
Similarly to VS prologs and PS epilogs, this needs to be re-emitted
otherwise the config shader state can be overwritten.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
1bc5f15b68 radv: prevent accessing NULL pipelines when emitting VBO with ESO
ESO always uses dynamic strides, so this should be zero.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
6728e9dd15 radv: add a helper to get the VGT_GS_OUT value
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Samuel Pitoiset
fe1a9b3ab3 radv: add a helper for binding the custom blend mode
This re-emits the according state when a new graphics pipeline is bound

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
2024-01-26 08:56:54 +00:00
Pavel Ondračka
bf1a2b7427 r300/ci: add dEQP on RV380
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27183>
2024-01-26 08:05:52 +00:00
Guilherme Gallo
cd8b546205 bin/ci: Add GitLab basic token validation
Validate the token to be able to warn the user about wrong
authentication settings.
Treat the default token argument case, when the token file is not found.
Add some loggings to guide the user.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27206>
2024-01-26 00:37:05 -03:00
Guilherme Gallo
8eabdb3909 bin/ci: Refactor read_token function
Make `read_token` utilize the `get_gitlab_pipeline_from_url` to reuse
code from `gitlab_gql.py`.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27206>
2024-01-26 00:37:05 -03:00
Guilherme Gallo
708a26c607 bin/ci: Move get_token_from_default_dir to common
Moved the `get_token_from_default_dir` method to a common module for
shared use between `gitlab_gql.py` and `ci_run_n_monitor.py`. This
migration facilitates better code organization and potential future
reuse.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27206>
2024-01-26 00:37:05 -03:00
Guilherme Gallo
50fcea9c34 bin/ci: Propagate the token to GitlabGQL
Fix an issue in `ci_run_n_monitor.py` where the token was not
being correctly propagated to the GitlabGQL abstraction. This addresses
misbehavior in scenarios like running pipelines in a private fork,
ensuring proper functionality.

Also document `find_dependencies` function.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27206>
2024-01-26 00:37:03 -03:00
David Heidelberg
7cc6140cc8 ci: shorter kernel tag, included Vivante NPU patches
1. shorter tag so containers tag gets shorter too (we need it)
2. Preparation for NPU etnaviv testing (without NPU enablement, see
   https://gitlab.freedesktop.org/mesa/mesa/-/issues/10465 )

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27229>
2024-01-26 01:57:23 +00:00
Jesse Natalie
472ef1ecae d3d12: Fix path passed to CreateDeviceFactory
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27287>
2024-01-26 01:30:00 +00:00
Jesse Natalie
4fede8d419 dzn: Fix path passed to CreateDeviceFactory
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27287>
2024-01-26 01:30:00 +00:00
Jesse Natalie
fa1c9618f9 dzn: Don't set view instancing mask until after the PSO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27286>
2024-01-26 01:05:02 +00:00
Jesse Natalie
86b5c9278c glsl: Work around MSVC arm64 optimizer bug
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27199>
2024-01-26 00:22:53 +00:00
Jesse Natalie
6139cd0656 util: Detect arm64ec as aarch64 (and x86_64)
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27199>
2024-01-26 00:22:53 +00:00
Faith Ekstrand
99ef70d8aa nak: Fix TCS output reads
The hardware uses the lane index for per-vertex TCS output reads rather
than the vertex index.  Fortunately, it's a pretty easy calculation to
go from one to the other.

Fixes: abe9c1fea2 ("nak: Add NIR lowering for attribute I/O")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27284>
2024-01-26 00:07:40 +00:00
Andres Calderon Jaramillo
e44e57b4e7 radeonsi: get enc/dec caps from kernel only on amdgpu
Tested-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Leo Liu <leo.liu@amd.com>

Change-Id: I6f8c6799bb331c42aa1526b8f1eeb0473e5d756e
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27283>
2024-01-25 22:39:56 +00:00
Lionel Landwerlin
7c2ff46a4f anv: don't prevent L1 untyped cache flush in 3D mode
Required on MTL.

Fixes tests like :

 dEQP-VK.synchronization2.op.single_queue.timeline_semaphore.write_copy_buffer_read_copy_buffer.buffer_16384

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Co-Authored-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27172>
2024-01-25 22:10:54 +00:00
Dario Mylonopoulos
d0bbab98df llvmpipe: fixed race condition in lp_rast_destroy that causes a crash on windows
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26345>
2024-01-25 21:45:27 +00:00
Jesse Natalie
98ec98d08f spirv2dxil: Handle aliasing/overlapping UBO/SSBO variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27280>
2024-01-25 21:20:58 +00:00
Jesse Natalie
4833126b40 spirv2dxil: Fix the spirv2dxil command line tool
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27280>
2024-01-25 21:20:58 +00:00
Eric Engestrom
6825c67c99 ci_run_n_monitor: allow passing multiple targets
When generating the list of targets from a script, being able to just
pass `--target "${list[@]}"` is very convenient.

The list of targets is simply converted to an "or" regex, matching any
of the `--target`s given.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27252>
2024-01-25 21:16:13 +00:00
Eric Engestrom
eeba409c54 ci_run_n_monitor: drop always-true condition
`--target` is mandatory.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27252>
2024-01-25 21:16:13 +00:00
Connor Abbott
8e6643fee5 freedreno: Add a7xx crashdump-related registers and enums
These come from kgsl, and we will need them to capture GPU state for
devcoredump.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27264>
2024-01-25 20:38:28 +00:00
Samuel Pitoiset
b69345fcfc vulkan: promote VK_EXT_index_type_uint8 to KHR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27261>
2024-01-25 19:55:14 +00:00
Samuel Pitoiset
a8142a6051 vulkan: promote VK_EXT_line_rasterization to KHR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27261>
2024-01-25 19:55:14 +00:00
Karol Herbst
98dab1aad5 rusticl/program: mark NirKernelBuild as Send and Sync
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26040>
2024-01-25 19:40:39 +00:00
Karol Herbst
dd5b0adc79 rusticl/mem: make Mem Send/Sync by storing mapping ptrs as usize
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26040>
2024-01-25 19:40:39 +00:00
Karol Herbst
7f110ec63d rusticl/gl: mark GLCtxManager as Send + Sync
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26040>
2024-01-25 19:40:39 +00:00
Karol Herbst
b76fb0f01b rusticl/context: store SVM pointers as usize
This way Context becomes Send and Sync

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26040>
2024-01-25 19:40:39 +00:00
Karol Herbst
89868992ab rusticl/mesa: add thread-safe wrapper for pipe_image_views
In theory a pipe_image_view can outlive the pipe_resource it's referring
to, so we have to make sure that doesn't happen.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26040>
2024-01-25 19:40:38 +00:00
Karol Herbst
1166944124 rusticl/mesa/screen: convert to ThreadSafeCPtr
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26040>
2024-01-25 19:40:38 +00:00
Karol Herbst
ef8461b84f rusticl/mesa/device: convert to ThreadSafeCPtr
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26040>
2024-01-25 19:40:38 +00:00
Karol Herbst
a108bc9908 rusticl/util: add a wrapper around "thread-safe" C types
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26040>
2024-01-25 19:40:38 +00:00
Caio Oliveira
5a44d0fd1d anv: Advertise VK_KHR_shader_subgroup_rotate
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27272>
2024-01-25 19:07:42 +00:00
Caio Oliveira
4af079960d intel/compiler: Enable lower_rotate_to_shuffle in subgroup lowering
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27272>
2024-01-25 19:07:42 +00:00
Dmitry Baryshkov
cb1b6649e1 freedreno/regs: define the wide bus enable bit in DSI_VID_CFG0
Follow the kernel patch by Jonathan Marek and define the DATABUS_WIDEN
bit in the DSI_VID_CFG0 register.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27271>
2024-01-25 17:37:50 +00:00
Dmitry Baryshkov
7a81855a67 freedreno/drm: don't crash for unsupported devices
For unsupported devices fd_pipe_new() will return NULL, causing a crash
when fd_device_new() tries to check device generation.

Handle fd_pipe_new() returning NULL by destroying device and returning
NULL.

Fixes: 4861067689 ("freedreno/drm: Add sub-allocator")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26961>
2024-01-25 17:01:24 +00:00
Mark Collins
5a6a55fbbe tu/kgsl: Fix sync_wait'd FD in kgsl_syncobj_wait
The FD being waited on in `kgsl_syncobj_wait` was the device FD
instead of the FD of the syncpoint, this was entirely incorrect
and would result in waiting on FD kgsl syncobjs being entirely
broken.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27267>
2024-01-25 16:34:32 +00:00
Georg Lehmann
a3a1a8b1d0 radv: enable VK_KHR_shader_subgroup_rotate
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27269>
2024-01-25 16:09:42 +01:00
Samuel Pitoiset
6725ad9f22 lavapipe: fix build since vulkan spec update
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27260>
2024-01-25 14:58:53 +01:00
Lionel Landwerlin
ccaec08012 vulkan/runtime: handle new image layout
To prevent compiler warnings.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27260>
2024-01-25 14:57:51 +01:00
Samuel Pitoiset
2cc13f3236 vulkan: bump headers/registry to 1.3.276
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27260>
2024-01-25 14:57:51 +01:00
Rohan Garg
3e93ccbc1b anv: untyped data port flush required when a pipeline sets the VK_ACCESS_2_SHADER_STORAGE_READ_BIT
VK_ACCESS_2_SHADER_STORAGE_READ_BIT specifies read access to a
storage buffer, physical storage buffer, storage texel buffer, or
storage image in any shader pipeline stage.

Any storage buffers or images written to must be invalidated and
flushed before the shader can access them.

This fixes the following tests on LNL:
  - dEQP-VK.synchronization2.op.single_queue.barrier.write\*_specialized_access_flag

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27212>
2024-01-25 13:55:24 +01:00
Friedrich Vock
425ddc24b1 winsys/amdgpu: Fix build on BSD
Some BSDs don't define ENODATA.

Fixes: cf24d155 ("winsys/amdgpu: Hook up guilt to amdgpu_ctx_set_sw_reset_status")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27181>
2024-01-25 11:17:50 +00:00
Friedrich Vock
963813fbfd radv/amdgpu: Fix build on BSD
Some BSDs don't define ENODATA.

Fixes: c58cff3c ("radv/amdgpu: Handle -ENODATA and -ETIME from cs_submit")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27181>
2024-01-25 11:17:49 +00:00
Daniel Stone
9cc3e842bb egl: Return BAD_CONFIG when robust access unsupported
EGL_EXT_create_context_robustness provides separate knobs for device
reset strategy and robust buffer access. As there is no separate query
for both piecies of functionality, devices which do not support robust
buffer access need to reject contexts created with that flag with
EGL_BAD_CONFIG.

Given that EGL can't do cap queries, we create a fake extension entry in
the EGLDisplay to cover whether the device can do robust buffer access
or just device-reset queries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26972>
2024-01-25 10:24:48 +00:00
Tranquillity Codes
3fd44345c4 intel: Skip ioctls for querying device info when hardware is unsupported
While enumerating devices on a system with multiple implementations,
unnecessary ioctls will be issued before a driver checks if it supports a
given device.
This patch makes the driver fail early based on a intel_device_info.ver
check with 2 new parameters added to intel_get_device_info_from_fd.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27166>
2024-01-25 09:57:24 +00:00
Constantine Shablia
96504d51a2 panvk: advertise bufferDeviceAddress
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27209>
2024-01-25 09:19:50 +00:00
Constantine Shablia
2d614b5550 panvk: implement vkGetBufferDeviceAddress
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27209>
2024-01-25 09:19:50 +00:00
Kenneth Graunke
2e38024fd8 intel: Use hardware generated compute shader local invocation IDs
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27167>
2024-01-25 08:43:04 +00:00
Kenneth Graunke
5e7f4ff97f intel: Add driver support for hardware generated local invocation IDs
This adds a few new fields in the brw_cs_prog_data struct and then
uses them to fill in the relevant COMPUTE_WALKER fields.

Although the Tile Layout field theoretically has different settings for
32/64/128bpe, it appears that the recommended programming is to always
pick either TileY 32bpe or Linear.  It's not very practical to look at
the surface formats involved, anyway.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27167>
2024-01-25 08:43:04 +00:00
Kenneth Graunke
10ed4f1cab intel/nir: Pass devinfo and prog_data to brw_nir_lower_cs_intrinsics
We'll want to check for Alchemist and set various prog_data fields
in the next patch, in order to enable some optimizations.  Passing
NULL for prog_data will remain valid and continue working as before.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27167>
2024-01-25 08:43:04 +00:00
Kenneth Graunke
f85ad92dae iris: Implement query_memory_info() on discrete cards
This has been stubbed since 2019, but wasn't advertised or implemented.

Neither kernel offers us any interface for tracking evictions, but we
can at least report the size of various heaps.

Fixes various SPECviewperf subtests on Alchemist.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27168>
2024-01-24 23:37:30 +00:00
Kenneth Graunke
f7ef356a74 intel/dev: Fix typo (ajust -> adjust)
Fixes: b571ae6e7a ("intel: Make memory heaps consistent between KMDs")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27168>
2024-01-24 23:37:30 +00:00
Kenneth Graunke
5ccb9f4632 iris: Don't return timestamps modulo 36-bits
Our actual timestamp register from the hardware is 36-bits these days.
Depending on the clock base, a few of the low bits may be discarded.
We scale by 52.08 or so (see intel_device_info_timebase_scale()) in
order to convert clock ticks to nanoseconds.  This value could take
~43-44 bits to represent.  When our timestamp register overflows, the
reported value would overflow at some value which isn't a power-of-two.

For some reason, when we implemented ARB_timer_query for i965 in 2012,
we thought applications would use GL_QUERY_COUNTER_BITS to detect and
handle overflow, expecting our timer queries to overflow at a power-of-
two value.  We tried to hack around this by reporting a 36-bit counter,
for what was then a 32-bit(?) timestamp register, with a timebase scale
of 80(?)...and reported the nanoseconds modulo 2^36, with some
handwaving about wrap around times being close enough.

I don't think this is what anyone wants.  All other Gallium drivers
(except maybe zink) report 64 here, as does the Intel Windows driver.

The ARB_timer_query spec defines it as:

   "If <pname> is QUERY_COUNTER_BITS, the implementation-dependent
    number of bits used to hold the query result for <target> will be
    placed in <params>.  The number of query counter bits may be zero,
    in which case the counter contains no useful information."

and it also mentions about overflow:

   "If the elapsed time overflows the number of bits, <n>, available to
    hold elapsed time, its value becomes undefined.  It is recommended,
    but not required, that implementations handle this overflow case by
    saturating at 2^n - 1."

There's nothing about roll-over happening at power-of-two times, just
that the value returned has to fit in that many bits, and if the value
were to exceed that, it's undefined, optionally saturated to the maximum
representable value.

This patch makes us report 64 like other drivers, and stop taking the
modulus.  Technically, our roll-over will happen before we reach the
number of query counter bits, which may or may not be valid.  But this
does let us report longer times, and should be more desirable behavior.

Tested-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26058>
2024-01-24 23:13:15 +00:00
Eric Engestrom
ffd8497c70 docs: update calendar for 24.0.0-rc3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27249>
2024-01-24 23:05:53 +00:00
Jesse Natalie
9b495ee8a9 dzn: Disable depth/stencil for partial binding from dynamic rendering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27224>
2024-01-24 22:32:59 +00:00
Jesse Natalie
f4c6d9d9a9 dzn: Handle VkBindImageMemorySwapchainInfoKHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27224>
2024-01-24 22:32:59 +00:00
Jesse Natalie
df684ee653 dzn: Fix enhanced barrier layout for depth blits
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27224>
2024-01-24 22:32:59 +00:00
Jesse Natalie
fcd56e31f7 dzn: Implement maintenance3 VariableDescriptorCountLayoutSupport
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27224>
2024-01-24 22:32:59 +00:00
Jesse Natalie
beb82c836d microsoft/compiler: Add feature flags for new comparison sampling ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27200>
2024-01-24 21:38:49 +00:00
Eric Engestrom
eb218e15bf docs: add sha256sum for 23.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27248>
2024-01-24 21:32:00 +00:00
Eric Engestrom
e7e260f468 docs: update calendar for 23.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27248>
2024-01-24 21:32:00 +00:00
Eric Engestrom
3e2dc3520e docs: add release notes for 23.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27248>
2024-01-24 21:32:00 +00:00
José Roberto de Souza
d5ec2fa52f anv: Fix calculation of syncs required in Xe KMD
num_syncs was being incremented by one if 'utrace_submit != NULL' but
a sync was only being set if also
'util_dynarray_num_elements(&utrace_submit->batch_bos) == 0'.

This mismatch could cause application to abort due to
'assert(count == num_syncs)'.

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/27244>
2024-01-24 20:48:39 +00:00
Dave Airlie
38e92556a0 gallivm: passing fp16_split_fp64 to fp16 lowering.
This causes lavapipe to use the split code and fixes accuracy
for CTS.

Fixes dEQP-VK.glsl.builtin.precision_fconvert.f64_to_f16*

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27228>
2024-01-24 20:05:57 +00:00
Ian Romanick
c2a25cf75c intel/fs: Fix shift counts for 8- and 16-bit types
With regards to implicit masking of the shift counts for 8- and 16-bit
types, the PRMs are incorrect. They falsely state that on Gen9+ only the
low bits of src1 matching the size of src0 (e.g., 4-bits for W or UW
src0) are used. The Bspec (backed by data from experimentation) state
that 0x3f is used for Q and UQ types, and 0x1f is used for **all** other
types.

To match the behavior expected for the NIR opcodes, explicit masks for
8- and 16-bit types must be added.

This fixes (the updated version, see crucible!138) of
func.shader.shift.int16_t on all Intel platforms. According to Karol,
this also fixes "integer_ops integer_rotate" tests in OpenCL CTS.

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

Tested-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23001>
2024-01-24 19:41:35 +00:00
Faith Ekstrand
b2824dd38d nvk: Set maxInlineUniformTotalSize
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27242>
2024-01-24 19:26:04 +00:00
Faith Ekstrand
58e916b3b7 nvk: Don't exnore ExternalImageFormatInfo
Fixes: 702326d013 ("nvk: Add external memory queries")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27242>
2024-01-24 19:26:04 +00:00
Guilherme Gallo
f3850c97d1 ci/lava: Fix the integration test
During the development of this fix, I utilized the `test_full_yaml_log`
test, which is marked as slow. This test is excellent for reproducing
past job submissions. It can be executed using the following commands:

```
lavacli jobs logs --raw 12496073 > /tmp/log.yaml
pytest .gitlab-ci/tests/test_lava_job_submitter.py -m slow -s
```

Here, `12496073` is the LAVA job ID from this specific job:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53546660

The logs were not functioning as expected due to a few mistakes I made
with generators, such as:
- Not reusing the `time_traveller_gen` generator to call `next` more
  than once.
- Forgetting to parse the YAML inside `time_travel_from_log_chunk`.

Additionally:
- Added some statistics at the end of the test to aid in diagnosing
  whether the test was reproduced accurately.
- Renamed some variables for clarity.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26996>
2024-01-24 18:39:17 +00:00
Guilherme Gallo
2b86e49393 ci/lava: Ignore DUT feedback messages
In our process of monitoring LAVA logs, we typically skip numerous
messages to enhance log clarity. We already exclude `feedback` messages
from display. These messages were just used as a heartbeat signal,
indicating that if we are receiving them, the Device Under Test (DUT) is
active.

Practically, if we continuously receive feedback messages without any
other message level (either `debug` or `target`) for several minutes,
this could be a cause for concern, as it likely indicates the device is
in a kind of livelock state.

Therefore, it is more prudent to ignore feedback messages, as they tend
to occur frequently in unstable scenarios. However, it's important to
note that any other message level will still be considered as a
heartbeat signal.

Real case where several minutes of feedback messages indicate a hang:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53546660

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26996>
2024-01-24 18:39:17 +00:00
Juan A. Suarez Romero
dc2639acb4 Revert "ci: disable Igalia farm"
This reverts commit a6d9e21c23.

Issues fixed in the Igalia farm. Bring back it to the world.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27245>
2024-01-24 18:05:44 +00:00
Karol Herbst
c7ffbd8759 nak: fix clippy::single_match warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
cce0a42dcd nak: fix clippy::clone_on_copy warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
e7a059794e nak: fix clippy::manual_while_let_some warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
36cb48d083 nak: fix clippy::unwrap_or_default warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
fb53146b44 nak: fix clippy::redundant_closure warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
06ff342ee1 nak: fix clippy::needless_return warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
4b039abd7b nak: fix clippy::match_like_matches_macro warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
4d414cb61a nak: fix clippy::while_let_loop warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
1effb5262a nak: fix clippy::needless_borrow warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
3d4bd73fa3 nak: fix clippy::needless_lifetimes warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
00a6e2ae4d nak: fix clippy::useless_conversion warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
ec7b32d920 nak: fix clippy::mem_replace_with_default warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
cab414669f nak: fix clippy::extra_unused_lifetimes warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
7c9734b6dc nak/meson: specify rust flags globally and allow some clippy lints
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Rhys Perry
6dc182b6b2 aco: fix labelling of s_not with constant
Fixes RADV compilation of a Cyberpunk 2077 RT pipeline with
PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: dfaa3c0af6 ("aco: Flip s_cbranch / s_cselect to optimize out an s_not if possible.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27194>
2024-01-24 17:25:15 +00:00
Tomeu Vizoso
7adc7678a8 teflon: Add table with known supported models to docs
Hopefully it is just start, though in time this should probably move
to some kind of  model repository.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27241>
2024-01-24 17:17:51 +00:00
Georg Lehmann
4c74077b62 aco: implement rotate
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27118>
2024-01-24 16:38:40 +00:00
Georg Lehmann
b90ec971d7 aco/gfx11: resolve VcmpxPermlaneHazard for v_permlane64
The GFX11 ISA docs description of this hazard says it's about v_permlane in
general, not just v_permlane(x)16.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27118>
2024-01-24 16:38:40 +00:00
Georg Lehmann
19876386e2 aco/gfx11: use v_nop to resolve VcmpxPermlaneHazard
The GFX11 ISA doc explicitly recommends using v_nop in
7.2.8. PERMLANE Specific Rules.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27118>
2024-01-24 16:38:40 +00:00
Georg Lehmann
a626f765b5 aco: support v_permlane64_b32
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27118>
2024-01-24 16:38:40 +00:00
Georg Lehmann
c67d4a75ba aco: validate v_permlane opsel correctly
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27118>
2024-01-24 16:38:40 +00:00
Georg Lehmann
bc57f14c2d aco: fix printing dpp8
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27118>
2024-01-24 16:38:39 +00:00
Rohan Garg
c69650a95e isl,blorp,anv: introduce ISL_TILING_64_XE2 for Xe2+ platforms
Xe2+ changed the msaa mapping for 2D/3D Tile64 surfaces, introduce a
Xe2+ specific enum to handle this change.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27113>
2024-01-24 17:01:48 +01:00
Samuel Pitoiset
db4673ee72 radv: add a per-stage key field for mesh shaders with a task shader
This is to match VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27176>
2024-01-24 14:52:34 +00:00
Samuel Pitoiset
1e1a6d8e26 radv: remove unused parameter to gather_shader_info_mesh()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27176>
2024-01-24 14:52:34 +00:00
Mike Blumenkrantz
df45cbddb5 zink: set more dynamic states when using shader objects
fixes #10457

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27146>
2024-01-24 14:17:27 +00:00
Karol Herbst
eca4f0f632 rusticl/kernel: check that local size on dispatch doesn't exceed limits
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27232>
2024-01-24 13:19:00 +00:00
Karol Herbst
2a0c15d5eb rust/spirv: fix clippy lint on unneeded late initialization
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27232>
2024-01-24 13:19:00 +00:00
Karol Herbst
4dd404dd2e rusticl/meson: use rust_abi instead of rust_crate_type
`rust_crate_type` was deprecated in meson-1.3

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27232>
2024-01-24 13:19:00 +00:00
Friedrich Vock
9f22b95956 nir: Handle casts in nir_opt_copy_prop_vars
Cc: mesa-stable

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27197>
2024-01-24 12:39:48 +00:00
Friedrich Vock
6c845ed548 nir: Make is_trivial_deref_cast public
Cc: mesa-stable

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27197>
2024-01-24 12:39:48 +00:00
Boris Brezillon
f6f7715c58 panfrost: Clamp the render area to the damage region
The render area clamping was lost during the transition to the FB
helpers. Restore the original logic so we can benefit from
EGL_KHR_partial_update on v4, and on v5 when only one damage
rectangle is passed.

Fixes: ff3eada7eb ("panfrost: Use the generic preload and FB helpers in the gallium driver")
Reported-by: Sjoerd Simons <sjoerd.simons@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27215>
2024-01-24 11:58:50 +00:00
Christian Gmeiner
69d39dba42 .gitignore: Add .venv folder
On my machine, this folder gets created by .gitlab-ci/bin/ci_run_n_monitor.sh.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27227>
2024-01-24 10:53:14 +00:00
Tomeu Vizoso
60c2bcb8af etnaviv: Use TP cores to accelerate tensor transformations
Vivante NPUs can contain systolic arrays that can be used to perform
several kinds of tensor transformations.

Use these to offload the CPU.

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25714>
2024-01-24 10:02:11 +00:00
Tomeu Vizoso
d6473ce28e etnaviv: Use NN cores to accelerate convolutions
Vivante NPUs contain MAC arrays that can be used to perform
convolution operations on tensors.

This commit implements the Gallium functions that accept convolutions
and executes them on these MAC arrays.

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25714>
2024-01-24 10:02:11 +00:00
Tomeu Vizoso
f014f1bba9 etnaviv: Don't emit boilerplate for compute only contexts
The blob just emits the VIVS_GL_API_MODE and VIVS_PA_SYSTEM_MODE state
changes in a single job before any other jobs.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25714>
2024-01-24 10:02:10 +00:00
Tomeu Vizoso
30a8c071e9 etnaviv: Add a bunch of new params for NPUs
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25714>
2024-01-24 10:02:10 +00:00
Tomeu Vizoso
9e05550888 etnaviv: Update headers from rnndb
Update to rnndb commit 8d7ee714cfe2.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25714>
2024-01-24 10:02:10 +00:00
Tomeu Vizoso
af199e0ff0 teflon: Initial commit
Teflon is a Gallium frontend that TensorFlow Lite can load to delegate
the execution of operations in a neural network model.

See docs for more.

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25714>
2024-01-24 10:02:10 +00:00
Tomeu Vizoso
9290410870 mesa: Import TensorFlow Lite headers
These define a stable API for implementing delegates that can be used in
a Gallium frontend.

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25714>
2024-01-24 10:02:10 +00:00
Tomeu Vizoso
d8fb1dc7ae gallium/util: Fix pipe_buffer_copy
Some of the fields that were being left uninitialized were actually
being used later.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25714>
2024-01-24 10:02:10 +00:00
Tomeu Vizoso
a6d9e21c23 ci: disable Igalia farm
I'm having trouble merging stuff because of:

++ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 'http://192.168.40.161:8888/cache/?uri=https://s3.freedesktop.org/artifacts/mesa/mesa/1085412/mesa-arm64-default-debugoptimized.tar.zst'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (7) Failed to connect to 192.168.40.161 port 8888 after 21 ms: Couldn't connect to server

Warning: Problem (retrying all errors). Will retry in 60 seconds. 4 retries
Warning: left.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27231>
2024-01-24 08:49:02 +01:00
Juan A. Suarez Romero
fdf6b22ffe Revert "ci: disable Igalia farm"
This reverts commit c16645c091.

Bring the farm back again.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27225>
2024-01-24 01:01:02 +01:00
Guilherme Gallo
26564b8515 bin/ci: Don't submit jobs on integration test
`test_full_yaml_log` don't need to submit job, because it would need to
replicate/mock more stuff, like the first stage init, which is not
necessary to reproduce issues from the raw YAML log file.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26995>
2024-01-23 22:47:24 +00:00
Guilherme Gallo
ffe2b31f9a ci/lava: Detect hard resets during test phase
Hard resets should not occur during the test phase. Therefore, let's
detect them through specific log messages and raise an exception for a
known issue if it occurs. Without this detection, the job will continue
running on both Gitlab and LAVA until a timeout occurs.

Real case:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53546660

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26995>
2024-01-23 22:47:24 +00:00
Benjamin Lee
94d075d049 nak: handle nop ops from NAK IR on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27178>
2024-01-23 22:26:44 +00:00
Benjamin Lee
fc232a67a4 nak: implement cs2r op on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27178>
2024-01-23 22:26:43 +00:00
Benjamin Lee
48055f6a23 nak: implement kill op on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27178>
2024-01-23 22:26:43 +00:00
Rob Clark
354c26d0c0 tu/drm/virtio: Fix dmabuf import
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27219>
2024-01-23 21:57:59 +00:00
Felix DeGrood
1a43970276 driconf: Change vendorid on Palworld for Intel
Changing force_vk_vendor=-1 for Palworld makes Palworld run.
Not sure yet why. Game does not use XeSS currently.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10474
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27218>
2024-01-23 21:15:10 +00:00
Eric Engestrom
aa56740ded rpi5/ci: add flake seen today
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27221>
2024-01-23 20:54:18 +00:00
Eric Engestrom
79a27848d7 rpi4/ci: add timeouts seen today
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27221>
2024-01-23 20:54:18 +00:00
Eric Engestrom
d9abd16d96 rpi3/ci: add flake seen today
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27221>
2024-01-23 20:54:18 +00:00
Rhys Perry
e465ac2561 nir/lower_shader_calls: remove CF before nir_opt_if
Otherwise, opt_if_simplification() can attempt to insert an inot after a
jump.

Fixes RADV compilation of a Cyberpunk 2077 pipeline with
PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27193>
2024-01-23 19:02:03 +00:00
Rhys Perry
015b0d678f nir/lower_non_uniform: set non_uniform=false when lowering is not needed
Fixes RADV compilation of a Doom Eternal pipeline with
PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT, because
nir_opt_non_uniform_access was skipped and later passes don't expect
non-uniform access.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b1619109ca ("nir/lower_non_uniform: remove non_uniform flags after lowering")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27192>
2024-01-23 18:09:39 +00:00
Rhys Perry
90939e93f6 radv: do nir_shader_gather_info after radv_nir_lower_rt_abi
Fixes compilation of a Doom Eternal shader with
PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT.

ac_nir_lower_resinfo() was not happening because it is predicated on
uses_resource_info_query and no later optimization updated it.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27195>
2024-01-23 17:48:13 +00:00
Lionel Landwerlin
e1b9a6e4f3 anv: initial RMV support
Launch with :

$ MESA_VK_TRACE=rmv MESA_VK_TRACE_TRIGGER=/tmp/trig ./my_app

In another terminal, trigger a capture :

$ touch /tmp/trig

The application with create a snapshot and print out :

RMV capture saved to '/tmp/my_app_2024.01.19_10.56.33.rmv'

Then just open it with RMV :

./RadeonMemoryVisualizer /tmp/my_app_2024.01.19_10.56.33.rmv

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/26843>
2024-01-23 17:24:19 +00:00
Lionel Landwerlin
6d53fcd54e anv: track imported ray tracing pipeline groups
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/26843>
2024-01-23 17:24:19 +00:00
Lionel Landwerlin
8229ee43ac anv: track total state stream allocated blocks from the pool
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/26843>
2024-01-23 17:24:19 +00:00
Lionel Landwerlin
6933257211 anv: add BO flag for internal driver allocations
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26843>
2024-01-23 17:24:19 +00:00
Lionel Landwerlin
82c08c4141 anv: rename layers entrypoints
Prefix everything with anv_ so it doesn't clash with other drivers if
loaded in the same process.

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/26843>
2024-01-23 17:24:19 +00:00
Lionel Landwerlin
cb0af056bc anv: remove unused perfetto declarations
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/26843>
2024-01-23 17:24:19 +00:00
Lionel Landwerlin
b87807028c anv: reorder anv_astc_emu.c
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/26843>
2024-01-23 17:24:19 +00:00
Sil Vilerino
04ebb79b9e d3d12: Clean up H264 video decode interlaced code path
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27213>
2024-01-23 16:58:12 +00:00
Boris Brezillon
d9477f994a panfrost: Move pan_{bo,device}.{c,h} to the gallium driver dir
We've refactored the common lib and panvk so they no longer depend
on panfrost_{device,bo}.{c,h}. Let's move those files to the gallium
driver dir so we're not tempted to use them again.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:10 +00:00
Boris Brezillon
211aa20194 panvk: Move away from panfrost_{bo,device}
Now that the rest of the code has been designed to not use
panfrost_{bo,device}, we can transition the remaining wrappers to
pan_kmod_{bo,vm,dev}.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:10 +00:00
Boris Brezillon
ab6a61829c panvk: Keep tiler_heap and sample_positions BOs at the panvk_device level
We wrap panfrost_device's BOs with a panvk_priv_bo object and store
the result in panvk_device. This way we'll be able to transition to
explicit BO allocation without changing BO users code.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:10 +00:00
Boris Brezillon
c05104c71f panvk: Keep a ref to a pan_kmod_bo in panvk_buffer
We don't need the panfrost_bo object which contains both the BO and
its CPU/GPU mappings. We store the GPU address at bind time. We also
have a hack for index buffers which are currently walked by the CPU
to extract the min/max index. Add a comment to make sure this field
goes away when indirect draw is fixed.

While at it, keep a ref to the buffer object so we don't end up with
a invalid deref (UAF) if the vulkan user does something silly like
freeing the VkDeviceMemory object while the VkBuffer is still active.
Flag this with a TODO to make sure we don't forget about it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:10 +00:00
Boris Brezillon
06a2a857f7 panvk: Keep a ref to a pan_kmod_bo in panvk_image
We don't need the panfrost_bo object which contains both the BO and
its CPU/GPU mappings. We store the GPU address at bind time and store
it in the pimage object.

While at it, keep a ref to the buffer object so we don't end up with
a invalid deref (UAF) if the vulkan user does something silly like
freeing the VkDeviceMemory object while the VkImage is still active.
Flag this with a TODO to make sure we don't forget about it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:10 +00:00
Boris Brezillon
00cdd1d743 panvk: Track blit src/dst using pan_kmod_bo objects
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
01c7abf56f panvk: Transition panvk_{image,buffer}_view to panvk_priv_bo
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
d09f388824 panvk: Transition panvk_pipeline to panvk_priv_bo
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
57ea8e4a46 panvk: Transition panvk_descriptor_set to panvk_priv_bo
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
86109da54e panvk: Transition panvk_pool to panvk_priv_bo
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
78e5bc1ee5 panvk: Add the concept of private BO
Those are all the BOs that are allocated for internal use (descriptor
allocation, mostly). Such BOs get allocated and immediately mapped in
CPU and GPU VMs.

The new panvk_priv_bo abstraction uses a pan_kmod_bo as we're trying
to get away from panfrost_bo in panvk.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
9672ddcc3a panvk: Add pan_kmod_{vm,dev} objects to panvk_device
Will be needed for when we will transition away from panfrost_{bo,device}.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
48ff9fc818 panvk: Instantiate our own blitter/blend_shader caches
If we want to get rid of panfrost_device in panvk, we need to instantiate
our own blend shader and blitter caches.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
d155d6b7a3 panvk: Add a decode context at the panvk_device level
For now it points to panfrost_device::decode_ctx, but it will be
explicitly instantiated when we move away from panfrost_{device,bo}.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
acdcf5c0a1 panvk: Move panfrost_device and panvk_meta to panvk_device
Each logical device should come with its own GPU VM space, and given the
GPU VM space is attached the FD in panfrost, we need to move the
panfrost_device to panvk_device. As a result, we also need to move the
meta stuff there, because the meta logic is allocating GPU buffers.

Note that we instantiate a new kmod_dev at the physical device level
so we can query device properties. This device shouldn't be used for
any buffer allocation or GPU submission though.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
ea4dc54d72 panvk: Use vk_device::drm_fd instead of going back to the physical device
There's no reason to dereference the physical device if we can use
the value stored in vk_device, plus it gets rid of a few
panfrost_device_fd() call sites, which will help us transition away
from panfrost_device.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
92fa7468a1 panvk: Store various physical device properties at the physical_device level
This allows us to get rid of some panvk_physical_device::pdev
accesses.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
2e65d7347e panvk: Stop passing panfrost_device around in internal meta helpers
We're better off passing the panvk_physical_device device directly,
as it contains both the meta cache and the panfrost_device object.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
e028b6dbe7 panvk: Get rid of unused pdev arguments passed to some meta helpers
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
c615b4ae10 panfrost: Add a helper to retrieve a panfrost_bo from a pan_kmod_bo
Will be useful to transition panvk out of panfrost_{device,bo}.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
446ec05fae panfrost: Make pan_perf panfrost_device agnostic
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
b554c09399 panfrost: Make panfrost_texfeatures.c panfrost_device agnostic
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
f2c06d0813 panfrost: Remove uneeded pan_device.h inclusions
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
493cf2f008 panfrost: Make pan_desc.{c,h} panfrost_bo agnostic
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
f94889d079 panfrost: Make pan_texture.{c,h} panfrost_bo agnostic
All the helpers use pan_image_mem::bo just to get the base address.
So let's just store this information here, and let the user keep track
of the BO that's attached to the image resource.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
2d07926df1 panfrost: Make pan_props.c panfrost_device agnostic
Move the functions that are dealing with panfrost_device initialization
to a new panfrost_device.c file, and make the remaining ones
panfrost_device agnostic.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
7b4d1bb9be panfrost: Make pan_pool.h panfrost_{device,bo} agnostic
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
1b1f1a6d76 panfrost: Make pan_indirect_dispatch panfrost_device agnostic
This is part of our effort to make libpanfrost panfrost_{device,bo}
agnostic.

Since we are now passed a pool for descriptor allocations, there's no
point doing a single allocation for both the RSD and TSD, and we can
replace the get_{tls,rsd}() helpers by two fields at the
pan_indirect_dispatch_meta level, thus simplifying the logic a bit.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
2bdcef6506 panfrost: Make pan_blitter.{c,h} panfrost_device agnostic
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
49aeced1a4 panfrost: Make pan_blitter.h includable from non per-gen files
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
146b51d9f4 panfrost: Remove unused header inclusions from pan_blitter.h
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
a01be2f21f panfrost: Make pan_encoder.h panfrost_device agnostic
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
0651b8871b panfrost: Make pan_sample.c panfrost_device agnostic
In order to do that, we create a pan_sample.h header, and make it so
the buffer allocation is left to the caller.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
387882d811 panfrost: Make pan_layout.c panfrost_device agnostic
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
f4f2b7492b panfrost: Drop unused panfrost_device forward declaration in pan_shader.h
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
517c0458f2 panfrost: Make pan_desc.{c,h} panfrost_device agnostic
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
56438e06b9 panvk: Inline pan_wls_mem_size()
And get rid of the function in pan_desc.h.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
00fb95175f panfrost: Pass tiler heap info through pan_tiler_context
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
42138ee1c8 panfrost: Pass no_hierarchical_tiling info through pan_tiler_context
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
00d4a7c7fd panfrost: Pass the sample position array through pan_fb_info
Part of the attempt to make pan_desc.{c,h} panfrost_device-agnostic.
Let the caller pass the sample position array through pan_fb_info
instead of extracting it from panfrost_device.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
8b8942d4dc panfrost: Pass the tile buffer budget through pan_fb_info
Pass the tile buffer budget through pan_fb_info instead of assuming
the it's always panfrost_device::optimal_tib_size. This way we let
the driver decide how much of the tile buffer it's allowed to use
instead of making it a general rule. Most importantly, it's one less
dependency on panfrost_device in pan_desc.c.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
95480bc2ab panfrost: Get rid of unused panfrost_device arguments in pan_blitter.c
Get rid of the panfrost_device in all helpers where it's currently
unused.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
3e85e3ce08 panfrost: Make the pan_blend logic panfrost_device-agnostic
We keep embedding a blend shader cache in panfrost_device, but now we
have pan_blend source files that can be used without a panfrost_device
object.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
8a42913c23 panfrost: Stop passing a panfrost_device to pan_inline_rt_conversion()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
9c8af69827 panfrost: Stop passing a panfrost_device to pan_blend_create_shader()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
1b79735a63 panfrost: Stop exposing pan_blend_create_shader()
Not used outside pan_blend.c.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
0e7e22a808 panfrost: Stop passing a panfrost_device to pan_blend_get_internal_desc()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
fbcc85108b panfrost: Don't pass a panfrost_device to panfrost_afbc_can_tile()
Pass the arch directly.

While at it, make the helper a static inline function defined in
pan_texture.h.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:09 +00:00
Boris Brezillon
a758e95077 panfrost: Don't pass a panfrost_device to panfrost_format_supports_afbc()
Pass the arch instead.

While at it, make this helper a static inline function defined in
pan_texture.h.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:08 +00:00
Boris Brezillon
0d76cb0268 panfrost: Stop passing a panfrost_device to panfrost_new_texture()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:08 +00:00
Boris Brezillon
5669622857 panfrost: Move YUV-debugging out of panfrost_new_texture()
It's a gallium driver specific knob, and we're trying to stop passing
a panfrost_device to panfrost_new_texture(), so let's move the
YUV-debugging tweak to panfrost_create_sampler_view_bo().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:08 +00:00
Boris Brezillon
897733c55d panfrost: Move panfrost_is_yuv() to pan_format.h
This way we can do the test outside pan_texture.c.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:08 +00:00
Boris Brezillon
fba7f38fda panfrost: Add panfrost_[blendable]_format_table() helpers
The format tables selection is currently done in pan_props, but we will
soon need something similar in panvk if we want to get rid of
panfrost_device there.

Add panfrost_format_table() and panfrost_blendable_format_table() and
use them to populate the panfrost_device format tables.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:08 +00:00
Boris Brezillon
e0fe9c369a panfrost: Make panfrost_format_to_bifrost_blend() a per-gen helper
Make panfrost_format_to_bifrost_blend() a per-gen helper so we don't
have to pass a panfrost_device object around.

While at it, pick a better name for this helper and move it to
pan_format.h.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:08 +00:00
Boris Brezillon
b87de3a2e0 panfrost: Add a per-gen panfrost_blendable_format_from_pipe_format() helper
Add a helper to retrieve a panfrost_blendable_format from a pipe_format
without using a panfrost_device object. Only works for
per-gen source files, but those are the main users of blendable formats
anyway.

Will be useful to stop using panfrost_device from panvk.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:08 +00:00
Boris Brezillon
e8d2b5b86d panfrost: Add a per-gen panfrost_format_from_pipe_format() helper
This will allow us to get rid of panfrost_device arguments passed
to per-gen helpers that only need it for the format table, which
will help the transition to pan_kmod_dev in panvk.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:08 +00:00
Boris Brezillon
fe9d541d9d panfrost: Kill unused forward declarations in pan_texture.h
pan_pool and pan_jc are never used in this file.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26698>
2024-01-23 16:32:08 +00:00
Karol Herbst
bd901213dc nak: make it compile with clippy
nobody actually cares about fixing clippy warnings/errors inside NAK, so
drop the flags for now to make it at least compile.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27216>
2024-01-23 16:15:06 +00:00
Karol Herbst
548d919bd3 nak: simplify phi_dsts
clippy complained that nothing was actually looping here. Luckily we can
simplify the code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27216>
2024-01-23 16:15:06 +00:00
Karol Herbst
0a414ecdf5 nak/opt_out: fix comparison in try_combine_outs
clippy complained it was comparing the same thing

Fixes: 5b355ff25a ("nak: Fix opt_out")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27216>
2024-01-23 16:15:06 +00:00
Benjamin Lee
c3fbd0dcb1 nak: use rro when emitting mufu on SM50
Fixes dEQP-VK.glsl.builtin.precision.*, which was previously failing for
trig functions, exp, and pow.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27203>
2024-01-23 15:43:16 +00:00
Benjamin Lee
4a0f5fff87 nak: implement rro op on SM50
This is the "range reduction operator", which is needed to preprocess
srcs for some of the mufu ops on SM50.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27203>
2024-01-23 15:43:16 +00:00
Tapani Pälli
d0a3bac163 anv: move *bits_for_access_flags to genX_cmd_buffer
This makes is possible to use GFX_VER macros in these functions.

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/21364>
2024-01-23 13:17:55 +02:00
Tapani Pälli
231ede4f0c iris: replace constant cache invalidate with hdc flush
This implements Wa_14010840176.

Cc: mesa-stable
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/21364>
2024-01-23 13:17:48 +02:00
Juan A. Suarez Romero
c16645c091 ci: disable Igalia farm
For maintenance purposes.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27210>
2024-01-23 09:33:51 +00:00
Lionel Landwerlin
ba87656079 anv: implement undocumented tile cache flush requirements
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27169>
2024-01-23 08:03:12 +00:00
Lionel Landwerlin
0bc6462924 isl: add print helpers for debug
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27169>
2024-01-23 08:03:12 +00:00
Lionel Landwerlin
58c9f817cb anv: fix pipeline executable properties with graphics libraries
We're missing the ISA code in renderdoc. You can reproduce with the
Sascha Willems graphics pipeline demo.

The change is large here because we have to fix a confusion between
anv_shader_bin & anv_pipeline_executable. anv_pipeline_executable is
there as a representation for the user and multiple
anv_pipeline_executable can point to a single anv_shader_bin.

In this change we split the anv_shader_bin related logic that was
added in anv_pipeline_add_executable*() and move it to a new
anv_pipeline_account_shader() function.

When importing RT libraries, we add all the anv_pipeline_executable
from the libraries.

When importing Gfx libraries, we add the anv_pipeline_executable only
if not doing link time optimization.

anv_shader_bin related properties are added whenever we're importing a
shader from a library, compiling or finding in the cache.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3d49cdb71e ("anv: implement VK_EXT_graphics_pipeline_library")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26594>
2024-01-23 07:38:02 +00:00
Yiwei Zhang
42fc83a6e3 venus: default to enable GPL
Update the debug option to NO_GPL to help with runtime debug, and
default to enable GPL.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27054>
2024-01-23 01:33:09 +00:00
Yiwei Zhang
85df907ad8 venus: allow tls ring submission to utilize the entire ring shmem
Ring submissions on tls ring are synchronous and single threaded, thus
without perf degradation, a single cmd can use the entire ring shmem.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27054>
2024-01-23 01:33:09 +00:00
Yiwei Zhang
80a5df16fe venus: fix to respect the final pipeline layout
This fixes VUID-vkCmdDraw-None-08600 violation when running gpl cts:
dEQP-VK...graphics_library.misc.bind_null_descriptor_set.*, where the
final pipeline layout is falsely dropped, leading to incompatible with
the pipeline layout of the bound descriptor set.

Fixes: a65ac274ac ("venus: Do pipeline fixes for VK_EXT_graphics_pipeline_library")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27054>
2024-01-23 01:33:09 +00:00
Yiwei Zhang
f713b17a16 venus: fix pipeline derivatives
This was unexpected dropped in the initial GPL impl.

Fixes: a65ac274ac ("venus: Do pipeline fixes for VK_EXT_graphics_pipeline_library")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27054>
2024-01-23 01:33:09 +00:00
Yiwei Zhang
f256e8171c venus: drop some redundant comment
The render pass (legacy or dynamic) can be ignored only in a pipeline
library with just Vertex Input State. For other cases, even when raster
has been discarded, it is still needed at the api level to avoid
violating a bunch of VUs which validate against attachments. The legacy
pass byitself is also necessary to tell whether it's legacy or dynamic.
So venus implemented at the VK api level should not drop render pass in
those cases.

The layout to be ref'ed is the one to be used, so we don't care about
those being ignored, which has already been removed in the pipeline info
fix.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27054>
2024-01-23 01:33:09 +00:00
Yiwei Zhang
b551b6e48a venus: fix pipeline layout lifetime
Should check the count instead of random ptr addr.

Fixes: 19f2b9d0bb ("venus: extend VkPipelineLayout lifetime for ...")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27054>
2024-01-23 01:33:09 +00:00
David Heidelberg
7e8dce8c93 ci: bump kernel to 6.6.12, modularize i915, add Transparent Huge Pages
- new LTS kernel releease
 - i915 able to load firmwares from rootfs (loaded later, but gaining PM
   firmware loading support also necessary for ADL to loadup)
 - i915 screams that without THP may have degraded perf, let him have it

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27185>
2024-01-23 00:41:48 +00:00
Karol Herbst
459b522251 rusticl/program: add debug option to validate internal spirvs
Sometimes it's useful to validate SPIR-Vs we generate just to make sure
they are valid.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27204>
2024-01-23 00:19:33 +00:00
Karol Herbst
6e70699e24 rusticl/program: add clc_validator_options helper function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27204>
2024-01-23 00:19:33 +00:00
Karol Herbst
421b73207c rusticl/spirv: use bool::then_Some inside SPIRVBin::link
This makes the code way easier to read :)

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27204>
2024-01-23 00:19:33 +00:00
Karol Herbst
93c1eb112f rusticl/spirv: do not attempt to parse spirv after failed link
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27204>
2024-01-23 00:19:33 +00:00
Karol Herbst
eb2afbc0e5 rusticl/program: rework debug logging option
the changes:
1. log also in clLinkProgram
2. log also if the operation succeeded to print warnings

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27204>
2024-01-23 00:19:33 +00:00
Sagar Ghuge
6fcec87090 intel/fs: Track instance id in gs_thread_payload
This change moves the instance id gs_thread_payload constructor and
lowering code will simply use that.

Also, this change takes the Xe2 register width in consideration that
fixes a couple of tests involving geometry shaders with gl_InvocationID
on Xe2.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26960>
2024-01-22 22:15:38 +00:00
Juan A. Suarez Romero
0384e96aee v3dv/ci: increase timeout for full jobs in 30min
Reached the maximum execution time in a couple of jobs.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27190>
2024-01-22 21:27:48 +00:00
Konstantin Seurer
7ebf7f49a0 llvmpipe: Compile sample functioins on demand
The way this was implemented wasn't optimal. Compiling a functrion for
each lp_static_texture_state/lp_static_sampler_state/sample_key
combination is not great. This patch tries to contain the combinatory
explosion by compiling sample functions on demand inside the shader,
caching them and moving them to their intended locations when no chader
is running.

Improves CTS runtime by a lot.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27182>
2024-01-22 20:29:40 +00:00
Konstantin Seurer
533d17ec71 llvmpipe: Stop refcounting sample functions
This would just make on-demand compilation more complicated.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27182>
2024-01-22 20:29:40 +00:00
Eric Engestrom
c4d950ce37 rpi4/ci: skip more of the dEQP-VK.ssbo.phys.layout.* tests that timeout occasionally
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27202>
2024-01-22 20:07:30 +00:00
Eric Engestrom
959819c458 rpi3/ci: update piglit & deqp expectations
Results from these jobs:
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53885235
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53941874
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53941948
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53941863

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27150>
2024-01-22 19:46:25 +00:00
Sil Vilerino
a3c91624f4 d3d12: Implement cap for PIPE_VIDEO_CAP_ENC_INTRA_REFRESH
Fixes: c81967fa89 ("d3d12: Implement Intra Refresh for H264, HEVC, AV1")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27201>
2024-01-22 13:47:25 -05:00
Hans-Kristian Arntzen
57cd0a0a28 wsi/x11: Make chain->status atomic.
Avoids having to take extra locks in acquire/present.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26954>
2024-01-22 16:45:14 +00:00
Hans-Kristian Arntzen
b634537b8b wsi/x11: Keep track of multiple presentation requests.
With present ID and IMMEDIATE/MAILBOX, waiting for completion
before submitting a new frame will limit frame rate to a multiple
of refresh rate, which is not ideal. We should be able to pump frames as
fast as IDLE callback, not limited by COMPLETE.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26954>
2024-01-22 16:45:14 +00:00
Hans-Kristian Arntzen
b90b6a395d wsi/x11: Implement VK_EXT_swapchain_maintenance1.
Allow toggling between all presentation modes.
After the rewrite, this is now trivial to support.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26954>
2024-01-22 16:45:14 +00:00
Hans-Kristian Arntzen
19dba854be wsi/x11: Rewrite implementation to always use threads.
The current implementation has many different code paths which get very
messy to reason about and maintain.

- FIFO mode worked well enough.
- IMMEDIATE did not need a thread at all, but present wait
  implementation complicated a lot of things since we had to handle
  concurrent special event reads.
- MAILBOX (and Xwayland) adds even more jank on top of this where
  have present thread, but no acquire thread, so there are tons of
  forward progress issues to consider.

In the new model, we have two threads:

- Queue thread is only responsible for receiving presents, waiting for
  them if necessary, and submitting them to X.
- Event thread pumps the special event queue and notifies
  other threads about frame completions.
- Application thread does not interact with X directly, only through
  acquire/present queues and present wait condvar.

Two threads are required to implement IMMEDIATE and MAILBOX well.
IDLE events can come back at any time and the queue thread might be
waiting for a new presentation request to come through.

This new model has the advantage that we will be able to implement
VK_EXT_swapchain_maintenance1 in a more reasonable way, since we can
just toggle the present mode per present request as all presentation
go through the same system.

Some cleanups were done as well:

- We no longer need the busy bool. Since everything goes through thread,
  we just rely on acquire/present queues.
- SW/non-MITSHM path is also moved to thread. Move acquire-specific
  logic to the thread as well.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26954>
2024-01-22 16:45:14 +00:00
Alejandro Piñeiro
0a3784ae33 v3dv/bo: use mtx_lock/unlock on cache_init too
To handle coverity warning:
   4. thread2_modifies_field: Thread2 sets cache_size to a new value. Note that this write can be reordered at runtime to occur before instructions that do not access this field within this locked region. After Thread2 leaves the critical section, control is switched back to Thread1.
   CID 1559509 (#1 of 1): Check of thread-shared field evades lock acquisition (LOCK_EVASION)6. thread1_overwrites_value_in_field: Thread1 sets cache_size to a new value. Now the two threads have an inconsistent view of cache_size and updates to fields correlated with cache_size may be lost.
521   cache->cache_size += bo->size;

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26951>
2024-01-22 16:47:08 +01:00
Alejandro Piñeiro
ffd0e3a7fe broadcom/compiler: fix coverity warning (unitialized pointer read)
Full coverity warning:

   CID 1558604: Uninitialized pointer read (UNINIT)12. uninit_use_in_call: Using uninitialized value *results when calling nir_vec.
236        return nir_vec(b, results, DIV_ROUND_UP(num_components, 2));

To fix it we initialize the variables, provide a unreachable on the
switch that sets the results values. As we are here we also move a
comment to make things more clear.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26951>
2024-01-22 16:46:57 +01:00
Karol Herbst
f2b7c4ce29 nir: rework and fix rotate lowering
No driver supports urol/uror on all bit sizes. Intel gen11+ only for 16
and 32 bit, Nvidia GV100+ only for 32 bit. Etnaviv can support it on 8,
16 and 32 bit.

Also turn the `lower` into a `has` option as only two drivers actually
support `uror` and `urol` at this momemt.

Fixes crashes with CL integer_rotate on iris and nouveau since we emit
urol for `rotate`.

v2: always lower 64 bit

Fixes: fe0965afa6 ("spirv: Don't use libclc for rotate")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by (Intel and nir): Ian Romanick <ian.d.romanick@intel.com>

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27090>
2024-01-22 10:27:44 +00:00
Eric R. Smith
a50b2f8f25 panfrost: fix panfrost drm-shim
The panfrost driver now makes an ioctl to retrieve some new memory
parameters, and DRM_PANFROST_PARAM_MEM_FEATURES is required (does not
default in the caller). This caused drm-shim to stop working. This
patch adds some defaults to get drm-shim working again.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Fixes: 91fe8a0d28 ("panfrost: Back panfrost_device with pan_kmod_dev object")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27162>
2024-01-22 09:36:47 +00:00
Lionel Landwerlin
59b652f10f anv: using a single struct for kernel upload
A bit nicer than adding more and more arguments to the upload
function.

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/27188>
2024-01-22 08:42:37 +00:00
Samuel Pitoiset
783e3c096f radv: fix indirect draws with NULL index buffer on GFX10
GFX10 has a hw bug and it can't handle 0-sized index buffer. The
non-indirect draw path was fine but not the indirect path where RADV
emits the index buffer.

This fixes flakes with dEQP-VK.*maintenance6* on NAVI14, and possibly
GPU hangs if there is an indirect draw with a valid index buffer right
before because it would re-use the same index buffer.

Fixes: db9816fd66 ("radv: add support for NULL index buffer")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27142>
2024-01-22 08:14:23 +00:00
Samuel Pitoiset
5c03cdbd02 radv: fix indirect dispatches on the compute queue on GFX7
GFX7 CP requires the indirect dispatch VA to be aligned to 32-bytes.

This fixes dEQP-VK.api.command_buffers.many_indirect_disps_on_secondary,
but it's unexpected that it uncovered this bug.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27148>
2024-01-22 07:41:05 +00:00
Francisco Jerez
c3a64f8dd1 intel/fs/xe2+: Allow SIMD16 MULH instructions.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Francisco Jerez
54f3d5a00c intel/fs: Emit QUAD_SWIZZLE instructions with WE_all for derivative lowering.
Otherwise the code generator will attempt to emit SIMD-lowered
QUAD_SWIZZLE instructions with an execution group not multiple of 8,
which is invalid on Xe2+.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Francisco Jerez
3e710a84ad intel/fs: Set the default execution group to 0 when not representable by the platform.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Francisco Jerez
43c9620dbf intel/eu/xe2+: Translate brw_reg fields in REG_SIZE units to physical 512b GRF units during codegen.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Francisco Jerez
8bc3821520 intel/fs/xe2+: Disable bank conflict mitigation pass for now.
Reworks:
* Added a TODO comment.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Francisco Jerez
6efcba9e36 intel/ir/xe2+: Add support for 32 SBID tokens to performance model.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Konstantin Seurer
a9c057d5a3 radv: Implement NIR debug printf
Adds radv_build_printf which can print nir_defs. The arguments are written
to a buffer and printed after the submit.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25753>
2024-01-20 16:11:55 +01:00
Konstantin
03379d74ba util/printf: Expose util_printf_prev_tok
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25753>
2024-01-20 16:11:55 +01:00
Konstantin
d05f8f6146 util/printf: Include stdio.h
Needed for FILE.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25753>
2024-01-20 16:11:55 +01:00
Yonggang Luo
87417012f3 zink: Update zink-anv-tgl flakes
It's from https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53978300
and https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53985604

and appeared multiple times

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27179>
2024-01-20 09:50:09 +00:00
Eric Engestrom
908f444ec1 ci/deqp: backport fix for zlib.net not allowing tarball download anymore
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27175>
2024-01-20 08:20:12 +00:00
Jesse Natalie
ebcab145cf dzn: Add a debug option to enable experimental shader models
This allows us to run with unsigned shaders

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27160>
2024-01-20 00:07:15 +00:00
Jesse Natalie
90bf4b630b microsoft/compiler: Handle comparison bias/gradient sampling
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27160>
2024-01-20 00:07:15 +00:00
Jesse Natalie
733b7fe831 microsoft/compiler: Declare shader model 6.8 / validator 1.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27160>
2024-01-20 00:07:15 +00:00
Helen Koike
bf461d856f ci/ci_post_gantt: add script that post gantt to Marge's messages
Generate Gantt chart and post an in thread reply to Marge's messages
with it in html format.

html format is used for being interactive.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26796>
2024-01-20 00:02:56 +00:00
Rob Clark
1a9a71e2d9 freedreno/registers: A couple newline changes
Mostly to avoid massive diffstat consisting of inserted newlines
compared to headergen2.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark
2e733e94d8 freedreno/registers: Add basic kernel header support
This doesn't yet add support for everything the mdp5/mdp4 reg builders
need, but at least gets us to the point where we can use it for GPU
registers, avoiding the need to add reg variant support to headergen2.

See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7978
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark
ab64afc109 freedreno/registers: Generate copyright comment blurb
Similar to headergen2, the output matches as closely as is reasonable.
The time format and file listing ends up being slightly different but
those would be part of the diffstat when we next update kernel headers
regardless.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark
8eca68d2de freedreno/registers: Don't re-parse files
Track the files we've parsed, and skip ones we have already seen, if
(for example) we see the same paths imported from imported files.

Additionally having the list of files we have parsed will be useful to
generate a headergen-like top-of-file license comment.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark
d1567249e9 freedreno/registers: De-duplicate xml_reg_files
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark
15f94505ba freedreno/registers: Pass full args to dump_c()
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark
670e93bfb5 freedreno/a6xx: fix comment
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:57 +00:00
Caio Oliveira
5552ffd0f3 intel: Use an intel enum for cmat scope
While convenient, it was not necessary to use the mesa_scope in
intel_device_info.

Having a Intel specific enum here will help later the efforts
of serialization of intel_device_info.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27164>
2024-01-19 22:09:25 +00:00
Georg Lehmann
0a03cf5b3c aco: remove boolean shuffle isel
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann
b4180ebbb9 radeonsi: lower boolean shuffle
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann
2571580b2b radv: lower boolean shuffle
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann
d641750573 nir: add lowering for boolean shuffle
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann
37a15ba53a ac/llvm: implement as_uniform and ballot_relaxed
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann
6b031daf16 aco: implement as_uniform and ballot_relaxed
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann
1cb5bf7009 nir: add ballot_relaxed and as_uniform intrinsics
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:33 +00:00
Eric Engestrom
fc9ffb90fd r300/ci: add flakes
See https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53884563
and https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53941840

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27152>
2024-01-19 19:00:01 +00:00
Georg Lehmann
74fc2e287f aco: stop scheduling at p_logical_end
No Foz-DB changes, but this fixes some issues when the spiller inserts
scratch loads after p_logical_end for p_return.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27119>
2024-01-19 17:04:28 +00:00
Daniel Almeida
d1519e6ab7 nak/sm50: add support for suatom
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26957>
2024-01-19 16:45:59 +00:00
Daniel Almeida
9f54d269c2 nak/sm50 add support for suld
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26957>
2024-01-19 16:45:59 +00:00
Faith Ekstrand
458d4150df nak: Legalize OpBMsk
Fixes: bb10f7f5da ("nak: Implement nir_op_bfm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27177>
2024-01-19 16:27:52 +00:00
Daniel Schürmann
e3098bb232 aco: give spiller more room to assign spilled SGPRs to VGPRs
On chordal graphs, a greedy coloring can be done in a way that never uses
more colors than are required for the largest clique. However, since we
have vector values and force phi resources into the same spill slots, the
interference graphs are not chordal, and thus, this assumption doesn't hold.

Use twice as many spill slots as upper bound.

Totals from 10 (0.01% of 79242) affected shaders: (GFX11)
MaxWaves: 52 -> 54 (+3.85%)
Instrs: 271386 -> 271779 (+0.14%)
CodeSize: 1362544 -> 1365432 (+0.21%)
VGPRs: 2536 -> 2532 (-0.16%)
SpillVGPRs: 778 -> 818 (+5.14%)
Scratch: 73472 -> 76800 (+4.53%)
Latency: 3331718 -> 3328798 (-0.09%); split: -0.14%, +0.05%
InvThroughput: 1665860 -> 1643350 (-1.35%); split: -1.40%, +0.05%
VClause: 3292 -> 3329 (+1.12%); split: -0.06%, +1.18%
Copies: 46082 -> 46257 (+0.38%)

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27011>
2024-01-19 14:15:27 +00:00
Erik Faye-Lund
47d7d73eb3 panfrost: implement line-smoothing
We can combine the previously introduced mechanisms to implement
line-smoothing, combined with some bespoke late RSD-patching to force
the correct multisampling and rasterization states.

The reason we need to do this patching late, is that we need to know the
primitive-type before we can determine this state, and we don't know
this until draw-time. Luckily, we have a convenient spot to do this.

This bespoke patching only happens for gen7 and earlier. Luckily, the
bits here remain the same for all of these gens. On later gens, we can
just emit this normally, without any bespoke patching.

We also need to use a fresh batch when changing the effective smoothing
state, because that's framebuffer-state. This applies to all gens.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10281
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26904>
2024-01-19 13:55:06 +00:00
Erik Faye-Lund
a3cbfb5bd9 panfrost: clean up active_prim update
How we're updating active_prim is currently a bit convoluted, because we
update it from two different places: First, we update it right before
updating the shader-variant in the case of point-sprite changes, and
then later on we update it unconditionally.

But we're about to need to change this logic, because we also need to
deal with line-smooth lowering. So let's clean this up a tad first, by
moving both updates to the same function, and renaming it a bit. This
let's us cleanly update it in one place, and then react to the change.

While we're at it, let's replace the bitwise xor with a logical
not-equals, which makes this all logical operations.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26904>
2024-01-19 13:55:06 +00:00
Erik Faye-Lund
6343e0bbd0 panfrost: add line_smooth shader-key and lowering
Unfortunately, the lowering-pass has gotten a condition added that we
don't really want. So we need to lower away the
load_poly_line_smooth_enabled-intrinsic to always return true to get rid
of it again.

It's not great, but line-smoothing isn't the most important feature to
have max performance on, so... meh?

An alternative here could be to make the condition in
nir_lower_poly_line_smooth optional, but that seems kinda hairy
code-wise. Dunno.

We also need to run nir_lower_alu in order to lower away bit_count on
midgard.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26904>
2024-01-19 13:55:06 +00:00
Erik Faye-Lund
4b6972366a panfrost: pass reduced primitive type instead of points
We're soon going to have to check for other primitive-types, like lines.
So let's pass the reduced primitive type here instead.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26904>
2024-01-19 13:55:06 +00:00
Erik Faye-Lund
e9ada4c0a2 panfrost: add support for forcing sample-counts
This implements a D3D11-style forcing of the sample-counts, which will
be used by the line-smoothing code we're about to add.

Even though we don't actually use the single-sample mode, I left it in
for completeness, as it's documented in the TRM.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26904>
2024-01-19 13:55:06 +00:00
Dave Airlie
550cc685a7 gallivm: fix coroutines with llvm 18
llvm 18 added an extra parameters to coro end which should just
take a null token always for us.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27133>
2024-01-19 13:18:58 +00:00
Martell Malone
3b62b0d096 nine: update verbiage for enduser device messages
Sometimes the gpu might not be a card, implying pci card.
It might be a soc or we might cpu emulate a device.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25901>
2024-01-19 13:00:29 +00:00
Martell Malone
41107e4e64 nine: detect emulation fallback of d3d coordinates
When PIPE_CAP_CLIP_HALFZ is not available nine uses emulation.
This requires PIPE_CAP_NIR_COMPACT_ARRAYS or it fails like before

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25901>
2024-01-19 13:00:29 +00:00
Martell Malone
60e3a43bfc nine: r500 under 20 fragments cap is a warning
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25901>
2024-01-19 13:00:29 +00:00
Frank Binns
500ca5ce7e pvr: split out device info into per GPU headers
There are quite a lot of PowerVR GPUs out there and maintaining the device info
for all of them in the same file will become unwieldy.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27144>
2024-01-19 12:20:18 +00:00
Frank Binns
09ab2ff925 pvr: fix up some includes
Fix up some system includes to use angle brackets.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27144>
2024-01-19 12:20:18 +00:00
Eric Engestrom
7a7aa01a49 amd/ci: consider much more of dEQP-VK.query_pool.statistics_query.host_query_reset.* to be flaky
Instead of continuously adding more and more lines to this list.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27170>
2024-01-19 11:12:46 +00:00
Frank Binns
7d67debc2e CODEOWNERS: update Imagination maintainers
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27145>
2024-01-19 10:26:15 +00:00
Eric Engestrom
7c4a797bc9 amd/ci: add flakes seen today
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27149>
2024-01-19 10:08:27 +00:00
Eric Engestrom
dcc8c8aa4a radv/ci: sort navi21 flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27149>
2024-01-19 10:08:27 +00:00
antonino
14345c4dd6 zink: plug leak in zink_create_quads_emulation_gs
When the shader is freed xfb info should be freed as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27093>
2024-01-19 09:10:29 +00:00
Alyssa Rosenzweig
3a72fc1cb7 nir/passthrough_gs: plug leak
freeing the nir shader should free the xfb info too. found with valgrind
leakcheck.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27093>
2024-01-19 09:10:29 +00:00
Pavel Ondračka
15e7c63272 r300: remove R3xx/R4xx backend absulute modifier lowering
This is done in NIR already.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26848>
2024-01-19 08:35:48 +00:00
Pavel Ondračka
78404cc57d r300: skip backend DCE for vertex shaders
Only mark the unused channels according to the writemask for now, but
this can go as well when we translate directly form NIR. Right now we
still need to do this separatelly as TGSI has no concept of unused
swizzle.

The old DCE pass was known to be buggy, so this also fixes at least
piglit glsl-vs-copy-propagation-1.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9279
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26848>
2024-01-19 08:35:48 +00:00
Pavel Ondračka
0e2e4688af r300: fix writemask for nir_intrinsic_load_ubo_vec4
load_ubo_vec4 has always 4 components, however when translating to TGSI
just set the writemask according to the channels that are actually used
later. This is now done by deadcode analysis, but that one is going away
soon.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26848>
2024-01-19 08:35:48 +00:00
Friedrich Vock
43bdfebbff radv: Fix shader replay allocation condition
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26891>
2024-01-19 08:15:12 +00:00
Joshua Ashton
86954c766f radv: Ensure vkGetQueryPoolResults returns in finite-time
When a device lost occured, we were not ensuring that
vkGetQueryPoolResults with VK_QUERY_RESULT_WAIT_BIT was returning.

We could have the caller stuck in our while(...) loop polling the query
atomics forever which violates the finite-time guarantees of this function.

This solves that by adding a timeout to this call to be double the
default TDR timeout for the potential queues relating to this query.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton
907fe6ea62 radv: Add radv_get_tdr_timeout_for_ip helper
Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton
ed4ef4dc65 radv/amdgpu: Remove ctx_query_reset_status
We don't use this anymore, it is all dead code.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton
f62bdde703 radv: Remove check_status
Following discussion on kernel mailing list[1], we are not gaining
anything from this right now, and it does not handle soft recovery.

We will hear about the context loss and rationale when we vkQueueSubmit
next.

We can come back to this if there is ever a Vulkan extension for
figuring out innocent vs guilty like GL_EXT_robustness.

This does mean however that we return VK_SUCCESS for cancelled semaphore
and fence waits, but this is legal per the Vulkan spec:

"Commands that wait indefinitely for device execution (namely
vkDeviceWaitIdle, vkQueueWaitIdle, vkWaitForFences with a maximum
timeout, and vkGetQueryPoolResults with the VK_QUERY_RESULT_WAIT_BIT
bit set in flags) must return in finite time even in the case of a lost
device, and return either VK_SUCCESS or VK_ERROR_DEVICE_LOST."

"If device loss occurs (see Lost Device) before the timeout has expired,
vkWaitSemaphores must return in finite time with either VK_SUCCESS or
VK_ERROR_DEVICE_LOST."

[1]: https://lists.freedesktop.org/archives/amd-gfx/2024-January/103337.html

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton
b24a4b8949 radv: Mark device loss if QueueSubmit failed immediately
Otherwise we rely on check_status alone, and that's going away.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton
c58cff3ce4 radv/amdgpu: Handle -ENODATA and -ETIME from cs_submit
This can be sent in the event of a soft/hard recovery.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Samuel Pitoiset
7a0b343495 aco: silent checking if clrxdisasm is available
Otherwise, this is reported a ton of times and the CI output is
unusable.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27136>
2024-01-19 07:33:56 +00:00
Jesse Natalie
34a27ac3a7 d3d12: Set up spirv-as and fix expectations
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27127>
2024-01-19 05:16:23 +00:00
Jesse Natalie
13cc5afb35 ci/windows: Rev Vulkan SDK and piglit
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27127>
2024-01-19 05:16:23 +00:00
José Roberto de Souza
b571ae6e7a intel: Make memory heaps consistent between KMDs
Xe KMD reports SMEM size as half of RAM while i915 returns the whole
RAM size, so to keep it consistent here adjusting the values
returned by i915 KMD.

The free i915 SMEM also needs to be ajusted but as this is needed by
both KMDs because KMD uAPIs only reports free memory for applications
running elevated privileges, so this was moved to
intel_device_info_ajust_memory() to be shared by both KMD backends.

sram.mappable.size asserts had to be removed from i915 code paths
because of this adjustment.

anv_compute_sys_heap_size() was dropped in ANV and reduce in HASVK
because adjustments are now done in intel/dev level.

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/26567>
2024-01-19 03:36:07 +00:00
José Roberto de Souza
ca94420d6d intel/dev: Reduce usage of intel_device_info_compute_system_memory()
This function should only be used when i915 versions that don't have
DRM_I915_QUERY_MEMORY_REGIONS.

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/26567>
2024-01-19 03:36:07 +00:00
Benjamin Lee
f05350899a nak: fix iabs on SM50 with an explicit i2i op
Fixes bug where we were not setting the src iabs modifier when lowering
an iabs op to i2i in the encoder.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27105>
2024-01-19 02:48:04 +00:00
Faith Ekstrand
7f332f4087 nak: Enable NIR fuse_ffmaN
This improves vkpeak perf by 40-50% on the Ada GPU in my laptop.  There
are probably more optimal things we can be doing (Intel's pass is pretty
clever) but this is already an improvement.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27157>
2024-01-19 02:34:41 +00:00
Caio Oliveira
4dbf9181cd intel/compiler: Fix rebuilding the CFG in fs_combine_constants
When building the CFG the instructions are taken of the list in
fs_visitor and added to the lists inside each block.  The single
"exec_node" in the instruction is used for those memberships.

In the case the pass rebuilt the CFG, it had no instructions, so
calculate_cfg() had nothing to work with.  For now fix the bug by
pulling all the instructions back to the original list.

We can do better here, but punting until upcoming work on
CFG itself.

Issue found in an unpublished CTS test.  Small reproduction in our
unit tests now enabled.

Fixes: 65237f8bbc ("intel/fs: Don't add MOV instructions to DO blocks in combine constants")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27131>
2024-01-19 01:59:36 +00:00
Caio Oliveira
e9bfdcf576 intel/compiler: Add couple of tests for fs_combine_constants
Add a simple test to kick off the infrastructure.   And also a test
(for now disabled) that fails because the code is returning an
empty shader.  Next patch will fix and enable it.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27131>
2024-01-19 01:59:36 +00:00
Faith Ekstrand
280fe3f592 nvk: Wire up nir_opt_large_constants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27156>
2024-01-19 01:07:30 +00:00
Faith Ekstrand
0bc02eee4b nak: Refactor shader upload math
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27156>
2024-01-19 01:07:30 +00:00
Faith Ekstrand
148971f232 nvk/draw: Map cbuf slots to shaders, not cbuf_maps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27156>
2024-01-19 01:07:30 +00:00
Joshua Ashton
2b47e93c8a winsys/amdgpu: Limit usage of query_reset_state2
Following discussion on kernel mailing list[1], we are not gaining
anything from using this to figure out if we reset, and it does not
handle soft recovery.

We will hear about the context loss and rationale when we submit.

Instead, only use this for figuring out if the reset we already knew
about was completed.

[1]: https://lists.freedesktop.org/archives/amd-gfx/2024-January/103337.html

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27097>
2024-01-18 23:21:48 +00:00
Joshua Ashton
cf24d15503 winsys/amdgpu: Hook up guilt to amdgpu_ctx_set_sw_reset_status
Certain return values have certain meanings indicating context loss and
guilt. Hook those up here.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27097>
2024-01-18 23:21:48 +00:00
Konstantin Seurer
024f144165 lavapipe: Report the correct preprocess buffer size
There can be multiple sequences.

Fixes: 976dd26 ("lavapipe: NV_device_generated_commands")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
cc94ff081c lavapipe: Mark vertex elements dirty if the stride changed
Fixes: 7672545 ("gallium: move vertex stride to CSO")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
6d98142eda gallivm: Use saturating fpto*i conversions
Matches what vkd3d-proton expects and how other hardware (AMD) behaves.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
6d88c1bb6c lavapipe: Fix DGC vertex buffer handling
Fixes: 976dd26 ("lavapipe: NV_device_generated_commands")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
e83ef27ba6 radv: Vectorize load_global_constant
Totals from 325 (0.38% of 84845) affected shaders:
Instrs: 2883767 -> 2880939 (-0.10%); split: -0.10%, +0.00%
CodeSize: 15388396 -> 15364976 (-0.15%); split: -0.16%, +0.00%
Latency: 20212583 -> 20197719 (-0.07%); split: -0.20%, +0.13%
InvThroughput: 5489738 -> 5489551 (-0.00%); split: -0.14%, +0.14%
VClause: 104225 -> 103944 (-0.27%); split: -0.30%, +0.03%
SClause: 71616 -> 71612 (-0.01%); split: -0.01%, +0.01%
Copies: 252143 -> 252284 (+0.06%); split: -0.10%, +0.15%
Branches: 117826 -> 117821 (-0.00%); split: -0.01%, +0.00%
PreVGPRs: 23502 -> 23506 (+0.02%)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27084>
2024-01-18 21:30:39 +00:00
Konstantin Seurer
220c912080 ac/llvm: Enable helper invocations for quad OPs
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9239
cc: mesa-stable

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27110>
2024-01-18 21:00:06 +00:00
Faith Ekstrand
5b1afb0482 nvk: Advertise VK_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Faith Ekstrand
a55b2996ab nak: Add support for SPV_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Faith Ekstrand
82fe981e35 nir,spirv: Add support for SPV_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Tapani Pälli
02d7f5e4ff anv: expand pre-hiz data cache flush to gfx >= 125
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-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/27132>
2024-01-18 19:45:04 +00:00
Tapani Pälli
93706d5c2f iris: expand pre-hiz data cache flush to gfx >= 125
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-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/27132>
2024-01-18 19:45:04 +00:00
Ian Romanick
7481d61a5d intel/compiler: Track mue_compaction and mue_header_packing flags in brw_get_compiler_config_value
v2: Use u_foreach_bit64. Suggested by Lionel.

Fixes: 48885c7fe3 ("intel/compiler: load debug mesh compaction options once")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Ian Romanick
6f237a23c7 intel/compiler: Track lower_dpas flag in brw_get_compiler_config_value
This user-settable flag affects compiler output, so it should be tracked
in the cache hash.

Fixes: 3756f60558 ("intel/fs: DPAS lowering")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel Landwerlin
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Ian Romanick
2741c6464c intel/compiler: Use u_foreach_bit64 in brw_get_compiler_config_value
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel Landwerlin
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Ian Romanick
951e08fc18 intel/compiler: Disable DPAS instructions on MTL
Reviewed-by: Mark Janes <markjanes@swizzler.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3756f60558 ("intel/fs: DPAS lowering")
Closes: #10376
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Gurchetan Singh
a1e67b3933 mesa/vulkan: use DETECT_OS_ANDROID
This uses DETECT_OS_ANDROID instead of defined(ANDROID).
This better supports glibc based host builds in the Soong
build system.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
c27cd96f31 mesa/vulkan: use a simpler path for header in trampoline gen
This works better if vk_dispatch_table.h is inside some "genDir",
and not generated "src/vulkan/util" directory.  This is the
case for the AOSP Soong build system.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
c860935501 mesa/util: use DETECT_OS_ANDROID in anon_file.c
glibc based Android build define ANDROID, but don't have
memfd headers.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
1b133ad446 mesa/util: add <linux/fcntl.h>
F_ADD_SEALS + F_SEAL_* are defined in <linux/fcntl.h> on Android.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
e08add9164 mesa/util: Check __ANDROID__ when for detecting for Android
"__ANDROID__ is defined by the compiler. It is defined for
all Android targets."

"ANDROID is set by some build systems, and not in any reliable
 manner (in AOSP it actually just means that you're in AOSP; it's
 set even when you're building host code for Windows, so it
 doesn't mean much of anything)."

https://github.com/android/ndk/issues/407
https://github.com/android/ndk/issues/807

Since the toolchain provides __ANDROID__ for actual Android
targets, standalone NDK and Soong builds should work.

The Mesa CI uses a combination of the NDK toolchain, internal
Android stubs and a Debian sysroot when compile testing Android.

Long-term, it should be possible to remove ANDROID and use
DETECT_OS_ANDROID everywhere.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Eric Engestrom
155b2b9555 CODEOWNERS: remove myself as a person of contact for a few things
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27151>
2024-01-18 18:42:23 +00:00
Eric Engestrom
52f24121b6 CODEOWNERS: add myself as as person of contact for CI changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27151>
2024-01-18 18:42:23 +00:00
Hans-Kristian Arntzen
efc0131d5b wsi/x11: Add workaround for Detroit Become Human.
Game needs strict image count to not crash in non-vsync mode.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27038>
2024-01-18 18:02:51 +00:00
Hans-Kristian Arntzen
4ab6d7e753 wsi/x11: Add drirc option to ignore SUBOPTIMAL.
Talos Principle and related games on that engine fail to handle
SUBOPTIMAL properly. Adds an option to ignore SUBOPTIMAL and pretend
it's SUCCESS.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27037>
2024-01-18 17:23:32 +00:00
Hans-Kristian Arntzen
745282736e wsi/x11: Compare modifiers before signalling SUBOPTIMAL.
When receiving SUBOPTIMAL_COPY, we need to consider that it can be a
false positive. Xwayland may send this suboptimal copy if there are
pending DRM modifier feedbacks from compositor, but it's likely the
modifier lists are identical.

Hash the modifier lists and compare them against the newly queried
modifier list when SUBOPTIMAL_COPY is received to work around false
positives.

This fixes crashes in games that cannot handle SUBOPTIMAL correctly,
and avoid needless stutters when entering full-screen modes.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27035>
2024-01-18 16:47:10 +00:00
Hans-Kristian Arntzen
2b9c54d47d wsi/x11: Remove unused vk_alpha in get_dri3_modifiers.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27035>
2024-01-18 16:47:10 +00:00
Eric Engestrom
b25564ba33 zink+radv/ci: drop duplicates flakes lines
These are already sorted, so the duplicate is trivial to see as it's on
the next line every time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27147>
2024-01-18 16:30:04 +00:00
Javier Martinez Canillas
f7e407213b clc: silence a warn_unused_result
Ignoring asprintf() return value leads to the following compiler warning:

src/compiler/clc/liblibmesaclc.a.p/clc.c.o -MF src/compiler/clc/liblibmesaclc.a.p/clc.c.o.d -o src/compiler/clc/liblibmesaclc.a.p/clc.c.o -c ../src/compiler/clc/clc.c
In file included from ../src/compiler/clc/clc.c:28:
../src/compiler/clc/clc.c: In function ‘clc_libclc_new’:
../src/compiler/clc/clc_helpers.h:99:7: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   99 |       asprintf(&_msg, fmt, ##__VA_ARGS__);           \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/compiler/clc/clc_helpers.h:105:37: note: in expansion of macro ‘clc_log’
  105 | #define clc_error(logger, fmt, ...) clc_log(logger, error, fmt, ##__VA_ARGS__)

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27140>
2024-01-18 15:20:46 +00:00
Karol Herbst
338636a4ab clc: require LLVM-15
Allows us to drop code dealing with `opencl-c.h`.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27141>
2024-01-18 14:39:03 +00:00
Karol Herbst
bd085c253c clc: merge blocks handling optional features
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27141>
2024-01-18 14:39:03 +00:00
Karol Herbst
faea27e4ac clc: require LLVM-14
This allows some code reorganization :)

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27141>
2024-01-18 14:39:03 +00:00
Jordan Justen
05b628b5af intel/dev/common: Add xe2 support to get_l3_list()
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26742>
2024-01-18 14:16:18 +00:00
José Roberto de Souza
df0fe0dfbd intel/genxml/xe2: Remove L3ALLOC
This register don't exist in Xe2 and there is no Bspec page with
another register to be programmed with L3 allocation layout so
intel_get_l3_config() can also always return NULL for Xe2.

Still allowing intel_get_l3_config() to return non-null because
intel_l3_config is used to calculate TBIMR parameters, see
intel_calculate_tile_dimensions().

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/26742>
2024-01-18 14:16:17 +00:00
Karol Herbst
36012af17f nir/printf: remove treat_doubles_as_floats
It is broken and clang uses fp32 for float constants if the fp64 extension
isn't enabled anyway. SPIRVs can't use fp64 constants with printf unless
they enable the Float64 cap, which also requires cl_khr_fp64 to be
supported.

So just remove it and rely on clang handling -cl-single-precision-constant
correctly, which at the moment doesn't seem to be the case, but we can
think about that once we plan to support cl_khr_fp64.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26541>
2024-01-18 13:16:13 +01:00
Danylo Piliaiev
d2b08f9437 freedreno/replay: Make meta "print" instruction take any number of regs
Useful when it is needed to print several regs together, for them not
to be randomly shuffled.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27121>
2024-01-18 10:24:55 +00:00
Benjamin Lee
30e09d0e98 nak: implement FLO on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27129>
2024-01-18 05:02:27 +00:00
Dave Airlie
f33683e4da radv: don't submit empty command buffers on encoder ring.
the vcn enc/unified rings don't do nop packets, and hang with 0 sized
cmd buffers. This just stops submitting 0 sized cmd buffers to the hw.

Fixes hangs with dEQP-VK.video.decode.h264_i on navi3x

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25932>
2024-01-18 13:33:25 +10:00
Dave Airlie
d32f2ee7b6 radv/video: refactor sq start/end code to avoid decode hangs.
The extra cmd buffer layer was done wrong, need to emit the
sq start and ends around every reset/decode packet.

Fixes dEQP-VK.video.decode.h264_i on navi3x

Fixes: d8f3060bd9 ("radv/video: start adding gfx11 vcn decoder")
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25932>
2024-01-18 13:33:10 +10:00
Dave Airlie
6bd31b60e1 vulkan/video: constify the encoding apis.
There is no need for these to be modified in here.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27082>
2024-01-18 11:32:26 +10:00
Yiwei Zhang
7f9381782f venus: ensure object id is unique
Currently driver side heap alloc obj ptr is used as object id, which is
used on the renderer side for actual vk obj mapping. However, this adds
an implicit dependency between any driver obj destroy/free and new obj
create/allocate because the heap obj freed up can be immediately
reallocated out.

With venus moving to multi-ring, the ordering between asynchronous obj
destroy/free and new obj create/allocate has to be guaranteed via driver
side non-primary ring submission always waiting for primary ring idle.
This can defeat the purpose of multi-ring in certain scenarios. So this
change adds a way to assign unique id to object.

Even before multi-ring, the unique object id can make device and queue
object alloc/free more robust without hidden ordering requirements. This
also fixes some oom cts which can intentionally fail the submission of
an object destroy (renderer side obj is still present) while the driver
side freed object ptr being reused for another object creating, causing
object id reuse at renderer side object table.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27083>
2024-01-18 01:13:59 +00:00
Faith Ekstrand
184bcfdc1c nvk: Implement VK_KHR_zero_initialize_workgroup_memory
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9609
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
6e214f2157 nvk: Properly configure the min/max shared mem size
We don't really understand what these values are supposed to be but this
is a lot closer to what the blob does and lets more compute tests pass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
eaa7980e15 nvk: Add a #define for max shared memory size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
be0f04f5bd nvk: Unref shaders on pipeline free
Fixes: d6a1e29ccd ("nvk: pipeline shader cache")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
4b0448d8f8 nvk: Set framebufferIntegerColorSampleCounts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Eric Engestrom
03f5fc45bb docs: update calendar for 24.0.0-rc2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27128>
2024-01-17 22:29:24 +00:00
Ryan Neph
6e4bb8253e venus: fix shmem leak on vn_ring_destroy
Missed shmem unref when moving ring internals out of vn_instance.c.

Fixes: d1e29b7557 ("venus: move ring shmem into vn_ring")
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27125>
2024-01-17 21:44:15 +00:00
Mary Guillemard
531505f8c5 nouveau: mme: Add a dumper
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
cb6d954c67 nouveau: nvidia-headers: Add nv_push_dump tool
Add "nv_push_dump" allowing to dump a human readable version of a
pushbuf blob.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
d9cd3e4c55 nouveau: nvidia-headers: Add compute array parsing to class_parser.py
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
2cc9ad0e5c nouveau: nvidia_header: Add AMPERE_COMPUTE_B in vk_push_print
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
20b3f9521e nouveau: nvidia_header: Add TURING_COMPUTE_A and AMPERE_COMPUTE_A in vk_push_print
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
2d8b9b9160 nouveau: nvidia_header: Add AMPERE_A in vk_push_print
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Faith Ekstrand
32f2a0f1e1 nouveau/mme: Stop using isaspec
We had hand-written decoders for the simulators anyway so it really
isn't gaining us much.  It does, however, make the whole build more
complicated.  Better to just drop it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Faith Ekstrand
a69b7f1b19 nouveau/mme/fermi: Stop truncating iadd immediates
It's better to leave it in signed form so that we can assert that it's
an int18 later if we want.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Samuel Pitoiset
10e2dbb63b radv: delay emitting streamout enable at draw time
Since Vulkan 1.3.271, the spec allowed vkCmdBeginTransformFeedbackEXT
to be called without an active graphics pipeline bound when using
shader objects.

That means that the last VGT shader would be NULL once VKCTS is
updated accordingly. This change delays emitting streamout enable at
draw time to make sure the last VGT shader is present, regarldess if
ESO is enabled or not.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27075>
2024-01-17 17:33:17 +00:00
Eric Engestrom
bdfce158bd amd/ci: add flakes seen today
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27117>
2024-01-17 17:01:59 +00:00
Vignesh Raman
79422eccd8 ci: Add kmod
modprobe is required in drm-ci for vkms testing.
So add kmod to DEPS.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27088>
2024-01-17 16:17:43 +00:00
Friedrich Vock
a9831caa14 radv/rt: Add workaround to make leaves always active
DOOM Eternal builds acceleration structures with inactive primitives and
tries to make them active in later AS updates. This is disallowed by the
spec and triggers a GPU hang. Fix the hang by working around the bug.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27034>
2024-01-17 15:14:48 +00:00
Lionel Landwerlin
a18ea091af nir/comparison_pre_tests: update expectations
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27087>
2024-01-17 16:01:12 +02:00
Lionel Landwerlin
873fe637e2 nir/alu_srcs_negative_equal: bail earlier if possible
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27087>
2024-01-17 16:00:30 +02:00
Ian Romanick
4740ee8d67 nir: Minor clean up in nir_alu_srcs_negative_equal
Eliminate some cruft left after a8013644a1.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27087>
2024-01-17 16:00:30 +02:00
Helen Koike
b289028d0a ci/ci_gantt_chart: show duration on hover
Show the duration of the given phase on hover.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25793>
2024-01-17 13:10:07 +00:00
Helen Koike
ffaa247b4f ci/ci_gantt_chart: add option to save output to a file
Allow saving in html and in image formats.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25793>
2024-01-17 13:10:07 +00:00
Helen Koike
cf86e97ace ci/ci_gantt_chart: add timeout vertical line
Add pipeline total duration and add a timeout vertical line to indicate
the 1h Timeout mark.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25793>
2024-01-17 13:10:07 +00:00
Helen Koike
61ab9ae2af ci/ci_gantt_chart: add tool to analyse pipeline execution time
ci_gantt_chart.py generates a gantt chart from a given pipeline url

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25793>
2024-01-17 13:10:07 +00:00
Helen Koike
9e8cbc8e91 ci/ci_run_n_monitor: move get_gitlab_pipeline_from_url() to gitlab_common
Move this code to gitlab_common since it can be re-used by other
scripts.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25793>
2024-01-17 13:10:07 +00:00
Samuel Pitoiset
ce200669b1 radv: rename radv_pipeline_key to radv_graphics_pipeline_key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27073>
2024-01-17 12:08:24 +00:00
Samuel Pitoiset
c5a5ab46c9 radv: remove radv_generate_pipeline_key()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27073>
2024-01-17 12:08:24 +00:00
Samuel Pitoiset
72d2eb39fb radv: pass radv_graphics_state_key to radv_hash_shaders()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27073>
2024-01-17 12:08:24 +00:00
Boris Brezillon
b18bfed2c5 panvk: Fix access to unitialized panvk_pipeline_layout::num_sets field
Commit 73eecffabd ("panvk: Use the vk_pipeline_layout base struct")
reworked the panvk logic to use vk_pipeline_layout, which contains the
number of descriptor set layout referenced by a pipeline layout, thus
deprecating panvk_pipeline_layout::num_sets.

Make panvk_fill_non_vs_attribs() use vk_pipeline_layout::set_count
instead of panvk_pipeline_layout::num_sets and kill the latter so we
can't introduce new users.

Fixes: 73eecffabd ("panvk: Use the vk_pipeline_layout base struct")
Cc: mesa-stable
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27107>
2024-01-17 11:42:25 +00:00
Boris Brezillon
35a02560c8 panvk: Fix tracing
pandecode_next_frame() take a decode context. Passing NULL leads to a
NULL deref.

Fixes: 56be9a55be ("pan/decode: handle more than one panfrost_device")
Cc: mesa-stable
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27107>
2024-01-17 11:42:25 +00:00
Ray Smith
c5ba55314c panfrost: Fix format tables for v4 and v5
pan_format.c was only being built with PAN_ARCH in [6, 7, 9], but has
conditional compilation for PAN_ARCH <= 5 which never got compiled.

Signed-off-by: Ray Smith <rsmith@brightsign.biz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26980>
2024-01-17 11:07:48 +00:00
Ray Smith
404da63a0e panfrost: Don't try to set bifrost blendable format on midgard
pan_blendable_format.bifrost is only accessed on bifrost, but we set it
to bogus values on midgard. Set it to 0/invalid instead.

Signed-off-by: Ray Smith <rsmith@brightsign.biz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26980>
2024-01-17 11:07:48 +00:00
Marek Olšák
969ed85110 radeonsi: don't flush CS before and after every blitter invocation
u_blitter always calls set_stream_output_targets before and after clears
and blits, which always flushes here. Strengthen the flushing condition
and add an early exit.

No clue why this fixes the test.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27059>
2024-01-17 05:16:09 -05:00
Marek Olšák
da49e9dcc2 radeonsi/gfx11: flush DB before Z/S clear to work around dEQP failures
u_blitter calls set_stream_output_targets, which flushed the context
for clears. Put the workaround in the right place.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27059>
2024-01-17 05:16:01 -05:00
Marek Olšák
5fd31c1301 radeonsi/ci: update gfx11 flakes
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
3601c1b2cf radeonsi/gfx11: clean up MAX_ALLOWED_TILES_IN_WAVE programming
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
15f88ea46e radeonsi: rename *trivial_vs_prolog -> *trivial_vs_inputs
This is a better name.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
b8c23cd4cd radeonsi: remove unused preloaded instance_divisor_constbuf
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
9dbd3437c6 radeonsi: remove no-op additions for viewport0_y_inverted
adding the same value to both sides of the equation has no effect

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
bad2530a40 radeonsi: pack GS_STATE_ESGS_VERTEX_STRIDE better to save 2 bits
Change it to the number of ES outputs, then compute the stride from that.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
8eed352e05 radeonsi: split si_update_ngg_prim_state_sgpr into 2 functions
GS_STATE_PROVOKING_VTX_FIRST no longer depends on the primitive type,
so we don't have to call it in si_set_rasterized_prim anymore.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
b3326bb947 radeonsi: change GS_STATE_PROVOKING_VTX_INDEX to 1 bit PROVOKING_VTX_FIRST
to save 1 bit for later

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
6c74fc6bfb radeonsi: deduplicate gfx10_ngg_get_vertices_per_prim / get_num_vert_per_prim
it was almost identical

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
da20c6c73f radeonsi: don't use staging uploads for buffers & shaders with all VRAM visible
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
b7af7efee4 radeonsi: expose shader profiles to other .c files
This will be used by NIR options for nir_opt_varyings.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
767048f8b2 radeonsi: report more detailed output stats for shader-db
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
b9b00a0e7a ac,radeonsi: emulate GS primitive pipeline stat on gfx11 because of culling
GS culls too, so the pipeline stat is incorrect. This can be exposed by
forcing monolithic shader use, which makes culling shaders immediately
available for tests to use.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:55 +00:00
Marek Olšák
1d3f937142 ac/nir: simplify code at the beginning of ac_nir_gs_shader_query
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:54 +00:00
Marek Olšák
4747bd6ba8 ac/nir: optimize out multiplications in small line culling
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:54 +00:00
Marek Olšák
0d74123633 ac/nir: rename clipdist_enable_mask -> clip_cull_dist_mask
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:54 +00:00
Marek Olšák
af4e91f6b8 ac/nir: don't write TCS outputs to memory if no_varying is set
nir_opt_varyings() will set this, making it unnecessary to look
at the TES input mask.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:54 +00:00
Marek Olšák
4880c1e12e amd: unify NIR options between RADV and radeonsi
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26917>
2024-01-17 09:05:54 +00:00
Sviatoslav Peleshko
6b0bfdfa9e nir: Use alu source components count in nir_alu_srcs_negative_equal
When we use source from ALU instruction directly, the default swizzle array
should be populated with the same amount of components as the src has.

Otherwise, if we use nir_ssa_alu_instr_src_components, it can return
the destination components count that is lower than component index
actually used in that source. This can lead to false equality
between 0 (uninitialized) and 0 (.x) in swizzle comparison below.

Fixes: c6ee46a7 ("nir: Add nir_alu_srcs_negative_equal")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8704
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22655>
2024-01-17 08:05:30 +00:00
Samuel Pitoiset
e19ecf49ea radv: remove an extra new line in radv_shader.h
To make clang-format CI job happy again.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
ee96de53e4 radv: remove the pipeline key for ray tracing pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
e799907071 radv: remove the pipeline key for compute pipelines
Eveyerthing needed is already in radv_shader_stage_key.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
e017eb3b58 radv: stop hashing radv_pipeline_key for compute/rt pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
739c8eb681 radv: hash radv_shader_stage_key
This will allow us to remove the pipeline key completely for compute/rt
pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
853298edb1 radv/rt: cleanup radv_parse_rt_stage()
To avoid calling radv_pipeline_stage_init() twice.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
ffe997d71d radv: add radv_pipeline_get_shader_key()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
844004c335 radv: cleanup radv_generate_pipeline_key()
Move everything in the same loop to prepare for a new helper.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
3615bcdde3 radv: make sure to retain shaders key for imported shaders with GPL
Now that everything is moved to the per-stage key, this information
needs to be retained/loaded with GPL, otherwise some flags might be
missing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
082c524f86 radv: pass radv_shader_stage_key to radv_pipeline_stage_init()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
08b8356111 radv: add shader_version to radv_shader_stage_key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
Samuel Pitoiset
20fdbc7a44 radv: add keep_statistic_info to radv_shader_stage_key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27036>
2024-01-17 07:25:49 +00:00
David Heidelberg
027363416b ci/lima: update expectations, failing tests are being skipped
Multiple previously failing tests are skipped now.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26905>
2024-01-17 06:21:10 +00:00
Erico Nunes
8bd4cae768 Revert "ci: lima farm is down"
This reverts commit 601b826a5e.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26905>
2024-01-17 06:21:10 +00:00
Yonggang Luo
616c0cd067 compiler/spirv: vtn_add_printf_string support for handling OpBitcast
specifically, it's handling
         %48 = OpBitcast %_ptr_UniformConstant_uchar %_str
         %49 = OpBitcast %_ptr_UniformConstant_uchar %_str_1

; SPIR-V
; Version: 1.4
; Generator: Khronos SPIR-V Tools Linker; 0
; Bound: 53
; Schema: 0
               OpCapability Addresses
               OpCapability Kernel
               OpCapability Int64
               OpCapability Int8
          %1 = OpExtInstImport "OpenCL.std"
               OpMemoryModel Physical64 OpenCL
               OpEntryPoint Kernel %2 "main_test" %_str %_str_1
          %5 = OpString "kernel_arg_type.main_test.float*,uint*,"
          %6 = OpString "kernel_arg_type_qual.main_test.,,"
               OpSource OpenCL_C 102000
               OpName %_str ".str"
               OpName %_str_1 ".str.1"
               OpName %main_test "main_test"
               OpName %src "src"
               OpName %dest "dest"
               OpName %entry "entry"
               OpName %src_addr "src.addr"
               OpName %dest_addr "dest.addr"
               OpName %arrayidx "arrayidx"
               OpName %call "call"
               OpName %src_0 "src"
               OpName %dest_0 "dest"
               OpModuleProcessed "Linked by SPIR-V Tools Linker"
               OpDecorate %_str Constant
               OpDecorate %_str Alignment 1
               OpDecorate %_str_1 Constant
               OpDecorate %_str_1 Alignment 1
               OpDecorate %src Alignment 4
               OpDecorate %dest Alignment 4
               OpDecorate %src_addr Alignment 8
               OpDecorate %dest_addr Alignment 8
               OpDecorate %src_0 Alignment 4
               OpDecorate %dest_0 Alignment 4
      %ulong = OpTypeInt 64 0
      %uchar = OpTypeInt 8 0
       %uint = OpTypeInt 32 0
    %ulong_7 = OpConstant %ulong 7
   %uchar_37 = OpConstant %uchar 37
  %uchar_115 = OpConstant %uchar 115
   %uchar_58 = OpConstant %uchar 58
   %uchar_32 = OpConstant %uchar 32
  %uchar_102 = OpConstant %uchar 102
    %uchar_0 = OpConstant %uchar 0
    %ulong_5 = OpConstant %ulong 5
   %uchar_84 = OpConstant %uchar 84
  %uchar_101 = OpConstant %uchar 101
  %uchar_116 = OpConstant %uchar 116
    %ulong_0 = OpConstant %ulong 0
%_arr_uchar_ulong_7 = OpTypeArray %uchar %ulong_7
%_ptr_UniformConstant__arr_uchar_ulong_7 = OpTypePointer UniformConstant %_arr_uchar_ulong_7
%_arr_uchar_ulong_5 = OpTypeArray %uchar %ulong_5
%_ptr_UniformConstant__arr_uchar_ulong_5 = OpTypePointer UniformConstant %_arr_uchar_ulong_5
       %void = OpTypeVoid
      %float = OpTypeFloat 32
%_ptr_CrossWorkgroup_float = OpTypePointer CrossWorkgroup %float
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
         %40 = OpTypeFunction %void %_ptr_CrossWorkgroup_float %_ptr_CrossWorkgroup_uint
%_ptr_Function__ptr_CrossWorkgroup_float = OpTypePointer Function %_ptr_CrossWorkgroup_float
%_ptr_Function__ptr_CrossWorkgroup_uint = OpTypePointer Function %_ptr_CrossWorkgroup_uint
%_ptr_UniformConstant_uchar = OpTypePointer UniformConstant %uchar
         %44 = OpConstantComposite %_arr_uchar_ulong_7 %uchar_37 %uchar_115 %uchar_58 %uchar_32 %uchar_37 %uchar_102 %uchar_0
       %_str = OpVariable %_ptr_UniformConstant__arr_uchar_ulong_7 UniformConstant %44
         %45 = OpConstantComposite %_arr_uchar_ulong_5 %uchar_84 %uchar_101 %uchar_115 %uchar_116 %uchar_0
     %_str_1 = OpVariable %_ptr_UniformConstant__arr_uchar_ulong_5 UniformConstant %45
  %main_test = OpFunction %void DontInline %40
        %src = OpFunctionParameter %_ptr_CrossWorkgroup_float
       %dest = OpFunctionParameter %_ptr_CrossWorkgroup_uint
      %entry = OpLabel
   %src_addr = OpVariable %_ptr_Function__ptr_CrossWorkgroup_float Function
  %dest_addr = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uint Function
               OpStore %src_addr %src Aligned 8
               OpStore %dest_addr %dest Aligned 8
         %46 = OpLoad %_ptr_CrossWorkgroup_float %src_addr Aligned 8
   %arrayidx = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_float %46 %ulong_0
         %47 = OpLoad %float %arrayidx Aligned 4
         %48 = OpBitcast %_ptr_UniformConstant_uchar %_str
         %49 = OpBitcast %_ptr_UniformConstant_uchar %_str_1
       %call = OpExtInst %uint %1 printf %48 %49 %47
         %50 = OpLoad %_ptr_CrossWorkgroup_uint %dest_addr Aligned 8
               OpStore %50 %call Aligned 4
               OpReturn
               OpFunctionEnd
          %2 = OpFunction %void DontInline %40
      %src_0 = OpFunctionParameter %_ptr_CrossWorkgroup_float
     %dest_0 = OpFunctionParameter %_ptr_CrossWorkgroup_uint
         %51 = OpLabel
         %52 = OpFunctionCall %void %main_test %src_0 %dest_0
               OpReturn
               OpFunctionEnd

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26775>
2024-01-17 02:59:57 +00:00
Yonggang Luo
88c4de7e7b compiler/spirv: There is not need unqualify const in function vtn_string_literal
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26775>
2024-01-17 02:59:57 +00:00
Yonggang Luo
fd11818828 compiler/spirv: The spirv shader is binary, should write in binary mode
Fixes: 53265c8798 ("spirv: Add a mechanism for dumping failing shaders")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26775>
2024-01-17 02:59:57 +00:00
Benjamin Lee
1593caf610 nak: implement FSWZADD on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27063>
2024-01-16 23:46:19 +00:00
Faith Ekstrand
bb10f7f5da nak: Implement nir_op_bfm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26550>
2024-01-16 23:32:13 +00:00
Faith Ekstrand
c14f4cc052 nak: Rename OpBrev to OpBRev
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26550>
2024-01-16 23:32:13 +00:00
Faith Ekstrand
9b68c77abb nak: Implement nir_op_ufind_msb_rev
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26550>
2024-01-16 23:32:13 +00:00
Faith Ekstrand
a3bceafed5 nak: Implement nir_op_pack_half_2x16_rtz_split
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26550>
2024-01-16 23:32:13 +00:00
Sil Vilerino
95a6165fac d3d12: Do not assume multi-subregion support when querying for driver encode support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27099>
2024-01-16 21:41:48 +00:00
Eric Engestrom
e8c5a0485e amd/ci: simplify deqp config
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27098>
2024-01-16 21:21:26 +00:00
Eric Engestrom
6de31ef8a6 nouveau/ci: don't run nouveau (gl) tests on nvk changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27096>
2024-01-16 21:04:18 +00:00
Yiwei Zhang
dc5725ee29 vulkan/wsi/wayland: fix returns and avoid leaks for failed swapchain
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27080>
2024-01-16 20:38:56 +00:00
Konstantin Seurer
9eb48e8040 nak/repair_ssa: Remap PHI sources as well
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26371>
2024-01-16 20:24:15 +00:00
Eric Engestrom
2ce0b5ab0a ci: fix job dependency error in MRs for bin/ci/* scripts
'debian/x86_64_build' job needs 'debian/x86_64_build-base' job, but 'debian/x86_64_build-base' is not in any previous stage

Fixes: f298a0e709 ("ci: make sure we evaluate the python-test rules first")
Fixes: 2c9fdaa830 ("ci: fix python-test dependency error on merge requests")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27042>
2024-01-16 19:51:46 +00:00
Benjamin Lee
99720f0564 nak: fix frnd on SM50
Previously we weren't setting bit 42 when encoding frnd as f2f. This
causes it to ignore the rounding mode when src_type == dst_type.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27065>
2024-01-16 19:05:40 +00:00
Thong Thai
df5203d631 radeonsi/vcn: remove EFC support for renoir
Renoir hardware has limited EFC support, so remove support for it from Mesa.
Thanks to @nyanmisaka for raising the issue.

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

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27076>
2024-01-16 18:42:42 +00:00
Benjamin Lee
ff84aef116 nak: support predicate sel on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27064>
2024-01-16 18:28:22 +00:00
Benjamin Lee
9b6a39cfd4 nak: support predicate swaps on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27064>
2024-01-16 18:28:22 +00:00
Guilherme Gallo
de2c847c24 ci/lava: Detect r8152 issue during boot phase
This week we found that the r8152 issue can happen during the boot
phase, make the necessary adjustments to detect it.

https://gitlab.freedesktop.org/vigneshraman/linux/-/jobs/53651940

Notes:
- The kernel messages during the boot phase is being redirected to the
feedback messages due to the namespaces from the SSH job.
- Update the unit tests:
  - Add boot phase detection
  - Correctly set the boot phase when mocking LogFollower

Reported-by: Vignesh Raman <vignesh.raman@collabora.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27081>
2024-01-16 17:22:04 +00:00
Guilherme Gallo
bfd50f72eb ci/lava: Turn the r8152 issue check into a counter
We were just detecting if a log like
[  143.080663] r8152 2-1.3:1.0 eth0: Tx status -71
happened once before
[  316.389695] nfs: server 192.168.201.1 not responding, still trying

But we can use a counter to be more assured that the device is
struggling to recover and we can add let this detection happen during
the boot phase.

This mimics how other freedreno devices deal with this problem, see
`cros_servo_run.py:64` for example.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27081>
2024-01-16 17:22:04 +00:00
Eric Engestrom
9a6ac1dd2f zink+anv/ci: add known failures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27094>
2024-01-16 15:52:34 +00:00
David Heidelberg
4ff77f08e4 ci/deqp: uprev deqp-runner for Linux too to 0.18.0
Previous commit upreved deqp only for the Android

Fixes: 1ff4687e86 ("ci: uprev deqp-runner from 0.16.1 to 0.18.0")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>

[Eric]
- rename the deqp-runner version to DEQP_RUNNER_VERSION instead of DEQP_VERSION
- update image tags
- fix expectations lists

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27062>
2024-01-16 15:14:20 +00:00
David Rosca
865abfde63 radeonsi/vcn: Fix H264 slice header when encoding I frames
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27029>
2024-01-16 14:49:48 +00:00
Samuel Pitoiset
a5b21f7cf4 zink/ci: skip more arb_shader_image_load_store.* on Polaris10/Navi10
This subset seems to be the root cause of the recent GPU hangs that have
been uncovered since a077c14f15 ("zink: Fix resizable BAR detection
logic"). Skip it completely until the issue is correctly fixed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27077>
2024-01-16 11:25:38 +00:00
Patrick Lerda
bacace8634 glsl/nir: fix gl_nir_cross_validate_outputs_to_inputs() memory leak
For instance, this issue is triggered with
vs-to-fs-overlap.shader_test -auto -fbo:
Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x7fe64f58e9a7 in calloc (/usr/lib64/libasan.so.6+0xb19a7)
    #1 0x7fe642ca2839 in _mesa_symbol_table_ctor ../src/mesa/program/symbol_table.c:286
    #2 0x7fe642ff003d in gl_nir_cross_validate_outputs_to_inputs ../src/compiler/glsl/gl_nir_link_varyings.c:728
    #3 0x7fe642d7c7d8 in gl_nir_link_glsl ../src/compiler/glsl/gl_nir_linker.c:1357
    #4 0x7fe642be6931 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:562
    #5 0x7fe642be6931 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:944
    #6 0x7fe642acab55 in link_program ../src/mesa/main/shaderapi.c:1336
    #7 0x7fe642acab55 in link_program_error ../src/mesa/main/shaderapi.c:1447
    #8 0x7fe6424aa389 in _mesa_unmarshal_LinkProgram src/mapi/glapi/gen/marshal_generated2.c:1911
    #9 0x7fe641fd912b in glthread_unmarshal_batch ../src/mesa/main/glthread.c:139
    #10 0x7fe641f48d48 in util_queue_thread_func ../src/util/u_queue.c:309
    #11 0x7fe641fa442a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67

Fixes: 7d1948e9b5 ("glsl: implement cross_validate_outputs_to_inputs() in nir linker")
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/27071>
2024-01-16 10:47:09 +00:00
Tatsuyuki Ishi
0a68a94a51 util: Optimize mesa_hex_to_bytes
This function ends up getting called an awful lot when loading a large
Fossilize cache db, so let's replace strtol with something more
reasonable.

For a game with 97k shaders, this reduces instance creation time from
203ms to 52ms.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27052>
2024-01-16 02:15:22 +00:00
Dave Airlie
34e72579cd vulkan/video: start deep copying the parameters structures
Joshua Ashton pointed out we aren't copying these deeply,
and we really should be.

This introduces deep copies of all the h264/h265 parameter sets.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27066>
2024-01-16 00:54:35 +00:00
Dave Airlie
b4a6a876be vulkan/video: start to wrap the video structs for deep copies.
This doesn't do any of the deep copies, it's just more non-functional changes
in preparation.

v2: fix alloc sizes

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27066>
2024-01-16 00:54:35 +00:00
Dave Airlie
b72b4d8a0e vulkan/video: rename some of the parameter tracking structs.
This will make it easier to add deep copy support.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27066>
2024-01-16 00:54:35 +00:00
Dave Airlie
57d83cb99c vulkan/video: drop unused function.
This looks to have been left over.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27066>
2024-01-16 00:54:35 +00:00
Marek Olšák
7ed27bff0b winsys/amdgpu: cosmetic touchups around IB sizes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
6e1dae77a9 winsys/amdgpu: represent max_ib_size_dw in bytes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
fd1e36a044 winsys/amdgpu: represent IB_MAX_SUBMIT_DWORDS in bytes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
a008a7dcdf winsys/amdgpu: remove misplaced duplicated comment
The same comment is in the header file where it should be.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
b2b7603ecb winsys/amdgpu: don't clear fence list elements after IB submission
Same idea as with the buffer lists.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
fb3171b653 winsys/amdgpu: add more fence_reference helpers
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
a94319d29b winsys/amdgpu: don't clear buffer list elements after IB submission
amdgpu_winsys_bo_reference(dst, NULL) sets *dst to NULL, but we never read
*dst again because we set num_buffers to 0. So don't touch the buffer list
elements and only decrement the BO refcount. It makes a difference when you
have 10k BOs.

The CS thread overhead in VP2020/Catia1: 9.23% -> 8.74%

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
2da16e9635 winsys/amdgpu: cosmetic touchups
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
1e06cdad0d winsys/amdgpu: merge loops decrementing num_active_ioctls & unreferencing bufs
We have 2 separate loops doing that. num_active_ioctls was decremented
in amdgpu_cs_submit_ib, while buffers were unreferenced
in amdgpu_cs_context_cleanup immediately after it.

Split unreferencing buffers from amdgpu_cs_context_cleanup, so that it's
not done in amdgpu_cs_submit_ib, which will do it in the same loop where
num_active_ioctls is unreferenced.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Faith Ekstrand
f1cf7f0d86 nak: Stop passing --explicit-padding to bindgen
It's apparently broken on 32-bit builds and screws up our NIR bindings.
Instead, using -Wpadded with a pragma to ensure we don't add padding to
the struct.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27078>
2024-01-15 20:45:14 +00:00
chyyran
f079b6a18d util/format/fxt1: include "u_format_pack.h" instead of "util/format/u_format_pack.h"
Signed-off-by: Ronny Chan <ronny@ronnychan.ca>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26608>
2024-01-15 20:13:07 +00:00
Danylo Piliaiev
43bc212aeb ir3: Add fullsync and fullnop ir3 dbg options for over-syncing
- fullsync - adds (ss)(sy) after each cat4/cat5/cat6
- fullnop - adds (rpt4) nop before every instruction

Useful to debug errors in inter-instruction synchronization.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27012>
2024-01-15 19:15:26 +00:00
Danylo Piliaiev
123c5e7c3a ir3: Fix "print" meta instruction synchronization
There was a WAR hazard if something writes to sources last STG is
using. (sy)nop did not wait for sources to become "free", we
need to use (ss).

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27013>
2024-01-15 18:48:49 +00:00
Karol Herbst
ea023ff5cd rusticl/kernel: no need to reset the scratch size anymore
The scratch size gets assigned by nir_lower_vars_to_explicit_types. Now
that we only run it once on temp memory, there is no need to reset the
value.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27068>
2024-01-15 16:41:12 +00:00
Karol Herbst
835c208578 rusticl/kernel: add a few comments in regards to pass ordering
This is helpful as otherwise I'll keep doing the same mistakes trying to
fix anything in here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27068>
2024-01-15 16:41:12 +00:00
Karol Herbst
f896659894 rusticl/kernel: run opt/lower_memcpy later to fix a crash
nir_opt_memcpy requires explicit types to function properly. So run them
after lowering vars to explicit types.

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27068>
2024-01-15 16:41:12 +00:00
Lucas Stach
2f229a8ba6 etnaviv: implicitly update shared texture resources
Implicitly update shared texture resources whenever they are first
used after the context has been flushed. This implements the
necessary behavior to get updated content for resources shared
outside of the screen without relying on any other API level
trigger, discussed to be necessary in [1].

[1] https://github.com/KhronosGroup/OpenGL-Registry/issues/566

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6220
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25756>
2024-01-15 14:19:17 +00:00
Lucas Stach
27ac55873a etnaviv: only add shared resources to implicit flush list
The implicit flushing is only required if the resource is shared
and changes to the resource must be visible outside of the screen
after the flush. For non-shared resources we can rely on the
screen internal tracking of data updates.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25756>
2024-01-15 14:19:17 +00:00
Lucas Stach
9ab9df3941 etnaviv: track resource sharing
Track if resources are shared outside of the screen, which means
changes to the resource must be visible to the external observers
after a flush and the resource might be manipulated by other
agents than the contexts from the screen.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25756>
2024-01-15 14:19:17 +00:00
Juan A. Suarez Romero
22c4a5e127 v3d/ci: run OpenGL 3.1 tests
As driver supports OpenGL 3.1, run proper tests, besides the OpenGL ES
tests.

Note that including GL3.1 is not required to include previous versions.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27069>
2024-01-15 13:46:28 +00:00
Danylo Piliaiev
480ec5b1d4 freedreno/replay: Add WSL backend for Windows
d3dkmthk.h contains only non driver specific structs, private
data structs are not defined anywhere public but contain
important information for memory allocation and submissions.
Luckily only small parts of these structs are relevant for what
we want to do and most of them are not changed between calls.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26101>
2024-01-15 13:12:58 +00:00
Danylo Piliaiev
16de8e99cf freedreno/replay: Correctly free iova on msm backend
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26101>
2024-01-15 13:12:58 +00:00
Danylo Piliaiev
56a6bc758d freedreno/replay: Delete all buffers after each submission
We expect all buffers to be dumped before each submission, so tracking
whether buffer is used is wrong.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26101>
2024-01-15 13:12:58 +00:00
Juan A. Suarez Romero
985a5c8f1a broadcom/simulator: protect simulator BO rallocs with mutexes
Move ralloc allocations and frees for BOs into the critical sections
protected with mutexes.

This fixes several double-free and use-after-free crashes that happens
sometimes when using the simulator to run Vulkan CTS tests, specially
when these tests involve multithreading, like
`dEQP-VK.api.object_management.multithreaded_per_thread_resources.device_memory_small`.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27070>
2024-01-15 12:52:34 +00:00
Lionel Landwerlin
56eb09480b anv: rename video command file
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:50 +00:00
Lionel Landwerlin
51d63f2236 anv: move compute/ray-tracing commands to their own file
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:50 +00:00
Lionel Landwerlin
cfe894e1e9 anv: move draw commands to their own file
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:50 +00:00
Lionel Landwerlin
ddc18b4e78 anv: move generated draw flush helper to its own file
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:49 +00:00
Lionel Landwerlin
df1dc882cb anv: fix missing header
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:49 +00:00
Lionel Landwerlin
74c8edd288 anv: fix include guards
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:49 +00:00
Lionel Landwerlin
6bb3ae99c5 anv: export descriptor flushing functions
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:49 +00:00
Tatsuyuki Ishi
43fb43ba2c radv: never set DISABLE_WR_CONFIRM for CP DMA clears and copies
This mirrors the changes in 69ff9c16bb ("radeonsi: never set
DISABLE_WR_CONFIRM for CP DMA clears and copies").

Cc: mesa-stable
Suggested-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27053>
2024-01-15 12:09:01 +00:00
Samuel Pitoiset
b555f9451c radv: introduce radv_graphics_state_key
This struct only contains graphics related state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
b888677dcf radv: add vertex_robustness1 to radv_shader_stage_key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
f2f87d0872 radv: re-organize radv_pipeline_key
Rename and regroup fields per PSO basically.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
fb80421a62 radv: stop passing the pipeline key when compiling compute/rt shaders
The pipeline key now essentially contains graphics state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
6e7018e74d radv: remove unused lower_rt_instruction_monolithic_state::key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
ea89328fb4 radv: remove unecessary radv_nir_compiler_options::key
This is no longer useful.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
6e1a73a53d radv: add optimisations_disabled to radv_shader_stage_key
At some point, we will probably have a VK_SHADER_CREATE_xxx flag
matching the pipeline one. So, I think it's more like a per-shader
field. It can also be useful to disable optimisations per stage when
debugging.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
3a776f036f radv: use radv_shader_stage_key directly with pre-existing fields
More fields will be moved to radv_shader_stage_key but start using it
with pre-existing fields.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
28e330c245 radv: add radv_shader_stage_key to radv_shader_stage
For storing the per-stage key information like robustness etc. This
will fit well with ESO as well.

For pipelines, they are copied from radv_pipeline_key, similarly to
the radv_pipeline_layout/radv_shader_layout pair.

This will also allow us to kill radv_pipeline_key for compute/rt
pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
cff2a3aafc radv: move radv_pipeline_key::mesh_fast_launch_2 to the per-device cache key
This is a global thing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
d74150fc66 radv: remove one unused parameter in radv_fill_shader_info_ngg()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
138ce72860 radv/nir: remove useless struct for nir_shader typedef
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
18349692d0 radv/nir: pass radv_shader_stage to some radv_nir_xxx() functions
Instead of passing separate parameters for args, layout, info etc.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Lionel Landwerlin
7e111268f1 intel/hang_viewer: add aux-tt view
Allows you to visualize the AUX-TT.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27058>
2024-01-15 11:16:40 +00:00
Lionel Landwerlin
78a881af43 intel/genxml: add GAM done register description
Useful if you encounter some kind of pagefault (including with
AUX-TT).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27058>
2024-01-15 11:16:40 +00:00
Lionel Landwerlin
547c2f3d3f intel/genxml: add CCS_INSTDONE register
Gives us the ability to check whether the compute command streamer is
hung.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27058>
2024-01-15 11:16:40 +00:00
Lionel Landwerlin
f78fac623a intel/decoder: don't ignore BT entries at offset 0
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27058>
2024-01-15 11:16:40 +00:00
Lionel Landwerlin
7107ed55c0 intel/decoder: make vertex data decoding optional
When capturing INTEL_DEBUG=capture-all and the application has like
1Gb of vertex data, you might not want to actually decode it when
looking at the error state.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27058>
2024-01-15 11:16:40 +00:00
Lucas Stach
e481c1269c etnaviv: disable 64bpp render/sampler formats
Vivante hardware handles 64bpp render targets and samplers in a odd way
by splitting the buffer and using a pair of texture samplers or a pair
of MRT outputs to access those resources. This isn't implemented in the
driver right now, so we should not advertise support for those formats.

CC: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26982>
2024-01-15 10:01:27 +00:00
Samuel Pitoiset
6febec12e4 radv: correctly return VK_ERROR_OUT_OF_DEVICE_MEMORY when mapping a BO fails
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27039>
2024-01-15 09:41:55 +00:00
Samuel Pitoiset
4fe5f06d40 radv/rt: re-use radv_ray_tracing_stage::sha1 for hashing RT pipelines
radv_ray_tracing_stage::sha1 is radv_pipeline_key+shader_sha1 which
should be similar to what the code was doing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27030>
2024-01-15 08:58:37 +00:00
Samuel Pitoiset
bb86fc0359 radv: constify stages in radv_rt_fill_group_info()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27030>
2024-01-15 08:58:37 +00:00
Tapani Pälli
36f428f1de anv: check for wa 16013994831 in emit_so_memcpy_end
We are toggling preemption on/off during streamout, this is also
happening on gfx12 platforms, not just dg2.

Cc: mesa-stable
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/27002>
2024-01-15 08:36:29 +00:00
Vinson Lee
73835874a8 intel/disasm: Remove duplicate variable reg_file
Fix defects reported by Coverity Scan.

Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In reg_file = reg_file = brw_inst_dpas_3src_dst_reg_file(devinfo, inst),
reg_file is written twice with the same value.

Fixes: 1c92dad5cb ("intel/disasm: Disassembly support for DPAS")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27056>
2024-01-15 07:46:12 +00:00
Dmitry Osipenko
e84aa455e5 iris: Use Mesa internal drm-uapi headers
Iris driver includes system DRM UAPI header before the Mesa's internal
ones, which makes Iris to use the system headers. Correct the included
header for consistency with the rest of the Intel driver code by changing
the inclusion order, like it's done by the rest of the Intel driver code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27043>
2024-01-15 07:06:33 +00:00
Lionel Landwerlin
a34a113059 anv: hide vendor ID for The Finals
XeSS workaround.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10436
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27057>
2024-01-15 08:08:56 +02:00
Lionel Landwerlin
ff6041afdf intel/aux_map: fix fallback unmapping range on failure
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7c6faa1efe ("intel/aux_map: introduce ref count of L1 entries")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27057>
2024-01-15 08:08:21 +02:00
Marek Olšák
33b77ec774 cso: don't unbind vertex buffers when enabling/disabling u_vbuf
The next set_vertex_buffers call always overwrites all slots anyway.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26309>
2024-01-14 21:55:19 +00:00
Marek Olšák
eb20ef9277 gallium: remove unbind_trailing_count from set_vertex_buffers
It should implicitly unbind all bound buffers after "count".
This also slightly simplies u_vbuf.

This is a cleanup suggested by:
    https://gitlab.freedesktop.org/mesa/mesa/-/issues/8142

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> (asahi & panfrost)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26309>
2024-01-14 21:55:19 +00:00
Marek Olšák
2725b095ea gallium/u_vbuf: replace unnecessary dst_index with "i"
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26309>
2024-01-14 21:55:19 +00:00
Faith Ekstrand
cfba24ccb5 nvk: Add a couple more features to features.txt
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10429
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27061>
2024-01-14 18:36:45 +00:00
Eric Engestrom
27a1b4e4f3 ci/deqp: ensure that in default builds, wayland + x11 + xcb are all built
If someone were to remove the libraries that are needed for these,
`default` would simply not enable these tests, and the only thing we
could notice is that test jobs would suddenly take less time to run.

Instead, let's have a check to make sure dEQP's cmake has detected
everything and enabled these platforms.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27041>
2024-01-14 17:10:25 +00:00
Faith Ekstrand
3c7460c023 nvk: Advertise variableMultisampleRate and EDS3RasterizationSamples
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9665
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27025>
2024-01-13 18:25:20 +00:00
Faith Ekstrand
0e33dba625 nvk: Move SET_HYBRID_ANTI_ALIAS_CONTROL to draw time
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27025>
2024-01-13 18:25:20 +00:00
Faith Ekstrand
148ea7792f nvk: Emit SET_ANTI_ALIAS at draw time when no render targets are bound
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27025>
2024-01-13 18:25:20 +00:00
George Ouzounoudis
48d510ac57 vulkan: Fix null pointer dereferencing on sample locations state
In the case both sample locations and rasterization samples is supported by a
driver as dynamic state, there is a case vk_multisample_sample_locations_state_init()
does not fill ms->sample_locations at all. In this case we need to check
this pointer when dereferencing it in vk_dynamic_graphics_state_init_ms().

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27025>
2024-01-13 18:25:20 +00:00
Georg Lehmann
e36235e6d5 aco: reassign split vector to SOPC
Foz-DB Navi21:
Totals from 2669 (3.42% of 78112) affected shaders:
Instrs: 3570360 -> 3562026 (-0.23%)
CodeSize: 19049784 -> 19017092 (-0.17%)
Latency: 25343555 -> 25337767 (-0.02%); split: -0.03%, +0.00%
InvThroughput: 6191344 -> 6191079 (-0.00%); split: -0.01%, +0.00%
VClause: 90803 -> 90802 (-0.00%)
SClause: 114858 -> 114842 (-0.01%); split: -0.03%, +0.01%
Copies: 269287 -> 260999 (-3.08%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27046>
2024-01-13 11:03:09 +00:00
Faith Ekstrand
94d96dac60 nak: Add explicit padding to nak_shader_info
This ensures that the padding bits stay zero, even as we copy the
structure around through multiple languages.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27049>
2024-01-12 23:58:11 +00:00
Faith Ekstrand
d280160a13 nak: Disallow gl_FragData and set MRT correctly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27049>
2024-01-12 23:58:11 +00:00
Faith Ekstrand
005b5b1464 nvk: Set a minimum of one patch control point
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27049>
2024-01-12 23:58:11 +00:00
Faith Ekstrand
2cab67a9f1 nvk: Invalidate state after secondary command buffers
Today, the only thing that this really affects is descriptor sets and
dynamic state as everything else is re-emitted almost every time.
However, as we add more dirtying, we'll need to be more and more careful
about stale state leaking across secondary command buffer executions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27049>
2024-01-12 23:58:11 +00:00
Faith Ekstrand
bc36dfdb5d nvk: Handle missing descriptor sets in nvk_nir_lower_descriptors
For VK_EXT_graphics_pipeline_library, we need to be able to handle
missing descriptor sets.  THis screws up dynamic buffers because we're
no longer guaranteed to be able to statically compute the index into
nvk_root_descriptor_table::dynamic_buffers while lowering descriptors.
Instead, we may need to look up the start index for the set in
nvk_root_descriptor_table::set_dynamic_buffer_start and compute from
there.

We also rework nvk_nir_lower_descriptors to take an array of (possibly
NULL) descriptor sets.  This ensures that we don't make any assumptions
about the pipeline layout.  It's also the interface we'll want for
implementing VK_EXT_shader_object.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:39 +00:00
Faith Ekstrand
3197aff4e8 nvk: Make dynamic cbuf indices relative to the descriptor set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:38 +00:00
Faith Ekstrand
e0d907f56f nvk: Rework descriptor set binding
This prepares us for VK_EXT_graphics_pipeline_library by allowing null
descriptor sets to be bound and handling holes in pipeline layouts.  We
also add a set_dynamic_buffer_start map to the root descriptor table
which says where in dynamic_buffers each set starts.  This can be used
by the pipeline layout lowering in the case where we can't statically
the dynamic buffer index for a binding.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:38 +00:00
Faith Ekstrand
a11adbe408 nvk: Use s instead of set_idx in CmdBindDescriptorSets
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:38 +00:00
Faith Ekstrand
2d5c04ee4a nvk: Return an nvk_cbuf_map from nvk_lower_nir()
There's no need to pass in the whole shader when the only part we're
going to write is the cbuf map.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:38 +00:00
Faith Ekstrand
f62b5582ea nvk: Add an explicit mapping from shader stages to cbuf bindings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:38 +00:00
Juan A. Suarez Romero
8120360358 Revert "v3d: show warning on creating a v3d screen on real hw"
There are paths were a v3d screen can be created instead of vc4 screen,
in a real rpi4 hardware. For instance, in the CI itself.

So assuming that it was only possible with the simulator was wrong.

This reverts commit c31be1f4ba.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27047>
2024-01-12 23:03:06 +00:00
Jesse Natalie
4cb9c77e8e mesa: Consider mesa format in addition to internal format for mip/cube completeness
Prior to 06b526de, the mesa format was used for these completeness checks.
That was to address the case where a *different* internal format selected
the *same* mesa format, and the texture shouldn't be considered compatible.
But this didn't address the case where the *same* internal format selected
a *different* mesa format, e.g. because the type passed to the TexImage
API was different.

An old WGL demo app called TexFilter.exe tries to redefine a mipped RGBA16
texture as RGBA8. This incorrect logic caused Mesa to try to copy the RGBA16
data from the smaller mips into the newly created RGBA8 data, because it
thought that the texture was still mip-complete, despite the format changing.

Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27023>
2024-01-12 22:26:27 +00:00
Karol Herbst
75ff6ca470 clc: add support for the native spir-v backend
This allows us to easily test if the LLVM SPIR-V backend is viable to
replace the translator.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26955>
2024-01-12 21:58:37 +00:00
Karol Herbst
22fa315ee0 clc: use spirv triple starting with llvm-17
It's supported since a while and shouldn't regress anything.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26955>
2024-01-12 21:58:37 +00:00
José Roberto de Souza
49fe060b5f anv: Fix PAT entry for userptr in integrated GPUs
Fixes: 060439bdf0 ("anv: Add ANV_BO_ALLOC_IMPORTED")
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/27040>
2024-01-12 21:32:49 +00:00
Mike Blumenkrantz
8929257352 zink: use maint6 for multi-layer compressed surface creation
this should speed up multi-layer copying

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26953>
2024-01-12 21:05:26 +00:00
Mike Blumenkrantz
33282e7504 zink: hook up maint6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26953>
2024-01-12 21:05:26 +00:00
Mike Blumenkrantz
4ccc91de17 zink: use local screen variable in surface creation
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26953>
2024-01-12 21:05:26 +00:00
Caio Oliveira
1a31970946 intel/compiler/xe2: Implement instruction compaction for DPAS.
These use different tables but map to the same bits, so it is just
a matter of picking the right tables for the instruction.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
6e56a4b474 intel/compiler/xe2: Fix for the removal of AccWrCtrl.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
7f39e51dd5 intel/compiler/xe2: Add extra flag registers.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
f974eacab3 intel/compiler/xe2: Fix for the removal of most predication modes.
Reworks:
* Remove changes to fixup_nomask workaround since it applies only for
  Gfx12 family.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
f79123e1d9 intel/compiler/xe2: Fix for NibCtrl field removal.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
7db3f0b1c1 intel/compiler/xe2: Implement instruction compaction.
Reworks:
* Handle DPAS in has_3src_unmapped_bits.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
57ba9c176c intel/compiler/xe2: Implement codegen of compact instructions.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
d8ba1d63bc intel/compiler: Add assume() checks to brw_compact_inst_(set_)bits().
Similar to the preconditions of brw_inst_(set_)bits().

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
4a24f49b57 intel/compiler/xe2: Implement codegen of three-source instructions.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
e10e7d5aa3 intel/compiler/xe2: Implement codegen of indirect immediates.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
294bdbb253 intel/compiler/xe2: Implement codegen of 2-source instruction operands.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
72bbfa8e8d intel/compiler/xe2: Implement codegen of general instruction controls.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Francisco Jerez
066e6c6234 intel/compiler/xe2: Add Xe2 bounds to FF() macro.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26860>
2024-01-12 20:18:03 +00:00
Yiwei Zhang
ecd50e70d4 venus: populate oom from ring submit alloc failures
ring_seqno_valid indicates a successful ring cmd submission, and can be
used to avoid invalid reply decoding due to failed submit alloc.
Otherwise, the garbled VkResult will mislead into initialization failure
instead of oom.

Below cts failure is fixed:
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic

Fixes: ec131c6e55 ("venus: use instance allocator for ring allocs")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27026>
2024-01-12 19:56:34 +00:00
Yiwei Zhang
12d428bc68 venus: avoid redundant layout transition for optimal internal layout
This ensures no extra barriers when internal layout is wsi layout.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27020>
2024-01-12 19:34:56 +00:00
Matt Turner
5b7c733902 util/tests: Disable half-float NaN test on hppa/old-mips
Bug: https://bugs.gentoo.org/908079
Fixes: 067023dce2 ("util: Add some unit tests of the half-float conversions.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26991>
2024-01-12 17:47:55 +00:00
Matt Turner
0540c9de44 util: Add DETECT_ARCH_HPPA macro
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26991>
2024-01-12 17:47:55 +00:00
Corentin Noël
68f5277887 glsl: Make sure that the variable is a ir_variable before unreferencing it
While it technically was already only using an ir_instruction field, better make
sure that it is effectively an ir_variable using the dedicated method instead of
relying on an undefined behavior.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26144>
2024-01-12 17:11:57 +00:00
Corentin Noël
d9c4ccf56d glsl: Make sure to not cast ir_dereference_variable into ir_variable
The parameter_lists_match_exact function was wrongly assuming that all the
elements were ir_variable when there can also be ir_dereference_variable elements.

Add case taking this into account.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26144>
2024-01-12 17:11:57 +00:00
Dmitry Osipenko
b9ad22d24e virtio/vdrm: Fix lockup in vdrm_host_sync()
The vdrm_execbuf() missed to set the seqno field for requests sent to host.
This causes vdrm_host_sync() to lock up due to the unset seqno in a case
where two or more threads are using vdrm_execbuf() and vdrm_send_req()
concurrently, like in this scenario:

	thread1: vdrm_send_req()  shmem->seqno=1 req->seqno=2
	thread2: vdrm_execbuf()   shmem->seqno=1 req->seqno=0
	thread1: vdrm_host_sync() shmem->seqno=0 req->seqno=2

Fix the lockup by setting the seqno in vdrm_execbuf().

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27021>
2024-01-12 16:53:59 +00:00
Derek Foreman
2fa1979c66 egl/wayland: Fix possible buffer leak
If we have to wait for a buffer to be released in swrast_update_buffers(),
we can leak it.

Take care to reuse the existing buffer if one is still available.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26761>
2024-01-12 15:16:31 +00:00
Pierre-Eric Pelloux-Prayer
e2f39e8aca Revert "ci/radeonsi: disable VA-API testing on raven"
This reverts commit 9017852de4.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26947>
2024-01-12 14:42:55 +00:00
Pierre-Eric Pelloux-Prayer
4e76c4ecb4 radeonsi: compute epitch when modifying surf_pitch
In the linear case with no mipmaps addrlib sets epitch to surf_pitch - 1
so lets do the same thing here.

The change in si_descriptors.c looks like it's papering over a bug but I
couldn't find any other changes that wouldn't break at least one use case.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10375
Fixes: 115b61e51f ("ac/surface: don't oversize surf_size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26947>
2024-01-12 14:42:55 +00:00
Tapani Pälli
810c1f7747 hasvk: remove gfx9 specific cs stall from emit_ps_depth_count
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/26997>
2024-01-12 14:01:08 +00:00
Tapani Pälli
30c148fd16 hasvk: remove softpin (GFX_VERx10 >= 90) related code
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/26997>
2024-01-12 14:01:08 +00:00
Tapani Pälli
ed2743258a hasvk: remove gfx9 specific code from emit_sample_pattern
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/26997>
2024-01-12 14:01:08 +00:00
Tapani Pälli
4d3d3a495f hasvk: remove cmd_buffer_ray_query_globals function decl
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/26997>
2024-01-12 14:01:08 +00:00
Job Noorman
b4015a1894 tu: support l1 dcache size on musl
musl doesn't support _SC_LEVEL1_DCACHE_LINESIZE so calculate the size
manually like on Bionic.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27031>
2024-01-12 13:21:10 +00:00
Rohan Garg
91798bab2d anv: refactor emit_dynamic_buffer_binding_table_entry
Refactor emit_dynamic_buffer_binding_table_entry to emit a null surface
state when the descriptor has no assocaited buffers allowing us to drop
the same check elsewhere.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27005>
2024-01-12 11:55:41 +00:00
Juan A. Suarez Romero
49794473c7 v3d/vc4/ci: reset the list of timeout tests
Check all the timeout tests in the skip list to remove those that are
not timeout anymore, and add new ones.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27027>
2024-01-12 09:33:39 +00:00
Daniel Schürmann
09413ff745 aco/insert_exec_mask: only create loop phis for exec mask if necessary
Totals from 195 (0.25% of 79242) affected shaders: (GFX11)

Instrs: 476457 -> 476031 (-0.09%); split: -0.23%, +0.14%
CodeSize: 2453964 -> 2452108 (-0.08%); split: -0.23%, +0.16%
SpillSGPRs: 944 -> 913 (-3.28%); split: -3.39%, +0.11%
SpillVGPRs: 838 -> 835 (-0.36%); split: -0.95%, +0.60%
Latency: 10811026 -> 10810125 (-0.01%); split: -0.08%, +0.07%
InvThroughput: 2276677 -> 2276698 (+0.00%); split: -0.12%, +0.12%
VClause: 9223 -> 9233 (+0.11%); split: -0.10%, +0.21%
SClause: 9025 -> 9005 (-0.22%); split: -0.38%, +0.16%
Copies: 67419 -> 67382 (-0.05%); split: -0.97%, +0.92%
PreSGPRs: 10830 -> 10668 (-1.50%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26937>
2024-01-12 09:05:15 +00:00
Daniel Schürmann
e83d8e1366 aco/insert_exec_mask: replace phi for loop restore mask with explicit copies
Totals from 1785 (2.25% of 79242) affected shaders: (GFX11)

Instrs: 6787574 -> 6787041 (-0.01%); split: -0.01%, +0.00%
CodeSize: 34906500 -> 34904704 (-0.01%); split: -0.01%, +0.01%
SpillSGPRs: 5848 -> 5816 (-0.55%)
Latency: 88616877 -> 88617209 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 16644948 -> 16644717 (-0.00%); split: -0.00%, +0.00%
VClause: 141122 -> 141121 (-0.00%)
SClause: 178929 -> 178906 (-0.01%); split: -0.03%, +0.02%
Copies: 569444 -> 569081 (-0.06%); split: -0.09%, +0.03%
Branches: 186980 -> 186961 (-0.01%); split: -0.01%, +0.00%
PreSGPRs: 133648 -> 133369 (-0.21%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26937>
2024-01-12 09:05:15 +00:00
Daniel Schürmann
d375d297cf aco/insert_exec_mask: unify exec restore code after divergent control flow
No fossil-db changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26937>
2024-01-12 09:05:15 +00:00
Eric Engestrom
eb96a4bffe docs: fix syntax highlighting on shell commands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27010>
2024-01-12 08:13:39 +00:00
Eric Engestrom
eb505979ba docs: fix syntax highlighting on non-code text snippet
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27010>
2024-01-12 08:13:39 +00:00
Pavel Ondračka
83b5745404 r300/ci: move streaming-texture-leak from fails to skips
While it passes locally, the runners are slow enough to not make it in
60 seconds so just move it to skips.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26973>
2024-01-12 07:30:01 +00:00
Pavel Ondračka
328b1ae02a r300/ci: add the KHR gles2 tests
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26973>
2024-01-12 07:30:00 +00:00
Pavel Ondračka
13b1ff33ab r300/ci: switch to deqp-runner suite
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26973>
2024-01-12 07:30:00 +00:00
Tatsuyuki Ishi
63827751e1 radv: Recompute max_waves after postprocessing RT config
The max waves for RT prolog need to be recalculated after merging the
resource usage of all shaders invoked from it.

Note that there is no need to panic, as the info was only used to
calculate maximum scratch size and with the RT prolog being low
footprint, this likely only caused overestimation rather than
underestimation.

Fixes: 533ec9843e ("radv: Precompute shader max_waves.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26998>
2024-01-12 02:39:32 +00:00
José Roberto de Souza
475661a64e intel/isl/xe2: Disable route of Sampler LD message to LSC
This optimization is causing some tests groups to fail, like:
dEQP-VK.image.mutable.2d_array.*
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.*

So disabling it until properly fixed.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27016>
2024-01-12 01:51:59 +00:00
Alyssa Rosenzweig
89de5e22ae asahi: don't use NIR_PASS_V
find . -type f -exec sed -ie 's/NIR_PASS_V(/NIR_PASS(_, /' \{} \;

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
375ad0ef26 asahi: don't use NIR_PASS for removing entrypoints
it's not a real nir pass, doesn't do metadata, etc.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
afefcc3b30 asahi: avoid silly internal NIR_PASS in gs lowering
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
c87d46b600 asahi: return progress from passes
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
8a6850d33c agx: return progress from passes
so we can be smarter about validation

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
26cedede0d agx: unset silly nir opts
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
01344819b0 agx: fix metadata in layer lowering
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
fe04e85be9 agx: only lower vars to ssa once
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
08fc7a4082 agx: stop lowering in opt loop
silly

total instructions in shared programs: 2278756 -> 2278751 (<.01%)
instructions in affected programs: 587 -> 582 (-0.85%)
helped: 2
HURT: 0

total bytes in shared programs: 15008934 -> 15008916 (<.01%)
bytes in affected programs: 3794 -> 3776 (-0.47%)
helped: 2
HURT: 0

total halfregs in shared programs: 519245 -> 519253 (<.01%)
halfregs in affected programs: 63 -> 71 (12.70%)
helped: 0
HURT: 1

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
9dfb072ae3 agx: ingest undefs in the backend
in prep for doing smarter things with them. stats changes seem to be RA
lottery, maybe?

total instructions in shared programs: 2277305 -> 2278756 (0.06%)
instructions in affected programs: 4003 -> 5454 (36.25%)
helped: 0
HURT: 9
Instructions are HURT.

total bytes in shared programs: 15000418 -> 15008934 (0.06%)
bytes in affected programs: 27072 -> 35588 (31.46%)
helped: 0
HURT: 9
Bytes are HURT.

total halfregs in shared programs: 519229 -> 519245 (<.01%)
halfregs in affected programs: 30 -> 46 (53.33%)
helped: 0
HURT: 2

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
b14987bf90 agx: rm deadcode
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
aee66f4c8f mesa/st: don't use NIR_PASS_V
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
52eb7e1ada mesa/st: return progress lowering builtins
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
5da993ea9a mesa/st: use instructions_pass for plane lowering
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
f81afb4b06 mesa/st: return progress in st_nir_lower_wpos_ytransform
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
1452b22ef9 glsl: fix metadata in gl_nir_zero_initialize_clip_distance
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:03 +00:00
Alyssa Rosenzweig
854b6020bd glsl: don't use NIR_PASS_V
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
b3d6658d96 glsl: return progress in point size linking
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
8fd18c4f20 nir/lower_flatshade: fix metadata
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
fcae4b469f nir/lower_io_arrays_to_elements: return prog
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
70fd20d2bc nir/lower_passthrough_edgeflags: return progress
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
460d2ca4f3 nir/lower_point_size_mov: return prog
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
8b7d765e59 nir/lower_alpha_test: rewrite with intrinsics_pass
returns progress now

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
086cbe5da2 nir/lower_bitmap: return prog
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
4833e42721 nir: return prog from drawpixels
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
6fa32b5b83 nir/lower_clip_cull_distance_arrays: return prog
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
a36812d9b4 nir/lower_io_to_temporaries: return prog
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
caffc3abca nir/lower_blend: return progress
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Alyssa Rosenzweig
29bd0a8ffa nir/lower_ssbo: rewrite
This pass was a mess. Rewrite it as modern NIR, fixing the metadata issues in
the process.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
2024-01-12 01:13:02 +00:00
Mike Blumenkrantz
93b29cd40a lavapipe: delete extra descriptor buffer layout validation
this is no longer needed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26952>
2024-01-12 00:44:09 +00:00
Francisco Jerez
ae29ffb637 intel/eu/gfx12.5+: Don't fail validation with ARF register restriction error for indirect addressing.
The "file" field doesn't exist for indirect operands, so it contains
garbage.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26994>
2024-01-12 00:20:38 +00:00
Francisco Jerez
32b3ea3c3d intel/eu/validate: SEND instructions don't have immediate encodings on Gen12+.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26994>
2024-01-12 00:20:38 +00:00
Francisco Jerez
dfb034853a intel/fs: Use full 32-bit sample masks when immediate.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26994>
2024-01-12 00:20:38 +00:00
Mike Blumenkrantz
565ee4fafc zink: fix separate shader patch variable location adjustment
in spirv, these start at location 0, not location 32

fixes #10414

Fixes: d9942442f2 ("zink: handle patch variable locations for separate shaders better")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26981>
2024-01-11 23:59:11 +00:00
Lionel Landwerlin
695b4a2992 anv: fix disabled Wa_14017076903/18022508906
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d0669f3ede ("intel/dev: switch defect identifiers to use lineage numbers")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27008>
2024-01-11 23:36:05 +00:00
Corentin Noël
1279e7b6c7 zink: Use memmove when dealing with overlapping memory
Fix defect reported by Coverity Scan.

Overlapping buffer in memory copy

Results in an undefined behavior

CID: 1515598

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26922>
2024-01-11 23:11:52 +00:00
Corentin Noël
a18171968c zink: Avoid the use of negative array offsets
Fix defect reported by Coverity Scan.

Negative array index read

A memory location at a negative offset from the beginning of the array will be read, resulting in incorrect values.

CID: 1515600

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26922>
2024-01-11 23:11:52 +00:00
Emma Anholt
920fe469b3 ci: Disable VK full runs that time out since 1.3.7.0 (hasvk, anv-tgl, a630)
Even the ESO fixes aren't helping, so just disable them for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25922>
2024-01-11 22:45:05 +00:00
Emma Anholt
78da1845fb ci: Add full-run xfails missed in the 1.3.7.0 CTS update.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25922>
2024-01-11 22:45:05 +00:00
Eric Engestrom
f298a0e709 ci: make sure we evaluate the python-test rules first
Fixes: 2c9fdaa830 ("ci: fix python-test dependency error on merge requests")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26984>
2024-01-11 21:59:22 +00:00
Timur Kristóf
436b89e838 radv: Correctly select SDMA support for PRIME blit.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10317
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27015>
2024-01-11 21:38:10 +00:00
Jesse Natalie
bc65d14ddb ci/windows: Update WARP to 1.0.9 NuGet
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26992>
2024-01-11 20:38:51 +00:00
Pavel Ondračka
9530ec9c07 r300: skip draw if vertex shader does not write gl_Position
Fixes few more piglit crashes.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27006>
2024-01-11 19:59:45 +00:00
Pavel Ondračka
53c17d85ab r300: fix reusing of color varying slots for generic ones
This was broken when I added texcoord support, the problem is that we
failed to properly count the number of used fs inputs and thus we failed
to make the proper decision when to reuse the color varying slot
Also fix the error messages, they were incorrect after the rewrite as
well. This fixes a bunch of piglits.

Fixes: d4b8e8a481

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27003>
2024-01-11 19:44:25 +00:00
Shih, Jude
7e4d95c271 amd/vpelib: Solve the downscaling problem for 2 tap
We should set default value of tap if we enable the
skip_optimal_tap_check flag for 2 tap case.

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Shih, Jude
25d0384df8 amd/vpelib: Add VPE prefix on API to avoid naming conflict
We need to add vpe prefix on some API such as convert_to_tetrahedral
to avoid naming conflict.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Agate, Jesse
16c1628f73 amd/vpelib: VPT Failing Test Cases
Fix failing studio range test cases.
- Cause of issue was negative values being mirrored in the pipe by
  studio range gamma conversion were getting clipped at the end of the
  pipeline. Fix is to move bias outside of the gamma lut and into the
  gamma bias.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jesse Agate <Jesse.Agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Assadian, Navid
b354ceebaa amd/vpelib: Use uint64 for buffer size
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Agate, Jesse
4a48896a0d amd/vpelib: White Screen Fix
- Observed white screen after changing edp display brightness and
  resizing video.
- Root cause: ogam sequence was not being updated when 3dlut
  transition from disabled->enabled.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jesse Agate <Jesse.Agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Shih, Jude
28b7c1e611 amd/vpelib: Need a debug flag to support 2tap downscaling
Add flag to support 2tap downscaling.

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Assadian, Navid
ee20be9b07 amd/vpelib: Apply inverse gamut remap to background
The inverse of gamut remap is applied to background color when the tone-mapping
is enabled and the output is fp16 linear, in order to reverse the effect of gamut remap
on the background color to preserve the given background color.

Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Agate, Jesse
73713f837b amd/vpelib: Studio Range Handling
The purpose of this change is to support bg color fill + studio range
output. Now, studio range conversion will be done in the gamma block
before bg color fill. That is for all studio range outputs adn SDR
outputs we will be in NL before blend block.  For full range HDR (full
range PQ of FP16 only), we will be linear before blend block.

- Added linear_0_1 gamma function
- Consolidated x_scale and y_scale
- Refactor Regam/Degam Funcs
- Add y bias to regam and degam
- Pull memory allocation for cm into a different function to make it
  more readable
- Added logic to degamma/regamma to re-calculate instead of using table
  if the scale factors are not one and the bias is not zero.
- Changing output gamma programming sequence in sw layer
- Fixes in hw layer for interpolation error assocaites with studio
  range transformation in gamma.
- Disabling ocsc
- PQ studio will still be 'blended' in NL. But A check was added
  to reject the job if it is not opaque

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jesse Agate <Jesse.Agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Lin, Ricky
e18761001e amd/vpelib: Rename the parameters of init vpe function
Rename the following parameters for better description.
- mj to major
- ni to minor
- rv to rev_id

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: rickylin <ricky.lin@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Visan, Tiberiu
258acf0227 amd/vpelib: revert SRGB to 709
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Tiberiu Visan <Tiberiu.Visan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Alan Liu
6d19aca144 amd/vpelib: remove unused header file
Remove unused header file diag_reg_helper.h

Signed-off-by: Alan Liu <haoping.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Alan Liu
74eb511458 radeonsi/vpe: Don't map and unmap emb_buffer every time in process_frame
We don't need to map and unmap emb_buffers every time in process_frame.
Instead, we can just map the buffers at create_processor and unmap at
process_destroy, and reuse the mapped address in process_frame.

v2:
Remove RADEON_MAP_TEMPORARY flag when calling buffer_map().

Signed-off-by: Alan Liu <haoping.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Alan Liu
82314a6dad radeonsi/vpe: Add environment variable to set embbuf number
Add an environment variable to allow users to set embbuf number before run time.

Signed-off-by: Alan Liu <haoping.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Peyton Lee
211b67c79b radeonsi/vpe: pre-allocate stream struceutre
Allocate stream structure when vpe is created.
No need to allocate and free stream everytime in process_frame.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Peyton Lee
bd37cbc8e5 radeonsi/vpe: support multi-buffer
Allocate mulitple embbuf for cycle using.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Peyton Lee
f6f9e3fe08 radeonsi/vpe: move flush to si_vpe_processor_end_frame
move cs_flush() to si_vpe_processor_end_frame() to fit the behavior as decoder.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Peyton Lee
14365ea353 radeonsi/vpe: disable info log
Set default log level to 0.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:17 +00:00
Peyton Lee
7bea7ced40 radeonsi/vpe: remove wait source surface fence and while loop
Kernel will handle source waiting, so remove the user mode waiting.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
2024-01-11 19:21:16 +00:00
Karol Herbst
2d3273e388 nak/algebraic: write code to an output file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26999>
2024-01-11 19:02:44 +00:00
Karol Herbst
15785a9bfe nak/algebraic: merge run and main function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26999>
2024-01-11 19:02:43 +00:00
Mike Blumenkrantz
465e26dd98 lavapipe: fix devenv icd filename
fixes #10408

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26985>
2024-01-11 18:29:55 +00:00
Yonggang Luo
0482153ef6 util: Update ALIGN prototype to match align
This is for rename merge ALIGN into align in future

Now it's safe to do that, because all warnings that triggered with
clang -Wshorten-64-to-32
already fixed in previous version

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

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932>
2024-01-11 17:30:46 +00:00
Yonggang Luo
8c847eb2de treewide: Use align64 instead of ALIGN for 64 bit value parameter
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932>
2024-01-11 17:30:46 +00:00
Yonggang Luo
32d2f70742 nouveau: Use align64 instead of ALIGN over input layer_size_B
layer_size_B is uint64_t, so use align64 over it
Because array_stride_B is uint32_t, so cast back to uint32_t

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932>
2024-01-11 17:30:46 +00:00
Yonggang Luo
fb55c70269 svga: Cleanup duplicate ALIGN macro defines
Use ALIGN function instead

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932>
2024-01-11 17:30:46 +00:00
Yonggang Luo
0b9c96562b treewide: Use util_is_power_of_two_nonzero{64|_uintptr} when needed
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26909>
2024-01-11 16:45:57 +00:00
Yonggang Luo
c1d6d745cf asahi,panfrost: Use IS_POT_NONZERO to replace util_is_power_of_two_nonzero for different size
This member's size are not fixed, so use IS_POT_NONZERO over it

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26909>
2024-01-11 16:45:57 +00:00
Yonggang Luo
9bed04c5a6 util: Add function util_is_power_of_two_nonzero_uintptr and macro IS_POT_NONZERO
The name suffix 'NONZERO' matched suffix of util_is_power_of_two_nonzero
IS_POT_NONZERO added for reduce duplicated code and compatible for different size
uintptr_t,uint32_t,uint64_t

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26909>
2024-01-11 16:45:56 +00:00
Eric Engestrom
50e570fd8e docs: update calendar for 24.0.0-rc1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27004>
2024-01-11 16:36:15 +00:00
Mike Blumenkrantz
bf729063c3 lavapipe: use pushconstants2 for dgc
Fixes: ec656e1984 ("lavapipe: maint6")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26977>
2024-01-11 15:59:17 +00:00
Mike Blumenkrantz
b6bfa73dc7 vk/cmdbuf: add back deleted maint6 workgraph bits
this otherwise breaks workgraph support in lavapipe

Fixes: ec656e1984 ("lavapipe: maint6")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26977>
2024-01-11 15:59:17 +00:00
José Expósito
0f57ffb845 zink: add render-passes HUD query
Add a driver specific query to display the number of render passes per
frame in the Gallium HUD.

Suggested in https://gitlab.freedesktop.org/mesa/mesa/-/issues/7327

Signed-off-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26518>
2024-01-11 15:07:52 +00:00
Juan A. Suarez Romero
c31be1f4ba v3d: show warning on creating a v3d screen on real hw
Rpi4 and beyond uses vc4 hardware to handle the display.

When forcing `MESA_LOADER_DRIVER_OVERRIDE=v3d` on it, it will try to
create a screen through v3d hardware, which does not exist, and thus
fail.

This is intended to be used with the simulator on x86 hardware, so
let's print a warning in case of trying to use it with real rpi.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27001>
2024-01-11 13:09:55 +00:00
Juan A. Suarez Romero
0557f0d59c Revert "v3d: use kmsro to create drm screen on real hw"
Let's not depend on kmsro to create the screen.

This reverts commit 8f621174da.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27001>
2024-01-11 13:09:55 +00:00
Eric Engestrom
4be49fa15a docs: reset new_features.txt
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27000>
2024-01-11 11:05:47 +00:00
Eric Engestrom
8dc234b36b VERSION: bump to 24.1
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27000>
2024-01-11 11:05:47 +00:00
4258 changed files with 348305 additions and 128449 deletions

0
.ci-farms/lima Normal file
View File

View File

@@ -2,6 +2,7 @@
# enforcement in the CI.
src/gallium/drivers/i915
src/gallium/targets/teflon/**/*
src/amd/vulkan/**/*
src/amd/compiler/**/*
src/egl/**/*

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@
*.pyo
*.out
/build
.venv/

View File

@@ -87,6 +87,10 @@ variables:
ARTIFACTS_BASE_URL: https://${CI_PROJECT_ROOT_NAMESPACE}.${CI_PAGES_DOMAIN}/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts
# Python scripts for structured logger
PYTHONPATH: "$PYTHONPATH:$CI_PROJECT_DIR/install"
# Drop once deqp-runner is upgraded to > 0.18.0
MESA_VK_ABORT_ON_DEVICE_LOSS: 1
# Avoid the wall of "Unsupported SPIR-V capability" warnings in CI job log, hiding away useful output
MESA_SPIRV_LOG_LEVEL: error
default:
before_script:
@@ -160,25 +164,7 @@ include:
- local: '.gitlab-ci/farm-rules.yml'
- local: '.gitlab-ci/test-source-dep.yml'
- local: 'docs/gitlab-ci.yml'
- local: 'src/amd/ci/gitlab-ci.yml'
- local: 'src/broadcom/ci/gitlab-ci.yml'
- local: 'src/etnaviv/ci/gitlab-ci.yml'
- local: 'src/freedreno/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/crocus/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/d3d12/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/i915/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/r300/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/lima/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/llvmpipe/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/nouveau/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/softpipe/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/virgl/ci/gitlab-ci.yml'
- local: 'src/gallium/drivers/zink/ci/gitlab-ci.yml'
- local: 'src/gallium/frontends/lavapipe/ci/gitlab-ci.yml'
- local: 'src/intel/ci/gitlab-ci.yml'
- local: 'src/microsoft/ci/gitlab-ci.yml'
- local: 'src/panfrost/ci/gitlab-ci.yml'
- local: 'src/virtio/ci/gitlab-ci.yml'
- local: 'src/**/ci/gitlab-ci.yml'
# YAML anchors for rule conditions
@@ -294,6 +280,32 @@ sanity:
script:
# ci-fairy check-commits --junit-xml=check-commits.xml
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
- |
set -eu
image_tags=(
DEBIAN_BASE_TAG
DEBIAN_BUILD_TAG
DEBIAN_X86_64_TEST_ANDROID_TAG
DEBIAN_X86_64_TEST_GL_TAG
DEBIAN_X86_64_TEST_VK_TAG
ALPINE_X86_64_BUILD_TAG
ALPINE_X86_64_LAVA_SSH_TAG
FEDORA_X86_64_BUILD_TAG
KERNEL_ROOTFS_TAG
KERNEL_TAG
PKG_REPO_REV
WINDOWS_X64_MSVC_TAG
WINDOWS_X64_BUILD_TAG
WINDOWS_X64_TEST_TAG
)
for var in "${image_tags[@]}"
do
if [ "$(echo -n "${!var}" | wc -c)" -gt 20 ]
then
echo "$var is too long; please make sure it is at most 20 chars."
exit 1
fi
done
artifacts:
when: on_failure
reports:
@@ -302,6 +314,22 @@ sanity:
- placeholder-job
mr-label-maker-test:
extends:
- .fdo.ci-fairy
stage: sanity
rules:
- !reference [.mr-label-maker-rules, rules]
variables:
GIT_STRATEGY: fetch
timeout: 10m
script:
- set -eu
- python3 -m venv .venv
- source .venv/bin/activate
- pip install git+https://gitlab.freedesktop.org/freedesktop/mr-label-maker
- mr-label-maker --dry-run --mr $CI_MERGE_REQUEST_IID
# Jobs that need to pass before spending hardware resources on further testing
.required-for-hardware-jobs:
needs:

View File

@@ -9,6 +9,9 @@
# submission, so skip it in the regular CI.
dEQP-VK.api.driver_properties.conformance_version
# Exclude this test which might fail when a new extension is implemented.
dEQP-VK.info.device_extensions
# These are tremendously slow (pushing toward a minute), and aren't
# reliable to be run in parallel with other tests due to CPU-side timing.
dEQP-GLES[0-9]*.functional.flush_finish.*

View File

@@ -61,3 +61,7 @@ deployment:
initramfs:
url: '{{ initramfs_url }}'
{% if dtb_url is defined %}
dtb:
url: '{{ dtb_url }}'
{% endif %}

View File

@@ -17,7 +17,6 @@
paths:
- _build/meson-logs/*.txt
- _build/meson-logs/strace
- shader-db
- artifacts
# Just Linux
@@ -71,13 +70,15 @@ debian-testing:
-D glx=dri
-D gbm=enabled
-D egl=enabled
-D glvnd=disabled
-D platforms=x11,wayland
GALLIUM_ST: >
-D dri3=enabled
-D gallium-nine=true
-D gallium-va=enabled
-D gallium-rusticl=true
GALLIUM_DRIVERS: "swrast,virgl,radeonsi,zink,crocus,iris,i915,r300"
VULKAN_DRIVERS: "swrast,amd,intel,intel_hasvk,virtio,nouveau-experimental"
GALLIUM_DRIVERS: "swrast,virgl,radeonsi,zink,crocus,iris,i915,r300,svga"
VULKAN_DRIVERS: "swrast,amd,intel,intel_hasvk,virtio,nouveau"
BUILDTYPE: "debugoptimized"
EXTRA_OPTION: >
-D spirv-to-dxil=true
@@ -103,8 +104,22 @@ debian-testing-asan:
-D b_sanitize=address
-D valgrind=disabled
-D tools=dlclose-skip
-D intel-clc=system
S3_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
# Do a host build for intel-clc (asan complains not being loaded
# as the first library)
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=
-D glx=disabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
debian-testing-msan:
# https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo
@@ -116,6 +131,7 @@ debian-testing-msan:
EXTRA_OPTION:
-D b_sanitize=memory
-D b_lundef=false
-D intel-clc=system
S3_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
# Don't run all the tests yet:
@@ -124,6 +140,19 @@ debian-testing-msan:
MESON_TEST_ARGS: "--suite glcpp --suite format"
GALLIUM_DRIVERS: "freedreno,iris,nouveau,kmsro,r300,r600,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
VULKAN_DRIVERS: intel,amd,broadcom,virtio
# Do a host build for intel-clc (msan complains about
# uninitialized values in the LLVM libs)
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=
-D glx=disabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
debian-build-testing:
extends: .meson-build
@@ -134,6 +163,7 @@ debian-build-testing:
-D glx=dri
-D gbm=enabled
-D egl=enabled
-D glvnd=disabled
-D platforms=x11,wayland
GALLIUM_ST: >
-D dri3=enabled
@@ -152,6 +182,7 @@ debian-build-testing:
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi
-D b_lto=true
LLVM_VERSION: 15
S3_ARTIFACT_NAME: debian-build-testing
script: |
section_start lava-pytest "lava-pytest"
.gitlab-ci/lava/lava-pytest.sh
@@ -161,9 +192,27 @@ debian-build-testing:
.gitlab-ci/run-yamllint.sh
section_switch meson "meson"
.gitlab-ci/meson/build.sh
.gitlab-ci/prepare-artifacts.sh
timeout: 15m
shader-db:
stage: code-validation
extends:
- .use-debian/x86_64_build
- .container+build-rules
needs:
- debian-build-testing
variables:
S3_ARTIFACT_NAME: debian-build-testing
before_script:
- !reference [.download_s3, before_script]
script: |
section_switch shader-db "shader-db"
.gitlab-ci/run-shader-db.sh
timeout: 30m
artifacts:
paths:
- shader-db
timeout: 15m
# Test a release build with -Werror so new warnings don't sneak in.
debian-release:
@@ -177,6 +226,7 @@ debian-release:
-D glx=dri
-D gbm=enabled
-D egl=enabled
-D glvnd=disabled
-D platforms=x11,wayland
GALLIUM_ST: >
-D dri3=enabled
@@ -195,6 +245,7 @@ debian-release:
-D osmesa=true
-D tools=all
-D intel-clc=enabled
-D intel-rt=enabled
-D imagination-srv=true
BUILDTYPE: "release"
S3_ARTIFACT_NAME: "mesa-x86_64-default-${BUILDTYPE}"
@@ -217,9 +268,9 @@ alpine-build-testing:
-D glx=disabled
-D gbm=enabled
-D egl=enabled
-D glvnd=false
-D glvnd=disabled
-D platforms=wayland
LLVM_VERSION: ""
LLVM_VERSION: "16"
GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,iris,kmsro,lima,nouveau,panfrost,r300,r600,radeonsi,svga,swrast,tegra,v3d,vc4,virgl,zink"
GALLIUM_ST: >
-D dri3=enabled
@@ -257,7 +308,7 @@ fedora-release:
-D glx=dri
-D gbm=enabled
-D egl=enabled
-D glvnd=true
-D glvnd=enabled
-D platforms=x11,wayland
EXTRA_OPTION: >
-D b_lto=true
@@ -265,8 +316,9 @@ fedora-release:
-D selinux=true
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost,imagination
-D vulkan-layers=device-select,overlay
-D intel-clc=enabled
-D intel-rt=enabled
-D imagination-srv=true
-D teflon=true
GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,i915,iris,kmsro,lima,nouveau,panfrost,r300,r600,radeonsi,svga,swrast,tegra,v3d,vc4,virgl,zink"
GALLIUM_ST: >
-D dri3=enabled
@@ -309,6 +361,7 @@ debian-android:
-D glx=disabled
-D gbm=disabled
-D egl=enabled
-D glvnd=disabled
-D platforms=android
EXTRA_OPTION: >
-D android-stub=true
@@ -316,6 +369,7 @@ debian-android:
-D platform-sdk-version=33
-D valgrind=disabled
-D android-libbacktrace=disabled
-D intel-clc=system
GALLIUM_ST: >
-D dri3=disabled
-D gallium-vdpau=disabled
@@ -324,8 +378,19 @@ debian-android:
-D gallium-xa=disabled
-D gallium-nine=false
-D gallium-rusticl=false
LLVM_VERSION: ""
LLVM_VERSION: "15"
PKG_CONFIG_LIBDIR: "/disable/non/android/system/pc/files"
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=
-D glx=disabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
ARTIFACTS_DEBUG_SYMBOLS: 1
S3_ARTIFACT_NAME: mesa-x86_64-android-${BUILDTYPE}
script:
@@ -377,6 +442,8 @@ debian-arm32:
- .ci-deqp-artifacts
variables:
CROSS: armhf
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D llvm=disabled
-D valgrind=disabled
@@ -392,6 +459,8 @@ debian-arm32-asan:
extends:
- debian-arm32
variables:
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D llvm=disabled
-D b_sanitize=address
@@ -410,12 +479,15 @@ debian-arm64:
-Wno-error=array-bounds
-Wno-error=stringop-truncation
VULKAN_DRIVERS: "freedreno,broadcom,panfrost,imagination-experimental"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D llvm=disabled
-D valgrind=disabled
-D imagination-srv=true
-D perfetto=true
-D freedreno-kmds=msm,virtio
-D teflon=true
S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
script:
- .gitlab-ci/meson/build.sh
@@ -425,6 +497,8 @@ debian-arm64-asan:
extends:
- debian-arm64
variables:
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D llvm=disabled
-D b_sanitize=address
@@ -440,6 +514,8 @@ debian-arm64-build-test:
- .ci-deqp-artifacts
variables:
VULKAN_DRIVERS: "amd"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-Dtools=panfrost,imagination
@@ -463,7 +539,6 @@ debian-clang:
BUILDTYPE: debug
LLVM_VERSION: 15
UNWIND: "enabled"
GALLIUM_DUMP_CPU: "true"
C_ARGS: >
-Wno-error=constant-conversion
-Wno-error=enum-conversion
@@ -479,7 +554,7 @@ debian-clang:
-D glx=dri
-D gbm=enabled
-D egl=enabled
-D glvnd=true
-D glvnd=enabled
-D platforms=x11,wayland
GALLIUM_ST: >
-D dri3=enabled
@@ -497,7 +572,7 @@ debian-clang:
-D opencl-spirv=true
-D shared-glapi=enabled
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus,i915,asahi"
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio,swrast,panfrost,imagination-experimental,microsoft-experimental,nouveau-experimental
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio,swrast,panfrost,imagination-experimental,microsoft-experimental,nouveau
EXTRA_OPTION:
-D spirv-to-dxil=true
-D osmesa=true
@@ -506,7 +581,9 @@ debian-clang:
-D vulkan-layers=device-select,overlay
-D build-aco-tests=true
-D intel-clc=enabled
-D intel-rt=enabled
-D imagination-srv=true
-D teflon=true
CC: clang-${LLVM_VERSION}
CXX: clang++-${LLVM_VERSION}
@@ -559,6 +636,7 @@ debian-vulkan:
-D opengl=false
-D gles1=disabled
-D gles2=disabled
-D glvnd=disabled
-D platforms=x11,wayland
-D osmesa=false
GALLIUM_ST: >
@@ -573,11 +651,11 @@ debian-vulkan:
-D c_args=-fno-sanitize-recover=all
-D cpp_args=-fno-sanitize-recover=all
UBSAN_OPTIONS: "print_stacktrace=1"
VULKAN_DRIVERS: amd,broadcom,freedreno,intel,intel_hasvk,virtio,imagination-experimental,microsoft-experimental
VULKAN_DRIVERS: amd,broadcom,freedreno,intel,intel_hasvk,panfrost,virtio,imagination-experimental,microsoft-experimental,nouveau
EXTRA_OPTION: >
-D vulkan-layers=device-select,overlay
-D build-aco-tests=true
-D intel-clc=disabled
-D intel-rt=disabled
-D imagination-srv=true
debian-x86_32:
@@ -590,8 +668,22 @@ debian-x86_32:
VULKAN_DRIVERS: intel,amd,swrast,virtio
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,swrast,virgl,zink,crocus,d3d12"
LLVM_VERSION: 15
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D vulkan-layers=device-select,overlay
-D intel-clc=system
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=
-D glx=disabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
debian-s390x:
extends:
@@ -605,6 +697,8 @@ debian-s390x:
GALLIUM_DRIVERS: "swrast,zink"
LLVM_VERSION: 15
VULKAN_DRIVERS: "swrast"
DRI_LOADERS:
-D glvnd=disabled
debian-ppc64el:
extends:
@@ -616,3 +710,5 @@ debian-ppc64el:
CROSS: ppc64el
GALLIUM_DRIVERS: "nouveau,radeonsi,swrast,virgl,zink"
VULKAN_DRIVERS: "amd,swrast"
DRI_LOADERS:
-D glvnd=disabled

View File

@@ -1,130 +1,135 @@
#!/bin/bash
for var in \
ACO_DEBUG \
ARTIFACTS_BASE_URL \
ASAN_OPTIONS \
BASE_SYSTEM_FORK_HOST_PREFIX \
BASE_SYSTEM_MAINLINE_HOST_PREFIX \
CI_COMMIT_BRANCH \
CI_COMMIT_REF_NAME \
CI_COMMIT_TITLE \
CI_JOB_ID \
CI_JOB_JWT_FILE \
CI_JOB_STARTED_AT \
CI_JOB_NAME \
CI_JOB_URL \
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
CI_MERGE_REQUEST_TITLE \
CI_NODE_INDEX \
CI_NODE_TOTAL \
CI_PAGES_DOMAIN \
CI_PIPELINE_ID \
CI_PIPELINE_URL \
CI_PROJECT_DIR \
CI_PROJECT_NAME \
CI_PROJECT_PATH \
CI_PROJECT_ROOT_NAMESPACE \
CI_RUNNER_DESCRIPTION \
CI_SERVER_URL \
CROSVM_GALLIUM_DRIVER \
CROSVM_GPU_ARGS \
CURRENT_SECTION \
DEQP_BIN_DIR \
DEQP_CONFIG \
DEQP_EXPECTED_RENDERER \
DEQP_FRACTION \
DEQP_HEIGHT \
DEQP_RESULTS_DIR \
DEQP_RUNNER_OPTIONS \
DEQP_SUITE \
DEQP_TEMP_DIR \
DEQP_VARIANT \
DEQP_VER \
DEQP_WIDTH \
DEVICE_NAME \
DRIVER_NAME \
EGL_PLATFORM \
ETNA_MESA_DEBUG \
FDO_CI_CONCURRENT \
FDO_UPSTREAM_REPO \
FD_MESA_DEBUG \
FLAKES_CHANNEL \
FREEDRENO_HANGCHECK_MS \
GALLIUM_DRIVER \
GALLIVM_PERF \
GPU_VERSION \
GTEST \
GTEST_FAILS \
GTEST_FRACTION \
GTEST_RESULTS_DIR \
GTEST_RUNNER_OPTIONS \
GTEST_SKIPS \
HWCI_FREQ_MAX \
HWCI_KERNEL_MODULES \
HWCI_KVM \
HWCI_START_WESTON \
HWCI_START_XORG \
HWCI_TEST_SCRIPT \
IR3_SHADER_DEBUG \
JOB_ARTIFACTS_BASE \
JOB_RESULTS_PATH \
JOB_ROOTFS_OVERLAY_PATH \
KERNEL_IMAGE_BASE \
KERNEL_IMAGE_NAME \
LD_LIBRARY_PATH \
LP_NUM_THREADS \
MESA_BASE_TAG \
MESA_BUILD_PATH \
MESA_DEBUG \
MESA_GLES_VERSION_OVERRIDE \
MESA_GLSL_VERSION_OVERRIDE \
MESA_GL_VERSION_OVERRIDE \
MESA_IMAGE \
MESA_IMAGE_PATH \
MESA_IMAGE_TAG \
MESA_LOADER_DRIVER_OVERRIDE \
MESA_TEMPLATES_COMMIT \
MESA_VK_IGNORE_CONFORMANCE_WARNING \
S3_HOST \
S3_RESULTS_UPLOAD \
NIR_DEBUG \
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER \
PAN_MESA_DEBUG \
PANVK_DEBUG \
PIGLIT_FRACTION \
PIGLIT_NO_WINDOW \
PIGLIT_OPTIONS \
PIGLIT_PLATFORM \
PIGLIT_PROFILES \
PIGLIT_REPLAY_ARTIFACTS_BASE_URL \
PIGLIT_REPLAY_DEVICE_NAME \
PIGLIT_REPLAY_EXTRA_ARGS \
PIGLIT_REPLAY_LOOP_TIMES \
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE \
PIGLIT_REPLAY_SUBCOMMAND \
PIGLIT_RESULTS \
PIGLIT_TESTS \
PIGLIT_TRACES_FILE \
PIPELINE_ARTIFACTS_BASE \
RADEON_DEBUG \
RADV_DEBUG \
RADV_PERFTEST \
SKQP_ASSETS_DIR \
SKQP_BACKENDS \
TU_DEBUG \
USE_ANGLE \
VIRGL_HOST_API \
WAFFLE_PLATFORM \
VK_CPU \
VK_DRIVER \
VK_ICD_FILENAMES \
VKD3D_PROTON_RESULTS \
VKD3D_CONFIG \
ZINK_DESCRIPTORS \
ZINK_DEBUG \
LVP_POISON_MEMORY \
; do
VARS=(
ACO_DEBUG
ARTIFACTS_BASE_URL
ASAN_OPTIONS
BASE_SYSTEM_FORK_HOST_PREFIX
BASE_SYSTEM_MAINLINE_HOST_PREFIX
CI_COMMIT_BRANCH
CI_COMMIT_REF_NAME
CI_COMMIT_TITLE
CI_JOB_ID
CI_JOB_JWT_FILE
CI_JOB_STARTED_AT
CI_JOB_NAME
CI_JOB_URL
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
CI_MERGE_REQUEST_TITLE
CI_NODE_INDEX
CI_NODE_TOTAL
CI_PAGES_DOMAIN
CI_PIPELINE_ID
CI_PIPELINE_URL
CI_PROJECT_DIR
CI_PROJECT_NAME
CI_PROJECT_PATH
CI_PROJECT_ROOT_NAMESPACE
CI_RUNNER_DESCRIPTION
CI_SERVER_URL
CROSVM_GALLIUM_DRIVER
CROSVM_GPU_ARGS
CURRENT_SECTION
DEQP_BIN_DIR
DEQP_CONFIG
DEQP_EXPECTED_RENDERER
DEQP_FRACTION
DEQP_HEIGHT
DEQP_RESULTS_DIR
DEQP_RUNNER_OPTIONS
DEQP_SUITE
DEQP_TEMP_DIR
DEQP_VER
DEQP_WIDTH
DEVICE_NAME
DRIVER_NAME
EGL_PLATFORM
ETNA_MESA_DEBUG
FDO_CI_CONCURRENT
FDO_UPSTREAM_REPO
FD_MESA_DEBUG
FLAKES_CHANNEL
FREEDRENO_HANGCHECK_MS
GALLIUM_DRIVER
GALLIVM_PERF
GPU_VERSION
GTEST
GTEST_FAILS
GTEST_FRACTION
GTEST_RESULTS_DIR
GTEST_RUNNER_OPTIONS
GTEST_SKIPS
HWCI_FREQ_MAX
HWCI_KERNEL_MODULES
HWCI_KVM
HWCI_START_WESTON
HWCI_START_XORG
HWCI_TEST_SCRIPT
IR3_SHADER_DEBUG
JOB_ARTIFACTS_BASE
JOB_RESULTS_PATH
JOB_ROOTFS_OVERLAY_PATH
KERNEL_IMAGE_BASE
KERNEL_IMAGE_NAME
LD_LIBRARY_PATH
LIBGL_ALWAYS_SOFTWARE
LP_NUM_THREADS
MESA_BASE_TAG
MESA_BUILD_PATH
MESA_DEBUG
MESA_GLES_VERSION_OVERRIDE
MESA_GLSL_VERSION_OVERRIDE
MESA_GL_VERSION_OVERRIDE
MESA_IMAGE
MESA_IMAGE_PATH
MESA_IMAGE_TAG
MESA_LOADER_DRIVER_OVERRIDE
MESA_TEMPLATES_COMMIT
MESA_VK_IGNORE_CONFORMANCE_WARNING
S3_HOST
S3_RESULTS_UPLOAD
NIR_DEBUG
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER
PAN_MESA_DEBUG
PANVK_DEBUG
PIGLIT_FRACTION
PIGLIT_NO_WINDOW
PIGLIT_OPTIONS
PIGLIT_PLATFORM
PIGLIT_PROFILES
PIGLIT_REPLAY_ANGLE_TAG
PIGLIT_REPLAY_ARTIFACTS_BASE_URL
PIGLIT_REPLAY_DEVICE_NAME
PIGLIT_REPLAY_EXTRA_ARGS
PIGLIT_REPLAY_LOOP_TIMES
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE
PIGLIT_REPLAY_SUBCOMMAND
PIGLIT_RESULTS
PIGLIT_TESTS
PIGLIT_TRACES_FILE
PIPELINE_ARTIFACTS_BASE
RADEON_DEBUG
RADV_DEBUG
RADV_PERFTEST
SKQP_ASSETS_DIR
SKQP_BACKENDS
TU_DEBUG
USE_ANGLE
VIRGL_HOST_API
WAFFLE_PLATFORM
VK_CPU
VK_DRIVER
# required by virglrender CI
VK_DRIVER_FILES
VKD3D_PROTON_RESULTS
VKD3D_CONFIG
VKD3D_TEST_EXCLUDE
ZINK_DESCRIPTORS
ZINK_DEBUG
LVP_POISON_MEMORY
)
for var in "${VARS[@]}"; do
if [ -n "${!var+x}" ]; then
echo "export $var=${!var@Q}"
fi

View File

@@ -7,6 +7,8 @@
# Second-stage init, used to set up devices and our job environment before
# running tests.
shopt -s extglob
# Make sure to kill itself and all the children process from this script on
# exiting, since any console output may interfere with LAVA signals handling,
# which based on the log console.
@@ -106,6 +108,13 @@ export XDG_CACHE_HOME=/tmp
# Make sure Python can find all our imports
export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))")
# If we need to specify a driver, it means several drivers could pick up this gpu;
# ensure that the other driver can't accidentally be used
if [ -n "$MESA_LOADER_DRIVER_OVERRIDE" ]; then
rm /install/lib/dri/!($MESA_LOADER_DRIVER_OVERRIDE)_dri.so
fi
ls -1 /install/lib/dri/*_dri.so || true
if [ "$HWCI_FREQ_MAX" = "true" ]; then
# Ensure initialization of the DRM device (needed by MSM)
head -0 /dev/dri/renderD128
@@ -156,7 +165,7 @@ fi
if [ -n "$HWCI_START_XORG" ]; then
echo "touch /xorg-started; sleep 100000" > /xorg-script
env \
VK_ICD_FILENAMES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$(uname -m).json" \
VK_DRIVER_FILES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$(uname -m).json" \
xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log &
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
@@ -183,7 +192,7 @@ if [ -n "$HWCI_START_WESTON" ]; then
mkdir -p /tmp/.X11-unix
env \
VK_ICD_FILENAMES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$(uname -m).json" \
VK_DRIVER_FILES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$(uname -m).json" \
weston -Bheadless-backend.so --use-gl -Swayland-0 --xwayland --idle-time=0 &
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"

View File

@@ -8,6 +8,8 @@
set -e
set -o xtrace
export LLVM_VERSION="${LLVM_VERSION:=16}"
EPHEMERAL=(
)
@@ -16,6 +18,7 @@ DEPS=(
bash
bison
ccache
clang16-dev
cmake
clang-dev
coreutils
@@ -27,6 +30,7 @@ DEPS=(
gettext
glslang
linux-headers
llvm16-static
llvm16-dev
meson
expat-dev
@@ -37,6 +41,7 @@ DEPS=(
libpciaccess-dev
zlib-dev
python3-dev
py3-cparser
py3-mako
py3-ply
vulkan-headers
@@ -48,6 +53,10 @@ DEPS=(
apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
. .gitlab-ci/container/build-llvm-spirv.sh
. .gitlab-ci/container/build-libclc.sh
. .gitlab-ci/container/container_pre_build.sh

View File

@@ -6,13 +6,13 @@ set -ex
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
CROSVM_VERSION=e3815e62d675ef436956a992e0ed58b7309c759d
CROSVM_VERSION=1641c55bcc922588e24de73e9cca7b5e4005bd6d
git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/crosvm/crosvm /platform/crosvm
pushd /platform/crosvm
git checkout "$CROSVM_VERSION"
git submodule update --init
VIRGLRENDERER_VERSION=747c6ae5b194ca551a79958a9a86c42bddcc4553
VIRGLRENDERER_VERSION=d9c002fac153b834a2c17731f2b85c36e333e102
rm -rf third_party/virglrenderer
git clone --single-branch -b main --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
pushd third_party/virglrenderer
@@ -31,10 +31,10 @@ RUSTFLAGS='-L native=/usr/local/lib' cargo install \
--version 0.65.1 \
$EXTRA_CARGO_ARGS
CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L native=/usr/local/lib' cargo install \
CROSVM_USE_SYSTEM_MINIGBM=1 CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L native=/usr/local/lib' cargo install \
-j ${FDO_CI_CONCURRENT:-4} \
--locked \
--features 'default-no-sandbox gpu x virgl_renderer virgl_renderer_next' \
--features 'default-no-sandbox gpu x virgl_renderer' \
--path . \
--root /usr/local \
$EXTRA_CARGO_ARGS

View File

@@ -3,29 +3,37 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BASE_TAG
# DEBIAN_X86_64_TEST_ANDROID_TAG
# DEBIAN_X86_64_TEST_GL_TAG
# DEBIAN_X86_64_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ex
DEQP_RUNNER_VERSION=0.18.0
DEQP_RUNNER_GIT_URL="${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/mesa/deqp-runner.git}"
if [ -n "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
# Build and install from source
DEQP_RUNNER_CARGO_ARGS="--git ${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/anholt/deqp-runner.git}"
DEQP_RUNNER_CARGO_ARGS="--git $DEQP_RUNNER_GIT_URL"
if [ -n "${DEQP_RUNNER_GIT_TAG}" ]; then
DEQP_RUNNER_CARGO_ARGS="--tag ${DEQP_RUNNER_GIT_TAG} ${DEQP_RUNNER_CARGO_ARGS}"
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_TAG"
else
DEQP_RUNNER_CARGO_ARGS="--rev ${DEQP_RUNNER_GIT_REV} ${DEQP_RUNNER_CARGO_ARGS}"
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_REV"
fi
DEQP_RUNNER_CARGO_ARGS="${DEQP_RUNNER_CARGO_ARGS} ${EXTRA_CARGO_ARGS}"
else
# Install from package registry
DEQP_RUNNER_CARGO_ARGS="--version 0.16.0 ${EXTRA_CARGO_ARGS} -- deqp-runner"
DEQP_RUNNER_CARGO_ARGS="--version ${DEQP_RUNNER_VERSION} ${EXTRA_CARGO_ARGS} -- deqp-runner"
DEQP_RUNNER_GIT_CHECKOUT="v$DEQP_RUNNER_VERSION"
fi
if [ -z "$ANDROID_NDK_HOME" ]; then
if [[ "$RUST_TARGET" != *-android ]]; then
cargo install --locked \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local \
@@ -33,7 +41,7 @@ if [ -z "$ANDROID_NDK_HOME" ]; then
else
mkdir -p /deqp-runner
pushd /deqp-runner
git clone --branch v0.18.0 --depth 1 https://gitlab.freedesktop.org/anholt/deqp-runner.git deqp-runner-git
git clone --branch "$DEQP_RUNNER_GIT_CHECKOUT" --depth 1 "$DEQP_RUNNER_GIT_URL" deqp-runner-git
pushd deqp-runner-git
cargo install --locked \
@@ -41,10 +49,10 @@ else
--root /usr/local --version 2.10.0 \
cargo-ndk
rustup target add x86_64-linux-android
RUSTFLAGS='-C target-feature=+crt-static' cargo ndk --target x86_64-linux-android build
rustup target add $RUST_TARGET
RUSTFLAGS='-C target-feature=+crt-static' cargo ndk --target $RUST_TARGET build --release
mv target/x86_64-linux-android/debug/deqp-runner /deqp-runner
mv target/$RUST_TARGET/release/deqp-runner /deqp-runner
cargo uninstall --locked \
--root /usr/local \

View File

@@ -10,10 +10,89 @@
set -ex -o pipefail
DEQP_VERSION=vulkan-cts-1.3.7.0
# See `deqp_build_targets` below for which release is used to produce which
# binary. Unless this comment has bitrotten:
# - the VK release produces `deqp-vk`,
# - the GL release produces `glcts`, and
# - the GLES release produces `deqp-gles*` and `deqp-egl`
DEQP_VK_VERSION=1.3.8.2
DEQP_GL_VERSION=4.6.4.0
DEQP_GLES_VERSION=3.2.10.0
# Patches to VulkanCTS may come from commits in their repo (listed in
# cts_commits_to_backport) or patch files stored in our repo (in the patch
# directory `$OLDPWD/.gitlab-ci/container/patches/` listed in cts_patch_files).
# Both list variables would have comments explaining the reasons behind the
# patches.
# shellcheck disable=SC2034
vk_cts_commits_to_backport=(
# Fix more ASAN errors due to missing virtual destructors
dd40bcfef1b4035ea55480b6fd4d884447120768
# Remove "unused shader stages" tests
7dac86c6bbd15dec91d7d9a98cd6dd57c11092a7
)
# shellcheck disable=SC2034
vk_cts_patch_files=(
)
if [ "${DEQP_TARGET}" = 'android' ]; then
vk_cts_patch_files+=(
build-deqp-vk_Allow-running-on-Android-from-the-command-line.patch
build-deqp-vk_Android-prints-to-stdout-instead-of-logcat.patch
)
fi
# shellcheck disable=SC2034
gl_cts_commits_to_backport=(
)
# shellcheck disable=SC2034
gl_cts_patch_files=(
)
if [ "${DEQP_TARGET}" = 'android' ]; then
gl_cts_patch_files+=(
build-deqp-gl_Allow-running-on-Android-from-the-command-line.patch
build-deqp-gl_Android-prints-to-stdout-instead-of-logcat.patch
)
fi
# shellcheck disable=SC2034
# GLES builds also EGL
gles_cts_commits_to_backport=(
# Implement support for the EGL_EXT_config_select_group extension
88ba9ac270db5be600b1ecacbc6d9db0c55d5be4
)
# shellcheck disable=SC2034
gles_cts_patch_files=(
)
if [ "${DEQP_TARGET}" = 'android' ]; then
gles_cts_patch_files+=(
build-deqp-gles_Allow-running-on-Android-from-the-command-line.patch
build-deqp-gles_Android-prints-to-stdout-instead-of-logcat.patch
)
fi
### Careful editing anything below this line
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
# shellcheck disable=SC2153
case "${DEQP_API}" in
VK) DEQP_VERSION="vulkan-cts-$DEQP_VK_VERSION";;
GL) DEQP_VERSION="opengl-cts-$DEQP_GL_VERSION";;
GLES) DEQP_VERSION="opengl-es-cts-$DEQP_GLES_VERSION";;
esac
git clone \
https://github.com/KhronosGroup/VK-GL-CTS.git \
-b $DEQP_VERSION \
@@ -23,50 +102,30 @@ pushd /VK-GL-CTS
mkdir -p /deqp
echo "dEQP base version $DEQP_VERSION" > /deqp/version-log
# shellcheck disable=SC2153
deqp_api=${DEQP_API,,}
# Patches to VulkanCTS may come from commits in their repo (listed in
# cts_commits_to_backport) or patch files stored in our repo (in the patch
# directory `$OLDPWD/.gitlab-ci/container/patches/` listed in cts_patch_files).
# Both list variables would have comments explaining the reasons behind the
# patches.
cts_commits_to_backport=(
# Take multiview into account for task shader inv. stats
22aa3f4c59f6e1d4daebd5a8c9c05bce6cd3b63b
# Remove illegal mesh shader query tests
2a87f7b25dc27188be0f0a003b2d7aef69d9002e
# Relax fragment shader invocations result verifications
0d8bf6a2715f95907e9cf86a86876ff1f26c66fe
# Fix several issues in dynamic rendering basic tests
c5453824b498c981c6ba42017d119f5de02a3e34
)
for commit in "${cts_commits_to_backport[@]}"
cts_commits_to_backport="${deqp_api}_cts_commits_to_backport[@]"
for commit in "${!cts_commits_to_backport}"
do
PATCH_URL="https://github.com/KhronosGroup/VK-GL-CTS/commit/$commit.patch"
echo "Apply patch to VK-GL-CTS from $PATCH_URL"
echo "Apply patch to ${DEQP_API} CTS from $PATCH_URL"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 $PATCH_URL | \
git am -
done
cts_patch_files=(
# Android specific patches.
build-deqp_Allow-running-on-Android-from-the-command-line.patch
build-deqp_Android-prints-to-stdout-instead-of-logcat.patch
)
for patch in "${cts_patch_files[@]}"
cts_patch_files="${deqp_api}_cts_patch_files[@]"
for patch in "${!cts_patch_files}"
do
echo "Apply patch to VK-GL-CTS from $patch"
echo "Apply patch to ${DEQP_API} CTS from $patch"
git am < $OLDPWD/.gitlab-ci/container/patches/$patch
done
echo "The following local patches are applied on top:" >> /deqp/version-log
git log --reverse --oneline $DEQP_VERSION.. --format=%s | sed 's/^/- /' >> /deqp/version-log
{
echo "dEQP base version $DEQP_VERSION"
echo "The following local patches are applied on top:"
git log --reverse --oneline $DEQP_VERSION.. --format=%s | sed 's/^/- /'
} > /deqp/version-$deqp_api
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
# libpng (sigh). The archives get their checksums checked anyway, and git
@@ -79,57 +138,97 @@ popd
pushd /deqp
if [ "${DEQP_TARGET}" != 'android' ]; then
if [ "${DEQP_API}" = 'GLES' ]; then
if [ "${DEQP_TARGET}" = 'android' ]; then
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=android \
-DCMAKE_BUILD_TYPE=Release \
$EXTRA_CMAKE_ARGS
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-android
else
# When including EGL/X11 testing, do that build first and save off its
# deqp-egl binary.
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=x11_egl_glx \
-DCMAKE_BUILD_TYPE=Release \
$EXTRA_CMAKE_ARGS
ninja modules/egl/deqp-egl
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-x11
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=wayland \
-DCMAKE_BUILD_TYPE=Release \
$EXTRA_CMAKE_ARGS
ninja modules/egl/deqp-egl
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-wayland
fi
fi
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=${DEQP_TARGET:-default} \
-DDEQP_TARGET=${DEQP_TARGET} \
-DCMAKE_BUILD_TYPE=Release \
$EXTRA_CMAKE_ARGS
mold --run ninja
if [ "${DEQP_TARGET}" = 'android' ]; then
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-android
# Make sure `default` doesn't silently stop detecting one of the platforms we care about
if [ "${DEQP_TARGET}" = 'default' ]; then
grep -q DEQP_SUPPORT_WAYLAND=1 build.ninja
grep -q DEQP_SUPPORT_X11=1 build.ninja
grep -q DEQP_SUPPORT_XCB=1 build.ninja
fi
# Copy out the mustpass lists we want.
mkdir /deqp/mustpass
for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/main/vk-default.txt) ; do
cat /VK-GL-CTS/external/vulkancts/mustpass/main/$mustpass \
>> /deqp/mustpass/vk-master.txt
done
deqp_build_targets=()
case "${DEQP_API}" in
VK)
deqp_build_targets+=(deqp-vk)
;;
GL)
deqp_build_targets+=(glcts)
;;
GLES)
deqp_build_targets+=(deqp-gles{2,3,31})
# deqp-egl also comes from this build, but it is handled separately above.
;;
esac
if [ "${DEQP_TARGET}" != 'android' ]; then
deqp_build_targets+=(testlog-to-xml)
deqp_build_targets+=(testlog-to-csv)
deqp_build_targets+=(testlog-to-junit)
fi
mold --run ninja "${deqp_build_targets[@]}"
if [ "${DEQP_TARGET}" != 'android' ]; then
cp \
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \
/deqp/mustpass/.
cp \
/deqp/external/openglcts/modules/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-master.txt \
/deqp/mustpass/.
cp \
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gles/khronos_mustpass/3.2.6.x/*-master.txt \
/deqp/mustpass/.
cp \
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-master.txt \
/deqp/mustpass/.
cp \
/deqp/external/openglcts/modules/gl_cts/data/mustpass/gl/khronos_mustpass_single/4.6.1.x/*-single.txt \
/deqp/mustpass/.
# Copy out the mustpass lists we want.
mkdir -p /deqp/mustpass
if [ "${DEQP_API}" = 'VK' ]; then
for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/main/vk-default.txt) ; do
cat /VK-GL-CTS/external/vulkancts/mustpass/main/$mustpass \
>> /deqp/mustpass/vk-main.txt
done
fi
if [ "${DEQP_API}" = 'GL' ]; then
cp \
/VK-GL-CTS/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-main.txt \
/deqp/mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/mustpass/gl/khronos_mustpass_single/4.6.1.x/*-single.txt \
/deqp/mustpass/
fi
if [ "${DEQP_API}" = 'GLES' ]; then
cp \
/VK-GL-CTS/external/openglcts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \
/deqp/mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-main.txt \
/deqp/mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.6.x/*-main.txt \
/deqp/mustpass/
fi
# Save *some* executor utils, but otherwise strip things down
# to reduct deqp build size:
@@ -140,8 +239,8 @@ if [ "${DEQP_TARGET}" != 'android' ]; then
fi
# Remove other mustpass files, since we saved off the ones we wanted to conventient locations above.
rm -rf /deqp/external/openglcts/modules/gl_cts/data/mustpass
rm -rf /deqp/external/vulkancts/modules/vulkan/vk-master*
rm -rf /deqp/external/**/mustpass/
rm -rf /deqp/external/vulkancts/modules/vulkan/vk-main*
rm -rf /deqp/external/vulkancts/modules/vulkan/vk-default
rm -rf /deqp/external/openglcts/modules/cts-runner
@@ -149,9 +248,15 @@ rm -rf /deqp/modules/internal
rm -rf /deqp/execserver
rm -rf /deqp/framework
find . -depth \( -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' \) -exec rm -rf {} \;
${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
${STRIP_CMD:-strip} external/openglcts/modules/glcts
${STRIP_CMD:-strip} modules/*/deqp-*
if [ "${DEQP_API}" = 'VK' ]; then
${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
fi
if [ "${DEQP_API}" = 'GL' ]; then
${STRIP_CMD:-strip} external/openglcts/modules/glcts
fi
if [ "${DEQP_API}" = 'GLES' ]; then
${STRIP_CMD:-strip} modules/*/deqp-*
fi
du -sh ./*
rm -rf /VK-GL-CTS
popd

View File

@@ -7,7 +7,7 @@
set -ex
git clone https://github.com/microsoft/DirectX-Headers -b v1.611.0 --depth 1
git clone https://github.com/microsoft/DirectX-Headers -b v1.613.1 --depth 1
pushd DirectX-Headers
meson setup build --backend=ninja --buildtype=release -Dbuild-test=false $EXTRA_MESON_ARGS
meson install -C build

View File

@@ -2,7 +2,14 @@
set -ex
MOLD_VERSION="1.11.0"
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BASE_TAG
# DEBIAN_BUILD_TAG
# FEDORA_X86_64_BUILD_TAG
# KERNEL_ROOTFS_TAG
MOLD_VERSION="2.4.1"
git clone -b v"$MOLD_VERSION" --single-branch --depth 1 https://github.com/rui314/mold.git
pushd mold

View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_X86_64_TEST_GL_TAG
set -ex -o pipefail
### Careful editing anything below this line
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
git clone https://github.com/axeldavy/Xnine.git /Xnine
mkdir /Xnine/build
pushd /Xnine/build
git checkout c64753d224c08006bcdcfa7880ada826f27164b1
cmake .. -DBUILD_TESTS=1 -DWITH_DRI3=1 -DD3DADAPTER9_LOCATION=/install/lib/d3d/d3dadapter9.so
make
mkdir -p /NineTests/
mv NineTests/NineTests /NineTests/
popd
rm -rf /Xnine

View File

@@ -8,7 +8,7 @@ set -ex
# DEBIAN_X86_64_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
REV="f7db20b03de6896d013826c0a731bc4417c1a5a0"
REV="f7ece74a107a2f99b2f494d978c84f8d51faa703"
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
pushd /piglit

View File

@@ -6,7 +6,7 @@
# KERNEL_ROOTFS_TAG
set -ex
VKD3D_PROTON_COMMIT="a0ccc383937903f4ca0997ce53e41ccce7f2f2ec"
VKD3D_PROTON_COMMIT="c3b385606a93baed42482d822805e0d9c2f3f603"
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"

View File

@@ -7,7 +7,7 @@
set -ex
VALIDATION_TAG="v1.3.269"
VALIDATION_TAG="v1.3.281"
git clone -b "$VALIDATION_TAG" --single-branch --depth 1 https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
pushd Vulkan-ValidationLayers

View File

@@ -3,8 +3,17 @@
set -ex
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BUILD_TAG
# DEBIAN_X86_64_TEST_ANDROID_TAG
# DEBIAN_X86_64_TEST_GL_TAG
# DEBIAN_X86_64_TEST_VK_TAG
# FEDORA_X86_64_BUILD_TAG
# KERNEL_ROOTFS_TAG
export LIBWAYLAND_VERSION="1.21.0"
export WAYLAND_PROTOCOLS_VERSION="1.31"
export WAYLAND_PROTOCOLS_VERSION="1.34"
git clone https://gitlab.freedesktop.org/wayland/wayland
cd wayland

View File

@@ -52,7 +52,8 @@ if [[ $arch != "armhf" ]]; then
# We don't need clang-format for the crossbuilds, but the installed amd64
# package will conflict with libclang. Uninstall clang-format (and its
# problematic dependency) to fix.
apt-get remove -y "clang-format-${LLVM_VERSION}" "libclang-cpp${LLVM_VERSION}"
apt-get remove -y "clang-format-${LLVM_VERSION}" "libclang-cpp${LLVM_VERSION}" \
"llvm-${LLVM_VERSION}-runtime" "llvm-${LLVM_VERSION}-linker-tools"
# llvm-*-tools:$arch conflicts with python3:amd64. Install dependencies only
# with apt-get, then force-install llvm-*-{dev,tools}:$arch with dpkg to get

View File

@@ -27,6 +27,7 @@ DEPS=(
cmake
curl
fastboot
flatbuffers-compiler
flex
g++
git
@@ -36,6 +37,7 @@ DEPS=(
libdrm-dev
libelf-dev
libexpat1-dev
libflatbuffers-dev
libvulkan-dev
libx11-dev
libx11-xcb-dev
@@ -50,6 +52,7 @@ DEPS=(
libxext-dev
libxrandr-dev
libxshmfence-dev
libxtensor-dev
libxxf86vm-dev
libwayland-dev
libwayland-egl-backend-dev
@@ -61,6 +64,7 @@ DEPS=(
python3-mako
python3-pil
python3-pip
python3-pycparser
python3-requests
python3-setuptools
u-boot-tools

View File

@@ -25,10 +25,12 @@ DEPS=(
bison
ccache
curl
"clang-${LLVM_VERSION}"
"clang-format-${LLVM_VERSION}"
dpkg-cross
findutils
flex
flatbuffers-compiler
g++
cmake
gcc
@@ -41,6 +43,7 @@ DEPS=(
libelf-dev
libepoxy-dev
libexpat1-dev
libflatbuffers-dev
libgtk-3-dev
"libllvm${LLVM_VERSION}"
libomxil-bellagio-dev
@@ -56,6 +59,7 @@ DEPS=(
libxrandr-dev
libxrender-dev
libxshmfence-dev
libxtensor-dev
libxxf86vm-dev
libwayland-egl-backend-dev
make
@@ -66,6 +70,7 @@ DEPS=(
python3-pil
python3-pip
python3-ply
python3-pycparser
python3-requests
python3-setuptools
qemu-user
@@ -83,6 +88,10 @@ apt-get update
apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
$EXTRA_LOCAL_PACKAGES
. .gitlab-ci/container/build-llvm-spirv.sh
. .gitlab-ci/container/build-libclc.sh
# Needed for ci-fairy, this revision is able to upload files to S3
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2

View File

@@ -75,10 +75,6 @@ tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
rm -rf $XORGMACROS_VERSION
. .gitlab-ci/container/build-llvm-spirv.sh
. .gitlab-ci/container/build-libclc.sh
. .gitlab-ci/container/build-wayland.sh
. .gitlab-ci/container/build-shader-db.sh
@@ -94,6 +90,13 @@ RUSTFLAGS='-L native=/usr/local/lib' cargo install \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local
# install cbindgen
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
cbindgen --version 0.26.0 \
--locked \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local
############### Uninstall the build software
apt-get purge -y "${EPHEMERAL[@]}"

View File

@@ -41,6 +41,7 @@ rm "$ndk.zip"
############### Build dEQP runner
export ANDROID_NDK_HOME=/$ndk
export RUST_TARGET=x86_64-linux-android
. .gitlab-ci/container/build-rust.sh
. .gitlab-ci/container/build-deqp-runner.sh
@@ -49,6 +50,12 @@ rm -rf /root/.rustup
############### Build dEQP GL
DEQP_API=GL \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28" \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GLES \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28" \
. .gitlab-ci/container/build-deqp.sh
@@ -73,8 +80,14 @@ popd
############### Building and installing Debian package ...
git clone --depth 1 https://github.com/google/android-cuttlefish.git
ANDROID_CUTTLEFISH_VERSION=f6494d9fbeaa9974b56923e3029909e5d5f440dd
mkdir android-cuttlefish
pushd android-cuttlefish
git init
git remote add origin https://github.com/google/android-cuttlefish.git
git fetch --depth 1 origin "$ANDROID_CUTTLEFISH_VERSION"
git checkout FETCH_HEAD
pushd base
dpkg-buildpackage -uc -us

View File

@@ -22,6 +22,7 @@ EPHEMERAL=(
"libclang-cpp${LLVM_VERSION}-dev"
libdrm-dev
libgles2-mesa-dev
libgtest-dev
libpciaccess-dev
libpng-dev
libudev-dev
@@ -30,6 +31,9 @@ EPHEMERAL=(
libwayland-dev
libx11-xcb-dev
libxcb-dri2-0-dev
libxcb-dri3-dev
libxcb-present-dev
libxfixes-dev
libxkbcommon-dev
libxrandr-dev
libxrender-dev
@@ -46,6 +50,7 @@ EPHEMERAL=(
DEPS=(
clinfo
iptables
kmod
"libclang-common-${LLVM_VERSION}-dev"
"libclang-cpp${LLVM_VERSION}"
libcap2
@@ -60,6 +65,7 @@ DEPS=(
spirv-tools
sysvinit-core
weston
xwayland
)
apt-get update
@@ -76,7 +82,13 @@ PIGLIT_OPTS="-DPIGLIT_BUILD_GLX_TESTS=ON -DPIGLIT_BUILD_CL_TESTS=ON -DPIGLIT_BUI
############### Build dEQP GL
DEQP_TARGET=surfaceless . .gitlab-ci/container/build-deqp.sh
DEQP_API=GL \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GLES \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
############### Build apitrace
@@ -86,6 +98,10 @@ DEQP_TARGET=surfaceless . .gitlab-ci/container/build-deqp.sh
. .gitlab-ci/container/build-vulkan-validation.sh
############### Build nine tests
. .gitlab-ci/container/build-ninetests.sh
############### Uninstall the build software
apt-get purge -y "${EPHEMERAL[@]}"

View File

@@ -27,6 +27,7 @@ EPHEMERAL=(
libvulkan-dev
libwaffle-dev
libx11-xcb-dev
libxcb-dri2-0-dev
libxcb-ewmh-dev
libxcb-keysyms1-dev
libxkbcommon-dev
@@ -103,6 +104,8 @@ PIGLIT_BUILD_TARGETS="piglit_replayer" . .gitlab-ci/container/build-piglit.sh
############### Build dEQP VK
DEQP_API=VK \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
############### Build apitrace

View File

@@ -27,9 +27,11 @@ EPHEMERAL=(
DEPS=(
bindgen
bison
cbindgen
ccache
clang-devel
flex
flatbuffers-compiler
gcc
gcc-c++
gettext
@@ -41,6 +43,7 @@ DEPS=(
"pkgconfig(SPIRV-Tools)"
"pkgconfig(dri2proto)"
"pkgconfig(expat)"
"pkgconfig(flatbuffers)"
"pkgconfig(glproto)"
"pkgconfig(libclc)"
"pkgconfig(libelf)"
@@ -66,6 +69,7 @@ DEPS=(
"pkgconfig(xfixes)"
"pkgconfig(xrandr)"
"pkgconfig(xshmfence)"
"pkgconfig(xtensor)"
"pkgconfig(xxf86vm)"
"pkgconfig(zlib)"
procps-ng
@@ -73,6 +77,7 @@ DEPS=(
python3-devel
python3-mako
python3-ply
python3-pycparser
rust-packaging
vulkan-headers
spirv-tools-devel

View File

@@ -68,6 +68,10 @@ debian/x86_64_build-base:
- .debian-container
variables:
MESA_IMAGE_TAG: &debian-x86_64_build-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
rules:
# python-test requires debian/x86_64_build, which requires this job
- !reference [python-test, rules]
- !reference [.container, rules]
.use-debian/x86_64_build-base:
extends:
@@ -88,9 +92,9 @@ debian/x86_64_build:
variables:
MESA_IMAGE_TAG: &debian-x86_64_build ${DEBIAN_BUILD_TAG}
rules:
- !reference [.use-debian/x86_64_build-base, rules]
# python-test requires this job
- !reference [python-test, rules]
- !reference [.use-debian/x86_64_build-base, rules]
.use-debian/x86_64_build:
extends:
@@ -222,7 +226,7 @@ debian/x86_64_test-vk:
- debian/x86_64_test-vk
# Debian based x86_64 test image for Android
debian/x86_64_test-android:
.debian/x86_64_test-android:
extends: .use-debian/x86_64_test-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-android ${DEBIAN_X86_64_TEST_ANDROID_TAG}

View File

@@ -272,7 +272,17 @@ mv /usr/local/bin/*-runner $ROOTFS/usr/bin/.
############### Build dEQP
DEQP_TARGET=surfaceless . .gitlab-ci/container/build-deqp.sh
DEQP_API=GL \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GLES \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=VK \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
mv /deqp $ROOTFS/.

View File

@@ -0,0 +1,182 @@
From dc97ee83a813f6b170079ddf2a04bbb06221a5a7 Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Fri, 26 Aug 2022 18:24:27 +0200
Subject: [PATCH 1/2] Allow running on Android from the command line
For testing the Android EGL platform without having to go via the
Android activity manager, build deqp-egl.
Tests that render to native windows are unsupported, as command line
programs cannot create windows on Android.
$ cmake -S . -B build/ -DDEQP_TARGET=android -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror -DANDROID_NDK_PATH=./android-ndk-r21d -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28 -DGLCTS_GTF_TARGET=gles32 -G Ninja
$ ninja -C build modules/egl/deqp-egl
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---
CMakeLists.txt | 38 ++-----------------
.../android/tcuAndroidNativeActivity.cpp | 36 +++++++++---------
.../platform/android/tcuAndroidPlatform.cpp | 12 +++++-
3 files changed, 34 insertions(+), 52 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb58cc7ba..98b8fc6cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -272,7 +272,7 @@ include_directories(
external/vulkancts/framework/vulkan
)
-if (DE_OS_IS_ANDROID OR DE_OS_IS_IOS)
+if (DE_OS_IS_IOS)
# On Android deqp modules are compiled as libraries and linked into final .so
set(DEQP_MODULE_LIBRARIES )
set(DEQP_MODULE_ENTRY_POINTS )
@@ -316,7 +316,7 @@ macro (add_deqp_module MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
set(DEQP_MODULE_LIBRARIES ${DEQP_MODULE_LIBRARIES} PARENT_SCOPE)
set(DEQP_MODULE_ENTRY_POINTS ${DEQP_MODULE_ENTRY_POINTS} PARENT_SCOPE)
- if (NOT DE_OS_IS_ANDROID AND NOT DE_OS_IS_IOS)
+ if (NOT DE_OS_IS_IOS)
# Executable target
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
@@ -338,7 +338,7 @@ macro (add_deqp_module_skip_android MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
add_library("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" STATIC ${SRCS})
target_link_libraries("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" ${LIBS})
- if (NOT DE_OS_IS_ANDROID AND NOT DE_OS_IS_IOS)
+ if (NOT DE_OS_IS_IOS)
# Executable target
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
@@ -390,37 +390,7 @@ add_subdirectory(external/vulkancts/vkscpc ${MAYBE_EXCLUDE_FROM_ALL})
add_subdirectory(external/openglcts ${MAYBE_EXCLUDE_FROM_ALL})
# Single-binary targets
-if (DE_OS_IS_ANDROID)
- include_directories(executor)
- include_directories(${PROJECT_BINARY_DIR}/external/vulkancts/framework/vulkan)
-
- set(DEQP_SRCS
- framework/platform/android/tcuAndroidMain.cpp
- framework/platform/android/tcuAndroidJNI.cpp
- framework/platform/android/tcuAndroidPlatformCapabilityQueryJNI.cpp
- framework/platform/android/tcuTestLogParserJNI.cpp
- ${DEQP_MODULE_ENTRY_POINTS}
- )
-
- set(DEQP_LIBS
- tcutil-platform
- xecore
- ${DEQP_MODULE_LIBRARIES}
- )
-
- add_library(deqp SHARED ${DEQP_SRCS})
- target_link_libraries(deqp ${DEQP_LIBS})
-
- # Separate out the debug information because it's enormous
- add_custom_command(TARGET deqp POST_BUILD
- COMMAND ${CMAKE_STRIP} --only-keep-debug -o $<TARGET_FILE:deqp>.debug $<TARGET_FILE:deqp>
- COMMAND ${CMAKE_STRIP} -g $<TARGET_FILE:deqp>)
-
- # Needed by OpenGL CTS that defines its own activity but depends on
- # common Android support code.
- target_include_directories(deqp PRIVATE framework/platform/android)
-
-elseif (DE_OS_IS_IOS)
+if (DE_OS_IS_IOS)
# Code sign identity
set(DEQP_IOS_CODE_SIGN_IDENTITY "drawElements" CACHE STRING "Code sign identity for iOS build")
diff --git a/framework/platform/android/tcuAndroidNativeActivity.cpp b/framework/platform/android/tcuAndroidNativeActivity.cpp
index 6f8cd8fc5..b83e30f41 100644
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
@@ -116,23 +116,25 @@ namespace Android
NativeActivity::NativeActivity (ANativeActivity* activity)
: m_activity(activity)
{
- activity->instance = (void*)this;
- activity->callbacks->onStart = onStartCallback;
- activity->callbacks->onResume = onResumeCallback;
- activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
- activity->callbacks->onPause = onPauseCallback;
- activity->callbacks->onStop = onStopCallback;
- activity->callbacks->onDestroy = onDestroyCallback;
- activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
- activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
- activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
- activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
- activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
- activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
- activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
- activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
- activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
- activity->callbacks->onLowMemory = onLowMemoryCallback;
+ if (activity) {
+ activity->instance = (void*)this;
+ activity->callbacks->onStart = onStartCallback;
+ activity->callbacks->onResume = onResumeCallback;
+ activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
+ activity->callbacks->onPause = onPauseCallback;
+ activity->callbacks->onStop = onStopCallback;
+ activity->callbacks->onDestroy = onDestroyCallback;
+ activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
+ activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
+ activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
+ activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
+ activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
+ activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
+ activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
+ activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
+ activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
+ activity->callbacks->onLowMemory = onLowMemoryCallback;
+ }
}
NativeActivity::~NativeActivity (void)
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index b8a35898c..cf02e6b70 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -22,6 +22,7 @@
*//*--------------------------------------------------------------------*/
#include "tcuAndroidPlatform.hpp"
+#include "tcuAndroidNativeActivity.hpp"
#include "tcuAndroidUtil.hpp"
#include "gluRenderContext.hpp"
#include "egluNativeDisplay.hpp"
@@ -170,7 +171,7 @@ eglu::NativeWindow* NativeWindowFactory::createWindow (const eglu::WindowParams&
Window* window = m_windowRegistry.tryAcquireWindow();
if (!window)
- throw ResourceError("Native window is not available", DE_NULL, __FILE__, __LINE__);
+ throw NotSupportedError("Native window is not available", DE_NULL, __FILE__, __LINE__);
return new NativeWindow(window, params.width, params.height, format);
}
@@ -292,6 +293,9 @@ static size_t getTotalSystemMemory (ANativeActivity* activity)
try
{
+ if (!activity)
+ throw tcu::InternalError("No activity (running from command line?");
+
const size_t totalMemory = getTotalAndroidSystemMemory(activity);
print("Device has %.2f MiB of system memory\n", static_cast<double>(totalMemory) / static_cast<double>(MiB));
return totalMemory;
@@ -388,3 +392,9 @@ bool Platform::hasDisplay (vk::wsi::Type wsiType) const
} // Android
} // tcu
+
+tcu::Platform* createPlatform (void)
+{
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+}
--
2.42.0

View File

@@ -0,0 +1,182 @@
From dc97ee83a813f6b170079ddf2a04bbb06221a5a7 Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Fri, 26 Aug 2022 18:24:27 +0200
Subject: [PATCH 1/2] Allow running on Android from the command line
For testing the Android EGL platform without having to go via the
Android activity manager, build deqp-egl.
Tests that render to native windows are unsupported, as command line
programs cannot create windows on Android.
$ cmake -S . -B build/ -DDEQP_TARGET=android -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror -DANDROID_NDK_PATH=./android-ndk-r21d -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28 -DGLCTS_GTF_TARGET=gles32 -G Ninja
$ ninja -C build modules/egl/deqp-egl
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---
CMakeLists.txt | 38 ++-----------------
.../android/tcuAndroidNativeActivity.cpp | 36 +++++++++---------
.../platform/android/tcuAndroidPlatform.cpp | 12 +++++-
3 files changed, 34 insertions(+), 52 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb58cc7ba..98b8fc6cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -272,7 +272,7 @@ include_directories(
external/vulkancts/framework/vulkan
)
-if (DE_OS_IS_ANDROID OR DE_OS_IS_IOS)
+if (DE_OS_IS_IOS)
# On Android deqp modules are compiled as libraries and linked into final .so
set(DEQP_MODULE_LIBRARIES )
set(DEQP_MODULE_ENTRY_POINTS )
@@ -316,7 +316,7 @@ macro (add_deqp_module MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
set(DEQP_MODULE_LIBRARIES ${DEQP_MODULE_LIBRARIES} PARENT_SCOPE)
set(DEQP_MODULE_ENTRY_POINTS ${DEQP_MODULE_ENTRY_POINTS} PARENT_SCOPE)
- if (NOT DE_OS_IS_ANDROID AND NOT DE_OS_IS_IOS)
+ if (NOT DE_OS_IS_IOS)
# Executable target
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
@@ -338,7 +338,7 @@ macro (add_deqp_module_skip_android MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
add_library("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" STATIC ${SRCS})
target_link_libraries("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" ${LIBS})
- if (NOT DE_OS_IS_ANDROID AND NOT DE_OS_IS_IOS)
+ if (NOT DE_OS_IS_IOS)
# Executable target
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
@@ -390,37 +390,7 @@ add_subdirectory(external/vulkancts/vkscpc ${MAYBE_EXCLUDE_FROM_ALL})
add_subdirectory(external/openglcts ${MAYBE_EXCLUDE_FROM_ALL})
# Single-binary targets
-if (DE_OS_IS_ANDROID)
- include_directories(executor)
- include_directories(${PROJECT_BINARY_DIR}/external/vulkancts/framework/vulkan)
-
- set(DEQP_SRCS
- framework/platform/android/tcuAndroidMain.cpp
- framework/platform/android/tcuAndroidJNI.cpp
- framework/platform/android/tcuAndroidPlatformCapabilityQueryJNI.cpp
- framework/platform/android/tcuTestLogParserJNI.cpp
- ${DEQP_MODULE_ENTRY_POINTS}
- )
-
- set(DEQP_LIBS
- tcutil-platform
- xecore
- ${DEQP_MODULE_LIBRARIES}
- )
-
- add_library(deqp SHARED ${DEQP_SRCS})
- target_link_libraries(deqp ${DEQP_LIBS})
-
- # Separate out the debug information because it's enormous
- add_custom_command(TARGET deqp POST_BUILD
- COMMAND ${CMAKE_STRIP} --only-keep-debug -o $<TARGET_FILE:deqp>.debug $<TARGET_FILE:deqp>
- COMMAND ${CMAKE_STRIP} -g $<TARGET_FILE:deqp>)
-
- # Needed by OpenGL CTS that defines its own activity but depends on
- # common Android support code.
- target_include_directories(deqp PRIVATE framework/platform/android)
-
-elseif (DE_OS_IS_IOS)
+if (DE_OS_IS_IOS)
# Code sign identity
set(DEQP_IOS_CODE_SIGN_IDENTITY "drawElements" CACHE STRING "Code sign identity for iOS build")
diff --git a/framework/platform/android/tcuAndroidNativeActivity.cpp b/framework/platform/android/tcuAndroidNativeActivity.cpp
index 6f8cd8fc5..b83e30f41 100644
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
@@ -116,23 +116,25 @@ namespace Android
NativeActivity::NativeActivity (ANativeActivity* activity)
: m_activity(activity)
{
- activity->instance = (void*)this;
- activity->callbacks->onStart = onStartCallback;
- activity->callbacks->onResume = onResumeCallback;
- activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
- activity->callbacks->onPause = onPauseCallback;
- activity->callbacks->onStop = onStopCallback;
- activity->callbacks->onDestroy = onDestroyCallback;
- activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
- activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
- activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
- activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
- activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
- activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
- activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
- activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
- activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
- activity->callbacks->onLowMemory = onLowMemoryCallback;
+ if (activity) {
+ activity->instance = (void*)this;
+ activity->callbacks->onStart = onStartCallback;
+ activity->callbacks->onResume = onResumeCallback;
+ activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
+ activity->callbacks->onPause = onPauseCallback;
+ activity->callbacks->onStop = onStopCallback;
+ activity->callbacks->onDestroy = onDestroyCallback;
+ activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
+ activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
+ activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
+ activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
+ activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
+ activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
+ activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
+ activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
+ activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
+ activity->callbacks->onLowMemory = onLowMemoryCallback;
+ }
}
NativeActivity::~NativeActivity (void)
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index b8a35898c..cf02e6b70 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -22,6 +22,7 @@
*//*--------------------------------------------------------------------*/
#include "tcuAndroidPlatform.hpp"
+#include "tcuAndroidNativeActivity.hpp"
#include "tcuAndroidUtil.hpp"
#include "gluRenderContext.hpp"
#include "egluNativeDisplay.hpp"
@@ -170,7 +171,7 @@ eglu::NativeWindow* NativeWindowFactory::createWindow (const eglu::WindowParams&
Window* window = m_windowRegistry.tryAcquireWindow();
if (!window)
- throw ResourceError("Native window is not available", DE_NULL, __FILE__, __LINE__);
+ throw NotSupportedError("Native window is not available", DE_NULL, __FILE__, __LINE__);
return new NativeWindow(window, params.width, params.height, format);
}
@@ -292,6 +293,9 @@ static size_t getTotalSystemMemory (ANativeActivity* activity)
try
{
+ if (!activity)
+ throw tcu::InternalError("No activity (running from command line?");
+
const size_t totalMemory = getTotalAndroidSystemMemory(activity);
print("Device has %.2f MiB of system memory\n", static_cast<double>(totalMemory) / static_cast<double>(MiB));
return totalMemory;
@@ -388,3 +392,9 @@ bool Platform::hasDisplay (vk::wsi::Type wsiType) const
} // Android
} // tcu
+
+tcu::Platform* createPlatform (void)
+{
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+}
--
2.42.0

View File

@@ -0,0 +1,26 @@
From a602822c53e22e985f942f843ccadbfb64613212 Mon Sep 17 00:00:00 2001
From: Helen Koike <helen.koike@collabora.com>
Date: Tue, 27 Sep 2022 12:35:22 -0300
Subject: [PATCH 2/2] Android prints to stdout instead of logcat
Signed-off-by: Helen Koike <helen.koike@collabora.com>
---
framework/qphelper/qpDebugOut.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/framework/qphelper/qpDebugOut.c b/framework/qphelper/qpDebugOut.c
index 6579e9f48..c200c6f6b 100644
--- a/framework/qphelper/qpDebugOut.c
+++ b/framework/qphelper/qpDebugOut.c
@@ -98,7 +98,7 @@ void qpDiev (const char* format, va_list args)
}
/* print() implementation. */
-#if (DE_OS == DE_OS_ANDROID)
+#if (0)
#include <android/log.h>
--
2.42.0

View File

@@ -0,0 +1,26 @@
From a602822c53e22e985f942f843ccadbfb64613212 Mon Sep 17 00:00:00 2001
From: Helen Koike <helen.koike@collabora.com>
Date: Tue, 27 Sep 2022 12:35:22 -0300
Subject: [PATCH 2/2] Android prints to stdout instead of logcat
Signed-off-by: Helen Koike <helen.koike@collabora.com>
---
framework/qphelper/qpDebugOut.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/framework/qphelper/qpDebugOut.c b/framework/qphelper/qpDebugOut.c
index 6579e9f48..c200c6f6b 100644
--- a/framework/qphelper/qpDebugOut.c
+++ b/framework/qphelper/qpDebugOut.c
@@ -98,7 +98,7 @@ void qpDiev (const char* format, va_list args)
}
/* print() implementation. */
-#if (DE_OS == DE_OS_ANDROID)
+#if (0)
#include <android/log.h>
--
2.42.0

View File

@@ -96,7 +96,7 @@ set +e -x
NIR_DEBUG="novalidate" \
LIBGL_ALWAYS_SOFTWARE=${CROSVM_LIBGL_ALWAYS_SOFTWARE} \
GALLIUM_DRIVER=${CROSVM_GALLIUM_DRIVER} \
VK_ICD_FILENAMES=$CI_PROJECT_DIR/install/share/vulkan/icd.d/${CROSVM_VK_DRIVER}_icd.x86_64.json \
VK_DRIVER_FILES=$CI_PROJECT_DIR/install/share/vulkan/icd.d/${CROSVM_VK_DRIVER}_icd.x86_64.json \
crosvm --no-syslog run \
--gpu "${CROSVM_GPU_ARGS}" --gpu-render-server "path=/usr/local/libexec/virgl_render_server" \
-m "${CROSVM_MEMORY:-4096}" -c "${CROSVM_CPU:-2}" --disable-sandbox \

View File

@@ -48,7 +48,7 @@ $ADB shell setenforce 0
# deqp
$ADB push /deqp/modules/egl/deqp-egl-android /data/.
$ADB push /deqp/assets/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-master.txt /data/.
$ADB push /deqp/assets/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-main.txt /data/
$ADB push /deqp-runner/deqp-runner /data/.
# download Android Mesa from S3

View File

@@ -18,7 +18,7 @@ INSTALL=$(realpath -s "$PWD"/install)
# Set up the driver environment.
export LD_LIBRARY_PATH="$INSTALL"/lib/:$LD_LIBRARY_PATH
export EGL_PLATFORM=surfaceless
export VK_ICD_FILENAMES="$PWD"/install/share/vulkan/icd.d/"$VK_DRIVER"_icd.${VK_CPU:-$(uname -m)}.json
export VK_DRIVER_FILES="$PWD"/install/share/vulkan/icd.d/"$VK_DRIVER"_icd.${VK_CPU:-$(uname -m)}.json
export OCL_ICD_VENDORS="$PWD"/install/etc/OpenCL/vendors/
if [ -n "$USE_ANGLE" ]; then
@@ -46,7 +46,6 @@ if [ -z "$DEQP_SUITE" ]; then
DEQP_WIDTH=${DEQP_WIDTH:-256}
DEQP_HEIGHT=${DEQP_HEIGHT:-256}
DEQP_CONFIG=${DEQP_CONFIG:-rgba8888d24s8ms0}
DEQP_VARIANT=${DEQP_VARIANT:-master}
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-width=$DEQP_WIDTH --deqp-surface-height=$DEQP_HEIGHT"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-type=${DEQP_SURFACE_TYPE:-pbuffer}"
@@ -60,16 +59,16 @@ if [ -z "$DEQP_SUITE" ]; then
# Generate test case list file.
if [ "$DEQP_VER" = "vk" ]; then
MUSTPASS=/deqp/mustpass/vk-$DEQP_VARIANT.txt
MUSTPASS=/deqp/mustpass/vk-main.txt
DEQP=/deqp/external/vulkancts/modules/vulkan/deqp-vk
elif [ "$DEQP_VER" = "gles2" ] || [ "$DEQP_VER" = "gles3" ] || [ "$DEQP_VER" = "gles31" ] || [ "$DEQP_VER" = "egl" ]; then
MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt
DEQP=/deqp/modules/$DEQP_VER/deqp-$DEQP_VER
elif [ "$DEQP_VER" = "gles2-khr" ] || [ "$DEQP_VER" = "gles3-khr" ] || [ "$DEQP_VER" = "gles31-khr" ] || [ "$DEQP_VER" = "gles32-khr" ]; then
MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt
DEQP=/deqp/external/openglcts/modules/glcts
else
MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt
DEQP=/deqp/external/openglcts/modules/glcts
fi
@@ -169,7 +168,13 @@ fi
uncollapsed_section_switch deqp "deqp: deqp-runner"
cat /deqp/version-log
# Print the detailed version with the list of backports and local patches
for api in vk gl gles; do
deqp_version_log=/deqp/version-$api
if [ -r "$deqp_version_log" ]; then
cat "$deqp_version_log"
fi
done
set +e
if [ -z "$DEQP_SUITE" ]; then

View File

@@ -237,6 +237,25 @@
when: never
- !reference [.freedreno-farm-rules, rules]
.vmware-farm-rules:
rules:
- exists: [ .ci-farms-disabled/vmware ]
when: never
- changes: [ .ci-farms-disabled/vmware ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: on_success
- changes: [ .ci-farms-disabled/* ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
.vmware-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/vmware ]
when: never
- changes: [ .ci-farms-disabled/vmware ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- !reference [.vmware-farm-rules, rules]
.ondracka-farm-rules:
rules:
@@ -311,6 +330,10 @@
changes: [ .ci-farms-disabled/ondracka ]
exists: [ .ci-farms-disabled/ondracka ]
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/vmware ]
exists: [ .ci-farms-disabled/vmware ]
when: never
# Any other change to ci-farms/* means some farm is getting re-enabled.
# Run jobs in Marge pipelines (and let it fallback to manual otherwise)
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $GITLAB_USER_LOGIN == "marge-bot"'

View File

@@ -11,7 +11,7 @@ INSTALL=$PWD/install
# Set up the driver environment.
export LD_LIBRARY_PATH="$INSTALL/lib/"
export VK_ICD_FILENAMES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json"
export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json"
# To store Fossilize logs on failure.
RESULTS="$PWD/results"

View File

@@ -1,16 +1,22 @@
# Keep the tags below under 25-30 chars each, as they end up combined into
# Keep the tags below under 20 chars each, as they end up combined into
# docker image tags, and docker has a length limit of 128 chars total in tags.
#
# The word after the date doesn't need to be overly descriptive, it exists
# purely to avoid the risk of two people updating an image tag on the same day
# while working on different changes, so it doesn't matter whether that word
# will make sense to someone else. Aim for "nobody else will pick that word
# for their change".
#
# If you update a tag and you get an error like this:
# cannot parse input: "$image:$tag": invalid reference format
# check the length of $tag; if it's > 128 chars you need to shorten your tag.
variables:
DEBIAN_X86_64_BUILD_BASE_IMAGE: "debian/x86_64_build-base"
DEBIAN_BASE_TAG: "2024-01-10-deb-fix"
DEBIAN_BASE_TAG: "20240412-pycparser"
DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
DEBIAN_BUILD_TAG: "2024-01-04-find"
DEBIAN_BUILD_TAG: "20240408-cbindgen"
DEBIAN_X86_64_TEST_BASE_IMAGE: "debian/x86_64_test-base"
@@ -18,23 +24,23 @@ variables:
DEBIAN_X86_64_TEST_IMAGE_VK_PATH: "debian/x86_64_test-vk"
DEBIAN_X86_64_TEST_ANDROID_IMAGE_PATH: "debian/x86_64_test-android"
DEBIAN_X86_64_TEST_ANDROID_TAG: "2024-01-04-default"
DEBIAN_X86_64_TEST_GL_TAG: "2024-01-04-default"
DEBIAN_X86_64_TEST_VK_TAG: "2024-01-04-default"
DEBIAN_X86_64_TEST_ANDROID_TAG: "20240423-deqp"
DEBIAN_X86_64_TEST_GL_TAG: "20240423-deqp"
DEBIAN_X86_64_TEST_VK_TAG: "20240423-deqp"
KERNEL_ROOTFS_TAG: "20240423-deqp"
ALPINE_X86_64_BUILD_TAG: "2023-01-07-libdrm2_4_119"
ALPINE_X86_64_LAVA_SSH_TAG: "2023-06-26-first-version"
FEDORA_X86_64_BUILD_TAG: "2024-01-06-libdrm"
KERNEL_ROOTFS_TAG: "2024-01-10-default"
KERNEL_TAG: "v6.6.4-for-mesa-ci-e4f4c500f7fb"
ALPINE_X86_64_BUILD_TAG: "20240412-pycparser"
ALPINE_X86_64_LAVA_SSH_TAG: "20240401-wlproto"
FEDORA_X86_64_BUILD_TAG: "20240412-pycparser"
KERNEL_TAG: "v6.6.21-mesa-19fc"
KERNEL_REPO: "gfx-ci/linux"
PKG_REPO_REV: "67f2c46b"
PKG_REPO_REV: "3cc12a2a"
WINDOWS_X64_MSVC_PATH: "windows/x86_64_msvc"
WINDOWS_X64_MSVC_TAG: "2023-12-22-msvc"
WINDOWS_X64_MSVC_TAG: "20231222-msvc"
WINDOWS_X64_BUILD_PATH: "windows/x86_64_build"
WINDOWS_X64_BUILD_TAG: "2023-12-22-msvc"
WINDOWS_X64_BUILD_TAG: "20240405-vainfo-ci-1"
WINDOWS_X64_TEST_PATH: "windows/x86_64_test"
WINDOWS_X64_TEST_TAG: "2023-12-22-msvc"
WINDOWS_X64_TEST_TAG: "20240405-vainfo-ci-1"

View File

@@ -5,24 +5,36 @@ class MesaCIException(Exception):
pass
class MesaCITimeoutError(MesaCIException):
class MesaCIRetriableException(MesaCIException):
pass
class MesaCITimeoutError(MesaCIRetriableException):
def __init__(self, *args, timeout_duration: timedelta) -> None:
super().__init__(*args)
self.timeout_duration = timeout_duration
class MesaCIRetryError(MesaCIException):
class MesaCIRetryError(MesaCIRetriableException):
def __init__(self, *args, retry_count: int, last_job: None) -> None:
super().__init__(*args)
self.retry_count = retry_count
self.last_job = last_job
class MesaCIParseException(MesaCIException):
class MesaCIFatalException(MesaCIException):
"""Exception raised when the Mesa CI script encounters a fatal error that
prevents the script from continuing."""
def __init__(self, *args) -> None:
super().__init__(*args)
class MesaCIParseException(MesaCIRetriableException):
pass
class MesaCIKnownIssueException(MesaCIException):
class MesaCIKnownIssueException(MesaCIRetriableException):
"""Exception raised when the Mesa CI script finds something in the logs that
is known to cause the LAVA job to eventually fail"""

View File

@@ -16,7 +16,7 @@ import sys
import time
from collections import defaultdict
from dataclasses import dataclass, fields
from datetime import datetime, timedelta
from datetime import datetime, timedelta, timezone
from os import environ, getenv, path
from typing import Any, Optional
@@ -25,6 +25,8 @@ from lavacli.utils import flow_yaml as lava_yaml
from lava.exceptions import (
MesaCIException,
MesaCIFatalException,
MesaCIRetriableException,
MesaCIParseException,
MesaCIRetryError,
MesaCITimeoutError,
@@ -58,7 +60,7 @@ except ImportError as e:
# Timeout in seconds to decide if the device from the dispatched LAVA job has
# hung or not due to the lack of new log output.
DEVICE_HANGING_TIMEOUT_SEC = int(getenv("DEVICE_HANGING_TIMEOUT_SEC", 5*60))
DEVICE_HANGING_TIMEOUT_SEC = int(getenv("DEVICE_HANGING_TIMEOUT_SEC", 5 * 60))
# How many seconds the script should wait before try a new polling iteration to
# check if the dispatched LAVA job is running or waiting in the job queue.
@@ -81,18 +83,29 @@ NUMBER_OF_RETRIES_TIMEOUT_DETECTION = int(
getenv("LAVA_NUMBER_OF_RETRIES_TIMEOUT_DETECTION", 2)
)
CI_JOB_TIMEOUT_SEC = int(getenv("CI_JOB_TIMEOUT", 3600))
# How many seconds the script will wait to let LAVA run the job and give the final details.
EXPECTED_JOB_DURATION_SEC = int(getenv("EXPECTED_JOB_DURATION_SEC", 60 * 10))
# CI_JOB_STARTED is given by GitLab CI/CD in UTC timezone by default.
CI_JOB_STARTED_AT_RAW = getenv("CI_JOB_STARTED_AT", "")
CI_JOB_STARTED_AT: datetime = (
datetime.fromisoformat(CI_JOB_STARTED_AT_RAW)
if CI_JOB_STARTED_AT_RAW
else datetime.now(timezone.utc)
)
def raise_exception_from_metadata(metadata: dict, job_id: int) -> None:
"""
Investigate infrastructure errors from the job metadata.
If it finds an error, raise it as MesaCIException.
If it finds an error, raise it as MesaCIRetriableException.
"""
if "result" not in metadata or metadata["result"] != "fail":
return
if "error_type" in metadata:
error_type = metadata["error_type"]
if error_type == "Infrastructure":
raise MesaCIException(
raise MesaCIRetriableException(
f"LAVA job {job_id} failed with Infrastructure Error. Retry."
)
if error_type == "Job":
@@ -100,12 +113,12 @@ def raise_exception_from_metadata(metadata: dict, job_id: int) -> None:
# with mal-formed job definitions. As we are always validating the
# jobs, only the former is probable to happen. E.g.: When some LAVA
# action timed out more times than expected in job definition.
raise MesaCIException(
raise MesaCIRetriableException(
f"LAVA job {job_id} failed with JobError "
"(possible LAVA timeout misconfiguration/bug). Retry."
)
if "case" in metadata and metadata["case"] == "validate":
raise MesaCIException(
raise MesaCIRetriableException(
f"LAVA job {job_id} failed validation (possible download error). Retry."
)
@@ -182,7 +195,6 @@ def is_job_hanging(job, max_idle_time):
def parse_log_lines(job, log_follower, new_log_lines):
if log_follower.feed(new_log_lines):
# If we had non-empty log data, we can assure that the device is alive.
job.heartbeat()
@@ -200,7 +212,6 @@ def parse_log_lines(job, log_follower, new_log_lines):
def fetch_new_log_lines(job):
# The XMLRPC binary packet may be corrupted, causing a YAML scanner error.
# Retry the log fetching several times before exposing the error.
for _ in range(5):
@@ -216,14 +227,28 @@ def submit_job(job):
try:
job.submit()
except Exception as mesa_ci_err:
raise MesaCIException(
raise MesaCIRetriableException(
f"Could not submit LAVA job. Reason: {mesa_ci_err}"
) from mesa_ci_err
def wait_for_job_get_started(job):
def wait_for_job_get_started(job, attempt_no):
print_log(f"Waiting for job {job.job_id} to start.")
while not job.is_started():
current_job_duration_sec: int = int(
(datetime.now(timezone.utc) - CI_JOB_STARTED_AT).total_seconds()
)
remaining_time_sec: int = max(0, CI_JOB_TIMEOUT_SEC - current_job_duration_sec)
if remaining_time_sec < EXPECTED_JOB_DURATION_SEC:
job.cancel()
raise MesaCIFatalException(
f"{CONSOLE_LOG['BOLD']}"
f"{CONSOLE_LOG['FG_YELLOW']}"
f"Job {job.job_id} only has {remaining_time_sec} seconds "
"remaining to run, but it is expected to take at least "
f"{EXPECTED_JOB_DURATION_SEC} seconds."
f"{CONSOLE_LOG['RESET']}",
)
time.sleep(WAIT_FOR_DEVICE_POLLING_TIME_SEC)
job.refresh_log()
print_log(f"Job {job.job_id} started.")
@@ -299,7 +324,7 @@ def execute_job_with_retries(
try:
job_log["submitter_start_time"] = datetime.now().isoformat()
submit_job(job)
wait_for_job_get_started(job)
wait_for_job_get_started(job, attempt_no)
log_follower: LogFollower = bootstrap_log_follower()
follow_job_execution(job, log_follower)
return job
@@ -318,6 +343,8 @@ def execute_job_with_retries(
f"Finished executing LAVA job in the attempt #{attempt_no}"
f"{CONSOLE_LOG['RESET']}"
)
if job.exception and not isinstance(job.exception, MesaCIRetriableException):
break
return last_failed_job
@@ -471,8 +498,9 @@ class LAVAJobSubmitter(PathResolver):
if not last_attempt_job:
# No job was run, something bad happened
STRUCTURAL_LOG["job_combined_status"] = "script_crash"
current_exception = str(sys.exc_info()[0])
current_exception = str(sys.exc_info()[1])
STRUCTURAL_LOG["job_combined_fail_reason"] = current_exception
print(f"Interrupting the script. Reason: {current_exception}")
raise SystemExit(1)
STRUCTURAL_LOG["job_combined_status"] = last_attempt_job.status
@@ -509,7 +537,6 @@ class StructuredLoggerWrapper:
def logger_context(self):
context = contextlib.nullcontext()
try:
global STRUCTURAL_LOG
STRUCTURAL_LOG = StructuredLogger(
self.__submitter.structured_log_file, truncate=True

View File

@@ -12,3 +12,14 @@ JOB_PRIORITY = int(getenv("JOB_PRIORITY", 75))
# Use UART over the default SSH mechanism to follow logs.
# Caution: this can lead to device silence in some devices in Mesa CI.
FORCE_UART = bool(getenv("LAVA_FORCE_UART", False))
# How many times the r8152 error may happen to consider it a known issue.
KNOWN_ISSUE_R8152_MAX_CONSECUTIVE_COUNTER: int = 10
KNOWN_ISSUE_R8152_PATTERNS: tuple[str, ...] = (
r"r8152 \S+ eth0: Tx status -71",
r"nfs: server \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} not responding, still trying",
)
# This is considered noise, since LAVA produces this log after receiving a package of feedback
# messages.
LOG_DEBUG_FEEDBACK_NOISE = "Listened to connection for namespace 'dut' done"

View File

@@ -6,6 +6,7 @@ from typing import Any, Optional
from lava.exceptions import (
MesaCIException,
MesaCIRetriableException,
MesaCIKnownIssueException,
MesaCIParseException,
MesaCITimeoutError,
@@ -34,7 +35,7 @@ class LAVAJob:
self._is_finished = False
self.log: dict[str, Any] = log
self.status = "not_submitted"
self.__exception: Optional[str] = None
self.__exception: Optional[Exception] = None
def heartbeat(self) -> None:
self.last_log_time: datetime = datetime.now()
@@ -63,13 +64,13 @@ class LAVAJob:
return self._is_finished
@property
def exception(self) -> str:
def exception(self) -> Optional[Exception]:
return self.__exception
@exception.setter
def exception(self, exception: Exception) -> None:
self.__exception = repr(exception)
self.log["dut_job_fail_reason"] = self.__exception
self.__exception = exception
self.log["dut_job_fail_reason"] = repr(self.__exception)
def validate(self) -> Optional[dict]:
"""Returns a dict with errors, if the validation fails.
@@ -176,11 +177,15 @@ class LAVAJob:
self.status = "canceled"
elif isinstance(exception, MesaCITimeoutError):
self.status = "hung"
elif isinstance(exception, MesaCIException):
elif isinstance(exception, MesaCIRetriableException):
self.status = "failed"
elif isinstance(exception, KeyboardInterrupt):
self.status = "interrupted"
print_log("LAVA job submitter was interrupted. Cancelling the job.")
raise
elif isinstance(exception, MesaCIException):
self.status = "interrupted"
print_log("LAVA job submitter was interrupted. Cancelling the job.")
raise
else:
self.status = "job_submitter_error"

View File

@@ -15,6 +15,8 @@ from lava.utils.uart_job_definition import (
fastboot_deploy_actions,
tftp_boot_action,
tftp_deploy_actions,
qemu_boot_action,
qemu_deploy_actions,
uart_test_actions,
)
@@ -71,6 +73,9 @@ class LAVAJobDefinition:
if args.boot_method == "fastboot":
deploy_actions = fastboot_deploy_actions(self, nfsrootfs)
boot_action = fastboot_boot_action(args)
elif args.boot_method == "qemu-nfs":
deploy_actions = qemu_deploy_actions(self, nfsrootfs)
boot_action = qemu_boot_action(args)
else: # tftp
deploy_actions = tftp_deploy_actions(self, nfsrootfs)
boot_action = tftp_boot_action(args)
@@ -142,6 +147,10 @@ class LAVAJobDefinition:
if self.job_submitter.lava_tags:
values["tags"] = self.job_submitter.lava_tags.split(",")
# QEMU lava jobs mandate proper arch value in the context
if self.job_submitter.boot_method == "qemu-nfs":
values["context"]["arch"] = self.job_submitter.mesa_job_name.split(":")[1]
return values
def attach_kernel_and_dtb(self, deploy_field):
@@ -203,7 +212,13 @@ class LAVAJobDefinition:
# - exec .gitlab-ci/common/init-stage2.sh
with open(self.job_submitter.first_stage_init, "r") as init_sh:
run_steps += [x.rstrip() for x in init_sh if not x.startswith("#") and x.rstrip()]
# For vmware farm, patch nameserver as 8.8.8.8 is off limit.
# This is temporary and will be reverted once the farm is moved.
if self.job_submitter.mesa_job_name.startswith("vmware-"):
run_steps += [x.rstrip().replace("nameserver 8.8.8.8", "nameserver 10.25.198.110") for x in init_sh if not x.startswith("#") and x.rstrip()]
else:
run_steps += [x.rstrip() for x in init_sh if not x.startswith("#") and x.rstrip()]
# We cannot distribute the Adreno 660 shader firmware inside rootfs,
# since the license isn't bundled inside the repository
if self.job_submitter.device_type == "sm8350-hdk":

View File

@@ -2,42 +2,78 @@ from __future__ import annotations
import re
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, Sequence
if TYPE_CHECKING:
from lava.utils import LogFollower
from lava.exceptions import MesaCIKnownIssueException
from lava.utils.console_format import CONSOLE_LOG
from lava.utils.constants import (
KNOWN_ISSUE_R8152_MAX_CONSECUTIVE_COUNTER,
LOG_DEBUG_FEEDBACK_NOISE,
KNOWN_ISSUE_R8152_PATTERNS,
)
from lava.utils.log_section import LogSectionType
def search_known_issue_patterns(patterns: Sequence[str], line: str) -> str:
for pattern in patterns:
if re.search(pattern, line):
return pattern
return ""
@dataclass
class LAVALogHints:
log_follower: LogFollower
has_r8152_issue_history: bool = field(default=False, init=False)
r8152_issue_consecutive_counter: int = field(default=0, init=False)
reboot_counter: int = field(default=0, init=False)
def raise_known_issue(self, message) -> None:
raise MesaCIKnownIssueException(
"Found known issue: "
f"{CONSOLE_LOG['FG_MAGENTA']}"
f"{message}"
f"{CONSOLE_LOG['RESET']}"
)
def detect_failure(self, new_lines: list[dict[str, Any]]):
for line in new_lines:
if line["msg"] == LOG_DEBUG_FEEDBACK_NOISE:
continue
self.detect_r8152_issue(line)
self.detect_forced_reboot(line)
def detect_r8152_issue(self, line):
if (
self.log_follower.phase == LogSectionType.TEST_CASE
and line["lvl"] == "target"
):
if re.search(r"r8152 \S+ eth0: Tx status -71", line["msg"]):
self.has_r8152_issue_history = True
return
if self.log_follower.phase in (
LogSectionType.LAVA_BOOT,
LogSectionType.TEST_CASE,
) and line["lvl"] in ("feedback", "target"):
if search_known_issue_patterns(KNOWN_ISSUE_R8152_PATTERNS, line["msg"]):
if (
self.r8152_issue_consecutive_counter
< KNOWN_ISSUE_R8152_MAX_CONSECUTIVE_COUNTER
):
self.r8152_issue_consecutive_counter += 1
return
if self.has_r8152_issue_history and re.search(
r"nfs: server \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} not responding, still trying",
line["msg"],
):
raise MesaCIKnownIssueException(
f"{CONSOLE_LOG['FG_MAGENTA']}"
self.raise_known_issue(
"Probable network issue failure encountered, retrying the job"
f"{CONSOLE_LOG['RESET']}"
)
self.has_r8152_issue_history = False
# Reset the status, as the `nfs... still trying` complaint was not detected
self.r8152_issue_consecutive_counter = 0
def detect_forced_reboot(self, line: dict[str, Any]) -> None:
if (
self.log_follower.phase == LogSectionType.TEST_CASE
and line["lvl"] == "feedback"
):
if re.search(r"^Reboot requested", line["msg"]):
self.reboot_counter += 1
if self.reboot_counter > 0:
self.raise_known_issue(
"Forced reboot detected during test phase, failing the job..."
)

View File

@@ -187,6 +187,25 @@ class LogFollower:
return False
def ignore_dut_feedback_lines(self, line: dict[str, str]) -> bool:
"""
Ignores feedback lines from LAVA.
If we only receive this level of message for some time, it means that the job is
misbehaving. E.g Rebooting.
Args:
line: A dictionary representing a single log line.
Returns:
A boolean indicating whether the current line is a feedback line.
"""
if line["lvl"] == "feedback" and line["ns"] == "dut":
return True
if line["lvl"] == "debug":
# This message happens after LAVA end receiving the feedback from the DUT
if line["msg"] == "Listened to connection for namespace 'dut' done":
return True
return False
def feed(self, new_lines: list[dict[str, str]]) -> bool:
"""Input data to be processed by LogFollower instance
@@ -207,6 +226,9 @@ class LogFollower:
if self.merge_carriage_return_lines(line):
continue
if self.ignore_dut_feedback_lines(line):
continue
# At least we are fed with a non-kernel dump log, it seems that the
# job is progressing
is_job_healthy = True

View File

@@ -82,6 +82,24 @@ def tftp_deploy_actions(job_definition: "LAVAJobDefinition", nfsrootfs) -> tuple
return (tftp_deploy,)
def qemu_deploy_actions(job_definition: "LAVAJobDefinition", nfsrootfs) -> tuple[dict[str, Any]]:
args = job_definition.job_submitter
qemu_deploy = {
"timeout": {"minutes": 5},
"to": "nfs",
"images": {
"kernel": {
"image_arg": "-kernel {kernel}",
"url": f"{args.kernel_url_prefix}/{args.kernel_image_name}",
},
"nfsrootfs": nfsrootfs,
},
}
job_definition.attach_external_modules(qemu_deploy)
return (qemu_deploy,)
def uart_test_actions(
args: "LAVAJobSubmitter", init_stage1_steps: list[str], artifact_download_steps: list[str]
) -> tuple[dict[str, Any]]:
@@ -140,6 +158,16 @@ def tftp_boot_action(args: "LAVAJobSubmitter") -> dict[str, Any]:
return tftp_boot
def qemu_boot_action(args: "LAVAJobSubmitter") -> dict[str, Any]:
qemu_boot = {
"failure_retry": NUMBER_OF_ATTEMPTS_LAVA_BOOT,
"method": args.boot_method,
"prompts": ["lava-shell:"],
}
return qemu_boot
def fastboot_boot_action(args: "LAVAJobSubmitter") -> dict[str, Any]:
fastboot_boot = {
"timeout": {"minutes": 2},

View File

@@ -2,7 +2,7 @@
# shellcheck disable=SC1003 # works for us now...
# shellcheck disable=SC2086 # we want word splitting
section_switch meson-configure "meson: configure"
section_switch meson-cross-file "meson: cross file generate"
set -e
set -o xtrace
@@ -49,6 +49,38 @@ if [ -n "$CROSS" ]; then
fi
fi
if [ -n "$HOST_BUILD_OPTIONS" ]; then
section_switch meson-host-configure "meson: host configure"
# Stash the PKG_CONFIG_LIBDIR so that we can use the base x86_64 image
# libraries.
tmp_pkg_config_libdir=$PKG_CONFIG_LIBDIR
unset PKG_CONFIG_LIBDIR
# Compile a host version for the few tools we need for a cross build (for
# now just intel-clc)
rm -rf _host_build
meson setup _host_build \
--native-file=native.file \
-D prefix=/usr \
-D libdir=lib \
${HOST_BUILD_OPTIONS}
pushd _host_build
section_switch meson-host-build "meson: host build"
meson configure
ninja
ninja install
popd
# Restore PKG_CONFIG_LIBDIR
if [ -n "$tmp_pkg_config_libdir" ]; then
export PKG_CONFIG_LIBDIR=$tmp_pkg_config_libdir
fi
fi
# Only use GNU time if available, not any shell built-in command
case $CI_JOB_NAME in
# ASAN leak detection is incompatible with strace
@@ -66,11 +98,13 @@ case $CI_JOB_NAME in
;;
esac
section_switch meson-configure "meson: configure"
rm -rf _build
meson setup _build \
--native-file=native.file \
--wrap-mode=nofallback \
--force-fallback-for perfetto,syn \
--force-fallback-for perfetto,syn,paste \
${CROSS+--cross "$CROSS_FILE"} \
-D prefix=$PWD/install \
-D libdir=lib \

View File

@@ -13,7 +13,7 @@ INSTALL="$PWD/install"
# Set up the driver environment.
export LD_LIBRARY_PATH="$INSTALL/lib/"
export EGL_PLATFORM=surfaceless
export VK_ICD_FILENAMES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.${VK_CPU:-$(uname -m)}.json"
export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.${VK_CPU:-$(uname -m)}.json"
RESULTS=$PWD/${PIGLIT_RESULTS_DIR:-results}
mkdir -p $RESULTS

View File

@@ -15,6 +15,10 @@ mkdir -p "$RESULTS"
export PIGLIT_REPLAY_DESCRIPTION_FILE="$INSTALL/$PIGLIT_TRACES_FILE"
# FIXME: guess why /usr/local/bin is not included in all runners PATH.
# Needed because yq and ci-fairy are installed there.
PATH="/usr/local/bin:$PATH"
if [ "$PIGLIT_REPLAY_SUBCOMMAND" = "profile" ]; then
yq -iY 'del(.traces[][] | select(.label[]? == "no-perf"))' \
"$PIGLIT_REPLAY_DESCRIPTION_FILE"
@@ -50,7 +54,7 @@ if [ -n "${VK_DRIVER}" ]; then
export DXVK_LOG="$RESULTS/dxvk"
[ -d "$DXVK_LOG" ] || mkdir -pv "$DXVK_LOG"
export DXVK_STATE_CACHE=0
export VK_ICD_FILENAMES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.${VK_CPU:-$(uname -m)}.json"
export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.${VK_CPU:-$(uname -m)}.json"
fi
# Sanity check to ensure that our environment is sufficient to make our tests
@@ -113,7 +117,7 @@ else
mkdir -p /tmp/.X11-unix
env \
VK_ICD_FILENAMES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$(uname -m).json" \
VK_DRIVER_FILES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$(uname -m).json" \
weston -Bheadless-backend.so --use-gl -Swayland-0 --xwayland --idle-time=0 &
while [ ! -S "$WESTON_X11_SOCK" ]; do sleep 1; done
@@ -185,6 +189,15 @@ RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $SANITY_MESA_VERSION_CMD &&
# run.
rm -rf replayer-db
# ANGLE: download compiled ANGLE runtime and the compiled restricted traces (all-in-one package)
if [ -n "$PIGLIT_REPLAY_ANGLE_TAG" ]; then
ARCH="amd64"
FILE="angle-bin-${ARCH}-${PIGLIT_REPLAY_ANGLE_TAG}.tar.zst"
ci-fairy s3cp $S3_ARGS "https://s3.freedesktop.org/mesa-tracie-private/${FILE}" "${FILE}"
mkdir -p replayer-db/angle
tar --zstd -xf ${FILE} -C replayer-db/angle/
fi
if ! eval $RUN_CMD;
then
printf "%s\n" "Found $(cat /tmp/version.txt), expected $MESA_VERSION"

View File

@@ -38,7 +38,6 @@ cp -Rp .gitlab-ci/fossilize-runner.sh install/
cp -Rp .gitlab-ci/crosvm-init.sh install/
cp -Rp .gitlab-ci/*.txt install/
cp -Rp .gitlab-ci/report-flakes.py install/
cp -Rp .gitlab-ci/valve install/
cp -Rp .gitlab-ci/vkd3d-proton install/
cp -Rp .gitlab-ci/setup-test-env.sh install/
cp -Rp .gitlab-ci/*-runner.sh install/

View File

@@ -10,7 +10,7 @@ export LD_LIBRARY_PATH=$LIBDIR
cd /usr/local/shader-db
for driver in freedreno intel v3d vc4; do
for driver in freedreno intel lima v3d vc4; do
section_start shader-db-${driver} "Running shader-db for $driver"
env LD_PRELOAD="$LIBDIR/lib${driver}_noop_drm_shim.so" \
./run -j"${FDO_CI_CONCURRENT:-4}" ./shaders \

View File

@@ -14,6 +14,14 @@ function x_off {
# TODO: implement x_on !
export JOB_START_S=$(date -u +"%s" -d "${CI_JOB_STARTED_AT:?}")
function get_current_minsec {
DATE_S=$(date -u +"%s")
CURR_TIME=$((DATE_S-JOB_START_S))
printf "%02d:%02d" $((CURR_TIME/60)) $((CURR_TIME%60))
}
function error {
x_off 2>/dev/null
RED="\e[0;31m"
@@ -21,10 +29,7 @@ function error {
# we force the following to be not in a section
section_end $CURRENT_SECTION
DATE_S=$(date -u +"%s")
JOB_START_S=$(date -u +"%s" -d "${CI_JOB_STARTED_AT:?}")
CURR_TIME=$((DATE_S-JOB_START_S))
CURR_MINSEC="$(printf "%02d" $((CURR_TIME/60))):$(printf "%02d" $((CURR_TIME%60)))"
CURR_MINSEC=$(get_current_minsec)
echo -e "\n${RED}[${CURR_MINSEC}] ERROR: $*${ENDCOLOR}\n"
[ "$state_x" -eq 0 ] || set -x
}
@@ -42,10 +47,7 @@ function build_section_start {
CYAN="\e[0;36m"
ENDCOLOR="\e[0m"
DATE_S=$(date -u +"%s")
JOB_START_S=$(date -u +"%s" -d "${CI_JOB_STARTED_AT:?}")
CURR_TIME=$((DATE_S-JOB_START_S))
CURR_MINSEC="$(printf "%02d" $((CURR_TIME/60))):$(printf "%02d" $((CURR_TIME%60)))"
CURR_MINSEC=$(get_current_minsec)
echo -e "\n\e[0Ksection_start:$(date +%s):$section_name$section_params\r\e[0K${CYAN}[${CURR_MINSEC}] $*${ENDCOLOR}\n"
}
@@ -87,6 +89,7 @@ function uncollapsed_section_switch {
}
export -f x_off
export -f get_current_minsec
export -f error
export -f trap_err
export -f build_section_start

View File

@@ -227,7 +227,10 @@
.lint-rustfmt-rules:
rules:
- !reference [.never-post-merge-rules, rules]
- !reference [.core-rules, rules]
- !reference [.no_scheduled_pipelines-rules, rules]
- changes:
- .gitlab-ci.yml
- .gitlab-ci/**/*
# in merge pipeline, formatting checks are not allowed to fail
- if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
changes: &rust_file_list
@@ -239,24 +242,12 @@
when: on_success
allow_failure: true
.lint-clang-format-rules:
# Rules for .mr-label-maker.yml
.mr-label-maker-rules:
rules:
- !reference [.never-post-merge-rules, rules]
- !reference [.core-rules, rules]
# in merge pipeline, formatting checks are not allowed to fail
- if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
changes: &clang_format_file_list
- .clang-format
- .clang-format-include
- .clang-format-ignore
- src/**/.clang-format
- src/egl/**/*
- src/amd/vulkan/**/*
- src/amd/compiler/**/*
- src/etnaviv/isa/**/*
- !reference [.no_scheduled_pipelines-rules, rules]
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- .mr-label-maker.yml
when: on_success
allow_failure: false
# in other pipelines, formatting checks are allowed to fail
- changes: *clang_format_file_list
when: on_success
allow_failure: true

View File

@@ -43,21 +43,7 @@ rustfmt:
- rustfmt --verbose src/**/lib.rs
- rustfmt --verbose src/**/main.rs
clang-format:
extends:
- .formatting-check
- .lint-clang-format-rules
variables:
LLVM_VERSION: 15
before_script:
- shopt -s globstar
# We need a meson build dir, but its config doesn't actually matter, so
# let's just use the default.
- meson setup build
- clang-format-${LLVM_VERSION} --version
- ninja -C build clang-format
.test-check:
python-test:
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
stage: code-validation
@@ -66,10 +52,6 @@ clang-format:
variables:
GIT_STRATEGY: fetch
timeout: 10m
python-test:
extends:
- .test-check
script:
- cd bin/ci
- pip install --break-system-packages -r test/requirements.txt
@@ -77,8 +59,16 @@ python-test:
rules:
- !reference [.disable-farm-mr-rules, rules]
- !reference [.never-post-merge-rules, rules]
- changes:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: on_success
- if: $GITLAB_USER_LOGIN == "marge-bot"
changes: &bin_ci_files
- .gitlab-ci.yml
- .gitlab-ci/**/*
- bin/ci/**/*
when: on_success
- changes: *bin_ci_files
when: manual
.test-gl:
extends:
@@ -185,12 +175,6 @@ python-test:
reports:
junit: results/junit.xml
.deqp-test-vk:
extends:
- .deqp-test
variables:
DEQP_VER: vk
.fossilize-test:
script:
- ./install/fossilize-runner.sh
@@ -200,11 +184,7 @@ python-test:
paths:
- results/
.baremetal-test:
extends:
- .test
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
.download_s3:
before_script:
- !reference [default, before_script]
# Use this instead of gitlab's artifacts download because it hits packet.net
@@ -216,6 +196,14 @@ python-test:
- rm -rf install
- (set -x; curl -L --retry 4 -f --retry-all-errors --retry-delay 60 ${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}.tar.zst | tar --zstd -x)
- section_end artifacts_download
.baremetal-test:
extends:
- .test
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
before_script:
- !reference [.download_s3, before_script]
variables:
BM_ROOTFS: /rootfs-${DEBIAN_ARCH}
artifacts:
@@ -417,7 +405,7 @@ python-test:
reports:
junit: results/**/junit.xml
.b2c-test-vk:
.b2c-x86_64-test-vk:
extends:
- .use-debian/x86_64_test-vk
- .b2c-test
@@ -426,7 +414,7 @@ python-test:
- debian-testing
- !reference [.required-for-hardware-jobs, needs]
.b2c-test-gl:
.b2c-x86_64-test-gl:
extends:
- .use-debian/x86_64_test-gl
- .b2c-test

View File

@@ -9,12 +9,13 @@ import os
import xmlrpc.client
from contextlib import nullcontext as does_not_raise
from datetime import datetime
from itertools import chain, repeat
from itertools import islice, repeat
from pathlib import Path
from typing import Generator
from unittest.mock import MagicMock, patch
import pytest
from lava.exceptions import MesaCIException, MesaCIRetryError
from lava.exceptions import MesaCIException, MesaCIRetryError, MesaCIFatalException
from lava.lava_job_submitter import (
DEVICE_HANGING_TIMEOUT_SEC,
NUMBER_OF_RETRIES_TIMEOUT_DETECTION,
@@ -23,6 +24,7 @@ from lava.lava_job_submitter import (
bootstrap_log_follower,
follow_job_execution,
retriable_follow_job,
wait_for_job_get_started,
)
from lava.utils import LogSectionType
@@ -82,7 +84,7 @@ def lava_job_submitter(
def test_submit_and_follow_respects_exceptions(mock_sleep, mock_proxy, exception):
with pytest.raises(MesaCIException):
proxy = mock_proxy(side_effect=exception)
job = LAVAJob(proxy, '')
job = LAVAJob(proxy, "")
log_follower = bootstrap_log_follower()
follow_job_execution(job, log_follower)
@@ -164,21 +166,13 @@ PROXY_SCENARIOS = {
mock_logs(result="pass"),
does_not_raise(),
"pass",
{
"testsuite_results": [
generate_testsuite_result(result="pass")
]
},
{"testsuite_results": [generate_testsuite_result(result="pass")]},
),
"no retries, but testsuite fails": (
mock_logs(result="fail"),
does_not_raise(),
"fail",
{
"testsuite_results": [
generate_testsuite_result(result="fail")
]
},
{"testsuite_results": [generate_testsuite_result(result="fail")]},
),
"no retries, one testsuite fails": (
generate_n_logs(n=1, tick_fn=0, result="fail"),
@@ -187,7 +181,7 @@ PROXY_SCENARIOS = {
{
"testsuite_results": [
generate_testsuite_result(result="fail"),
generate_testsuite_result(result="pass")
generate_testsuite_result(result="pass"),
]
},
),
@@ -264,6 +258,27 @@ def test_simulate_a_long_wait_to_start_a_job(
assert delta_time.total_seconds() >= wait_time
LONG_LAVA_QUEUE_SCENARIOS = {
"no_time_to_run": (0, pytest.raises(MesaCIFatalException)),
"enough_time_to_run": (9999999999, does_not_raise()),
}
@pytest.mark.parametrize(
"job_timeout, expectation",
LONG_LAVA_QUEUE_SCENARIOS.values(),
ids=LONG_LAVA_QUEUE_SCENARIOS.keys(),
)
def test_wait_for_job_get_started_no_time_to_run(monkeypatch, job_timeout, expectation):
monkeypatch.setattr("lava.lava_job_submitter.CI_JOB_TIMEOUT_SEC", job_timeout)
job = MagicMock()
# Make it escape the loop
job.is_started.side_effect = (False, False, True)
with expectation as e:
wait_for_job_get_started(job, 1)
if e:
job.cancel.assert_called_with()
CORRUPTED_LOG_SCENARIOS = {
"too much subsequent corrupted data": (
@@ -341,13 +356,15 @@ def test_full_yaml_log(mock_proxy, frozen_time, lava_job_submitter):
if not data_chunk:
return
first_log_time = data_chunk[0]["dt"]
first_log = lava_yaml.load(data_chunk[0])[0]
first_log_time = first_log["dt"]
frozen_time.move_to(first_log_time)
yield
last_log_time = data_chunk[-1]["dt"]
last_log = lava_yaml.load(data_chunk[-1])[0]
last_log_time = last_log["dt"]
frozen_time.move_to(last_log_time)
return
yield
def time_travel_to_test_time():
# Suppose that the first message timestamp of the entire LAVA job log is
@@ -357,22 +374,31 @@ def test_full_yaml_log(mock_proxy, frozen_time, lava_job_submitter):
first_log_time = lava_yaml.load(first_log)[0]["dt"]
frozen_time.move_to(first_log_time)
def load_lines() -> list:
def load_lines() -> Generator[tuple[bool, str], None, None]:
with open("/tmp/log.yaml", "r") as f:
# data = yaml.safe_load(f)
data = f.readlines()
stream = chain(data)
log_lines = f.readlines()
serial_message: str = ""
chunk_start_line = 0
chunk_end_line = 0
chunk_max_size = 100
try:
while True:
data_chunk = [next(stream) for _ in range(random.randint(0, 50))]
serial_message = "".join(data_chunk)
chunk_end_line = chunk_start_line + random.randint(1, chunk_max_size)
# split the log in chunks of random size
log_chunk = list(islice(log_lines, chunk_start_line, chunk_end_line))
chunk_start_line = chunk_end_line + 1
serial_message = "".join(log_chunk)
# time_traveller_gen will make the time trave according to the timestamp from
# the message
time_traveller_gen = time_travel_from_log_chunk(log_chunk)
# Suppose that the first message timestamp is the same of
# log fetch RPC call
time_travel_from_log_chunk(data_chunk)
next(time_traveller_gen)
yield False, "[]"
# Travel to the same datetime of the last fetched log line
# in the chunk
time_travel_from_log_chunk(data_chunk)
next(time_traveller_gen)
yield False, serial_message
except StopIteration:
yield True, serial_message
@@ -384,11 +410,20 @@ def test_full_yaml_log(mock_proxy, frozen_time, lava_job_submitter):
proxy.scheduler.jobs.logs.side_effect = load_lines()
proxy.scheduler.jobs.submit = reset_logs
with pytest.raises(MesaCIRetryError):
try:
time_travel_to_test_time()
lava_job_submitter.submit()
start_time = datetime.now()
retriable_follow_job(proxy, "")
print(lava_job_submitter.structured_log_file.read_text())
finally:
try:
# If the job fails, maybe there will be no structured log
print(lava_job_submitter.structured_log_file.read_text())
finally:
end_time = datetime.now()
print("---- Reproduction log stats ----")
print(f"Start time: {start_time}")
print(f"End time: {end_time}")
print(f"Duration: {end_time - start_time}")
@pytest.mark.parametrize(
@@ -417,9 +452,7 @@ def test_job_combined_status(
"lava.lava_job_submitter.retriable_follow_job"
) as mock_retriable_follow_job, patch(
"lava.lava_job_submitter.LAVAJobSubmitter._LAVAJobSubmitter__prepare_submission"
) as mock_prepare_submission, patch(
"sys.exit"
):
) as mock_prepare_submission, patch("sys.exit"):
from lava.lava_job_submitter import STRUCTURAL_LOG
mock_retriable_follow_job.return_value = MagicMock(status=finished_job_status)

View File

@@ -16,8 +16,15 @@ from lava.utils import (
fix_lava_gitlab_section_log,
hide_sensitive_data,
)
from lava.utils.constants import KNOWN_ISSUE_R8152_MAX_CONSECUTIVE_COUNTER
from ..lava.helpers import create_lava_yaml_msg, does_not_raise, lava_yaml, yaml_dump
from ..lava.helpers import (
create_lava_yaml_msg,
does_not_raise,
lava_yaml,
mock_lava_signal,
yaml_dump,
)
GITLAB_SECTION_SCENARIOS = {
"start collapsed": (
@@ -311,47 +318,56 @@ def test_gitlab_section_id(case_name, expected_id):
assert gl.id == expected_id
A618_NETWORK_ISSUE_LOGS = [
create_lava_yaml_msg(
msg="[ 1733.599402] r8152 2-1.3:1.0 eth0: Tx status -71", lvl="target"
),
create_lava_yaml_msg(
msg="[ 1733.604506] nfs: server 192.168.201.1 not responding, still trying",
lvl="target",
),
]
TEST_PHASE_LAVA_SIGNAL = create_lava_yaml_msg(
msg="Received signal: <STARTTC> mesa-ci_a618_vk", lvl="debug"
)
def a618_network_issue_logs(level: str = "target") -> list:
net_error = create_lava_yaml_msg(
msg="[ 1733.599402] r8152 2-1.3:1.0 eth0: Tx status -71", lvl=level)
nfs_error = create_lava_yaml_msg(
msg="[ 1733.604506] nfs: server 192.168.201.1 not responding, still trying",
lvl=level,
)
return [
*(KNOWN_ISSUE_R8152_MAX_CONSECUTIVE_COUNTER*[net_error]),
nfs_error
]
TEST_PHASE_LAVA_SIGNAL = mock_lava_signal(LogSectionType.TEST_CASE)
A618_NET_ISSUE_BOOT = a618_network_issue_logs(level="feedback")
A618_NET_ISSUE_TEST = [TEST_PHASE_LAVA_SIGNAL, *a618_network_issue_logs(level="target")]
A618_NETWORK_ISSUE_SCENARIOS = {
"Pass - R8152 kmsg during boot": (A618_NETWORK_ISSUE_LOGS, does_not_raise()),
"Fail - R8152 kmsg during boot phase": (
A618_NET_ISSUE_BOOT,
pytest.raises(MesaCIKnownIssueException),
),
"Fail - R8152 kmsg during test phase": (
[TEST_PHASE_LAVA_SIGNAL, *A618_NETWORK_ISSUE_LOGS],
A618_NET_ISSUE_TEST,
pytest.raises(MesaCIKnownIssueException),
),
"Pass - Partial (1) R8152 kmsg during test phase": (
[TEST_PHASE_LAVA_SIGNAL, A618_NETWORK_ISSUE_LOGS[0]],
A618_NET_ISSUE_TEST[:1],
does_not_raise(),
),
"Pass - Partial (2) R8152 kmsg during test phase": (
[TEST_PHASE_LAVA_SIGNAL, A618_NETWORK_ISSUE_LOGS[1]],
A618_NET_ISSUE_TEST[:2],
does_not_raise(),
),
"Pass - Partial subsequent (3) R8152 kmsg during test phase": (
"Pass - Partial (3) subsequent R8152 kmsg during test phase": (
[
TEST_PHASE_LAVA_SIGNAL,
A618_NETWORK_ISSUE_LOGS[0],
A618_NETWORK_ISSUE_LOGS[0],
A618_NET_ISSUE_TEST[1],
A618_NET_ISSUE_TEST[1],
],
does_not_raise(),
),
"Pass - Partial subsequent (4) R8152 kmsg during test phase": (
"Pass - Partial (4) subsequent nfs kmsg during test phase": (
[
TEST_PHASE_LAVA_SIGNAL,
A618_NETWORK_ISSUE_LOGS[1],
A618_NETWORK_ISSUE_LOGS[1],
A618_NET_ISSUE_TEST[-1],
A618_NET_ISSUE_TEST[-1],
],
does_not_raise(),
),
@@ -364,6 +380,13 @@ A618_NETWORK_ISSUE_SCENARIOS = {
ids=A618_NETWORK_ISSUE_SCENARIOS.keys(),
)
def test_detect_failure(messages, expectation):
lf = LogFollower()
boot_section = GitlabSection(
id="lava_boot",
header="LAVA boot",
type=LogSectionType.LAVA_BOOT,
start_collapsed=True,
)
boot_section.start()
lf = LogFollower(starting_section=boot_section)
with expectation:
lf.feed(messages)

View File

@@ -1,87 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
set -ex
if [[ -z "$VK_DRIVER" ]]; then
exit 1
fi
# Useful debug output, you rarely know what envirnoment you'll be
# running in within container-land, this can be a landmark.
ls -l
INSTALL=$(realpath -s "$PWD"/install)
RESULTS=$(realpath -s "$PWD"/results)
# Set up the driver environment.
# Modifiying here directly LD_LIBRARY_PATH may cause problems when
# using a command wrapper. Hence, we will just set it when running the
# command.
export __LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL/lib/"
# Sanity check to ensure that our environment is sufficient to make our tests
# run against the Mesa built by CI, rather than any installed distro version.
MESA_VERSION=$(sed 's/\./\\./g' "$INSTALL/VERSION")
# Force the stdout and stderr streams to be unbuffered in python.
export PYTHONUNBUFFERED=1
# Set the Vulkan driver to use.
export VK_ICD_FILENAMES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json"
if [ "${VK_DRIVER}" = "radeon" ]; then
# Disable vsync
export MESA_VK_WSI_PRESENT_MODE=mailbox
export vblank_mode=0
fi
# Set environment for Wine.
export WINEDEBUG="-all"
export WINEPREFIX="/dxvk-wine64"
export WINEESYNC=1
# Wait for amdgpu to be fully loaded
sleep 1
# Avoid having to perform nasty command pre-processing to insert the
# wine executable in front of the test executables. Instead, use the
# kernel's binfmt support to automatically use Wine as an interpreter
# when asked to load PE executables.
# TODO: Have boot2container mount this filesystem for all jobs?
mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
echo ':DOSWin:M::MZ::/usr/bin/wine64:' > /proc/sys/fs/binfmt_misc/register
# Set environment for DXVK.
export DXVK_LOG_LEVEL="info"
export DXVK_LOG="$RESULTS/dxvk"
[ -d "$DXVK_LOG" ] || mkdir -pv "$DXVK_LOG"
export DXVK_STATE_CACHE=0
# Set environment for replaying traces.
export PATH="/apitrace-msvc-win64/bin:/gfxreconstruct/build/bin:$PATH"
SANITY_MESA_VERSION_CMD="vulkaninfo"
# Set up the Window System Interface (WSI)
# TODO: Can we get away with GBM?
if [ "${TEST_START_XORG:-0}" -eq 1 ]; then
"$INSTALL"/common/start-x.sh "$INSTALL"
export DISPLAY=:0
fi
wine64 --version
SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD | tee /tmp/version.txt | grep \"Mesa $MESA_VERSION\(\s\|$\)\""
RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $SANITY_MESA_VERSION_CMD"
set +e
if ! eval $RUN_CMD;
then
printf "%s\n" "Found $(cat /tmp/version.txt), expected $MESA_VERSION"
fi
set -e
# Just to be sure...
chmod +x ./valvetraces-run.sh
./valvetraces-run.sh

View File

@@ -23,7 +23,7 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL/lib/:/vkd3d-proton-tests/x64/"
MESA_VERSION=$(sed 's/\./\\./g' "$INSTALL/VERSION")
# Set the Vulkan driver to use.
export VK_ICD_FILENAMES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json"
export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json"
# Set environment for Wine.
export WINEDEBUG="-all"

View File

@@ -7,6 +7,10 @@ COPY mesa_deps_vulkan_sdk.ps1 C:\
RUN C:\mesa_deps_vulkan_sdk.ps1
COPY mesa_init_msvc.ps1 C:\
COPY mesa_deps_libva.ps1 C:\
RUN C:\mesa_deps_libva.ps1
COPY mesa_deps_build.ps1 C:\
RUN C:\mesa_deps_build.ps1

View File

@@ -14,6 +14,9 @@ RUN C:\mesa_deps_rust.ps1
COPY mesa_init_msvc.ps1 C:\
COPY mesa_deps_libva.ps1 C:\
RUN C:\mesa_deps_libva.ps1
COPY mesa_deps_test_piglit.ps1 C:\
RUN C:\mesa_deps_test_piglit.ps1
COPY mesa_deps_test_deqp.ps1 c:\

View File

@@ -1,4 +1,4 @@
# VK_ICD_FILENAMES environment variable is not used when running with
# VK_DRIVER_FILES environment variable is not used when running with
# elevated privileges. Add a key to the registry instead.
$hkey_path = "HKLM:\SOFTWARE\Khronos\Vulkan\Drivers\"
$hkey_name = Join-Path -Path $pwd -ChildPath "_install\share\vulkan\icd.d\dzn_icd.x86_64.json"

View File

@@ -59,7 +59,6 @@ meson setup `
-Dopencl-spirv=true `
-Dmicrosoft-clc=enabled `
-Dstatic-libclc=all `
-Dopencl-external-clang-headers=disabled `
-Dspirv-to-dxil=true `
-Dbuild-tests=true `
-Dwerror=true `
@@ -85,4 +84,6 @@ Copy-Item ".\.gitlab-ci\windows\spirv2dxil_run.ps1" -Destination $installdir
Copy-Item ".\.gitlab-ci\windows\deqp_runner_run.ps1" -Destination $installdir
Copy-Item ".\.gitlab-ci\windows\vainfo_run.ps1" -Destination $installdir
Get-ChildItem -Recurse -Filter "ci" | Get-ChildItem -Include "*.txt","*.toml" | Copy-Item -Destination $installdir

View File

@@ -12,7 +12,7 @@ $depsInstallPath="C:\mesa-deps"
Get-Date
Write-Host "Cloning DirectX-Headers"
git clone -b v1.611.0 --depth=1 https://github.com/microsoft/DirectX-Headers deps/DirectX-Headers
git clone -b v1.613.1 --depth=1 https://github.com/microsoft/DirectX-Headers deps/DirectX-Headers
if (!$?) {
Write-Host "Failed to clone DirectX-Headers repository"
Exit 1
@@ -32,16 +32,17 @@ if (!$buildstatus) {
Get-Date
Write-Host "Cloning zlib"
git clone -b v1.2.13 --depth=1 https://github.com/madler/zlib deps/zlib
git clone -b v1.3.1 --depth=1 https://github.com/madler/zlib deps/zlib
if (!$?) {
Write-Host "Failed to clone zlib repository"
Exit 1
}
Write-Host "Downloading zlib meson build files"
Invoke-WebRequest -Uri "https://wrapdb.mesonbuild.com/v2/zlib_1.2.13-1/get_patch" -OutFile deps/zlib.zip
Invoke-WebRequest -Uri "https://wrapdb.mesonbuild.com/v2/zlib_1.3.1-1/get_patch" -OutFile deps/zlib.zip
Expand-Archive -Path deps/zlib.zip -Destination deps/zlib
# Wrap archive puts build files in a version subdir
Move-Item deps/zlib/zlib-1.2.13/* deps/zlib
robocopy deps/zlib/zlib-1.3.1 deps/zlib /E
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path deps/zlib/zlib-1.3.1
$zlib_build = New-Item -ItemType Directory -Path ".\deps\zlib" -Name "build"
Push-Location -Path $zlib_build.FullName
meson .. --backend=ninja -Dprefix="$depsInstallPath" --default-library=static --buildtype=release -Db_vscrt=mt && `
@@ -54,35 +55,6 @@ if (!$buildstatus) {
Exit 1
}
Get-Date
Write-Host "Cloning libva"
git clone https://github.com/intel/libva.git deps/libva
if (!$?) {
Write-Host "Failed to clone libva repository"
Exit 1
}
Push-Location -Path ".\deps\libva"
Write-Host "Checking out libva df3c584bb79d1a1e521372d62fa62e8b1c52ce6c"
# libva-win32 is released with libva version 2.17 (see https://github.com/intel/libva/releases/tag/2.17.0)
git checkout 2.17.0
Pop-Location
Write-Host "Building libva"
# libva already has a build dir in their repo, use builddir instead
$libva_build = New-Item -ItemType Directory -Path ".\deps\libva" -Name "builddir"
Push-Location -Path $libva_build.FullName
meson .. -Dprefix="$depsInstallPath"
ninja -j32 install
$buildstatus = $?
Pop-Location
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $libva_build
if (!$buildstatus) {
Write-Host "Failed to compile libva"
Exit 1
}
Get-Date
Write-Host "Cloning LLVM release/15.x"
git clone -b release/15.x --depth=1 https://github.com/llvm/llvm-project deps/llvm-project
@@ -158,12 +130,12 @@ Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $llvm_build
Get-Date
Write-Host "Cloning SPIRV-Tools"
git clone -b "sdk-$env:VULKAN_SDK_VERSION" --depth=1 https://github.com/KhronosGroup/SPIRV-Tools deps/SPIRV-Tools
git clone -b "vulkan-sdk-$env:VULKAN_SDK_VERSION" --depth=1 https://github.com/KhronosGroup/SPIRV-Tools deps/SPIRV-Tools
if (!$?) {
Write-Host "Failed to clone SPIRV-Tools repository"
Exit 1
}
git clone -b "sdk-$env:VULKAN_SDK_VERSION" --depth=1 https://github.com/KhronosGroup/SPIRV-Headers deps/SPIRV-Tools/external/SPIRV-Headers
git clone -b "vulkan-sdk-$env:VULKAN_SDK_VERSION" --depth=1 https://github.com/KhronosGroup/SPIRV-Headers deps/SPIRV-Tools/external/SPIRV-Headers
if (!$?) {
Write-Host "Failed to clone SPIRV-Headers repository"
Exit 1

View File

@@ -8,7 +8,7 @@ $depsInstallPath="C:\mesa-deps"
Write-Host "Downloading DirectX 12 Agility SDK at:"
Get-Date
Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.610.2 -OutFile 'agility.zip'
Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.613.2 -OutFile 'agility.zip'
Expand-Archive -Path 'agility.zip' -DestinationPath 'C:\agility'
# Copy Agility SDK into mesa-deps\bin\D3D12
New-Item -ErrorAction SilentlyContinue -ItemType Directory -Path $depsInstallPath\bin -Name 'D3D12'
@@ -18,7 +18,7 @@ Remove-Item -Recurse 'C:\agility'
Write-Host "Downloading Updated WARP at:"
Get-Date
Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/1.0.7.1 -OutFile 'warp.zip'
Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/1.0.11 -OutFile 'warp.zip'
Expand-Archive -Path 'warp.zip' -DestinationPath 'C:\warp'
# Copy WARP into mesa-deps\bin
Copy-Item 'C:\warp\build\native\amd64\d3d10warp.dll' -Destination $depsInstallPath\bin
@@ -27,7 +27,7 @@ Remove-Item -Recurse 'C:\warp'
Write-Host "Downloading DirectXShaderCompiler release at:"
Get-Date
Invoke-WebRequest -Uri https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.7.2207/dxc_2022_07_18.zip -OutFile 'DXC.zip'
Invoke-WebRequest -Uri https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.8.2403/dxc_2024_03_07.zip -OutFile 'DXC.zip'
Expand-Archive -Path 'DXC.zip' -DestinationPath 'C:\DXC'
# No more need to get dxil.dll from the VS install
Copy-Item 'C:\DXC\bin\x64\*.dll' -Destination 'C:\Windows\System32'

View File

@@ -0,0 +1,79 @@
# Compiling libva/libva-utils deps
$ProgressPreference = "SilentlyContinue"
$MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent
. "$MyPath\mesa_init_msvc.ps1"
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "deps" | Out-Null
$depsInstallPath="C:\mesa-deps"
Write-Host "Cloning libva at:"
Get-Date
git clone https://github.com/intel/libva.git deps/libva
if (!$?) {
Write-Host "Failed to clone libva repository"
Exit 1
}
Write-Host "Cloning libva finished at:"
Get-Date
Write-Host "Building libva at:"
Get-Date
Push-Location -Path ".\deps\libva"
Write-Host "Checking out libva..."
git checkout 2.21.0
Pop-Location
# libva already has a build dir in their repo, use builddir instead
$libva_build = New-Item -ItemType Directory -Path ".\deps\libva" -Name "builddir"
Push-Location -Path $libva_build.FullName
meson .. -Dprefix="$depsInstallPath"
ninja -j32 install
$buildstatus = $?
Pop-Location
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $libva_build
if (!$buildstatus) {
Write-Host "Failed to compile libva"
Exit 1
}
Write-Host "Building libva finished at:"
Get-Date
Write-Host "Cloning libva-utils at:"
Get-Date
git clone https://github.com/intel/libva-utils.git deps/libva-utils
if (!$?) {
Write-Host "Failed to clone libva-utils repository"
Exit 1
}
Write-Host "Cloning libva-utils finished at:"
Get-Date
Write-Host "Building libva-utils at:"
Get-Date
Push-Location -Path ".\deps\libva-utils"
Write-Host "Checking out libva-utils..."
git checkout 2.21.0
Pop-Location
Write-Host "Building libva-utils"
# libva-utils already has a build dir in their repo, use builddir instead
$libva_utils_build = New-Item -ItemType Directory -Path ".\deps\libva-utils" -Name "builddir"
Push-Location -Path $libva_utils_build.FullName
meson .. -Dprefix="$depsInstallPath" --pkg-config-path="$depsInstallPath\lib\pkgconfig;$depsInstallPath\share\pkgconfig"
ninja -j32 install
$buildstatus = $?
Pop-Location
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path $libva_utils_build
if (!$buildstatus) {
Write-Host "Failed to compile libva-utils"
Exit 1
}
Write-Host "Building libva-utils finished at:"
Get-Date

View File

@@ -53,7 +53,7 @@ New-Item -ItemType Directory -Path "$piglit_source" | Out-Null
Push-Location -Path $piglit_source
git init
git remote add origin https://gitlab.freedesktop.org/mesa/piglit.git
git fetch --depth 1 origin b41accc83689966f91217fc5b57dbe06202b8c8c # of branch main
git fetch --depth 1 origin 814046fe6942eac660ee4a6cc5fcc54011a49945 # of branch main
if (!$?) {
Write-Host "Failed to fetch Piglit repository"
Pop-Location

View File

@@ -2,7 +2,7 @@
# Touch this file needs update both WINDOWS_X64_BUILD_TAG WINDOWS_X64_TEST_TAG
# This file needs run in administrator mode
$env:VULKAN_SDK_VERSION="1.3.211.0"
$env:VULKAN_SDK_VERSION="1.3.275.0"
$ProgressPreference = "SilentlyContinue"

View File

@@ -1,4 +1,5 @@
$env:PIGLIT_NO_FAST_SKIP = 1
$env:PIGLIT_SPIRV_AS_BINARY = "C:\VulkanSDK\$env:VULKAN_SDK_VERSION\Bin\spirv-as.exe"
Copy-Item -Path _install\bin\opengl32.dll -Destination C:\Piglit\bin\opengl32.dll
Copy-Item -Path _install\bin\libgallium_wgl.dll -Destination C:\Piglit\bin\libgallium_wgl.dll

View File

@@ -0,0 +1,99 @@
function Deploy-Dependencies {
param (
[string] $deploy_directory
)
Write-Host "Copying libva runtime and driver at:"
Get-Date
# Copy the VA runtime binaries from the mesa built dependencies so the versions match with the built mesa VA driver binary
$depsInstallPath="C:\mesa-deps"
Copy-Item "$depsInstallPath\bin\vainfo.exe" -Destination "$deploy_directory\vainfo.exe"
Copy-Item "$depsInstallPath\bin\va_win32.dll" -Destination "$deploy_directory\va_win32.dll"
Copy-Item "$depsInstallPath\bin\va.dll" -Destination "$deploy_directory\va.dll"
# Copy Agility SDK into D3D12 subfolder of vainfo
New-Item -ItemType Directory -Force -Path "$deploy_directory\D3D12" | Out-Null
Copy-Item "$depsInstallPath\bin\D3D12\D3D12Core.dll" -Destination "$deploy_directory\D3D12\D3D12Core.dll"
Copy-Item "$depsInstallPath\bin\D3D12\d3d12SDKLayers.dll" -Destination "$deploy_directory\D3D12\d3d12SDKLayers.dll"
# Copy WARP next to vainfo
Copy-Item "$depsInstallPath\bin\d3d10warp.dll" -Destination "$deploy_directory\d3d10warp.dll"
Write-Host "Copying libva runtime and driver finished at:"
Get-Date
}
function Check-VAInfo-Entrypoint {
param (
[string] $vainfo_app_path,
[string] $entrypoint
)
$vainfo_run_cmd = "$vainfo_app_path --display win32 --device 0 2>&1 | Select-String $entrypoint -Quiet"
Write-Host "Running: $vainfo_run_cmd"
$vainfo_ret_code= Invoke-Expression $vainfo_run_cmd
if (-not($vainfo_ret_code)) {
return 0
}
return 1
}
# Set testing environment variables
$successful_run=1
$testing_dir="$PWD\_install\bin" # vaon12_drv_video.dll is placed on this directory by the build
$vainfo_app_path = "$testing_dir\vainfo.exe"
# Deploy vainfo and dependencies
Deploy-Dependencies -deploy_directory $testing_dir
# Set VA runtime environment variables
$env:LIBVA_DRIVER_NAME="vaon12"
$env:LIBVA_DRIVERS_PATH="$testing_dir"
Write-Host "LIBVA_DRIVER_NAME: $env:LIBVA_DRIVER_NAME"
Write-Host "LIBVA_DRIVERS_PATH: $env:LIBVA_DRIVERS_PATH"
# Check video processing entrypoint is supported
# Inbox WARP/D3D12 supports this entrypoint with VA frontend shaders support (e.g no video APIs support required)
$entrypoint = "VAEntrypointVideoProc"
# First run without app verifier
Write-Host "Disabling appverifier for $vainfo_app_path and checking for the presence of $entrypoint supported..."
appverif.exe /disable * -for "$vainfo_app_path"
$result_without_appverifier = Check-VAInfo-Entrypoint -vainfo_app_path $vainfo_app_path -entrypoint $entrypoint
if ($result_without_appverifier -eq 1) {
Write-Host "Process exited successfully."
} else {
$successful_run=0
Write-Error "Process exit not successful for $vainfo_run_cmd. Please see vainfo verbose output below for diagnostics..."
# verbose run to print more info on error (helpful to investigate issues from the CI output)
Invoke-Expression "$vainfo_app_path -a --display win32 --device help"
Invoke-Expression "$vainfo_app_path -a --display win32 --device 0"
}
# Enable appverif and run again
Write-Host "Enabling appverifier for $vainfo_app_path and checking for the presence of $entrypoint supported..."
appverif.exe /logtofile enable
appverif.exe /verify "$vainfo_app_path"
appverif.exe /enable "Leak" -for "$vainfo_app_path"
$verifier_log_path="$testing_dir\vainfo_appverif_log.xml"
$result_with_appverifier = Check-VAInfo-Entrypoint -vainfo_app_path $vainfo_app_path -entrypoint $entrypoint
if ($result_with_appverifier -eq 1) {
Write-Host "Process exited successfully."
appverif.exe /logtofile disable
} else {
Write-Host "Process failed. Please see Application Verifier log contents below."
# Need to wait for appverif to exit before gathering log
Start-Process -Wait -FilePath "appverif.exe" -ArgumentList "-export", "log", "-for", "$vainfo_app_path", "-with", "to=$verifier_log_path"
Get-Content $verifier_log_path
Write-Error "Process exit not successful for $vainfo_run_cmd."
appverif.exe /logtofile disable
$successful_run=0
}
if ($successful_run -ne 1) {
Exit 1
}

282
.mr-label-maker.yml Normal file
View File

@@ -0,0 +1,282 @@
# version field is required
version: 1
project:
name: 'mesa'
id: 176
instance: https://gitlab.freedesktop.org
issues:
topics: &topics
'aco': 'ACO'
'anv': 'ANV'
'asahi': 'asahi'
'blorp': 'blorp'
'ci': 'CI'
'clc': 'OpenCL'
'clover': 'clover'
'crocus': 'crocus'
'd3d12': 'd3d12'
'docs': 'docs'
'dozen': 'dozen'
'drirc': 'drirc'
'dzn': 'dozen'
'egl': 'EGL'
'etnaviv': 'etnaviv'
'freedreno': 'freedreno'
'freedreno/ir3': ['freedreno', 'ir3']
'gallium': 'gallium'
'gbm': 'gbm'
'gitlab-ci': 'CI'
'glsl': 'GLSL'
'glvnd': 'GLVND'
'glx': 'GLX'
'hasvk': 'hasvk'
'i915': 'i915'
'i965': 'i965'
'intel/compiler': 'intel-compiler'
'intel/brw': 'intel-brw'
'intel/elk': 'intel-elk'
'intel/tools': 'intel-tools'
'iris': 'iris'
'isl': 'ISL'
'lima': 'lima'
'lima/ppir' : 'lima'
'llvmpipe': 'llvmpipe'
'mesa' : 'mesa'
'meson' : 'meson'
'microsoft/compiler': 'd3d12'
'nak' : 'NAK'
'nine' : 'nine'
'nir': 'NIR'
'nir2dxil': 'd3d12'
'nouveau' : 'nouveau'
'nv30' : ['nouveau', 'nv30']
'nv50' : ['nouveau', 'nv50']
'nv50/ir' : 'nouveau'
'nvc0' : ['nouveau', 'nvc0']
'nvk' : 'NVK'
'panfrost' : 'panfrost'
'pan/midgard' : 'panfrost'
'pvr' : 'powervr'
'r100' : 'r100'
'r200' : 'r200'
'r300' : 'r300'
'r600' : 'r600'
'radeonsi' : 'radeonsi'
'radv': 'RADV'
'radv/aco': ['RADV', 'ACO']
'rusticl': 'Rusticl'
'softpipe' : 'softpipe'
'spirv' : 'SPIR-V'
'swr' : 'swr'
'swrast' : 'swrast'
'tegra' : 'tegra'
'tgsi' : 'TGSI'
'turnip': 'turnip'
'util' : 'util'
'v3d': 'v3d'
'vaapi' : 'VA-API'
'vc4' : 'vc4'
'vdpau' : 'VDPAU'
'vieux' : 'vieux'
'virgl' : 'virgl'
'vmwgfx' : 'vmwgfx'
'zink': 'zink'
titles: &titles
'android': 'android'
'bisected': 'bisected'
'coverity': 'coverity'
'deqp': 'deqp'
'feature request': 'feature request'
'haiku' : 'haiku'
'regression': 'regression'
'i915_dri.so' : 'i915'
'i965_dri.so' : 'i965'
'iris_dri.so' : 'iris'
'nouveau_dri.so' : 'nouveau'
'nouveau_vieux_dri.so' : 'vieux'
'r200_dri.so' : 'r200'
'r300_dri.so' : 'r300'
'r600_dri.so' : 'r600'
'radeonsi_dri.so' : 'radeonsi'
'swrast_dri.so' : 'swrast'
'vmwgfx_dri.so' : 'vmwgfx'
merge_requests:
topics:
*topics
titles:
*titles
paths:
'^.gitlab/issue_templates/' : ['docs']
'^.gitlab-ci' : ['CI']
'^.*/gitlab-ci(-inc)?.yml' : ['CI']
'^.*/ci/deqp-.*\.toml' : ['CI']
'^.*/ci/.*-(fails|flakes|skips)\.txt' : ['CI']
'^.*/ci/(restricted-)?traces-.*\.yml' : ['CI']
'^.*/ci/.*-validation-settings\.txt' : ['CI']
'^.gitlab-ci/windows/' : ['Windows']
'^bin/__init__.py$' : ['maintainer-scripts']
'^bin/gen_release_notes' : ['maintainer-scripts']
'^bin/git_sha1_gen.py$' : ['meson', 'android']
'^bin/install_megadrivers.py$' : ['meson']
'^bin/meson-cmd-extract.py$' : ['meson']
'^bin/meson.build$' : ['meson']
'^bin/pick-ui' : ['maintainer-scripts']
'^bin/pick/' : ['maintainer-scripts']
'^bin/post_version' : ['maintainer-scripts']
'^bin/symbols-check.py$' : ['meson']
'^docs/' : ['docs']
'^include/drm-uapi/i915_drm.h' : ['intel']
'^include/drm-uapi/xe_drm.h' : ['intel']
'^include/vulkan/' : ['vulkan']
'^meson_options.txt' : ['meson']
'^README.rst' : ['docs']
'^src/amd/addrlib/' : ['AMD common']
'^src/amd/common/' : ['AMD common']
'^src/amd/compiler/' : ['ACO']
'^src/amd/llvm/' : ['AMD common']
'^src/amd/registers/' : ['AMD common']
'^src/amd/vulkan/' : ['RADV']
'^src/asahi/' : ['asahi']
'^src/broadcom/drm-shim/v3d' : ['v3d']
'^src/broadcom/vulkan/' : ['v3dv']
'^src/compiler/clc' : ['OpenCL']
'^src/compiler/glsl' : ['GLSL']
'^src/compiler/nir' : ['NIR']
'^src/compiler/spirv/' : ['SPIR-V']
'^src/egl/' : ['EGL']
'^src/egl/drivers/wgl/' : ['wgl']
'^src/etnaviv/' : ['etnaviv']
'^src/freedreno/' : ['freedreno']
'^src/freedreno/ir3/' : ['ir3']
'^src/freedreno/vulkan/' : ['turnip']
'^src/gallium/auxiliary/' : ['gallium']
'^src/gallium/auxiliary/nir/' : ['NIR']
'^src/gallium/auxiliary/nir/.*tgsi.*' : ['TGSI']
'^src/gallium/auxiliary/tgsi/' : ['TGSI']
'^src/gallium/docs/' : ['gallium']
'^src/gallium/drivers/asahi/' : ['asahi']
'^src/gallium/drivers/crocus/' : ['crocus']
'^src/gallium/drivers/d3d12/' : ['d3d12']
'^src/gallium/drivers/etnaviv/' : ['etnaviv']
'^src/gallium/drivers/freedreno/' : ['freedreno']
'^src/gallium/drivers/grate/' : ['tegra']
'^src/gallium/drivers/i915/' : ['i915g']
'^src/gallium/drivers/iris/' : ['iris']
'^src/gallium/drivers/lima/' : ['lima']
'^src/gallium/drivers/llvmpipe/' : ['llvmpipe']
'^src/gallium/drivers/nouveau/' : ['nouveau']
'^src/gallium/drivers/nouveau/nv30' : ['nv30']
'^src/gallium/drivers/nouveau/nv50' : ['nv50']
'^src/gallium/drivers/nouveau/nvc0' : ['nvc0']
'^src/gallium/drivers/panfrost/' : ['panfrost']
'^src/gallium/drivers/r300/' : ['r300']
'^src/gallium/drivers/r600/' : ['r600']
'^src/gallium/drivers/radeonsi' : ['radeonsi']
'^src/gallium/drivers/softpipe' : ['softpipe']
'^src/gallium/drivers/svga/' : ['svga']
'^src/gallium/drivers/swr/' : ['swr']
'^src/gallium/drivers/tegra/' : ['tegra']
'^src/gallium/drivers/v3d/' : ['v3d']
'^src/gallium/drivers/vc4/' : ['vc4']
'^src/gallium/drivers/virgl/' : ['virgl']
'^src/gallium/drivers/zink/' : ['zink']
'^src/gallium/frontends/clover/' : ['clover']
'^src/gallium/frontends/dri/' : ['gallium']
'^src/gallium/frontends/glx/' : ['GLX']
'^src/gallium/frontends/hgl/' : ['haiku']
'^src/gallium/frontends/lavapipe/' : ['lavapipe']
'^src/gallium/frontends/nine/' : ['nine']
'^src/gallium/frontends/omx/' : ['omx']
'^src/gallium/frontends/osmesa/' : ['osmesa']
'^src/gallium/frontends/rusticl/' : ['Rusticl']
'^src/gallium/frontends/va/' : ['VA-API']
'^src/gallium/frontends/vdpau/' : ['VDPAU']
'^src/gallium/frontends/wgl/' : ['wgl']
# '^src/gallium/frontends/xa/' : ['']
'^src/gallium/include/' : ['gallium']
'^src/gallium/targets/' : ['gallium']
'^src/gallium/targets/opencl/' : ['clover']
'^src/gallium/targets/osmesa/' : ['osmesa']
'^src/gallium/targets/rusticl/' : ['Rusticl']
'^src/gallium/tests/' : ['gallium']
'^src/gallium/tools/' : ['gallium']
# '^src/gallium/winsys/amdgpu/' : ['']
'^src/gallium/winsys/crocus/' : ['crocus']
'^src/gallium/winsys/d3d12/' : ['d3d12']
'^src/gallium/winsys/etnaviv/' : ['etnaviv']
'^src/gallium/winsys/freedreno/' : ['freedreno']
'^src/gallium/winsys/grate/' : ['tegra']
'^src/gallium/winsys/i915/' : ['i915g']
'^src/gallium/winsys/iris/' : ['iris']
# '^src/gallium/winsys/kmsro/' : ['']
'^src/gallium/winsys/lima/' : ['lima']
'^src/gallium/winsys/nouveau/' : ['nouveau']
'^src/gallium/winsys/panfrost/' : ['panfrost']
# '^src/gallium/winsys/radeon/' : ['radeon']
'^src/gallium/winsys/svga/' : ['svga']
# '^src/gallium/winsys/sw/' : ['']
'^src/gallium/winsys/sw/gdi/' : ['wgl']
'^src/gallium/winsys/tegra/' : ['tegra']
'^src/gallium/winsys/v3d/' : ['v3d']
'^src/gallium/winsys/vc4/' : ['vc4']
'^src/gallium/winsys/virgl/' : ['virgl']
'^src/gbm/' : ['gbm']
'^src/glx/' : ['GLX']
'^src/imagination/' : ['powervr']
'^src/intel/blorp/' : ['blorp']
'^src/intel/common/' : ['intel']
'^src/intel/compiler/' : ['intel-compiler']
'^src/intel/compiler/brw' : ['intel-brw']
'^src/intel/compiler/elk' : ['intel-elk']
'^src/intel/dev/' : ['intel']
'^src/intel/ds/' : ['intel']
'^src/intel/genxml/' : ['intel']
'^src/intel/isl/' : ['ISL']
'^src/intel/nullhw-layer/' : ['intel']
'^src/intel/perf/' : ['intel']
'^src/intel/tools/' : ['intel-tools']
'^src/intel/vulkan/' : ['ANV']
'^src/intel/vulkan_hasvk/' : ['hasvk']
'^src/loader/' : ['loader']
'^src/mapi/' : ['mapi']
'^src/mesa/drivers/dri/i915/' : ['i915']
'^src/mesa/drivers/dri/i965/' : ['i965']
'^src/mesa/drivers/dri/nouveau/' : ['vieux']
'^src/mesa/drivers/dri/r200/' : ['r200']
'^src/mesa/drivers/dri/radeon/' : ['radeon']
'^src/mesa/drivers/dri/swrast/' : ['swrast']
'^src/mesa/drivers/osmesa' : ['osmesa']
'^src/mesa/main/' : ['mesa']
'^src/mesa/state_tracker/.*glsl.*' : ['GLSL']
'^src/mesa/state_tracker/.*tgsi.*' : ['TGSI']
'^src/mesa/state_tracker/.*nir.*' : ['NIR']
'^src/microsoft/clc/' : ['d3d12']
'^src/microsoft/compiler/' : ['d3d12']
'^src/microsoft/spirv_to_dxil/' : ['dozen']
'^src/microsoft/vulkan/' : ['dozen']
'^src/nouveau/codegen/' : ['nouveau']
'^src/nouveau/compiler/' : ['NAK']
'^src/nouveau/drm-shim/' : ['nouveau']
'^src/nouveau/mme/' : ['NVK']
'^src/nouveau/nil/' : ['NVK']
'^src/nouveau/nvidia-headers/' : ['NVK']
'^src/nouveau/vulkan/' : ['NVK']
'^src/nouveau/winsys/' : ['NVK']
'^src/panfrost/' : ['panfrost']
'^src/virtio/vulkan/' : ['venus']
'^src/virtio/venus-protocol/' : ['venus']
'^src/virtio/ci/' : ['venus']
'^src/util/' : ['util']
'^src/util/00-mesa-defaults.conf' : ['drirc']
'^src/vulkan/' : ['vulkan']
'^VERSION$' : ['maintainer-scripts']
'Android' : ['android']
'EGL' : ['EGL']
'meson.build' : ['meson']
'wayland' : ['wayland']

View File

@@ -29,7 +29,7 @@ meson.build @dbaker @eric
# Compatibility headers
/include/c99* @xexaxo
/src/c11/ @eric @lygstate
/src/c11/ @lygstate
# Documentation
/docs/ @eric @xexaxo
@@ -43,8 +43,8 @@ meson.build @dbaker @eric
/src/compiler/nir/ @gfxstrand
# Vulkan
/src/vulkan/ @eric @gfxstrand
/include/vulkan/ @eric @gfxstrand
/src/vulkan/ @gfxstrand
/include/vulkan/ @gfxstrand
#############
@@ -99,6 +99,10 @@ meson.build @dbaker @eric
# CI #
######
/.gitlab-ci.yml @eric
/.gitlab-ci/ @eric
gitlab-ci*.yml @eric
# Broadcom
/src/broadcom/ci/ @jasuarez @chema
@@ -120,8 +124,8 @@ meson.build @dbaker @eric
/src/gallium/drivers/freedreno/ @robclark
# Imagination
/include/drm-uapi/pvr_drm.h @CreativeCylon @frankbinns @MTCoster
/src/imagination/ @CreativeCylon @frankbinns @MTCoster
/include/drm-uapi/pvr_drm.h @aashishc @frankbinns @luigi.santivetti
/src/imagination/ @aashishc @frankbinns @luigi.santivetti
/src/imagination/rogue/ @simon-perretta-img
# Intel

View File

@@ -1 +1 @@
24.0.0-devel
24.1.0-devel

View File

@@ -79,11 +79,6 @@ LOCAL_SHARED_LIBRARIES += libdrm_radeon
MESON_GEN_PKGCONFIGS += libdrm_radeon:$(LIBDRM_VERSION)
endif
ifneq ($(filter nouveau,$(BOARD_MESA3D_GALLIUM_DRIVERS)),)
LOCAL_SHARED_LIBRARIES += libdrm_nouveau
MESON_GEN_PKGCONFIGS += libdrm_nouveau:$(LIBDRM_VERSION)
endif
ifneq ($(filter d3d12,$(BOARD_MESA3D_GALLIUM_DRIVERS)),)
LOCAL_HEADER_LIBRARIES += DirectX-Headers
LOCAL_STATIC_LIBRARIES += DirectX-Guids
@@ -128,23 +123,21 @@ endif
#-------------------------------------------------------------------------------
# $1: name
# $2: symlink suffix
# $3: subdir
# $4: source prebuilt
# $5: export headers
# $2: subdir
# $3: source prebuilt
# $4: export headers
define mesa3d-lib
include $(CLEAR_VARS)
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE := $1
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := $3
LOCAL_PREBUILT_MODULE_FILE := $($4)
LOCAL_MODULE_RELATIVE_PATH := $2
LOCAL_PREBUILT_MODULE_FILE := $($3)
LOCAL_MULTILIB := first
LOCAL_CHECK_ELF_FILES := false
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_SYMLINKS := $1$2
LOCAL_SHARED_LIBRARIES := $(__MY_SHARED_LIBRARIES)
LOCAL_EXPORT_C_INCLUDE_DIRS := $5
LOCAL_EXPORT_C_INCLUDE_DIRS := $4
include $(BUILD_PREBUILT)
ifdef TARGET_2ND_ARCH
@@ -152,14 +145,13 @@ include $(CLEAR_VARS)
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE := $1
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := $3
LOCAL_PREBUILT_MODULE_FILE := $(2ND_$4)
LOCAL_MODULE_RELATIVE_PATH := $2
LOCAL_PREBUILT_MODULE_FILE := $(2ND_$3)
LOCAL_MULTILIB := 32
LOCAL_CHECK_ELF_FILES := false
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_SYMLINKS := $1$2
LOCAL_SHARED_LIBRARIES := $(__MY_SHARED_LIBRARIES)
LOCAL_EXPORT_C_INCLUDE_DIRS := $5
LOCAL_EXPORT_C_INCLUDE_DIRS := $4
include $(BUILD_PREBUILT)
endif
endef
@@ -167,25 +159,25 @@ endef
ifneq ($(strip $(BOARD_MESA3D_GALLIUM_DRIVERS)),)
# Module 'libgallium_dri', produces '/vendor/lib{64}/dri/libgallium_dri.so'
# This module also trigger DRI symlinks creation process
$(eval $(call mesa3d-lib,libgallium_dri,.so.0,dri,MESA3D_GALLIUM_DRI_BIN))
$(eval $(call mesa3d-lib,libgallium_dri,dri,MESA3D_GALLIUM_DRI_BIN))
# Module 'libglapi', produces '/vendor/lib{64}/libglapi.so'
$(eval $(call mesa3d-lib,libglapi,.so.0,,MESA3D_LIBGLAPI_BIN))
$(eval $(call mesa3d-lib,libglapi,,MESA3D_LIBGLAPI_BIN))
# Module 'libEGL_mesa', produces '/vendor/lib{64}/egl/libEGL_mesa.so'
$(eval $(call mesa3d-lib,libEGL_mesa,.so.1,egl,MESA3D_LIBEGL_BIN))
$(eval $(call mesa3d-lib,libEGL_mesa,egl,MESA3D_LIBEGL_BIN))
# Module 'libGLESv1_CM_mesa', produces '/vendor/lib{64}/egl/libGLESv1_CM_mesa.so'
$(eval $(call mesa3d-lib,libGLESv1_CM_mesa,.so.1,egl,MESA3D_LIBGLESV1_BIN))
$(eval $(call mesa3d-lib,libGLESv1_CM_mesa,egl,MESA3D_LIBGLESV1_BIN))
# Module 'libGLESv2_mesa', produces '/vendor/lib{64}/egl/libGLESv2_mesa.so'
$(eval $(call mesa3d-lib,libGLESv2_mesa,.so.2,egl,MESA3D_LIBGLESV2_BIN))
$(eval $(call mesa3d-lib,libGLESv2_mesa,egl,MESA3D_LIBGLESV2_BIN))
endif
# Modules 'vulkan.{driver_name}', produces '/vendor/lib{64}/hw/vulkan.{driver_name}.so' HAL
$(foreach driver,$(BOARD_MESA3D_VULKAN_DRIVERS), \
$(eval $(call mesa3d-lib,vulkan.$(MESA_VK_LIB_SUFFIX_$(driver)),.so.0,hw,MESA3D_VULKAN_$(driver)_BIN)))
$(eval $(call mesa3d-lib,vulkan.$(MESA_VK_LIB_SUFFIX_$(driver)),hw,MESA3D_VULKAN_$(driver)_BIN)))
ifneq ($(filter true, $(BOARD_MESA3D_BUILD_LIBGBM)),)
# Modules 'libgbm', produces '/vendor/lib{64}/libgbm.so'
$(eval $(call mesa3d-lib,$(MESA_LIBGBM_NAME),.so.1,,MESA3D_LIBGBM_BIN,$(MESA3D_TOP)/src/gbm/main))
$(eval $(call mesa3d-lib,$(MESA_LIBGBM_NAME),,MESA3D_LIBGBM_BIN,$(MESA3D_TOP)/src/gbm/main))
endif
#-------------------------------------------------------------------------------

View File

@@ -65,11 +65,11 @@ MESON_GEN_FILES_TARGET := $(MESON_GEN_DIR)/.timestamp
MESA3D_GALLIUM_DRI_DIR := $(MESON_OUT_DIR)/install/usr/local/lib/dri
$(M_TARGET_PREFIX)MESA3D_GALLIUM_DRI_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libgallium_dri.so
$(M_TARGET_PREFIX)MESA3D_LIBEGL_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libEGL.so.1.0.0
$(M_TARGET_PREFIX)MESA3D_LIBGLESV1_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libGLESv1_CM.so.1.1.0
$(M_TARGET_PREFIX)MESA3D_LIBGLESV2_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libGLESv2.so.2.0.0
$(M_TARGET_PREFIX)MESA3D_LIBGLAPI_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libglapi.so.0.0.0
$(M_TARGET_PREFIX)MESA3D_LIBGBM_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/$(MESA_LIBGBM_NAME).so.1.0.0
$(M_TARGET_PREFIX)MESA3D_LIBEGL_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libEGL.so
$(M_TARGET_PREFIX)MESA3D_LIBGLESV1_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libGLESv1_CM.so
$(M_TARGET_PREFIX)MESA3D_LIBGLESV2_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libGLESv2.so
$(M_TARGET_PREFIX)MESA3D_LIBGLAPI_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libglapi.so
$(M_TARGET_PREFIX)MESA3D_LIBGBM_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/$(MESA_LIBGBM_NAME).so
MESA3D_GLES_BINS := \
@@ -256,7 +256,7 @@ $(MESON_GEN_FILES_TARGET): $(sort $(shell find -L $(MESA3D_TOP) -not -path '*/\.
"pkgconfig = ['env', 'PKG_CONFIG_LIBDIR=' + '$(call relative-to-absolute,$(MESON_GEN_DIR))', '/usr/bin/pkg-config']\n\n" \
"llvm-config = '/dev/null'\n" \
"[host_machine]\n" \
"system = 'linux'\n" \
"system = 'android'\n" \
"cpu_family = '$(MESON_CPU_FAMILY)'\n" \
"cpu = '$(MESON_CPU_FAMILY)'\n" \
"endian = 'little'" > $(dir $@)/aosp_cross

162
bin/ci/ci_gantt_chart.py Executable file
View File

@@ -0,0 +1,162 @@
#!/usr/bin/env python3
# Copyright © 2023 Collabora Ltd.
# Authors:
# Helen Koike <helen.koike@collabora.com>
#
# For the dependencies, see the requirements.txt
# SPDX-License-Identifier: MIT
import argparse
import gitlab
import plotly.express as px
from gitlab_common import pretty_duration
from datetime import datetime, timedelta
from gitlab_common import read_token, GITLAB_URL, get_gitlab_pipeline_from_url
def calculate_queued_at(job):
# we can have queued_duration without started_at when a job is canceled
if not job.queued_duration or not job.started_at:
return None
started_at = job.started_at.replace("Z", "+00:00")
return datetime.fromisoformat(started_at) - timedelta(seconds=job.queued_duration)
def calculate_time_difference(time1, time2):
if not time1 or not time2:
return None
if type(time1) is str:
time1 = datetime.fromisoformat(time1.replace("Z", "+00:00"))
if type(time2) is str:
time2 = datetime.fromisoformat(time2.replace("Z", "+00:00"))
diff = time2 - time1
return pretty_duration(diff.seconds)
def create_task_name(job):
status_color = {"success": "green", "failed": "red"}.get(job.status, "grey")
return f"{job.name}\t(<span style='color: {status_color}'>{job.status}</span>,<a href='{job.web_url}'>{job.id}</a>)"
def add_gantt_bar(job, tasks):
queued_at = calculate_queued_at(job)
task_name = create_task_name(job)
tasks.append(
{
"Job": task_name,
"Start": job.created_at,
"Finish": queued_at,
"Duration": calculate_time_difference(job.created_at, queued_at),
"Phase": "Waiting dependencies",
}
)
tasks.append(
{
"Job": task_name,
"Start": queued_at,
"Finish": job.started_at,
"Duration": calculate_time_difference(queued_at, job.started_at),
"Phase": "Queued",
}
)
tasks.append(
{
"Job": task_name,
"Start": job.started_at,
"Finish": job.finished_at,
"Duration": calculate_time_difference(job.started_at, job.finished_at),
"Phase": "Running",
}
)
def generate_gantt_chart(pipeline):
if pipeline.yaml_errors:
raise ValueError("Pipeline YAML errors detected")
# Convert the data into a list of dictionaries for plotly
tasks = []
for job in pipeline.jobs.list(all=True, include_retried=True):
add_gantt_bar(job, tasks)
# Make it easier to see retried jobs
tasks.sort(key=lambda x: x["Job"])
title = f"Gantt chart of jobs in pipeline <a href='{pipeline.web_url}'>{pipeline.web_url}</a>."
title += (
f" Total duration {str(timedelta(seconds=pipeline.duration))}"
if pipeline.duration
else ""
)
# Create a Gantt chart
fig = px.timeline(
tasks,
x_start="Start",
x_end="Finish",
y="Job",
color="Phase",
title=title,
hover_data=["Duration"],
)
# Calculate the height dynamically
fig.update_layout(height=len(tasks) * 10, yaxis_tickfont_size=14)
# Add a deadline line to the chart
created_at = datetime.fromisoformat(pipeline.created_at.replace("Z", "+00:00"))
timeout_at = created_at + timedelta(hours=1)
fig.add_vrect(
x0=timeout_at,
x1=timeout_at,
annotation_text="1h Timeout",
fillcolor="gray",
line_width=2,
line_color="gray",
line_dash="dash",
annotation_position="top left",
annotation_textangle=90,
)
return fig
def parse_args() -> None:
parser = argparse.ArgumentParser(
description="Generate the Gantt chart from a given pipeline."
)
parser.add_argument("pipeline_url", type=str, help="URLs to the pipeline.")
parser.add_argument(
"-o",
"--output",
type=str,
help="Output file name. Use html ou image suffixes to choose the format.",
)
parser.add_argument(
"--token",
metavar="token",
help="force GitLab token, otherwise it's read from ~/.config/gitlab-token",
)
return parser.parse_args()
if __name__ == "__main__":
args = parse_args()
token = read_token(args.token)
gl = gitlab.Gitlab(url=GITLAB_URL, private_token=token, retry_transient_errors=True)
pipeline, _ = get_gitlab_pipeline_from_url(gl, args.pipeline_url)
fig = generate_gantt_chart(pipeline)
if args.output and "htm" in args.output:
fig.write_html(args.output)
elif args.output:
fig.update_layout(width=1000)
fig.write_image(args.output)
else:
fig.show()

10
bin/ci/ci_gantt_chart.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -eu
this_dir=$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")
readonly this_dir
exec \
"$this_dir/../python-venv.sh" \
"$this_dir/requirements.txt" \
"$this_dir/ci_gantt_chart.py" "$@"

178
bin/ci/ci_post_gantt.py Executable file
View File

@@ -0,0 +1,178 @@
#!/usr/bin/env python3
# Copyright © 2023 Collabora Ltd.
# Authors:
# Helen Koike <helen.koike@collabora.com>
#
# For the dependencies, see the requirements.txt
# SPDX-License-Identifier: MIT
import argparse
import gitlab
import re
import os
import pytz
import traceback
from datetime import datetime, timedelta
from gitlab_common import (
read_token,
GITLAB_URL,
get_gitlab_pipeline_from_url,
)
from ci_gantt_chart import generate_gantt_chart
MARGE_USER_ID = 9716 # Marge
LAST_MARGE_EVENT_FILE = os.path.expanduser("~/.config/last_marge_event")
def read_last_event_date_from_file():
try:
with open(LAST_MARGE_EVENT_FILE, "r") as f:
last_event_date = f.read().strip()
except FileNotFoundError:
# 3 days ago
last_event_date = (datetime.now() - timedelta(days=3)).isoformat()
return last_event_date
def pretty_time(time_str):
"""Pretty print time"""
local_timezone = datetime.now().astimezone().tzinfo
time_d = datetime.fromisoformat(time_str.replace("Z", "+00:00")).astimezone(
local_timezone
)
return f'{time_str} ({time_d.strftime("%d %b %Y %Hh%Mm%Ss")} {local_timezone})'
def compose_message(file_name, attachment_url):
return f"""
Here is the Gantt chart for the referred pipeline, I hope it helps 😄 (tip: click on the "Pan" button on the top right bar):
[{file_name}]({attachment_url})
<details>
<summary>more info</summary>
This message was generated by the ci_post_gantt.py script, which is running on a server at Collabora.
</details>
"""
def gitlab_upload_file_get_url(gl, project_id, filepath):
project = gl.projects.get(project_id)
uploaded_file = project.upload(filepath, filepath=filepath)
return uploaded_file["url"]
def gitlab_post_reply_to_note(gl, event, reply_message):
"""
Post a reply to a note in thread based on a GitLab event.
:param gl: The GitLab connection instance.
:param event: The event object containing the note details.
:param reply_message: The reply message.
"""
try:
note_id = event.target_id
merge_request_iid = event.note["noteable_iid"]
project = gl.projects.get(event.project_id)
merge_request = project.mergerequests.get(merge_request_iid)
# Find the discussion to which the note belongs
discussions = merge_request.discussions.list(as_list=False)
target_discussion = next(
(
d
for d in discussions
if any(n["id"] == note_id for n in d.attributes["notes"])
),
None,
)
if target_discussion is None:
raise ValueError("Discussion for the note not found.")
# Add a reply to the discussion
reply = target_discussion.notes.create({"body": reply_message})
return reply
except gitlab.exceptions.GitlabError as e:
print(f"Failed to post a reply to '{event.note['body']}': {e}")
return None
def parse_args() -> None:
parser = argparse.ArgumentParser(description="Monitor rejected pipelines by Marge.")
parser.add_argument(
"--token",
metavar="token",
help="force GitLab token, otherwise it's read from ~/.config/gitlab-token",
)
parser.add_argument(
"--since",
metavar="since",
help="consider only events after this date (ISO format), otherwise it's read from ~/.config/last_marge_event",
)
return parser.parse_args()
if __name__ == "__main__":
args = parse_args()
token = read_token(args.token)
gl = gitlab.Gitlab(url=GITLAB_URL, private_token=token, retry_transient_errors=True)
user = gl.users.get(MARGE_USER_ID)
last_event_at = args.since if args.since else read_last_event_date_from_file()
print(f"Retrieving Marge messages since {pretty_time(last_event_at)}\n")
# the "after" only considers the "2023-10-24" part, it doesn't consider the time
events = user.events.list(
all=True,
target_type="note",
after=(datetime.now() - timedelta(days=3)).isoformat(),
sort="asc",
)
last_event_at_date = datetime.fromisoformat(
last_event_at.replace("Z", "+00:00")
).replace(tzinfo=pytz.UTC)
for event in events:
created_at_date = datetime.fromisoformat(
event.created_at.replace("Z", "+00:00")
).replace(tzinfo=pytz.UTC)
if created_at_date <= last_event_at_date:
continue
last_event_at = event.created_at
match = re.search(r"https://[^ ]+", event.note["body"])
if match:
try:
print("Found message:", event.note["body"])
pipeline_url = match.group(0)[:-1]
pipeline, _ = get_gitlab_pipeline_from_url(gl, pipeline_url)
print("Generating gantt chart...")
fig = generate_gantt_chart(pipeline)
file_name = "Gantt.html"
fig.write_html(file_name)
print("Uploading gantt file...")
file_url = gitlab_upload_file_get_url(gl, event.project_id, file_name)
print("Posting reply ...\n")
message = compose_message(file_name, file_url)
gitlab_post_reply_to_note(gl, event, message)
except Exception as e:
print(f"Failed to generate gantt chart, not posting reply.{e}")
traceback.print_exc()
if not args.since:
print(
f"Updating last event date to {pretty_time(last_event_at)} on {LAST_MARGE_EVENT_FILE}\n"
)
with open(LAST_MARGE_EVENT_FILE, "w") as f:
f.write(last_event_at)

10
bin/ci/ci_post_gantt.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -eu
this_dir=$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")
readonly this_dir
exec \
"$this_dir/../python-venv.sh" \
"$this_dir/requirements.txt" \
"$this_dir/ci_post_gantt.py" "$@"

View File

@@ -20,24 +20,27 @@ from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor
from functools import partial
from itertools import chain
from subprocess import check_output
from subprocess import check_output, CalledProcessError
from typing import TYPE_CHECKING, Iterable, Literal, Optional
import gitlab
import gitlab.v4.objects
from colorama import Fore, Style
from gitlab_common import (
GITLAB_URL,
TOKEN_DIR,
get_gitlab_pipeline_from_url,
get_gitlab_project,
get_token_from_default_dir,
pretty_duration,
read_token,
wait_for_pipeline,
pretty_duration,
)
from gitlab_gql import GitlabGQL, create_job_needs_dag, filter_dag, print_dag
if TYPE_CHECKING:
from gitlab_gql import Dag
GITLAB_URL = "https://gitlab.freedesktop.org"
REFRESH_WAIT_LOG = 10
REFRESH_WAIT_JOBS = 6
@@ -63,6 +66,9 @@ def print_job_status(job, new_status=False) -> None:
if job.status == "canceled":
return
if new_status and job.status == "created":
return
if job.duration:
duration = job.duration
elif job.started_at:
@@ -114,10 +120,10 @@ def monitor_pipeline(
stress < 0
or sum(stress_status_counter[job.name].values()) < stress
):
enable_job(project, job, "retry", force_manual)
job = enable_job(project, pipeline, job, "retry", force_manual)
stress_status_counter[job.name][job.status] += 1
else:
enable_job(project, job, "target", force_manual)
job = enable_job(project, pipeline, job, "target", force_manual)
print_job_status(job, job.status not in target_statuses[job.name])
target_statuses[job.name] = job.status
@@ -130,7 +136,7 @@ def monitor_pipeline(
# run dependencies and cancel the rest
if job.name in dependencies:
enable_job(project, job, "dep", True)
job = enable_job(project, pipeline, job, "dep", True)
if job.status == "failed":
deps_failed.append(job.name)
else:
@@ -185,23 +191,37 @@ def monitor_pipeline(
pretty_wait(REFRESH_WAIT_JOBS)
def get_pipeline_job(
pipeline: gitlab.v4.objects.ProjectPipeline,
id: int,
) -> gitlab.v4.objects.ProjectPipelineJob:
pipeline_jobs = pipeline.jobs.list(all=True)
return [j for j in pipeline_jobs if j.id == id][0]
def enable_job(
project, job, action_type: Literal["target", "dep", "retry"], force_manual: bool
) -> None:
project: gitlab.v4.objects.Project,
pipeline: gitlab.v4.objects.ProjectPipeline,
job: gitlab.v4.objects.ProjectPipelineJob,
action_type: Literal["target", "dep", "retry"],
force_manual: bool,
) -> gitlab.v4.objects.ProjectPipelineJob:
"""enable job"""
if (
(job.status in ["success", "failed"] and action_type != "retry")
or (job.status == "manual" and not force_manual)
or job.status in ["skipped", "running", "created", "pending"]
):
return
return job
pjob = project.jobs.get(job.id, lazy=True)
if job.status in ["success", "failed", "canceled"]:
pjob.retry()
new_job = pjob.retry()
job = get_pipeline_job(pipeline, new_job["id"])
else:
pjob.play()
job = get_pipeline_job(pipeline, pjob.id)
if action_type == "target":
jtype = "🞋 "
@@ -212,6 +232,8 @@ def enable_job(
print(Fore.MAGENTA + f"{jtype} job {job.name} manually enabled" + Style.RESET_ALL)
return job
def cancel_job(project, job) -> None:
"""Cancel GitLab job"""
@@ -245,7 +267,7 @@ def print_log(project, job_id) -> None:
job = project.jobs.get(job_id)
# GitLab's REST API doesn't offer pagination for logs, so we have to refetch it all
lines = job.trace().decode("raw_unicode_escape").splitlines()
lines = job.trace().decode().splitlines()
for line in lines[printed_lines:]:
print(line)
printed_lines = len(lines)
@@ -267,13 +289,18 @@ def parse_args() -> None:
parser.add_argument(
"--target",
metavar="target-job",
help="Target job regex. For multiple targets, separate with pipe | character",
help="Target job regex. For multiple targets, pass multiple values, "
"eg. `--target foo bar`.",
required=True,
nargs=argparse.ONE_OR_MORE,
)
parser.add_argument(
"--token",
metavar="token",
help="force GitLab token, otherwise it's read from ~/.config/gitlab-token",
type=str,
default=get_token_from_default_dir(),
help="Use the provided GitLab token or token file, "
f"otherwise it's read from {TOKEN_DIR / 'gitlab-token'}",
)
parser.add_argument(
"--force-manual", action="store_true", help="Force jobs marked as manual"
@@ -334,8 +361,31 @@ def print_detected_jobs(
print_job_set(Fore.BLUE, "target", target_jobs)
def find_dependencies(target_jobs_regex: re.Pattern, project_path: str, iid: int) -> set[str]:
gql_instance = GitlabGQL()
def find_dependencies(token: str | None,
target_jobs_regex: re.Pattern,
project_path: str,
iid: int) -> set[str]:
"""
Find the dependencies of the target jobs in a GitLab pipeline.
This function uses the GitLab GraphQL API to fetch the job dependency graph
of a pipeline, filters the graph to only include the target jobs and their
dependencies, and returns the names of these jobs.
Args:
token (str | None): The GitLab API token. If None, the API is accessed without
authentication.
target_jobs_regex (re.Pattern): A regex pattern to match the names of the target jobs.
project_path (str): The path of the GitLab project.
iid (int): The internal ID of the pipeline.
Returns:
set[str]: A set of the names of the target jobs and their dependencies.
Raises:
SystemExit: If no target jobs are found in the pipeline.
"""
gql_instance = GitlabGQL(token=token)
dag = create_job_needs_dag(
gql_instance, {"projectPath": project_path.path_with_namespace, "iid": iid}
)
@@ -366,15 +416,7 @@ if __name__ == "__main__":
REV: str = args.rev
if args.pipeline_url:
assert args.pipeline_url.startswith(GITLAB_URL)
url_path = args.pipeline_url[len(GITLAB_URL):]
url_path_components = url_path.split("/")
project_name = "/".join(url_path_components[1:3])
assert url_path_components[3] == "-"
assert url_path_components[4] == "pipelines"
pipeline_id = int(url_path_components[5])
cur_project = gl.projects.get(project_name)
pipe = cur_project.pipelines.get(pipeline_id)
pipe, cur_project = get_gitlab_pipeline_from_url(gl, args.pipeline_url)
REV = pipe.sha
else:
mesa_project = gl.projects.get("mesa/mesa")
@@ -383,20 +425,58 @@ if __name__ == "__main__":
REV = mesa_project.mergerequests.get(args.mr).sha
else:
REV = check_output(['git', 'rev-parse', REV]).decode('ascii').strip()
if args.rev == 'HEAD':
try:
branch_name = check_output([
'git', 'symbolic-ref', '-q', 'HEAD',
]).decode('ascii').strip()
except CalledProcessError:
branch_name = ""
# Ignore detached heads
if branch_name:
tracked_remote = check_output([
'git', 'for-each-ref', '--format=%(upstream)',
branch_name,
]).decode('ascii').strip()
# Ignore local branches that do not track any remote
if tracked_remote:
remote_rev = check_output([
'git', 'rev-parse', tracked_remote,
]).decode('ascii').strip()
if REV != remote_rev:
print(
f"Local HEAD commit {REV[:10]} is different than "
f"tracked remote HEAD commit {remote_rev[:10]}"
)
print("Did you forget to `git push` ?")
projects.append(get_gitlab_project(gl, args.project))
(pipe, cur_project) = wait_for_pipeline(projects, REV)
print(f"Revision: {REV}")
print(f"Pipeline: {pipe.web_url}")
target_jobs_regex = re.compile(args.target.strip())
target = '|'.join(args.target)
target = target.strip()
deps = set()
if args.target:
print("🞋 job: " + Fore.BLUE + args.target + Style.RESET_ALL)
deps = find_dependencies(
target_jobs_regex=target_jobs_regex, iid=pipe.iid, project_path=cur_project
)
print("🞋 job: " + Fore.BLUE + target + Style.RESET_ALL)
# Implicitly include `parallel:` jobs
target = f'({target})' + r'( \d+/\d+)?'
target_jobs_regex = re.compile(target)
deps = find_dependencies(
token=token,
target_jobs_regex=target_jobs_regex,
iid=pipe.iid,
project_path=cur_project
)
target_job_id, ret = monitor_pipeline(
cur_project, pipe, target_jobs_regex, deps, args.force_manual, args.stress
)

View File

@@ -3,13 +3,33 @@
# Authors:
# Tomeu Vizoso <tomeu.vizoso@collabora.com>
# David Heidelberg <david.heidelberg@collabora.com>
# Guilherme Gallo <guilherme.gallo@collabora.com>
#
# SPDX-License-Identifier: MIT
'''Shared functions between the scripts.'''
import logging
import os
import re
import time
from typing import Optional
from pathlib import Path
GITLAB_URL = "https://gitlab.freedesktop.org"
TOKEN_DIR = Path(os.getenv("XDG_CONFIG_HOME") or Path.home() / ".config")
# Known GitLab token prefixes: https://docs.gitlab.com/ee/security/token_overview.html#token-prefixes
TOKEN_PREFIXES: dict[str, str] = {
"Personal access token": "glpat-",
"OAuth Application Secret": "gloas-",
"Deploy token": "gldt-",
"Runner authentication token": "glrt-",
"CI/CD Job token": "glcbt-",
"Trigger token": "glptt-",
"Feed token": "glft-",
"Incoming mail token": "glimt-",
"GitLab Agent for Kubernetes token": "glagent-",
"SCIM Tokens": "glsoat-"
}
def pretty_duration(seconds):
@@ -23,6 +43,19 @@ def pretty_duration(seconds):
return f"{seconds:0.0f}s"
def get_gitlab_pipeline_from_url(gl, pipeline_url):
assert pipeline_url.startswith(GITLAB_URL)
url_path = pipeline_url[len(GITLAB_URL) :]
url_path_components = url_path.split("/")
project_name = "/".join(url_path_components[1:3])
assert url_path_components[3] == "-"
assert url_path_components[4] == "pipelines"
pipeline_id = int(url_path_components[5])
cur_project = gl.projects.get(project_name)
pipe = cur_project.pipelines.get(pipeline_id)
return pipe, cur_project
def get_gitlab_project(glab, name: str):
"""Finds a specified gitlab project for given user"""
if "/" in name:
@@ -34,15 +67,81 @@ def get_gitlab_project(glab, name: str):
return glab.projects.get(project_path)
def read_token(token_arg: Optional[str]) -> str:
"""pick token from args or file"""
if token_arg:
return token_arg
return (
open(os.path.expanduser("~/.config/gitlab-token"), encoding="utf-8")
.readline()
.rstrip()
)
def get_token_from_default_dir() -> str:
"""
Retrieves the GitLab token from the default directory.
Returns:
str: The path to the GitLab token file.
Raises:
FileNotFoundError: If the token file is not found.
"""
token_file = TOKEN_DIR / "gitlab-token"
try:
return str(token_file.resolve())
except FileNotFoundError as ex:
print(
f"Could not find {token_file}, please provide a token file as an argument"
)
raise ex
def validate_gitlab_token(token: str) -> bool:
token_suffix = token.split("-")[-1]
# Basic validation of the token suffix based on:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/gems/gitlab-secret_detection/lib/gitleaks.toml
if not re.match(r"(\w+-)?[0-9a-zA-Z_\-]{20,64}", token_suffix):
return False
for token_type, token_prefix in TOKEN_PREFIXES.items():
if token.startswith(token_prefix):
logging.info(f"Found probable token type: {token_type}")
return True
# If the token type is not recognized, return False
return False
def get_token_from_arg(token_arg: str | Path | None) -> str | None:
if not token_arg:
logging.info("No token provided.")
return None
token_path = Path(token_arg)
if token_path.is_file():
return read_token_from_file(token_path)
return handle_direct_token(token_path, token_arg)
def read_token_from_file(token_path: Path) -> str:
token = token_path.read_text().strip()
logging.info(f"Token read from file: {token_path}")
return token
def handle_direct_token(token_path: Path, token_arg: str | Path) -> str | None:
if token_path == Path(get_token_from_default_dir()):
logging.warning(
f"The default token file {token_path} was not found. "
"Please provide a token file or a token directly via --token arg."
)
return None
logging.info("Token provided directly as an argument.")
return str(token_arg)
def read_token(token_arg: str | Path | None) -> str | None:
token = get_token_from_arg(token_arg)
if token and not validate_gitlab_token(token):
logging.warning("The provided token is either an old token or does not seem to "
"be a valid token.")
logging.warning("Newer tokens are the ones created from a Gitlab 14.5+ instance.")
logging.warning("See https://about.gitlab.com/releases/2021/11/22/"
"gitlab-14-5-released/"
"#new-gitlab-access-token-prefix-and-detection")
return token
def wait_for_pipeline(projects, sha: str, timeout=None):

View File

@@ -9,7 +9,6 @@ from collections import OrderedDict
from copy import deepcopy
from dataclasses import dataclass, field
from itertools import accumulate
from os import getenv
from pathlib import Path
from subprocess import check_output
from textwrap import dedent
@@ -17,6 +16,7 @@ from typing import Any, Iterable, Optional, Pattern, TypedDict, Union
import yaml
from filecache import DAY, filecache
from gitlab_common import get_token_from_default_dir
from gql import Client, gql
from gql.transport.requests import RequestsHTTPTransport
from graphql import DocumentNode
@@ -34,18 +34,6 @@ Dag = dict[str, DagNode]
StageSeq = OrderedDict[str, set[str]]
TOKEN_DIR = Path(getenv("XDG_CONFIG_HOME") or Path.home() / ".config")
def get_token_from_default_dir() -> str:
token_file = TOKEN_DIR / "gitlab-token"
try:
return str(token_file.resolve())
except FileNotFoundError as ex:
print(
f"Could not find {token_file}, please provide a token file as an argument"
)
raise ex
def get_project_root_dir():
@@ -241,7 +229,7 @@ def traverse_dag_needs(jobs_metadata: Dag) -> None:
partial = True
while partial:
next_depth: set[str] = {n for dn in final_needs for n in jobs_metadata[dn]["needs"]}
next_depth: set[str] = {n for dn in final_needs if dn in jobs_metadata for n in jobs_metadata[dn]["needs"]}
partial: bool = not final_needs.issuperset(next_depth)
final_needs = final_needs.union(next_depth)
@@ -355,8 +343,12 @@ def fetch_merged_yaml(gl_gql: GitlabGQL, params) -> dict[str, Any]:
- local: .gitlab-ci.yml
""")
raw_response = gl_gql.query("job_details.gql", params)
if merged_yaml := raw_response["ciConfig"]["mergedYaml"]:
ci_config = raw_response["ciConfig"]
if merged_yaml := ci_config["mergedYaml"]:
return yaml.safe_load(merged_yaml)
if "errors" in ci_config:
for error in ci_config["errors"]:
print(error)
gl_gql.invalidate_query_cache()
raise ValueError(

View File

@@ -1,7 +1,10 @@
colorama==0.4.5
filecache==0.81
gql==3.4.0
kaleido==0.2.1
python-dateutil==2.8.2
pandas==2.1.1
plotly==5.17.0
python-gitlab==3.5.0
PyYAML==6.0.1
ruamel.yaml.clib==0.2.8

View File

@@ -177,6 +177,8 @@ SOURCES = [
Source('include/vulkan/vulkan_xlib.h', 'https://github.com/KhronosGroup/Vulkan-Headers/raw/main/include/vulkan/vulkan_xlib.h'),
Source('include/vulkan/vulkan_xlib_xrandr.h', 'https://github.com/KhronosGroup/Vulkan-Headers/raw/main/include/vulkan/vulkan_xlib_xrandr.h'),
Source('include/vulkan/vk_android_native_buffer.h', 'https://android.googlesource.com/platform/frameworks/native/+/master/vulkan/include/vulkan/vk_android_native_buffer.h?format=TEXT'),
Source('include/vk_video/vulkan_video_codec_av1std.h', 'https://github.com/KhronosGroup/Vulkan-Headers/raw/main/include/vk_video/vulkan_video_codec_av1std.h'),
Source('include/vk_video/vulkan_video_codec_av1std_decode.h', 'https://github.com/KhronosGroup/Vulkan-Headers/raw/main/include/vk_video/vulkan_video_codec_av1std_decode.h'),
Source('include/vk_video/vulkan_video_codec_h264std.h', 'https://github.com/KhronosGroup/Vulkan-Headers/raw/main/include/vk_video/vulkan_video_codec_h264std.h'),
Source('include/vk_video/vulkan_video_codec_h264std_decode.h', 'https://github.com/KhronosGroup/Vulkan-Headers/raw/main/include/vk_video/vulkan_video_codec_h264std_decode.h'),
Source('include/vk_video/vulkan_video_codec_h264std_encode.h', 'https://github.com/KhronosGroup/Vulkan-Headers/raw/main/include/vk_video/vulkan_video_codec_h264std_encode.h'),

View File

@@ -33,15 +33,15 @@ Then, create your Meson cross file to use it, something like this
pkgconfig = ['env', 'PKG_CONFIG_LIBDIR=NDKDIR/pkgconfig', '/usr/bin/pkg-config']
[host_machine]
system = 'linux'
system = 'android'
cpu_family = 'arm'
cpu = 'armv8'
cpu = 'aarch64'
endian = 'little'
Now, use that cross file for your Android build directory (as in this
one cross-compiling the turnip driver for a stock Pixel phone)
.. code-block:: console
.. code-block:: sh
meson setup build-android-aarch64 \
--cross-file android-aarch64 \
@@ -61,21 +61,27 @@ read-only disk image on ``/vendor``. To be able to replace them for
driver development, we need to unlock the device and remount
``/vendor`` read/write.
.. code-block:: console
.. code-block:: sh
adb disable-verity
adb reboot
adb remount -R
adb remount
Now you can replace drivers as in:
.. code-block:: console
.. code-block:: sh
adb push build-android-aarch64/src/freedreno/vulkan/libvulkan_freedreno.so /vendor/lib64/hw/vulkan.sdm710.so
Note this command doesn't quite work because libvulkan wants the
SONAME to match. For now, in turnip we have been using a hack to the
meson.build to change the SONAME.
SONAME to match. You can use ``patchelf`` to fix this:
.. code-block:: sh
cp build-android-aarch64/src/freedreno/vulkan/libvulkan_freedreno.so /tmp/vulkan.sdm710.so
patchelf --set-soname vulkan.sdm710.so /tmp/vulkan.sdm710.so
adb push /tmp/vulkan.sdm710.so /vendor/lib64/hw/
Replacing Android drivers on Chrome OS
--------------------------------------
@@ -91,7 +97,7 @@ using scp from outside the container.
On your device, you'll want to make ``/`` read-write. ssh in as root
and run:
.. code-block:: console
.. code-block:: sh
crossystem dev_boot_signed_only=0
/usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions 4
@@ -100,7 +106,7 @@ and run:
Then, we'll switch Android from using an image for ``/vendor`` to using a
bind-mount from a directory we control.
.. code-block:: console
.. code-block:: sh
cd /opt/google/containers/android/
mkdir vendor-ro
@@ -123,7 +129,7 @@ change it to::
Now, restart the UI to do a full reload:
.. code-block:: console
.. code-block:: sh
restart ui
@@ -136,7 +142,7 @@ then the ``mount`` command should show::
Now, replacing your DRI driver with a new one built for Android should
be a matter of:
.. code-block:: console
.. code-block:: sh
scp msm_dri.so $HOST:/opt/google/containers/android/vendor-rw/lib64/dri/
@@ -149,7 +155,7 @@ available to the NDK, assuming you're building anything but the
Freedreno Vulkan driver for KGSL. You can mostly put things in place
with:
.. code-block:: console
.. code-block:: sh
scp $HOST:/opt/google/containers/android/vendor-rw/lib64/libdrm.so \
NDKDIR/sysroot/usr/lib/aarch64-linux-android/lib/
@@ -166,6 +172,6 @@ find you need to reload the whole Android container. To do so without
having to log in to Chrome again every time, you can just kill the
container and let it restart:
.. code-block:: console
.. code-block:: sh
kill $(cat /run/containers/android-run_oci/container.pid )

View File

@@ -35,7 +35,7 @@ than the given year.
For example, if the game was released in 2001, do
.. code-block:: console
.. code-block:: sh
export MESA_EXTENSION_MAX_YEAR=2001

View File

@@ -138,7 +138,7 @@ Setup
Each board will be registered in freedesktop.org GitLab. You'll want
something like this to register a fastboot board:
.. code-block:: console
.. code-block:: sh
sudo gitlab-runner register \
--url https://gitlab.freedesktop.org \
@@ -194,7 +194,7 @@ Caching downloads
To improve the runtime for downloading traces during traces job runs, you will
want a pass-through HTTP cache. On your runner box, install nginx:
.. code-block:: console
.. code-block:: sh
sudo apt install nginx libnginx-mod-http-lua
@@ -213,7 +213,7 @@ your devices are on.
Enable the site and restart nginx:
.. code-block:: console
.. code-block:: sh
sudo rm /etc/nginx/sites-enabled/default
sudo ln -s /etc/nginx/sites-available/fdo-cache /etc/nginx/sites-enabled/fdo-cache

View File

@@ -64,13 +64,13 @@ Farm management
When the farm starts failing for any reason (power, network, out-of-space), it needs to be disabled by pushing separate MR with
.. code-block:: console
.. code-block:: sh
git mv .ci-farms{,-disabled}/$farm_name
After farm restore functionality can be enabled by pushing a new merge request, which contains
.. code-block:: console
.. code-block:: sh
git mv .ci-farms{-disabled,}/$farm_name
@@ -279,7 +279,7 @@ command`` instead of ``run -it $IMAGE bash`` (which you may also find
useful for debug). Extract your build setup variables from
.gitlab-ci.yml and run the CI meson build script:
.. code-block:: console
.. code-block:: sh
IMAGE=registry.freedesktop.org/anholt/mesa/debian/android_build:2020-09-11
sudo docker pull $IMAGE
@@ -288,7 +288,7 @@ useful for debug). Extract your build setup variables from
All you have left over from the build is its output, and a _build
directory. You can hack on mesa and iterate testing the build with:
.. code-block:: console
.. code-block:: sh
sudo docker run --rm -v `pwd`:/mesa $IMAGE meson compile -C /mesa/_build
@@ -305,6 +305,12 @@ The ``--target`` argument takes a regex that you can use to select the
jobs names you want to run, eg. ``--target 'zink.*'`` will run all the
zink jobs, leaving the other drivers' jobs free for others to use.
Note that in fork pipelines, GitLab only adds the jobs for the files that have
changed **since the last push**, so you might not get the jobs you expect.
You can work around that by adding a dummy change in a file core to what you're
working on and then making a new push with that change, and removing that change
before you create the MR.
Conformance Tests
-----------------

View File

@@ -12,7 +12,7 @@ Running single trace
--------------------
A simple run to see the output of the trace can be done with
.. code-block:: console
.. code-block:: sh
apitrace replay -w name_of_trace.trace
@@ -20,7 +20,7 @@ For more information, look into the `Apitrace documentation <https://github.com/
For comparing checksums use:
.. code-block:: console
.. code-block:: sh
cd piglit/replayer
export PIGLIT_SOURCE_DIR="../"
@@ -34,7 +34,7 @@ Sometimes it's useful to be able to test traces on your local machine instead of
Download the YAML file from your driver's ``ci/`` directory and then change the path in the YAML file from local proxy or MinIO to the local directory (url-like format ``file://``)
.. code-block:: console
.. code-block:: sh
# The PIGLIT_REPLAY_DEVICE_NAME has to match name in the YAML file.
export PIGLIT_REPLAY_DEVICE_NAME='your_device_name'

View File

@@ -126,7 +126,7 @@ Basic formatting guidelines
- This GNU indent command generally does the right thing for
formatting:
.. code-block:: console
.. code-block:: sh
indent -br -i3 -npcs --no-tabs infile.c -o outfile.c

View File

@@ -28,13 +28,13 @@ Mesa releases are available in two formats: ``.tar.xz`` and ``.tar.gz``.
To unpack the tarball:
.. code-block:: console
.. code-block:: sh
tar xf mesa-Y.N.P.tar.xz
or
.. code-block:: console
.. code-block:: sh
tar xf mesa-Y.N.P.tar.gz

View File

@@ -7,26 +7,37 @@ Debugging
Here are a few environment variable debug environment variables
specific to ANV:
:envvar:`ANV_ENABLE_PIPELINE_CACHE`
.. envvar:: ANV_ENABLE_PIPELINE_CACHE
If defined to ``0`` or ``false``, this will disable pipeline
caching, forcing ANV to reparse and recompile any VkShaderModule
(SPIRV) it is given.
:envvar:`ANV_DISABLE_SECONDARY_CMD_BUFFER_CALLS`
.. envvar:: ANV_DISABLE_SECONDARY_CMD_BUFFER_CALLS
If defined to ``1`` or ``true``, this will prevent usage of self
modifying command buffers to implement ``vkCmdExecuteCommands``. As
a result of this, it will also disable :ext:`VK_KHR_performance_query`.
:envvar:`ANV_ALWAYS_BINDLESS`
.. envvar:: ANV_ALWAYS_BINDLESS
If defined to ``1`` or ``true``, this forces all descriptor sets to
use the internal `Bindless model`_.
:envvar:`ANV_QUEUE_THREAD_DISABLE`
.. envvar:: ANV_QUEUE_THREAD_DISABLE
If defined to ``1`` or ``true``, this disables support for timeline
semaphores.
:envvar:`ANV_USERSPACE_RELOCS`
.. envvar:: ANV_USERSPACE_RELOCS
If defined to ``1`` or ``true``, this forces ANV to always do
kernel relocations in command buffers. This should only have an
effect on hardware that doesn't support soft-pinning (Ivybridge,
Haswell, Cherryview).
:envvar:`ANV_PRIMITIVE_REPLICATION_MAX_VIEWS`
.. envvar:: ANV_PRIMITIVE_REPLICATION_MAX_VIEWS
Specifies up to how many view shaders can be lowered to handle
:ext:`VK_KHR_multiview`. Beyond this number, multiview is implemented
using instanced rendering. If unspecified, the value default to
@@ -388,3 +399,13 @@ executed :
"main-command-buffer":f1 -> "ring-buffer":f1 [color="#0000ff"];
"main-command-buffer":f1 -> "ring-buffer":f2 [color="#0000ff"];
}
Runtime dependencies
--------------------
Starting with Intel 12th generation/Alder Lake-P and Intel Arc Alchemist, the Intel 3D driver stack requires GuC firmware for proper operation. You have two options to install the firmware:
- Distro package: Install the pre-packaged firmware included in your Linux distribution's repositories.
- Manual download: You can download the firmware from the official repository: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915. Place the downloaded files in the /lib/firmware/i915 directory.
Important: For optimal performance, we recommend updating the GuC firmware to version 70.6.3 or later.

View File

@@ -205,8 +205,7 @@ Strided linear images have numerous limitations:
- Strides must be a multiple of 16 bytes.
- Strides must be nonzero. For 1D images where the stride is logically
irrelevant, ail will internally select the minimal stride.
- Only 1D and 2D images may be linear. In particular, no 3D or cubemaps.
- Array texture may not be linear. No 2D arrays or cubemap arrays.
- Only 1D, 2D, and 2D Array images may be linear. In particular, no 3D or cubemaps.
- 2D images must not be mipmapped.
- Block-compressed formats and multisampled images are unsupported. Elements of
a strided linear image are simply pixels.
@@ -307,14 +306,14 @@ useful for exercising the compiler. To build, use options:
Then run an OpenGL workload with environment variable:
.. code-block:: console
.. code-block:: sh
LD_PRELOAD=~/mesa/build/src/asahi/drm-shim/libasahi_noop_drm_shim.so
For example to compile a shader with shaderdb and print some statistics along
with the IR:
.. code-block:: console
.. code-block:: sh
~/shader-db$ AGX_MESA_DEBUG=shaders,shaderdb ASAHI_MESA_DEBUG=precompile LIBGL_DRIVERS_PATH=~/lib/dri/ LD_PRELOAD=~/mesa/build/src/asahi/drm-shim/libasahi_noop_drm_shim.so ./run shaders/glmark/1-12.shader_test
@@ -362,3 +361,7 @@ concepts used in PowerVR GPUs appear in AGX.
Pixel BackEnd
Hardware unit which writes to color attachements and images. Also the
name for a descriptor passed to :term:`PBE` instructions.
UVS
Unified Vertex Store
Hardware unit which buffers the outputs of the vertex shader (varyings).

View File

@@ -308,7 +308,7 @@ the GPU (including its internal hang detection). If a fault in GPU address
space happened, you should expect to find a message from the iommu, with the
faulting address and a hardware unit involved:
.. code-block:: console
.. code-block:: text
*** gpu fault: ttbr0=000000001c941000 iova=000000010066a000 dir=READ type=TRANSLATION source=TP|VFD (0,0,0,1)
@@ -346,7 +346,7 @@ though going here is the last resort and likely won't be helpful.
The ``PC`` value is an instruction address in the current firmware.
You would need to disassemble the firmware (/lib/firmware/qcom/aXXX_sqe.fw) via:
.. code-block:: console
.. code-block:: sh
afuc-disasm -v a650_sqe.fw > a650_sqe.fw.disasm
@@ -369,18 +369,17 @@ Command Stream Capture
^^^^^^^^^^^^^^^^^^^^^^
During Mesa development, it's often useful to look at the command streams we
send to the kernel. Mesa itself doesn't implement a way to stream them out
(though it maybe should!). Instead, we have an interface for the kernel to
capture all submitted command streams:
send to the kernel. We have an interface for the kernel to capture all
submitted command streams:
.. code-block:: console
.. code-block:: sh
cat /sys/kernel/debug/dri/0/rd > cmdstream &
By default, command stream capture does not capture texture/vertex/etc. data.
You can enable capturing all the BOs with:
.. code-block:: console
.. code-block:: sh
echo Y > /sys/module/msm/parameters/rd_full
@@ -391,6 +390,29 @@ probably want to cause a crash in the GPU during a frame of interest so that a
single GPU core dump is generated. Emitting ``0xdeadbeef`` in the CS should be
enough to cause a fault.
``fd_rd_output`` facilities provide support for generating the command stream
capture from inside Mesa. Different ``FD_RD_DUMP`` options are available:
- ``enable`` simply enables dumping the command stream on each submit for a
given logical device. When a more advanced option is specified, ``enable`` is
implied as specified.
- ``combine`` will combine all dumps into a single file instead of writing the
dump for each submit into a standalone file.
- ``full`` will dump every buffer object, which is necessary for replays of
command streams (see below).
- ``trigger`` will establish a trigger file through which dumps can be better
controlled. Writing a positive integer value into the file will enable dumping
of that many subsequent submits. Writing -1 will enable dumping of submits
until disabled. Writing 0 (or any other value) will disable dumps.
Output dump files and trigger file (when enabled) are hard-coded to be placed
under ``/tmp``, or ``/data/local/tmp`` under Android. `FD_RD_DUMP_TESTNAME` can
be used to specify a more descriptive prefix for the output or trigger files.
Functionality is generic to any Freedreno-based backend, but is currently only
integrated in the MSM backend of Turnip. Using the existing ``TU_DEBUG=rd``
option will translate to ``FD_RD_DUMP=enable``.
Capturing Hang RD
+++++++++++++++++
@@ -400,7 +422,7 @@ Additionally it is geared towards analyzing the GPU state at the moment of the c
Alternatively, it's possible to obtain the whole submission with all command
streams via ``/sys/kernel/debug/dri/0/hangrd``:
.. code-block:: console
.. code-block:: sh
sudo cat /sys/kernel/debug/dri/0/hangrd > logfile.rd // Do the cat _before_ the expected hang
@@ -410,7 +432,7 @@ The format of hangrd is the same as in ordinary command stream capture.
Replaying Command Stream
^^^^^^^^^^^^^^^^^^^^^^^^
`replay` tool allows capturing and replaying ``rd`` to reproduce GPU faults.
``replay`` tool allows capturing and replaying ``rd`` to reproduce GPU faults.
Especially useful for transient GPU issues since it has much higher chances to
reproduce them.
@@ -419,21 +441,21 @@ Dumping rendering results or even just memory is currently unsupported.
- Replaying command streams requires kernel with ``MSM_INFO_SET_IOVA`` support.
- Requires ``rd`` capture to have full snapshots of the memory (``rd_full`` is enabled).
Replaying is done via `replay` tool:
Replaying is done via ``replay`` tool:
.. code-block:: console
.. code-block:: sh
./replay test_replay.rd
More examples:
.. code-block:: console
.. code-block:: sh
./replay --first=start_submit_n --last=last_submit_n test_replay.rd
.. code-block:: console
.. code-block:: sh
./replay --override=0 --generator=./generate_rd test_replay.rd
./replay --override=0 test_replay.rd
Editing Command Stream (a6xx+)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -446,24 +468,24 @@ Given the address space bounds the generated program creates a new ``rd`` which
could be used to override cmdstream with 'replay'. Generated ``rd`` is not replayable
on its own and depends on buffers provided by the source ``rd``.
C source could be compiled using rdcompiler-meson.build as an example.
C source could be compiled by putting it into src/freedreno/decode/generate-rd.cc.
The workflow would look like this:
1. Find the cmdstream № you want to edit;
2. Decompile it:
.. code-block:: console
.. code-block:: sh
./rddecompiler -s %cmd_stream_n% example.rd > generate_rd.c
./rddecompiler -s %cmd_stream_n% example.rd > src/freedreno/decode/generate-rd.cc
3. Edit the command stream;
4. Compile it back, see rdcompiler-meson.build for the instructions;
3. Edit the command stream;;
4. Compile and deploy freedreno tools;
5. Plug the generator into cmdstream replay:
.. code-block:: console
.. code-block:: sh
./replay --override=%cmd_stream_№% --generator=~/generate_rd
./replay --override=%cmd_stream_№%
6. Repeat 3-5.
@@ -529,7 +551,7 @@ because it would require much less breadcrumb writes and syncs.
Breadcrumbs settings:
.. code-block:: console
.. code-block:: sh
TU_BREADCRUMBS=%IP%:%PORT%,break=%BREAKPOINT%:%BREAKPOINT_HITS%
@@ -544,26 +566,26 @@ A typical work flow would be:
- Start listening for breadcrumbs on a remote host:
.. code-block:: console
.. code-block:: sh
nc -lvup $PORT | stdbuf -o0 xxd -pc -c 4 | awk -Wposix '{printf("%u:%u\n", "0x" $0, a[$0]++)}'
- Start capturing command stream;
- Replay the hanging trace with:
.. code-block:: console
.. code-block:: sh
TU_BREADCRUMBS=$IP:$PORT,break=-1:0
- Increase hangcheck period:
.. code-block:: console
.. code-block:: sh
echo -n 60000 > /sys/kernel/debug/dri/0/hangcheck_period_ms
- After GPU hang note the last breadcrumb and relaunch trace with:
.. code-block:: console
.. code-block:: sh
TU_BREADCRUMBS=%IP%:%PORT%,break=%LAST_BREADCRUMB%:%HITS%
@@ -589,7 +611,7 @@ Finding instances of stale reg reads
Turnip has a debug option to stomp the registers with invalid values to catch
the cases where stale data is read.
.. code-block:: console
.. code-block:: sh
MESA_VK_ABORT_ON_DEVICE_LOSS=1 \
TU_DEBUG_STALE_REGS_RANGE=0x00000c00,0x0000be01 \
@@ -608,9 +630,9 @@ the cases where stale data is read.
``renderpass``
stomp registers before each renderpass.
``inverse``
changes `TU_DEBUG_STALE_REGS_RANGE` meaning to
changes ``TU_DEBUG_STALE_REGS_RANGE`` meaning to
"regs that should NOT be stomped".
The best way to pinpoint the reg which causes a failure is to bisect the regs
range. In case when a fail is caused by combination of several registers
the `inverse` flag may be set to find the reg which prevents the failure.
the ``inverse`` flag may be set to find the reg which prevents the failure.

View File

@@ -55,6 +55,7 @@ These are some display drivers that have been tested with Lima:
- Exynos: ``exynos``
- Rockchip: ``rockchip``
- Tiny DRM: ``tinydrm``
- Xilinx ZynqMP: ``zynqmp-dpsub``
Environment variables
---------------------

Some files were not shown because too many files have changed in this diff Show More