Faith Ekstrand
829b3c0106
vulkan: Add common vkCmdBegin/EndQuery wrappers
...
These are identical to the IndexedEXT versions with index == 0.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24335 >
2023-07-31 17:01:41 +00:00
Faith Ekstrand
f7e5e2cc4f
vulkan: Add a vk_query_pool base object
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24335 >
2023-07-31 17:01:41 +00:00
Faith Ekstrand
25b1e349c6
vulkan: Add a more direct way to use a NIR shader
...
This follows the pipeline libraries method of including SPIR-V and lets
you provide the NIR shader without wrapping it in a VkShaderModule.
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24335 >
2023-07-31 17:01:41 +00:00
Faith Ekstrand
b083f44303
vulkan: Add a core vk_buffer_view struct
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24335 >
2023-07-31 17:01:41 +00:00
José Roberto de Souza
fa73130d9b
iris: Add support for userptr in Xe KMD
...
Xe KMD only requires userptr to be bound to VM, so here returning
UINT32_MAX as gem_handle in Xe version of gem_create_userptr() for all
userptr bos.
As no bo is created it was also necessary to add additional handling
to xe_gem_close().
The vm bind side of userptr was already implemented, so it was only
necessary add the special handling and the kmd vm bind call.
This fixes piglit@amd_pinned_memory subtests that makes uses of
userptr.
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/23817 >
2023-07-31 16:38:46 +00:00
José Roberto de Souza
b38f7834f5
iris: Add gem_create_userptr() to KMD backend
...
Xe support of userptr will be implemented in the next patch,
this is just moving the i915 function to KMD backend.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23817 >
2023-07-31 16:38:46 +00:00
José Roberto de Souza
0698bc9e5a
iris: Move iris_bufmgr_bo_close() to kmd backend
...
The next patch will need a special handling when closing userptr bos
in Xe KMD, so here moving iris_bufmgr_bo_close() to kmd backend
and changing the gem_handle parameter to iris_bo.
There still one DRM_IOCTL_GEM_CLOSE call left in iris_bufmgr, that
is used to close exported gem handles.
iris_bufmgr_get_for_fd() could be used to get the iris_bufmgr but
we would still have problems with bo_export != iris_bo, so leaving
as is until a better solution is found.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23817 >
2023-07-31 16:38:46 +00:00
José Roberto de Souza
36bc3da586
iris: Move i915_gem_set_domain() call to i915 backend
...
This was being called from the common code, so it was being executed
for Xe KMD.
Luckily Xe don't have any uAPI at 0x1f offset.
There is still one user of i915_gem_set_domain() in iris_bufmgr.c
so it was duplicated in i915 backend but a future patch in this series
will take to remove it when the userptr code moves to backend.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23817 >
2023-07-31 16:38:46 +00:00
Rohan Garg
7f6e6eb8ec
anv: partially revert 2e8b1f6d
...
set_image_compressed_bit checks for the image aux usage whereas
cmd_buffer_mark_image_written checks for the subresource's aux usage.
Signed-off-by: Rohan Garg <rohan.garg@intel.com >
Fixes: 2e8b1f6d ('anv: drop duplicate checks when setting the compressed bit')
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24363 >
2023-07-31 15:06:39 +00:00
Lionel Landwerlin
c1c0311d42
anv: enable EDS3 ConservativeRasterizationMode
...
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/24395 >
2023-07-31 12:30:37 +00:00
Lionel Landwerlin
a0179c32b6
anv: fix 3DSTATE_RASTER::APIMode field setting
...
The APIMode field is set in the dynamic part in gfx8_cmd_buffer.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 55951ac28e ("anv: fix emitting dynamic primitive topology")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24395 >
2023-07-31 12:30:37 +00:00
Rhys Perry
e88c077096
radv: workaround WWZ exporting index=1 through location=1
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Fixes: 290c3d360e ("aco,radv: lower outputs to exports when nir for monolithic ps")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9232
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24354 >
2023-07-31 11:38:14 +00:00
Gert Wollny
618fc13db7
r600/sfn: Don't try to propagate to vec4 with more than one use
...
Otherwise we end up with weird dependencies that make the scheduler
choke.
Fixes: 18a8d148d8
r600/sfn: Cleanup copy-prop into vec4 source values
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24393 >
2023-07-31 09:37:20 +02:00
Yiwei Zhang
03ff3c0027
venus: suppress a false logging
...
Should only log when there's batched query feedbacks in the suspended
render pass instance. Additionally gate behind debug option.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24379 >
2023-07-30 14:33:34 +00:00
Gert Wollny
99aeea467b
r600: Force CF when emitting a NOP on R600 in gs copy shader
...
Fixes: 9d4104d4fb
r600: Explicitly force new CF in gs copy shader
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24391 >
2023-07-30 13:41:50 +00:00
Karol Herbst
8d7f682bdb
nv50/ir/nir: Fix zero source handling of tex instructions.
...
For TXQ we know make sure that we at least add one source. If the nir
instruction however didn't had any sources, we inserted a fake 0 source
ending up with two 0s for TXQ.
It's unclear to me if we have other ops where this would be necessary.
Fixes: 85a31fa1fc ("nv50/ir/nir: fix txq emission on MS textures")
Signed-off-by: Karol Herbst <git@karolherbst.de >
Acked-by: M Henning <drawoc@darkrefraction.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24373 >
2023-07-29 19:01:40 +00:00
Jordan Justen
5df97c27dc
intel/compiler: Use nir SUBGROUP_INVOCATION for RT TOPOLOGY_ID
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21774 >
2023-07-28 22:54:59 +00:00
Jordan Justen
dbf19b76e8
intel/isl: Use intel_needs_workaround() for MTL CCS WA
...
Also use parent WA number of 14017240301 instead of 14017353530.
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22401 >
2023-07-28 15:23:47 -07:00
Eric Engestrom
23b45c5a29
lavapipe/ci: use tighter changes: rules
...
This removes src/{egl,glx,loader,mapi,mesa}/* from the match.
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24372 >
2023-07-28 21:20:38 +00:00
Faith Ekstrand
0831f93e5f
nir/builder: Add a nir_txs_deref() helper
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24375 >
2023-07-28 20:39:07 +00:00
Faith Ekstrand
ee0942f7a6
nir/builder: Allow tex helpers on image types
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24375 >
2023-07-28 20:39:07 +00:00
Connor Abbott
e690d88d69
freedreno/afuc: Initial a7xx support
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:58 +00:00
Connor Abbott
6fd0007447
afuc: Fix writing $00
...
This is valid and should do nothing. Don't make the PC overlap $00 in
the reg file, so that we can print out "writes" to $00 but they're still
discarded.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:58 +00:00
Connor Abbott
7d7aa2251e
afuc: Add setbit/clrbit
...
First introduced in a660_sqe.fw.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:58 +00:00
Connor Abbott
1046ebbb89
afuc: Convert to isaspec
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:58 +00:00
Connor Abbott
7376af0eef
afuc: Fix xmov lexer typo
...
This happened to work by luck, but was caught with the isaspec encoding
assertions.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:58 +00:00
Connor Abbott
038680c2f6
isaspec: Add initial decoding support
...
This reuses the <map> entries in the <encode> block to go in the reverse
direction and parse an instruction into a machine-readable structure. It
currently assumes that <map> entries are simple l-values like
"src->src[0]" or "src->flag", which is enough for afuc, but the plan for
the future is to use the <decode> block to allow us to override that for
more complex cases.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:58 +00:00
Connor Abbott
2faf344f03
isaspec: Rename isa_decode() to isa_disasm()
...
This actually disassembles the binary, and we will add a function that
actually decodes it to the same structure that the encoder uses.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:58 +00:00
Connor Abbott
26cce0a133
isaspec: Add callback after decoding an instruction
...
This will be used by afuc for printing register decodings in a comment.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:58 +00:00
Connor Abbott
b63782da16
isaspec: Add "custom" field type
...
Add support for a field which is decoded by a user callback. This will
be used for decoding control registers in cread/cwrite by afuc.
In order for this to interact well with the align feature, we need to
pull print() out of the decode implementation so that the callback can
call it and keep track of the line column.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:58 +00:00
Connor Abbott
dc874e4654
isaspec: Add support for function and entrypoint labels
...
Functions (i.e. labels reached from call instructions) should be printed
differently from normal labels. In addition we also need to add support
for entrypoints with user-defined names in order to show packet names in
afuc.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:58 +00:00
Connor Abbott
569d3ac5a1
isaspec: Add support for "absolute" branches
...
afuc has branches which use an absolute offset in instructions from the
microcode base. Add another type to support them.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:57 +00:00
Connor Abbott
86b17d96b3
isaspec: Add "displayname" for altering {NAME} when decoding
...
In afuc, we have the situation where there are a number of ALU
instructions with two (almost) completely different encodings, including
a different opcode location, etc. These need to be different leaf
bitsets with different names for the encoder to work, because otherwise
the encoder has no way of descriminating between them, but when
displaying them we want to use the same name. This adds a small facility
to make the name used for {NAME} when displaying and for the opcode
when encoding different, so that e.g. OPC_ADDI can display as "add"
instead of "addi".
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23949 >
2023-07-28 18:41:57 +00:00
Adam Jackson
c237539d62
egl: Implement EGL_EXT_explicit_device
...
Implement support for EGL_EXT_explicit_device[1].
[1] https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_explicit_device.txt
Signed-off-by: Adam Jackson <ajax@redhat.com >
Signed-off-by: Robert Foss <rfoss@redhat.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23873 >
2023-07-28 18:00:34 +00:00
Roman Stratiienko
41e664f825
egl: android: Remove legacy name-based shared buffers support
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3415
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16578 >
2023-07-28 17:09:14 +00:00
José Roberto de Souza
2b7599dc49
intel: Rename intel_gem_add_ext() to intel_i915_gem_add_ext()
...
gem_add_ext() is i915 specific so adding it to the name.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23905 >
2023-07-28 15:36:52 +00:00
José Roberto de Souza
c9950786f6
intel/common: Move functions inside of C++ ifdef
...
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23905 >
2023-07-28 15:36:52 +00:00
José Roberto de Souza
4198a301b3
intel: Move i915_drm.h specific code from common/intel_gem.h to common/i915/intel_gem.h
...
This allow us to remove one more i915_drm.h include from code shared
by both backends.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23905 >
2023-07-28 15:36:52 +00:00
José Roberto de Souza
0579627f21
iris: Replace I915_EXEC_FENCE_SIGNAL by IRIS_BATCH_FENCE_SIGNAL in common code
...
This I915_EXEC_FENCE_SIGNAL was missed in the conversion from i915_drm.h
types to IRIS ones.
Both have the same value, so it was not causing any issues.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23905 >
2023-07-28 15:36:52 +00:00
José Roberto de Souza
1174e7412e
intel/dev: Port intel_dev_info tool to Xe KMD
...
Only hwconfig was calling i915 specifc function, so it was only
necessary split the function that fetches it from backends and call it
from intel_get_and_print_hwconfig_table() depending on the KMD loaded.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23905 >
2023-07-28 15:36:52 +00:00
Illia Polishchuk
56e0aff530
anv, drirc: Add workaround to speed up Cyberpunk 2077 reg allocation
...
Calling the ra_allocate function after each register spill can take
several minutes. This option speeds up shader compilation by spilling
more registers after the ra_allocate failure.Required for
Cyberpunk 2077, which uses a watchdog thread to terminate the process
in case the render thread hasn't responded within 2 minutes.
Execution time of my Cyberpunk2077 shader compilation test:
https://gitlab.freedesktop.org/illia.a.polishchuk/cyberpunk-vulkan-compute-hang-test-anv
Before the patch:
real 1m28,738s
user 1m28,329s
sys 0m0,400s
After the patch
real 0m33,245s
user 32m,835s
sys 0m0,404s
I think it's acceptable patch because Cyberpunk benchmarks has
the same FPS with and without patch. (I started
it without patch with a patched binary with disabled watchdog thread)
Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com >
Requires: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24228
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9241
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24299 >
2023-07-28 14:51:42 +00:00
Jason Ekstrand
739e21fa9a
intel/fs: Add a parameter to speed up register spilling
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24299 >
2023-07-28 14:51:42 +00:00
Timur Kristóf
be11fee2a7
aco: Refactor select_program to smaller functions.
...
This prepares for allowing to compile 1 shader at a time
for merged shader stages.
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/23874 >
2023-07-28 14:27:29 +00:00
José Roberto de Souza
623d704de8
iris/xe: Call iris_lost_context_state() when batch engine is replaced
...
This is necessary to initialize context and mark all the state as
dirty so it is re submitted.
Signed-off-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/24336 >
2023-07-28 14:04:20 +00:00
Mike Blumenkrantz
e68e612826
nir: add a helper for calculating variable slots
...
this will maybe avoid future bugs, but probably not
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24163 >
2023-07-28 13:14:35 +00:00
Mike Blumenkrantz
330f728cc4
lavapipe: use the component offset directly for xfb
...
the mask is only indicative of the components being used, not the offset
from which they start
cc: mesa-stable
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24163 >
2023-07-28 13:14:35 +00:00
Mike Blumenkrantz
59396eefe6
nir: fix slot calculations for compact variables with location_frac
...
a variable with a component offset may span multiple slots, and this cannot
be inferred from its type alone (e.g., compacted clip+cull distances)
cc: mesa-stable
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24163 >
2023-07-28 13:14:35 +00:00
Eric Engestrom
42021b4d13
bin/ci_run_n_monitor: get git sha from pipeline if specified, instead of requiring --rev to match
...
Fixes: 9ce717ab31 ("ci_run_n_monitor: add ability to specify the pipeline to use, instead of auto-detecting it")
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24366 >
2023-07-28 13:10:41 +00:00
Daniel Stone
f4d24ca414
egl/drm: Assume modern DRI interface versions
...
We know we always have modern versions of DRI_IMAGE and DRI_FLUSH as
we're version-locked to our same Mesa version.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24347 >
2023-07-28 12:25:19 +00:00
Daniel Stone
3d59f4cfcb
egl/drm: Use IMAGE_DRIVER instead of DRI2_LOADER
...
We always have this extension available to us, since we demand matching
Mesa builds, and it's much better. Just use it always when we're not on
swrast.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24347 >
2023-07-28 12:25:19 +00:00