Alyssa Rosenzweig
d7788252e6
panfrost: Emulate indirect draws on Midgard
...
I can't really justify spending time on this right now, even to myself.
So take the perf hit and get out checkbox.
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
bc48df001c
panfrost: Fix dirty state emission
...
If we have per-draw state (vertex ID stuff), there's an ordering
mismatch. Fixes
dEQP-GLES31.functional.draw_base_vertex.draw_elements_instanced_base_vertex.builtin_variable.vertex_id
on Midgard, and I'm not sure why it was passing on Bifrost before. Also
should fix (on both architectures) DRAWID issues.
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
8066131158
panfrost: Don't allocate WLS when not needed
...
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
0d4368b22a
panfrost: Don't force early-z with occlusion query
...
..even if there is no z/s enabled. Fixes
dEQP-GLES31.functional.fbo.no_attachments.* 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
e4592d5651
panfrost: Simplify Midgard blend disable
...
Probably a bit faster too.
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
2af0c02ffa
panfrost: Clarify how fs_sidefx works with oq
...
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
c88c5b1218
panfrost: Assert alignment of indirect records
...
Continuation records need alignment, this shows they already have it.
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
4b52b0841f
panfrost: Make instancing code more obvious
...
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
552fdc7ea4
panfrost: Fix src_offset data type
...
We treat it as signed but had it marked as unsigned. It can be negative
in obscure cases.
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
afc4ebdcc0
panfrost: Align NPOT divisor 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: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
d61162af50
panfrost: Zero r_dimension for buffer textures
...
Instead of reading wrong side of the union (undefined behaviour). Fixes
a GenXML assertion failure in
KHR-GLES31.core.texture_buffer.texture_buffer_texture_buffer_range
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
3525ad7c45
panfrost: Fix vertex image attribute overrun
...
Images take a continuation record, don't scribble zeroes over.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Fixes: dc85f65e05 ("panfrost: emit shader image attribute descriptors")
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
b9127ecbb1
panfrost: Use varying format from frag shader
...
Needed to fix up flat varyings to u32 due to TGSI brokenness. If we wack
TGSI, we can drop this.
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
619b1bc23b
panfrost: Be explicit in image modifier handling
...
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
5ed37ebfee
panfrost: Separate image attribute and buffer emit
...
Trying to disentangle attributes and attribute buffers, so here's
a leaf node for that change.
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
f14dbc02fb
panfrost: Don't duplicate attribute buffers
...
If the (vbi, divisor) tuple matches, we can save an attribute buffer
descriptor. We do the linking at CSO create time. This should be a bit
more cache friendly.
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
61b83fba27
panfrost: Disable AFBC on v7
...
Broken in several ways. Hide it until we can get this sorted, and have a
test plan to keep it sorted.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
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
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
Alyssa Rosenzweig
e111464bfc
pan/bi: Don't allocate past the end of the reg file
...
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
47e0cce820
pan/bi: Track words instead of bytes in RA
...
Reduces RA memory footprint by 4x, fixing an OOM in the following dEQP
test that otherwise would allocate 8GB of memory...
dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.36
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
dbc346d659
pan/bi: Simplify spill code
...
Now allow spilling all nodes. Fixes failed spilling in
dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.21
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
6dbaae77d9
pan/bi: Emit a dummy ATEST if needed
...
Match what the blob does, since Bifrost has so many random errata we'd
be fools not to.
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
b947ab8b10
pan/bi: Lower 64-bit ints again
...
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
95458c4033
pan/bi: Lower stores with component != 0
...
If the shader packs multiple varyings into the same location with
different location_frac, we'll need to lower to a single varying store
that collects all of the channels together. This is not trivial during
code gen, but it is trivial to do in NIR right before codegen by relying
on nir_lower_io_to_temporaries. Since we're guaranteed all varyings will
be written exactly once, in the exit block, we can scan the shader
linearly and collect stores together in a single pass.
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