Rhys Perry
2f74df7117
aco: fix assembly of MUBUF-to-LDS loads
...
These have an implicit m0 read and don't write 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/17333 >
2022-09-26 14:49:56 +00:00
Rhys Perry
78779fd63d
aco: add reg() helper to assembler
...
SGPR encoding is slightly different on GFX11.
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/17333 >
2022-09-26 14:49:56 +00:00
Rhys Perry
7a1b522148
aco: rename Interp_instruction to VINTRP_instruction
...
These is clearer since GFX11 adds another interpolation format.
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/17333 >
2022-09-26 14:49:56 +00:00
Ruijing Dong
51bd75e28c
radeonsi/vcn: support async
...
enable async for vcn
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/18781 >
2022-09-26 13:59:19 +00:00
Yonggang Luo
091249dff4
aco: Fixes compiling error about char8_t with c++20
...
The error is:
../mesa/src/amd/compiler/aco_register_allocation.cpp:382:7: error: no matching function for call to 'printf'
printf(u8"☐");
Fixes: 209a89e51d ("aco: Convert to use u8 literal for Unicode character to fixes msvc warning")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7318
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18796 >
2022-09-26 13:28:33 +00:00
Daniel Schürmann
8ace685432
radv/rt: inline radv_rt_pipeline_create_() helper into radv_rt_pipeline_create()
...
This saves some re-allocation and will help in future with RT shader functions.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18755 >
2022-09-26 13:03:44 +00:00
Daniel Schürmann
40366a3aaf
radv/rt: create separate radv_rt_pipeline struct
...
inherited from radv_compute_pipeline to contain all RT-related information.
This will make it easier to transition to RT shader functions.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18755 >
2022-09-26 13:03:44 +00:00
Matt Coster
b93b696356
pvr: Fix assignment to ISP back_a.sref
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <karmjit.mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18778 >
2022-09-26 12:25:02 +00:00
Mike Blumenkrantz
007c6b1dd2
radv: use direct access to last_vgt_api_stage_locs for sgpr emission
...
radv_lookup_user_sgpr is heavy, stop using it
Reviewed-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/18808 >
2022-09-26 11:40:26 +00:00
Mike Blumenkrantz
351c4ed6d1
radv: store pointer to sgprs for last vertex stage
...
Reviewed-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/18808 >
2022-09-26 11:40:26 +00:00
Marcin Ślusarz
2a723f7a8d
nir: use nir_shader_instructions_pass in nir_split_per_member_structs
...
Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
67fe9ae5c3
nir: use nir_shader_instructions_pass in nir_split_var_copies
...
No functional changes.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
9dcff3ea53
nir: use nir_shader_instructions_pass in nir_lower_samplers
...
No functional changes.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
865d959090
nir: use nir_shader_instructions_pass in nir_lower_interpolation
...
Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
6e0bcc1c4d
nir: use nir_metadata_none instead of its value
...
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
dd51dedefd
nir: use nir_shader_instructions_pass in nir_lower_frexp
...
Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
a87070937d
nir: use nir_shader_instructions_pass in nir_lower_fb_read
...
Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
2e410c4c05
nir: use nir_shader_instructions_pass in nir_lower_drawpixels
...
Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
00b0de5c83
nir: use nir_shader_instructions_pass in nir_lower_clip_halfz
...
Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
c6e4641a21
nir: use nir_shader_instructions_pass in nir_lower_clip_disable
...
Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
a1efa18dfe
nir: use nir_shader_instructions_pass in nir_lower_clamp_color_outputs
...
Changes:
- removal of lower_state (not needed anymore)
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
c7078fe4e0
nir: use nir_shader_instructions_pass in nir_lower_64bit_phis
...
No functional changes.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
ea39efe9b8
nir: use nir_shader_instructions_pass in nir_lower_bool_to_int32
...
No functional changes.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
d28833d60f
nir: use nir_shader_instructions_pass in nir_lower_bool_to_float
...
Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
4a9e2dc1e9
nir: use nir_shader_instructions_pass in nir_lower_bool_to_bitsize
...
Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
5beeb3c1db
nir: use nir_shader_instructions_pass in nir_lower_alu
...
Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
- only metadata of the current function is invalidated (invalidation on
one function was leaking to successive functions because "progress"
was not reset)
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
cb201e92ac
glsl: use nir_shader_instructions_pass in gl_nir_lower_samplers_as_deref
...
No functional changes.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
d3708d6cf5
glsl: use nir_shader_instructions_pass in gl_nir_lower_images
...
No functional changes.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
1829fde212
glsl: use nir_shader_instructions_pass in gl_nir_lower_atomics
...
Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
e9dc98ed87
crocus: remove invalid nir_metadata_preserve from crocus_fix_edge_flags
...
nir_metadata_preserve(NULL, ...) doesn't make any sense.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
a1c042fb5a
iris: remove invalid nir_metadata_preserve from iris_fix_edge_flags
...
nir_metadata_preserve(NULL, ...) doesn't make any sense.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Marcin Ślusarz
0337f449a6
radv: use nir_shader_instructions_pass in radv_nir_lower_ycbcr_textures
...
Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282 >
2022-09-26 11:13:03 +00:00
Mike Blumenkrantz
a54d996463
radv: ALWAYS_INLINE radv_is_streamout_enabled()
...
v2 by Timur Kristóf:
- Use ALWAYS_INLINE instead of just inline.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18807 >
2022-09-26 10:51:25 +00:00
Mike Blumenkrantz
051594fb7f
radv: ALWAYS_INLINE radv_flush_descriptors
...
B I G P E R F
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18807 >
2022-09-26 10:51:25 +00:00
Mike Blumenkrantz
876f7f60ac
radv: ALWAYS_INLINE radv_after_draw
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18807 >
2022-09-26 10:51:25 +00:00
Samuel Pitoiset
7985a9df9a
radv: enable NGG culling unconditionally for GPL but disable it dynamically
...
When compiling the pre-rasterization stages we don't know the primitive
topology, but we still want to enable NGG culling for performance. To
achieve that, NGG culling is enabled unconditionally when the topology
is unknown and disabled dynamically for points or lines.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18776 >
2022-09-26 09:28:14 +02:00
Samuel Pitoiset
e7f6786d59
radv: use the maximum number of vertices per primitives for NGG with GPL
...
The hw will ignore the extra bits when points/lines are drawn, so this
just works as-is.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18776 >
2022-09-26 09:28:14 +02:00
Samuel Pitoiset
e364670e83
radv: determine the last VGT api stage also for GPL
...
When compiling the pre-rasterization stages, we need to know this.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18776 >
2022-09-26 09:28:14 +02:00
Samuel Pitoiset
e053f6feb3
radv: remove useless gfx10_ngg_info::enable_vertex_grouping
...
It's always TRUE and this will simplify future changes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18776 >
2022-09-26 09:28:14 +02:00
Samuel Pitoiset
efd83e9627
radv: allow to build the pre-rasterization stages in a library
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18672 >
2022-09-26 07:25:50 +00:00
Samuel Pitoiset
456543e6d8
radv: determine the last VGT api stage from the active_stages bitfield
...
With GPL, we can get binaries from libs directly, so this would fail.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18672 >
2022-09-26 07:25:50 +00:00
Samuel Pitoiset
c08ba6a76c
radv: import the GS copy shader from a library if present
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18672 >
2022-09-26 07:25:50 +00:00
Samuel Pitoiset
2fd3b0bceb
radv: do not free the GS copy shader binary if created from a library
...
Similar to other shader stages.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18672 >
2022-09-26 07:25:50 +00:00
Dave Airlie
25ead8ec5c
gallivm: fix buffer_type for LLVM 15
...
Fixes
deqp-vk: /home/airlied/devel/llvm-project/llvm/include/llvm/IR/Instructions.h:961: static llvm::GetElementPtrInst* llvm::GetElementPtrInst::Create(llvm::Type*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&, llvm::Instruction*): Assertion `cast<PointerType>(Ptr->getType()->getScalarType()) ->isOpaqueOrPointeeTypeMatches(PointeeType)' failed.
Fixes: 1b8c4931df ("gallivm: fixes for LLVM-15 opaque pointers in lp_bld_jit_types.c")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18816 >
2022-09-26 13:22:12 +10:00
Dave Airlie
bcb136d548
gallivm: handle llvm coroutines for llvm > 15
...
LLVM 15 changed the coroutine presplit function attribute in
735e6c40b5e9 [Coroutines] Convert coroutine.presplit to enum attr
This needed to be updated in mesa.
Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18815 >
2022-09-26 01:50:49 +00:00
Dave Airlie
16fd0c11c6
llvmpipe: bind sampler views/images properly.
...
There is some code that relies on TGSI here, and it has limits.
For now always just bind resources > 31.
Fixes
dEQP-VK.pipeline.pipeline_library.descriptor_limits*
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18812 >
2022-09-26 10:28:34 +10:00
Dave Airlie
b144d3e6a7
llvmpipe: memset empty images in the key
...
This fixes a bunch of valgrind warnings in
dEQP-VK.pipeline.pipeline_library.descriptor_limits.fragment_shader.storage_images_63
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18812 >
2022-09-26 10:19:24 +10:00
Dave Airlie
fe5636af6e
lavapipe: handle view mask layer count properly for begin rendering.
...
If the view mask is set the layer count should be taken from it,
not from the layerCount.
Fixes: 8a6160a354 ("lavapipe: VK_KHR_dynamic_rendering")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18811 >
2022-09-26 09:40:34 +10:00
Dave Airlie
21d39dd1de
lavapipe: take layers into account around render surface creation.
...
This makes the code more consistent with handling layers, but also
makes sure a new surface is created when the w/h/layers changes.
Fixes: 8a6160a354 ("lavapipe: VK_KHR_dynamic_rendering")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18811 >
2022-09-26 09:40:27 +10:00
Dave Airlie
d724e95682
llvmpipe: handle different blocksizes for sampler/image views
...
In the cases where the sampler/image view format has a
different blocksize to the underlying resource, the width
/height need to be scaled.
Previous code to do this, did the rescaling before minification,
apparently scaling needs to happen after minification, this means
it has to happen in the llvm side.
This fixes a bunch of new VK CTS tests
dEQP-VK.image.texel_view_compatible.*
Reviewed-by: Brian Paul <brianp@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18767 >
2022-09-25 23:04:20 +00:00