Adam Jackson
69f3d3a29f
zink: Enable GL_EXT_depth_bounds_test
...
Available since Vulkan 1.0, and in fact already wired up, just not
advertised. It looks like we could make this dynamic state but this
works for now.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9371 >
2021-03-03 16:17:11 +00:00
Rhys Perry
21697082ec
radv: don't shrink image stores for The Surge 2
...
The game seems to declare the wrong format.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Fixes: e4d75c22
("nir/opt_shrink_vectors: shrink image stores using the format")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4347
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9229 >
2021-03-03 14:18:37 +00:00
Rhys Perry
cbb5ed476c
nir/opt_shrink_vectors: add option to skip shrinking image stores
...
Some games declare the wrong format, so we might want to disable this
optimization in that case.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Fixes: e4d75c22
("nir/opt_shrink_vectors: shrink image stores using the format")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9229 >
2021-03-03 14:18:37 +00:00
Danylo Piliaiev
4600dbc6cc
turnip: fix leak of tu_shader object during compute pipeline creation
...
tu_shader should be freed after pipeline is successfully created.
Fixes tests:
dEQP-VK.api.object_management.alloc_callback_fail.compute_pipeline
dEQP-VK.api.object_management.alloc_callback_fail_multiple.compute_pipeline
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9364 >
2021-03-03 10:41:29 +00:00
Samuel Pitoiset
b33792b794
radv: bump the initial SQTT buffer size to 32MB per SE
...
Most of the games need 32MB or more, but rarely less.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9367 >
2021-03-03 08:40:32 +01:00
Samuel Pitoiset
6813b52290
radv: trigger a new SQTT capture automatically after resizing the buffer
...
It's way better.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9367 >
2021-03-03 08:40:32 +01:00
Samuel Pitoiset
0a1e3cc1cb
radv: double the SQTT buffer size when it is resized
...
Computing the expected buffer size isn't reliable on GFX10+ because
DROPPED_CNTR returns weird results.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9367 >
2021-03-03 08:40:32 +01:00
Samuel Pitoiset
c0608bb083
ac/sqtt: fix determining if the trace is complete on GFX10+
...
DROPPED_CNTR isn't reliable and might still report non-zero if the
SQTT buffer isn't full. Checking if the number of written bytes by
the hw is equal to the SQTT buffer size seems reliable.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9367 >
2021-03-03 08:40:32 +01:00
Samuel Pitoiset
f4c4c0f207
radv: do not trace inactive shader engines with SQTT
...
This fixes a GPU hang on my Sienna because the number of SE is
less than the maximum, and SE #1 is disabled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9370 >
2021-03-03 08:16:42 +01:00
Mike Blumenkrantz
bc5dcf1527
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9291 >
2021-03-03 01:37:02 +00:00
Mike Blumenkrantz
587d15ca6c
zink: use staging resource for write transfer_map in order to not stall
...
we can just give the user a staging resource and then flush the data back
later
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9291 >
2021-03-03 01:37:02 +00:00
Marek Olšák
db67d9c0d1
radeonsi: don't crash on NULL images in si_check_needs_implicit_sync
...
This fixes CTS test: KHR-GL46.arrays_of_arrays_gl.AtomicUsage
Fixes: bddc0e023c
"radeonsi: fix read from compute / write from draw sync"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9361 >
2021-03-03 01:19:24 +00:00
Marek Olšák
f9e6c7a220
ac/llvm: fix ac_build_atomic_rmw with LLVM 13
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4383
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9361 >
2021-03-03 01:19:24 +00:00
Eric Anholt
8bd0cc1a5a
nir/vec_to_movs: Don't generate MOVs for undef channels.
...
This appeared in softpipe's image operations, since NIR always uses
4-component values for the coords, while the GLSL IR only has 2 components
for a 2D image (for example).
arb_shader_image_load_store-shader-mem-barrier (which times out in CI and
spends its time inside of tgsi_exec) was spending 4/51 of its instructions
on moving these undefs around.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9345 >
2021-03-03 00:51:44 +00:00
Eric Anholt
1e5ef4c60c
nir: Add a nir_src_is_undef() helper, like nir_src_is_const().
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9345 >
2021-03-03 00:51:44 +00:00
Mike Blumenkrantz
c77df59c9e
zink: export PIPE_CAP_TGSI_VS_LAYER_VIEWPORT
...
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9283 >
2021-03-02 17:42:00 -05:00
Mike Blumenkrantz
ffd046cf32
zink: enable PIPE_CAP_CLEAR_SCISSORED
...
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9283 >
2021-03-02 17:42:00 -05:00
Dave Airlie
abc724e440
lavapipe: sort bindings before creating descriptor set
...
This ensures the dynamic offsets are correct
Fixes: b38879f8c5
("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9359 >
2021-03-03 08:06:02 +10:00
Dave Airlie
0a939e788f
lavapipe: reorder descriptor set stages to get correct binding
...
The fragment stage was in the wrong place here.
Fixes: b38879f8c5
("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9359 >
2021-03-03 08:02:16 +10:00
Ian Romanick
7ca3e90c18
gallium/dri: Remove dri2_format_mapping::cpp
...
I was suspicious that some entries in dri2_format_table (in
dri_helpers.c) had this field set incorrectly. It seemed like
DRM_FORMAT_ABGR16161616F and DRM_FORMAT_XBGR16161616F should have been 8
instead of 4. Upon digging I found that nothing uses the field. Fix
code by removing it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9354 >
2021-03-02 19:42:04 +00:00
Karol Herbst
f0dccd9578
clover: Add missing include for llvm-12 build fix
...
Fixes: d1eab2b1eb
("clover: Fix build with llvm-12.")
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9372 >
2021-03-02 19:35:40 +00:00
Mike Blumenkrantz
1294aec650
zink: apply only the pending zs clear bits during deferred clears
...
both bits will have been flagged at this point in order to indicate
that the aspects will be cleared "at some point" during the loop, but
when actually iterating through the pending clears, only the bits set
in the clear call should be applied
Fixes: 5c629e9ff2
("zink: defer pipe_context::clear calls when not currently in a renderpass")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9366 >
2021-03-02 19:24:52 +00:00
Axel Davy
e891f039da
st/nine: Simplify checks for driconf options
...
Remove the useless driCheckOption calls. They always
succeed.
As a result the intended behaviour for thread_submit
was not working (different default depending on the gpu
used). Add a comment to fix that in the future.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:08 +01:00
Axel Davy
642e19dc44
driconf: Rename csmt_int back to csmt_force
...
Fixes regression introduced by
<https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6916 >
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
7a1a1fc5d9
st/nine: Fix leak at device destruction
...
At the release of the last object holding a reference
on the device, the device dtor was executed and
the objector dtor was ignored.
The proper way is to execute the object dtor, then
the device dtor.
The previous code was likely for a workaround against
something that was fixed since.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
d730f8d7a9
st/nine: Protect *PrivateData also for Volumes
...
*PrivateData functions were not protected by
a mutex for Volumes whereas they definitely
should.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
b383b1e01a
st/nine: Refactor ht_guid_delete
...
Have ht_guid_delete take a hash_entry.
As a result, we can use _mesa_hash_table_remove instead of
_mesa_hash_table_remove_key.
The previous code using the latter was incorrect as the key
of the entry was read after it was freed.
Fixes: https://github.com/iXit/wine-nine-standalone/issues/40
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
501ad0e134
st/nine: Add new debug and error checks
...
Add new debug messages and error checks
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
1a53099909
st/nine: Enable DF24 support
...
We can enable it, now that FETCH4 is
implemented.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
1357d2a60a
st/nine: Implement experimental FETCH4
...
FETCH4 is a feature that needs to be implemented
to advertise D3DFMT_DF24.
It's basically a variant of Gather4.
This first implementation will need to be completed
to implement the feature fully, but the feature
doesn't seem to be much used (other equivalent
features are preferred by games).
Note until DF24 is advertised, apps are not supposed to use
FETCH4.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
d097bdcc78
st/nine: Track formats compatible with FETCH4
...
FETCH4 is a d3d9 extension not much used, as newer
ones were prefered. However it's support is required
to advertise the DF24 format.
Prepares support by tracking compatible formats.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
6a3451e170
st/nine: Unmap buffers after full unlock
...
Do not unmap anything until all buffer unlocks
were received.
A buffer can be filled in several threads, and thus
in the case of double locks, it's not possible to know
which unlock is received first.
Thus only unmap the buffers when the last unlock is
received.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
3dd6b79215
st/nine: Clamp GetAvailableTextureMem
...
Previously we used to clamp "available_texture_limit",
which was incorrect. "available_texture_mem" should
have been clamped instead.
The resulting code was noop.
The idea behind that code was that 32 bits executable
would see maximum 4GB video memory.
However it seems according to users that 32 bits apps
should be able to allocate more than 4GB, thus the
clamping is inappropriate.
Instead clamp the return of GetAvailableTextureMem, to
correctly report a high value when there is more than
4GB available.
I do not know what should exactly be the clamp value,
for now have a 64MB margin below UINT_MAX.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
f85f025a05
st/nine: Do not allow depth buffer render targets
...
Without the proposed check, some apps will decide to use depth buffers
as render targets.
Bug found investigating:
https://github.com/iXit/wine-nine-standalone/issues/82
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
3dbc542f97
st/nine: Reduce system memory allocated by D3DUSAGE_AUTOGENMIPMAP
...
For D3DUSAGE_AUTOGENMIPMAP basically, everything behaves
for the application as if the texture had one level.
However the pipe_resource has more levels, and those
get generated automatically.
Previously we did allocate all the Surfaces as if
the texture had all the levels, except of just one.
The app could still just access the first level.
This patch completly removes the useless unaccessible
Surfaces.
In addition removes redundant handling of D3DUSAGE_AUTOGENMIPMAP.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Gert Wollny
ec74a13618
r600/sfn: Update status
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
43816d20dd
r600: Enable GLSL 450 for nir shaders.
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
4d91812d3c
r600: Don't optimize using source modifiers on literals
...
The code improvement is limited and it interferes with using literals
directly in LDS index ops, since here source modifiers are not
supported, but the current assembler code might inject the modifiers.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
49b0e8657e
r600/sfn: Fix loading TES gl_PatchVerticesIn
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
bd57bf6d82
r600/sfn: handle querying the number of layers in cube arrays
...
This has to be loaded from a constant buffer instead of the actual
texture.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
935d9e6863
nir: disaallow reordering for r600 shared load and remove component field
...
The original shared load op can't be reordered, so it might be better to
also not allow this for the lowered variant.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
d1ccf4a0ee
r600/sfn: encode component in address for local IO
...
The backend code was actually assuming this, but the lowering still set
the components and write masks like it would be honoured.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
c0c025c870
r600/sfn: remove some old debug output
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
b07992c4dc
r600/sfn: remove unused emit_alu_op2_split_src_mods
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
ddc5c99402
r600/sfn: remove code for nir_op_fsign since it is lowered
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
4fe0339941
r600: unify nir shader options evaluation
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
04d8d455b7
r600/sfn: Allow any channel for the helper invocation evaluation
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
911c6af2fd
r600/sfn: lower isign and iabs in nir
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
7d94d759fa
r600/sfn: set info about using helper_invocation to skip sb
...
sb can't handle helper invocations, so skip sb when it is used.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
c427ed7ffe
r600/sfn: Lower FS inputs to temps late and, and lower interpolate at
...
This fixes FS shaders where a var is loaded with two different
interpolators.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00