Commit Graph

124318 Commits

Author SHA1 Message Date
Caio Marcelo de Oliveira Filho 9b8347c988 anv: Use new helper functions to pick SIMD variant for CS
Also combine the existing individual anv helpers into a single one for
all CS related parameters.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5142>
2020-05-27 18:16:31 -07:00
Caio Marcelo de Oliveira Filho 594374dd8d iris: Use new helper functions to pick SIMD variant for CS
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5142>
2020-05-27 18:16:31 -07:00
Caio Marcelo de Oliveira Filho c9f4bda6ce iris: Set CS KernelStatePointer at dispatch
There's an update for INTERFACE_DESCRIPTOR_DATA at dispatch, so we can
just move the KSP assignment there.  This flexibility will later allow
variable group size to pick the right SIMD variant.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5142>
2020-05-27 18:16:31 -07:00
Caio Marcelo de Oliveira Filho ee0fc0f6dc i965: Use new helper functions to pick SIMD variant for CS
Also expand the existing i965 helper to return the other CS related
paramters.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5142>
2020-05-27 18:16:31 -07:00
Caio Marcelo de Oliveira Filho cb26d9c311 intel/fs: Add helper to get prog_offset and simd_size
This indirection will be used by the variable group size case in a
later change.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5142>
2020-05-27 18:16:31 -07:00
Caio Marcelo de Oliveira Filho 5b5e77caa7 intel/fs: Support INTEL_DEBUG=no8,no32 in compute shaders
The "no32" flag will have precedence over "do32", like is done for FS.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5142>
2020-05-27 18:16:31 -07:00
Caio Marcelo de Oliveira Filho 10d0f39beb intel/fs: Remove min_dispatch_width spilling decision from RA
Move the decision one level up, let brw_compile_*() functions use the
spilling information to decide whether or not a certain width
compilation can spill (passed via run_*() functions).

The min_dispatch_width was used to compare with the dispatch_width and
decide whether "a previous shader is already available, so don't
accept spill".

This is replaced by:

- Not calling run_*() functions if it is know beforehand a smaller width
  already spilled -- since the larger width will spill and fail;

- Explicitly passing whether or not a shader is allowed to spill.  For
  the cases where the smaller width is available and haven't spilled,
  the larger width will be compiled but is only useful if it won't
  spill.

Moving the decision to this level will be useful later for variable
group size, which is a case where we want all the widths to be allowed
to spill.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5142>
2020-05-27 18:16:31 -07:00
Eric Engestrom 9526e14b5c docs: update calendar, add news item, and link releases notes for 20.1.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5234>
2020-05-27 23:34:32 +00:00
Eric Engestrom e94a811a46 docs: Add release notes for 20.1.0
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5234>
2020-05-27 23:34:32 +00:00
Mike Blumenkrantz dff1bac634 zink: always use logical eq ops in ntv with 1bit inputs
integer and float compare ops cannot take boolean types, so the bit size
of the inputs should be checked here so that we can swap to the logical
equality functions if we're being passed a bool value

resolves tons of validator errors in glsl piglit tests

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5231>
2020-05-27 23:20:22 +00:00
Vinson Lee df2c68ee4f pan/bi: Initialize struct fma_op_info member extended.
Fix warning reported by Coverity Scan.

Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value info. Field info.extended is
uninitialized.

Fixes: 8c79c710d4 ("pan/bi: Identify extended FMA opcodes")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5224>
2020-05-27 15:41:21 -07:00
Erico Nunes b3023055e0 lima/ppir: use a ready list in node_to_instr
After the recent optimizations in ppir lowering that increase options
for combining, node_to_instr now may have multiple options of nodes to
insert and needs to decide which is better.
For example, if an instruction uses both a varying and a texture, there
are two nodes nodes that can be inserted to the load varying slot in the
same instruction (ld_var and ld_coords). It is much more advantageous to
pipeline the load texture coords since that enables the higher precision
path for texture coordinates. However, with the current recursive
expansion, this cannot be influenced.

This simple ready list implementation in node_to_instr allows it to
choose the next node to expand based on a priority score, rather than
relying on the random order coming from the recursive expansion.

Other than preferring nodes with pipeline output (which covers ld_coords
vs ld_var), nodes using later slots in the pipeline are now expanded
first, allowing node_to_instr to make all of the earlier (pipelineable)
nodes available in the ready list so the best one can be chosen when
picking nodes for the earlier slots.

Fixes: 632a921bd0 lima/ppir: optimize tex loads with single successor

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5092>
2020-05-27 21:15:33 +00:00
Alyssa Rosenzweig 9ae8b4af75 pan/bi: Suppress inf/nan for now
This is a (hopefully temporary) hack. The blob does it for ES2 at any
rate.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:58:00 -04:00
Alyssa Rosenzweig 6f589f4e04 pan/bi: Add CSEL.16 packing tests
Passing but let's increase coverage.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:45 -04:00
Alyssa Rosenzweig 87ca1c1eea pan/bi: Pack compact vertex texturing
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:45 -04:00
Alyssa Rosenzweig 6650fa22c7 pan/bi: Add f16 TEXC.vtx op
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:44 -04:00
Alyssa Rosenzweig 731dfc6066 pan/bi: Allow vertex txl with lod=0 as compact
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:44 -04:00
Alyssa Rosenzweig fd0324a1ce pan/bi: Document compute_lod bit for compact tex
At least I assume this works this way.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:44 -04:00
Alyssa Rosenzweig d31bc0e21c pan/bi: Also add compact vertex texturing
This implies lod=0.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:44 -04:00
Alyssa Rosenzweig f514bdd106 pan/bi: Add TEX.vtx opcode for vertex texturing
Always has an LOD.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:44 -04:00
Alyssa Rosenzweig 2fd3ad91c7 pan/decode: Decode Bifrost shader flags
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:44 -04:00
Alyssa Rosenzweig ee6a5a5f05 panfrost: Set MALI_BIFROST_EARLY_Z as necessary
Fixes blending.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:44 -04:00
Alyssa Rosenzweig 3f78f25ce9 panfrost: Identify MALI_BIFROST_EARLY_Z flag
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:44 -04:00
Alyssa Rosenzweig 1c2d0418c1 panfrost: Add defines for bifrost unk1 flags
Instead of open-coding.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:44 -04:00
Alyssa Rosenzweig 55e3305a5b panfrost: Document Midgard Inf/NaN suppress bit
We should probably not be setting this..

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:44 -04:00
Alyssa Rosenzweig 0e88dff374 panfrost: Ensure nonlinear strides are 16-aligned
To match how they are encoded.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: bde19c0e7b ("panfrost: Fix tiled texture "stride"s on Bifrost")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:43 -04:00
Alyssa Rosenzweig d45936c01c panfrost: Identify Bifrost texture format swizzle
We don't force w=1 for Bifrost textures. We already compose this into
the swizzle as necessary, so we can just ignore this field I think. But
let's identify it so we don't forget what it is.

The blob uses it to force w=1 for <= 3-channel formats (0x10), as well
as a flag to swap r/b for BGRA (0x4). There are probably other flags
here but it doesn't.. really matter to us.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:43 -04:00
Alyssa Rosenzweig e3692fd53e panfrost: Set unk2 to accomodate blending
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:43 -04:00
Alyssa Rosenzweig 3d6cc14513 panfrost: Share MRT blend flag calculation with Bifrost
As far as I know the field is the same.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:43 -04:00
Alyssa Rosenzweig f5cf54fc1d panfrost: Force Z/S tiling on Bifrost
Like we do on SFBD since we don't know the format bits yet.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:43 -04:00
Alyssa Rosenzweig f512489b2e panfrost: Tweak Bifrost colour buffer magic
For tiled or linear.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:43 -04:00
Alyssa Rosenzweig 76e871d3ff panfrost: Tweak zsbuf magic numbers for Bifrost
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:43 -04:00
Alyssa Rosenzweig aeb5801892 panfrost: Adjust null_rt for Bifrost
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:43 -04:00
Alyssa Rosenzweig 83cd3f0b4e panfrost: Fix Bifrost blending with depth-only FBO
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
2020-05-27 16:49:41 -04:00
James Zhu a91306677c ac/gpu_info: Correct Acturus cu bitmap
The cu bitmap in amd gpu info structure is
4x4 size array, and it's usually suitable for Vega
ASICs which has 4*2 SE/SH layout.
But for Arcturus, SE/SH layout is changed to 8*1.
To mostly reduce the impact, we make it compatible
with current bitmap array as below:
	SE4,SH0 --> cu_bitmap[0][1]
	SE5,SH0 --> cu_bitmap[1][1]
	SE6,SH0 --> cu_bitmap[2][1]
	SE7,SH0 --> cu_bitmap[3][1]

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5212>
2020-05-27 10:49:02 -04:00
Danylo Piliaiev 296c04d78c intel/fs: Work around dual-source blending hangs in combination with SIMD16
It was found that dual-source blending hangs with SIMD16 dispatch in some
specific but unknown situation. Which in the wild happen when rgba
anti-aliasing is enabled for fonts.

Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2183
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5037>
2020-05-27 14:35:13 +03:00
Erik Faye-Lund dd2bd68fa6 zink: use general-layout when blitting to/from same resource
This avoids a validator warning when for instance generating mipmaps.

Fixes: d2bb63c8d4 ("zink: Use optimal layout instead of general. Reduces valid layer warnings. Fixes RADV image noise.")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5199>
2020-05-27 09:01:17 +00:00
Pierre-Eric Pelloux-Prayer d9eaac02e5 radeonsi/drirc: enable zerovram option for 7 Days to Die
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2686
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5168>
2020-05-27 09:28:46 +02:00
Jonathan Marek ddfd2e626a turnip: support VkImageDrmFormatModifierExplicitCreateInfoEXT
This will be used to import images which have different layout from what
turnip uses by default. For example non-UBWC (linear) images from the video
decoder on some hardware have a 512 pitch alignment.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4596>
2020-05-27 04:02:58 +00:00
Jonathan Marek da409fb7b8 freedreno/layout: add explicit offset/pitch argument to fdl6_layout
fdl6_layout will return false when the explicit pitch is not valid.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4596>
2020-05-27 04:02:58 +00:00
Timothy Arceri f1acf492de glsl: fix slow linking of uniforms in the nir linker
Currently the nir linker resizes the amount of storage needed to hold
uniform information on the fly while linking. As shaders can contain
thousands of uniforms this can be very slow. For example some Godot
shaders can take 30 seconds to compile on some machines.

In this change we count the amount of storage needed before we start
processing the uniforms. This is what the GLSL IR linker does also.

Fixes: 95f555a93a ("st/glsl_to_nir: make use of nir linker for linking uniforms")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2996

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5137>
2020-05-27 00:59:20 +00:00
Timothy Arceri f6214750eb glsl: stop cascading errors if process_parameters() fails
Generally we do not completely stop compilation as soon as we see an error,
instead we continue on to attemp to find any futher errors.

This means we shouldn't be checking state->error to see if any error has
happened during the compilation process, doing so was causing
process_parameters() to fail on completely valid functions if there was
any error found in the shader previously. This then caused the valid
functions not to be found because the paramlist was considered empty,
resulting in the compiler spewing out misleading error messages.

Here we simply add the IR error value to the param list when we have
an issue with processing a parameter, this leads to much better error
messaging.

Fixes: 53e4159eaa ("glsl: stop processing function parameters if error happened")

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5205>
2020-05-27 00:31:05 +00:00
Vinson Lee 755c040060 freedreno: Add missing va_end.
Fix warning reported by Coverity Scan.

Missing varargs init or cleanup (VARARGS)
missing_va_end: va_end was not called for ap.

Fixes: a0ca1462f3 ("freedreno: add logging infrastructure")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5221>
2020-05-27 00:12:38 +00:00
Jason Ekstrand e91108691d nir: Fix sources for image atomic fadd
Somehow we ended up with an extra scalar source up-front.  It doesn't
look like any drivers use this opcode yet so no real harm has been done
by it being wrong.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5218>
2020-05-26 23:24:45 +00:00
Alyssa Rosenzweig 247f2fb32a pan/decode: Dump unknown2
Looks to be 0.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5219>
2020-05-26 22:58:21 +00:00
Alyssa Rosenzweig 6a19d49b2e pan/decode: Dump missing field on Bifrost
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5219>
2020-05-26 22:58:21 +00:00
Alyssa Rosenzweig c2c8b1ac57 pan/decode: Fix tiler warning
../src/panfrost/pandecode/decode.c:1176:60: warning: taking address of
packed member of ‘struct mali_framebuffer’ may result in an unaligned
pointer value [-Waddress-of-packed-member]
 1176 |
      pandecode_midgard_tiler_descriptor(&fb->tiler, fb->width1 + 1,
fb->height1 + 1, is_fragment, true);

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5219>
2020-05-26 22:58:21 +00:00
Alyssa Rosenzweig 4bc7d521b1 pan/decode: Fix unused variable warning
Check unused for now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5219>
2020-05-26 22:58:21 +00:00
Alyssa Rosenzweig a621235720 nouveau: Use SATURATE
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
2020-05-26 22:31:31 +00:00
Alyssa Rosenzweig 9e53562980 etnaviv: Use SATURATE
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
2020-05-26 22:31:31 +00:00