mesa.git
4 years agor600/sfn: Handle umul24 and umad24
Gert Wollny [Sun, 12 Apr 2020 15:00:28 +0000 (17:00 +0200)]
r600/sfn: Handle umul24 and umad24

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

4 years agor600/sfn: Add IR instruction to fetch the TESS parameters
Gert Wollny [Sun, 12 Apr 2020 14:59:47 +0000 (16:59 +0200)]
r600/sfn: Add IR instruction to fetch the TESS parameters

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

4 years agor600/sfn: Add TF write instruction
Gert Wollny [Sun, 12 Apr 2020 14:59:05 +0000 (16:59 +0200)]
r600/sfn: Add TF write instruction

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

4 years agor600/sfn: Add LDS instruction to assembly conversion
Gert Wollny [Sun, 12 Apr 2020 14:58:05 +0000 (16:58 +0200)]
r600/sfn: Add LDS instruction to assembly conversion

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

4 years agor600/sfn: Add LDS IO instructions to r600 IR
Gert Wollny [Sun, 12 Apr 2020 14:56:35 +0000 (16:56 +0200)]
r600/sfn: Add LDS IO instructions to r600 IR

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

4 years agor600/sfn: Don't emit inline constants in the r600 IR
Gert Wollny [Wed, 15 Apr 2020 14:34:43 +0000 (16:34 +0200)]
r600/sfn: Don't emit inline constants in the r600 IR

This can be handled when lowering to assembly, and it makes testing
for indirect buffer and sampler access easier.

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

4 years agor600/sfn: simplify UBO lowering pass
Gert Wollny [Wed, 15 Apr 2020 14:33:02 +0000 (16:33 +0200)]
r600/sfn: simplify UBO lowering pass

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

4 years agor600: Handle texcoord semantics in LDS index evaluation
Gert Wollny [Sun, 12 Apr 2020 14:42:07 +0000 (16:42 +0200)]
r600: Handle texcoord semantics in LDS index evaluation

With NIR the texcoord semantic is enabled, and hence we have to handle
index evaluation differently here.

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

4 years agoci: bare-metal: power down device after tests
Christian Gmeiner [Mon, 27 Apr 2020 07:53:07 +0000 (09:53 +0200)]
ci: bare-metal: power down device after tests

Helps to save electricity.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4754>

4 years agopanfrost: Fix GL_EXT_vertex_array_bgra
Icecream95 [Sun, 26 Apr 2020 07:19:23 +0000 (19:19 +1200)]
panfrost: Fix GL_EXT_vertex_array_bgra

Previously, attributes would always use an RGBA swizzle, even if the
format was BGRA.

Fixes piglit tests bgra-sec-color-pointer and bgra-vert-attrib-pointer.

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

4 years agoci: add llvmpipe paths to virgl rules
Dave Airlie [Mon, 27 Apr 2020 22:13:31 +0000 (08:13 +1000)]
ci: add llvmpipe paths to virgl rules

since llvmpipe changes will affect virgl

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4777>

4 years agoradv: do not expose GTT as device local memory mostly for APUs
Samuel Pitoiset [Wed, 22 Apr 2020 14:54:28 +0000 (16:54 +0200)]
radv: do not expose GTT as device local memory mostly for APUs

On APUs, the memory is unified (all heaps are equally fast) and
apps should count all memory heaps together. But some games like
Id Tech games (Youngblood and such) don't manage memory correctly
on APUs and they spill everything when one VRAM heap is full.

Instead of spilling buffers, they should just allocate new buffers
in the second heap but it seems like these games are confused if
two memory heaps have the DEVICE_LOCAL_BIT set.

This is probably a first step towards better memory management on
APUs but there is still some work to do if we want to run most apps
with a small dedicated VRAM (256MB or so).

This gives a huge boost for Id Tech games on APUs, and doesn't
seem to reduce Feral games performance.

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

4 years agogallium/swr: Fix LLVM 11 compilation issues
Jan Zielinski [Mon, 27 Apr 2020 20:05:35 +0000 (22:05 +0200)]
gallium/swr: Fix LLVM 11 compilation issues

Changes needed to adapt to LLVM API changes in vector
and pointer types.

Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4769>

4 years agoci/freedreno: Add a test run of a few driver options.
Eric Anholt [Fri, 17 Apr 2020 19:02:37 +0000 (12:02 -0700)]
ci/freedreno: Add a test run of a few driver options.

This lets us get coverage of corner cases of the driver that are tricky to
force a testcase to hit.  We don't want to do a full run of the CTS with
each option because that's a lot of runner time, so stack a bunch of
fractional runs in one test job to amortize the test run setup overhead.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4621>

4 years agoci: Clean up some excessive use of pipes in dEQP results processing.
Eric Anholt [Fri, 17 Apr 2020 20:01:50 +0000 (13:01 -0700)]
ci: Clean up some excessive use of pipes in dEQP results processing.

Given that we use set -x in the script, this actually makes the user
experience of viewing logs nicer.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4621>

4 years agoci: Allow namespacing of dEQP run results files.
Eric Anholt [Fri, 17 Apr 2020 19:58:59 +0000 (12:58 -0700)]
ci: Allow namespacing of dEQP run results files.

I want to do multiple runs of some bits of the CTS in one test job to test
some driver options, but I want to be able to see the results from any of
them.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4621>

4 years agofreedreno: Fix calculation of the const buffer cmdstream size.
Eric Anholt [Fri, 17 Apr 2020 17:45:17 +0000 (10:45 -0700)]
freedreno: Fix calculation of the const buffer cmdstream size.

The HW packet requires padding the number of pointers you emit, and we
would assertion fail about running out of buffer space if the number of
UBOs to be uploaded was odd.

Fixes: b4df115d3f3c ("freedreno/a6xx: pre-calculate userconst stateobj size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4621>

4 years agoci: Add sanity checking that dEQP gets the expected GL_RENDERER.
Eric Anholt [Fri, 17 Apr 2020 19:39:32 +0000 (12:39 -0700)]
ci: Add sanity checking that dEQP gets the expected GL_RENDERER.

It's easy to get something wrong in the driver build or container or
something that results in falling back to swrast, and then your only clue
was runtime and how your failure cases suspiciously match a swrast
driver's.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4621>

4 years agoci: Enable --compact-display false on all dEQP runs.
Eric Anholt [Fri, 17 Apr 2020 19:28:58 +0000 (12:28 -0700)]
ci: Enable --compact-display false on all dEQP runs.

We always want to see status updates happening in the logs, otherwise it
can like maybe your machine hung until the run actually completes.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4621>

4 years agozink: explicitly unref old fb object when setting new one
Mike Blumenkrantz [Mon, 27 Apr 2020 17:44:08 +0000 (13:44 -0400)]
zink: explicitly unref old fb object when setting new one

this object has a ref from being created, and its lifetime is expected to
be a single frame, so remove that initial ref when we expect to stop
using it

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

4 years agozink: remove framebuffer cache
Mike Blumenkrantz [Mon, 27 Apr 2020 16:48:08 +0000 (12:48 -0400)]
zink: remove framebuffer cache

this can only match when re-rendering identical frames, which is not a
typical case. the lack of cache eviction also leads to memory ballooning.

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

4 years agost/dri: Set next in template instead of after creation. (v2)
Bas Nieuwenhuizen [Wed, 12 Feb 2020 15:54:21 +0000 (16:54 +0100)]
st/dri: Set next in template instead of after creation. (v2)

This should prevent horrors like Iris has with the delayed calls
to iris_resource_finish_aux_import just because info is not
available at allocation time.

AFAICT all drivers just copy the template except radeonsi/r600
which reset the next pointer.

AFAICT there is also no other place we get a state tracker setting
next ptrs on a resource.

v2: Updated Gallium docs.

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

4 years agomesa/st: call _mesa_initialize() early
Erik Faye-Lund [Fri, 24 Apr 2020 13:41:49 +0000 (15:41 +0200)]
mesa/st: call _mesa_initialize() early

This allows drivers to reliably do things like using the GLSL
type-system during initialization.

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

4 years agomesa/main: one_time_init() -> _mesa_initialize()
Erik Faye-Lund [Fri, 24 Apr 2020 13:34:01 +0000 (15:34 +0200)]
mesa/main: one_time_init() -> _mesa_initialize()

This exposes the logic inside one_time_init() as _mesa_initialize(), so
drivers who needs to use functionality initialized in one_time_init
earlier if they need.

This means we can reliably use the GLSL type-system when compiling
driver built-in shaders.

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

4 years agomesa/main: Do not pass context to one_time_init
Erik Faye-Lund [Fri, 24 Apr 2020 13:27:13 +0000 (15:27 +0200)]
mesa/main: Do not pass context to one_time_init

There's no longer any reason to pass the context down to one_time_init,
because we always do the same thing regardless of the context, and we
don't change the context.

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

4 years agomesa/main: do not init remap-table per api
Erik Faye-Lund [Fri, 24 Apr 2020 13:24:05 +0000 (15:24 +0200)]
mesa/main: do not init remap-table per api

This hasn't really been nessecary since 8386088e3dc ("dispatch: stop
using _mesa_create_exec_table_es1() for GLES1."), when we stopped
diverging the logic here based on the context-API. So let's simplify the
code a bit.

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

4 years agomesa/main: do not pass context to one-time extension init
Erik Faye-Lund [Fri, 24 Apr 2020 12:47:23 +0000 (14:47 +0200)]
mesa/main: do not pass context to one-time extension init

_mesa_problem doesn't use the ctx argument for anything, so there's no
reason to pass it. This saves us from needing a context passed down this
code-path in the first place.

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

4 years agomesa/main: do not store unrecognized extensions in context
Erik Faye-Lund [Fri, 24 Apr 2020 12:41:25 +0000 (14:41 +0200)]
mesa/main: do not store unrecognized extensions in context

We process extension overrides only when we initialize the first
context, which means that unrecognized extensions only appear in the
first context created.

Let's instead store them in a global array, so we can apply them to all
contexts. This has the added benefit of making the initialization of the
first context less special, which allows us to clean up code a bit more.

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

4 years agovulkan: add initial device selection layer. (v6.1)
Dave Airlie [Sun, 29 Mar 2020 23:38:38 +0000 (09:38 +1000)]
vulkan: add initial device selection layer. (v6.1)

This is code Bas has out of tree but I think mesa should be shipping it, and I've improved it.

Initially-written-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
v2: add infinite recursion fix (Bas)
v3: Fix wayland/xcb barrier, whitespace
v4: use a macro for getting apis, shorten some lines, use outarray
v5: rewrite in C, use hash_table/mutex.
v6: use once_init to init the mutex, fix freeing ht

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

4 years agofreedreno/ir3: Add support for disasm of cat2 float32 immediates.
Eric Anholt [Fri, 24 Apr 2020 18:45:31 +0000 (11:45 -0700)]
freedreno/ir3: Add support for disasm of cat2 float32 immediates.

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

4 years agofreedreno/ir3: Refactor out print_reg_src().
Eric Anholt [Fri, 24 Apr 2020 18:40:40 +0000 (11:40 -0700)]
freedreno/ir3: Refactor out print_reg_src().

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

4 years agofreedreno/ir3: Convert remaining disasm src prints to reginfo.
Eric Anholt [Fri, 24 Apr 2020 17:36:41 +0000 (10:36 -0700)]
freedreno/ir3: Convert remaining disasm src prints to reginfo.

More lines of code, but they're much more intelligible.

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

4 years agofreedreno/ir3: Add a unit test for our disassembler.
Eric Anholt [Thu, 23 Apr 2020 19:01:04 +0000 (12:01 -0700)]
freedreno/ir3: Add a unit test for our disassembler.

Makes sure that we can maintain consistent output from our disassembly as
we refactor.  I've only included stuff that matches qcom's disasm so far.

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

4 years agofreedreno/ir3: Print a space after nop counts, like qcom's disasm.
Eric Anholt [Fri, 24 Apr 2020 17:23:20 +0000 (10:23 -0700)]
freedreno/ir3: Print a space after nop counts, like qcom's disasm.

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

4 years agofreedreno/ir3: Fix the disasm of half-float STG dests.
Eric Anholt [Thu, 23 Apr 2020 21:01:59 +0000 (14:01 -0700)]
freedreno/ir3: Fix the disasm of half-float STG dests.

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

4 years agoci: Enable GLES 3.1 testing on db820c (a530).
Eric Anholt [Wed, 22 Apr 2020 19:08:06 +0000 (12:08 -0700)]
ci: Enable GLES 3.1 testing on db820c (a530).

The driver exposes GLES3.1, so let's make sure we're not regressing its
featureset.

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

4 years agofreedreno: Fix derivatives without texturing on a3xx-a5xx.
Eric Anholt [Wed, 22 Apr 2020 18:48:44 +0000 (11:48 -0700)]
freedreno: Fix derivatives without texturing on a3xx-a5xx.

The shader variant tells us if we should set the PIXLODENABLE flag.

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

4 years agoci: Enable GLES3 testing on db410c/db820c (freedreno a306 and a530).
Eric Anholt [Wed, 22 Apr 2020 18:30:38 +0000 (11:30 -0700)]
ci: Enable GLES3 testing on db410c/db820c (freedreno a306 and a530).

We haven't had it enabled due tointermittent failures.  Those failures
are, as far as I can tell, due to GPU faults from buffer overflows where a
failing test in a thread stomps an otherwise passing thread's buffers.  By
running deqp single-threaded, we can get more consistent failures, at the
cost of needing to do a tiny subset of the tests to keep runtime down.

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

4 years agoci: Drop redundant freedreno stage specification.
Eric Anholt [Wed, 22 Apr 2020 18:28:54 +0000 (11:28 -0700)]
ci: Drop redundant freedreno stage specification.

The source rules give us the stage.

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

4 years agofreedreno/ir3: run nir_lower_pack
Jonathan Marek [Fri, 24 Apr 2020 18:28:58 +0000 (14:28 -0400)]
freedreno/ir3: run nir_lower_pack

This lowers pack_32_2x16/unpack_32_2x16 into the scalar versions of those
instructions.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4738>

4 years agonir: add pack_32_2x16_split/unpack_32_2x16_split lowering
Jonathan Marek [Fri, 24 Apr 2020 18:27:33 +0000 (14:27 -0400)]
nir: add pack_32_2x16_split/unpack_32_2x16_split lowering

The new option replaces the two other _split lowering options, since
there's no need for separate options.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4738>

4 years agoradv: Add WSI buffers to BO list only if they can be used.
Bas Nieuwenhuizen [Tue, 24 Mar 2020 16:59:26 +0000 (17:59 +0100)]
radv: Add WSI buffers to BO list only if they can be used.

Also reverse the BO list removal loop. This way typical WSI usage
should find the entry in O(active swapchains) iterations, which
should not be a performance issues. Tested with Doom(2106) which
found the entry in 1 iteration every time.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4306>

4 years agovulkan/wsi: Add callback to set ownership of buffer.
Bas Nieuwenhuizen [Tue, 24 Mar 2020 16:59:07 +0000 (17:59 +0100)]
vulkan/wsi: Add callback to set ownership of buffer.

For radv BO list pruning.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4306>

4 years agoac,radeonsi: fix compilations issues with LLVM 11
Samuel Pitoiset [Mon, 27 Apr 2020 09:01:24 +0000 (11:01 +0200)]
ac,radeonsi: fix compilations issues with LLVM 11

Latest LLVM replaced LLVMVectorTypeKind.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2826
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4755>

4 years agogallium/gallivm: remove unused header include for newer LLVM
Jan Zielinski [Mon, 27 Apr 2020 11:34:59 +0000 (13:34 +0200)]
gallium/gallivm: remove unused header include for newer LLVM

In the top of the trunk LLVM (11) llvm/IR/CallSite.h header
has been removed. The file compiles without this include also
for LLVM 8, but I'm not sure about 9, 10, and older versions
so I disable it only for the latest LLVM

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4748>

4 years agogallium/gallivm: fix compilation issues with llvm 11
Jan Zielinski [Sat, 25 Apr 2020 17:27:07 +0000 (19:27 +0200)]
gallium/gallivm: fix compilation issues with llvm 11

Top of the trunk LLVM removes old vector type
and introduces two new ones - one for fixed-width
and one for scalable vectors. This commit fixes
compilation issues by switching from LLVMVectorTypeKind
to LLVMFixedVectorTypeKind for new LLVM.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4748>

4 years agoir3: Use shared mediump output lowering
Alyssa Rosenzweig [Thu, 23 Apr 2020 23:12:43 +0000 (19:12 -0400)]
ir3: Use shared mediump output lowering

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4716>

4 years agonir: Move nir_lower_mediump_outputs from ir3
Alyssa Rosenzweig [Thu, 23 Apr 2020 23:10:43 +0000 (19:10 -0400)]
nir: Move nir_lower_mediump_outputs from ir3

(Original code from ir3)

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4716>

4 years agonir/algebraic: Detect some kinds of malformed variable names
Ian Romanick [Fri, 24 Apr 2020 00:39:07 +0000 (17:39 -0700)]
nir/algebraic: Detect some kinds of malformed variable names

I spent over an hour trying to debug a problem if a condition on a
variable not being applied.  The problem turned out to be
"a(is_not_negative" instead of "a(is_not_negative)".  This commit would
have detected that problem and failed to build.

v2: Just add $ to the end of the existing regex, and it will fail to
match a malformed string.  Suggested by Jason.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4720>

4 years agopan/bi: Implement 16-bit COMBINE lowering
Alyssa Rosenzweig [Mon, 27 Apr 2020 14:37:20 +0000 (10:37 -0400)]
pan/bi: Implement 16-bit COMBINE lowering

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

4 years agopan/bi: Fix RA wrt 16-bit swizzles
Alyssa Rosenzweig [Mon, 27 Apr 2020 14:38:00 +0000 (10:38 -0400)]
pan/bi: Fix RA wrt 16-bit swizzles

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

4 years agopan/bit: Add SELECT tests
Alyssa Rosenzweig [Sat, 25 Apr 2020 00:52:40 +0000 (20:52 -0400)]
pan/bit: Add SELECT tests

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

4 years agopan/bit: Interpret BI_SELECT
Alyssa Rosenzweig [Fri, 24 Apr 2020 23:14:21 +0000 (19:14 -0400)]
pan/bit: Interpret BI_SELECT

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

4 years agopan/bi: Force BI_SELECT arguments scalar
Alyssa Rosenzweig [Sat, 25 Apr 2020 00:52:28 +0000 (20:52 -0400)]
pan/bi: Force BI_SELECT arguments scalar

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

4 years agopan/bi: Pack ADD SEL16
Alyssa Rosenzweig [Sat, 25 Apr 2020 00:52:17 +0000 (20:52 -0400)]
pan/bi: Pack ADD SEL16

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

4 years agopan/bi: Pack FMA SEL8
Alyssa Rosenzweig [Sat, 25 Apr 2020 00:48:59 +0000 (20:48 -0400)]
pan/bi: Pack FMA SEL8

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

4 years agopan/bi: Pack FMA SEL16
Alyssa Rosenzweig [Sat, 25 Apr 2020 00:13:17 +0000 (20:13 -0400)]
pan/bi: Pack FMA SEL16

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

4 years agopan/bi: Rename BI_SWIZZLE to BI_SELECT
Alyssa Rosenzweig [Fri, 24 Apr 2020 23:10:44 +0000 (19:10 -0400)]
pan/bi: Rename BI_SWIZZLE to BI_SELECT

The select version is more general.

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

4 years agopan/bi: Eliminate writemasks in the IR
Alyssa Rosenzweig [Fri, 24 Apr 2020 21:20:28 +0000 (17:20 -0400)]
pan/bi: Eliminate writemasks in the IR

Since the hardware doesn't support them, they're a burden to deal with,
so let's ensure we never get to a place where we would need to at all.

Disables COMBINE lowering for now.

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

4 years agopan/bi: Fix ADD.v4i8 opcode
Alyssa Rosenzweig [Fri, 24 Apr 2020 21:20:15 +0000 (17:20 -0400)]
pan/bi: Fix ADD.v4i8 opcode

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

4 years agopan/bi: Add missing BI_VECTOR
Alyssa Rosenzweig [Fri, 24 Apr 2020 21:20:07 +0000 (17:20 -0400)]
pan/bi: Add missing BI_VECTOR

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

4 years agopan/bi: Assign blend descriptor for BLEND op
Alyssa Rosenzweig [Fri, 10 Apr 2020 04:25:50 +0000 (00:25 -0400)]
pan/bi: Assign blend descriptor for BLEND op

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

4 years agopan/bi: Passthrough blend types
Alyssa Rosenzweig [Thu, 23 Apr 2020 23:26:01 +0000 (19:26 -0400)]
pan/bi: Passthrough blend types

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

4 years agopan/bi: Passthrough type for ATEST
Alyssa Rosenzweig [Thu, 23 Apr 2020 23:03:44 +0000 (19:03 -0400)]
pan/bi: Passthrough type for ATEST

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

4 years agopan/bi: Pack fp16 ATEST
Alyssa Rosenzweig [Thu, 23 Apr 2020 23:03:35 +0000 (19:03 -0400)]
pan/bi: Pack fp16 ATEST

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

4 years agomesa: Skip 3-byte array formats in _mesa_array_format_flip_channels
Michel Dänzer [Fri, 24 Apr 2020 09:40:14 +0000 (11:40 +0200)]
mesa: Skip 3-byte array formats in _mesa_array_format_flip_channels

Byte swapping makes no sense for 3-byte formats: Swapping the order of 2
or 4 bytes at a time would inevitably result in bytes getting mixed up
between neighbouring pixels.

Fixes crash with a debugging build on a big endian machine due hitting
the unreachable() at the end of the function.

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

4 years agomesa: replace GLenum target with gl_shader_stage in NewProgram
Marek Olšák [Tue, 31 Mar 2020 14:03:55 +0000 (10:03 -0400)]
mesa: replace GLenum target with gl_shader_stage in NewProgram

So that the GLSL compiler doesn't have to use the GLenum conversion
functions.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4756>

4 years agodrm-uapi,radv,radeonsi: Add amdgpu_drm.h header.
Bas Nieuwenhuizen [Sat, 25 Apr 2020 18:03:15 +0000 (20:03 +0200)]
drm-uapi,radv,radeonsi: Add amdgpu_drm.h header.

Use it instead of the libdrm provided amdgpu_drm.h header. I used
the kernel revision from the README to get the header so the
header versions should be consistent.

Tested by removing /usr/include/libdrm/amdgpu_drm.h from my dev-machine.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4749>

4 years agomesa: extend _mesa_bind_vertex_buffer to take ownership of the buffer reference
Marek Olšák [Sun, 22 Mar 2020 22:13:45 +0000 (18:13 -0400)]
mesa: extend _mesa_bind_vertex_buffer to take ownership of the buffer reference

This reduces overhead of _mesa_reference_buffer_object_ from 6% to 4%
with glthread when profiling the game "torcs" with non-VBO data uploaded
by glthread.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

4 years agomesa: add offset_is_int32 param into _mesa_bind_vertex_buffer for glthread
Marek Olšák [Sat, 7 Mar 2020 02:23:11 +0000 (21:23 -0500)]
mesa: add offset_is_int32 param into _mesa_bind_vertex_buffer for glthread

glthread will pass signed integer offsets, so don't reset negative offsets
to 0 there.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

4 years agomesa: add Const.BufferCreateMapUnsynchronizedThreadSafe & MESA_MAP_THREAD_SAFE
Marek Olšák [Sun, 8 Mar 2020 21:43:26 +0000 (17:43 -0400)]
mesa: add Const.BufferCreateMapUnsynchronizedThreadSafe & MESA_MAP_THREAD_SAFE

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

4 years agogallium: add PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE for glthread
Marek Olšák [Fri, 6 Mar 2020 02:49:30 +0000 (21:49 -0500)]
gallium: add PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE for glthread

and add radeonsi support.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

4 years agoglthread: sort variables in marshal structures to pack them optimally
Marek Olšák [Mon, 23 Mar 2020 23:39:40 +0000 (19:39 -0400)]
glthread: sort variables in marshal structures to pack them optimally

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

4 years agoglthread: use GLenum16 in batch buffers to save space
Marek Olšák [Mon, 23 Mar 2020 01:07:38 +0000 (21:07 -0400)]
glthread: use GLenum16 in batch buffers to save space

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

4 years agoglthread: reduce dereferences of the next batch
Marek Olšák [Fri, 27 Mar 2020 10:06:31 +0000 (06:06 -0400)]
glthread: reduce dereferences of the next batch

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

4 years agoglthread: use 32-bit align instead of 64-bit ALIGN
Marek Olšák [Fri, 27 Mar 2020 09:57:56 +0000 (05:57 -0400)]
glthread: use 32-bit align instead of 64-bit ALIGN

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

4 years agomesa: remove exec="dynamic" from Draw functions that are not really dynamic
Marek Olšák [Sun, 22 Mar 2020 23:35:28 +0000 (19:35 -0400)]
mesa: remove exec="dynamic" from Draw functions that are not really dynamic

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

4 years agomesa: reset primitive restart state in glClientAttribDefaultEXT
Marek Olšák [Sun, 22 Mar 2020 00:01:37 +0000 (20:01 -0400)]
mesa: reset primitive restart state in glClientAttribDefaultEXT

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

4 years agomesa: replace _NEW_EVAL with vbo_exec_update_eval_maps
Marek Olšák [Sat, 21 Mar 2020 05:40:30 +0000 (01:40 -0400)]
mesa: replace _NEW_EVAL with vbo_exec_update_eval_maps

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

4 years agoac: reassociate FP expressions for inexact instructions for radeonsi
Marek Olšák [Thu, 23 Apr 2020 03:01:28 +0000 (23:01 -0400)]
ac: reassociate FP expressions for inexact instructions for radeonsi

Totals:
SGPRS: 2591784 -> 2590696 (-0.04 %)
VGPRS: 1666888 -> 1666736 (-0.01 %)
Spilled SGPRs: 4131 -> 4107 (-0.58 %)
Spilled VGPRs: 38 -> 38 (0.00 %)
Private memory VGPRs: 2176 -> 2176 (0.00 %)
Scratch size: 2228 -> 2228 (0.00 %) dwords per thread
Code Size: 52715468 -> 52693584 (-0.04 %) bytes
LDS: 92 -> 92 (0.00 %) blocks
Max Waves: 479897 -> 479892 (-0.00 %)
Wait states: 0 -> 0 (0.00 %)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4696>

4 years agoac: generate FMA for inexact instructions for radeonsi
Marek Olšák [Thu, 23 Apr 2020 02:45:45 +0000 (22:45 -0400)]
ac: generate FMA for inexact instructions for radeonsi

NIR mostly does this already.

Totals:
SGPRS: 2588520 -> 2591784 (0.13 %)
VGPRS: 1666984 -> 1666888 (-0.01 %)
Spilled SGPRs: 4074 -> 4131 (1.40 %)
Spilled VGPRs: 38 -> 38 (0.00 %)
Private memory VGPRs: 2176 -> 2176 (0.00 %)
Scratch size: 2228 -> 2228 (0.00 %) dwords per thread
Code Size: 52726872 -> 52715468 (-0.02 %) bytes
LDS: 92 -> 92 (0.00 %) blocks
Max Waves: 479872 -> 479897 (0.01 %)
Wait states: 0 -> 0 (0.00 %)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4696>

4 years agoac: update and document fast math flags used by radeonsi
Marek Olšák [Thu, 23 Apr 2020 02:38:14 +0000 (22:38 -0400)]
ac: update and document fast math flags used by radeonsi

This should have no effect, because we never use FP division, but
it's safer for the future.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4696>

4 years agoac: force enable -structurizecfg-skip-uniform-regions for LLVM 11
Marek Olšák [Thu, 23 Apr 2020 01:05:36 +0000 (21:05 -0400)]
ac: force enable -structurizecfg-skip-uniform-regions for LLVM 11

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4696>

4 years agost/mesa: Treat vertex inputs absent in inputMapping as zero in mesa_to_tgsi
Danylo Piliaiev [Thu, 23 Apr 2020 09:41:34 +0000 (12:41 +0300)]
st/mesa: Treat vertex inputs absent in inputMapping as zero in mesa_to_tgsi

After updating vertex inputs being read based on optimized NIR, they may go out
of sync with inputs in mesa IR. Which is translated to TGSI and used together
with NIR if draw doesn't have llvm.

It's much easier to treat such inputs as zero because there is no pass to
entirely get rid of them and they don't contribute to shader's output.

Fixes: d684fb37bfbc47d098158cb03c0672119a4469fe
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2815
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4705>

4 years agogitlab-ci: add lists of expected failures for RADV CI
Samuel Pitoiset [Mon, 20 Apr 2020 07:02:18 +0000 (09:02 +0200)]
gitlab-ci: add lists of expected failures for RADV CI

Currently only supports PITCAIRN, POLARIS10, VEGA10 and NAVI10
with ACO only, but it's a start.

Unfortunately, we have to duplicate and we will have to try to
keep these lists up-to-date, but it's better than nothing.

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

4 years agoradv: fix robust_buffer_access if enabled via VkPhysicalDeviceFeatures2
Samuel Pitoiset [Thu, 23 Apr 2020 12:05:07 +0000 (14:05 +0200)]
radv: fix robust_buffer_access if enabled via VkPhysicalDeviceFeatures2

It can be enabled via pEnabledFeatures or via vkPhysicalDeviceFeatures2.

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

4 years agogallivm: fix stencil border
Dave Airlie [Fri, 24 Apr 2020 01:23:19 +0000 (11:23 +1000)]
gallivm: fix stencil border

Fixes:
dEQP-GLES31.functional.texture.border_clamp.unused_channels.depth32f_stencil8_sample_stencil
dEQP-GLES31.functional.texture.border_clamp.sampler.uint_stencil

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>

4 years agollvmpipe: clamp color storage for integer types.
Dave Airlie [Tue, 21 Apr 2020 05:28:38 +0000 (15:28 +1000)]
llvmpipe: clamp color storage for integer types.

If storing to an integer for lower bit size (i.e. 16-bit uint to
10-bit uint), we need to clamp to the maximum value not truncate.

Fixes:
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.r16_uint.a2b10g10r10_uint_pack32.optimal_optimal_nearest

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>

4 years agollvmpipe: enable stencil only formats. (v2)
Dave Airlie [Tue, 3 Dec 2019 06:01:37 +0000 (16:01 +1000)]
llvmpipe: enable stencil only formats. (v2)

This fixes two bugs, one in clearing and one in sign extensions
for S8 only types, and enables it for use.

These are useful for vulkan support later.

v2: move casting to same place as Z casting.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>

4 years agollvmpipe/setup: add point size clamping
Dave Airlie [Thu, 16 Apr 2020 07:15:28 +0000 (17:15 +1000)]
llvmpipe/setup: add point size clamping

Fixes
dEQP-GLES2.functional.rasterization.limits.points
dEQP-VK.rasterization.primitive_size.points.point_size*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>

4 years agollvmpipe: fix d32 unorm depth conversions.
Dave Airlie [Wed, 22 Apr 2020 00:05:59 +0000 (10:05 +1000)]
llvmpipe: fix d32 unorm depth conversions.

When the depth value was 1.0 and was being converted to Z32_UNORM
the conversion would scale it up to INT32_MAX + 1 which would
cause FPToSI to give incorrect results, changing it to use
FPToUI for the unsigned 32-bit case only fixes it.

Fixes:
GTF-GL45.gtf30.GL3Tests.depth_texture.depth_texture_fbo_clear

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>

4 years agodraw/tess: fix TES patch vertices in.
Dave Airlie [Mon, 6 Apr 2020 06:40:04 +0000 (16:40 +1000)]
draw/tess: fix TES patch vertices in.

Fixes CTS KHR-GL45.tessellation_shader.single.max_patch_vertices

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>

4 years agollvmpipe: fix ssbo alignment
Dave Airlie [Mon, 6 Apr 2020 07:00:19 +0000 (17:00 +1000)]
llvmpipe: fix ssbo alignment

KHR-GL45.geometry_shader.api.max_shader_storage_blocks

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>

4 years agollvmpipe: bump max images to 16
Dave Airlie [Tue, 7 Apr 2020 02:08:20 +0000 (12:08 +1000)]
llvmpipe: bump max images to 16

This is needed to make some tests run, and helps for vulkan later.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>

4 years agoutil/indirect: handle stride less than number of parameters.
Dave Airlie [Mon, 20 Apr 2020 05:39:50 +0000 (15:39 +1000)]
util/indirect: handle stride less than number of parameters.

It's legal to have a stride less than the num of parameters,
in this case no need to try and over map the buffer which asserts

Fixes:
GTF-GL45.gtf43.GL3Tests.multi_draw_indirect.multi_draw_indirect_stride

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>

4 years agogallivm/nir: add helper invocation support
Dave Airlie [Fri, 27 Mar 2020 05:27:26 +0000 (15:27 +1000)]
gallivm/nir: add helper invocation support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>

4 years agogallivm/nir: fix image store conversions
Dave Airlie [Tue, 7 Apr 2020 05:06:26 +0000 (15:06 +1000)]
gallivm/nir: fix image store conversions

This fixes a few of the image store paths, to do the
correct clamping of unsigned/signed values

Fixes: KHR-GLES31.core.layout_binding.block_layout_binding_block_ComputeShader
KHR-GL45.shader_image_load_store.basic-allFormats-store
KHR-GL46.shader_image_load_store.multiple-uniforms

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>

4 years agotu: Don't invert point coords
Connor Abbott [Fri, 24 Apr 2020 13:53:19 +0000 (15:53 +0200)]
tu: Don't invert point coords

We shouldn't need to invert them, and the Vulkan blob doesn't either.

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

4 years agoir3: Remove VARYING_SLOT_PNTC remapping hack
Connor Abbott [Thu, 23 Apr 2020 14:23:18 +0000 (16:23 +0200)]
ir3: Remove VARYING_SLOT_PNTC remapping hack

The st now does this for us.

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

4 years agost/nir: Fix assigning PointCoord location with !PIPE_CAP_TEXCOORD
Connor Abbott [Thu, 23 Apr 2020 14:08:21 +0000 (16:08 +0200)]
st/nir: Fix assigning PointCoord location with !PIPE_CAP_TEXCOORD

This was trying to emulate the effect of mapping GL -> TGSI -> NIR,
but failed to handle VARYING_SLOT_PNTC which led to a kludgy workaround
in freedreno.

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