Mike Blumenkrantz
f6e058ea4a
zink: remove barriers from buffer rebinds
...
these aren't needed anymore
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11747 >
2021-07-06 20:40:36 -04:00
Mike Blumenkrantz
9603f3bd01
zink: make image_bind_count work for buffers
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11747 >
2021-07-06 20:40:32 -04:00
Mike Blumenkrantz
de903ae0c7
zink: make samplerview bind mask apply to buffer resources too
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11747 >
2021-07-06 20:39:38 -04:00
Mike Blumenkrantz
d48367fbad
zink: add a per-stage bind mask for ssbos
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11747 >
2021-07-06 20:39:33 -04:00
Mike Blumenkrantz
4a194b7bbf
zink: add a per-stage mask for ubo binds
...
optimizing buffer replacement was never so difficult
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11747 >
2021-07-06 20:39:30 -04:00
Mike Blumenkrantz
496b794b10
zink: remove some descriptor_refs_dirty checks from resource binding
...
these no longer provide any optimization
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:10 +00:00
Mike Blumenkrantz
2f46f0328f
zink: remove fb surface resource refs
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:10 +00:00
Mike Blumenkrantz
e03d15141b
zink: remove fb surface refs
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:10 +00:00
Mike Blumenkrantz
1771ba8f96
zink: remove samplerview refs
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:10 +00:00
Mike Blumenkrantz
8fa3f3e6a8
zink: remove imageview refs from shader images
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:10 +00:00
Mike Blumenkrantz
7dfb9486dc
zink: set new batch usage during surface rebinds
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:10 +00:00
Mike Blumenkrantz
447ba04d87
zink: add surface ref during rebind if unflushed usage
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:10 +00:00
Mike Blumenkrantz
59b142ae03
zink: remove refs from desc ref updating
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:10 +00:00
Mike Blumenkrantz
b036215594
zink: remove resource refs from samplerviews
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:10 +00:00
Mike Blumenkrantz
b8311567ed
zink: remove refs from shader images
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:10 +00:00
Mike Blumenkrantz
f0be412c8a
zink: remove refs from shader buffers
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:09 +00:00
Mike Blumenkrantz
a52e2048f7
zink: remove refs from ubos
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:09 +00:00
Mike Blumenkrantz
03c3630cc1
zink: remove refs from vertex buffers
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:09 +00:00
Mike Blumenkrantz
4846fb149a
zink: remove refs from buffer rebinds
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:09 +00:00
Mike Blumenkrantz
b9ada09ca3
zink: move resource object ref to batch in init_storage_object
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:09 +00:00
Mike Blumenkrantz
08b3847215
zink: move resource object ref to batch in invalidate hook
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:09 +00:00
Mike Blumenkrantz
db32c3aff3
zink: add util function for transferring resource refs to batch
...
there's no point in doing unref->ref if it's known that this will happen
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692 >
2021-07-07 00:22:09 +00:00
Mike Blumenkrantz
ac07ad8414
lavapipe: implement KHR_separate_depth_stencil_layouts
...
this is a conformant implementation
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11738 >
2021-07-06 17:09:31 -04:00
Mike Blumenkrantz
9bbe80accd
lavapipe: implement EXT_separate_stencil_usage
...
this is a conformant implementation
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11738 >
2021-07-06 17:09:31 -04:00
Alyssa Rosenzweig
7040051589
pan/decode: Handle IDVS jobs on Bifrost
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11413 >
2021-07-06 15:50:28 -04:00
Alyssa Rosenzweig
73e80994d5
panfrost: Add secondary shader XML fields
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11413 >
2021-07-06 15:50:28 -04:00
Daniel Stone
f505d6f5de
panfrost/genxml: Decode Bifrost index-driven vertex jobs
...
Bifrost has a new type of job called 'index-driven vertex', which takes
in two shaders. The primary shader, called for all values, performs
position shading to a cacheline-aligned attribute buffer. The secondary
shader, called for values still live after culling, performs varying
shading.
It is the responsiblilty of the implementation to ensure that vertices
from different instances do not share a cacheline.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11413 >
2021-07-06 15:50:28 -04:00
Jason Ekstrand
60568d5dce
iris: Use isl_surf_get_uncompressed_surf
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647 >
2021-07-06 19:29:42 +00:00
Jason Ekstrand
98faa09bb5
iris: Don't leak the surface if uncompressed re-interp fails
...
Fixes: a032a9665f "iris: Enable PIPE_CAP_SURFACE_REINTERPRET_BLOCKS"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647 >
2021-07-06 19:29:42 +00:00
Jason Ekstrand
9946120d2b
intel/isl: Add more cases to isl_surf_get_uncompressed_surf
...
We can actually create array surfaces instead of requiring single-slice
in a few cases. This does require us to be very careful about our
checks, though.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647 >
2021-07-06 19:29:42 +00:00
Jason Ekstrand
2001a26309
intel/blorp: Use isl_surf_get_uncompressed_surf
...
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647 >
2021-07-06 19:29:42 +00:00
Jason Ekstrand
20f075c270
intel/blorp: Adjust the compressed copy rectangle before convert_to_single_slice
...
It doesn't matter for the actual copy rectangle and this makes the
asserts a bit nicer as we don't need to bother with the intratile
offsets because there aren't any yet.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647 >
2021-07-06 19:29:42 +00:00
Jason Ekstrand
8f281be0ba
intel/isl: Pull the uncompressed surface view code from anv
...
This adds a helper isl_surf_get_uncompressed_surf for creating a surface
which provides an uncompressed view into a compressed surface. The code
is basically a direct port of the uncompressed surface code from the
Vulkan driver which, in turn, was a port from BLORP.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647 >
2021-07-06 19:29:42 +00:00
Kenneth Graunke
4bf764d53d
crocus: Reduce SSBO alignment requirements from 64B to 4B.
...
Mirroring a change in iris; see the previous commit for rationale.
One difference is that crocus does sometimes use CPU maps on Atoms
for *reads*...but writes don't go through CPU caches. Should be OK.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11727 >
2021-07-06 19:11:24 +00:00
Kenneth Graunke
96d8e48ed5
iris: Reduce SSBO alignment requirements from 64B to 4B
...
Back when SSBOs were first enabled in i965, we tried to work around
issues where the CPU and GPU were incoherently writing to the same
cacheline by forcing an alignment such that different sections of
data would fall in different cachelines. This seems wrong.
On integrated GPUs with LLC, CPU and GPU writes should be coherent.
On integrated GPUs without LLC, we either enable snooping (so they
are again coherent), or we use WC maps (so the CPU cache isn't used).
Discrete GPUs always use WC maps (so the CPU cache isn't used).
This should work. In other words, I think the increased alignment
was just working around coherency problems on atoms that have been
fixed in the intervening 6 year time period.
Untyped surface messages require 4B alignment.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5016
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11727 >
2021-07-06 19:11:24 +00:00
Alyssa Rosenzweig
12c057315b
panfrost: Eliminate redundant flushes with AFBC
...
We have all the information we need easily available.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077 >
2021-07-06 18:50:38 +00:00
Alyssa Rosenzweig
5100c42cbb
panfrost: Split "flush writer" from "flush accessing"
...
Since writers are counted in the accessor set, the old implementation
had a redundant flush in the "flush accessing" case. To fix, split the
two modes into separate functions, removing the redundancy and offering
a much more ergonomic API.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077 >
2021-07-06 18:50:38 +00:00
Boris Brezillon
cecb889481
panfrost: Do tracking of resources, not BOs
...
Squashed together with commits from Boris's original dependency tracking
cleanup series.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077 >
2021-07-06 18:50:38 +00:00
Alyssa Rosenzweig
9769696659
panfrost: Wrap occlusion query in pipe_resource
...
For proper tracking.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077 >
2021-07-06 18:50:38 +00:00
Alyssa Rosenzweig
bef1074700
panfrost: Express dependencies as resources, not BOs
...
This is a more ergnomic API, and will allow further optimizations.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077 >
2021-07-06 18:50:38 +00:00
Boris Brezillon
f56adf135a
panfrost: Replace the batch->bos hashmap by a sparse array
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077 >
2021-07-06 18:50:38 +00:00
Emma Anholt
4118264643
nir: Free the instructions in a DCE instr removal.
...
No significant change in shader-db time (n=11), but should be a little win
for memory usage by the compiler.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628 >
2021-07-06 11:24:48 -07:00
Emma Anholt
5618445d45
nir: Use remove_and_dce for nir_shader_lower_instructions().
...
Reduces the work that other shader passes have to do to look at dead code,
and possibly extra rounds around the optimization loop if dce wasn't the
last pass in it.
shader-db runtime -1.12919% +/- 0.264337% (n=49) on SKL.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628 >
2021-07-06 11:24:45 -07:00
Emma Anholt
5251548572
nir: Add a nir_instr_remove that recursively removes dead code.
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628 >
2021-07-06 11:24:43 -07:00
Emma Anholt
d8d7d475aa
anv: Fix unused var warning on release builds from an assertion.
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628 >
2021-07-06 11:24:37 -07:00
Mike Blumenkrantz
fd2d463a98
zinK: tweak shader module update -> pipeline combined_dirty conditional
...
make this more explicit
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11691 >
2021-07-06 18:05:15 +00:00
Mike Blumenkrantz
0cf643db5d
zink: remove shader_id
...
now that shaders are per-program, shader_id is no longer useful
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11691 >
2021-07-06 18:05:15 +00:00
Mike Blumenkrantz
61f2667cf5
zink: remove gfx program slot mapping
...
if shaders aren't being shared between programs, they can instead directly
assign io between the shader stages such that only the producer and consumer
pair need to have their slots match up
this requires that each gfx program struct stores base nir for a given shader
in order to avoid breaking io for other programs which reuse shader states
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11691 >
2021-07-06 18:05:15 +00:00
Mike Blumenkrantz
a8448a91e6
zink: set gfx program shaders and generate internal tcs during program creation
...
the base shader states will never change for a program, and tcs will never
change its io, so there's no point in having this in the shader update hotpath
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11691 >
2021-07-06 18:05:15 +00:00
Mike Blumenkrantz
a92442225c
zink: split up shader cache per-stage
...
this reduces overhead from lookups by ensuring that the number of entries
in a given table are minimized
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11691 >
2021-07-06 18:05:15 +00:00