Emma Anholt
a2dfb49961
llvmpipe: memcpy user_buffers at set_constant_buffer time.
...
The data in the user buffer is only valid for a short period of time, and
we could use-after-free it if rendering hadn't been flushed by shader
deletion time.
Fixes : #5254
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12724 >
2021-09-07 19:16:32 +00:00
Emma Anholt
a83a2b980c
llvmpipe: Fix leak of CS local memory with 0 threads.
...
Fixes: bde08ce4d7 ("llvmpipe: handle compute shader launch with 0 threads")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12724 >
2021-09-07 19:16:32 +00:00
Emma Anholt
dee8b50cad
llvmpipe: Free CS shader images on context destroy.
...
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12724 >
2021-09-07 19:16:32 +00:00
Paulo Zanoni
26364c6347
iris: signal the syncobj after a failed batch
...
When a batch fails we either recreate our context (in case we got -EIO
or -ENOMEM) or we abort() (every other error). If we don't abort and a
later batch has a dependency on the batch that failed, then this newer
batch will fail with -EINVAL since it requires a syncobj that was
never submitted, which means we'll abort().
To avoid this problem, in this patch we simply signal syncobjs of
failed batches. This means we may be breaking our dependency tracking,
but IMHO it's better than simply letting it abort() later.
In other words, this moves the situation for some apps from "app
causes a GPU hang and then aborts" to "app causes a GPU hang but keeps
running".
Note: on some older Kernels (like today's Debian 5.10 Kernel) I see X
simply freezing after the GPU hang when the app doesn't decide to
abort(). Switching to a more recent Kernel fixes this issue for me, so
in case it happens to you make sure you have the most recent stable
trees.
v2:
- Fix coding style (Ken).
- Use the big comment block provided by Ken (Ken).
- Adjust the commit message so avoid saying we retry (Ken).
- Rebase after the syncobj ownership changes.
- Drive-by add a missing white space in the header.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12657 >
2021-09-07 19:03:03 +00:00
Emma Anholt
db35acafa9
ci/freedreno: Skip slow SizedDeclarationsPrimitive in CI.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12753 >
2021-09-07 18:42:19 +00:00
Emma Anholt
52f65551d2
ci/freedreno: Mark a630 basic-glsl-misc-fs as flaky.
...
My branch mostly fixed it, but apparently it's not stable yet.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12753 >
2021-09-07 18:42:19 +00:00
Emma Anholt
f5f446f3ec
ci/freedreno: Fix typo in glx-tfp flake annotation.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12753 >
2021-09-07 18:42:19 +00:00
Emma Anholt
edfff331b3
freedreno/a6xx: Emit a WFI after event writes flushing CCU.
...
Following on from !12475 , do the same CCU workaround for freedreno as
turnip is doing, so that we flush CCU correctly for when color/depth is
next read under a different cache domain from where it was written.
Fixes instability (particularly if the GPU is clocked up) on
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8* in bypass
mode on a630.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11481 >
2021-09-07 18:14:30 +00:00
Marek Olšák
69e96cfc0d
ac,radv: remove unused inputs array and VS input code
...
The previous commit stopped using "inputs".
"load_layer_id" has always been broken and it was probably unused anyway.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
3fb229e010
ac,radeonsi: load VS inputs at the call site of nir_intrinsic_load_input
...
to match ACO
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
bce7c7f3fc
ac/llvm: implement nir_intrinsic_elect
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
e0f07483d0
ac/llvm: implement nir_intrinsic_overwrite_*_arguments_amd
...
This should work if the intrinsics are not called from conditional blocks.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
1e178f7a37
ac: make ac_shader_abi::inputs an array instead of a pointer
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
6df5f268db
ac: remove needless parameters from ac_shader_abi::emit_outputs
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
2e95ad1433
ac/llvm: implement a bunch of NIR AMD intrinsics for NGG
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Marek Olšák
a33602b1f9
ac/llvm: remove load_tess_coord callback
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570 >
2021-09-07 17:51:41 +00:00
Emma Anholt
0fed8d4fab
ci/iris: Switch GL/GLES testing to suites.
...
Better board utilization, less fussy load-balancing of the boards, and
being able to add KHR-GLES* and multisample testing without having to add
more reboots.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437 >
2021-09-07 10:36:12 -07:00
Emma Anholt
4abcf8433c
ci/iris: Consistently use .test-manual-mr for our unstable hardware.
...
... and place it in the board's definition, instead of the consuming jobs.
GLK and APL are the boards that are enabled by default so far, and the
rest are off. But, if you want to check on some other board, you should
be able to click the button.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437 >
2021-09-07 10:36:09 -07:00
Emma Anholt
b91ca2022e
ci/iris: Unmark dma_buf_import_export tests as failing.
...
We now get the binaries built in our rootfs.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437 >
2021-09-07 10:36:06 -07:00
Emma Anholt
a9150f0bdc
ci/iris: Mark create_context-no_error as failing.
...
Consistent in CI, and other drivers fail at it too.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437 >
2021-09-07 10:35:58 -07:00
Connor Abbott
f5f948826a
ir3/lower_pcopy: Set entry->done in the swap loop
...
We process all the remaining copy entries one-at-a-time when emitting
swaps, so normally we wouldn't need to care about whether the entry is
done, except that we need to look at the other entries to split them up
and we need to skip this when the copy to be split has already been
processed.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5307
Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12747 >
2021-09-07 17:12:37 +00:00
Connor Abbott
e7f8d283d7
ir3/lower_pcopy: Use right flags for src const/immed
...
At some point I split up the flags into overall/source flags and made
copies from immed/const only set IR3_REG_IMMED/IR3_REG_CONST on the
source flags, but I forgot to update this. Noticed by inspection.
Fixes: 0ffcb19b9d ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12747 >
2021-09-07 17:12:37 +00:00
Jesse Natalie
67065f99c5
llvmpipe: Don't wait for already-terminated threads on Windows
...
In the case of an app returning from main(), Windows will apparently terminate
other threads before invoking final cleanup on the main thread.
llvmpipe can't wait for threads to signal a semaphore if the thread is already
gone. Since we're already in a WIN32 special case, just call the Win32 API
to check if the thread is terminated or STILL_ALIVE.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12731 >
2021-09-07 16:19:10 +00:00
Jose Maria Casanova Crespo
cd46cad0a7
v3d: Enable PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE
...
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12744 >
2021-09-07 16:04:34 +00:00
Ed Martin
09aeb59b54
winsys/radeonsi: Set vce_encode = true when VCE found
...
Allows VA-API encoding on AMD PITCAIRN
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5305
Fixes: 43c04ab2b4 ("radeonsi: separate video hw info based on HW engine individually")
Reviewed-by: James Zhu <James.Zhu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12679 >
2021-09-07 15:32:21 +00:00
Veerabadhran Gopalakrishnan
6e6b432df2
radeon/vcn: Add FW header flag to enable VP9 header parsing
...
set flags to enable VP9 uncompressed header parsing in FW and extract
quantization and loop filter parameters.
Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12703 >
2021-09-07 13:59:50 +00:00
Mike Blumenkrantz
71aa4adba3
zink: fix PIPE_SHADER_CAP_FP16_DERIVATIVES handling
...
this requires 16bit io, not just alus
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
5ce3fa0100
zink: handle bo struct types that are just a runtime array
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
efc4e577ed
zink: handle 8/16bit ssbo storage
...
this is a bit gross, but basically just add an array of extra spvids
so that each bitsize can have its own variables to keep the types in sync
glsl can't do this, but (future) internal mesa shaders can
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
600f7804bf
zink: implement nir_op_pack_half_2x16_split
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
567d539512
zink: lower 32_2x16_split pack/unpack instructions
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
376b963c81
zink: hook up 8/16bit storage exts
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
86b4e2e9cc
zink: add 8bit alu handling
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
6931fe58ca
zink: fix PIPE_CAP_DRAW_PARAMETERS export
...
before 1.2, assume this is available if the extension is there, otherwise
require the feature
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12710 >
2021-09-07 13:17:45 +00:00
Mike Blumenkrantz
22da219dd8
zink: always emit sample id 0 for non-msaa texel pointers in ntv
...
in practice this shouldn't matter since the sample id must always be zero,
but it's still a spec violation
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12710 >
2021-09-07 13:17:45 +00:00
Mike Blumenkrantz
d524d0d72b
zink: move drawid_broken to unhashed pipeline state
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Mike Blumenkrantz
58d08635b5
zink: move point sprite rasterizer bits to unhashed pipeline state
...
avoid reading values that aren't part of the pipeline state
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Mike Blumenkrantz
0dc2de7b76
zink: add pipeline state flag for determining if output type is points
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Mike Blumenkrantz
ad45e351a2
zink: move sample part of fs key to renderpass
...
this is more accurate
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Mike Blumenkrantz
43cfd97ade
zink: remove tcs shader keys
...
these never did anything and need a rework to become useful, assuming
I even find a case where such a thing would be needed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Mike Blumenkrantz
75ed571921
zink: hash blend state pointers on creation
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12660 >
2021-09-07 13:03:08 +00:00
Danylo Piliaiev
9ab4bfcb53
turnip: re-emit vertex params after they are invalidated
...
Constants could be invalidated via HLSQ_INVALIDATE_CMD which is
emitted when new pipeline is bound and in CmdClearAttachments.
Also they become invalid after secondary cmd execution.
Fixes geometry flickering in Genshin Impact
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5313
Fixes: 815a85dd7c "turnip: do not re-emit same vs params"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12684 >
2021-09-07 08:34:18 +00:00
Jonathan Marek
27f2c9dc2e
freedreno/registers: add a6xx media formats
...
Define hardware formats which correspond to media formats.
DPU/CAMSS/VENUS/CDSP can consume/produce buffers in these formats with UBWC
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12740 >
2021-09-06 18:48:47 +00:00
Emma Anholt
c993f02f6a
i915g: Reject non-unrolled loops or non-flattend IFs at link time.
...
i915 has no support for control flow, so we need to link-fail shaders that
fail to unrooll loops. This is valid for GLES2, and non-conformant but
the best we can do for GL2.
Note that we still have some dEQP failures where loops that should be
unrollable and thus are required to be supported don't get unrolled
(#4979 ).
Closes : #4978
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
17332ceb0f
mesa/st: Add an optional GLSL link fail msg to finalize_nir.
...
GLES2 drivers are allowed to reject some GLSL constructs, like dynamic
loop bounds (which neither i915g nor vc4 can fully support), but gallium
hasn't had any way to trigger a link failure. Add a return msg to the
finalize_nir hook, which is called at the end of GLSL linking, and use
that. This means that some other callers of finalize need to do something
with the msg, and we (for now) just throw it away.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
1b4b9a9eff
i915g: Add finalize_nir.
...
This allows mesa/st to do some more optimization of state variables, but
more importantly it will be what we use to do GLSL link-time errors for
loops.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
682d08a6ea
i915g: Expose PIPE_CAP_TGSI_TEXCOORD.
...
We want to be able to use finalize_nir, but doing so requires this flag to
be set because not having it is incompatible with being able to finalize
twice (since the texcoord workaround varyings shift happens at variant
time rather than link time).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
d5254601c9
i915g: Simplify the process of texcoord mapping to TGSI semantics.
...
Custom index-as-semantic defines and extra bool flags at state update time
are unnecessary if we just store the semantics and index that each
texcoord should be.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
6dd87592a6
mesa/st: Add an assertion for finalize_nir versus PIPE_CAP_TEXCOORD.
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00
Emma Anholt
9194ee90c8
cso: Revert using FS sampler count for other stages at context unbind.
...
You shouldn't be asking drivers without VS texturing to unbind VS
textures, which was breaking i915g.
Fixes: 802e43a6b5 ("gallium/cso: add unbind mask for cso restore")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218 >
2021-09-06 18:09:25 +00:00