Alyssa Rosenzweig
e4edb1a53f
panfrost: Hide some Bifrost-specific functions
...
Pertains to data structures removed in Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797 >
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig
58934dd666
panfrost: Add valhall_has_blend_shader field
...
Required in a hot path for silly historical reasons, so add a field to save a
pre-computed value thereof.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797 >
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig
fed04de481
panfrost: Add Valhall fields to panfrost_batch
...
There are new data structures that we need to (dirty) track. Add the
corresponding fields so we can proceed as with Bifrost dirty tracking.
Trivial increase in memory usage, but that should not matter as batches are
few.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797 >
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig
270e3e02f2
panfrost: Split out allow_fpk helper
...
For sharing between Bifrost's renderer state descriptor and Valhall's draw call
descriptor, which require the same logic in different places.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797 >
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig
ba395fc94c
panfrost: Split out panfrost_get_blend_shaders
...
The same logic is useful on Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797 >
2022-04-07 17:43:38 +00:00
Alyssa Rosenzweig
c408f7551c
panfrost: Specialize vertex state for Valhall
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797 >
2022-04-07 17:43:37 +00:00
Alyssa Rosenzweig
0795f3d7e4
panfrost: Add a pool to sampler_view
...
So we can allocate temporary sampler views for writeable images on Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797 >
2022-04-07 17:43:37 +00:00
Alyssa Rosenzweig
0299565f72
panfrost: Adapt panfrost_rasterizer for v9
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797 >
2022-04-07 17:43:37 +00:00
Alyssa Rosenzweig
7d1d7cdf57
panfrost: Don't check alpha test in fs_required on Bifrost+
...
Alpha testing is only native on Midgard. Saves a few instructions.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797 >
2022-04-07 17:43:37 +00:00
Alyssa Rosenzweig
0510e2373e
panfrost: Split out image access tracking
...
This logic is not device-specific. It is pulled from our existing Bifrost image
implementation and will be reused for Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15795 >
2022-04-07 15:11:05 +00:00
Alyssa Rosenzweig
5d187e9cad
panfrost: Add helpers to set batch masks
...
This logic is not device specific and will be used for both Bifrost and Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15795 >
2022-04-07 15:11:04 +00:00
Alyssa Rosenzweig
30c14f54cf
panfrost: Disable PIPE_CAP_PRIMITIVE_RESTART on v9
...
Valhall removed the ability to set an explicit primitive restart index as
required by desktop OpenGL, in favour of fixed primitive restart indices only as
required by OpenGL ES.
Set the CAPs accordingly so that mesa/st lowers unusual primitive restart
indices at draw call time.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15795 >
2022-04-07 15:11:04 +00:00
Alyssa Rosenzweig
dd735bcb69
panfrost: Make alpha=0 NOP / 1 store Bifrost only
...
These fields were removed in Valhall in favour of a simpler overdraw mechanism.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15795 >
2022-04-07 15:11:04 +00:00
Alyssa Rosenzweig
bb8a9038ff
panfrost: Move assign_vertex_buffer to pan_helpers
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15795 >
2022-04-07 15:11:04 +00:00
Krunal Patel
f21d6e18bc
frontend/va: Create decoder once the max_references is updated
...
Issue: When a video is decoded where the max_references is updated the
decoder keeps using same old value. This results into green patches and
decoding is not proper.
Root Cause: The max_references is updated only once when the instance is
created for the first time.
Fix: Added a check along with the context->decoder to check if the
context->templat.max_references has changed. If yes, then we go ahead
and create the decoder again.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Krunal Patel <krunalkumarmukeshkumar.patel@amd.corp-partner.google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15750 >
2022-04-07 14:48:37 +00:00
Mike Blumenkrantz
2f8d11463f
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15536 >
2022-04-07 14:36:25 +00:00
Mike Blumenkrantz
527deb91ff
zink: export PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15536 >
2022-04-07 14:36:25 +00:00
Mike Blumenkrantz
dac830b5ad
zink: run the cubemap -> array compiler pass if the shader key is set
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15536 >
2022-04-07 14:36:25 +00:00
Mike Blumenkrantz
f97014c3da
zink: handle nonseamless cube sampler binding
...
now when a cube is sampled with a nonseamless sampler, the relevant shader
stage is flagged for a variant update, the
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15536 >
2022-04-07 14:36:25 +00:00
Mike Blumenkrantz
be6d4b8583
zink: create an array view for all cube samplerviews
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15536 >
2022-04-07 14:36:25 +00:00
Mike Blumenkrantz
55f90c5fa4
zink: set nonseamless hint for sampler states
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15536 >
2022-04-07 14:36:25 +00:00
Mike Blumenkrantz
5b2d0cca17
zink: handle shader key variants that have nonseamless cubemaps
...
this is just the program-based handling, which means finding the right
variant and/or creating new ones based on matching a 32bit mask indicating
which textures must be rewritten
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15536 >
2022-04-07 14:36:25 +00:00
Mike Blumenkrantz
a06b0e0d21
zink: specify struct member name when copying inline uniforms for gfx variants
...
avoid memory mismatch if inline uniform values aren't first member of struct
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15536 >
2022-04-07 14:36:25 +00:00
Mike Blumenkrantz
be1b36d631
zink: support nir_op_imod
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15536 >
2022-04-07 14:36:25 +00:00
Mike Blumenkrantz
2d745904ca
zink: add a gently mangled version of the d3d12 cubemap -> array compiler pass
...
this differs in that it doesn't handle images and also doesn't filter
based on sampler type, instead using a 32bit mask for determining which
samplers to rewrite
also zink doesn't use sampler derefs
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15536 >
2022-04-07 14:36:25 +00:00
Mike Blumenkrantz
dc3f62e0c2
zink: rename a variable
...
no functional changes
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15536 >
2022-04-07 14:36:25 +00:00
Mike Blumenkrantz
fddb294cdf
zink: update ci list
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
df700317ab
zink: ci fixup
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
ab1941fc0e
zink: handle zombie swapchains
...
inject a dummy, matching image that can be used until the frontend
catches up and rescues us from whatever is happening
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
d32a897f4e
driconf: add override for Xwayland
...
zink needs this to avoid deadlocking on startup
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
48d63705d9
zink: export PIPE_CAP_DEVICE_RESET_STATUS_QUERY
...
this can work now
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
7f56fd9655
zink: it's kopperin' time
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
8ade5588e3
zink: add kopper api
...
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
a2711e47af
zink: check whether clear is enabled before applying in unbind
...
this is implicit, but make it explicit
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
4deba8cc96
zink: move variable decl up in unbind_fb_surface
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
ed343b415e
zink: pass index to unbind_fb_surface
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
513fcc37d9
zink: move drirc handling up
...
this can modify instance creation
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
820077acdb
zink: split surface creation more to allow disabling caching
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
e37f33cc8d
zink: add fail logging for drmPrimeFDToHandle
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
6998dbb778
zink: add VK_KHR_swapchain_mutable_format
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
1a029d38d8
zink: use two submits for every queue submit
...
first one empty for now
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
4772543956
zink: change early returns in zink_blit to gotos
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
e2abf7d28d
zink: move blit src/dst decls up in function
...
no changes
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
9811c39994
zink: move update_framebuffer_state() higher up in file
...
no changes
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
7e0ff34010
zink: put screen param into flush queue global data
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Mike Blumenkrantz
43f197acd7
zink: move flush queue init down a little further
...
no functional changes
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Adam Jackson
d760a9151b
gallium: Learn about kopper
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541 >
2022-04-07 00:17:40 +00:00
Erik Faye-Lund
1e570962ef
d3d12: use dxil_validator
...
Now that we have a shiny, new dxil validator interface, let's start
using it in the D3D12 gallium driver.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15751 >
2022-04-07 00:00:44 +00:00
Jason Ekstrand
e81f3edf76
iris: Allow userptr on 1D and 2D images
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15779 >
2022-04-06 23:18:21 +00:00
Jason Ekstrand
5fd2f462fb
iris: Allow non-page-aligned userptr
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15779 >
2022-04-06 23:18:21 +00:00