Alyssa Rosenzweig
41070fedca
pan/bi: Propagate fabs/neg/sat
...
Initial support for modifier propagation. Bifrost makes this
unreasonably hard.
total instructions in shared programs: 151604 -> 150761 (-0.56%)
instructions in affected programs: 48773 -> 47930 (-1.73%)
helped: 212
HURT: 0
helped stats (abs) min: 1 max: 28 x̄: 3.98 x̃: 1
helped stats (rel) min: 0.29% max: 12.70% x̄: 1.75% x̃: 1.26%
95% mean confidence interval for instructions value: -4.71 -3.25
95% mean confidence interval for instructions %-change: -1.97% -1.53%
Instructions are helped.
total tuples in shared programs: 131876 -> 131560 (-0.24%)
tuples in affected programs: 25393 -> 25077 (-1.24%)
helped: 104
HURT: 3
helped stats (abs) min: 1 max: 28 x̄: 3.08 x̃: 2
helped stats (rel) min: 0.34% max: 8.57% x̄: 1.55% x̃: 1.04%
HURT stats (abs) min: 1 max: 2 x̄: 1.33 x̃: 1
HURT stats (rel) min: 0.51% max: 2.86% x̄: 1.30% x̃: 0.53%
95% mean confidence interval for tuples value: -3.63 -2.28
95% mean confidence interval for tuples %-change: -1.73% -1.21%
Tuples are helped.
total clauses in shared programs: 28122 -> 28032 (-0.32%)
clauses in affected programs: 2720 -> 2630 (-3.31%)
helped: 58
HURT: 1
helped stats (abs) min: 1 max: 6 x̄: 1.57 x̃: 1
helped stats (rel) min: 0.88% max: 14.29% x̄: 4.06% x̃: 3.67%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 7.69% max: 7.69% x̄: 7.69% x̃: 7.69%
95% mean confidence interval for clauses value: -1.85 -1.20
95% mean confidence interval for clauses %-change: -4.60% -3.13%
Clauses are helped.
total quadwords in shared programs: 119778 -> 119509 (-0.22%)
quadwords in affected programs: 20698 -> 20429 (-1.30%)
helped: 95
HURT: 1
helped stats (abs) min: 1 max: 28 x̄: 2.85 x̃: 2
helped stats (rel) min: 0.38% max: 7.14% x̄: 1.50% x̃: 1.13%
HURT stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
HURT stats (rel) min: 3.23% max: 3.23% x̄: 3.23% x̃: 3.23%
95% mean confidence interval for quadwords value: -3.49 -2.11
95% mean confidence interval for quadwords %-change: -1.71% -1.20%
Quadwords are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327 >
2021-06-15 20:27:22 +00:00
Alyssa Rosenzweig
e41d8ed007
pan/bi: Report tuples, not nops, in shader-db
...
More useful in practice, I find.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327 >
2021-06-15 20:27:22 +00:00
Alyssa Rosenzweig
ecd9a3fed5
pan/bi: Handle fsat_signed and fclamp_pos
...
Translates to Mali-specific clamps.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327 >
2021-06-15 20:27:22 +00:00
Alyssa Rosenzweig
16bf1ae935
pan/bi: Track instruction size in opcode table
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327 >
2021-06-15 20:27:22 +00:00
Alyssa Rosenzweig
91a2804d8f
pan/bi: Move typesize to common code
...
Useful for the opcode table.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327 >
2021-06-15 20:27:22 +00:00
Alyssa Rosenzweig
7db6d8d748
pan/bi: Move bi_word_node to common code
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327 >
2021-06-15 20:27:22 +00:00
Alyssa Rosenzweig
7ad9e1e5a5
pan/bi: Include modifier info in opcode table
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327 >
2021-06-15 20:27:22 +00:00
Alyssa Rosenzweig
a88fa74d8e
pan/decode: Handle cache flush jobs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
866c22bff5
pan/decode: Fix image attribute counting
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
9b3b1561fd
panfrost: Add "Cache Flush" job XML
...
Likely useful for efficient memory_barrier and texture_barrier
operations.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
29012d96b8
panfrost: Clean up vertex/instance ID on Midgard
...
Use the proper XML.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
f58e08fbab
panfrost: Add XML for vertex/instance ID records
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
a9a8d74d1f
panfrost: Remove pan_image_state
...
Instead just group the fields about validity into a simpler structure in
panfrost_resource. Panvk can do the same. Common code shouldn't be
thinking in terms of this 'larger' structure anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
6f0e1c27d9
panfrost: Make data_valid a bitset
...
More compact and will allow simpler code.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
77aff51090
panfrost: Don't clobber indirect dispatch fields
...
These should be kept as zero so they can be packed correctly. Fixes a
number of KHR-GLES31 fails.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
d4f25a9588
pan/indirect_dispatch: Use extracted values
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
fdfc8b9806
pan/indirect_dispatch: Expand split expressions
...
Careful algebraic transforms makes these much simpler.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
989caacc32
pan/indirect_dispatch: Distinguish minus-1 defs
...
This makes the logic clearer and allows the original values to be
accessed.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
a90345d4c8
pan/indirect_dispatch: Simplify empty command case
...
Job type is alone with bitsize in the bottom byte of the addressed
worse, so if we use an 8-bit store we avoid the RMW complexity.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
52991aad7f
pan/indirect_dispatch: Indent NIR blocks
...
Easier to visualize the control flow this way.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
f652c61283
panfrost: Reduce pan_image_state indirection
...
In actuality, this just shadows the crc_valid for pan_cs... the
data_valid checks are contained in the caller and just add noise.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:11 +00:00
Alyssa Rosenzweig
d181218238
panfrost: Don't CRC mipmapped textures
...
CRC is intended for final render targets and especially for UI, not the
kind of things you'd mipmap. Meanwhile CRC only works for a single
level, meaning at any given point, half the CRC buffer would be wasted
for a full miptree.
"Arm Mali Best Practices Guide" tells developers that the DDK only
enables CRC for non-mipmapped resources (at least the Vulkan DDK), so
let's do the same, save some memory, and simplify our code.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
0186367dc7
panfrost: Add some missing BGRA formats
...
Fixes:
KHR-GLES3.copy_tex_image_conversions.forbidden.*
KHR-GLES3.packed_pixels.pbo_rectangle.rgb5_a1
KHR-GLES3.packed_pixels.pbo_rectangle.rgba
KHR-GLES3.packed_pixels.pbo_rectangle.rgba4
KHR-GLES3.packed_pixels.pbo_rectangle.rgba8
KHR-GLES3.packed_pixels.rectangle.rgb5_a1
KHR-GLES3.packed_pixels.rectangle.rgba
KHR-GLES3.packed_pixels.rectangle.rgba4
KHR-GLES3.packed_pixels.rectangle.rgba8
KHR-GLES3.packed_pixels.varied_rectangle.rgb5_a1
KHR-GLES3.packed_pixels.varied_rectangle.rgba
KHR-GLES3.packed_pixels.varied_rectangle.rgba4
KHR-GLES3.packed_pixels.varied_rectangle.rgba8
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
43cff98dff
pan/mdg: Insert moves to load/store registers
...
Ensures a valid schedule/regalloc is possible when vectors are used in
funny ways, as occurs in dEQP-GLES31 resulting in a scheduler hang (or
with prior patches, an RA failure).
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
5f37474403
pan/mdg: Assert scheduled instructions are reasonable
...
Would've got a scheduler hang.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
fa20037895
pan/mdg: Don't skip unit-based checks in choose_instruction
...
If an explicit unit isn't specified, we still should check.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
edbdf4f4e7
pan/mdg: Use more accurate ld/st reg estimates
...
And assert that we got them right.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
68846ba4a8
pan/mdg: Lower away gl_VertexID offset
...
Technically we can stick the offset in the vertex ID attribute record,
but this is a faster way to get the test passing and Midgard perf?
what's that?
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
26baad41f1
pan/mdg: Wire in PAN_SYSVAL_VERTEX_INSTANCE_OFFSETS
...
If we're going to advertise the CAP, better not crash..
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
5dd6030876
panfrost: Mark 16/32_UNORM as non-renderable (v5)
...
You'd just get a blend shader anyway, and since they're not spec
requirements, let's not worry about backporting the Midgard lowerings.
Takes dEQP-GLES31.functional.fbo.color.tex2d.* on Midgard from crashing
to not supported.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
6936298d75
pan/mdg: Fix incorrect rewrite in Midgard scheduler
...
Fixes on Midgard
dEQP-GLES31.functional.shaders.builtin_functions.uniform.findLSBMinusOne.highp_fragment
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
def3d52a15
pan/mdg: Update r1.w comment
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
1369d5e43a
pan/mdg: Handle {i,u}{add,sub}_sat
...
As SATADD with different modifiers.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
bdb32eec9a
pan/mdg: Fix units for SUBSAT
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
07856d155b
panfrost: Respect early-Z force on Midgard
...
Fixes dEQP-GLES31.functional.image_load_store.early_fragment_tests.* on
Midgard.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
22a973601b
pan/mdg: Stub memory_barrier{_image}
...
Same as we do for Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
21d06a41f7
pan/mdg: Make -Wswitch happy
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
34c6d105f6
pan/mdg: Use consistent casing in midgard_print
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
1760511e02
panfrost: Add util_draw_indirect() debug path
...
Useful for finding problems with the GPU indirect path.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
a78487f795
panfrost: Fix crc_valid condition
...
Fixes fails in dEQP-GLES31.functional.texture.border_clamp.* when run in
parallel with certain other tests.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
729b8c55f4
panfrost: Simplify compute_checksum_size formula
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
a5ec1e7f75
pan/bi: Force u32 for flat varyings
...
Since the GLSL compilers will pack together flat varyings with no regard
to type, under the assumption the backend can deal with it. I guess we
can deal with it then... Fixes fails in
dEQP-GLES31.functional.separate_shader.random.*
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
58cbf10cdb
panfrost: Correctly size varyings
...
The same slot could be specified multiple times with different
location_frac out of order, so we use two passes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
16e6657132
pan/indirect_draw: Fix 1 instance, nonzero divisor
...
Instead of doing a complicated hack with the POT divisor, just zero the
stride of the linear attribute buffer like we do on the CPU.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
14da452598
pan/indirect_draw: Use unsigned comparisons
...
Instead of signed -- get the types right.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
5ea73dbed9
pan/indirect: Factor out is_power_of_two_or_zero
...
The function is complicated enough as it is -- hide the bit twiddling
behind a helper function.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
c25a40d535
panfrost: Default indirect attributes to 1D type
...
Avoids some complexity in the indirect draw happy path.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
0566fa2db4
panfrost: Use util_last_bit for images
...
Probbaly more correct for hols in image_mask.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
655983d328
panfrost: Add missing 'Reverse issue order flag'
...
Should fix an issue I'm seeing. Spoiler alert, it does not.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig
317dd5b327
panfrost: Remove AFBC format fixups
...
It's too complicated and probably for no actual benefit. The main reason
we have BGR formats is for display, but that's export and doesn't get
hit by this path. Internal BGRA textures are possible with a Mesa
extension but sufficiently rare that I regret suggesting this as a
possible optimization. My apologies, and thanks for the fish.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123 >
2021-06-10 18:06:10 +00:00