Rhys Perry [Wed, 5 Aug 2020 12:29:58 +0000 (13:29 +0100)]
aco: don't consider the first partial spill if it's the wrong type
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: 20.2 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6212>
Rhys Perry [Tue, 4 Aug 2020 16:08:43 +0000 (17:08 +0100)]
aco: consider branch definitions in spiller
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: 20.2 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6212>
Samuel Pitoiset [Wed, 26 Aug 2020 08:07:45 +0000 (10:07 +0200)]
radv: print a warning when RADV_TRAP_HANDLER is used
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/6468>
Marek Vasut [Tue, 21 Jul 2020 14:21:14 +0000 (16:21 +0200)]
etnaviv: Add lock around pending_ctx
The content of rsc->pending_ctx could be changed from multiple contexts
and thus from multiple threads. The per-context lock is not sufficient
to protect this list. Add per-resource lock to protect this list.
Fixes: e5cc66dfad0 ("etnaviv: Rework locking")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6454>
Marek Vasut [Tue, 21 Jul 2020 14:21:34 +0000 (16:21 +0200)]
etnaviv: Remove etna_resource_get_status()
This function is not used, remove it.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6454>
Lukas F. Hartmann [Sat, 13 Jun 2020 18:55:44 +0000 (20:55 +0200)]
etnaviv: Fix disabling early-z rejection on GC7000L (HALTI5)
The VIVS_PE_DEPTH_CONFIG_DISABLE_ZS in PE_DEPTH_CONFIG caused depth
write hangs on HALTI5.
This is because the 0x11000000 bits in RA have to be toggled on
when setting this bit to zero. This combination will disable
early-z rejection on GC7000L, which was previously done through
a different bit.
Tested only on GC7000L so far.
Signed-off-by: Lukas F. Hartmann <lukas@mntre.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5456>
Samuel Pitoiset [Tue, 25 Aug 2020 06:43:56 +0000 (08:43 +0200)]
radv: fix setting EXCP_EN for different shader stages
While TRAP_PRESENT is always at the same place, EXCP_EN can be
different between shader stages. This sets it properly.
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/6452>
Alejandro Piñeiro [Mon, 24 Aug 2020 08:33:46 +0000 (10:33 +0200)]
v3d: set instance id to 0 at start of tile
PTB assumes that base instance to be 0 at start of tile, but hw would
not do that, we need to set it. It is worth to note that the opcode
name is somewhat confusing as what it really sets is the base
instance. We could rename the opcode, but then the name would be
different to the original Broadcom name, so confusing in any case.
This fixes several dEQP-GLES3 and dEQP-GLES31 tests that passes
individually, but started to fail depending on other tests running
before using base instance different to zero.
This is the backport of a Vulkan patch that fixed some Vulkan CTS
tests that start to fails after some other tests used an instance id.
CC: 20.2 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6447>
Alejandro Piñeiro [Wed, 19 Aug 2020 23:02:53 +0000 (01:02 +0200)]
v3d/packet: fix typo on Set InstanceID/PrimitiveID packet
Fixes: 276d22c52 ("v3d: Add some more new packets for V3D 4.x.")
CC: 20.2 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6447>
Eric Anholt [Tue, 25 Aug 2020 21:55:22 +0000 (14:55 -0700)]
freedreno/a5xx: Don't set the VARYING flag for fragcoord-only programs.
As with a6xx (commits
beb02a78,
5785bcc8), the blob doesn't set this flag
for a5xx when fragcoords are used but not proper varyings. See for
example dEQP-GLES2.functional.shaders.builtin_variable.fragcoord_xyz.
The hope was that this would clear up separate_shader fails/flakes like it
helped with a6xx's flakes, but that didn't happen.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6464>
Nanley Chery [Sat, 25 Jul 2020 01:20:52 +0000 (18:20 -0700)]
gallium/dri2: Report correct YUYV and UYVY plane count
Return the actual number of planes in these formats (one) instead of the
number of planes used for lowering (two).
Fixes: d5c857837aa ("gallium/dri2: Fix creation of multi-planar modifier images")
Acked-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6449>
Eric Anholt [Tue, 25 Aug 2020 17:28:50 +0000 (10:28 -0700)]
ci: Mark the rest of compswap as flaky on freedreno.
We got another flake, this time on
dEQP-GLES31.functional.compute.shared_var.atomic.compswap.highp_uint,
which blocked !4162 from merging. Mark the rest flaky so we don't have to
keep firefighting one test at a time.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6459>
Jason Ekstrand [Sat, 22 Aug 2020 00:02:02 +0000 (19:02 -0500)]
nir: Report progress properly in nir_lower_bool_to_*
All three passes have the same bug where, in the mov/vec case they
unconditionally return true even if they don't change anything. Throw
in a bit size check so they return false properly.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6435>
Rob Clark [Tue, 25 Aug 2020 20:02:34 +0000 (13:02 -0700)]
freedreno/a6xx: fix hang with large render target
It seems we do have some limits. Similar to older gens, # of tiles per
pipe cannot be more than 32. But I could not trigger any hangs with 16
or more tiles per pipe in either X or Y direction, so that limit does
not seem to apply.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6461>
Rob Clark [Tue, 25 Aug 2020 19:23:38 +0000 (12:23 -0700)]
freedreno: add env var to override tiles-per-pipe
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6461>
Rob Clark [Tue, 25 Aug 2020 17:03:31 +0000 (10:03 -0700)]
freedreno: add env var to override GMEM size
Sometimes it is useful to force a smaller size while debugging.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6461>
Rob Clark [Tue, 25 Aug 2020 16:50:59 +0000 (09:50 -0700)]
freedreno/gmemtool: add tile_alignw/h and a650
Fixes: f6f8a190920 ("freedreno/a6xx: split up gmem/tile alignment requirements")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6461>
Marek Olšák [Tue, 25 Aug 2020 17:54:38 +0000 (13:54 -0400)]
radeonsi: fix tess levels coming as scalar arrays from SPIR-V
This fixes: KHR-GL45.gl_spirv.spirv_modules_positive_test
Fixes: 75ce078a0af "radeonsi: enable NIR by default and document GL 4.6 support"
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6460>
Indrajit Kumar Das [Tue, 11 Aug 2020 02:01:50 +0000 (07:31 +0530)]
mesa: add NV_copy_depth_to_color support for nir
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6289>
Mark Menzynski [Tue, 28 Jan 2020 12:36:27 +0000 (13:36 +0100)]
nvc0: Add shader disk caching
Adds shader disk caching for nvc0 to reduce the need to every time compile
shaders. Shaders are saved into disk_shader_cache from nvc0_screen structure.
It serializes the input nv50_ir_prog_info to compute the hash key and
also to do a byte compare between the original nv50_ir_prog_info and the one
saved in the cache. If keys match and also the byte compare returns they
are equal, shaders are same, and the compiled nv50_ir_prog_info_out from the
cache can be used instead of compiling input info.
Seems to be significantly improving loading times, these are the results
from running bunch of shaders:
cache off
real 2m58.574s
user 21m34.018s
sys 0m8.055s
cache on, first run
real 3m32.617s
user 24m52.701s
sys 0m20.400s
cache on, second run
real 0m23.745s
user 2m43.566s
sys 0m4.532s
Signed-off-by: Mark Menzynski <mmenzyns@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4264>
Mark Menzynski [Tue, 28 Jan 2020 12:11:31 +0000 (13:11 +0100)]
nv50/ir: Add nv50_ir_prog_info serialize
Adds a function for serializing a nv50_ir_prog_info structure, which is
needed for shader caching.
v2 (Karol): strip nir when serializing
Signed-off-by: Mark Menzynski <mmenzyns@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4264>
Mark Menzynski [Tue, 28 Jan 2020 12:10:35 +0000 (13:10 +0100)]
nv50/ir: Add prog_info_out print
Adds a function for printing nv50_ir_prog_info_out structure
in JSON-like format, which could be used in debugging.
Signed-off-by: Mark Menzynski <mmenzyns@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4264>
Mark Menzynski [Mon, 17 Feb 2020 17:02:45 +0000 (18:02 +0100)]
nv50/ir: Add nv50_ir_prog_info_out serialize and deserialize
Adds functions for serializing and deserializing
nv50_ir_prog_info_out structure, which are needed for shader caching.
Signed-off-by: Mark Menzynski <mmenzyns@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4264>
Mark Menzynski [Mon, 20 Jul 2020 14:03:36 +0000 (16:03 +0200)]
nv50/ir: Use a bit field in info_out structure
This will decrease structure size.
Signed-off-by: Mark Menzynski <mmenzyns@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4264>
Karol Herbst [Thu, 4 Jul 2019 14:02:09 +0000 (16:02 +0200)]
nv50/ir: add nv50_ir_prog_info_out
Split out the output relevant fields from the nv50_ir_prog_info struct
in order to have a cleaner separation between the input and output of
the compilation.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4264>
Karol Herbst [Thu, 4 Jul 2019 16:36:27 +0000 (18:36 +0200)]
nv50/ir: remove symbol table support for compute shaders
The initial plan was to use this for OpenCL kernels, but back then the
plan was to convert from LLVM to TGSI. As it turns out, we didn't went
that way.
Right now for OpenCL we don't reqiure supporting multiple entry points
inside the same binary and if we want to support it later, we can add
this back.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4264>
Bas Nieuwenhuizen [Tue, 25 Aug 2020 11:41:20 +0000 (13:41 +0200)]
radv: Update CTS version.
CC: 20.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6444>
Bas Nieuwenhuizen [Mon, 24 Aug 2020 19:33:35 +0000 (21:33 +0200)]
radv: Remove conformance warnings with ACO.
Nobody complained about our conformance submissions.
CC: 20.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6444>
Kenneth Graunke [Tue, 25 Aug 2020 00:00:33 +0000 (17:00 -0700)]
nir: Move new edgeflag assert into the io_lowered case
We only need to assert this in the `io_lowered` case, which actually
uses num_outputs. This assert also doesn't appear to hold on iris,
where num_outputs is showing up as 0 (because it's likely not yet set).
Fixes assertion failures in edgeflag related tests on iris, which
doesn't use the io_lowered path currently.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3456
Fixes: 484a60d5474 ("nir: generate lowered IO in nir_lower_passthrough_edgeflags")
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6450>
Kenneth Graunke [Mon, 24 Aug 2020 22:12:36 +0000 (15:12 -0700)]
nir: Copy semantics to nir_intrinsic_load_fs_input_interp_deltas
When using nir_lower_interpolation, we need to propagate the IO
semantics from the load_interpolated_input to the new
load_fs_input_interp_deltas intrinsics. nir_lower_io assumes
they will be filled out.
This fixes assertions in most tests on iris since commit
01ab308edc78cda777bc66f2e8110fbd8c21aa18, where nir_lower_io
started reading this field.
Fixes: 01ab308edc7 ("nir: update IO semantics in nir_io_add_const_offset_to_base")
Fixes: 502abfce7f5 ("nir: save IO semantics in lowered IO intrinsics")
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6450>
Alyssa Rosenzweig [Sat, 22 Aug 2020 00:01:38 +0000 (20:01 -0400)]
panfrost: Drop mali_shader_meta
Now completely replaced by XML versions.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 23:59:22 +0000 (19:59 -0400)]
pan/decode: Use unpacks for state descriptor
This is a win in terms of line of decoder code, but it's a regression in
terms of verbosity. That will be fixed when we teach the decode
autogeneration about defaults and non-canonical fields.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 23:27:40 +0000 (19:27 -0400)]
panfrost: Use pack for fragment shaders
The heart of the series! Build up all the structures separately and
combine with an OPAQUE pack. Groups state naturally and eliminates the
memcpy. And a nice cleanup too.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 22:06:24 +0000 (18:06 -0400)]
panfrost: Use opaque pack for vertex shaders
Not much difference but eliminates a reference to shader_meta (and
avoids a memcpy but who cares).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 22:11:57 +0000 (18:11 -0400)]
panfrost: Add optional opaque packs to GenXML
These special OPAQUE packs use packed structs in the struct template,
instead of struct templates. The use case is packing nested structs
out-of-band, to fit into the CSO model.
A more conventional GenXML solution would be an overlapping uint, but
this breaks our assumptions about struct packing which are otherwise
correct, so this seemed less intrusive than risk disrupting the main
pack routines.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 20:27:17 +0000 (16:27 -0400)]
panfrost: Use pack for Bifrost test state
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 20:22:10 +0000 (16:22 -0400)]
panfrost: Use pack for blit shaders
This is quite a bit cleaner, I think, and validates the XML in
preparation for moving over the main driver.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 20:21:40 +0000 (16:21 -0400)]
panfrost: Inherit default values from structs
Nesting can be useful sometimes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 19:54:10 +0000 (15:54 -0400)]
panfrost: XMLify the rest of shader_meta
This contains a bit of everything, so just XML for this commit. The rest
of the series will be slowly moving over to this representation.
The one noteworthy addition is the rename of "No MSAA" to
"Single-sampled lines". This came about due to a buggy branch that
forgot to set this bit. Ths worked, with the caveat of the following
tests failing with a single-sampled framebuffer:
dEQP-GLES2.functional.rasterization.interpolation.basic.line_loop_wide
dEQP-GLES2.functional.rasterization.interpolation.basic.line_strip_wide
dEQP-GLES2.functional.rasterization.interpolation.basic.lines_wide
dEQP-GLES2.functional.rasterization.interpolation.projected.line_loop_wide
dEQP-GLES2.functional.rasterization.interpolation.projected.line_strip_wide
dEQP-GLES2.functional.rasterization.interpolation.projected.lines_wide
dEQP-GLES2.functional.rasterization.primitives.line_loop
dEQP-GLES2.functional.rasterization.primitives.line_loop_wide
dEQP-GLES2.functional.rasterization.primitives.line_strip
dEQP-GLES2.functional.rasterization.primitives.line_strip_wide
dEQP-GLES2.functional.rasterization.primitives.lines
dEQP-GLES2.functional.rasterization.primitives.lines_wide
That is, this bit controls the behaviour of line rasterization with
multisampling. This is required to implement the divergent behaviours
described in the OpenGL ES 3.2 specification sections 13.6.1 ("Basic
Line Segment Rasterization") and 13.6.4 ("Line Multisample
Rasterization"), where setting this bit corresponds to the former
(single-sampled) behaviour.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 18:35:35 +0000 (14:35 -0400)]
panfrost: Use preuploaded shader descriptors
For non-fragment shaders, we can just use the preuploaded BO as-is and
do no packing/copying at draw-time. Fragment shaders are still a bit of
an edge case, in having rasterizer/zsa/blend state in the same
descriptor, but now we can specialize that path further for
fragment-only.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 18:16:18 +0000 (14:16 -0400)]
panfrost: Upload shader descriptors at CSO create
Now that we've fixed all the implicit state dependencies, these don't
change after the variant is created.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 17:42:55 +0000 (13:42 -0400)]
panfrost: Allocate a state uploader
We'd like to uploader some descriptors at CSO time.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Mon, 24 Aug 2020 20:51:12 +0000 (16:51 -0400)]
panfrost: Ensure shader-db state is zero-initialized
Otherwise the next commit will invoke undefined behaviour.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 17:22:11 +0000 (13:22 -0400)]
panfrost: Simplify shaderless packing
Let's keep all the shader descriptor stuff together.
Note that the packing here can be constant folded entirely in any
reasonable compiler.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 17:14:09 +0000 (13:14 -0400)]
panfrost: Prepack fragment properties/preload
This isn't as clean as vertex shaders, since some of this state is only
known at draw-time (e.g. some reasons we might disable early-Z). But we
can still pack as much as we can ahead-of-time and then OR together
what's left at draw-time.
Thank you to Kristian for this one crazy trick (blob developers hate
it! er...)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 16:34:24 +0000 (12:34 -0400)]
panfrost: Pack vertex properties when compiling
They only depend on shader properties so we can do all this work at CSO
create time, reducing draw-time overhead.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 14:42:59 +0000 (10:42 -0400)]
panfrost: Derive UBO count from shader_info
Rather than checking against the bound constant buffers. Like
with num_textures, this eliminates a dependency of the shader descriptor
on the context, which matters especially for vertex/compute shaders.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 14:34:06 +0000 (10:34 -0400)]
panfrost: XMLify beginning of shader descriptor
We have just enough abstracted now to pack this ahead-of-time, during
the CSO create, instead of at draw-time. But it's only a start.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 14:03:15 +0000 (10:03 -0400)]
panfrost: Derive texture/sampler_count from shader
This avoids a dependency of the shader descriptor on the texture/sampler
state, which simplifies state management. It also fixes pandecode
warnings where textures/samplers are specified but not referenced.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 13:36:14 +0000 (09:36 -0400)]
panfrost: Quiet pandecode error
The smallest job descriptor is smaller than 256, and with the
tighter packing, pandecode can sometimes error nowadays.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 13:22:34 +0000 (09:22 -0400)]
panfrost: Support SHADERLESS mode everywhere
Now that the missing bits on SFBD are identified, and we have a
reasonable way to pack the properties for Bifrost, we can probably do
this everywhere to generalize the optimization and drop the quirk.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 13:12:54 +0000 (09:12 -0400)]
panfrost: Identify additional SFBD flags
These are analogues to the flags we have in the blend structure on
T760+, which enables us to fix shaderless and sRGB operation on T720.
Closes #2771
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: a64599a303e ("panfrost: Pass the sampler view format when creating a tex descriptor")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 00:42:32 +0000 (20:42 -0400)]
panfrost: XMLify Bifrost preload
There's a lot of code here since the meaning of this field changes
depending on shader state. The good news is that our careful handling
allows preload registers to be decoded now, which pandecode could not
previously do. Likewise, the cmdstream code to emit this is now much
more obvious.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Thu, 20 Aug 2020 23:31:00 +0000 (19:31 -0400)]
panfrost: Group SFBD code tighter
Allows us to drop the redundant check by reordering, and will match the
conventions we'll use once the whole structure is XMLified.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Thu, 20 Aug 2020 20:46:04 +0000 (16:46 -0400)]
panfrost: Drop redundant NULL check
ctx->blend is already dereferenced by this point anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Thu, 20 Aug 2020 20:41:41 +0000 (16:41 -0400)]
panfrost: XMLify bifrost1
It's so poorly understood there's not much to do in this commit, sadly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Thu, 20 Aug 2020 20:25:14 +0000 (16:25 -0400)]
panfrost: Remove midgard1 bitfield
It is now entirely XML, including for decoding. Woo!
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Thu, 20 Aug 2020 19:57:59 +0000 (15:57 -0400)]
panfrost: Simplify bind_blend_state
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Thu, 20 Aug 2020 19:52:32 +0000 (15:52 -0400)]
panfrost: Fold work_count packing for blend shaders
It's annoying this is needed at all, but that's life for you.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Thu, 20 Aug 2020 12:11:04 +0000 (08:11 -0400)]
panfrost: Use pack for shaderless
We'll need a more aggressive refactor for this soon, I think.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Thu, 20 Aug 2020 12:06:39 +0000 (08:06 -0400)]
panfrost: Use packs for fragment properties
A bit more complicated, since there are dependencies on other state (for
early-z and discard handling). We separate this cleanly to help defer
packing later.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Wed, 19 Aug 2020 20:40:22 +0000 (16:40 -0400)]
panfrost: Pack compute Midgard properties
Now that we have XML for it.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Wed, 19 Aug 2020 20:32:26 +0000 (16:32 -0400)]
panfrost: XMLify Midgard properties
In a long journey to a full XML representation of mali_shader_meta,
let's start with the fourth word, containing some shader properties.
This is a translation from panfrost-job.h, with the exception of
widening the uniform buffer count field [1]
The other noteworthy change is combining the unknown 0x20 flag with the
WRITES_Z flag to form a 2-bit depth source. This papers over the fact
that the blob zeroes this field for non-fragment shaders. Given the
proximity, this is a reasonable guess and avoids an ugly "is_fragment"
bit.
[1] Justified by the increased limit advertised by the Vulkan blob
(maxDescriptorSetUniformBuffers on
https://vulkan.gpuinfo.org/displayreport.php?id=5602#limits). Not
actually supported in Panfrost right now.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Wed, 19 Aug 2020 19:53:23 +0000 (15:53 -0400)]
panfrost: Group SFBD state together
By proximity with the other fields.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Wed, 19 Aug 2020 19:50:25 +0000 (15:50 -0400)]
panfrost: Clean up blend shader errata handling
The cases of SFBD blend shaders (which work normally) and MFBD blend
shaders (which need a bizarre errata workaround) are distinct. Let's
seperate them to make each a bit clearer.
Since this field is repurposed on Bifrost, this should fix bugs there
too (although blend shaders on Bifrost are currently todo).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Wed, 19 Aug 2020 14:34:05 +0000 (10:34 -0400)]
panfrost: Rename shader emit functions
Now they handle everything in one go, so there's no init to speak of.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Wed, 19 Aug 2020 14:25:32 +0000 (10:25 -0400)]
panfrost: Specialize compute vs frag shader init
In exchange for a bit of code duplication, we can streamline both
routines. A huge amount of the descriptor is unused for non-fragment
shaders, and even some of the parts that are used appear to have varying
meanings. Given we want to emit the descriptors atomically, this seems
like a reasonable tradeoff.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Wed, 19 Aug 2020 14:13:59 +0000 (10:13 -0400)]
panfrost: Bake the initial tag into the shader pointer
No need to do this at draw-time.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Wed, 19 Aug 2020 13:52:02 +0000 (09:52 -0400)]
panfrost: Clamp shader->uniform_count
Rather than passing the clamp out-of-band to be done at draw-time, just
handle it together in pan_assemble.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Wed, 19 Aug 2020 13:48:40 +0000 (09:48 -0400)]
panfrost: Size UBO#0 accurately
We explicitly calculated its size as (sysvals + uniforms). We don't need
to check the shader metadata for that.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Wed, 19 Aug 2020 13:27:42 +0000 (09:27 -0400)]
panfrost: Combine frag_shader_meta_init functions
In order to pack a given structure atomically, we need to group state
together. Since this all affects shader_meta, we'll move it closer
together in the code. This unfortunately creates a "monster" function,
but it's still less code and better organized overall.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Tue, 18 Aug 2020 22:15:45 +0000 (18:15 -0400)]
panfrost: XMLify blend equation
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Tue, 18 Aug 2020 21:51:22 +0000 (17:51 -0400)]
panfrost: Honour load_dest/opaque flags
Let's split them out and work out the metadata at CSO time.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Tue, 18 Aug 2020 21:50:39 +0000 (17:50 -0400)]
panfrost: Simplify make_fixed_blend_mode prototype
blend_rt is a bitfield so in practice it will be quite small, let's save
the indirection.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Tue, 18 Aug 2020 21:06:01 +0000 (17:06 -0400)]
panfrost: XMLify blend flags
Shared between Midgard/Bifrost. We get printing this way!
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Tue, 18 Aug 2020 20:50:38 +0000 (16:50 -0400)]
panfrost: Separate shader/blend descriptor emits
They are different logic data structures, so let's not introduce a false
dependency.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Tue, 18 Aug 2020 20:43:38 +0000 (16:43 -0400)]
panfrost: Hoist blend finalize calls
To prepare for a split.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Sat, 22 Aug 2020 00:22:33 +0000 (20:22 -0400)]
panfrost: Decode nested structs correctly
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 75cc5b8c292 ("panfrost: Adopt gen_pack_header.py via v3d")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Alyssa Rosenzweig [Fri, 21 Aug 2020 13:31:43 +0000 (09:31 -0400)]
pan/decode: Drop legacy 32-bit job support
We already dropped support for this a long time ago, this is a vestigial
artefact that we missed.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
Eric Engestrom [Tue, 21 Jan 2020 23:52:47 +0000 (23:52 +0000)]
scons: bump c++ standard to 14 to match meson
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1845
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3500>
Samuel Pitoiset [Tue, 25 Aug 2020 09:45:10 +0000 (11:45 +0200)]
radv: allocate the TMA BO into 32-bit addr space
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/6453>
Samuel Pitoiset [Tue, 25 Aug 2020 09:42:32 +0000 (11:42 +0200)]
radv: align the TMA BO size to 256
The hardware requires 256 byte-aligned address.
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/6453>
Rohan Garg [Tue, 10 Mar 2020 17:52:28 +0000 (18:52 +0100)]
gitlab-ci: Test the traces from bgfx
bgfx is a corss-platform graphics API which ships with
a bunch of examples. Let's capture renderdoc traces of
these examples and test them.
Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4162>
Marcin Ślusarz [Mon, 24 Aug 2020 19:13:50 +0000 (21:13 +0200)]
mesa: fix formatting of messages printed using _mesa_log
... on BOTH _WIN32 and !_WIN32
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6443>
Lionel Landwerlin [Fri, 21 Aug 2020 20:13:06 +0000 (23:13 +0300)]
anv: fix transform feedback surface size
Non multiple 4 sizes are causing issue in particular < 4.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3450
Fixes: 36ee2fd61c8f ("anv: Implement the basic form of VK_EXT_transform_feedback")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6430>
Woody Chow [Wed, 19 Aug 2020 05:19:12 +0000 (14:19 +0900)]
st/mesa: Fix EGLImageTargetTexture2D for GL_TEXTURE_2D
Before this change, internalFormat was defaulted to GL_RGBA (
unsized internal format). Therefore, subsequent glTexSubImage2D
call with type != GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT_4_4_4_4 or
GL_UNSIGNED_SHORT_5_5_5_1 would give GL_INVALID_OPERATION.
This fixes
android.graphics.cts.BitmapColorSpaceTest#test16bitHardware
android.graphics.cts.ImageDecoderTest#testDecodeBitmap*
android.graphics.cts.BitmapTest#testNdkFormatsHardware
in CtsGraphicsTestCases
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6382>
Vinson Lee [Thu, 20 Aug 2020 01:56:19 +0000 (18:56 -0700)]
meson: Fix lmsensors warning message.
Fixes: 138c003d2273 ("meson: deprecated 'true' and 'false' in combo options for 'enabled' and 'disabled'")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6397>
Eric Anholt [Thu, 20 Aug 2020 23:43:16 +0000 (16:43 -0700)]
freedreno: Drop UNIFORM_BUFFER_OFFSET_ALIGNMENT to 32
This is the value exposed by the a3xx-a4xx drivers according to an
official Adreno OpenGL ES Developer guide I found, and also a report I saw
for a5xx while googling. Fixes renderdoc replay of a manhattan31 trace
captured on a Pixel 3a.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6416>
Daniel Schürmann [Thu, 18 Jun 2020 14:14:20 +0000 (15:14 +0100)]
nir,amd: remove trinary_minmax opcodes
These consist of the variations nir_op_{i|u|f}{min|max|med}3 which are either
lowered in the backend (LLVM) anyway or can be recombined by the backend (ACO).
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6421>
Rob Clark [Fri, 21 Aug 2020 22:58:37 +0000 (15:58 -0700)]
freedreno: handle case of shadowing current render target
If you have a sequence where there is a single buffer associated with
the current render target, and then you end up shadowing it on the 3d
pipe (u_blitter), because of how we swap the new shadow and rsc before
the back-blit, you could end up confusing things into thinking that
the blitters framebuffer state is the same as the current framebuffer
state.
Re-organizing the sequence to swap after the blit is complicated when
also having to deal with CPU memcpy blit path, and the batch/rsc
accounting. So instead just detect this case and flush if we need to.
Fixes:
dEQP-GLES31.functional.stencil_texturing.render.depth24_stencil8_clear
dEQP-GLES31.functional.stencil_texturing.render.depth24_stencil8_draw
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6434>
Rob Clark [Fri, 21 Aug 2020 19:50:34 +0000 (12:50 -0700)]
freedreno: add debug helper to dump buffers
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6434>
Rob Clark [Fri, 21 Aug 2020 14:52:33 +0000 (07:52 -0700)]
freedreno/a6xx: refactor debug logging
Break it out into a helper fxn, and cleanup the copy/pasta. Also, add
something so we can tell when src and/or dst are UBWC.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6434>
Marek Olšák [Sat, 22 Aug 2020 10:28:52 +0000 (06:28 -0400)]
gallium/tgsi: add helper tgsi_get_interp_mode
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6442>
Marek Olšák [Fri, 14 Aug 2020 05:32:00 +0000 (01:32 -0400)]
st/mesa: handle lowered IO in st_nir_assign_vs_in_locations
There are piglit failures without this.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6442>
Marek Olšák [Wed, 12 Aug 2020 15:09:43 +0000 (11:09 -0400)]
st/mesa: don't generate NIR for ARB_vp/fp if NIR is not preferred
Fixes: 5d0630e5043fc2 "st/mesa: call prog_to_nir sooner for ARB_fp"
Fixes: a3de63fbb3d63e "st/mesa: don't generate VS TGSI if NIR is enabled"
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6442>
Marek Olšák [Fri, 14 Aug 2020 05:30:49 +0000 (01:30 -0400)]
st/mesa: don't pass NIR to draw module if IO is lowered
The draw module can't handle it.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6442>
Marek Olšák [Thu, 13 Aug 2020 14:27:57 +0000 (10:27 -0400)]
nir: generate lowered IO in nir_lower_passthrough_edgeflags
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6442>
Marek Olšák [Thu, 13 Aug 2020 19:14:19 +0000 (15:14 -0400)]
nir: add interpolation qualifiers for color sysvals into shader_info
needed by radeonsi
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6442>
Marek Olšák [Fri, 14 Aug 2020 23:13:52 +0000 (19:13 -0400)]
nir: add shader_info::io_lowered
This will drive decisions in many NIR passes and st/mesa.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6442>
Marek Olšák [Fri, 14 Aug 2020 05:54:19 +0000 (01:54 -0400)]
nir: properly identify texcoords for lowered IO in nir_lower_drawpixels
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6442>