Mike Blumenkrantz
283de45fd6
zink: add a util function for creating semaphores
...
annoying to keep copy/pasting this around
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20681 >
2023-01-19 20:26:44 +00:00
Mike Blumenkrantz
020db79340
zink: preserve present resources during async presentation
...
ensure that these have a lifetime great enough to be presented
fixes #7781
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20793 >
2023-01-19 20:00:14 +00:00
Eric Engestrom
482e215a67
ci/bare-metal: add more timestamps to help debugging issues
...
Acked-by: Emma Anholt <emma@anholt.net >
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20792 >
2023-01-19 19:05:35 +00:00
Mike Blumenkrantz
7f0e213a57
zink: NV_compute_shader_derivatives
...
nothing complicated here
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12120 >
2023-01-19 18:00:22 +00:00
Julia Tatz
c71287e70c
zink: correct sparse bo mem_type_idx placement
...
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x01 has been incidently the
correct memory type index, but isn't guaranteed to be, which is why it
hasn't caused issues yet
Fixes: f9515d93 ("zink: allocate/place memory using memoryTypeIndex directly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264 >
2023-01-19 17:20:00 +00:00
Julia Tatz
e20e8f2243
zink: trival renames heap_idx -> memoryTypeIndex
...
Trival renames to correctly identify vulkan memory type indices aren't
the same as zink heaps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264 >
2023-01-19 17:20:00 +00:00
Julia Tatz
f6d3a5755f
zink: zink_heap isn't 1-to-1 with memoryTypeIndex
...
Clarify the relationship between zink heaps and vulkan memory type
indices, and resolve the issues from mixing the two up.
Closes : #7588 , #7813
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264 >
2023-01-19 17:20:00 +00:00
Dylan Baker
75276deebc
meson: Use feature option methods for xmlconfig
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
37463bedec
meson: use a feature option for shared-llvm
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
c52c2ed0f8
meson: use a feature option for egl
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
afa97e7468
meson: use a feature option for zstd
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
e3f60ea4a8
meson: use a feature option for xlib-lease
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
ce490a20e7
meson: use a feature option for power8
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
2653fe11c9
meson: use a feature option for lmsensors
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
202344e9a0
meson: use a feature option for libunwind
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
3f10a89180
meson: use a feature option for valgrind
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
d00c6e0fd7
meson: use a feature option for llvm
...
Still not as awesome as it should be, but an improvement over what we had
before.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
c40e1bb1d0
meson: use a feature option for gbm
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
6b334a8416
meson: use a feature option for gles2
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
ca615a4f16
meson: use a feature option for gles1
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
80eb78d7a4
meson: use a feature option for shared-glapi
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
98bd7cdb8c
meson: use a feature option for shader_cache
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
b200d547dc
meson: use a feature option for gallium-xa
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
6f66b89ac3
meson: use a feature option for gallium-va
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
eac76e433d
meson: use a feature option for gallium-vdpau
...
Which we can use with the require method, and use the feature itself
as the require argument to dependency call. All of this results in less
code
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
8dcc1f8311
meson: use a feature option for dri3
...
This removes the deprecated 'true' and 'false' options, and uses a meson
feature, requiring significantly less code.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
643af2cf83
meson: drop meson < 0.54 workaround
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
3c5e969144
meson: replace uses of ExternalProgram.path with .full_path
...
The former is deprecated
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
92235e0c48
meson: replace has_exe_wrapper with can_run_host_binaries
...
The former is a deprecated alias for the latter, which more accurately
describes what the function does.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Dylan Baker
45632b3297
meson: bump minimum required version to meson 0.59
...
This gives us some utility methods for feature options, allowing even
simpler code. We can replace something like:
```meson
_opt = get_option('opt')
if _opt.auto()
opt = host_machine.system() != 'windows'
else
opt = opt.enabled()
endif
```
with
```meson
opt = get_option('opt') \
.disable_auto_if(host_machine.system() != 'windows') \
.allowed()
```
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409 >
2023-01-19 16:29:03 +00:00
Mike Blumenkrantz
6ff334e54a
zink: handle modifier nplanes queries correctly for planar formats
...
this just returns the number of planes in the base format as a default, which
matches the behavior of other drivers
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20753 >
2023-01-19 16:01:14 +00:00
Mike Blumenkrantz
072e29a22e
zink: store drm format as internal_format for imported resources
...
internal_format is the "real" format of a resource, and the "real" format
of imported resources is the external-facing format, not the pipe format
this ensures the correct format is available for internal ops, such as nplanes queries
Fixes: 2e2775c11b ("zink: fix PIPE_RESOURCE_PARAM_NPLANES with format modifier")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20753 >
2023-01-19 16:01:14 +00:00
Samuel Pitoiset
700bc2dae0
radv: rename ac_surf_nbc_view::max_mip to num_levels
...
For readability.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20761 >
2023-01-19 12:46:07 +00:00
Samuel Pitoiset
8d191b2cfb
radv: fix creating BC image views when the base layer is > 0
...
When the base array layer of the image view is > 0, addrlib computes
the offset (in HwlComputeSubResourceOffsetForSwizzlePattern) which is
then added to the base VA in RADV. But if the driver doesn't reset
the base array layer, the hw will compute incorrect addressing
(ie. base array will be added twice). This also matches AMDVLK.
This fixes a VM fault followed by a GPU hang on RDNA2 when trying
to join a multiplayer game with medium settings in Halo Infinite.
Fixes: 98ba1e0d81 ("radv: Fix mipmap views on GFX10+")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20761 >
2023-01-19 12:46:07 +00:00
Samuel Pitoiset
18aaa373b7
radv: fix buffer to image copies with BC views on the graphics queue
...
The color surface descriptor needs to be adjusted, otherwise addressing
is wrong.
Fixes tests performed on the graphics queue from
dEQP-VK.api.copy_and_blit.*.image_to_buffer.2d_images.mip_copies_*.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7900
Fixes: 98ba1e0d81 ("radv: Fix mipmap views on GFX10+")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20761 >
2023-01-19 12:46:07 +00:00
Samuel Pitoiset
aff5fe3f94
radv: fix setting MAX_MIP for BC views
...
MAX_MIP should always be the number of levels minus one from the hw
perspective.
This doesn't fix anything known.
Fixes: 98ba1e0d81 ("radv: Fix mipmap views on GFX10+")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20761 >
2023-01-19 12:46:07 +00:00
Eric Engestrom
34e6530518
mesa/st: drop unused param
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20772 >
2023-01-19 10:10:45 +00:00
Pierre-Eric Pelloux-Prayer
ddc721e15c
glthread: fix glArrayElement handling
...
This must be marshalled synchronously or the attrib pointers' content
might change by the time we use them.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8068
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20748 >
2023-01-19 09:42:34 +00:00
Pierre-Eric Pelloux-Prayer
0f5c8c3dc3
vbo: lower VBO_SAVE_BUFFER_SIZE to avoid large VRAM usage
...
The ideal case for performance is to have a single buffer for
all display list. The caveat is that large buffers are less
likely to be freed because they're refcounted: it only takes
1 user (diplay list) to keep it in VRAM.
This lowers VRAM usage when replaying the trace attached
of the trace attached to !6140 from 5.5 GB to about 1.8 GB.
Viewperf snx performance isn't affected.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6140
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20748 >
2023-01-19 09:42:34 +00:00
Pierre-Eric Pelloux-Prayer
491f6b138e
vbo: remove bogus assert
...
grow_vertex_storage may call wrap_filled_vertex, which will
trigger the assert incorrectly because the new size will be
smaller than 'new_size' but it's correct because
'vertex_store->used' has been reset to 0.
Fixes: a08baaff97 ("vbo/dlist: fix indentation in vbo_save_api.c")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20748 >
2023-01-19 09:42:34 +00:00
Lionel Landwerlin
ff34e96701
nir/lower_io: fix bounds checking for 64bit_bounded_global
...
If the offset is negative like it's the case in
dEQP-VK.robustness.robustness2.bind.notemplate.r32i.unroll.volatile.storage_buffer_dynamic.readwrite.no_fmt_qual.len_256.samples_1.1d.comp
we end up passing the bounds checking condition because it's using
signed integers.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Suggested-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20762 >
2023-01-19 09:16:40 +00:00
Kenneth Graunke
7092c1218a
intel/compiler: Use more symbolic source names in components_read()
...
Rather than hardcoding source 1, source 2, etc.
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/20604 >
2023-01-19 08:42:22 +00:00
Kenneth Graunke
16b66ab659
intel/compiler: Drop dest checking in atomic code
...
NIR atomic operation intrinsics all have destinations. This is just
copy and pasted from other generic intrinsic handling where that may
or may not be the case.
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/20604 >
2023-01-19 08:42:22 +00:00
Kenneth Graunke
780f3e2e6b
intel/compiler: Delete all the A64 atomic variants for type sizes
...
These are handled identically in almost all cases. There is one place
in the legacy surface lowering that was obtaining the bitsize from the
opcode, but the LSC-based lowering uses (type_sz(inst->dst.type) * 8)
for that and works just fine. If we just do that in the legacy lowering
too, then we don't need this plethora of opcodes.
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/20604 >
2023-01-19 08:42:22 +00:00
Kenneth Graunke
03ddde1230
intel/compiler: Combine nir_emit_{ssbo,shared}_atomic into one helper
...
These are basically identical save for:
- shared has surface hardcoded to SLM rather than an SSBO index
- shared has to handle adding the 'base' const_index (SSBO have none)
- the NIR source index for data is shifted by one
It's not worth copy and pasting the entire function for this.
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/20604 >
2023-01-19 08:42:22 +00:00
Kenneth Graunke
b84939c678
intel/compiler: Delete fs_visitor::nir_emit_{ssbo,shared}_atomic_float()
...
These are now basically identical to their non-float counterparts. The
only thing that differed was the opcode checking to determine which
operands existed. Now that we have a unified opcode enum and a helper
for the number of data operands, we can just use that.
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/20604 >
2023-01-19 08:42:22 +00:00
Kenneth Graunke
f7b29d7924
intel/compiler: Drop redundant 32-bit expansion for shared float atomics
...
We already expanded data to 32-bit a few lines earlier, so this is just
redundantly doing it a second time.
Fixes: 43169dbbe5 ("intel/compiler: Support 16 bit float ops")
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/20604 >
2023-01-19 08:42:22 +00:00
Kenneth Graunke
02129eee3a
intel/compiler: Eliminate SHADER_OPCODE_UNTYPED_ATOMIC_FLOAT
...
The only reason for the separate opcode was because of the overlapping
BRW_AOP_* enums, making it impossible to tell whether a particular AOP
was the integer or float operation. Now that we use the lsc_opcode
enums, we can just have the legacy lowering inspect the opcode and
select the right descriptor. No need for a separate opcode.
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/20604 >
2023-01-19 08:42:22 +00:00
Kenneth Graunke
284f0c9a57
intel/compiler: Add an lsc_op_num_data_values() helper
...
There are a number of places that need to know how many operands an LSC
atomic takes (0 for inc/dec, 1 for most things, 2 for cmpxchg). We can
add a helper for that and eliminate some code (with more to come).
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/20604 >
2023-01-19 08:42:22 +00:00
Kenneth Graunke
90a2137cd5
intel/compiler: Use LSC opcode enum rather than legacy BRW_AOPs
...
This gets our logical atomic messages using the lsc_opcode enum rather
than the legacy BRW_AOP_* defines. We have to translate one way or
another, and using the modern set makes sense going forward.
One advantage is that the lsc_opcode encoding has opcodes for both
integer and floating point atomics in the same enum, whereas the legacy
encoding used overlapping values (BRW_AOP_AND == 1 == BRW_AOP_FMAX),
which made it impossible to handle both sensibly in common code.
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/20604 >
2023-01-19 08:42:22 +00:00