Gert Wollny
6be7c2ef51
r600: Make NIR the default shader IR
...
By default sb is disabled, to enable it one can
set
R600_DEBUG=nirsb
TGSI can be enabled by using
R600_DEBUG=use_tgsi
In this case "sb" will be enabled, but one can use
the TGSI backend without sb by setting
R600_DEBUG=use_tgsi,sb
Closes : #6858
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18753 >
2022-09-23 07:34:31 +00:00
Gert Wollny
ad74cd3c3f
r600: Add slot to ALU disassambly
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18753 >
2022-09-23 07:34:31 +00:00
Dave Airlie
0995c6827a
lavapipe: use slow clear path if conditional rendering.
...
the ->clear path checks render condition which isn't necessary.
Fixes dEQP-VK.conditional_rendering.draw.condition_host_memory_expect_noop_rp_clear.draw*
Reviewed-by: Brian Paul <brianp@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18686 >
2022-09-23 07:20:18 +00:00
Samuel Pitoiset
31dc15b977
radv: rework and rename radv_make_buffer_descriptor()
...
Pass the VA directly and rename to radv_make_texel_buffer_descriptor().
This helper will be re-used for future work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18750 >
2022-09-23 06:55:21 +00:00
Samuel Pitoiset
81d7a6bdff
radv: remove unnecessary radv_buffer_view::vk_format
...
It's not really useful.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18750 >
2022-09-23 06:55:21 +00:00
Samuel Pitoiset
a5ca3c1638
radv: pass a VkSampler to write_sampler_descriptor()
...
For future work, and remove useless radv_device parameter.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18750 >
2022-09-23 06:55:21 +00:00
Iago Toral Quiroga
4ea916f704
broadcom/compiler: don't apply robust buffer access to shared variables
...
This feature is only concerned with buffers bound through a descriptor
set. We are still keeping the code for this (disabled by default) since
it may be useful for debugging some scenarios.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18744 >
2022-09-23 06:27:54 +00:00
Iago Toral Quiroga
44b02b5cb1
broadcom/compiler: handle shared stores with robust buffer access
...
For some reason we supported all shared intrinsics but this one.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18744 >
2022-09-23 06:27:54 +00:00
Iago Toral Quiroga
b2bce9c98a
broadcom/compiler: fix robust buffer access
...
Our implemention was bogus, it was only putting a cap on the offset
based on the aligned buffer size and this doesn't ensure the access
to the buffer happens within its valid range.
I think the only reason we have been passing the tests is that we
align all buffers sizes to 256B and the tests create buffers with a
size that is smaller than that (like 64B). When get the size of the
buffer from the shader, we get the actual bound range (so 64B in this
case) and by capping to that we don't ensure the access will stay
within that range, but we ensure it will stay within the underlying
memory bound to the buffer (256B), and this is fine by the spec,
however, I think if the actual buffer range was the same as the
underlying allocation we would fail the tests.
A valid behavior for robust buffer access on an out-of-bounds access
is to return any valid bytes within the buffer, so we can just
make that offset 0.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18744 >
2022-09-23 06:27:54 +00:00
Paul Gofman
e7e989f62e
vbo/dlist: keep buffers used in loopback_vertex_list() mapped.
...
When display list loopback path is hit the major performance
drop during glCallList() happens due to constantly mapping and
unmapping the buffer.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17285 >
2022-09-23 04:41:50 +00:00
Marek Olšák
4d44399c2e
gallium/u_threaded: add an option for unsychronized create_fence_fd
...
And enable it for radeonsi. This may be needed by Android.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18731 >
2022-09-23 03:47:50 +00:00
Mike Blumenkrantz
21ba47c821
zink: handle culldistance xfb outputs like clipdistance
...
fixes:
spec@ext_transform_feedback@builtin-varyings gl_culldistance
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18724 >
2022-09-23 02:49:08 +00:00
Mike Blumenkrantz
1146793881
glsl: fix gl_CullDistance xfb linking
...
this matches the behavior for gl_ClipDistance
ref #7152
Fixes: 0c8492cd3b ("glsl: fix location for array subscript")
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18724 >
2022-09-23 02:49:08 +00:00
Caio Oliveira
eb6aa25d16
spirv: Make a helper function to check glslang/shaderc
...
When deciding on workarounds that apply to GLSLang we should also check
for ShaderC (when using glslang). Add a helper to do that and reuse in
the three places we check for it.
This patch will now consider shaderc for wa_glslang_cs_barrier workaround.
Suggested by Timur Kristóf.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442 >
2022-09-23 01:25:48 +00:00
Caio Oliveira
30b6d6b30f
spirv: Call vtn_emit_ret_store() only when handling return branch
...
No need to call it at the end of every block, since we already
know and identified the blocks terminating with returns.
Suggested by Jason Ekstrand.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442 >
2022-09-23 01:25:48 +00:00
Caio Oliveira
b89a36fc01
spirv: Add workaround to ignore OpReturn after OpEmitMeshTasksEXT
...
Fixes: 7d1bcf1f55 ("spirv, nir: Handle EmitMeshTasksEXT opcode.")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442 >
2022-09-23 01:25:48 +00:00
Timur Kristóf
89f1727654
spirv: Treat EmitMeshTasksEXT as a terminating instruction.
...
glslang had a bug and didn't actually emit it as a terminating
instruction, therefore this went unnoticed thus far. See
https://github.com/KhronosGroup/glslang/issues/3020 .
Modified by Caio Oliveira to emit the corresponding NIR intrinsic
right before the halt.
Fixes: 7d1bcf1f55 ("spirv, nir: Handle EmitMeshTasksEXT opcode.")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442 >
2022-09-23 01:25:48 +00:00
Caio Oliveira
b9919b9980
spirv: Pass vtn_block into vtn_emit_branch()
...
This will be used later to handle branches instructions that have
parameters in them, e.g. SpvOpEmitMeshTasksEXT. No behavior change in
this commit.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442 >
2022-09-23 01:25:48 +00:00
Caio Oliveira
3f4343c7cd
nir/lower_task_shader: Don't fail adding a launch when last instruction is a jump
...
Fixes: 8aff8d3dd4 ("nir: Add common task shader lowering to make the backend's job easier.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442 >
2022-09-23 01:25:48 +00:00
Mihai Preda
15e78caf8d
gallivm: LLVM opaque pointers: use lp_build_array_get_ptr2() in lp_bld_nir_soa.c
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18721 >
2022-09-23 00:44:28 +00:00
Mihai Preda
cdd7e8f5ce
gallivm: LLVM opaque pointers: add lp_build_array_get[_ptr]2 in lp_bld_struct.c
...
i.e. variants taking an explicit LLVM type
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18721 >
2022-09-23 00:44:28 +00:00
Mihai Preda
1d741f4c62
gallivm: LLVM opaque pointer fixes in lp_bld_sample.c
...
load_mip()
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18721 >
2022-09-23 00:44:28 +00:00
Mihai Preda
966a395f02
gallium/draw: fix LLVM opaque pointer warnings in store_aos()
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720 >
2022-09-23 00:09:47 +00:00
Mihai Preda
cb33367449
gallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_store_output()
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720 >
2022-09-23 00:09:47 +00:00
Mihai Preda
620c6e14bd
gallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_fetch_output()
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720 >
2022-09-23 00:09:47 +00:00
Mihai Preda
3e6dd65acb
gallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_fetch_input()
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720 >
2022-09-23 00:09:47 +00:00
Mihai Preda
a9d37f8bc9
gallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_epilogue()
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720 >
2022-09-23 00:09:47 +00:00
Mihai Preda
6ad8b95f4d
gallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_end_primitive()
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720 >
2022-09-23 00:09:47 +00:00
Mihai Preda
4a6e34ec3d
gallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_fetch_input()
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720 >
2022-09-23 00:09:47 +00:00
Mihai Preda
be03a354b8
gallium/draw: fix LLVM opaque pointer warnings in generate_clipmask()
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720 >
2022-09-23 00:09:47 +00:00
Mihai Preda
8766e30eda
gallium/draw: fix LLVM opaque pointer warnings in store_clip()
...
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720 >
2022-09-23 00:09:46 +00:00
Lionel Landwerlin
f9dbb65e7f
anv: add missing wokraround for texture cache invalidate
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18743 >
2022-09-22 23:45:16 +00:00
Connor Abbott
8cb1deded6
ir3/analyze_ubo_ranges: Account for reserved consts
...
We weren't accounting for the reserved consts when calculating how much
we can upload. This led to assertion failures later if we pushed too
much.
Fixes: d3b7681df2 ("tu: ir3: Emit push constants directly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18757 >
2022-09-22 22:16:22 +00:00
Connor Abbott
750ecb0aa9
tu: Set textures_used for input attachments correctly
...
We were accidentally multiplying by 2 twice. Noticed by inspection.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18757 >
2022-09-22 22:16:22 +00:00
Connor Abbott
f483419c23
tu: Fix maxPerStageDescriptorUpdateAfterBindInputAttachments
...
We need this to be the same as maxPerStageDescriptorInputAttachments.
Fixes: d9fcf5de55 ("turnip: Enable nonuniform descriptor indexing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18757 >
2022-09-22 22:16:21 +00:00
Sil Vilerino
0fd23e8696
d3d12: Fix texture array DPB encode path
...
Mark D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAG_USED_AS_REFERENCE_PICTURE when applicable
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763 >
2022-09-22 22:03:44 +00:00
Sil Vilerino
8711b53d59
d3d12: Add debug verbosity for output reconstructed picture
...
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763 >
2022-09-22 22:03:44 +00:00
Sil Vilerino
93e0309b13
d3d12: Fix out of bounds index check for texture array DPB
...
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763 >
2022-09-22 22:03:44 +00:00
Sil Vilerino
dc523fabef
d3d12: Relax slice caps requirements for video encode
...
The check in d3d12_has_video_encode_support was returning no encode support unless
the driver supported D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_UNIFORM_PARTITIONING_SUBREGIONS_PER_FRAME
when it should also return support when the driver reports only full frame support
(ie. D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_FULL_FRAME)
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763 >
2022-09-22 22:03:44 +00:00
Mike Blumenkrantz
f8b4d40a1e
zink: delete some descriptor caching cruft
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664 >
2022-09-22 21:38:47 +00:00
Mike Blumenkrantz
b889b48466
zink: delete more sw conditional render handling
...
I forgot to delete this when I deleted the draw path handling
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664 >
2022-09-22 21:38:47 +00:00
Mike Blumenkrantz
fc52f82c09
zink: remove batch usage from sampler states
...
this was useless
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664 >
2022-09-22 21:38:47 +00:00
Mike Blumenkrantz
f6bbd7875a
zink: remove batch tracking/usage from view types
...
instead of incurring all the overhead of tracking lifetimes for these,
it makes more sense to just let them delete whenever and then store
the vk object onto its parent image/buffer to be deleted when that gets
freed, as the parent object's lifetime will always be >= the view's lifetime
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664 >
2022-09-22 21:38:47 +00:00
Mike Blumenkrantz
9f9dd4f2ac
zink: split out bind_sampler_states hook for drivers without EXT_non_seamless_cube_map
...
this incurs some overhead and is seldom used, so avoid having it in the codepath
at all if it won't be used
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664 >
2022-09-22 21:38:47 +00:00
Mike Blumenkrantz
7172fb56d9
zink bump batch state limit a bit
...
this should yield better throughput
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664 >
2022-09-22 21:38:47 +00:00
Mike Blumenkrantz
83c76b8efb
zink: rework batch tracking for resources
...
this uses a revised version of radeonsi's buffer list array to track
resources for lifetime/usage management, massively improving performance
by avoiding hash table lookups
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664 >
2022-09-22 21:38:47 +00:00
Mike Blumenkrantz
1896111d25
zink: defer more semaphore destruction
...
these have noticeable overhead, so handle them in the submit thread
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664 >
2022-09-22 21:38:47 +00:00
Mike Blumenkrantz
babf9474c4
zink: rework flush_frontbuffer to always flush
...
previously this would no-op unacquired swapchains and then try to
execute a copy from the last-presented swapchain image to the current
image to avoid presenting garbage data
instead, just present garbage like the app requested
fixes #7165
Tested-By: Matti Hamalainen <ccr@tnsp.org >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18730 >
2022-09-22 21:14:03 +00:00
Mike Blumenkrantz
758c559bc4
zink: check format compatibility up front when creating framebuffer surface
...
this avoids an assert in create_ivci while enforcing correct behavior
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18446 >
2022-09-22 20:42:04 +00:00
Adam Jackson
4c5dee6c22
egl: Rewrite eglSetBlobCacheFuncsANDROID to use the standard macros
...
As the deleted comment hints, you just need the macro to expand to
return /* void */;
for things to work.
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18713 >
2022-09-22 20:13:58 +00:00