Commit Graph

114859 Commits

Author SHA1 Message Date
Dylan Baker c1a290bdd5 meson: Bump required version to 0.52.0
This matches what other graphics space projects require now, and allows
us to simplify a number of cases, as well as make use of new features in
meson.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2737
Acked-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
2020-06-01 18:59:18 +00:00
Alyssa Rosenzweig 30a393f458 pan/mdg: Enable out-of-order execution after texture ops
We don't make great use of it (due to the scheduler not being aware
yet), but we can pack for it regardless and maybe pick up some win.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5286>
2020-06-01 18:38:49 +00:00
Alyssa Rosenzweig 7c0e82d4ab pan/mdg: Add quirk for missing out-of-order support
Added in T760, like the other good parts of Midgard.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5286>
2020-06-01 18:38:49 +00:00
Alyssa Rosenzweig 31de10c434 pan/mdg: Disassemble out-of-order bits
Optimization for texture instructions, allowing ALU and LD/ST within a
single thread while a texture read is still in flight.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5286>
2020-06-01 18:38:49 +00:00
Alyssa Rosenzweig ca6759c3f9 panfrost: Remove unused nir_lower_framebuffer pass
Superseded.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284>
2020-06-01 18:10:59 +00:00
Alyssa Rosenzweig 7de4b98193 panfrost: Don't flush explicitly when mipmapping
The reorder work already takes cares of this nicely.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284>
2020-06-01 18:10:59 +00:00
Alyssa Rosenzweig 975238dc2a panfrost: Use VTX tag for vertex texturing
Fixes BARRIER faults.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284>
2020-06-01 18:10:59 +00:00
Alyssa Rosenzweig 89a9cc7645 panfrost: Permit AFBC of RGB8
Ugly but hey.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284>
2020-06-01 18:10:59 +00:00
Alyssa Rosenzweig 3a8e5eb1b1 panfrost: Fix PRESENT flag mix-up
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284>
2020-06-01 18:10:59 +00:00
Alyssa Rosenzweig 7c793a4867 pan/mdg: Fuse f2f16 into load_interpolated_input
To become a ld_vary intrinsic.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5283>
2020-06-01 12:37:03 -04:00
Alyssa Rosenzweig 5f8dd413bc pan/mdg: Handle 16-bit ld_vary
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5283>
2020-06-01 12:36:46 -04:00
Alyssa Rosenzweig e42950fe96 panfrost: Use internal_format throughout
Fixes R32F_S8 texturing.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:24 +00:00
Alyssa Rosenzweig e7765a8c7f panfrost: Add separate_stencil BO to batch
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:24 +00:00
Alyssa Rosenzweig 6aa7f6792d panfrost: Check for large tilebuffer requirements
Fixes the rest of dEQP-GLES3.functional.fragment_out.array.uint.*, this
situation occurs with MRT and large pixels.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:24 +00:00
Alyssa Rosenzweig c46b11438d panfrost: Let Gallium pack colours
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 8dc8b66403 panfrost: Account for differing types in blend lower
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 0c9fe82ee9 panfrost: Conditionally allow fp16 blending
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 19b4e586f6 panfrost: Switch to pan_lower_framebuffer
It now supports what we need.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 4c286cc0a2 panfrost: Un/pack sRGB via NIR
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 5d14757c03 panfrost: Un/pack R11G11B10
NIR has a helper for it already; we can reuse.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig e24e248b84 panfrost: Un/pack RGB10_A2_UINT
It's different. Because forget me.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 91cc678551 panfrost: Un/pack RGB10_A2_UNORM
It's a funny one.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 7de0e5500b panfrost: Un/pack RGB565 and RGB5A1
Basically the same as RGBA4

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig ff590702da panfrost: Un/pack UNORM 4
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig eab8701e7c panfrost: Flesh out dispatch
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig e937dd521b panfrost: Un/pack 8-bit UNORM
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig f01aabb829 panfrost: Un/pack pure 8-bit
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 9a6483bb47 panfrost: Un/pack pure 16-bit
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig c31bcca48e panfrost: Un/pack pure 32-bit
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig e5fcc193f7 panfrost: Stub out lowering boilerplate
Structure ourselves as a NIR pass replacing loads/stores with
unpacked/packed versions as necessary. Not actually functional yet.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig dbd72a8f94 panfrost: Determine classes for stores
Fewer special cases here, thankfully.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 18a767df35 panfrost: Determine load classes for formats
Via quirks.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig e53d27de61 panfrost: Add quirks for blend shader types
Every hardware has its own set of what it can and can't do... let's
document it all as quirks so the lowering code is GPU-agnostic.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 60d647f9de panfrost: Determine unpacked type for formats
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 5c82f8a097 panfrost: Add theory for new framebuffer lowering
We take a somewhat different strategy that should be more flexible.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 5a175e4a1b pan/mdg: Implement raw colourbuf loads on T720
Uses a similar path to the fp16 cbuf loads on T760. It should make sense
given the symmetry with T860.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 4f82aad7a2 pan/mdg: Drop the u8 from the colorbuf op names
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 49840a8a58 pan/mdg: Print 8-bit constants
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 0ff0291896 pan/mdg: Handle bitsize for packs
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig e9c780b1d0 pan/mdg: Treat packs "specially"
We maybe would prefer synthetic ops? We'll find out in due time..

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig c495c6c295 pan/mdg: Add pack_unorm_4x8 via 8-bit
More efficient than the 32-bit version in NIR.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Alyssa Rosenzweig 551d990a7c pan/mdg: Handle un/pack opcodes as moves
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
2020-06-01 15:46:23 +00:00
Chris Wilson 605b0e8acf iris: Fixup copy'n'paste mistake in Makefile.sources
In changing iris_seqno.[ch] to iris_fine_fence.[ch] and moving the
lines earlier, the newline escape was forgotten.

Fixes: 034329128b ("iris: Rename iris_seqno to iris_fine_fence")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5264>
2020-05-31 22:01:48 +00:00
Satyeshwar Singh aaec065f03 intel/dev: Don't consider all TGL SKUs as GT1 only
We should be passing _gt instead of 1 to GEN12_FEATURES or else all TGL
SKUs will be considered as gt1 only.

Fixes: 54996ad492 ("intel/dev: Split .num_subslices out of GEN12_FEATURES macro")
Signed-off-by: Satyeshwar Singh <satyeshwar.singh@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5261>
2020-05-30 17:24:58 -07:00
Vinson Lee d2f8105b60 r300g: Remove extra printf format specifiers.
Fix warning reported by Coverity Scan.
Missing argument to printf format specifier (PRINTF_ARGS)
missing_argument: No argument for format specifier %s.

Fixes: 04c1536bf7 ("r300g: rasterizer debug logging")
Fixes: 85efb2fff0 ("r300g: try to use color varyings for texcoords if max texcoord limit is exceeded")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5274>
2020-05-30 14:28:01 -07:00
Ilia Mirkin 6e1c47b98d nouveau: allow invalidating coherent/persistent buffer backings
This is needed to support the core's usage of coherent buffers for
glVertex-style input. The reason why this was disallowed is that any
mappings will be invalidated. Let the state tracker worry about that,
and just reallocate when we're told.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5276>
2020-05-30 17:59:24 +00:00
Jason Ekstrand c48f42e178 intel/fs: Emit HALT for discard on Gen4-5
Using HALT to immediately jump to the end of the shader is required to
implement GL_EXT_gpu_shader4 and OpenGL 3.0.  However, vanilla OpenGL
1.2 doesn't forbid it and it likely makes something somewhere faster.
We should be consistent and implement the same discard behavior on all
hardware if we can.

The rules for HALT on Gen4-5 are a bit different from Gen6+.  On the
older hardware, there is no stack for HALT; instead it's up to software
to save and restore mask registers.  However, there's no real saving
needed since we only use HALT to jump to the end of the program where
we're about about to do our FB writes.  All we need to do is reset AMask
to DMask, the value it was initialized to at the start of the thread.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5244>
2020-05-30 06:21:15 +00:00
Jason Ekstrand 94aa7997e4 intel/fs: Fix unused texture coordinate zeroing on Gen4-5
We were inserting the right number of MOVs but, thanks to the way we
advanced msg_end earlier in the function, were often writing the zeros
past the end of where we actually read in the register file.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5243>
2020-05-30 01:08:50 -05:00
Jason Ekstrand a7c8811fe4 intel/vec4: Stomp the return type of RESINFO to UINT32
We already do this in the FS back-end; we just weren't doing it in vec4
so RESINFO messages weren't returning the right data.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5243>
2020-05-30 01:08:50 -05:00
Timothy Arceri e843303d6f radv: fix regression with builtin cache
If the ~/.cache dir already exists continue on without failing.

Fixes: cd61f5234d ("radv: Handle failing to create .cache dir.")

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5249>
2020-05-30 04:01:28 +00:00