platform/upstream/mesa.git
3 years agopan/bi: Implement bi_emit_ld_tile via the builder
Alyssa Rosenzweig [Tue, 8 Dec 2020 00:14:49 +0000 (19:14 -0500)]
pan/bi: Implement bi_emit_ld_tile via the builder

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Add bi_make_vec_to helper
Alyssa Rosenzweig [Wed, 9 Dec 2020 19:06:15 +0000 (14:06 -0500)]
pan/bi: Add bi_make_vec_to helper

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Add bi_is_intr_immediate helper
Alyssa Rosenzweig [Wed, 9 Dec 2020 13:58:57 +0000 (08:58 -0500)]
pan/bi: Add bi_is_intr_immediate helper

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Add builder initialization helper
Alyssa Rosenzweig [Wed, 16 Dec 2020 17:50:07 +0000 (12:50 -0500)]
pan/bi: Add builder initialization helper

When going out of NIR, it's useful to start inserting instructions at
the end of the current block.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Add new style read/writemask helpers
Alyssa Rosenzweig [Fri, 11 Dec 2020 15:52:11 +0000 (10:52 -0500)]
pan/bi: Add new style read/writemask helpers

In the medium term we'll want to overhaul these masks entirely since
they don't make much sense anymore, but as a stop gap, this will let us
reuse the existing liveness, RA, and DCE infrastructure.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Add bi_count_staging_registers helper
Alyssa Rosenzweig [Fri, 11 Dec 2020 15:30:06 +0000 (10:30 -0500)]
pan/bi: Add bi_count_staging_registers helper

This will shortly be used for liveness analysis on the new IR.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Generate instruction packer for new IR
Alyssa Rosenzweig [Fri, 4 Dec 2020 19:54:00 +0000 (14:54 -0500)]
pan/bi: Generate instruction packer for new IR

Based on existing packing infrastructure, though modifier handling is
greatly simplified by using canonical modifier encodings in the IR.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Generate builder routines
Alyssa Rosenzweig [Sat, 28 Nov 2020 00:01:00 +0000 (19:01 -0500)]
pan/bi: Generate builder routines

To simplify construction of Bifrost IR. Ideas from NIR's builder, as
well as IBC.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Generate instruction printer
Alyssa Rosenzweig [Fri, 27 Nov 2020 19:39:40 +0000 (14:39 -0500)]
pan/bi: Generate instruction printer

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Add bi_not alias of bi_neg
Alyssa Rosenzweig [Mon, 28 Dec 2020 14:26:07 +0000 (09:26 -0500)]
pan/bi: Add bi_not alias of bi_neg

For bitwise ops, we define .neg to mean .not to keep the IR manageable
("complement" more generally), but it's convenient to have specialized
names.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Rename bi_load
Alyssa Rosenzweig [Mon, 28 Dec 2020 13:47:48 +0000 (08:47 -0500)]
pan/bi: Rename bi_load

Need to free up the symbol so it doesn't clash with the builder.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Rename bi_pack_{fma, add} to free up symbols
Alyssa Rosenzweig [Fri, 4 Dec 2020 20:06:48 +0000 (15:06 -0500)]
pan/bi: Rename bi_pack_{fma, add} to free up symbols

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Ensure fneg of a constant isn't reached
Alyssa Rosenzweig [Tue, 22 Dec 2020 23:33:56 +0000 (18:33 -0500)]
pan/bi: Ensure fneg of a constant isn't reached

Fix the optimization loop like ir3 does.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agoci/panfrost: Skip test with 4096 byte shader
Alyssa Rosenzweig [Thu, 31 Dec 2020 14:20:17 +0000 (09:20 -0500)]
ci/panfrost: Skip test with 4096 byte shader

This has flake potential. There is clearly a hardware bug here but I
can't figure out what the correct solution is (padding out with nops
causes other tests to flake in turn).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agofeatures: mark off multidraw for zink
Mike Blumenkrantz [Mon, 28 Dec 2020 20:47:37 +0000 (15:47 -0500)]
features: mark off multidraw for zink

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8233>

3 years agozink: enable PIPE_CAP_MULTI_DRAW_INDIRECT(_PARAMS) caps
Mike Blumenkrantz [Thu, 20 Aug 2020 13:22:37 +0000 (09:22 -0400)]
zink: enable PIPE_CAP_MULTI_DRAW_INDIRECT(_PARAMS) caps

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8233>

3 years agozink: hook up IndirectCount draw commands
Mike Blumenkrantz [Thu, 20 Aug 2020 13:42:52 +0000 (09:42 -0400)]
zink: hook up IndirectCount draw commands

these take a draw count buffer

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8233>

3 years agozink: add KHR_draw_indirect_count detection
Mike Blumenkrantz [Mon, 28 Dec 2020 20:39:18 +0000 (15:39 -0500)]
zink: add KHR_draw_indirect_count detection

this is a vk 1.2 feature

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8233>

3 years agoradv: disable stippledBresenhamLines on GFX9
Samuel Pitoiset [Mon, 28 Dec 2020 07:44:03 +0000 (08:44 +0100)]
radv: disable stippledBresenhamLines on GFX9

Some CTS fail on Vega10 but work on Raven.

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/8242>

3 years agosoftpipe: Sanity check that the SSBO view offset is within the BO.
Eric Anholt [Wed, 30 Dec 2020 20:51:04 +0000 (12:51 -0800)]
softpipe: Sanity check that the SSBO view offset is within the BO.

If we're going to check that the size matches, we should consider the
buffer offset too.  I haven't tracked down any testcases doing this, but
it seems obviously correct.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8276>

3 years agogallium/tgsi_exec: Replace the SSBO RESQ-specific interface with lookup.
Eric Anholt [Wed, 30 Dec 2020 20:44:42 +0000 (12:44 -0800)]
gallium/tgsi_exec: Replace the SSBO RESQ-specific interface with lookup.

We've got the new lookup with size+ptr, just use that one for querying
buffer size.

This means we now return 0 instead of undefined for unbound buffers, but
it also means we return 0 for a buffer view with a size larger than that
of the underlying buffer.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8276>

3 years agogallium/tgsi_exec: Move the SSBO store path to tgsi_exec, too.
Eric Anholt [Wed, 30 Dec 2020 20:35:54 +0000 (12:35 -0800)]
gallium/tgsi_exec: Move the SSBO store path to tgsi_exec, too.

Now that we have lookups, we can just fold this in.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8276>

3 years agogallium/tgsi_exec: Use the new SSBO lookup interface for SSBO loads.
Eric Anholt [Wed, 30 Dec 2020 20:17:21 +0000 (12:17 -0800)]
gallium/tgsi_exec: Use the new SSBO lookup interface for SSBO loads.

We were ignoring the requested size of the load in the overflow handling
and would read past the end of buffers, rather than just returning 0 as
robustness would like us to do.

Fixes valgrind complaint on softpipe in:
EQP-GLES31.functional.shaders.builtin_functions.common.sign.float_mediump_compute

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8276>

3 years agogallium/tgsi_exec: Reuse the atomic helper for SSBO atomics.
Eric Anholt [Wed, 30 Dec 2020 19:59:15 +0000 (11:59 -0800)]
gallium/tgsi_exec: Reuse the atomic helper for SSBO atomics.

I needed to refactor SSBOs to deal with a buffer overflow, and it's easier
to just delete the SSBO atomic code from the interface.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8276>

3 years agogallium/tgsi_exec: Fix shared memory atomic ops.
Eric Anholt [Wed, 30 Dec 2020 19:21:49 +0000 (11:21 -0800)]
gallium/tgsi_exec: Fix shared memory atomic ops.

It was only executing the first channel, ignoring the rest.  I also
cleaned things up to not loop over rgba, since atomics are only ever to a
single 32-bit value per invocation.

This worked on softpipe previously because it only dispatches 1 CS
invocation per TGSI exec machine anyway, wasting the other 3 slots.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8276>

3 years agoci/softpipe: Re-enable GS tests that had been banned for being flaky.
Eric Anholt [Thu, 31 Dec 2020 00:09:13 +0000 (16:09 -0800)]
ci/softpipe: Re-enable GS tests that had been banned for being flaky.

Now that the flakes should be fixed, turn the coverage on.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8277>

3 years agogallium/draw: Fix intermittent failure to bind new geometry shaders.
Eric Anholt [Thu, 31 Dec 2020 00:09:13 +0000 (16:09 -0800)]
gallium/draw: Fix intermittent failure to bind new geometry shaders.

If you deleted your old GS and created a new one, then it would
occasionally skip binding the new GS because the token pointers were
equal.  Clear the current token pointer in the machine when we're deleting
its token.

Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8277>

3 years agodocs: update calendar and link releases notes for 20.3.2
Dylan Baker [Thu, 31 Dec 2020 04:19:51 +0000 (20:19 -0800)]
docs: update calendar and link releases notes for 20.3.2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8280>

3 years agodocs: Add sha256 sum for 20.3.2
Dylan Baker [Thu, 31 Dec 2020 04:11:04 +0000 (20:11 -0800)]
docs: Add sha256 sum for 20.3.2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8280>

3 years agodocs: add release notes for 20.3.2
Dylan Baker [Thu, 31 Dec 2020 03:57:40 +0000 (19:57 -0800)]
docs: add release notes for 20.3.2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8280>

3 years agozink: fix tess shader i/o variables
Mike Blumenkrantz [Thu, 24 Dec 2020 22:14:14 +0000 (17:14 -0500)]
zink: fix tess shader i/o variables

this was a mismerge during refactoring for review

Fixes: d09f9da4c4d ("zink: add ntv handling for tess shader i/o variables")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8232>

3 years agozink: require KHR_maintenance2 for tessellation and set bottom-left origin
Mike Blumenkrantz [Wed, 30 Dec 2020 21:14:54 +0000 (16:14 -0500)]
zink: require KHR_maintenance2 for tessellation and set bottom-left origin

this makes tessellation work as expected in apps but has no impact on unit tests

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
Tested-by: Witold Baryluk <witold.baryluk@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8274>

3 years agoswrast: Remove the classic swrast DRI driver
Adam Jackson [Wed, 9 Dec 2020 22:22:04 +0000 (17:22 -0500)]
swrast: Remove the classic swrast DRI driver

Following up from the classic swrast OSMesa removal in favor of
llvmpipe/softpipe, remove the classic swrast DRI driver.  It's unused by
any distribution -- debian was the last holdout until this week, which had
it enabled instead of softpipe on obscure platforms (non-LLVM and hurd).
Now that debian has switched, remove the driver so nobody can accidentally
enable it again.

Fixes: #325, #324, #322, #321, #319, #318, #317, #315, #313, #311, #310,
       #306, #305, #304, #302, #301, #300, #299, #298, #297, #293, #289

Reviewed-by: Eric Anholt <eric@anholt.net> (commit message rewritten)
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8069>

3 years agoiris: Support clears in more GPU-based copies
Nanley Chery [Mon, 28 Dec 2020 17:31:33 +0000 (09:31 -0800)]
iris: Support clears in more GPU-based copies

Commit 7779b1d71bf053f0c73a1b717e6d2ed91f948378, disabled clear support
when copying to/from color buffers. According to the performance CI, it
falls within a range of commits that introduced a performance regression
on Bioshock Infinite with Tigerlake. Icelake isn't noticeably affected.

By analyzing a trace of the game, I found a couple cases where that
commit added new partial resolves. Update get_copy_region_aux_settings
to avoid them:

- The trace uploads to R8_UNORM textures. On TGL, these enter the
  COMPRESSED_CLEAR state on the upload and are partially resolved before
  every subsequent upload. Thankfully, they keep their initial clear
  color of all zeroes. Since zeros can survive format reinterpretation,
  allow clear support for it.

- The trace copies between RGBA16_FLOAT textures. The ones with zero
  clear color are helped by the optimization above. The ones with
  non-zero clear color are used as source textures. Thankfully on ICL+,
  the clear color used for sampling is in pixel form and can thus be
  sampled from with format reinterpretation. Allow clear support for
  this case.

I haven't tested the actual performance impact of this change, but it
should be beneficial regardless.

Reported-by: Clayton Craft <clayton.a.craft@intel.com>
Reported-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8262>

3 years agoiris: Move STC case in get_copy_region_aux_settings
Nanley Chery [Mon, 28 Dec 2020 18:27:13 +0000 (10:27 -0800)]
iris: Move STC case in get_copy_region_aux_settings

Combine the STC_CCS case with the HiZ cases.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8262>

3 years agoci/panfrost: Disable the flaky gimark trace.
Eric Anholt [Tue, 29 Dec 2020 19:44:26 +0000 (11:44 -0800)]
ci/panfrost: Disable the flaky gimark trace.

Fixes: dcb8f625543e ("ci: add piglit jobs to LAVA and remove tracie ones")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8263>

3 years agoswr: Fix typos.
Vinson Lee [Thu, 24 Dec 2020 04:14:42 +0000 (20:14 -0800)]
swr: Fix typos.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8223>

3 years agoaco/ra: Avoid redundant RegisterFile copies in get_reg_impl
Tony Wasserka [Tue, 29 Dec 2020 16:29:41 +0000 (17:29 +0100)]
aco/ra: Avoid redundant RegisterFile copies in get_reg_impl

Now that this function does not block RegisterFile entries anymore,
the temporary copy is only needed upon reaching the collect_vars call.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8261>

3 years agozink: avoid replacing valid tcs with injected one
Mike Blumenkrantz [Wed, 30 Dec 2020 14:55:58 +0000 (09:55 -0500)]
zink: avoid replacing valid tcs with injected one

need to check both arrays here since we only want to use an injected shader
if we don't have a real one, not just if the real one isn't being updated

Fixes: 334759d8509 ("zink: implement passthrough tcs shader injection")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8271>

3 years agofreedreno/a6xx: support layered framebuffers in blitter_clear
Danylo Piliaiev [Fri, 4 Dec 2020 14:44:41 +0000 (16:44 +0200)]
freedreno/a6xx: support layered framebuffers in blitter_clear

Clear is done with one instanced draw call, where the layer
to clear is controlled by gl_Layer.
Same as how util_blitter_clear does this.

Fixes test:
gl-3.2-layered-rendering-clear-color-all-types 2d_multisample_array single_level

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7919>

3 years agofreedreno/a6xx: add support for gl_Layer in vertex shader
Danylo Piliaiev [Fri, 4 Dec 2020 14:39:04 +0000 (16:39 +0200)]
freedreno/a6xx: add support for gl_Layer in vertex shader

Passes amd_vertex_shader_layer-layered-2d-texture-render

Don't enable GL_AMD_vertex_shader_layer because we do not pass
amd_vertex_shader_layer-layered-depth-texture-render due to
the assert:

 emit_blit: Assertion `psurf->u.tex.first_layer == psurf->u.tex.last_layer'

However, in current state it is still useful for clearing
of arrayed framebuffers.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7919>

3 years agofreedreno/a6xx: fix array pitch for layer-first layouts
Danylo Piliaiev [Wed, 16 Dec 2020 16:08:04 +0000 (18:08 +0200)]
freedreno/a6xx: fix array pitch for layer-first layouts

Fixes:
 gl-3.2-layered-rendering-gl-layer-render
 gl-3.2-layered-rendering-gl-layer-render-clipped
 gl-3.2-layered-rendering-gl-layer-render-storage
 gl-3.2-layered-rendering-gl-layer-cube-map

Would fix:
 amd_vertex_shader_layer-layered-2d-texture-render
when GL_AMD_vertex_shader_layer is enabled.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3929
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7919>

3 years agodoc: virgl supports ARB_texture_filter_anisotropic already
Gert Wollny [Mon, 28 Dec 2020 16:55:58 +0000 (17:55 +0100)]
doc: virgl supports ARB_texture_filter_anisotropic already

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8257>

3 years agoradv: add a Python script to check if a VA was ever valid
Samuel Pitoiset [Fri, 11 Dec 2020 14:44:29 +0000 (15:44 +0100)]
radv: add a Python script to check if a VA was ever valid

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/7891>

3 years agoradv: dump VA ranges history when a GPU hang is detected
Samuel Pitoiset [Fri, 11 Dec 2020 14:43:51 +0000 (15:43 +0100)]
radv: dump VA ranges history when a GPU hang is detected

This is enabled only with RADV_DEBUG=hang. This adds a small

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3904
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/7891>

3 years agod3d12: Initialize local_resource member mapped in constructor.
Vinson Lee [Tue, 22 Dec 2020 01:52:04 +0000 (17:52 -0800)]
d3d12: Initialize local_resource member mapped in constructor.

Fix defect reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member mapped is not initialized in this
constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8193>

3 years agoglsl: default to compat shaders in compat profile
Timothy Arceri [Sat, 3 Oct 2020 03:24:30 +0000 (13:24 +1000)]
glsl: default to compat shaders in compat profile

If the shader does not specify "core" or "compatibility" in shaders
above 1.40 we were defaulting these shaders to core shaders when
in a compat profile. Instead default to compat shaders.

This brings us inline with the behaviour of the binary drivers and
fixes a crash on start-up for the game Foundation.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3594

Fixes: c7e3d31b0b5f ("glsl: fix compat shaders in GLSL 1.40")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6993>

3 years agointel/isl: move get_tile dims/masks to common isl header
Dave Airlie [Mon, 28 Dec 2020 22:23:58 +0000 (08:23 +1000)]
intel/isl: move get_tile dims/masks to common isl header

Both classic and iris have the same code for this, but none of it
is dependent on drivers, so just add inline helpers to isl.

Acked-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8253>

3 years agofreedreno: Enable GLSL 1.50, updating us to GL 3.2 contexts.
Eric Anholt [Mon, 28 Dec 2020 22:20:23 +0000 (14:20 -0800)]
freedreno: Enable GLSL 1.50, updating us to GL 3.2 contexts.

We have been advertising 3.1, which waffle has issues creating contexts
for, causing coverage (and performance!) issues in piglit.  We should
support all the necessary features already.

Some new failures are caught by the 3.2 CTS, but they look like they're
existing issues simply not covered by the minimal GL 3.0 CTS.

Fixes: #3037
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8255>

3 years agonir/lower_fragcolor: handle dual source blending
Danylo Piliaiev [Mon, 28 Dec 2020 12:12:11 +0000 (14:12 +0200)]
nir/lower_fragcolor: handle dual source blending

With dual source blending only 1 draw buffer could be used.

For zink fixes tests:
 arb_blend_func_extended-fbo-extended-blend-pattern_gles2

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8247>

3 years agoaco/ra: Fix register allocation for subdword operands
Tony Wasserka [Wed, 2 Dec 2020 17:35:55 +0000 (18:35 +0100)]
aco/ra: Fix register allocation for subdword operands

ACO attempts to store the output of an instruction in the same register
occupied by its operands where possible. Importantly this only works if
the operands are large enough to store the result register size. The code
failed to consider subdword operands when checking for this, causing
entire register slots to be freed up even though subdword parts were still
used.

In Mafia 3, this affected the following code:
v2b: %363:v[2][0:16],  v2b: %362:v[2][16:32] = p_split_vector %360:v[2]
v1:  %116:v[2] = v_cvt_f32_f16 %362:v[2][16:32]
v1:  %117:v[2] = v_cvt_f32_f16 %363:v[2][0:16]
where v[2] is allocated to %116 even though its original lower 16 bits are
still used in the instruction after.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3717
Fixes: 031edbc4a54d5685b05e244f8aa1e094ec246eb5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7461>

3 years agoaco/ra: Add some documentation
Tony Wasserka [Tue, 17 Nov 2020 18:15:48 +0000 (19:15 +0100)]
aco/ra: Add some documentation

This should make these somewhat tricky bits easier to follow.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7461>

3 years agoaco: Add tests for subdword register allocation
Tony Wasserka [Mon, 2 Nov 2020 17:16:56 +0000 (18:16 +0100)]
aco: Add tests for subdword register allocation

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7461>

3 years agoaco/tests: Fix deadlock for too large test lists
Tony Wasserka [Thu, 5 Nov 2020 15:21:49 +0000 (16:21 +0100)]
aco/tests: Fix deadlock for too large test lists

The write() to the communication pipe shared with check_output.py would block
for large test output streams since the pipe's consumer wouldn't be launched
until the write already completed.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7461>

3 years agoaco/tests: Allow specifiying the test subvariant in setup_cs
Tony Wasserka [Thu, 5 Nov 2020 11:43:14 +0000 (12:43 +0100)]
aco/tests: Allow specifiying the test subvariant in setup_cs

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7461>

3 years agoaco/tests: Fix GFX10_3 being printed as gfx11
Tony Wasserka [Thu, 5 Nov 2020 11:41:58 +0000 (12:41 +0100)]
aco/tests: Fix GFX10_3 being printed as gfx11

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7461>

3 years agoaco/ra: Add policy parameter to select implementation details for testing
Tony Wasserka [Thu, 5 Nov 2020 16:04:12 +0000 (17:04 +0100)]
aco/ra: Add policy parameter to select implementation details for testing

This new policy parameter allows disabling the optimistic path of get_reg
(i.e. get_reg_simple) to improve test coverage of the pessimistic path
provided by get_reg_impl.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7461>

3 years agost/pbo: fix pbo uploads without PIPE_CAP_TGSI_VS_LAYER_VIEWPORT and skip gs
Mike Blumenkrantz [Mon, 14 Dec 2020 16:48:39 +0000 (11:48 -0500)]
st/pbo: fix pbo uploads without PIPE_CAP_TGSI_VS_LAYER_VIEWPORT and skip gs

the previous commit handling this forced geometry shader usage for all cases,
but this is not ideal, so instead there are now fragment shader variants for
both depth==1 and depth!=1, corresponding to the existence of gl_Layer in the
shader

Fixes: 614c77772ac ("st/pbo: fix pbo uploads without PIPE_CAP_TGSI_VS_LAYER_VIEWPORT")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8089>

3 years agovirgl: fix BGRA emulation artifacts during window resize
Ryan Neph [Wed, 16 Dec 2020 01:18:09 +0000 (01:18 +0000)]
virgl: fix BGRA emulation artifacts during window resize

On some devices, window resizing results in flashes of blue- and
orange-tinted versions of the current frame until resizing is
finished.

This fix ensures that the emubgra tweak used for GLES virgl hosts
has its enabled state flag set properly during resize events.

v2: removed unrelated whitespace change

Fixes: 6f68cacf619 ("virgl: Always enable emulated BGRA and swizzling unless specifically told not to")
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8119>

3 years agosvga: Fix typos in comments.
Vinson Lee [Sun, 6 Dec 2020 06:01:35 +0000 (22:01 -0800)]
svga: Fix typos in comments.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7943>

3 years agomicrosoft/clc: Hook up printf
Jesse Natalie [Wed, 18 Nov 2020 20:22:27 +0000 (12:22 -0800)]
microsoft/clc: Hook up printf

Rewrites the original lowering pass to use the one shared with Clover,
instead only handling the new load_printf_buffer_address intrinsic.

Exports the new metadata to the runtime containing strings and arg sizes.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8254>

3 years agoclover/nir: hookup printf (v3)
Dave Airlie [Wed, 28 Oct 2020 01:46:49 +0000 (11:46 +1000)]
clover/nir: hookup printf (v3)

This connects printf up for NIR drivers, it lowers using the NIR
pass where it places the idx to the strings into the output buffer.

It also sets the global buffer header to the nir paths.

v2: remove dead function temps after lowering

v3: move to single string

Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8254>

3 years agonir: Add an algebraic optimization for float->double->float
Jesse Natalie [Mon, 22 Jun 2020 15:12:54 +0000 (08:12 -0700)]
nir: Add an algebraic optimization for float->double->float

As part of this series, it removes the need for float->double conversion,
just to be able to print a single float.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8254>

3 years agonir: Add a printf lowering pass (v5)
Jesse Natalie [Fri, 14 Aug 2020 00:21:18 +0000 (17:21 -0700)]
nir: Add a printf lowering pass (v5)

This pass creates a SSBO var for the printf buffer. It does an atomic increment
at the beginning of the buffer to determine where to write, then dumps
the args after that.

v2: [airlied]
Enhanced to use an index into a set of format info that is passed
back to the caller. The format info contains the number of args,
argument sizes and the format string.

v3: move format string lowering to vtn

v4: Jason reworked it.

v5: assume buffer has initial offset prebaked in and work from there.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8254>

3 years agonir/vtn: Implement printf opcode in terms of intrinsic (v9)
Jesse Natalie [Sun, 21 Jun 2020 21:36:00 +0000 (14:36 -0700)]
nir/vtn: Implement printf opcode in terms of intrinsic (v9)

[airlied: rebase fixup types]

v2: add support for storing strings in a sideband storage,
just store the index in print buffer.

v3: move the format strings into the nir shader as well

v4: simplify the write constant string + explicit sizes
move printf cap definition.

v5: just parse the format string to find string specifiers
using util code.
add vtn_fail_if if we can't get the correct type.

v6: use ralloc + avoid instr handler for srcs > 5

v7: use a packed struct 4 bytes align all of it

v8: simplify constant copy

v9: rework to use a single string and common string
extract code, (Jason)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8254>

3 years agonir: Add intrinsic and string ptrs
Jesse Natalie [Sun, 21 Jun 2020 21:35:29 +0000 (14:35 -0700)]
nir: Add intrinsic and string ptrs

This just adds the basic nir support for printf,
intrinsic, and support for storing the printf info.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8254>

3 years agoclover: add core clover printf support (v12)
Serge Martin [Thu, 29 Oct 2020 00:05:45 +0000 (10:05 +1000)]
clover: add core clover printf support (v12)

"The implementation is based on what LLVM AMD target expect.
The compiler provided an id link to argument desc and format used.
The runtime need to store them to be able to parse the buffer filled by
the device during the kernel execution, ie, an id value to find the
format and followed by the arguments values"

v2: airlied
Split out the core code to a separate patch, add support for the
different global buffer formats, and move the LLVM specific code
as much as possible to the backend.

v3: handle strings differences better
llvm backend stores strings to the printf buffer
nir backend stores them to a sideband storage in NIR and stores
an index in the buffer.

v4: move specifier parsing to util code.

v5: rename buffer fmt + make printf code work

v6: handle args/specifier number mismatch support

v7: move to single string + struct

v8: use "%s" to print strings to avoid bad specifier, fix str
calcs.

v9: move to the same global buffer format as llvm, just strings
are different now. This requires changes to nir lowering.
buffer format:
[0] contains offset into buffer at start contains 8
[1] contains length of buffer

v10: printf const clean,  add warning,  endian assert, print %%
at end, fix specifiers to vector

v11: minor cleanups, make sure the format string never contains
an n.

v12: validate format string

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8254>

3 years agoclover/module: add a printf support to module (v5)
Dave Airlie [Wed, 28 Oct 2020 21:15:02 +0000 (07:15 +1000)]
clover/module: add a printf support to module (v5)

This adds storage for printf formats encoded as number of
argument sizes + the printf format string, and storage
for sideband printf strings if the backend wants them.

It adds a flag that decides if the backend wants AMD (LLVM)
behaviour or NIR wrt the format of the global buffer and
how to decode strings.

Based on work by EdB in his printf support, but made useful
to be generic.

I'm not a huge fan of the buffer format flag, but this was
the easiest way to denote the llvm abi buffer format.

v3: rename buffer fmt

v4: use a single strings storage and one struct

v5: move printf_info into module, cleanup serialisation struct

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8254>

3 years agoutil: add printf specifier shared helper code.
Dave Airlie [Wed, 18 Nov 2020 06:20:50 +0000 (16:20 +1000)]
util: add printf specifier shared helper code.

clover needs to walk valid specifiers in C++, vtn needs
to find string specifiers in C, let's do both.

This writes the format walker in C++, and wraps it with C.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8254>

3 years agopanfrost: Fix discard behaviour on Bifrost
Icecream95 [Wed, 23 Dec 2020 10:30:24 +0000 (23:30 +1300)]
panfrost: Fix discard behaviour on Bifrost

Set zs_update_operation to FORCE_LATE, as we don't want to update
depth if the fragment is discarded.

Set pixel_kill_operation to WEAK_EARLY to match the blob.

Reviewed-and-tested-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8235>

3 years agozink: add support for VK_EXT_4444_formats
Hoe Hao Cheng [Sat, 26 Dec 2020 17:43:52 +0000 (01:43 +0800)]
zink: add support for VK_EXT_4444_formats

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8240>

3 years agozink: fix more instance detection stuff
Mike Blumenkrantz [Mon, 28 Dec 2020 20:26:09 +0000 (15:26 -0500)]
zink: fix more instance detection stuff

this was broken during the transition to generated code

Fixes: fe669ff4a02 ("zink: replace old code with generated zink_instance")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8250>

3 years agofreedreno/ir3: remap FRAG_RESULT_COLOR to _DATA* for dual-src blending
Danylo Piliaiev [Mon, 28 Dec 2020 13:53:08 +0000 (15:53 +0200)]
freedreno/ir3: remap FRAG_RESULT_COLOR to _DATA* for dual-src blending

gl_SecondaryFragColorEXT is mapped to FRAG_RESULT_COLOR and just
have a different io.dual_source_blend_index. We don't need to replicate
the color to other render targets in case of dual source blending, so
we could just remap it to FRAG_RESULT_DATA0 + index.

Fixes piglit test:
 arb_blend_func_extended-fbo-extended-blend-pattern_gles2

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8245>

3 years agoci/deqp: Fix inverted meaning of DEQP_NO_SAVE_RESULTS.
Eric Anholt [Fri, 18 Dec 2020 17:48:46 +0000 (09:48 -0800)]
ci/deqp: Fix inverted meaning of DEQP_NO_SAVE_RESULTS.

When set, we want to summary-limit 0, but the meaning was inverted.  Sigh,
coding in bash.

Fixes: bf29daa1b5a3 ("ci/deqp: Switch to a new dEQP runner written in Rust.")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8164>

3 years agoandroid: pan/bi: Generate bi_opcodes.{c,h}
Mauro Rossi [Sat, 26 Dec 2020 13:02:13 +0000 (14:02 +0100)]
android: pan/bi: Generate bi_opcodes.{c,h}

Porting of commits 25c9946883ce and f9084b6c3f13 to Android makefile

Fixes the following building error:

In file included from external/mesa/src/panfrost/bifrost/bifrost_compile.c:36:
external/mesa/src/panfrost/bifrost/compiler.h:31:10: fatal error: 'bi_opcodes.h' file not found
         ^~~~~~~~~~~~~~
1 error generated.

Fixes: 25c9946883ce ("pan/bi: Generate bi_opcodes.c")
Fixes: f9084b6c3f13 ("pan/bi: Generate bi_opcodes.h")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8239>

3 years agoandroid: pan/bi: Add explicit dependency on the ISA helpers
Mauro Rossi [Sat, 26 Dec 2020 12:58:06 +0000 (13:58 +0100)]
android: pan/bi: Add explicit dependency on the ISA helpers

Porting of commit 4d76a3d4a19b to Android makefile

Fixes: 4d76a3d4a19b ("pan/bi: Add explicit meson dependency on the ISA helpers")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8239>

3 years agor600/sfn: merge SpecialValue and InlineConstValue
Gert Wollny [Wed, 23 Dec 2020 14:25:23 +0000 (15:25 +0100)]
r600/sfn: merge SpecialValue and InlineConstValue

The latter is the only child class of the former and no other use for
SpecialValue is needed.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8210>

3 years agomesa: glProgramBinary add resource_hash
cheyang [Fri, 25 Dec 2020 08:20:43 +0000 (16:20 +0800)]
mesa: glProgramBinary add resource_hash

reduce search time(E.g glGetUniformLocation) when use glProgramBinary

Signed-off-by: cheyang <cheyang@bytedance.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8238>

3 years agovirgl: next_handle variable modify to atomic inc in virgl_object_assign_handle
cheyang [Sun, 13 Dec 2020 03:52:02 +0000 (11:52 +0800)]
virgl: next_handle variable modify to atomic inc in virgl_object_assign_handle

virgl_object_assign_handle will be called by multiple threads,
if you do not use atomic operations, there may be duplicate handle.

Signed-off-by: cheyang <cheyang@bytedance.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8078>

3 years agogallium/ntt: Fix check for "is there anything in the else block?"
Eric Anholt [Tue, 22 Dec 2020 20:18:28 +0000 (12:18 -0800)]
gallium/ntt: Fix check for "is there anything in the else block?"

The cf list will always be non-empty, with at least a block in it.
Noticed while checking codegen of a piglit test that was really slow on
softpipe.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8068>

3 years agoci/softpipe: Include a piglit run.
Eric Anholt [Fri, 11 Dec 2020 18:43:15 +0000 (10:43 -0800)]
ci/softpipe: Include a piglit run.

It's been regressed a couple of times recently, so let's try to make sure
it doesn't happen again.  The setup here is mostly like llvmpipe-quick-gl,
but using quick_gl+quick_shader together, and a few more spectacularly
long-running tests dropped.  I also excluded a bunch of unsupported
extensions, to minimize the size of the skip list checked into the tree
(it's still 200k, though).

The unfortunate exclusions in here are fp64 and int64 -- most of the
piglit tests for them don't run because softpipe is still GL3.3, and it's
an egregious number of skips to add to the checked in list.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8068>

3 years agoci/piglit: Include the updated piglit results list in the job results.
Eric Anholt [Fri, 11 Dec 2020 18:40:57 +0000 (10:40 -0800)]
ci/piglit: Include the updated piglit results list in the job results.

If you're standing up a new piglit CI, you're going to want it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8068>

3 years agosoftpipe: Enable GLSL 400 for compat contexts too.
Eric Anholt [Fri, 11 Dec 2020 23:47:11 +0000 (15:47 -0800)]
softpipe: Enable GLSL 400 for compat contexts too.

This bumps the compat profile supported from 3.1 to 3.3, matching our GL
core profile.  Motivated by getting the piglit skip list cut down.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8068>

3 years agoturnip: Remove unsigned nonnegative check.
Vinson Lee [Thu, 24 Dec 2020 21:59:36 +0000 (13:59 -0800)]
turnip: Remove unsigned nonnegative check.

index is of type uint32_t.

Fix defect reported by Coverity Scan.

Macro compares unsigned to 0 (NO_EFFECT)
unsigned_compare: This greater-than-or-equal-to-zero comparison of
an unsigned value is always true. index >= 0U.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8231>

3 years agod3d12: Initialize TransitionableResourceState m_SupportsSimultaneousAccess.
Vinson Lee [Tue, 22 Dec 2020 01:26:56 +0000 (17:26 -0800)]
d3d12: Initialize TransitionableResourceState m_SupportsSimultaneousAccess.

Fix defect reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member m_SupportsSimultaneousAccess is
not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8192>

3 years agod3d12: Fix memory leak if state is NULL.
Vinson Lee [Sun, 20 Dec 2020 23:44:20 +0000 (15:44 -0800)]
d3d12: Fix memory leak if state is NULL.

Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable ss going out of scope leaks the storage it points to.

Fixes: 2ea15cd661c ("d3d12: introduce d3d12 gallium driver")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8179>

3 years agonir/tests: Initialize nir_serialize_test member dup.
Vinson Lee [Fri, 18 Dec 2020 22:08:58 +0000 (14:08 -0800)]
nir/tests: Initialize nir_serialize_test member dup.

Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member dup is not initialized in
this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8168>

3 years agozink: handle 0 as valid pipeline hash value
Mike Blumenkrantz [Mon, 21 Dec 2020 14:24:20 +0000 (09:24 -0500)]
zink: handle 0 as valid pipeline hash value

xxhash can return 0 as a valid hash so it needs to be handled

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8201>

3 years agozink: handle null ubos
Mike Blumenkrantz [Thu, 15 Oct 2020 15:20:20 +0000 (11:20 -0400)]
zink: handle null ubos

for drivers that don't support robustness features (nullDescriptor)
we can just jam in the dummy buffer here and yolo

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8202>

3 years agoRevert "radv: use 32-bit predication for skipping FCE on GFX10.3+"
Samuel Pitoiset [Wed, 23 Dec 2020 17:03:13 +0000 (18:03 +0100)]
Revert "radv: use 32-bit predication for skipping FCE on GFX10.3+"

This is actually wrong because we still assume 64-bit in a bunch
of places.

This reverts commit b24b3026cc0541c59613463a124b16954b2a7cd8.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8214>

3 years agov3d: Fix typos.
Vinson Lee [Fri, 18 Dec 2020 22:52:00 +0000 (14:52 -0800)]
v3d: Fix typos.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8171>

3 years agozink: fix debug utils init
Mike Blumenkrantz [Thu, 24 Dec 2020 00:15:38 +0000 (19:15 -0500)]
zink: fix debug utils init

this was moved to a different struct without being updated

Fixes: fe669ff4a02 ("zink: replace old code with generated zink_instance")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8220>

3 years agogallivm: Use the proper enum for the texture target bitfield.
Eric Anholt [Wed, 16 Dec 2020 18:47:06 +0000 (10:47 -0800)]
gallivm: Use the proper enum for the texture target bitfield.

This gets you nice output in gdb when trying to figure out why your 2D
sample shader is hitting the cube paths.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8118>

3 years agost/mesa: Generate NIR for ATI_fragment_shader instead of TGSI.
Eric Anholt [Mon, 24 Aug 2020 20:07:35 +0000 (13:07 -0700)]
st/mesa: Generate NIR for ATI_fragment_shader instead of TGSI.

Compiling NIR is much less code, gives us optimization across drivers, and
is one less chunk of TGSI in the mesa frontend.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8118>

3 years agomesa/ati_fs: Clean up writemask handling.
Eric Anholt [Mon, 24 Aug 2020 20:50:45 +0000 (13:50 -0700)]
mesa/ati_fs: Clean up writemask handling.

Just put it into the op in core Mesa and explain what it's doing.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8118>

3 years agomesa/prog_to_nir: Factor out the texture-target-to-sampler-dim helper.
Eric Anholt [Fri, 11 Dec 2020 01:20:12 +0000 (17:20 -0800)]
mesa/prog_to_nir: Factor out the texture-target-to-sampler-dim helper.

I'll be using this switch statement and extending it for
ATI_fragment_shader.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8118>

3 years agomesa/st: Update FP state when textures change with an ATI_fs bound.
Eric Anholt [Wed, 16 Dec 2020 19:03:17 +0000 (11:03 -0800)]
mesa/st: Update FP state when textures change with an ATI_fs bound.

We may have to make a new ATI_fs variant when the texture target changes.
Fixes a regression on piglit ati_fragment_shader-render-textargets on
llvmpipe after the switch to NIR ATI_fragment_shader.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8118>

3 years agoradeon/vcn: fix hevc 10bit profile error
Ruijing Dong [Thu, 3 Dec 2020 20:34:56 +0000 (15:34 -0500)]
radeon/vcn: fix hevc 10bit profile error

hevc main10 profile error fix

CC: mesa-stable
Signed-off-by: Ruijing Dong <Ruijing.Dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8038>

3 years agolavapipe: add basic vulkan device group support.
Dave Airlie [Fri, 18 Dec 2020 02:29:59 +0000 (12:29 +1000)]
lavapipe: add basic vulkan device group support.

This just add the basic for vulkan device group support, base
dispatch, and dummy funcs

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviweed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8154>

3 years agollvmpipe: enable lower device id to zero
Dave Airlie [Fri, 18 Dec 2020 02:29:27 +0000 (12:29 +1000)]
llvmpipe: enable lower device id to zero

this is to support vulkan device group

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviweed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8154>