Boris Brezillon
06d6dd1b40
pan/bi: Support bit_count()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Boris Brezillon
58e887f07e
pan/bi: Add uclz() support
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
72c6173a85
pan/bi: Lower bitfield inserts/extracts
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
b0551cb0c2
pan/bi: Implement texture gathers
...
Passes all of dEQP-GLES31.functional.texture.gather.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
ab9650d5aa
pan/bi: Remove redundant TEXC opcode check
...
Already checked in emit_tex
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
1079d7ccd6
pan/mdg: Lower stores from helpers
...
Required for correct behaviour of SSBOs in fragment shaders on Midgard.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
3c44671df3
pan/mdg: Stub load_barycentric_sample
...
Now parity with Bifrost for not failing over these intrinsics.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
4a2f128985
pan/mdg: Lower ufind_msb, poorly
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
36248dd448
pan/mdg: Implement uclz
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
887e391447
pan/mdg: Rename bitcount8 to popcnt, fixing the unit
...
Still doesn't seem to work correctly for negative values.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
e55af16bfe
pan/mdg: Lower bitfield instructions
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
94b6d4e0ed
pan/mdg: Remove unused pack_unorm_4x8 lowering
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
954623856c
pan/mdg: Assert on bad 64-bit swizzle in disassembly
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
97a85c1071
panfrost: Add MULTISAMPLED sysval
...
To be used with Bifrost coverage mask updates.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
9f55657366
panfrost: Overhaul sysval handling
...
Don't preassign.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
4086b8980d
panfrost: Implement get_sample_position
...
Easy now that we have the table.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
b01df1f9bf
panfrost: Advertise MSAA 8x and 16x
...
On Bifrost. Could support Mali T760+ with additional debug.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
072cc5d5f1
panfrost: Ensure open_device has pandecode initialized
...
Requires reordering some calls.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
dd3bda22f4
panfrost: Use sample location LUT
...
Fixes multisampling issues on Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
a61fb62966
panfrost: Upload sample positions on device init
...
Needed to correctly implement multisampling on Bifrost, and used in
gl_SamplePosition implementation on Midgard. These are architecturally
invariant, so it's fine to hard code.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
376c3fa4db
panfrost: Set sample count/pattern for tiler FBD
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
555c17e2c6
panfrost: Remove batch_is_scanout
...
Unused since last commit.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
1a6fc40b99
panfrost: Remove PAN_REQ_DEPTH_WRITE
...
No consumers, garbage collect the whole thing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
37050ad62a
panfrost: Remove PAN_REQ_MSAA
...
Neglible win for draw time overhead.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
1439f8db12
panfrost: Don't use PAN_REQ_MSAA in SFBD
...
We can also generalize a bit to eliminate the state dependence.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
7b5aa5fbf2
panfrost: Don't set REQ_MSAA in pan_mfbd
...
No remaining consumer.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
ccce5b922f
panfrost: Generalize MSAA handling
...
This uses the framebuffer MSAA state directly and will generalize to
MSAA 8x/16x when somebody gets around to it.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
bea7839c1e
panfrost: Set tiler descriptor sampler pattern
...
Bifrost requires this to match the framebuffer descriptor's sample
pattern, but we were leaving the default (single-sampled)
unconditionally, leading to undefined behaviour.
It is unknown if this fixes any user-visible bugs, but without the
commit the descriptor is likely out-of-spec.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: 21.0 <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
b08100fb96
panfrost: Add panfrost_sample_pattern helper
...
We always use rotated grids to preserve current behaviour.
Cc stable as it is required for the next commit. If deemed too invasive,
a simpler fix could be backported.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: 21.0 <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
b6ad375bdf
panfrost: Respect info.fs.uses_sample_shading
...
Now that this is a link-time property.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
55f8df6d36
panfrost: Refactor sample shading state
...
Moves the decision to evaluate per-sample to link time instead of
draw-time, with an explicit property. No functional change.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
56bf3086fc
panfrost: Push sample positions sysval for Midgard
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
beb7d66056
panfrost: Add sample positions sysval
...
For Midgard. On Bifrost, the hardware pushes this directly to FAU.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
f782983cfb
panfrost: Preload sample mask if needed
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
9d682ad7f9
pan/decode: Only print local storage for vertex jobs
...
It's convenient to group this with the framebuffer, but the other fields
are unused by the hardware for vertex jobs. They _are_ used for tiler
jobs.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
b27d0164ee
pan/decode: Cleanup sample locations decode
...
We know what this is now. I opted to leave it in ~fixed-point format to
avoid bikeshedding over precision.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
2afdcc187b
nir: Add sample_positions_pan intrinsic
...
Facilites the gl_SamplePosition lowering on Bifrost, where the sample
positions are accessed directly in a packed in-memory format.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Kenneth Graunke
e7dc48c309
iris: Make a pin_scratch_space() helper
...
We need to (re-)pin the scratch buffer in four different places, and
it's going to get slightly more complicated on future platforms. So,
make a helper function, allowing us to add the complexity in one spot.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9023 >
2021-02-12 21:14:26 +00:00
Hoe Hao Cheng
93ff47eb19
zink: enable KHR_shader_draw_parameters on Vulkan <1.2
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
efe6f00e34
zink/codegen: do not enable extensions that are now core
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
4deb58b9d8
zink/codegen: fix type annotations
...
mypy complains about this
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
4751135e57
zink/codegen: validate has_properties and has_features
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
613132c41f
zink/codegen: perform basic validation in zink_device_info
...
Check for existence of extension and its type
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
33d006f565
zink/codegen: make zink_device_info accept vk.xml
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
3d36bfd21f
zink/codegen: introduce notion of non-standard extensions
...
this is for the MoltenVK extensions, especially "VK_MVK_moltenvk", which
right now is reserved in the registry. Making it non-standard skips all
the validations.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
7489f5fc4d
zink/codegen: more validation in zink_instance
...
the MVK check is a workaround, since VK_MVK_moltenvk is not an official
VK extension per se - the next patch will introduce nonstandardness to
Extension.
Two new validations are added by this patch:
1. extension type (non-instance extensions are rejected)
2. existence of specified instance functions
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
b64a9a12a4
zink/codegen: introduce ExtensionRegistry
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Samuel Pitoiset
caa4a218f1
radv/winsys: set use_global_list inside the critical section
...
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/9006 >
2021-02-12 19:12:01 +00:00
Samuel Pitoiset
7379ca4043
radv: only make the WSI images resident if the global BO list is used
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4270
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4286
Fixes: 96b03aaa17 ("radv: use the global BO list from the winsys")
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/9006 >
2021-02-12 19:12:01 +00:00
Daniel Schürmann
44a76ba16d
aco: use VCC as regular SGPR pair on GFX10
...
There is no need to reserve it for special purposes, only.
Totals from 139391 (100.00% of 139391) affected shaders (Navi10):
VGPRs: 4738296 -> 4738156 (-0.00%); split: -0.01%, +0.00%
SpillSGPRs: 16188 -> 14968 (-7.54%); split: -7.60%, +0.06%
CodeSize: 294204472 -> 294118048 (-0.03%); split: -0.04%, +0.01%
MaxWaves: 2119584 -> 2119619 (+0.00%); split: +0.00%, -0.00%
Instrs: 56075079 -> 56056235 (-0.03%); split: -0.05%, +0.01%
Cycles: 1757781564 -> 1755354032 (-0.14%); split: -0.16%, +0.02%
VMEM: 52995887 -> 52996319 (+0.00%); split: +0.07%, -0.07%
SMEM: 9005338 -> 9004858 (-0.01%); split: +0.16%, -0.17%
VClause: 1178436 -> 1178331 (-0.01%); split: -0.02%, +0.01%
SClause: 2403649 -> 2404542 (+0.04%); split: -0.14%, +0.18%
Copies: 3447073 -> 3432417 (-0.43%); split: -0.66%, +0.23%
Branches: 1166542 -> 1166422 (-0.01%); split: -0.11%, +0.10%
PreSGPRs: 4229322 -> 4235538 (+0.15%)
PreVGPRs: 3817111 -> 3817040 (-0.00%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8921 >
2021-02-12 19:00:18 +00:00