Commit graph

198264 commits

Author SHA1 Message Date
Chia-I Wu
c8fcbc2990 panvk: add panvk_queue_submit_init_storage
It prepares the storage for panvk_queue_submit.

There is a small functional change, in that signal_ops is allocated only
when necessary.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
dc75b4c755 panvk: add panvk_queue_submit_init
This is the first step toward panvk_queue_submit refactoring.  It
introduces "struct panvk_queue_submit" and adds panvk_queue_submit_init
to initialize the struct.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:05 +00:00
Chia-I Wu
2cbb8467c1 panvk: fix vs image support
Since valhall, panvk_per_arch(nir_lower_descriptors) separates the
driver set and the user sets, and does not need pan_lower_image_index.

Fixes: 5db135f66a ("panvk: Advertize v10 support")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32308>
2024-11-26 19:47:22 +00:00
Danylo Piliaiev
7fa31b7eea tu,ir3: Add workaround for reading shading rate on A7XX gen1,gen2
On A7XX reading fragment shading rate correctly requires declare
SAMPLEMASK input. It doesn't need to be used anywhere, just declared.

This workaround was seen in the prop driver v512.762.12

Fixes a lot of tests in:
 dEQP-VK.fragment_shading_rate.*

Fixes: 2ab8eff511
("tu/a7xx: Implement VK_KHR_fragment_shading_rate")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32335>
2024-11-26 19:20:44 +00:00
Danylo Piliaiev
8858b16e4a tu: Disable fragmentShadingRateWithShaderSampleMask due to issues
FSR with VK_EXT_post_depth_coverage enabled has wrong values of
gl_SampleMaskIn[0]. Prop driver has fragmentShadingRateWithShaderSampleMask
enabled, but it doesn't support VK_EXT_post_depth_coverage.

Sample mask is supplied by HW and there is no flag in sight to fix it.

The failing tests were:
 dEQP-VK.pipeline.fast_linked_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_2_post_depth_coverage
 dEQP-VK.pipeline.fast_linked_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_4_post_depth_coverage
 dEQP-VK.pipeline.monolithic.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_2_post_depth_coverage
 dEQP-VK.pipeline.monolithic.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_4_post_depth_coverage
 dEQP-VK.pipeline.pipeline_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_2_post_depth_coverage
 dEQP-VK.pipeline.pipeline_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_4_post_depth_coverage

Fixes: 2ab8eff511
("tu/a7xx: Implement VK_KHR_fragment_shading_rate")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32335>
2024-11-26 19:20:44 +00:00
Georg Lehmann
239c0124df radv: optimize sample mask comparisons
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32327>
2024-11-26 18:44:39 +00:00
Georg Lehmann
3f26e9ca19 nir/opt_intrinsic: fix sample mask opt with demote
Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Fixes: d3ce8a7f6b ("nir: optimize gl_SampleMaskIn to gl_HelperInvocation for radeonsi when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32327>
2024-11-26 18:44:39 +00:00
Georg Lehmann
22557497ec nir/opt_intrinsic: rework sample mask opt with vector alu
Purely theoretical issue, for example gl_SampleMaskIn.xx == 0.xx.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Fixes: d3ce8a7f6b ("nir: optimize gl_SampleMaskIn to gl_HelperInvocation for radeonsi when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32327>
2024-11-26 18:44:38 +00:00
Ian Romanick
08fa4635c7 Fix copy-and-paste bug in nir_lower_aapoint_impl
Reported-by: Anddy Ren(WH-RD) <AnddyRen@glenfly.com>
Tested-by: Anddy Ren(WH-RD) <AnddyRen@glenfly.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: d3a95f0f71 ("gallium/draw: Enable aapoint NIR helpers to generate bool1, bool32, or float32 Booleans")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32313>
2024-11-26 18:12:07 +00:00
Yinjie Yao
64ea1175cc radeonsi/vcn: Disable 2pass encode for VCN 5.0.
VCN 5.0 will not support 2pass encoding.
Backport-to: 24.3

Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32336>
2024-11-26 16:55:30 +00:00
Boris Brezillon
b11e9168d8 panfrost: Use the handler size returned by cs_exception_handler_def()
Use the handler size returned by cs_exception_handler_def() instead
of extracting it from the cs_builder state.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
16dd990bac panvk/csf: Use the information returned by cs_exception_handler_def()
cs_exception_handler contains the handler size and the dump region
size. Use those instead of deducing them from the cs_builder state
or using a maximum value.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
7a8e560c4e panfrost: Add cs_exception_handler_def() to the ForEachMacros list
And fix the call-sites accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
7a32fac596 pan/cs: Return exception handler size/address
Will be useful when we start allocating exception handlers from a
memory pool that grows over time without having to fix a maximum
handler size.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
d0cff9e4c1 pan/cs: Return the dump region size when an exception handler is defined
Useful to reserve only what we need for spilling regs.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32353>
2024-11-26 15:16:43 +00:00
Lionel Landwerlin
cafec54c79 Revert in correct commit "fix"
This reverts commit 38c7e40bc02578585cc56c3a2d016d0b06ade184.

Fixes: b625a573 ("fix")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32354>
2024-11-26 16:36:06 +02:00
Georg Lehmann
28dff72d3b freedreno/ci: update a630 KSP checksum
This causes warnings in CI for quite a while now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32348>
2024-11-26 13:51:30 +00:00
Boris Brezillon
00e232d5f0 panvk/csf: Fix register overlap in issue_fragment_jobs()
add_val is a 64-bit register, meaning release_sz points to the high word
of add_val, which leads to corruptions of the value added to the sync
object when simul_use=true.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32350>
2024-11-26 13:31:39 +00:00
Lionel Landwerlin
b625a573da fix
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
6eb48a3e47 brw: move fs_msaa_flags logic to intel_shader_enums.h
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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
ba3ff8b3bb brw: move barycentric_mode enum to intel_shader_enums.h
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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
bfcb9bf276 brw: rename brw_sometimes to intel_sometimes
Moving it to intel_shader_enums.h

The plan is to make it visible to OpenCL shaders.

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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
9016a5458a brw: change fs_msaa flags checks to test compiled flag first
There should be no functional change here. This is just trying to make
things more clear, we use the compiled value if != BRW_SOMETIMES and
otherwise use the dynamically computed flags.

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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
54e6a8b019 anv: split runtime flushing code for reuse
We'll want to reuse some of this for device generated commands.

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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
d9d1894bb9 anv: move tracking of tcs_input_vertices/fs_msaa_flags to hw 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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
d1795a73e2 anv: move gfx tracking values to anv_cmd_graphics_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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
db258503fa anv: split vertex buffer emission in a different function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
195350c5da anv: rework vertex input helper
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
c4e7578fa6 anv: pass anv_device to batch_set_preemption
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
c36f7e42a7 anv: remove 3DSTATE_VF_STATISTICS from pipeline
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:29 +00:00
Lionel Landwerlin
ce40a1e05b anv: remove 3DSTATE_MULTISAMPLE from the pipeline
We can make this completely dynamic, there is no information from the
pipeline.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:29 +00:00
Lionel Landwerlin
2b49249a4d anv: remove 3DSTATE_RASTER from pipeline
At a pipeline level, we only put fixed values in this instruction.
Might has well put that in the final emission and avoid :
  - store the instruction on the anv_graphics_pipeline
  - diff the instructions between pipelines

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:29 +00:00
Lionel Landwerlin
9d8950e435 anv: move helpers out of genX_pipeline.c/anv_private.h
Those are only used in genX_gfx_state.c

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:29 +00:00
Tapani Pälli
f0b7262209 iris: allow bo cache for compressed bos on verx10 == 200
Test list mentioned in the issue is passing fine on current main.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11362
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32325>
2024-11-26 12:36:29 +00:00
Maíra Canal
3594a35610 v3dv: use Mesa log infrastructure instead of using stderr
The Mesa log infrastructure is really useful as it allows us to get
debug and error information in Android systems. Apart from that, it also
allows us to forward diagnostics into the right logs and files.

Therefore, instead of using stderr for all messages, use Mesa log and
separate the messages into debugging and error messages.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32304>
2024-11-26 12:09:29 +00:00
Maíra Canal
2c45a999a6 v3dv: delete v3dv_debug.h
It's not being used anymore.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32304>
2024-11-26 12:09:29 +00:00
Lars-Ivar Hesselberg Simonsen
afaf454eb7 panvk: Add incremental rendering support on v10+
This commit adds support for incremental rendering on V10+ in PanVK by
setting a tiler out-of-memory exception handler in the fragment subqueue
when waiting for the tiler work to complete.

In case the tiler is unable to finish its work due to lack of memory,
the handler is invoked which will render out the fragment work available
so far, recycle the tiler heap memory and trigger a preload for the
remaining fragment work.

Once the fragment subqueue is made aware that the tiler work has
completed, it will disable the exception handler until the state for the
next renderpass has been set up correctly, as we could otherwise get the
handler invoked based on state from a previous renderpass.

The implementation based on the similar implementation in Panfrost [1],
but works slightly differently due to PanVK utilizing multiple subqueues
and supporting layered rendering.

[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:58:28 +01:00
Lars-Ivar Hesselberg Simonsen
687fd95399 panvk: Build cmd_fb_preload on explicit fb_info
Start explicitly passing the pan_fb_info-pointer to use for building
preloads rather than implicitly fetching it from the passed
command_buffer.

This allows building preloads for different fb_infos, which is required
for incremental rendering.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:58:28 +01:00
Boris Brezillon
7ae7152b0b pan/cs: Add block macro for exception handler
This commit provides a block-like macro to to define exception handlers
instead of requiring the user to call the start/end helpers.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:58:24 +01:00
Boris Brezillon
a502841fec pan/cs: Add dynamic save_reg to exception handler
Make the register dump address dynamic instead of passing it at handler
creation time. This is needed for PanVK if we want to re-use the same
handlers for different VkQueues, since the dump buffer needs to be per
VkQueue.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:58:20 +01:00
Boris Brezillon
1acc5e1433 pan/cs: Align exception handlers with NOPs
Align exception handlers to cache lines to allow having multiple
exception handlers in the same BO.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:58:15 +01:00
Boris Brezillon
0ae8e69810 pan/cs: Add cs_exception_handler_ctx
This allows us to modify the exception handler start arguments without
having to modify the function declaration.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:57:47 +01:00
Lars-Ivar Hesselberg Simonsen
2941a44b69 pan/cs: Add mask support for reg_perm
Add support for masks to reg_perm in order to not erroneously hit
asserts for restricted registers that are parts of tuples but are not
read/written to due to register mask.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:57:47 +01:00
Lars-Ivar Hesselberg Simonsen
565476d3b2 pan/genxml: Fix decode of exception_handler 0x0
Fixes the check for address 0x0 or length 0 when decoding
set_exception_handler.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:57:47 +01:00
Marek Olšák
8fc640b256 nir/lower_io_to_temporaries: fix interp_deref_at_* lowering
The pass converts:
    ...
    %.. = load_deref(input)
to:
    temp = copy_deref(input) // beginning of the shader
    ...
    %.. = load_deref(temp)

If interp_deref_at_* occurs between copy_deref and load_deref,
the interp_deref_at_* lowering overwrites temp, so all future
load_deref(temp) return the result of interp_deref_at_* instead of
copy_deref, which is incorrect.

The issue manifests when the same input is used by both load_deref
and interp_deref_at_* in the same shader and when interp_deref_at_*
happens to be before load_deref.

This fixes it by using a completely new temporary for each instance
of interp_deref_at_*.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32344>
2024-11-26 06:50:40 +00:00
Marek Olšák
c23abb12e8 nir: allow cloning indirect array derefs in nir_clone_deref_instr
but only if cloning within the same shader. This will be used to fix
nir_lower_io_to_temporaries.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32344>
2024-11-26 06:50:40 +00:00
Marek Olšák
a3516dafc9 util,amd: add inlinable versions of drmIoctl/drmCommandWrite*
The reason for this is to inline those calls in drivers.
They are very trivial, so why not.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32067>
2024-11-26 00:16:02 -05:00
Marek Olšák
049641ca54 amd: import libdrm_amdgpu ioctl wrappers
This imports 35 libdrm_amdgpu functions into Mesa.

The following 15 functions are still in use:
   amdgpu_bo_alloc
   amdgpu_bo_cpu_map
   amdgpu_bo_cpu_unmap
   amdgpu_bo_export
   amdgpu_bo_free
   amdgpu_bo_import
   amdgpu_create_bo_from_user_mem
   amdgpu_device_deinitialize
   amdgpu_device_get_fd
   amdgpu_device_initialize
   amdgpu_get_marketing_name
   amdgpu_query_sw_info
   amdgpu_va_get_start_addr
   amdgpu_va_range_alloc
   amdgpu_va_range_free

We can't import them because they make sure that we only use 1 VMID
per process shared by all APIs. (except the marketing name)

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32067>
2024-11-25 21:03:41 -05:00
Timothy Arceri
65b73e6d87 glsl: drop unused symbol table from gl_shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32293>
2024-11-25 23:53:37 +00:00
Timothy Arceri
340f7edfba glsl: use symbol table directly for builtin functions
Builtin functions do no make use of gl_shader at all other than to store
a symbol table. So lets just create and use the symbol table directly
instead. This will allow us to drop the symbol table member from
gl_shader in the following patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32293>
2024-11-25 23:53:37 +00:00