Commit Graph

132663 Commits

Author SHA1 Message Date
Mauro Rossi 017edcd63d android: pan/bi: Generate bi_opcodes.{c,h}
Porting of commits 25c9946883 and f9084b6c3f 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: 25c9946883 ("pan/bi: Generate bi_opcodes.c")
Fixes: f9084b6c3f ("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>
2020-12-28 16:30:52 +01:00
Mauro Rossi c0bae8d67f android: pan/bi: Add explicit dependency on the ISA helpers
Porting of commit 4d76a3d4a1 to Android makefile

Fixes: 4d76a3d4a1 ("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>
2020-12-28 16:30:44 +01:00
Gert Wollny 2e7f35a8bc 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>
2020-12-28 12:48:11 +00:00
cheyang a7be48bdae 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>
2020-12-28 12:23:59 +00:00
cheyang 72390f063f 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>
2020-12-28 10:26:15 +00:00
Eric Anholt 746a0f502a 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>
2020-12-27 10:48:03 -08:00
Eric Anholt 358d5a270d 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>
2020-12-27 10:48:00 -08:00
Eric Anholt cb5ee80ee8 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>
2020-12-27 10:47:57 -08:00
Eric Anholt 829e9105a6 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>
2020-12-27 10:47:54 -08:00
Vinson Lee 7d8d99ea12 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>
2020-12-24 23:08:56 +00:00
Vinson Lee 512ca3464d 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>
2020-12-24 22:02:00 +00:00
Vinson Lee 28a9c9e573 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: 2ea15cd661 ("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>
2020-12-24 21:52:15 +00:00
Vinson Lee 671e1571d9 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>
2020-12-24 21:15:38 +00:00
Mike Blumenkrantz 2472f52e73 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>
2020-12-24 12:49:56 +00:00
Mike Blumenkrantz fc34f684d6 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>
2020-12-24 12:44:25 +00:00
Samuel Pitoiset 9c176a7e63 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 b24b3026cc.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8214>
2020-12-24 09:56:25 +01:00
Vinson Lee 7da33b68b0 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>
2020-12-24 02:15:24 +00:00
Mike Blumenkrantz 2f8237754b zink: fix debug utils init
this was moved to a different struct without being updated

Fixes: fe669ff4a0 ("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>
2020-12-24 01:49:00 +00:00
Eric Anholt 0ce7c4a7c9 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>
2020-12-24 00:18:19 +00:00
Eric Anholt 0a179bb6e2 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>
2020-12-24 00:18:19 +00:00
Eric Anholt 5875cfcc2f 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>
2020-12-24 00:18:19 +00:00
Eric Anholt 06a081c631 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>
2020-12-24 00:18:19 +00:00
Eric Anholt f0606cafe8 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>
2020-12-24 00:18:19 +00:00
Ruijing Dong 69487c754c 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>
2020-12-23 18:04:31 -05:00
Dave Airlie 6af87193c4 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>
2020-12-24 08:10:06 +10:00
Dave Airlie 7de0d93fcd 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>
2020-12-24 08:10:02 +10:00
Dave Airlie de10428770 llvmpipe: add support for grid base
This adds the grid base into the compute launch

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>
2020-12-24 08:09:57 +10:00
Dave Airlie c16239b4a6 gallium: add grid base to dispatch info
Vulkan device group support allows launching grids from
a grid base set of values. Add the interface for gallium

Reviewed-by: Marek Olšák <marek.olsak@amd.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>
2020-12-24 07:55:58 +10:00
Mike Blumenkrantz d0684c1914 zink: zero VkMemoryRequirements on init
ensure no part of this is uninitialized just to be safe

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8217>
2020-12-23 21:30:18 +00:00
Eric Anholt 16fb504402 ci/deqp: Move the load reporting to a quiet block.
No need for debug printing of how we computed it any more, brings the deqp
failures more into highlight in the job log.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8206>
2020-12-23 20:48:12 +00:00
Eric Anholt 302b4f7724 ci/deqp: Upgrade the runner, enable junit output.
I moved QPA-to-XML conversion to the runner, so Mesa CI (and developers!)
don't need to do quite so much in bash.  I also made it clean up caselist
.qpa files since nobody ever wants them and we deleted them anyway.  This
cleans up a ton of the job log output.

Additionally, I added a subcommend to turn the .csv into a junit output
that we can expose to gitlab.  Now, the pipeline's status page will report
the failed testcases, and the "detail" button will give you a link to the
.XML to view for the failure.  (We don't report all testcases because it's
too much load for the gitlab server).  Note that this will 404 for the
LAVA runners for now, as they don't retain artifacts in gitlab (the plan
is to eventually have them minio upload the artifacts).

This uprev also includes a deqp output parsing fix, resulting in us
catching a couple more failures in some drivers.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8206>
2020-12-23 20:48:12 +00:00
Eric Anholt 35e9143428 ci/deqp: Move .shader_cache artifacts exclusion to the yml.
Less noise in the job log when we want to be highlighting deqp-runner's
output.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8206>
2020-12-23 20:48:12 +00:00
Eric Anholt 872cfe2beb ci: Disable the now flaky Portals.trace on a630.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8206>
2020-12-23 20:48:12 +00:00
Eric Anholt 2f41afeac1 mesa/st: Fix use-after-free of the draw VS.
If the program with a draw variant gets deleted, it could leave a dangling
pointer in st's draw module that would get referenced next state update of
a draw fallback.

Fixes a valgrind complaint in piglit's rasterpos test, which is flaky on
softpipe (but not due to this).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8207>
2020-12-23 20:12:06 +00:00
Eric Anholt 5dd5fb1926 softpipe: count CS invocations for pipeline stats queries.
Part of fixing KHR-GL33.pipeline_statistics_query_tests_ARB.
  functional_compute_shader_invocations

(also requires a test bugfix:
https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/2694).

Fixes: e749c30ceb ("softpipe: add support for compute shaders. (v2)")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8065>
2020-12-23 19:55:49 +00:00
Alyssa Rosenzweig eb7e20b378 pan/bi: Add builder data structure
In preparation for builder routines.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:37 -05:00
Alyssa Rosenzweig e8c687b15b pan/bi: Add cursor data structures
To be used in conjunction with the builder.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:37 -05:00
Alyssa Rosenzweig dd11e5076e pan/bi: Add new bi_instr data structure
This models instructions closer to the hardware. We'll deduplicate by
the end of the series, but for now this will allow us to add routines
operating on bi_instr without regressing existing users of
bi_instruction.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:37 -05:00
Alyssa Rosenzweig e364e11020 pan/bi: Add bi_{abs, neg} helpers
Just conveniences.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:36 -05:00
Alyssa Rosenzweig 7e6be656d3 pan/bi: Add bi_imm_u{8, 16} helpers
Common compositions which make building for <32-bit types easier.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:36 -05:00
Alyssa Rosenzweig f4b1c12bab pan/bi: Add imm_f32 helper
Pattern comes up surprisingly often.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:36 -05:00
Alyssa Rosenzweig 372787020d pan/bi: Add bi_half and bi_byte selectors
Useful for extracting out part of an index, internally implemented via a
subword swizzle.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:36 -05:00
Alyssa Rosenzweig 06f52fe0b1 pan/bi: Add node_to_index helper
To invert index_to_node for RA.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:36 -05:00
Alyssa Rosenzweig b85f317017 pan/bi: Add a helper to convert to old-style nodes
RA, DCE, and liveness assume that SSA and non-SSA normal indices are
indexed from 1 in a shared address space, with a maximum given by
bi_max_temp. As a stop gap, let's translate bi_index to old style
node numbers so those passes can be updated cleanly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:36 -05:00
Alyssa Rosenzweig 2d9147dae4 pan/bi: Add helpers to generate bi_index from NIR
Corresponding to the existing pan_{...}_index helpers, except returning
a new-style index instead.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:36 -05:00
Alyssa Rosenzweig fc760e7d66 pan/bi: Add bi_temp{_reg} for new-style bi_index
Variant of bi_make_temp{_reg} returning a bi_index.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:36 -05:00
Alyssa Rosenzweig 903a818f33 pan/bi: Add helper to extract a word from an index
This pattern comes up surprisingly often due to the prevalance of
vectors.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:36 -05:00
Alyssa Rosenzweig 3a63b5d7cf pan/bi: Add nullity/equality helpers for bi_index
We can no longer use the builtin equals, since they're structs now, but
these helpers are almost as convenient.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:29:36 -05:00
Alyssa Rosenzweig 5dd756afed pan/bi: Add bi_index constructors
These add succinct helpers to generate well-formed references.

Note for semantic that bi_zero represents the immediate value #0, while
bi_null represents a value that does not exist ("undefined").

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:15:10 -05:00
Alyssa Rosenzweig 99152b6045 pan/bi: Add bi_index data structure
Rather than open-coding indices with manual bit packing flying around,
let's add a data structure corresponding to a reference to some data.
(Think nir_src, ibc_ref, etc). In particular this allows us to pack in
more metadata, like an offset, for properly supporting limited vectors
(for I/O) without bloating the IR with swizzle fields.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
2020-12-23 13:15:10 -05:00